Class FreeCameraMouseWheelInput
Hierarchy (View Summary)
- BaseCameraMouseWheelInput
- FreeCameraMouseWheelInput
Constructors
constructor
-
Returns FreeCameraMouseWheelInput
Properties
camera
Defines the camera the input is attached to.
on Changed Observable
{ wheelDeltaX: number; wheelDeltaY: number; wheelDeltaZ: number },
> = ...
Observable for when a mouse wheel move event occurs.
wheel Precision X
How fast is the camera moves in relation to X axis mouseWheel events. Use negative value to reverse direction.
wheel Precision Y
How fast is the camera moves in relation to Y axis mouseWheel events. Use negative value to reverse direction.
wheel Precision Z
How fast is the camera moves in relation to Z axis mouseWheel events. Use negative value to reverse direction.
Accessors
wheel X Move Relative
-
Get the configured movement axis (relative to camera's orientation) the mouse wheel's X axis controls.
Returns Nullable<Coordinate>
The configured axis or null if none.
-
Set which movement axis (relative to camera's orientation) the mouse wheel's X axis controls.
Parameters
- axis: Nullable<Coordinate>
The axis to be moved. Set null to clear.
Returns void
- axis: Nullable<Coordinate>
wheel X Move Scene
-
Get the configured movement axis (relative to the scene) the mouse wheel's X axis controls.
Returns Nullable<Coordinate>
The configured axis or null if none.
-
Set which movement axis (relative to the scene) the mouse wheel's X axis controls.
Parameters
- axis: Nullable<Coordinate>
The axis to be moved. Set null to clear.
Returns void
- axis: Nullable<Coordinate>
wheel X Rotate Relative
-
Get the configured rotation axis (relative to camera's orientation) the mouse wheel's X axis controls.
Returns Nullable<Coordinate>
The configured axis or null if none.
-
Set which rotation axis (relative to camera's orientation) the mouse wheel's X axis controls.
Parameters
- axis: Nullable<Coordinate>
The axis to be moved. Set null to clear.
Returns void
- axis: Nullable<Coordinate>
wheel Y Move Relative
-
Get the configured movement axis (relative to camera's orientation) the mouse wheel's Y axis controls.
Returns Nullable<Coordinate>
The configured axis or null if none.
-
Set which movement axis (relative to camera's orientation) the mouse wheel's Y axis controls.
Parameters
- axis: Nullable<Coordinate>
The axis to be moved. Set null to clear.
Returns void
- axis: Nullable<Coordinate>
wheel Y Move Scene
-
Get the configured movement axis (relative to the scene) the mouse wheel's Y axis controls.
Returns Nullable<Coordinate>
The configured axis or null if none.
-
Set which movement axis (relative to the scene) the mouse wheel's Y axis controls.
Parameters
- axis: Nullable<Coordinate>
The axis to be moved. Set null to clear.
Returns void
- axis: Nullable<Coordinate>
wheel Y Rotate Relative
-
Get the configured rotation axis (relative to camera's orientation) the mouse wheel's Y axis controls.
Returns Nullable<Coordinate>
The configured axis or null if none.
-
Set which rotation axis (relative to camera's orientation) the mouse wheel's Y axis controls.
Parameters
- axis: Nullable<Coordinate>
The axis to be moved. Set null to clear.
Returns void
- axis: Nullable<Coordinate>
wheel Z Move Relative
-
Get the configured movement axis (relative to camera's orientation) the mouse wheel's Z axis controls.
Returns Nullable<Coordinate>
The configured axis or null if none.
-
Set which movement axis (relative to camera's orientation) the mouse wheel's Z axis controls.
Parameters
- axis: Nullable<Coordinate>
The axis to be moved. Set null to clear.
Returns void
- axis: Nullable<Coordinate>
wheel Z Move Scene
-
Get the configured movement axis (relative to the scene) the mouse wheel's Z axis controls.
Returns Nullable<Coordinate>
The configured axis or null if none.
-
Set which movement axis (relative to the scene) the mouse wheel's Z axis controls.
Parameters
- axis: Nullable<Coordinate>
The axis to be moved. Set null to clear.
Returns void
- axis: Nullable<Coordinate>
wheel Z Rotate Relative
-
Get the configured rotation axis (relative to camera's orientation) the mouse wheel's Z axis controls.
Returns Nullable<Coordinate>
The configured axis or null if none.
-
Set which rotation axis (relative to camera's orientation) the mouse wheel's Z axis controls.
Parameters
- axis: Nullable<Coordinate>
The axis to be moved. Set null to clear.
Returns void
- axis: Nullable<Coordinate>
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
-
Called for each rendered frame.
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 mouse wheel inputs to control a free camera.
See
https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs