|
@@ -1204,175 +1204,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class Analyser {
|
|
|
- SMOOTHING: number;
|
|
|
- FFT_SIZE: number;
|
|
|
- BARGRAPHAMPLITUDE: number;
|
|
|
- DEBUGCANVASPOS: {
|
|
|
- x: number;
|
|
|
- y: number;
|
|
|
- };
|
|
|
- DEBUGCANVASSIZE: {
|
|
|
- width: number;
|
|
|
- height: number;
|
|
|
- };
|
|
|
- private _byteFreqs;
|
|
|
- private _byteTime;
|
|
|
- private _floatFreqs;
|
|
|
- private _webAudioAnalyser;
|
|
|
- private _debugCanvas;
|
|
|
- private _debugCanvasContext;
|
|
|
- private _scene;
|
|
|
- private _registerFunc;
|
|
|
- private _audioEngine;
|
|
|
- constructor(scene: Scene);
|
|
|
- getFrequencyBinCount(): number;
|
|
|
- getByteFrequencyData(): Uint8Array;
|
|
|
- getByteTimeDomainData(): Uint8Array;
|
|
|
- getFloatFrequencyData(): Uint8Array;
|
|
|
- drawDebugCanvas(): void;
|
|
|
- stopDebugCanvas(): void;
|
|
|
- connectAudioNodes(inputAudioNode: AudioNode, outputAudioNode: AudioNode): void;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class AudioEngine {
|
|
|
- private _audioContext;
|
|
|
- private _audioContextInitialized;
|
|
|
- canUseWebAudio: boolean;
|
|
|
- masterGain: GainNode;
|
|
|
- private _connectedAnalyser;
|
|
|
- WarnedWebAudioUnsupported: boolean;
|
|
|
- audioContext: AudioContext;
|
|
|
- constructor();
|
|
|
- private _initializeAudioContext();
|
|
|
- dispose(): void;
|
|
|
- getGlobalVolume(): number;
|
|
|
- setGlobalVolume(newVolume: number): void;
|
|
|
- connectToAnalyser(analyser: Analyser): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class Sound {
|
|
|
- name: string;
|
|
|
- autoplay: boolean;
|
|
|
- loop: boolean;
|
|
|
- useCustomAttenuation: boolean;
|
|
|
- soundTrackId: number;
|
|
|
- spatialSound: boolean;
|
|
|
- refDistance: number;
|
|
|
- rolloffFactor: number;
|
|
|
- maxDistance: number;
|
|
|
- distanceModel: string;
|
|
|
- private _panningModel;
|
|
|
- onended: () => any;
|
|
|
- private _playbackRate;
|
|
|
- private _streaming;
|
|
|
- private _startTime;
|
|
|
- private _startOffset;
|
|
|
- private _position;
|
|
|
- private _localDirection;
|
|
|
- private _volume;
|
|
|
- private _isLoaded;
|
|
|
- private _isReadyToPlay;
|
|
|
- isPlaying: boolean;
|
|
|
- isPaused: boolean;
|
|
|
- private _isDirectional;
|
|
|
- private _readyToPlayCallback;
|
|
|
- private _audioBuffer;
|
|
|
- private _soundSource;
|
|
|
- private _streamingSource;
|
|
|
- private _soundPanner;
|
|
|
- private _soundGain;
|
|
|
- private _inputAudioNode;
|
|
|
- private _ouputAudioNode;
|
|
|
- private _coneInnerAngle;
|
|
|
- private _coneOuterAngle;
|
|
|
- private _coneOuterGain;
|
|
|
- private _scene;
|
|
|
- private _connectedMesh;
|
|
|
- private _customAttenuationFunction;
|
|
|
- private _registerFunc;
|
|
|
- private _isOutputConnected;
|
|
|
- private _htmlAudioElement;
|
|
|
- /**
|
|
|
- * Create a sound and attach it to a scene
|
|
|
- * @param name Name of your sound
|
|
|
- * @param urlOrArrayBuffer Url to the sound to load async or ArrayBuffer
|
|
|
- * @param readyToPlayCallback Provide a callback function if you'd like to load your code once the sound is ready to be played
|
|
|
- * @param options Objects to provide with the current available options: autoplay, loop, volume, spatialSound, maxDistance, rolloffFactor, refDistance, distanceModel, panningModel
|
|
|
- */
|
|
|
- constructor(name: string, urlOrArrayBuffer: any, scene: Scene, readyToPlayCallback?: () => void, options?: any);
|
|
|
- dispose(): void;
|
|
|
- private _soundLoaded(audioData);
|
|
|
- setAudioBuffer(audioBuffer: AudioBuffer): void;
|
|
|
- updateOptions(options: any): void;
|
|
|
- private _createSpatialParameters();
|
|
|
- private _updateSpatialParameters();
|
|
|
- switchPanningModelToHRTF(): void;
|
|
|
- switchPanningModelToEqualPower(): void;
|
|
|
- private _switchPanningModel();
|
|
|
- connectToSoundTrackAudioNode(soundTrackAudioNode: AudioNode): void;
|
|
|
- /**
|
|
|
- * Transform this sound into a directional source
|
|
|
- * @param coneInnerAngle Size of the inner cone in degree
|
|
|
- * @param coneOuterAngle Size of the outer cone in degree
|
|
|
- * @param coneOuterGain Volume of the sound outside the outer cone (between 0.0 and 1.0)
|
|
|
- */
|
|
|
- setDirectionalCone(coneInnerAngle: number, coneOuterAngle: number, coneOuterGain: number): void;
|
|
|
- setPosition(newPosition: Vector3): void;
|
|
|
- setLocalDirectionToMesh(newLocalDirection: Vector3): void;
|
|
|
- private _updateDirection();
|
|
|
- updateDistanceFromListener(): void;
|
|
|
- setAttenuationFunction(callback: (currentVolume: number, currentDistance: number, maxDistance: number, refDistance: number, rolloffFactor: number) => number): void;
|
|
|
- /**
|
|
|
- * Play the sound
|
|
|
- * @param time (optional) Start the sound after X seconds. Start immediately (0) by default.
|
|
|
- */
|
|
|
- play(time?: number): void;
|
|
|
- private _onended();
|
|
|
- /**
|
|
|
- * Stop the sound
|
|
|
- * @param time (optional) Stop the sound after X seconds. Stop immediately (0) by default.
|
|
|
- */
|
|
|
- stop(time?: number): void;
|
|
|
- pause(): void;
|
|
|
- setVolume(newVolume: number, time?: number): void;
|
|
|
- setPlaybackRate(newPlaybackRate: number): void;
|
|
|
- getVolume(): number;
|
|
|
- attachToMesh(meshToConnectTo: AbstractMesh): void;
|
|
|
- private _onRegisterAfterWorldMatrixUpdate(connectedMesh);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class SoundTrack {
|
|
|
- private _outputAudioNode;
|
|
|
- private _inputAudioNode;
|
|
|
- private _trackConvolver;
|
|
|
- private _scene;
|
|
|
- id: number;
|
|
|
- soundCollection: Array<Sound>;
|
|
|
- private _isMainTrack;
|
|
|
- private _connectedAnalyser;
|
|
|
- private _options;
|
|
|
- private _isInitialized;
|
|
|
- constructor(scene: Scene, options?: any);
|
|
|
- private _initializeSoundTrackAudioGraph();
|
|
|
- dispose(): void;
|
|
|
- AddSound(sound: Sound): void;
|
|
|
- RemoveSound(sound: Sound): void;
|
|
|
- setVolume(newVolume: number): void;
|
|
|
- switchPanningModelToHRTF(): void;
|
|
|
- switchPanningModelToEqualPower(): void;
|
|
|
- connectToAnalyser(analyser: Analyser): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class Animatable {
|
|
|
target: any;
|
|
|
fromFrame: number;
|
|
@@ -1561,6 +1392,175 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class Analyser {
|
|
|
+ SMOOTHING: number;
|
|
|
+ FFT_SIZE: number;
|
|
|
+ BARGRAPHAMPLITUDE: number;
|
|
|
+ DEBUGCANVASPOS: {
|
|
|
+ x: number;
|
|
|
+ y: number;
|
|
|
+ };
|
|
|
+ DEBUGCANVASSIZE: {
|
|
|
+ width: number;
|
|
|
+ height: number;
|
|
|
+ };
|
|
|
+ private _byteFreqs;
|
|
|
+ private _byteTime;
|
|
|
+ private _floatFreqs;
|
|
|
+ private _webAudioAnalyser;
|
|
|
+ private _debugCanvas;
|
|
|
+ private _debugCanvasContext;
|
|
|
+ private _scene;
|
|
|
+ private _registerFunc;
|
|
|
+ private _audioEngine;
|
|
|
+ constructor(scene: Scene);
|
|
|
+ getFrequencyBinCount(): number;
|
|
|
+ getByteFrequencyData(): Uint8Array;
|
|
|
+ getByteTimeDomainData(): Uint8Array;
|
|
|
+ getFloatFrequencyData(): Uint8Array;
|
|
|
+ drawDebugCanvas(): void;
|
|
|
+ stopDebugCanvas(): void;
|
|
|
+ connectAudioNodes(inputAudioNode: AudioNode, outputAudioNode: AudioNode): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class AudioEngine {
|
|
|
+ private _audioContext;
|
|
|
+ private _audioContextInitialized;
|
|
|
+ canUseWebAudio: boolean;
|
|
|
+ masterGain: GainNode;
|
|
|
+ private _connectedAnalyser;
|
|
|
+ WarnedWebAudioUnsupported: boolean;
|
|
|
+ audioContext: AudioContext;
|
|
|
+ constructor();
|
|
|
+ private _initializeAudioContext();
|
|
|
+ dispose(): void;
|
|
|
+ getGlobalVolume(): number;
|
|
|
+ setGlobalVolume(newVolume: number): void;
|
|
|
+ connectToAnalyser(analyser: Analyser): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class Sound {
|
|
|
+ name: string;
|
|
|
+ autoplay: boolean;
|
|
|
+ loop: boolean;
|
|
|
+ useCustomAttenuation: boolean;
|
|
|
+ soundTrackId: number;
|
|
|
+ spatialSound: boolean;
|
|
|
+ refDistance: number;
|
|
|
+ rolloffFactor: number;
|
|
|
+ maxDistance: number;
|
|
|
+ distanceModel: string;
|
|
|
+ private _panningModel;
|
|
|
+ onended: () => any;
|
|
|
+ private _playbackRate;
|
|
|
+ private _streaming;
|
|
|
+ private _startTime;
|
|
|
+ private _startOffset;
|
|
|
+ private _position;
|
|
|
+ private _localDirection;
|
|
|
+ private _volume;
|
|
|
+ private _isLoaded;
|
|
|
+ private _isReadyToPlay;
|
|
|
+ isPlaying: boolean;
|
|
|
+ isPaused: boolean;
|
|
|
+ private _isDirectional;
|
|
|
+ private _readyToPlayCallback;
|
|
|
+ private _audioBuffer;
|
|
|
+ private _soundSource;
|
|
|
+ private _streamingSource;
|
|
|
+ private _soundPanner;
|
|
|
+ private _soundGain;
|
|
|
+ private _inputAudioNode;
|
|
|
+ private _ouputAudioNode;
|
|
|
+ private _coneInnerAngle;
|
|
|
+ private _coneOuterAngle;
|
|
|
+ private _coneOuterGain;
|
|
|
+ private _scene;
|
|
|
+ private _connectedMesh;
|
|
|
+ private _customAttenuationFunction;
|
|
|
+ private _registerFunc;
|
|
|
+ private _isOutputConnected;
|
|
|
+ private _htmlAudioElement;
|
|
|
+ /**
|
|
|
+ * Create a sound and attach it to a scene
|
|
|
+ * @param name Name of your sound
|
|
|
+ * @param urlOrArrayBuffer Url to the sound to load async or ArrayBuffer
|
|
|
+ * @param readyToPlayCallback Provide a callback function if you'd like to load your code once the sound is ready to be played
|
|
|
+ * @param options Objects to provide with the current available options: autoplay, loop, volume, spatialSound, maxDistance, rolloffFactor, refDistance, distanceModel, panningModel
|
|
|
+ */
|
|
|
+ constructor(name: string, urlOrArrayBuffer: any, scene: Scene, readyToPlayCallback?: () => void, options?: any);
|
|
|
+ dispose(): void;
|
|
|
+ private _soundLoaded(audioData);
|
|
|
+ setAudioBuffer(audioBuffer: AudioBuffer): void;
|
|
|
+ updateOptions(options: any): void;
|
|
|
+ private _createSpatialParameters();
|
|
|
+ private _updateSpatialParameters();
|
|
|
+ switchPanningModelToHRTF(): void;
|
|
|
+ switchPanningModelToEqualPower(): void;
|
|
|
+ private _switchPanningModel();
|
|
|
+ connectToSoundTrackAudioNode(soundTrackAudioNode: AudioNode): void;
|
|
|
+ /**
|
|
|
+ * Transform this sound into a directional source
|
|
|
+ * @param coneInnerAngle Size of the inner cone in degree
|
|
|
+ * @param coneOuterAngle Size of the outer cone in degree
|
|
|
+ * @param coneOuterGain Volume of the sound outside the outer cone (between 0.0 and 1.0)
|
|
|
+ */
|
|
|
+ setDirectionalCone(coneInnerAngle: number, coneOuterAngle: number, coneOuterGain: number): void;
|
|
|
+ setPosition(newPosition: Vector3): void;
|
|
|
+ setLocalDirectionToMesh(newLocalDirection: Vector3): void;
|
|
|
+ private _updateDirection();
|
|
|
+ updateDistanceFromListener(): void;
|
|
|
+ setAttenuationFunction(callback: (currentVolume: number, currentDistance: number, maxDistance: number, refDistance: number, rolloffFactor: number) => number): void;
|
|
|
+ /**
|
|
|
+ * Play the sound
|
|
|
+ * @param time (optional) Start the sound after X seconds. Start immediately (0) by default.
|
|
|
+ */
|
|
|
+ play(time?: number): void;
|
|
|
+ private _onended();
|
|
|
+ /**
|
|
|
+ * Stop the sound
|
|
|
+ * @param time (optional) Stop the sound after X seconds. Stop immediately (0) by default.
|
|
|
+ */
|
|
|
+ stop(time?: number): void;
|
|
|
+ pause(): void;
|
|
|
+ setVolume(newVolume: number, time?: number): void;
|
|
|
+ setPlaybackRate(newPlaybackRate: number): void;
|
|
|
+ getVolume(): number;
|
|
|
+ attachToMesh(meshToConnectTo: AbstractMesh): void;
|
|
|
+ private _onRegisterAfterWorldMatrixUpdate(connectedMesh);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class SoundTrack {
|
|
|
+ private _outputAudioNode;
|
|
|
+ private _inputAudioNode;
|
|
|
+ private _trackConvolver;
|
|
|
+ private _scene;
|
|
|
+ id: number;
|
|
|
+ soundCollection: Array<Sound>;
|
|
|
+ private _isMainTrack;
|
|
|
+ private _connectedAnalyser;
|
|
|
+ private _options;
|
|
|
+ private _isInitialized;
|
|
|
+ constructor(scene: Scene, options?: any);
|
|
|
+ private _initializeSoundTrackAudioGraph();
|
|
|
+ dispose(): void;
|
|
|
+ AddSound(sound: Sound): void;
|
|
|
+ RemoveSound(sound: Sound): void;
|
|
|
+ setVolume(newVolume: number): void;
|
|
|
+ switchPanningModelToHRTF(): void;
|
|
|
+ switchPanningModelToEqualPower(): void;
|
|
|
+ connectToAnalyser(analyser: Analyser): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class Bone extends Node {
|
|
|
name: string;
|
|
|
children: Bone[];
|
|
@@ -2223,83 +2223,23 @@ declare module BABYLON {
|
|
|
class IntersectionInfo {
|
|
|
bu: number;
|
|
|
bv: number;
|
|
|
- distance: number;
|
|
|
- faceId: number;
|
|
|
- subMeshId: number;
|
|
|
- constructor(bu: number, bv: number, distance: number);
|
|
|
- }
|
|
|
- class PickingInfo {
|
|
|
- hit: boolean;
|
|
|
- distance: number;
|
|
|
- pickedPoint: Vector3;
|
|
|
- pickedMesh: AbstractMesh;
|
|
|
- bu: number;
|
|
|
- bv: number;
|
|
|
- faceId: number;
|
|
|
- subMeshId: number;
|
|
|
- pickedSprite: Sprite;
|
|
|
- getNormal(useWorldCoordinates?: boolean, useVerticesNormals?: boolean): Vector3;
|
|
|
- getTextureCoordinates(): Vector2;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class BoundingBox {
|
|
|
- minimum: Vector3;
|
|
|
- maximum: Vector3;
|
|
|
- vectors: Vector3[];
|
|
|
- center: Vector3;
|
|
|
- extendSize: Vector3;
|
|
|
- directions: Vector3[];
|
|
|
- vectorsWorld: Vector3[];
|
|
|
- minimumWorld: Vector3;
|
|
|
- maximumWorld: Vector3;
|
|
|
- private _worldMatrix;
|
|
|
- constructor(minimum: Vector3, maximum: Vector3);
|
|
|
- getWorldMatrix(): Matrix;
|
|
|
- _update(world: Matrix): void;
|
|
|
- isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
- isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
- intersectsPoint(point: Vector3): boolean;
|
|
|
- intersectsSphere(sphere: BoundingSphere): boolean;
|
|
|
- intersectsMinMax(min: Vector3, max: Vector3): boolean;
|
|
|
- static Intersects(box0: BoundingBox, box1: BoundingBox): boolean;
|
|
|
- static IntersectsSphere(minPoint: Vector3, maxPoint: Vector3, sphereCenter: Vector3, sphereRadius: number): boolean;
|
|
|
- static IsCompletelyInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
|
|
|
- static IsInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class BoundingInfo {
|
|
|
- minimum: Vector3;
|
|
|
- maximum: Vector3;
|
|
|
- boundingBox: BoundingBox;
|
|
|
- boundingSphere: BoundingSphere;
|
|
|
- constructor(minimum: Vector3, maximum: Vector3);
|
|
|
- _update(world: Matrix): void;
|
|
|
- isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
- isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
- _checkCollision(collider: Collider): boolean;
|
|
|
- intersectsPoint(point: Vector3): boolean;
|
|
|
- intersects(boundingInfo: BoundingInfo, precise: boolean): boolean;
|
|
|
+ distance: number;
|
|
|
+ faceId: number;
|
|
|
+ subMeshId: number;
|
|
|
+ constructor(bu: number, bv: number, distance: number);
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class BoundingSphere {
|
|
|
- minimum: Vector3;
|
|
|
- maximum: Vector3;
|
|
|
- center: Vector3;
|
|
|
- radius: number;
|
|
|
- centerWorld: Vector3;
|
|
|
- radiusWorld: number;
|
|
|
- private _tempRadiusVector;
|
|
|
- constructor(minimum: Vector3, maximum: Vector3);
|
|
|
- _update(world: Matrix): void;
|
|
|
- isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
- intersectsPoint(point: Vector3): boolean;
|
|
|
- static Intersects(sphere0: BoundingSphere, sphere1: BoundingSphere): boolean;
|
|
|
+ class PickingInfo {
|
|
|
+ hit: boolean;
|
|
|
+ distance: number;
|
|
|
+ pickedPoint: Vector3;
|
|
|
+ pickedMesh: AbstractMesh;
|
|
|
+ bu: number;
|
|
|
+ bv: number;
|
|
|
+ faceId: number;
|
|
|
+ subMeshId: number;
|
|
|
+ pickedSprite: Sprite;
|
|
|
+ getNormal(useWorldCoordinates?: boolean, useVerticesNormals?: boolean): Vector3;
|
|
|
+ getTextureCoordinates(): Vector2;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2381,6 +2321,66 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class BoundingBox {
|
|
|
+ minimum: Vector3;
|
|
|
+ maximum: Vector3;
|
|
|
+ vectors: Vector3[];
|
|
|
+ center: Vector3;
|
|
|
+ extendSize: Vector3;
|
|
|
+ directions: Vector3[];
|
|
|
+ vectorsWorld: Vector3[];
|
|
|
+ minimumWorld: Vector3;
|
|
|
+ maximumWorld: Vector3;
|
|
|
+ private _worldMatrix;
|
|
|
+ constructor(minimum: Vector3, maximum: Vector3);
|
|
|
+ getWorldMatrix(): Matrix;
|
|
|
+ _update(world: Matrix): void;
|
|
|
+ isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ intersectsPoint(point: Vector3): boolean;
|
|
|
+ intersectsSphere(sphere: BoundingSphere): boolean;
|
|
|
+ intersectsMinMax(min: Vector3, max: Vector3): boolean;
|
|
|
+ static Intersects(box0: BoundingBox, box1: BoundingBox): boolean;
|
|
|
+ static IntersectsSphere(minPoint: Vector3, maxPoint: Vector3, sphereCenter: Vector3, sphereRadius: number): boolean;
|
|
|
+ static IsCompletelyInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
|
|
|
+ static IsInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class BoundingInfo {
|
|
|
+ minimum: Vector3;
|
|
|
+ maximum: Vector3;
|
|
|
+ boundingBox: BoundingBox;
|
|
|
+ boundingSphere: BoundingSphere;
|
|
|
+ constructor(minimum: Vector3, maximum: Vector3);
|
|
|
+ _update(world: Matrix): void;
|
|
|
+ isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ _checkCollision(collider: Collider): boolean;
|
|
|
+ intersectsPoint(point: Vector3): boolean;
|
|
|
+ intersects(boundingInfo: BoundingInfo, precise: boolean): boolean;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class BoundingSphere {
|
|
|
+ minimum: Vector3;
|
|
|
+ maximum: Vector3;
|
|
|
+ center: Vector3;
|
|
|
+ radius: number;
|
|
|
+ centerWorld: Vector3;
|
|
|
+ radiusWorld: number;
|
|
|
+ private _tempRadiusVector;
|
|
|
+ constructor(minimum: Vector3, maximum: Vector3);
|
|
|
+ _update(world: Matrix): void;
|
|
|
+ isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ intersectsPoint(point: Vector3): boolean;
|
|
|
+ static Intersects(sphere0: BoundingSphere, sphere1: BoundingSphere): boolean;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class LensFlare {
|
|
|
size: number;
|
|
|
position: number;
|
|
@@ -4656,6 +4656,65 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ interface IPhysicsEnginePlugin {
|
|
|
+ name: string;
|
|
|
+ initialize(iterations?: number): any;
|
|
|
+ setGravity(gravity: Vector3): void;
|
|
|
+ getGravity(): Vector3;
|
|
|
+ runOneStep(delta: number): void;
|
|
|
+ registerMesh(mesh: AbstractMesh, impostor: number, options: PhysicsBodyCreationOptions): any;
|
|
|
+ registerMeshesAsCompound(parts: PhysicsCompoundBodyPart[], options: PhysicsBodyCreationOptions): any;
|
|
|
+ unregisterMesh(mesh: AbstractMesh): any;
|
|
|
+ applyImpulse(mesh: AbstractMesh, force: Vector3, contactPoint: Vector3): void;
|
|
|
+ createLink(mesh1: AbstractMesh, mesh2: AbstractMesh, pivot1: Vector3, pivot2: Vector3, options?: any): boolean;
|
|
|
+ dispose(): void;
|
|
|
+ isSupported(): boolean;
|
|
|
+ updateBodyPosition(mesh: AbstractMesh): void;
|
|
|
+ getWorldObject(): any;
|
|
|
+ getPhysicsBodyOfMesh(mesh: AbstractMesh): any;
|
|
|
+ }
|
|
|
+ interface PhysicsBodyCreationOptions {
|
|
|
+ mass: number;
|
|
|
+ friction: number;
|
|
|
+ restitution: number;
|
|
|
+ }
|
|
|
+ interface PhysicsCompoundBodyPart {
|
|
|
+ mesh: Mesh;
|
|
|
+ impostor: number;
|
|
|
+ }
|
|
|
+ class PhysicsEngine {
|
|
|
+ gravity: Vector3;
|
|
|
+ private _currentPlugin;
|
|
|
+ constructor(plugin?: IPhysicsEnginePlugin);
|
|
|
+ _initialize(gravity?: Vector3): void;
|
|
|
+ _runOneStep(delta: number): void;
|
|
|
+ _setGravity(gravity: Vector3): void;
|
|
|
+ _getGravity(): Vector3;
|
|
|
+ _registerMesh(mesh: AbstractMesh, impostor: number, options: PhysicsBodyCreationOptions): any;
|
|
|
+ _registerMeshesAsCompound(parts: PhysicsCompoundBodyPart[], options: PhysicsBodyCreationOptions): any;
|
|
|
+ _unregisterMesh(mesh: AbstractMesh): void;
|
|
|
+ _applyImpulse(mesh: AbstractMesh, force: Vector3, contactPoint: Vector3): void;
|
|
|
+ _createLink(mesh1: AbstractMesh, mesh2: AbstractMesh, pivot1: Vector3, pivot2: Vector3, options?: any): boolean;
|
|
|
+ _updateBodyPosition(mesh: AbstractMesh): void;
|
|
|
+ dispose(): void;
|
|
|
+ isSupported(): boolean;
|
|
|
+ getPhysicsBodyOfMesh(mesh: AbstractMesh): any;
|
|
|
+ getPhysicsPluginName(): string;
|
|
|
+ static NoImpostor: number;
|
|
|
+ static SphereImpostor: number;
|
|
|
+ static BoxImpostor: number;
|
|
|
+ static PlaneImpostor: number;
|
|
|
+ static MeshImpostor: number;
|
|
|
+ static CapsuleImpostor: number;
|
|
|
+ static ConeImpostor: number;
|
|
|
+ static CylinderImpostor: number;
|
|
|
+ static ConvexHullImpostor: number;
|
|
|
+ static HeightmapImpostor: number;
|
|
|
+ static Epsilon: number;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class Particle {
|
|
|
position: Vector3;
|
|
|
direction: Vector3;
|
|
@@ -4876,61 +4935,23 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- interface IPhysicsEnginePlugin {
|
|
|
+ class ReflectionProbe {
|
|
|
name: string;
|
|
|
- initialize(iterations?: number): any;
|
|
|
- setGravity(gravity: Vector3): void;
|
|
|
- getGravity(): Vector3;
|
|
|
- runOneStep(delta: number): void;
|
|
|
- registerMesh(mesh: AbstractMesh, impostor: number, options: PhysicsBodyCreationOptions): any;
|
|
|
- registerMeshesAsCompound(parts: PhysicsCompoundBodyPart[], options: PhysicsBodyCreationOptions): any;
|
|
|
- unregisterMesh(mesh: AbstractMesh): any;
|
|
|
- applyImpulse(mesh: AbstractMesh, force: Vector3, contactPoint: Vector3): void;
|
|
|
- createLink(mesh1: AbstractMesh, mesh2: AbstractMesh, pivot1: Vector3, pivot2: Vector3, options?: any): boolean;
|
|
|
- dispose(): void;
|
|
|
- isSupported(): boolean;
|
|
|
- updateBodyPosition(mesh: AbstractMesh): void;
|
|
|
- getWorldObject(): any;
|
|
|
- getPhysicsBodyOfMesh(mesh: AbstractMesh): any;
|
|
|
- }
|
|
|
- interface PhysicsBodyCreationOptions {
|
|
|
- mass: number;
|
|
|
- friction: number;
|
|
|
- restitution: number;
|
|
|
- }
|
|
|
- interface PhysicsCompoundBodyPart {
|
|
|
- mesh: Mesh;
|
|
|
- impostor: number;
|
|
|
- }
|
|
|
- class PhysicsEngine {
|
|
|
- gravity: Vector3;
|
|
|
- private _currentPlugin;
|
|
|
- constructor(plugin?: IPhysicsEnginePlugin);
|
|
|
- _initialize(gravity?: Vector3): void;
|
|
|
- _runOneStep(delta: number): void;
|
|
|
- _setGravity(gravity: Vector3): void;
|
|
|
- _getGravity(): Vector3;
|
|
|
- _registerMesh(mesh: AbstractMesh, impostor: number, options: PhysicsBodyCreationOptions): any;
|
|
|
- _registerMeshesAsCompound(parts: PhysicsCompoundBodyPart[], options: PhysicsBodyCreationOptions): any;
|
|
|
- _unregisterMesh(mesh: AbstractMesh): void;
|
|
|
- _applyImpulse(mesh: AbstractMesh, force: Vector3, contactPoint: Vector3): void;
|
|
|
- _createLink(mesh1: AbstractMesh, mesh2: AbstractMesh, pivot1: Vector3, pivot2: Vector3, options?: any): boolean;
|
|
|
- _updateBodyPosition(mesh: AbstractMesh): void;
|
|
|
+ private _scene;
|
|
|
+ private _renderTargetTexture;
|
|
|
+ private _projectionMatrix;
|
|
|
+ private _viewMatrix;
|
|
|
+ private _target;
|
|
|
+ private _add;
|
|
|
+ private _attachedMesh;
|
|
|
+ position: Vector3;
|
|
|
+ constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
|
|
|
+ refreshRate: number;
|
|
|
+ getScene(): Scene;
|
|
|
+ cubeTexture: RenderTargetTexture;
|
|
|
+ renderList: AbstractMesh[];
|
|
|
+ attachToMesh(mesh: AbstractMesh): void;
|
|
|
dispose(): void;
|
|
|
- isSupported(): boolean;
|
|
|
- getPhysicsBodyOfMesh(mesh: AbstractMesh): any;
|
|
|
- getPhysicsPluginName(): string;
|
|
|
- static NoImpostor: number;
|
|
|
- static SphereImpostor: number;
|
|
|
- static BoxImpostor: number;
|
|
|
- static PlaneImpostor: number;
|
|
|
- static MeshImpostor: number;
|
|
|
- static CapsuleImpostor: number;
|
|
|
- static ConeImpostor: number;
|
|
|
- static CylinderImpostor: number;
|
|
|
- static ConvexHullImpostor: number;
|
|
|
- static HeightmapImpostor: number;
|
|
|
- static Epsilon: number;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -5504,27 +5525,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;
|
|
|
- position: Vector3;
|
|
|
- constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
|
|
|
- refreshRate: number;
|
|
|
- getScene(): Scene;
|
|
|
- cubeTexture: RenderTargetTexture;
|
|
|
- renderList: AbstractMesh[];
|
|
|
- attachToMesh(mesh: AbstractMesh): void;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class BoundingBoxRenderer {
|
|
|
frontColor: Color3;
|
|
|
backColor: Color3;
|
|
@@ -6922,82 +6922,3 @@ declare module BABYLON {
|
|
|
dispose(): void;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class WoodProceduralTexture extends ProceduralTexture {
|
|
|
- private _ampScale;
|
|
|
- private _woodColor;
|
|
|
- constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
|
|
|
- updateShaderUniforms(): void;
|
|
|
- ampScale: number;
|
|
|
- woodColor: Color3;
|
|
|
- }
|
|
|
- class FireProceduralTexture extends ProceduralTexture {
|
|
|
- private _time;
|
|
|
- private _speed;
|
|
|
- private _autoGenerateTime;
|
|
|
- private _fireColors;
|
|
|
- private _alphaThreshold;
|
|
|
- constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
|
|
|
- updateShaderUniforms(): void;
|
|
|
- render(useCameraPostProcess?: boolean): void;
|
|
|
- static PurpleFireColors: Color3[];
|
|
|
- static GreenFireColors: Color3[];
|
|
|
- static RedFireColors: Color3[];
|
|
|
- static BlueFireColors: Color3[];
|
|
|
- fireColors: Color3[];
|
|
|
- time: number;
|
|
|
- speed: Vector2;
|
|
|
- alphaThreshold: number;
|
|
|
- }
|
|
|
- class CloudProceduralTexture extends ProceduralTexture {
|
|
|
- private _skyColor;
|
|
|
- private _cloudColor;
|
|
|
- constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
|
|
|
- updateShaderUniforms(): void;
|
|
|
- skyColor: Color4;
|
|
|
- cloudColor: Color4;
|
|
|
- }
|
|
|
- class GrassProceduralTexture extends ProceduralTexture {
|
|
|
- private _grassColors;
|
|
|
- private _herb1;
|
|
|
- private _herb2;
|
|
|
- private _herb3;
|
|
|
- private _groundColor;
|
|
|
- constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
|
|
|
- updateShaderUniforms(): void;
|
|
|
- grassColors: Color3[];
|
|
|
- groundColor: Color3;
|
|
|
- }
|
|
|
- class RoadProceduralTexture extends ProceduralTexture {
|
|
|
- private _roadColor;
|
|
|
- constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
|
|
|
- updateShaderUniforms(): void;
|
|
|
- roadColor: Color3;
|
|
|
- }
|
|
|
- class BrickProceduralTexture extends ProceduralTexture {
|
|
|
- private _numberOfBricksHeight;
|
|
|
- private _numberOfBricksWidth;
|
|
|
- private _jointColor;
|
|
|
- private _brickColor;
|
|
|
- constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
|
|
|
- updateShaderUniforms(): void;
|
|
|
- numberOfBricksHeight: number;
|
|
|
- numberOfBricksWidth: number;
|
|
|
- jointColor: Color3;
|
|
|
- brickColor: Color3;
|
|
|
- }
|
|
|
- class MarbleProceduralTexture extends ProceduralTexture {
|
|
|
- private _numberOfTilesHeight;
|
|
|
- private _numberOfTilesWidth;
|
|
|
- private _amplitude;
|
|
|
- private _marbleColor;
|
|
|
- private _jointColor;
|
|
|
- constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
|
|
|
- updateShaderUniforms(): void;
|
|
|
- numberOfTilesHeight: number;
|
|
|
- numberOfTilesWidth: number;
|
|
|
- jointColor: Color3;
|
|
|
- marbleColor: Color3;
|
|
|
- }
|
|
|
-}
|