react-ngl
Version:
React wrapper for ngl
20 lines (19 loc) • 1.02 kB
TypeScript
import { Vector3 } from 'three';
import * as NGL from './nglTypes';
export declare const Position: typeof Vector3;
export declare type Position = NGL.Vector3;
export declare const Rotation: typeof NGL.Quaternion;
export declare type Rotation = NGL.Quaternion;
export declare const DEFAULT_ROTATION: Rotation;
export interface CameraState {
position: Position;
rotation: Rotation;
distance: number;
}
export declare const CAMERA_STATE_NONE: Partial<CameraState>;
export declare const getCameraState: (stage: NGL.Stage) => CameraState;
export declare const getDefaultPosition: (stage: NGL.Stage) => Vector3;
export declare const getDefaultDistance: (stage: NGL.Stage) => number;
export declare const getDefaultCameraState: (stage: NGL.Stage) => CameraState;
export declare const applyCameraState: (stage: NGL.Stage, cameraState: Partial<CameraState>, withoutDispatch?: boolean) => void;
export declare const isCameraStateEqual: (a: Partial<CameraState> | undefined, b: Partial<CameraState> | undefined) => boolean;