CameraOrbitOperator
-
class
wv.Operators.Camera.CameraOrbitOperator() Index
Methods
addMappingcheckMappingclearMappinggetBimOrbitEnabledgetCameraRotationMomentumEnabledgetMomentumgetMomentumLossPerSecondgetOrbitFallbackModegetOrbitTargetgetPrimaryButtonisActiveisAnimatingisCurrentlyAnimatingisDraggingonDoubleClickonTouchEndonTouchMoveonTouchStartsetBimOrbitEnabledsetCameraRotationMomentumEnabledsetHandledsetMappingsetMomentumLossPerSecondsetOrbitFallbackModesetOrbitTargetsetPrimaryButtonstopAnimationstopInteractionsupportsAnimation
Methods
-
wv.Operators.Camera.CameraOrbitOperator.addMapping() inherited
addMapping(button:Button, modifier:KeyModifiers?): voidAdds 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:
Buttonmodifier:
KeyModifiers= KeyModifiers.NoneReturns: void
-
wv.Operators.Camera.CameraOrbitOperator.checkMapping() inherited
checkMapping(event:MouseInputEvent): booleanChecks 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:
MouseInputEventThe 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.CameraOrbitOperator.clearMapping() inherited
clearMapping(): voidClears any button and key modifier mappings for the operator.
Returns: void
-
wv.Operators.Camera.CameraOrbitOperator.getBimOrbitEnabled() - getBimOrbitEnabled(): boolean
Returns true if BIM orbit is enabled.
Returns: boolean
-
wv.Operators.Camera.CameraOrbitOperator.getCameraRotationMomentumEnabled() inherited
getCameraRotationMomentumEnabled(): booleanReturns: boolean
-
wv.Operators.Camera.CameraOrbitOperator.getMomentum() inherited
getMomentum(): numberReturns: number
-
wv.Operators.Camera.CameraOrbitOperator.getMomentumLossPerSecond() inherited
getMomentumLossPerSecond(): numberReturns: number
-
wv.Operators.Camera.CameraOrbitOperator.getOrbitFallbackMode() - getOrbitFallbackMode():
OrbitFallbackModeGets the orbit fallback mode.
Returns:
OrbitFallbackModeorbit fallback mode
-
wv.Operators.Camera.CameraOrbitOperator.getOrbitTarget() - getOrbitTarget():
Point3Gets the orbit target point.
Returns:
Point3orbit target
-
wv.Operators.Camera.CameraOrbitOperator.getPrimaryButton() - getPrimaryButton():
ButtonReturns:
Buttonthe primary orbit button
-
wv.Operators.Camera.CameraOrbitOperator.isActive() inherited
isActive(): booleanChecks 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.CameraOrbitOperator.isAnimating() inherited
isAnimating(): booleanReturns: boolean
-
wv.Operators.Camera.CameraOrbitOperator.isCurrentlyAnimating() inherited
isCurrentlyAnimating(): booleanReturns: boolean
-
wv.Operators.Camera.CameraOrbitOperator.isDragging() inherited
isDragging(): booleanChecks if the operator is currently dragging.
Returns: boolean
True if the operator is dragging, false otherwise.
-
wv.Operators.Camera.CameraOrbitOperator.onDoubleClick() inherited
onDoubleClick(_event:MouseInputEvent): voidNO-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:
MouseInputEventThe double click event to handle.Returns: void
-
wv.Operators.Camera.CameraOrbitOperator.onTouchEnd() inherited
onTouchEnd(event:TouchInputEvent): voidBase 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:
TouchInputEventThe touch end event to handle.Returns: void
-
wv.Operators.Camera.CameraOrbitOperator.onTouchMove() inherited
onTouchMove(event:TouchInputEvent): PromiseBase 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:
TouchInputEventThe touch move event to handle.Returns: Promise
-
wv.Operators.Camera.CameraOrbitOperator.onTouchStart() inherited
onTouchStart(event:TouchInputEvent): voidBase 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:
TouchInputEventThe touch start event to handle.Returns: void
-
wv.Operators.Camera.CameraOrbitOperator.setBimOrbitEnabled() - setBimOrbitEnabled(bimOrbitEnabled: boolean): void
BIM orbit is intended to make orbiting building models easier. It slows the rotation speed, clamps vertical rotation to 180 degrees, and restricts horizontal rotation to rotate around the vertical axis.
Parameters
bimOrbitEnabled: booleanReturns: void
-
wv.Operators.Camera.CameraOrbitOperator.setCameraRotationMomentumEnabled() inherited
setCameraRotationMomentumEnabled(val: boolean): voidParameters
val: booleanReturns: void
-
wv.Operators.Camera.CameraOrbitOperator.setHandled() inherited
setHandled(): booleanBase 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.CameraOrbitOperator.setMapping() inherited
setMapping(button:Button, modifier:KeyModifiers?): voidSets the button and key modifier mapping for the operator.
Parameters
button:
Buttonmodifier:
KeyModifiers= KeyModifiers.NoneReturns: void
-
wv.Operators.Camera.CameraOrbitOperator.setMomentumLossPerSecond() inherited
setMomentumLossPerSecond(amountLost: number): voidSets 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 secondReturns: void
-
wv.Operators.Camera.CameraOrbitOperator.setOrbitFallbackMode() - setOrbitFallbackMode(fallbackMode:
OrbitFallbackMode): voidSets the fallback mode. This is used to specify whether to orbit around a set target, the model center, or camera target.
Parameters
fallbackMode:OrbitFallbackModeReturns: void
-
wv.Operators.Camera.CameraOrbitOperator.setOrbitTarget() - setOrbitTarget(orbitTarget:
Point3): voidSets the orbit target for the orbit fallback mode OrbitTarget.
Parameters
orbitTarget:Point3Returns: void
-
wv.Operators.Camera.CameraOrbitOperator.setPrimaryButton() - setPrimaryButton(button:
Button): voidSets the primary mouse button. When this button is pressed, we will orbit around the selected point on the model. If there is no selected point, the orbit fallback mode will be used for orbit.
Parameters
button:ButtonReturns: void
-
wv.Operators.Camera.CameraOrbitOperator.stopAnimation() inherited
stopAnimation(): voidReturns: void
-
wv.Operators.Camera.CameraOrbitOperator.stopInteraction() inherited
stopInteraction(): voidStops 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.CameraOrbitOperator.supportsAnimation() inherited
supportsAnimation(): booleanReturns: boolean