Class FreeCameraMouseInput
Implements
Constructors
constructor
-
Manage the mouse inputs to control the movement of a free camera.
Parameters
- touchEnabled: boolean = true
Defines if touch is enabled or not
Returns FreeCameraMouseInput
- touchEnabled: boolean = true
Properties
angular Sensibility
Defines the pointer angular sensibility along the X and 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.
on Pointer Moved Observable
Observable for when a pointer move event occurs containing the move offset
touch Enabled
[true] Define if touch is enabled in the mouse input
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 Context Menu
-
Called on JS contextmenu event. Override this method to provide functionality.
Parameters
- evt: PointerEvent
the context menu event
Returns void
- evt: PointerEvent
Manage the mouse inputs to control the movement of a free camera.
See
https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs