NavigationOperator
- class cee.NavigationOperator()
The
Operator
class is the base class for all operators. A name is required for all operators, and the name is used to identify the operator in thecee.OperatorStack
.Operators contain optional methods that correspond to the different events that may occur in the view. When an operator is set on a
View
, the operator can interact with its ownerView, but only that view. Thecee.Viewer
sets the events listeners internally, and then fires the corresponding Operator event handler method when the event is recieved.
Constructors
Accessors
config
invertWalkZoom
minWalkTargetDistance
mouseWheelZoomAndWalkBehavior
name
ownerView
rotationAxis
rotationPoint
rotationSensitivity
Methods
Constructors
- NavigationOperator.constructor(name)
- Arguments:
name (
string
) – None
- Return type:
NavigationOperator
Accessors
- cee.config()
The navigation configuration. Specify what should happen on mouse and touch input
- Return type:
OperatorConfig <NavigationType>
- cee.config(config)
- Arguments:
config (
OperatorConfig
) – None
- Return type:
void
- cee.invertWalkZoom()
Invert the zoom direction of the mouse wheel
- Return type:
boolean
- cee.invertWalkZoom(invert)
- Arguments:
invert (
boolean
) – None
- Return type:
void
- cee.minWalkTargetDistance()
The minimum walk target minTargetDistance
For walk navigation, this is used to control how much the navigation should slow down when getting close to the rotation point. The walk speed is dynamic so you can interact with large models. Depending on your model size, you might want to adjust this parameter.
The default is undefined (automatic), which will be interpreted as 1/10 of the current view bounding box.
- Return type:
number
- cee.minWalkTargetDistance(minTargetDistance)
- Arguments:
minTargetDistance (
number
) – None
- Return type:
void
- cee.mouseWheelZoomAndWalkBehavior()
Determine mouse wheel zoom and walk behavior
This setting will only have effect if mouse wheel is configured to perform zoom or walk navigation.
- Return type:
MouseWheelZoomAndWalkBehavior
- cee.mouseWheelZoomAndWalkBehavior(behavior)
- Arguments:
behavior (
MouseWheelZoomAndWalkBehavior
) – None
- Return type:
void
- cee.name()
The name of the operator. Built-in operator names can be referenced by the
StandardOperator
enum.- Return type:
string
- cee.ownerView()
Returns the
View
that this operator is set on. If the operator is not on a view’scee.OperatorStack
, null is returned.- Return type:
View
- cee.rotationAxis()
The axis around which the model should be rotated. Set undefined/null to not constrain to an axis.
- Return type:
Vec3Like
- cee.rotationAxis(axis)
- Arguments:
axis (
Vec3Like
) – None
- Return type:
void
- cee.rotationPoint()
The current rotation point
- Return type:
Vec3Like
- cee.rotationPoint(rotationPoint)
- Arguments:
rotationPoint (
Vec3Like
) – None
- Return type:
void
- cee.rotationSensitivity()
Rotation sensitivity
Sensitivity factor controlling how sensitive the mouse is when doing rotations.
Default 1.0
- Return type:
number
- cee.rotationSensitivity(sensitivity)
- Arguments:
sensitivity (
number
) – None
- Return type:
void
Methods
onAddedToView
- NavigationOperator.onAddedToView()
- Return type:
void | Promise <void>
onClick
- NavigationOperator.onClick(event)
- Arguments:
event (
MouseEvent
) – None
- Return type:
OperatorEventStatus
onKeyDown
- NavigationOperator.onKeyDown(event)
- Arguments:
event (
KeyboardEvent
) – None
- Return type:
OperatorEventStatus
onKeyUp
- NavigationOperator.onKeyUp(event)
- Arguments:
event (
KeyboardEvent
) – None
- Return type:
OperatorEventStatus
onMouseDown
- NavigationOperator.onMouseDown(event)
- Arguments:
event (
MouseEvent
) – None
- Return type:
OperatorEventStatus
onMouseMove
- NavigationOperator.onMouseMove(event)
- Arguments:
event (
MouseEvent
) – None
- Return type:
OperatorEventStatus
onMouseUp
- NavigationOperator.onMouseUp(event)
- Arguments:
event (
MouseEvent
) – None
- Return type:
OperatorEventStatus
onPointerDown
- NavigationOperator.onPointerDown(event)
- Arguments:
event (
PointerEvent
) – None
- Return type:
OperatorEventStatus
onPointerMove
- NavigationOperator.onPointerMove(event)
- Arguments:
event (
PointerEvent
) – None
- Return type:
OperatorEventStatus
onPointerUp
- NavigationOperator.onPointerUp(event)
- Arguments:
event (
PointerEvent
) – None
- Return type:
OperatorEventStatus
onRemovedFromView
- NavigationOperator.onRemovedFromView()
- Return type:
void
onTouchEnd
- NavigationOperator.onTouchEnd(event)
- Arguments:
event (
TouchEvent
) – None
- Return type:
OperatorEventStatus
onTouchMove
- NavigationOperator.onTouchMove(event)
- Arguments:
event (
TouchEvent
) – None
- Return type:
OperatorEventStatus
onTouchStart
- NavigationOperator.onTouchStart(event)
- Arguments:
event (
TouchEvent
) – None
- Return type:
OperatorEventStatus
onWheel
- NavigationOperator.onWheel(event)
- Arguments:
event (
WheelEvent
) – None
- Return type:
OperatorEventStatus