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 if this CameraControl is active or not.
When inactive, the CameraControl will not react to input.
Default is true.
Returns true if this CameraControl is active.
Sets if this CameraControl is active or not.
When inactive, the CameraControl will not react to input.
Default is true.
Gets whether to vertically constrain the Camera position for first-person navigation.
When set true, this constrains Camera.eye to its current vertical position.
Only applies when CameraControl.navMode is "firstPerson".
Default is false.
true when Camera is vertically constrained.
Sets whether to vertically constrain the Camera position for first-person navigation.
When set true, this constrains Camera.eye to its current vertical position.
Only applies when CameraControl.navMode is "firstPerson".
Default is false.
Gets the dolly inertia factor.
Default is 0.
The current dolly inertia factor.
Sets the dolly inertia factor.
This factor configures how much the Camera keeps moving after you finish dollying it.
This factor is a value in range [0..1]. A value of 0.0 causes dollying to immediately stop,
0.5 causes dollying to decay 50% on each animation frame, while 1.0 causes no decay, which allows dollying
to continue until further input stops it.
You might set dollyInertia to zero when you want be able to precisely position or rotate the Camera,
without interference from inertia. This also means that xeokit renders less frames while dollying the Camera,
which can improve rendering performance.
Default is 0.
Gets the minimum dolly speed.
Default is 0.04.
The current minimum dolly speed.
Sets the minimum dolly speed.
Default is 0.04.
Gets the proximity to the closest object below which dolly speed decreases, and above which dolly speed increases.
Default is 35.0.
The current dolly proximity threshold.
Sets the proximity to the closest object below which dolly speed decreases, and above which dolly speed increases.
Default is 35.0.
Returns true if dolly-to-pointer behaviour is enabled.
Returns true when double-pick-fly-to mode is enabled.
Gets the current drag rotation rate.
Default is 360.0.
The current drag rotation rate.
Sets the current drag rotation rate.
This configures how many degrees the Camera rotates/orbits for a full sweep of the canvas by mouse or touch dragging.
For example, a value of 360.0 indicates that the Camera rotates/orbits 360.0 degrees horizontally
when we sweep the entire width of the canvas.
CameraControl makes vertical rotation half as sensitive as horizontal rotation, so that we don't tend to
flip upside-down. Therefore, a value of 360.0 rotates/orbits the Camera through 180.0 degrees
vertically when we sweep the entire height of the canvas.
Default is 360.0.
Gets whether this CameraControl is in first-person mode.
In "first person" mode (disabled by default) the look position rotates about the eye position. Otherwise, Camera.eye rotates about Camera.look.
Default is false.
Deprecated - use CameraControl.navMode instead.
Returns true if first-person mode is enabled.
Sets whether this CameraControl is in first-person mode.
In "first person" mode (disabled by default) the look position rotates about the eye position. Otherwise, Camera.eye rotates about Camera.look.
Default is false.
Deprecated - use CameraControl.navMode instead.
Sets whether the Camera follows the mouse/touch pointer.
In orbiting mode, the Camera will orbit about the pointer, and will dolly to and from the pointer.
In fly-to mode, the Camera will dolly to and from the pointer, however the World will always rotate about the Camera position.
In plan-view mode, the Camera will dolly to and from the pointer, however the Camera will not rotate.
Default is true.
See class comments for more info.
Returns true if the Camera follows the pointer.
Sets whether the Camera follows the mouse/touch pointer.
In orbiting mode, the Camera will orbit about the pointer, and will dolly to and from the pointer.
In fly-to mode, the Camera will dolly to and from the pointer, however the World will always rotate about the Camera position.
In plan-view mode, the Camera will dolly to and from the pointer, however the Camera will not rotate.
Default is true.
See class comments for more info.
Gets custom mappings of keys to CameraControl actions.
See class docs for usage.
Current key mappings.
Sets custom mappings of keys to CameraControl actions.
See class docs for usage.
Gets how much the Camera dollys each second with keyboard input.
Default is 15.0.
The current keyboard dolly rate.
Sets how much the Camera dollys each second with keyboard input.
Default is 15.0, to dolly the Camera 15.0 World-space units per second while we hold down
the + and - keys.
Gets how much the Camera pans each second with keyboard input.
Default is 5.0.
The current keyboard pan rate.
Sets how much the Camera pans each second with keyboard input.
Default is 5.0, to pan the Camera 5.0 World-space units every second that
a panning key is depressed. See the CameraControl class documentation for which keys control
panning.
Panning direction is aligned to our Camera's orientation. When we pan horizontally, we pan to our left and right, when we pan vertically, we pan upwards and downwards, and when we pan forwards and backwards, we pan along the direction the Camera is pointing.
Unlike dollying when followPointer is true, panning does not follow the pointer.
Sets how many degrees per second the Camera rotates/orbits with keyboard input.
Default is 90.0.
The current keyboard rotation rate.
Sets how many degrees per second the Camera rotates/orbits with keyboard input.
Default is 90.0, to rotate/orbit the Camera 90.0 degrees every second that
a rotation key is depressed. See the CameraControl class documentation for which keys control
rotation/orbit.
Gets how much the Camera dollys each second while the mouse wheel is spinning.
Default is 100.0.
The current mouseWheel dolly rate.
Sets how much the Camera dollys each second while the mouse wheel is spinning.
Default is 100.0, to dolly the Camera 10.0 World-space units per second as we spin
the mouse wheel.
Gets the current navigation mode.
Accepted values are:
See class comments for more info.
The navigation mode
Sets the current navigation mode.
Accepted values are:
See class comments for more info.
Gets the pan inertia factor.
Default is 0.5.
The current pan inertia factor.
Sets the pan inertia factor.
This factor configures how much the Camera keeps moving after you finish panning it.
This factor is a value in range [0..1]. A value of 0.0 causes panning to immediately stop,
0.5 causes panning to decay 50% on each animation frame, while 1.0 causes no decay, which allows panning
to continue until further input stops it.
You might set panInertia to zero when you want be able to precisely position or rotate the Camera,
without interference from inertia. This also means that xeokit renders less frames while panning the Camera,
wich can improve rendering performance.
Default is 0.5.
Returns true if dolly-to-pointer behaviour is enabled.
Sets the HTMl element to represent the pivot point when CameraControl.followPointer is true.
See class comments for an example.
Gets the current World-space 3D pivot position.
Only applies when CameraControl.followPointer is true.
worldPos The current World-space 3D pivot position.
Sets the current World-space 3D target position.
Only applies when CameraControl.followPointer is true.
Gets whether mouse and touch input is enabled.
Default is true.
Disabling mouse and touch input on CameraControl is desirable when we want to temporarily use mouse or
touch input to interact with some other 3D control, without interfering with the Camera.
Returns true if mouse and touch input is enabled.
Sets whether mouse and touch input is enabled.
Default is true.
Disabling mouse and touch input on CameraControl is useful when we want to temporarily use mouse or
touch input to interact with some other 3D control, without disturbing the Camera.
Gets the rotation inertia factor.
Default is 0.0.
Does not apply when CameraControl.navMode is "planView", which disallows rotation.
The inertia factor.
Sets a factor in range [0..1] indicating how much the Camera keeps moving after you finish rotating it.
A value of 0.0 causes it to immediately stop, 0.5 causes its movement to decay 50% on each tick,
while 1.0 causes no decay, allowing it continue moving, by the current rate of rotation.
You may choose an inertia of zero when you want be able to precisely rotate the Camera, without interference from inertia. Zero inertia can also mean that less frames are rendered while you are rotating the Camera.
Default is 0.0.
Does not apply when CameraControl.navMode is "planView", which disallows rotation.
Gets whether smart default pivoting is enabled.
When true, we'll pivot by default about the 3D position of the mouse/touch pointer on an
imaginary sphere that's centered at Camera.eye and sized to the Scene boundary.
When false, we'll pivot by default about Camera.look.
Default is false.
Returns true when pivoting by default about the selected point on the virtual sphere, or false when pivoting by default about Camera.look.
Sets whether smart default pivoting is enabled.
When true, we'll pivot by default about the 3D position of the mouse/touch pointer on an
imaginary sphere that's centered at Camera.eye and sized to the Scene boundary.
When false, we'll pivot by default about Camera.look.
Default is false.
Gets how fast the Camera pans on touch panning
Default is 1.0.
The current touch pan rate.
Sets how fast the camera pans on touch panning
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
Fires when the model is loaded
The loaded event
Called fired on the event
Scope for the callback
Event fired when the pointer moves while hovering over an Entity.
The hover event
Called fired on the event
Scope for the callback
Event fired when the pointer moves while hovering over empty space.
The hoverOff event
Called fired on the event
Scope for the callback
Event fired when the pointer moves onto an Entity.
The hoverEnter event
Called fired on the event
Scope for the callback
Event fired when the pointer moves off an Entity.
The hoverOut event
Called fired on the event
Scope for the callback
Event fired when we left-click or tap on an Entity.
The picked event
Called fired on the event
Scope for the callback
Event fired when we left-click or tap on the surface of an Entity.
The pickedSurface event
Called fired on the event
Scope for the callback
Event fired when we left-click or tap on empty space.
The pickedNothing event
Called fired on the event
Scope for the callback
Event fired wwhen we left-double-click or double-tap on an Entity.
The doublePicked event
Called fired on the event
Scope for the callback
Event fired when we left-double-click or double-tap on the surface of an Entity.
The doublePickedSurface event
Called fired on the event
Scope for the callback
Event fired when we left-double-click or double-tap on empty space.
The doublePickedNothing event
Called fired on the event
Scope for the callback
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
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
Generated using TypeDoc
Controls the Camera with user input, and fires events when the user interacts with pickable Entitys.