Class BaseCameraPointersInputAbstract
Hierarchy (View Summary)
- BaseCameraPointersInput
Implements
Constructors
constructor
-
Returns BaseCameraPointersInput
Properties
buttons
Defines the buttons associated with the input to handle camera move.
Abstractcamera
Defines the camera the input is attached to.
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. Override this method to provide functionality.
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. Override this method to provide functionality.
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. Override this method to provide functionality on POINTERDOUBLETAP event.
Parameters
- type: string
type of event
Optionalevt: IPointerEventthe pointer event that triggered the double tap (carries button / buttons state)
Returns void
- type: string
on Lost Focus
-
Called when window becomes inactive. Override this method to provide functionality.
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. Override this method to provide functionality.
Parameters
- _pointA: Nullable<PointerTouch>
First point in the pair
- _pointB: Nullable<PointerTouch>
Second point in the pair
- previousPinchSquaredDistance: number
Sqr Distance between the points the last time this event was fired (by this input)
- pinchSquaredDistance: number
Sqr Distance between the points this time
- previousMultiTouchPanPosition: Nullable<PointerTouch>
Previous center point between the points
- multiTouchPanPosition: Nullable<PointerTouch>
Current center point between the points
Returns void
- _pointA: Nullable<PointerTouch>
on Touch
-
Called on pointer POINTERMOVE event if only a single touch is active. Override this method to provide functionality.
Parameters
- point: Nullable<PointerTouch>
The current position of the pointer
- offsetX: number
The offsetX of the pointer when the event occurred
- offsetY: number
The offsetY of the pointer when the event occurred
Returns void
- point: Nullable<PointerTouch>
Base class for Camera Pointer Inputs. See FollowCameraPointersInput in src/Cameras/Inputs/followCameraPointersInput.ts for example usage.