CameraTurntableOperator

class wv.Operators.Camera.CameraTurntableOperator()

Methods

wv.Operators.Camera.CameraTurntableOperator.addMapping()

inherited

addMapping(button: Button, modifier: KeyModifiers?): void

Adds a button and key modifier mapping for the operator. If no mapping is provided, all combinations are considered valid. All mappings require a mouse button, but a key modifier is optional.

Parameters

button: Button

modifier: KeyModifiers = KeyModifiers.None

Returns: void

wv.Operators.Camera.CameraTurntableOperator.checkMapping()

inherited

checkMapping(event: MouseInputEvent): boolean

Checks if the given mouse event matches any of the button and key modifier mappings for the operator. If no mappings are defined, it returns true.

Parameters

event: MouseInputEvent

The mouse event to check against the operator’s mappings.

Returns: boolean

True if the event matches any mapping or if no mappings are defined, false otherwise.
wv.Operators.Camera.CameraTurntableOperator.clearMapping()

inherited

clearMapping(): void

Clears any button and key modifier mappings for the operator.

Returns: void

wv.Operators.Camera.CameraTurntableOperator.getCameraRotationMomentumEnabled()

inherited

getCameraRotationMomentumEnabled(): boolean

Returns: boolean

wv.Operators.Camera.CameraTurntableOperator.getMomentum()

inherited

getMomentum(): number

Returns: number

wv.Operators.Camera.CameraTurntableOperator.getMomentumLossPerSecond()

inherited

getMomentumLossPerSecond(): number

Returns: number

wv.Operators.Camera.CameraTurntableOperator.isActive()

inherited

isActive(): boolean

Checks if the operator is currently active, which is determined by whether the button and key modifier mapping is active or a touch event is active, and that a double click has not occurred and the context menu is not open.

Returns: boolean

True if the operator is active, false otherwise.
wv.Operators.Camera.CameraTurntableOperator.isAnimating()

inherited

isAnimating(): boolean

Returns: boolean

wv.Operators.Camera.CameraTurntableOperator.isCurrentlyAnimating()

inherited

isCurrentlyAnimating(): boolean

Returns: boolean

wv.Operators.Camera.CameraTurntableOperator.isDragging()

inherited

isDragging(): boolean

Checks if the operator is currently dragging.

Returns: boolean

True if the operator is dragging, false otherwise.
wv.Operators.Camera.CameraTurntableOperator.onDoubleClick()

inherited

onDoubleClick(_event: MouseInputEvent): void

NO-OP method for handling double click events. By default, it does nothing, but child classes can override this method to provide specific behavior for double click events.

Parameters

_event: MouseInputEvent

The double click event to handle.

Returns: void

wv.Operators.Camera.CameraTurntableOperator.onTouchEnd()

inherited

onTouchEnd(event: TouchInputEvent): void

Base method for handling touch end events. If the touch event corresponds to the primary touch point, it emulates a mouse up event using the touch position and resets the primary touch ID. It also sets the event as handled based on the operator’s setHandled method.

Parameters

event: TouchInputEvent

The touch end event to handle.

Returns: void

wv.Operators.Camera.CameraTurntableOperator.onTouchMove()

inherited

onTouchMove(event: TouchInputEvent): Promise

Base method for handling touch move events. If the touch event corresponds to the primary touch point, it emulates a mouse move event using the touch position. It awaits the onMouseMove method to allow for asynchronous behavior in child classes.

Parameters

event: TouchInputEvent

The touch move event to handle.

Returns: Promise

wv.Operators.Camera.CameraTurntableOperator.onTouchStart()

inherited

onTouchStart(event: TouchInputEvent): void

Base method for handling touch start events. It tracks the primary touch point and emulates a mouse down event using the touch position. If there is already an active touch, it ignores additional touch start events.

Parameters

event: TouchInputEvent

The touch start event to handle.

Returns: void

wv.Operators.Camera.CameraTurntableOperator.setCameraRotationMomentumEnabled()

inherited

setCameraRotationMomentumEnabled(val: boolean): void

Parameters

val: boolean

Returns: void

wv.Operators.Camera.CameraTurntableOperator.setHandled()

inherited

setHandled(): boolean

Base method for setting the handled state of events. By default, it returns false, but child classes can override this method to provide specific behavior for determining whether events should be marked as handled.

Returns: boolean

True if the event should be marked as handled, false otherwise.
wv.Operators.Camera.CameraTurntableOperator.setMapping()

inherited

setMapping(button: Button, modifier: KeyModifiers?): void

Sets the button and key modifier mapping for the operator.

Parameters

button: Button

modifier: KeyModifiers = KeyModifiers.None

Returns: void

wv.Operators.Camera.CameraTurntableOperator.setMomentumLossPerSecond()

inherited

setMomentumLossPerSecond(amountLost: number): void

Sets proportion of momentum lost per second if camera rotation momentum is enabled. At 0 no momentum is lost and the camera will orbit indefinitely. Above 1 the camera will stop orbiting within a second of release. Only values greater than or equal to 0 are accepted.

Parameters

amountLost: number

Proportion of momentum lost per second

Returns: void

wv.Operators.Camera.CameraTurntableOperator.setRotationAxis()
setRotationAxis(axis: (Point3 | Axis)): boolean

Sets the rotation axis.

Parameters

axis: (Point3 | Axis)

[[Axis]] or [[Point3]] used to set the rotation axis.

Returns: boolean

wv.Operators.Camera.CameraTurntableOperator.stopAnimation()

inherited

stopAnimation(): void

Returns: void

wv.Operators.Camera.CameraTurntableOperator.stopInteraction()

inherited

stopInteraction(): void

Stops the current interaction by triggering the “endInteraction” event on the viewer, and resets the dragging state, drag count, and button modifier active state.

Returns: void

wv.Operators.Camera.CameraTurntableOperator.supportsAnimation()

inherited

supportsAnimation(): boolean

Returns: boolean