Class GeospatialCameraKeyboardInput
Implements
Constructors
constructor
-
Returns GeospatialCameraKeyboardInput
Properties
camera
Defines the camera the input is attached to.
keys Down
Defines the list of key codes associated with the down action (pan down)
keys Left
Defines the list of key codes associated with the left action (pan left)
keys Right
Defines the list of key codes associated with the right action (pan right)
keys Up
Defines the list of key codes associated with the up action (pan up)
keys Zoom In
Defines the list of key codes associated with zoom in (+ or =)
keys Zoom Out
Defines the list of key codes associated with zoom out (-)
Accessors
pan Sensitivity
-
get panSensitivity(): number
-
set panSensitivity(value: number): void
Parameters
- value: number
Returns void
rotation Sensitivity
-
get rotationSensitivity(): number
-
set rotationSensitivity(value: number): void
Parameters
- value: number
Returns void
zoom Sensitivity
-
get zoomSensitivity(): number
-
set zoomSensitivity(value: number): void
Parameters
- value: number
Returns void
Methods
attach Control
-
Attach the input controls to a specific dom element to get the input from.
Parameters
OptionalnoPreventDefault: booleanDefines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
Returns void
check Inputs
-
Update the current camera state depending on the inputs that have been used this frame. This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.
Returns void
detach Control
-
Detach the current controls from the specified dom element.
Returns void
get Class Name
-
Gets the class name of the current input.
Returns string
the class name
get Simple Name
-
Get the friendly name associated with the input class.
Returns string
the input friendly name
Manage the keyboard inputs to control the movement of a geospatial camera. Arrow keys + Modifier key (ctrl/alt/option on mac): rotate Arrow keys alone: pan
See
https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs