Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Properties

smoothFactor: number

alpha+beta+gamma smoothing. 0: no smoothing, 1: new data ignored, 0.9 recommended for smoothing

Accessors

  • Define the camera controlled by the input.

    Returns FreeCamera

  • Defines the camera the input is attached to.

    Parameters

    Returns void

Methods

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

    Returns void

  • 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

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

    Returns void

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

    Returns string

    the class name

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

    Returns string

    the input friendly name

  • 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 constructor
  • Static method

Settings

Theme