ViewComponent

Native view component.

Provides access to a native view component instance.

.TypeName: string 

.extent: number 

1.2.2+

Get the width of the orthographic viewing volume.

.extent 

1.2.2+

Set the width of the orthographic viewing volume.

Only has an effect if projectionType is Orthographic.

.far: number 

Far clipping plane value.

.far 

Set far clipping plane distance for the view.

If an XR session is active, the change will apply in the following frame, otherwise the change is immediate.

.fov: number 

Get the horizontal field of view for the view, in degrees.

If an XR session is active and this is the left or right eye view, this returns the field of view reported by the device, regardless of the fov that was set.

.fov 

Set the horizontal field of view for the view, in degrees.

Only has an effect if projectionType is Perspective.

If an XR session is active and this is the left or right eye view, the field of view reported by the device is used and this value is ignored. After the XR session ends, the new value is applied.

.near: number 

ViewComponent near clipping plane value.

.near 

Set near clipping plane distance for the view.

If an XR session is active, the change will apply in the following frame, otherwise the change is immediate.

.projectionMatrix: Float32Array 

Equivalent to getProjectionMatrix.

Note: Prefer to use getProjectionMatrix for performance.

.projectionType: ProjectionType 

1.2.2+

Projection type of the view.

.projectionType 

1.2.2+

Set the projection type of the view.

.viewport: Int32Array 

Get viewport of the view of the form: [x, y, width, height].

.getProjectionMatrix<T>(out: T) ⇒ T 

.getProjectionMatrix() ⇒ Float32Array

Projection matrix.

Returns: The out parameter.

ParamTypeDescription
outTDestination array/vector, expected to have at least 16 elements.
Template ParamType Definition
Textends NumberArray

.getViewport<T>(out: T) ⇒ T 

.getViewport() ⇒ Int32Array

Get viewport of the view of the form: [x, y, width, height].

Returns: The out parameter.

ParamTypeDescription
outTDestination array/vector, expected to have at least 4 elements.
Template ParamType Definition
Textends NumberArray