Class FreeCameraDeviceOrientationInput
Hierarchy
- FreeCameraDeviceOrientationInput
Implements
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Instantiates a new input
Returns FreeCameraDeviceOrientationInput
Properties
smooth FactorSearch playground for smoothFactor
alpha+beta+gamma smoothing. 0: no smoothing, 1: new data ignored, 0.9 recommended for smoothing
Accessors
camera
Define the camera controlled by the input.
Returns FreeCamera
Defines the camera the input is attached to.
Parameters
camera: FreeCamera
Returns void
Methods
attach ControlSearch playground for attachControl
Attach the input controls to a specific dom element to get the input from.
Returns void
check InputsSearch playground for checkInputs
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 ControlSearch playground for detachControl
Detach the current controls from the specified dom element.
Returns void
get Class NameSearch playground for getClassName
Gets the class name of the current input.
Returns string
the class name
get Simple NameSearch playground for getSimpleName
Get the friendly name associated with the input class.
Returns string
the input friendly name
Static Wait For Orientation Change AsyncSearch playground for WaitForOrientationChangeAsync
Can be used to detect if a device orientation sensor is available on a device
Parameters
Optional timeout: number
amount of time in milliseconds to wait for a response from the sensor (default: infinite)
Returns Promise<void>
a promise that will resolve on orientation change
Takes information about the orientation of the device as reported by the deviceorientation event to orient the camera. Screen rotation is taken into account.
https://doc.babylonjs.com/how_to/customizing_camera_inputs