CameraKeyboardWalkOperator
-
class
wv.Operators.Camera.CameraKeyboardWalkOperator() Index
Methods
addKeyMappingaddMappingcheckMappingclearKeyMappingsclearMappingdisableBimModeenableBimModegetBimDoorConfiggetBimFloorConfiggetBimModeEnabledgetBimWallConfiggetElevationSpeedgetKeyMappinggetMajorAxisgetMouseLookEnabledgetMouseLookSpeedgetRotationSpeedgetTiltgetViewAnglegetWalkActivegetWalkSpeedgetZoomSpeedisActiveisBimModeEnabledisDraggingonDoubleClickonTouchEndonTouchMoveonTouchStartresetDefaultWalkSpeedsrotateLeftrotateRightsetBimDoorConfigsetBimFloorConfigsetBimWallConfigsetElevationSpeedsetHandledsetMappingsetMouseLookEnabledsetMouseLookSpeedsetRotationSpeedsetTiltsetViewAnglesetWalkSpeedsetZoomSpeedstopInteractiontiltDowntiltUptoggleBimModewalkBackwardwalkBackwardWithCollisionwalkDownwalkForwardwalkForwardWithCollisionwalkLeftwalkLeftWithCollisionwalkRightwalkRightWithCollisionwalkUp
Methods
-
wv.Operators.Camera.CameraKeyboardWalkOperator.addKeyMapping() - addKeyMapping(key:
KeyCode, walkDirection:WalkDirection): voidAdds a key mapping for a walk direction.
Parameters
key:
KeyCodewalkDirection:
WalkDirectionReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.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.CameraKeyboardWalkOperator.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.CameraKeyboardWalkOperator.clearKeyMappings() - clearKeyMappings(): void
Clears all key mappings.
Returns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.clearMapping() inherited
clearMapping(): voidClears any button and key modifier mappings for the operator.
Returns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.disableBimMode() inherited
disableBimMode(): PromiseDisables BIM mode, which includes collision detection
Returns: Promise
-
wv.Operators.Camera.CameraKeyboardWalkOperator.enableBimMode() inherited
enableBimMode(): PromiseEnables BIM mode, which includes collision detection
Returns: Promise
-
wv.Operators.Camera.CameraKeyboardWalkOperator.getBimDoorConfig() inherited
getBimDoorConfig():DoorConfigGets the door distance config used by BIM mode. See also: [[enableBimMode]].
Returns:
DoorConfig
-
wv.Operators.Camera.CameraKeyboardWalkOperator.getBimFloorConfig() inherited
getBimFloorConfig():FloorConfigGets the floor distance config used by BIM mode. See also: [[enableBimMode]].
Returns:
FloorConfig
-
wv.Operators.Camera.CameraKeyboardWalkOperator.getBimModeEnabled() inherited
getBimModeEnabled(): booleanReturns true if BIM mode is currently active
Returns: boolean
-
wv.Operators.Camera.CameraKeyboardWalkOperator.getBimWallConfig() inherited
getBimWallConfig():WallConfigGets the wall distance config used by BIM mode. See also: [[enableBimMode]].
Returns:
WallConfig
-
wv.Operators.Camera.CameraKeyboardWalkOperator.getElevationSpeed() inherited
getElevationSpeed(): numberGets the elevation speed for moving the camera up and down.
Returns: number
-
wv.Operators.Camera.CameraKeyboardWalkOperator.getKeyMapping() - getKeyMapping(): Map
Gets the walk direction key mapping.
Returns: Map
-
wv.Operators.Camera.CameraKeyboardWalkOperator.getMajorAxis() inherited
getMajorAxis():AxisGet major axis
Returns:
Axis
-
wv.Operators.Camera.CameraKeyboardWalkOperator.getMouseLookEnabled() - getMouseLookEnabled(): boolean
Gets whether the mouse look is enabled. If enabled, mouse move events will not continue down the operator stack.
Returns: boolean
-
wv.Operators.Camera.CameraKeyboardWalkOperator.getMouseLookSpeed() - getMouseLookSpeed(): number
Gets the mouse look speed.
Returns: number
-
wv.Operators.Camera.CameraKeyboardWalkOperator.getRotationSpeed() inherited
getRotationSpeed(): numberGets the rotation speed for tilt and rotate.
Returns: number
-
wv.Operators.Camera.CameraKeyboardWalkOperator.getTilt() inherited
getTilt(): numberGets the tilt value.
Returns: number
-
wv.Operators.Camera.CameraKeyboardWalkOperator.getViewAngle() inherited
getViewAngle(): numberGets the view angle.
Returns: number
-
wv.Operators.Camera.CameraKeyboardWalkOperator.getWalkActive() inherited
getWalkActive(): booleanReturns true if walking is currently active
Returns: boolean
-
wv.Operators.Camera.CameraKeyboardWalkOperator.getWalkSpeed() inherited
getWalkSpeed(): numberGets the walkSpeed for walking forward, backwards, left, and right.
Returns: number
-
wv.Operators.Camera.CameraKeyboardWalkOperator.getZoomSpeed() inherited
getZoomSpeed(): numberGets the speed used when walking with the mouse scroll wheel.
Returns: number
-
wv.Operators.Camera.CameraKeyboardWalkOperator.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.CameraKeyboardWalkOperator.isBimModeEnabled() inherited
isBimModeEnabled(): booleanReturns: boolean
-
wv.Operators.Camera.CameraKeyboardWalkOperator.isDragging() inherited
isDragging(): booleanChecks if the operator is currently dragging.
Returns: boolean
True if the operator is dragging, false otherwise.
-
wv.Operators.Camera.CameraKeyboardWalkOperator.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.CameraKeyboardWalkOperator.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.CameraKeyboardWalkOperator.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.CameraKeyboardWalkOperator.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.CameraKeyboardWalkOperator.resetDefaultWalkSpeeds() - resetDefaultWalkSpeeds(): Promise
Sets the walk, rotate, and mouse look speeds to the default values.
Returns: Promise
-
wv.Operators.Camera.CameraKeyboardWalkOperator.rotateLeft() inherited
rotateLeft(degrees: number): voidParameters
degrees: numberReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.rotateRight() inherited
rotateRight(degrees: number): voidParameters
degrees: numberReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.setBimDoorConfig() inherited
setBimDoorConfig(doorConfig:DoorConfig): voidSets the door distance config used by BIM mode.
Parameters
doorConfig:DoorConfigReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.setBimFloorConfig() inherited
setBimFloorConfig(floorConfig:FloorConfig): voidSets the floor distance config used by BIM mode. See also: [[enableBimMode]].
Parameters
floorConfig:FloorConfigReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.setBimWallConfig() inherited
setBimWallConfig(wallConfig:WallConfig): voidSets the wall distance config used by BIM mode. See also: [[enableBimMode]].
Parameters
wallConfig:WallConfigReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.setElevationSpeed() inherited
setElevationSpeed(elevationSpeed: number): voidSets the elevation speed for moving the camera up and down.
Parameters
elevationSpeed: number
The camera will move by elevationSpeed per second.Returns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.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.CameraKeyboardWalkOperator.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.CameraKeyboardWalkOperator.setMouseLookEnabled() - setMouseLookEnabled(mouseLookEnabled: boolean): void
Sets whether the mouse look is enabled. If enabled, mouse move events will not continue down the operator stack.
Parameters
mouseLookEnabled: booleanReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.setMouseLookSpeed() - setMouseLookSpeed(mouseLookSpeed: number): void
Sets the speed for mouse look.
Parameters
mouseLookSpeed: numberReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.setRotationSpeed() inherited
setRotationSpeed(rotationSpeed: number): voidSets the rotation speed for tilt and rotate.
Parameters
rotationSpeed: number
The camera will rotate by rotationSpeed degrees per second.Returns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.setTilt() inherited
setTilt(tilt: number): voidSets the tilt value. Values must be between -45 and 45 degrees.
Parameters
tilt: numberReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.setViewAngle() inherited
setViewAngle(degrees: number): voidSets the view angle. Values must be between 30 and 150 degrees.
Parameters
degrees: numberReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.setWalkSpeed() inherited
setWalkSpeed(walkSpeed: number): voidSets the walkSpeed for walking forward, backwards, left, and right.
Parameters
walkSpeed: number
The camera will move by walkSpeed per second.Returns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.setZoomSpeed() inherited
setZoomSpeed(zoomSpeed: number): voidSets the speed to walk when using the mouse scroll wheel.
Parameters
zoomSpeed: number
distance for walking with the mouse scroll wheel.Returns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.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.CameraKeyboardWalkOperator.tiltDown() inherited
tiltDown(degrees: number): voidParameters
degrees: numberReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.tiltUp() inherited
tiltUp(degrees: number): voidParameters
degrees: numberReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.toggleBimMode() inherited
toggleBimMode(): PromiseToggles BIM mode, deactivating it if it’s activated and activating it if it’s deactivated
Returns: Promise
-
wv.Operators.Camera.CameraKeyboardWalkOperator.walkBackward() inherited
walkBackward(walkDistance: number): voidParameters
walkDistance: numberReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.walkBackwardWithCollision() inherited
walkBackwardWithCollision(walkDistance: number): PromiseParameters
walkDistance: numberReturns: Promise
-
wv.Operators.Camera.CameraKeyboardWalkOperator.walkDown() inherited
walkDown(walkDistance: number): voidParameters
walkDistance: numberReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.walkForward() inherited
walkForward(walkDistance: number): voidParameters
walkDistance: numberReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.walkForwardWithCollision() inherited
walkForwardWithCollision(walkDistance: number): PromiseParameters
walkDistance: numberReturns: Promise
-
wv.Operators.Camera.CameraKeyboardWalkOperator.walkLeft() inherited
walkLeft(walkDistance: number): voidParameters
walkDistance: numberReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.walkLeftWithCollision() inherited
walkLeftWithCollision(walkDistance: number): PromiseParameters
walkDistance: numberReturns: Promise
-
wv.Operators.Camera.CameraKeyboardWalkOperator.walkRight() inherited
walkRight(walkDistance: number): voidParameters
walkDistance: numberReturns: void
-
wv.Operators.Camera.CameraKeyboardWalkOperator.walkRightWithCollision() inherited
walkRightWithCollision(walkDistance: number): PromiseParameters
walkDistance: numberReturns: Promise
-
wv.Operators.Camera.CameraKeyboardWalkOperator.walkUp() inherited
walkUp(walkDistance: number): voidParameters
walkDistance: numberReturns: void