import * as THREE from 'three'; import { Behavior, ContextManager, Event, Observable } from '@zcomponent/core'; import { Camera } from '../components/cameras/Camera'; export interface DeviceOrientationConstructorProps { /** * Request permission for motion data on devices that require it (e.g. iOS). * The request will be made during the first user event after the behavior has been constructed, * typically when the user taps the splash page 'Launch' button. * * @zui * @zdefault true */ requestPermission: boolean; } /** * Rotate and move the camera to match the device's orientation with respect to gravity. * * * @zbehavior * @zicon 360 * @zparents three/Object3D/Camera/** */ export declare class DeviceOrientation extends Behavior> { constructorProps: DeviceOrientationConstructorProps; onPermissionDenied: Event<[]>; /** * Allow users on devices without any motion data (e.g. no support or no permission) to * swipe or drag on the screen to rotate the view in all dimensions. * * @zui * @zdefault true */ gestureFallback: Observable; /** * Allow users on devices to swipe or drag on the screen to rotate the left-right axis of the view. * * @zui * @zdefault true */ gestureDirection: Observable; private _domEventsBound; private _latestOrientationEvent; private _isIOS; private _gestureXOffset; private _gestureYOffset; /** * Constructs a new DeviceOrientation Behavior. * @param contextManager - The context manager. * @param instance - The Camera instance. * @param constructorProps - The properties required to construct the DeviceOrientation Behavior. */ constructor(contextManager: ContextManager, instance: Camera, constructorProps: DeviceOrientationConstructorProps); private _frame; protected _updateDOMEvents: () => void; private _deviceOrientation; private _lastDragPosition; private _pointerMove; private _pointerUp; protected _activateDOMEvents(): Promise; protected _deactivateDOMEvents(): void; /** * Disposes the DeviceOrientation Behavior. */ dispose(): never; }