|
@@ -11164,82 +11164,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class VRCameraMetrics {
|
|
|
- hResolution: number;
|
|
|
- vResolution: number;
|
|
|
- hScreenSize: number;
|
|
|
- vScreenSize: number;
|
|
|
- vScreenCenter: number;
|
|
|
- eyeToScreenDistance: number;
|
|
|
- lensSeparationDistance: number;
|
|
|
- interpupillaryDistance: number;
|
|
|
- distortionK: number[];
|
|
|
- chromaAbCorrection: number[];
|
|
|
- postProcessScaleFactor: number;
|
|
|
- lensCenterOffset: number;
|
|
|
- compensateDistortion: boolean;
|
|
|
- aspectRatio: number;
|
|
|
- aspectRatioFov: number;
|
|
|
- leftHMatrix: Matrix;
|
|
|
- rightHMatrix: Matrix;
|
|
|
- leftPreViewMatrix: Matrix;
|
|
|
- rightPreViewMatrix: Matrix;
|
|
|
- static GetDefault(): VRCameraMetrics;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class VRDeviceOrientationFreeCamera extends DeviceOrientationCamera {
|
|
|
- constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
- getTypeName(): string;
|
|
|
- }
|
|
|
- class VRDeviceOrientationArcRotateCamera extends ArcRotateCamera {
|
|
|
- constructor(name: string, alpha: number, beta: number, radius: number, target: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
- getTypeName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare var HMDVRDevice: any;
|
|
|
-declare var VRDisplay: any;
|
|
|
-declare var VRFrameData: any;
|
|
|
-declare module BABYLON {
|
|
|
- interface WebVROptions {
|
|
|
- trackPosition?: boolean;
|
|
|
- positionScale?: number;
|
|
|
- displayName?: string;
|
|
|
- }
|
|
|
- class WebVRFreeCamera extends FreeCamera {
|
|
|
- private webVROptions;
|
|
|
- _vrDevice: any;
|
|
|
- private _cacheState;
|
|
|
- private _vrEnabled;
|
|
|
- private _attached;
|
|
|
- private _oldSize;
|
|
|
- private _oldHardwareScaleFactor;
|
|
|
- private _frameData;
|
|
|
- private _quaternionCache;
|
|
|
- private _positionOffset;
|
|
|
- constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, webVROptions?: WebVROptions);
|
|
|
- _checkInputs(): void;
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
- detachControl(element: HTMLElement): void;
|
|
|
- requestVRFullscreen(requestPointerlock: boolean): void;
|
|
|
- getTypeName(): string;
|
|
|
- resetToCurrentRotation(): void;
|
|
|
- /**
|
|
|
- *
|
|
|
- * Set the position offset of the VR camera
|
|
|
- * The offset will be added to the WebVR pose, after scaling it (if set).
|
|
|
- *
|
|
|
- * @param {Vector3} [newPosition] an optional new position. if not provided, the current camera position will be used.
|
|
|
- *
|
|
|
- * @memberOf WebVRFreeCamera
|
|
|
- */
|
|
|
- setPositionOffset(newPosition?: Vector3): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class ArcRotateCameraGamepadInput implements ICameraInput<ArcRotateCamera> {
|
|
|
camera: ArcRotateCamera;
|
|
|
gamepad: Gamepad;
|
|
@@ -11446,6 +11370,82 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class VRCameraMetrics {
|
|
|
+ hResolution: number;
|
|
|
+ vResolution: number;
|
|
|
+ hScreenSize: number;
|
|
|
+ vScreenSize: number;
|
|
|
+ vScreenCenter: number;
|
|
|
+ eyeToScreenDistance: number;
|
|
|
+ lensSeparationDistance: number;
|
|
|
+ interpupillaryDistance: number;
|
|
|
+ distortionK: number[];
|
|
|
+ chromaAbCorrection: number[];
|
|
|
+ postProcessScaleFactor: number;
|
|
|
+ lensCenterOffset: number;
|
|
|
+ compensateDistortion: boolean;
|
|
|
+ aspectRatio: number;
|
|
|
+ aspectRatioFov: number;
|
|
|
+ leftHMatrix: Matrix;
|
|
|
+ rightHMatrix: Matrix;
|
|
|
+ leftPreViewMatrix: Matrix;
|
|
|
+ rightPreViewMatrix: Matrix;
|
|
|
+ static GetDefault(): VRCameraMetrics;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class VRDeviceOrientationFreeCamera extends DeviceOrientationCamera {
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
+ getTypeName(): string;
|
|
|
+ }
|
|
|
+ class VRDeviceOrientationArcRotateCamera extends ArcRotateCamera {
|
|
|
+ constructor(name: string, alpha: number, beta: number, radius: number, target: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
+ getTypeName(): string;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare var HMDVRDevice: any;
|
|
|
+declare var VRDisplay: any;
|
|
|
+declare var VRFrameData: any;
|
|
|
+declare module BABYLON {
|
|
|
+ interface WebVROptions {
|
|
|
+ trackPosition?: boolean;
|
|
|
+ positionScale?: number;
|
|
|
+ displayName?: string;
|
|
|
+ }
|
|
|
+ class WebVRFreeCamera extends FreeCamera {
|
|
|
+ private webVROptions;
|
|
|
+ _vrDevice: any;
|
|
|
+ private _cacheState;
|
|
|
+ private _vrEnabled;
|
|
|
+ private _attached;
|
|
|
+ private _oldSize;
|
|
|
+ private _oldHardwareScaleFactor;
|
|
|
+ private _frameData;
|
|
|
+ private _quaternionCache;
|
|
|
+ private _positionOffset;
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, webVROptions?: WebVROptions);
|
|
|
+ _checkInputs(): void;
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ detachControl(element: HTMLElement): void;
|
|
|
+ requestVRFullscreen(requestPointerlock: boolean): void;
|
|
|
+ getTypeName(): string;
|
|
|
+ resetToCurrentRotation(): void;
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * Set the position offset of the VR camera
|
|
|
+ * The offset will be added to the WebVR pose, after scaling it (if set).
|
|
|
+ *
|
|
|
+ * @param {Vector3} [newPosition] an optional new position. if not provided, the current camera position will be used.
|
|
|
+ *
|
|
|
+ * @memberOf WebVRFreeCamera
|
|
|
+ */
|
|
|
+ setPositionOffset(newPosition?: Vector3): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
interface IOctreeContainer<T> {
|
|
|
blocks: Array<OctreeBlock<T>>;
|
|
|
}
|