|
@@ -9326,69 +9326,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class MorphTarget {
|
|
|
- name: string;
|
|
|
- animations: Animation[];
|
|
|
- private _positions;
|
|
|
- private _normals;
|
|
|
- private _tangents;
|
|
|
- private _influence;
|
|
|
- onInfluenceChanged: Observable<boolean>;
|
|
|
- influence: number;
|
|
|
- constructor(name: string, influence?: number);
|
|
|
- readonly hasNormals: boolean;
|
|
|
- readonly hasTangents: boolean;
|
|
|
- setPositions(data: Float32Array | number[]): void;
|
|
|
- getPositions(): Float32Array;
|
|
|
- setNormals(data: Float32Array | number[]): void;
|
|
|
- getNormals(): Float32Array;
|
|
|
- setTangents(data: Float32Array | number[]): void;
|
|
|
- getTangents(): Float32Array;
|
|
|
- /**
|
|
|
- * Serializes the current target into a Serialization object.
|
|
|
- * Returns the serialized object.
|
|
|
- */
|
|
|
- serialize(): any;
|
|
|
- static Parse(serializationObject: any): MorphTarget;
|
|
|
- static FromMesh(mesh: AbstractMesh, name?: string, influence?: number): MorphTarget;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class MorphTargetManager {
|
|
|
- private _targets;
|
|
|
- private _targetObservable;
|
|
|
- private _activeTargets;
|
|
|
- private _scene;
|
|
|
- private _influences;
|
|
|
- private _supportsNormals;
|
|
|
- private _supportsTangents;
|
|
|
- private _vertexCount;
|
|
|
- private _uniqueId;
|
|
|
- constructor(scene?: Scene);
|
|
|
- readonly uniqueId: number;
|
|
|
- readonly vertexCount: number;
|
|
|
- readonly supportsNormals: boolean;
|
|
|
- readonly supportsTangents: boolean;
|
|
|
- readonly numTargets: number;
|
|
|
- readonly numInfluencers: number;
|
|
|
- readonly influences: Float32Array;
|
|
|
- getActiveTarget(index: number): MorphTarget;
|
|
|
- getTarget(index: number): MorphTarget;
|
|
|
- addTarget(target: MorphTarget): void;
|
|
|
- removeTarget(target: MorphTarget): void;
|
|
|
- /**
|
|
|
- * Serializes the current manager into a Serialization object.
|
|
|
- * Returns the serialized object.
|
|
|
- */
|
|
|
- serialize(): any;
|
|
|
- private _onInfluenceChanged(needUpdate);
|
|
|
- private _syncActiveTargets(needUpdate);
|
|
|
- static Parse(serializationObject: any, scene: Scene): MorphTargetManager;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class AbstractMesh extends Node implements IDisposable, ICullable, IGetSetVerticesData {
|
|
|
private static _BILLBOARDMODE_NONE;
|
|
|
private static _BILLBOARDMODE_X;
|
|
@@ -12610,6 +12547,69 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class MorphTarget {
|
|
|
+ name: string;
|
|
|
+ animations: Animation[];
|
|
|
+ private _positions;
|
|
|
+ private _normals;
|
|
|
+ private _tangents;
|
|
|
+ private _influence;
|
|
|
+ onInfluenceChanged: Observable<boolean>;
|
|
|
+ influence: number;
|
|
|
+ constructor(name: string, influence?: number);
|
|
|
+ readonly hasNormals: boolean;
|
|
|
+ readonly hasTangents: boolean;
|
|
|
+ setPositions(data: Float32Array | number[]): void;
|
|
|
+ getPositions(): Float32Array;
|
|
|
+ setNormals(data: Float32Array | number[]): void;
|
|
|
+ getNormals(): Float32Array;
|
|
|
+ setTangents(data: Float32Array | number[]): void;
|
|
|
+ getTangents(): Float32Array;
|
|
|
+ /**
|
|
|
+ * Serializes the current target into a Serialization object.
|
|
|
+ * Returns the serialized object.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ static Parse(serializationObject: any): MorphTarget;
|
|
|
+ static FromMesh(mesh: AbstractMesh, name?: string, influence?: number): MorphTarget;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class MorphTargetManager {
|
|
|
+ private _targets;
|
|
|
+ private _targetObservable;
|
|
|
+ private _activeTargets;
|
|
|
+ private _scene;
|
|
|
+ private _influences;
|
|
|
+ private _supportsNormals;
|
|
|
+ private _supportsTangents;
|
|
|
+ private _vertexCount;
|
|
|
+ private _uniqueId;
|
|
|
+ constructor(scene?: Scene);
|
|
|
+ readonly uniqueId: number;
|
|
|
+ readonly vertexCount: number;
|
|
|
+ readonly supportsNormals: boolean;
|
|
|
+ readonly supportsTangents: boolean;
|
|
|
+ readonly numTargets: number;
|
|
|
+ readonly numInfluencers: number;
|
|
|
+ readonly influences: Float32Array;
|
|
|
+ getActiveTarget(index: number): MorphTarget;
|
|
|
+ getTarget(index: number): MorphTarget;
|
|
|
+ addTarget(target: MorphTarget): void;
|
|
|
+ removeTarget(target: MorphTarget): void;
|
|
|
+ /**
|
|
|
+ * Serializes the current manager into a Serialization object.
|
|
|
+ * Returns the serialized object.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ private _onInfluenceChanged(needUpdate);
|
|
|
+ private _syncActiveTargets(needUpdate);
|
|
|
+ static Parse(serializationObject: any, scene: Scene): MorphTargetManager;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class Particle {
|
|
|
position: Vector3;
|
|
|
direction: Vector3;
|
|
@@ -15851,136 +15851,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;
|
|
|
- readonly aspectRatio: number;
|
|
|
- readonly aspectRatioFov: number;
|
|
|
- readonly leftHMatrix: Matrix;
|
|
|
- readonly rightHMatrix: Matrix;
|
|
|
- readonly leftPreViewMatrix: Matrix;
|
|
|
- readonly rightPreViewMatrix: Matrix;
|
|
|
- static GetDefault(): VRCameraMetrics;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class VRDeviceOrientationFreeCamera extends DeviceOrientationCamera {
|
|
|
- constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
- getClassName(): string;
|
|
|
- }
|
|
|
- class VRDeviceOrientationGamepadCamera extends VRDeviceOrientationFreeCamera {
|
|
|
- constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
- getClassName(): string;
|
|
|
- }
|
|
|
- class VRDeviceOrientationArcRotateCamera extends ArcRotateCamera {
|
|
|
- constructor(name: string, alpha: number, beta: number, radius: number, target: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
- getClassName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare var HMDVRDevice: any;
|
|
|
-declare var VRDisplay: any;
|
|
|
-declare var VRFrameData: any;
|
|
|
-declare module BABYLON {
|
|
|
- /**
|
|
|
- * This is a copy of VRPose.
|
|
|
- * IMPORTANT!! The data is right-hand data.
|
|
|
- * @export
|
|
|
- * @interface DevicePose
|
|
|
- */
|
|
|
- interface DevicePose {
|
|
|
- readonly position?: Float32Array;
|
|
|
- readonly linearVelocity?: Float32Array;
|
|
|
- readonly linearAcceleration?: Float32Array;
|
|
|
- readonly orientation?: Float32Array;
|
|
|
- readonly angularVelocity?: Float32Array;
|
|
|
- readonly angularAcceleration?: Float32Array;
|
|
|
- }
|
|
|
- interface PoseControlled {
|
|
|
- position: Vector3;
|
|
|
- rotationQuaternion: Quaternion;
|
|
|
- devicePosition?: Vector3;
|
|
|
- deviceRotationQuaternion: Quaternion;
|
|
|
- rawPose: DevicePose;
|
|
|
- deviceScaleFactor: number;
|
|
|
- updateFromDevice(poseData: DevicePose): any;
|
|
|
- }
|
|
|
- interface WebVROptions {
|
|
|
- trackPosition?: boolean;
|
|
|
- positionScale?: number;
|
|
|
- displayName?: string;
|
|
|
- controllerMeshes?: boolean;
|
|
|
- defaultLightningOnControllers?: boolean;
|
|
|
- }
|
|
|
- class WebVRFreeCamera extends FreeCamera implements PoseControlled {
|
|
|
- private webVROptions;
|
|
|
- _vrDevice: any;
|
|
|
- rawPose: DevicePose;
|
|
|
- private _vrEnabled;
|
|
|
- private _specsVersion;
|
|
|
- private _attached;
|
|
|
- private _oldSize;
|
|
|
- private _oldHardwareScaleFactor;
|
|
|
- private _frameData;
|
|
|
- private _quaternionCache;
|
|
|
- private _positionOffset;
|
|
|
- protected _descendants: Array<Node>;
|
|
|
- devicePosition: Vector3;
|
|
|
- deviceRotationQuaternion: any;
|
|
|
- deviceScaleFactor: number;
|
|
|
- controllers: Array<WebVRController>;
|
|
|
- private _onControllersAttached;
|
|
|
- rigParenting: boolean;
|
|
|
- private _lightOnControllers;
|
|
|
- constructor(name: string, position: Vector3, scene: Scene, webVROptions?: WebVROptions);
|
|
|
- onControllersAttached: (controllers: Array<WebVRController>) => void;
|
|
|
- getControllerByName(name: string): WebVRController;
|
|
|
- private _leftController;
|
|
|
- readonly leftController: WebVRController;
|
|
|
- private _rightController;
|
|
|
- readonly rightController: WebVRController;
|
|
|
- getForwardRay(length?: number): Ray;
|
|
|
- _checkInputs(): void;
|
|
|
- updateFromDevice(poseData: DevicePose): void;
|
|
|
- /**
|
|
|
- * WebVR's attach control will start broadcasting frames to the device.
|
|
|
- * Note that in certain browsers (chrome for example) this function must be called
|
|
|
- * within a user-interaction callback. Example:
|
|
|
- * <pre> scene.onPointerDown = function() { camera.attachControl(canvas); }</pre>
|
|
|
- *
|
|
|
- * @param {HTMLElement} element
|
|
|
- * @param {boolean} [noPreventDefault]
|
|
|
- *
|
|
|
- * @memberOf WebVRFreeCamera
|
|
|
- */
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
- detachControl(element: HTMLElement): void;
|
|
|
- getClassName(): string;
|
|
|
- resetToCurrentRotation(): void;
|
|
|
- _updateRigCameras(): void;
|
|
|
- /**
|
|
|
- * This function is called by the two RIG cameras.
|
|
|
- * 'this' is the left or right camera (and NOT (!!!) the WebVRFreeCamera instance)
|
|
|
- */
|
|
|
- protected _getWebVRViewMatrix(): Matrix;
|
|
|
- protected _getWebVRProjectionMatrix(): Matrix;
|
|
|
- initControllers(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class ArcRotateCameraGamepadInput implements ICameraInput<ArcRotateCamera> {
|
|
|
camera: ArcRotateCamera;
|
|
|
gamepad: Gamepad;
|
|
@@ -16191,6 +16061,136 @@ 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;
|
|
|
+ readonly aspectRatio: number;
|
|
|
+ readonly aspectRatioFov: number;
|
|
|
+ readonly leftHMatrix: Matrix;
|
|
|
+ readonly rightHMatrix: Matrix;
|
|
|
+ readonly leftPreViewMatrix: Matrix;
|
|
|
+ readonly rightPreViewMatrix: Matrix;
|
|
|
+ static GetDefault(): VRCameraMetrics;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class VRDeviceOrientationFreeCamera extends DeviceOrientationCamera {
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
+ getClassName(): string;
|
|
|
+ }
|
|
|
+ class VRDeviceOrientationGamepadCamera extends VRDeviceOrientationFreeCamera {
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
+ getClassName(): string;
|
|
|
+ }
|
|
|
+ class VRDeviceOrientationArcRotateCamera extends ArcRotateCamera {
|
|
|
+ constructor(name: string, alpha: number, beta: number, radius: number, target: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
+ getClassName(): string;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare var HMDVRDevice: any;
|
|
|
+declare var VRDisplay: any;
|
|
|
+declare var VRFrameData: any;
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
+ * This is a copy of VRPose.
|
|
|
+ * IMPORTANT!! The data is right-hand data.
|
|
|
+ * @export
|
|
|
+ * @interface DevicePose
|
|
|
+ */
|
|
|
+ interface DevicePose {
|
|
|
+ readonly position?: Float32Array;
|
|
|
+ readonly linearVelocity?: Float32Array;
|
|
|
+ readonly linearAcceleration?: Float32Array;
|
|
|
+ readonly orientation?: Float32Array;
|
|
|
+ readonly angularVelocity?: Float32Array;
|
|
|
+ readonly angularAcceleration?: Float32Array;
|
|
|
+ }
|
|
|
+ interface PoseControlled {
|
|
|
+ position: Vector3;
|
|
|
+ rotationQuaternion: Quaternion;
|
|
|
+ devicePosition?: Vector3;
|
|
|
+ deviceRotationQuaternion: Quaternion;
|
|
|
+ rawPose: DevicePose;
|
|
|
+ deviceScaleFactor: number;
|
|
|
+ updateFromDevice(poseData: DevicePose): any;
|
|
|
+ }
|
|
|
+ interface WebVROptions {
|
|
|
+ trackPosition?: boolean;
|
|
|
+ positionScale?: number;
|
|
|
+ displayName?: string;
|
|
|
+ controllerMeshes?: boolean;
|
|
|
+ defaultLightningOnControllers?: boolean;
|
|
|
+ }
|
|
|
+ class WebVRFreeCamera extends FreeCamera implements PoseControlled {
|
|
|
+ private webVROptions;
|
|
|
+ _vrDevice: any;
|
|
|
+ rawPose: DevicePose;
|
|
|
+ private _vrEnabled;
|
|
|
+ private _specsVersion;
|
|
|
+ private _attached;
|
|
|
+ private _oldSize;
|
|
|
+ private _oldHardwareScaleFactor;
|
|
|
+ private _frameData;
|
|
|
+ private _quaternionCache;
|
|
|
+ private _positionOffset;
|
|
|
+ protected _descendants: Array<Node>;
|
|
|
+ devicePosition: Vector3;
|
|
|
+ deviceRotationQuaternion: any;
|
|
|
+ deviceScaleFactor: number;
|
|
|
+ controllers: Array<WebVRController>;
|
|
|
+ private _onControllersAttached;
|
|
|
+ rigParenting: boolean;
|
|
|
+ private _lightOnControllers;
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene, webVROptions?: WebVROptions);
|
|
|
+ onControllersAttached: (controllers: Array<WebVRController>) => void;
|
|
|
+ getControllerByName(name: string): WebVRController;
|
|
|
+ private _leftController;
|
|
|
+ readonly leftController: WebVRController;
|
|
|
+ private _rightController;
|
|
|
+ readonly rightController: WebVRController;
|
|
|
+ getForwardRay(length?: number): Ray;
|
|
|
+ _checkInputs(): void;
|
|
|
+ updateFromDevice(poseData: DevicePose): void;
|
|
|
+ /**
|
|
|
+ * WebVR's attach control will start broadcasting frames to the device.
|
|
|
+ * Note that in certain browsers (chrome for example) this function must be called
|
|
|
+ * within a user-interaction callback. Example:
|
|
|
+ * <pre> scene.onPointerDown = function() { camera.attachControl(canvas); }</pre>
|
|
|
+ *
|
|
|
+ * @param {HTMLElement} element
|
|
|
+ * @param {boolean} [noPreventDefault]
|
|
|
+ *
|
|
|
+ * @memberOf WebVRFreeCamera
|
|
|
+ */
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ detachControl(element: HTMLElement): void;
|
|
|
+ getClassName(): string;
|
|
|
+ resetToCurrentRotation(): void;
|
|
|
+ _updateRigCameras(): void;
|
|
|
+ /**
|
|
|
+ * This function is called by the two RIG cameras.
|
|
|
+ * 'this' is the left or right camera (and NOT (!!!) the WebVRFreeCamera instance)
|
|
|
+ */
|
|
|
+ protected _getWebVRViewMatrix(): Matrix;
|
|
|
+ protected _getWebVRProjectionMatrix(): Matrix;
|
|
|
+ initControllers(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
interface IOctreeContainer<T> {
|
|
|
blocks: Array<OctreeBlock<T>>;
|
|
|
}
|