Class ArcRotateCameraPointersInput
Hierarchy
- OrbitCameraPointersInput
- ArcRotateCameraPointersInput
Constructors
constructor
-
Returns ArcRotateCameraPointersInput
Properties
angular Sensibility X
Defines the pointer angular sensibility along the X axis or how fast is the camera rotating.
angular Sensibility Y
Defines the pointer angular sensibility along the Y axis or how fast is the camera rotating.
buttons
Defines the buttons associated with the input to handle camera move.
camera
Defines the camera the input is attached to.
multi Touch Pan And Zoom
Defines whether panning is enabled for both pan (2 fingers swipe) and zoom (pinch) through multitouch.
multi Touch Panning
Defines whether panning (2 fingers swipe) is enabled through multitouch.
panning Sensibility
Defines the pointer panning sensibility or how fast is the camera moving.
pinch Delta Percentage
pinchDeltaPercentage will be used instead of pinchPrecision if different from 0. It defines the percentage of current camera.radius to use as delta when pinch zoom is used.
pinch Inwards
Revers pinch action direction.
pinch Precision
Defines the pointer pinch precision or how fast is the camera zooming.
pinch Zoom
Defines whether zoom (2 fingers pinch) is enabled through multitouch
use Natural Pinch Zoom
When useNaturalPinchZoom is true, multi touch zoom will zoom in such that any object in the plane at the camera's target point will scale perfectly with finger motion. Overrides pinchDeltaPercentage and pinchPrecision.
StaticMinimum Radius For Pinch
The minimum radius used for pinch, to avoid radius lock at 0
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
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
on Button Down
-
Called each time a new POINTERDOWN event occurs. Ie, for each button press.
Parameters
- evt: IPointerEvent
Defines the event to track
Returns void
- evt: IPointerEvent
on Button Up
-
Called each time a new POINTERUP event occurs. Ie, for each button release.
Parameters
- _evt: IPointerEvent
Defines the event to track
Returns void
- _evt: IPointerEvent
on Context Menu
-
Called on JS contextmenu event. Override this method to provide functionality.
Parameters
- evt: PointerEvent
the event to be handled
Returns void
- evt: PointerEvent
on Double Tap
-
Called on pointer POINTERDOUBLETAP event.
Returns void
on Lost Focus
-
Called when window becomes inactive.
Returns void
on Multi Touch
-
onMultiTouch(
pointA: Nullable<PointerTouch>,
pointB: Nullable<PointerTouch>,
previousPinchSquaredDistance: number,
pinchSquaredDistance: number,
previousMultiTouchPanPosition: Nullable<PointerTouch>,
multiTouchPanPosition: Nullable<PointerTouch>,
): voidCalled on pointer POINTERMOVE event if multiple touches are active.
Parameters
- pointA: Nullable<PointerTouch>
point A
- pointB: Nullable<PointerTouch>
point B
- previousPinchSquaredDistance: number
distance between points in previous pinch
- pinchSquaredDistance: number
distance between points in current pinch
- previousMultiTouchPanPosition: Nullable<PointerTouch>
multi-touch position in previous step
- multiTouchPanPosition: Nullable<PointerTouch>
multi-touch position in current step
Returns void
- pointA: Nullable<PointerTouch>
on Touch
-
Called on pointer POINTERMOVE event if only a single touch is active.
Parameters
- point: Nullable<PointerTouch>
current touch point
- offsetX: number
offset on X
- offsetY: number
offset on Y
Returns void
- point: Nullable<PointerTouch>
Manage the pointers inputs to control an arc rotate camera. Uses the inputMap on the movement class to determine which button maps to which interaction.
See
https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs