locar
    Preparing search index...

    Class DeviceOrientationControls

    Hierarchy

    • EventDispatcher
      • DeviceOrientationControls
    Index

    Constructors

    Properties

    alphaOffset: number
    connect: () => void
    createObtainPermissionGestureDialog: () => void
    deviceOrientation:
        | {
            absolute?: boolean;
            alpha?: number;
            beta?: number;
            gamma?: number;
            webkitCompassHeading?: number;
        }
        | null
    disconnect: () => void
    dispose: () => void
    enabled: boolean
    enableInlineStyling: boolean
    enablePermissionDialog: boolean
    eventEmitter: EventEmitter
    getAlpha: () => number
    getBeta: () => number
    getCorrectedHeading: () => number
    getGamma: () => number
    initialOffset: boolean | null
    lastQuaternion: Quaternion | null
    object: Object3D
    obtainPermissionGesture: () => void
    orientationChangeEventName: "deviceorientation" | "deviceorientationabsolute"
    orientationChangeThreshold: number
    orientationOffset: number
    preferConfirmDialog: boolean
    requestOrientationPermissions: () => void
    screenOrientation: number
    smoothingFactor: number
    update: () => void
    updateAlphaOffset: () => void

    Methods

    • Adds a listener to an event type.

      Type Parameters

      • T extends never

      Parameters

      • type: T

        The type of event to listen to.

      • listener: EventListener<{}[T], T, DeviceOrientationControls>

        The function that gets called when the event is fired.

      Returns void

    • Fire an event type.

      Type Parameters

      • T extends never

      Parameters

      • event: BaseEvent<T> & {}[T]

        The event that gets fired.

      Returns void

    • Checks if listener is added to an event type.

      Type Parameters

      • T extends never

      Parameters

      • type: T

        The type of event to listen to.

      • listener: EventListener<{}[T], T, DeviceOrientationControls>

        The function that gets called when the event is fired.

      Returns boolean

    • Initialise device orientation controls. Should be called after you have created the DeviceOrientationControls object and set up the deviceorientationgranted and deviceorientationerror event handlers.

      Returns void

    • Removes a listener from an event type.

      Type Parameters

      • T extends never

      Parameters

      • type: T

        The type of the listener that gets removed.

      • listener: EventListener<{}[T], T, DeviceOrientationControls>

        The listener function that gets removed.

      Returns void