Class FreeCameraDeviceOrientationInput
Implements
Constructors
constructor
-
Instantiates a new input
Returns FreeCameraDeviceOrientationInput
Properties
smooth Factor
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
Methods
attach Control
-
Attach the input controls to a specific dom element to get the input from.
Returns void
check Inputs
-
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 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
StaticWait For Orientation Change Async
-
Can be used to detect if a device orientation sensor is available on a device
Parameters
Optionaltimeout: numberamount 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.
See
https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs