Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FreeCameraDeviceOrientationInput

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/how_to/customizing_camera_inputs

Hierarchy

  • FreeCameraDeviceOrientationInput

Implements

Index

Constructors

constructor

Accessors

camera

  • Define the camera controlled by the input.

    Returns FreeCamera

  • Define the camera controlled by the input.

    Parameters

    Returns any

Methods

attachControlSearch playground for attachControl

  • attachControl(): void
  • Attach the input controls to a specific dom element to get the input from.

    Returns void

checkInputsSearch playground for checkInputs

  • checkInputs(): void
  • 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

detachControlSearch playground for detachControl

  • detachControl(): void
  • Detach the current controls from the specified dom element.

    Returns void

getClassNameSearch playground for getClassName

  • getClassName(): string
  • Gets the class name of the current input.

    Returns string

    the class name

getSimpleNameSearch playground for getSimpleName

  • getSimpleName(): string
  • Get the friendly name associated with the input class.

    Returns string

    the input friendly name

Static WaitForOrientationChangeAsyncSearch playground for WaitForOrientationChangeAsync

  • WaitForOrientationChangeAsync(timeout?: number): Promise<void>
  • 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

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method