ID of this Component, unique within the Scene.
Components are mapped by this ID in {@link Scene.components}.
Arbitrary, user-defined metadata on this component.
The parent Scene that contains this Component.
The viewer that contains this Scene.
Gets whether to prevent camera from being pitched upside down.
The camera is upside down when the angle between Camera.up and Camera.worldUp is less than one degree.
Default value is false.
true if pitch rotation is currently constrained.
Sets whether to prevent camera from being pitched upside down.
The camera is upside down when the angle between Camera.up and Camera.worldUp is less than one degree.
Fires a {@link Camera.constrainPitch:event} event on change.
Default value is false.
true if pitch rotation is currently constrained.
Gets the Camera's custom projection.
This is used while Camera.projection equals "customProjection".
The custom projection.
Gets an optional matrix to premultiply into Camera.matrix matrix.
This is intended to be used for stereo rendering with WebVR etc.
The matrix.
Sets an optional matrix to premultiply into Camera.matrix matrix.
This is intended to be used for stereo rendering with WebVR etc.
Gets the position of the Camera's eye.
Default vale is [0,0,10].
Sets the position of the Camera's eye.
Default value is [0,0,10].
Gets distance from Camera.look to Camera.eye.
The distance.
Gets the Camera's frustum projection.
The Camera uses this while Camera.projection equals frustum.
The Ortho component.
Gets whether to lock yaw rotation to pivot about the World-space "up" axis.
Fires a {@link Camera.gimbalLock:event} event on change.
Returns true if gimbal is locked.
Sets whether to lock yaw rotation to pivot about the World-space "up" axis.
Fires a {@link Camera.gimbalLock:event} event on change.
Gets the inverse of the Camera's viewing transform matrix.
This has the same value as Camera.normalMatrix.
The inverse viewing transform matrix.
Gets the position of this Camera's point-of-interest.
Default value is [0,0,0].
Camera look position.
Sets the position of this Camera's point-of-interest.
Default value is [0,0,0].
Gets the Camera's viewing transformation matrix.
Fires a {@link Camera.matrix:event} event on change.
The viewing transform matrix.
The Camera's viewing normal transformation matrix.
Fires a {@link Camera.matrix:event} event on change.
The viewing normal transform matrix.
Gets the Camera's orthographic projection.
The Camera uses this while Camera.projection equals ortho.
The Ortho component.
Gets the Camera's perspective projection.
The Camera uses this while Camera.projection equals perspective.
The Perspective component.
Gets the Camera's projection transformation projMatrix.
Fires a {@link Camera.projMatrix:event} event on change.
The projection matrix.
Gets the currently active projection for this Camera.
The currently active project is selected with Camera.projection.
The currently active projection is active.
Gets the active projection type.
Possible values are "perspective", "ortho", "frustum" and "customProjection".
Default value is "perspective".
Identifies the active projection type.
Sets the active projection type.
Accepted values are "perspective", "ortho", "frustum" and "customProjection".
Default value is "perspective".
Gets the Camera's viewing transformation matrix.
Fires a {@link Camera.matrix:event} event on change.
The viewing transform matrix.
The Camera's viewing normal transformation matrix.
Fires a {@link Camera.matrix:event} event on change.
The viewing normal transform matrix.
Gets the up, right and forward axis of the World coordinate system.
Has format: [rightX, rightY, rightZ, upX, upY, upZ, forwardX, forwardY, forwardZ]
Default axis is [1, 0, 0, 0, 1, 0, 0, 0, 1]
The current World coordinate axis.
Sets the up, right and forward axis of the World coordinate system.
Has format: [rightX, rightY, rightZ, upX, upY, upZ, forwardX, forwardY, forwardZ]
Default axis is [1, 0, 0, 0, 1, 0, 0, 0, 1]
Gets the direction of World-space "forwards".
This is set by Camera.worldAxis.
Default value is [0,0,1].
The "up" vector.
Gets the direction of World-space "right".
This is set by Camera.worldAxis.
Default value is [1,0,0].
The "up" vector.
Gets the direction of World-space "up".
This is set by Camera.worldAxis.
Default value is [0,1,0].
The "up" vector.
Gets if the World-space X-axis is "up".
Gets if the World-space Y-axis is "up".
Gets if the World-space Z-axis is "up".
Destroys all Components that are owned by this. These are Components that were instantiated with this Component as their first constructor argument.
Destroys this component.
Logs an error for this component to the JavaScript console.
The console message will have this format: [ERROR] [<component type> =<component id>: <message>
Also fires the message as an "error" event on the parent Scene.
The message to log
Fires an event on this component.
Notifies existing subscribers to the event, optionally retains the event to give to any subsequent notifications on the event as they are made.
The event type name
The event parameters
Returns true if there are any subscribers to the given event on this component.
The event
True if there are any subscribers to the given event on this component.
Tests if this component is of the given type, or is a subclass of the given type.
Logs a console debugging message for this component.
The console message will have this format: [LOG] [<component type> <component id>: <message>
Also fires the message as a "log" event on the parent Scene.
The message to log
Cancels an event subscription that was previously made with Component.on or Component.once.
Subscription ID
Subscribes to an event on this component.
The callback is be called with this component as scope.
The event
Called fired on the event
Handle to the subscription, which may be used to unsubscribe with .off.
Subscribes to the next occurrence of the given event, then un-subscribes as soon as the event is subIdd.
This is equivalent to calling Component.on, and then calling Component.off inside the callback function.
Data event to listen to
Called when fresh data is available at the event
Rotates Camera.eye about Camera.look around the right axis (orthogonal to Camera.up and "look").
Angle of rotation in degrees
Rotates Camera.eye about Camera.look, around the Camera.up vector
Angle of rotation in degrees
Pans the Camera along its local X, Y and Z axis.
The pan vector
Rotates Camera.look about Camera.eye, around the right axis (orthogonal to Camera.up and "look").
Angle of rotation in degrees
Logs a warning for this component to the JavaScript console.
The console message will have this format: [WARN] [<component type> =<component id>: <message>
Also fires the message as a "warn" event on the parent Scene.
The message to log
Rotates Camera.look about Camera.eye, around the Camera.up vector.
Angle of rotation in degrees
Increments/decrements the Camera's zoom factor, which is the distance between Camera.eye and Camera.look.
Zoom factor increment.
Generated using TypeDoc
Manages viewing and projection transforms for its Scene.