UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

15 lines (14 loc) 918 B
import { BaseEvent, Quaternion } from 'three'; export type ScreenOrientation = number; export interface DeviceOrientationEventExtended extends DeviceOrientationEvent { requestPermission?: () => Promise<string>; webkitCompassHeading?: number; } export declare const CHANGE_EVENT: BaseEvent<'change'>; export declare const EPS = 0.000001; export declare const PI_DEG: number; export declare const PI_DEG2: number; export declare function setQuaternionFromEvent(event: Partial<DeviceOrientationEvent>, screenOrientation: ScreenOrientation, target: Quaternion): void; export declare function quaternionYAngle(relativeQuaternion: Quaternion): number; export declare function yAngleFromEvent(event: Partial<DeviceOrientationEvent>, screenOrientation: ScreenOrientation): number; export declare function blendQuaternionToAbsoluteYAngle(relativeQuaternion: Quaternion, yAngleOffset: number, target: Quaternion): void;