|
@@ -4625,7 +4625,7 @@ declare module BABYLON {
|
|
|
private updateFrustumPlanes();
|
|
|
isInFrustum(target: ICullable): boolean;
|
|
|
isCompletelyInFrustum(target: ICullable): boolean;
|
|
|
- getForwardRay(length?: number): Ray;
|
|
|
+ getForwardRay(length: number, transform: Matrix, origin: Vector3): Ray;
|
|
|
dispose(): void;
|
|
|
readonly leftCamera: FreeCamera;
|
|
|
readonly rightCamera: FreeCamera;
|
|
@@ -5126,6 +5126,51 @@ declare module BABYLON.Debug {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class LensFlare {
|
|
|
+ size: number;
|
|
|
+ position: number;
|
|
|
+ color: Color3;
|
|
|
+ texture: Texture;
|
|
|
+ alphaMode: number;
|
|
|
+ private _system;
|
|
|
+ constructor(size: number, position: number, color: any, imgUrl: string, system: LensFlareSystem);
|
|
|
+ dispose: () => void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class LensFlareSystem {
|
|
|
+ name: string;
|
|
|
+ lensFlares: LensFlare[];
|
|
|
+ borderLimit: number;
|
|
|
+ viewportBorder: number;
|
|
|
+ meshesSelectionPredicate: (mesh: Mesh) => boolean;
|
|
|
+ layerMask: number;
|
|
|
+ id: string;
|
|
|
+ private _scene;
|
|
|
+ private _emitter;
|
|
|
+ private _vertexBuffers;
|
|
|
+ private _indexBuffer;
|
|
|
+ private _effect;
|
|
|
+ private _positionX;
|
|
|
+ private _positionY;
|
|
|
+ private _isEnabled;
|
|
|
+ constructor(name: string, emitter: any, scene: Scene);
|
|
|
+ isEnabled: boolean;
|
|
|
+ getScene(): Scene;
|
|
|
+ getEmitter(): any;
|
|
|
+ setEmitter(newEmitter: any): void;
|
|
|
+ getEmitterPosition(): Vector3;
|
|
|
+ computeEffectivePosition(globalViewport: Viewport): boolean;
|
|
|
+ _isVisible(): boolean;
|
|
|
+ render(): boolean;
|
|
|
+ dispose(): void;
|
|
|
+ static Parse(parsedLensFlareSystem: any, scene: Scene, rootUrl: string): LensFlareSystem;
|
|
|
+ serialize(): any;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
/**
|
|
|
* Highlight layer options. This helps customizing the behaviour
|
|
|
* of the highlight layer.
|
|
@@ -5381,51 +5426,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class LensFlare {
|
|
|
- size: number;
|
|
|
- position: number;
|
|
|
- color: Color3;
|
|
|
- texture: Texture;
|
|
|
- alphaMode: number;
|
|
|
- private _system;
|
|
|
- constructor(size: number, position: number, color: any, imgUrl: string, system: LensFlareSystem);
|
|
|
- dispose: () => void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class LensFlareSystem {
|
|
|
- name: string;
|
|
|
- lensFlares: LensFlare[];
|
|
|
- borderLimit: number;
|
|
|
- viewportBorder: number;
|
|
|
- meshesSelectionPredicate: (mesh: Mesh) => boolean;
|
|
|
- layerMask: number;
|
|
|
- id: string;
|
|
|
- private _scene;
|
|
|
- private _emitter;
|
|
|
- private _vertexBuffers;
|
|
|
- private _indexBuffer;
|
|
|
- private _effect;
|
|
|
- private _positionX;
|
|
|
- private _positionY;
|
|
|
- private _isEnabled;
|
|
|
- constructor(name: string, emitter: any, scene: Scene);
|
|
|
- isEnabled: boolean;
|
|
|
- getScene(): Scene;
|
|
|
- getEmitter(): any;
|
|
|
- setEmitter(newEmitter: any): void;
|
|
|
- getEmitterPosition(): Vector3;
|
|
|
- computeEffectivePosition(globalViewport: Viewport): boolean;
|
|
|
- _isVisible(): boolean;
|
|
|
- render(): boolean;
|
|
|
- dispose(): void;
|
|
|
- static Parse(parsedLensFlareSystem: any, scene: Scene, rootUrl: string): LensFlareSystem;
|
|
|
- serialize(): any;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class DirectionalLight extends Light implements IShadowLight {
|
|
|
position: Vector3;
|
|
|
direction: Vector3;
|
|
@@ -13393,29 +13393,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class ReflectionProbe {
|
|
|
- name: string;
|
|
|
- private _scene;
|
|
|
- private _renderTargetTexture;
|
|
|
- private _projectionMatrix;
|
|
|
- private _viewMatrix;
|
|
|
- private _target;
|
|
|
- private _add;
|
|
|
- private _attachedMesh;
|
|
|
- invertYAxis: boolean;
|
|
|
- position: Vector3;
|
|
|
- constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
|
|
|
- samples: number;
|
|
|
- refreshRate: number;
|
|
|
- getScene(): Scene;
|
|
|
- readonly cubeTexture: RenderTargetTexture;
|
|
|
- readonly renderList: AbstractMesh[];
|
|
|
- attachToMesh(mesh: AbstractMesh): void;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class AnaglyphPostProcess extends PostProcess {
|
|
|
private _passedProcess;
|
|
|
constructor(name: string, options: number | PostProcessOptions, rigCameras: Camera[], samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
@@ -14102,6 +14079,29 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class ReflectionProbe {
|
|
|
+ name: string;
|
|
|
+ private _scene;
|
|
|
+ private _renderTargetTexture;
|
|
|
+ private _projectionMatrix;
|
|
|
+ private _viewMatrix;
|
|
|
+ private _target;
|
|
|
+ private _add;
|
|
|
+ private _attachedMesh;
|
|
|
+ invertYAxis: boolean;
|
|
|
+ position: Vector3;
|
|
|
+ constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
|
|
|
+ samples: number;
|
|
|
+ refreshRate: number;
|
|
|
+ getScene(): Scene;
|
|
|
+ readonly cubeTexture: RenderTargetTexture;
|
|
|
+ readonly renderList: AbstractMesh[];
|
|
|
+ attachToMesh(mesh: AbstractMesh): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class BoundingBoxRenderer {
|
|
|
frontColor: Color3;
|
|
|
backColor: Color3;
|
|
@@ -15805,6 +15805,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 {
|
|
|
class ArcRotateCameraGamepadInput implements ICameraInput<ArcRotateCamera> {
|
|
|
camera: ArcRotateCamera;
|
|
|
gamepad: Gamepad;
|
|
@@ -16015,136 +16145,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 {
|
|
|
interface IOctreeContainer<T> {
|
|
|
blocks: Array<OctreeBlock<T>>;
|
|
|
}
|