True once this Component has been destroyed.
Don't use this Component if this is true
.
Protected
dirtyUnique ID of this Component.
Static
AXIS_Static
AXIS_Static
AXIS_Static
AXIS_Static
AXIS_Static
AXIS_Static
DOLLY_Moves the camera backward (dolly out).
Static
DOLLY_Moves the camera forward (dolly in).
Static
PAN_Represents a backward panning action.
Static
PAN_Represents a downward panning action.
Static
PAN_Represents a forward panning action.
Static
PAN_Represents a leftward panning action.
Static
PAN_Represents a rightward panning action.
Static
PAN_Represents an upward panning action.
Static
ROTATE_Rotates the view counterclockwise around the X-axis.
Static
ROTATE_Rotates the view clockwise around the X-axis.
Static
ROTATE_Rotates the view counterclockwise around the Y-axis.
Static
ROTATE_Rotates the view clockwise around the Y-axis.
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 viewer!Camera position for first-person navigation.
When set true
, this constrains viewer!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 viewer!Camera position for first-person navigation.
When set true
, this constrains viewer!Camera#eye to its current vertical position.
Only applies when CameraControl#navMode is "firstPerson"
.
Default is false
.
Set true
to vertically constrain the Camera.
Gets the dolly inertia factor.
Default is 0
.
The current dolly inertia factor.
Sets the dolly inertia factor.
This factor configures how much the viewer!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
.
New dolly inertia factor.
Gets the minimum dolly speed.
Default is 0.04
.
The current minimum dolly speed.
Sets the minimum dolly speed.
Default is 0.04
.
New dolly minimum speed.
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
.
New dolly proximity threshold.
Gets the double click time frame length in milliseconds.
Default is 250
Current double click time frame.
Sets the double click time frame length in milliseconds.
If two mouse click events occur within this time frame, it is considered a double click.
Default is 250
New double click time frame.
Gets whether double-picking an object causes the viewer!Camera to fly to its boundary.
Default is false
.
Returns true
when double-pick-fly-to mode is enabled.
Sets whether double-picking an object causes the viewer!Camera to fly to its boundary.
Default is false
.
Set true
to enable double-pick-fly-to mode.
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 viewer!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
.
The new drag rotation rate.
Sets whether the viewer!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 viewer!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.
Set true
to enable the Camera to follow the pointer.
Gets how much the viewer!Camera dollys each second with keyboard input.
Default is 15.0
.
The current keyboard dolly rate.
Sets how much the viewer!Camera dollys each second with keyboard input.
Default is 15.0
, to dolly the viewer!Camera 15.0
World-space units per second while we hold down
the +
and -
keys.
The new keyboard dolly rate.
Gets whether the keyboard shortcuts are enabled ONLY if the mouse is over the canvas or ALWAYS.
If true
, the keyboard shortcuts are enabled ONLY if the mouse is over the canvas.
Gets how much the viewer!Camera pans each second with keyboard input.
Default is 5.0
.
The current keyboard pan rate.
Sets how much the viewer!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.
The new keyboard pan rate.
Sets how many degrees per second the viewer!Camera rotates/orbits with keyboard input.
Default is 90.0
.
The current keyboard rotation rate.
Sets how many degrees per second the viewer!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.
The new keyboard rotation rate.
Gets custom mappings of keys to CameraControl actions.
Sets custom mappings of keys to CameraControl
actions.
See class docs for usage.
Either a set of new key mappings, or a string to select a keyboard layout,
which causes CameraControl
to use the default key mappings for that layout.
Gets how much the viewer!Camera dollys each second while the mouse wheel is spinning.
Default is 100.0
.
The current mouseWheel dolly rate.
Sets how much the viewer!Camera dollys each second while the mouse wheel is spinning.
Default is 100.0
, to dolly the viewer!Camera 10.0
World-space units per second as we spin
the mouse wheel.
The new mouse wheel dolly rate.
Gets the current navigation mode.
Returned values are:
The navigation mode: OrbitNavigationMode, FirstPersonNavigationMode or PlanViewNavigationMode.
Sets the current navigation mode.
Accepted values are:
See class comments for more info.
The navigation mode: OrbitNavigationMode, FirstPersonNavigationMode or PlanViewNavigationMode.
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 viewer!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
.
New pan inertia factor.
Gets whether right-clicking pans the viewer!Camera.
Default is true
.
Returns false
when pan on right-click is disabled.
Sets whether either right-clicking (true) or middle-clicking (false) pans the viewer!Camera.
Default is true
.
Set false
to disable pan on right-click.
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
.
The new World-space 3D target position.
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 viewer!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 viewer!Camera.
Set true
to enable mouse and touch input.
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 viewer!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.
New inertial factor.
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 viewer!Camera#eye and sized to the scene!Scene boundary.
When false
, we'll pivot by default about viewer!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 viewer!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 viewer!Camera#eye and sized to the scene!Scene boundary.
When false
, we'll pivot by default about viewer!Camera#look.
Default is false
.
Set true
to pivot by default about the selected point on the virtual sphere, or false
to pivot by default about viewer!Camera#look.
Gets the current snap radius.
Sets the current snap radius for "hoverSnapOrSurface" events, to specify whether the radius within which the pointer snaps to the nearest vertex or the nearest edge.
Default value is 30 pixels.
Gets whether the pointer snap to edge.
Sets whether the pointer snap to edge.
Gets whether the pointer snap to vertex.
Sets whether the pointer snap to vertex.
Gets how much the viewer!Camera dollys each second with touch input.
Default is 0.2
.
The current touch dolly rate.
Sets how much the viewer!Camera dollys with touch input.
Default is 0.2
The new touch dolly rate.
Gets how fast the viewer!Camera pans on touch panning
Default is 1.0
.
The current touch pan rate.
Sets how fast the camera pans on touch panning
The new touch pan rate.
Protected
cleanProtected
cleanProtected
errorProtected
logProtected
setProtected
warnEmits an event when the Component has been destroyed.
Readonly
onEvent fired when a ViewObject is double-picked.
Readonly
onEvent fired when empty space is double-picked.
Readonly
onEvent fired when a surface is double-picked.
Readonly
onEvent fired when the pointer moves while over a viewer!ViewObject.
Readonly
onEvent fired when the pointer moves onto a viewer!ViewObject.
Readonly
onEvent fired when the pointer moves while over empty space.
Readonly
onEvent fired when the pointer moves off a viewer!ViewObject.
Readonly
onEvent fired when snapping onto a surface, vertex, or edge.
Readonly
onEvent fired when snapping off a surface, vertex, or edge.
Readonly
onEvent fired when the pointer moves while over a viewer!ViewObject.
Readonly
onEvent fired when a viewer!ViewObject is picked.
Readonly
onEvent fired when empty space is picked.
Readonly
onEvent fired when empty space is picked.
Readonly
onEvent fired when ray moves.
Readonly
onEvent fired when we right-click.
Mouse and touch controller for a Viewer's Camera.
See @xeokit/sdk/cameracontrol for usage.