|
@@ -1244,6 +1244,178 @@ 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, streaming
|
|
|
+ */
|
|
|
+ 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);
|
|
|
+ clone(): Sound;
|
|
|
+ getAudioBuffer(): AudioBuffer;
|
|
|
+ static Parse(parsedSound: any, scene: Scene, rootUrl: string, sourceSound?: Sound): Sound;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+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;
|
|
@@ -1436,185 +1608,13 @@ 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, streaming
|
|
|
- */
|
|
|
- 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);
|
|
|
- clone(): Sound;
|
|
|
- getAudioBuffer(): AudioBuffer;
|
|
|
- static Parse(parsedSound: any, scene: Scene, rootUrl: string, sourceSound?: Sound): Sound;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-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[];
|
|
|
animations: Animation[];
|
|
|
length: number;
|
|
|
private _skeleton;
|
|
|
- private _matrix;
|
|
|
+ _matrix: Matrix;
|
|
|
private _restPose;
|
|
|
private _baseMatrix;
|
|
|
private _worldTransform;
|
|
@@ -1629,9 +1629,9 @@ declare module BABYLON {
|
|
|
returnToRest(): void;
|
|
|
getWorldMatrix(): Matrix;
|
|
|
getInvertedAbsoluteTransform(): Matrix;
|
|
|
- getAbsoluteMatrix(): Matrix;
|
|
|
+ getAbsoluteTransform(): Matrix;
|
|
|
updateMatrix(matrix: Matrix): void;
|
|
|
- private _updateDifferenceMatrix();
|
|
|
+ _updateDifferenceMatrix(rootMatrix?: Matrix): void;
|
|
|
markAsDirty(): void;
|
|
|
copyAnimationRange(source: Bone, rangeName: string, frameOffset: number, rescaleAsRequired?: boolean): boolean;
|
|
|
}
|
|
@@ -1642,14 +1642,16 @@ declare module BABYLON {
|
|
|
name: string;
|
|
|
id: string;
|
|
|
bones: Bone[];
|
|
|
+ needInitialSkinMatrix: boolean;
|
|
|
private _scene;
|
|
|
private _isDirty;
|
|
|
private _transformMatrices;
|
|
|
+ private _meshesWithPoseMatrix;
|
|
|
private _animatables;
|
|
|
private _identity;
|
|
|
private _ranges;
|
|
|
constructor(name: string, id: string, scene: Scene);
|
|
|
- getTransformMatrices(): Float32Array;
|
|
|
+ getTransformMatrices(mesh: AbstractMesh): Float32Array;
|
|
|
getScene(): Scene;
|
|
|
createAnimationRange(name: string, from: number, to: number): void;
|
|
|
deleteAnimationRange(name: string, deleteFrames?: boolean): void;
|
|
@@ -1662,6 +1664,9 @@ declare module BABYLON {
|
|
|
private _getHighestAnimationFrame();
|
|
|
beginAnimation(name: string, loop?: boolean, speedRatio?: number, onAnimationEnd?: () => void): void;
|
|
|
_markAsDirty(): void;
|
|
|
+ _registerMeshWithPoseMatrix(mesh: AbstractMesh): void;
|
|
|
+ _unregisterMeshWithPoseMatrix(mesh: AbstractMesh): void;
|
|
|
+ _computeTransformMatrices(targetMatrix: Float32Array, initialSkinMatrix: Matrix): void;
|
|
|
prepare(): void;
|
|
|
getAnimatables(): IAnimatable[];
|
|
|
clone(name: string, id: string): Skeleton;
|
|
@@ -1913,6 +1918,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 ArcRotateCamera extends TargetCamera {
|
|
|
alpha: number;
|
|
|
beta: number;
|
|
@@ -2314,66 +2379,6 @@ 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 DebugLayer {
|
|
|
private _scene;
|
|
|
private _camera;
|
|
@@ -2497,6 +2502,38 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ interface ISceneLoaderPlugin {
|
|
|
+ extensions: string;
|
|
|
+ importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
|
|
|
+ load: (scene: Scene, data: string, rootUrl: string) => boolean;
|
|
|
+ }
|
|
|
+ class SceneLoader {
|
|
|
+ private static _ForceFullSceneLoadingForIncremental;
|
|
|
+ private static _ShowLoadingScreen;
|
|
|
+ static ForceFullSceneLoadingForIncremental: boolean;
|
|
|
+ static ShowLoadingScreen: boolean;
|
|
|
+ private static _registeredPlugins;
|
|
|
+ private static _getPluginForFilename(sceneFilename);
|
|
|
+ static RegisterPlugin(plugin: ISceneLoaderPlugin): void;
|
|
|
+ static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, e: any) => void): void;
|
|
|
+ /**
|
|
|
+ * Load a scene
|
|
|
+ * @param rootUrl a string that defines the root url for scene and resources
|
|
|
+ * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
+ * @param engine is the instance of BABYLON.Engine to use to create the scene
|
|
|
+ */
|
|
|
+ static Load(rootUrl: string, sceneFilename: any, engine: Engine, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
|
|
|
+ /**
|
|
|
+ * Append a scene
|
|
|
+ * @param rootUrl a string that defines the root url for scene and resources
|
|
|
+ * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
+ * @param scene is the instance of BABYLON.Scene to append to
|
|
|
+ */
|
|
|
+ static Append(rootUrl: string, sceneFilename: any, scene: Scene, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class DirectionalLight extends Light implements IShadowLight {
|
|
|
direction: Vector3;
|
|
|
position: Vector3;
|
|
@@ -2623,38 +2660,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- interface ISceneLoaderPlugin {
|
|
|
- extensions: string;
|
|
|
- importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
|
|
|
- load: (scene: Scene, data: string, rootUrl: string) => boolean;
|
|
|
- }
|
|
|
- class SceneLoader {
|
|
|
- private static _ForceFullSceneLoadingForIncremental;
|
|
|
- private static _ShowLoadingScreen;
|
|
|
- static ForceFullSceneLoadingForIncremental: boolean;
|
|
|
- static ShowLoadingScreen: boolean;
|
|
|
- private static _registeredPlugins;
|
|
|
- private static _getPluginForFilename(sceneFilename);
|
|
|
- static RegisterPlugin(plugin: ISceneLoaderPlugin): void;
|
|
|
- static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, e: any) => void): void;
|
|
|
- /**
|
|
|
- * Load a scene
|
|
|
- * @param rootUrl a string that defines the root url for scene and resources
|
|
|
- * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
- * @param engine is the instance of BABYLON.Engine to use to create the scene
|
|
|
- */
|
|
|
- static Load(rootUrl: string, sceneFilename: any, engine: Engine, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
|
|
|
- /**
|
|
|
- * Append a scene
|
|
|
- * @param rootUrl a string that defines the root url for scene and resources
|
|
|
- * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
- * @param scene is the instance of BABYLON.Scene to append to
|
|
|
- */
|
|
|
- static Append(rootUrl: string, sceneFilename: any, scene: Scene, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class EffectFallbacks {
|
|
|
private _defines;
|
|
|
private _currentRank;
|
|
@@ -3497,7 +3502,6 @@ declare module BABYLON {
|
|
|
showSubMeshesBoundingBox: boolean;
|
|
|
onDispose: any;
|
|
|
isBlocker: boolean;
|
|
|
- skeleton: Skeleton;
|
|
|
renderingGroupId: number;
|
|
|
material: Material;
|
|
|
receiveShadows: boolean;
|
|
@@ -3557,9 +3561,15 @@ declare module BABYLON {
|
|
|
private _onAfterWorldMatrixUpdate;
|
|
|
private _isWorldMatrixFrozen;
|
|
|
_unIndexed: boolean;
|
|
|
+ _poseMatrix: Matrix;
|
|
|
_waitingActions: any;
|
|
|
_waitingFreezeWorldMatrix: boolean;
|
|
|
+ private _skeleton;
|
|
|
+ _bonesTransformMatrices: Float32Array;
|
|
|
+ skeleton: Skeleton;
|
|
|
constructor(name: string, scene: Scene);
|
|
|
+ updatePoseMatrix(matrix: Matrix): void;
|
|
|
+ getPoseMatrix(): Matrix;
|
|
|
disableEdgesRendering(): void;
|
|
|
enableEdgesRendering(epsilon?: number, checkVerticesInsteadOfIndices?: boolean): void;
|
|
|
isBlocked: boolean;
|
|
@@ -4810,6 +4820,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;
|
|
@@ -5138,61 +5207,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;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -5766,27 +5797,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;
|
|
@@ -6625,38 +6635,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class VRDeviceOrientationFreeCamera extends FreeCamera {
|
|
|
- _alpha: number;
|
|
|
- _beta: number;
|
|
|
- _gamma: number;
|
|
|
- private _offsetOrientation;
|
|
|
- private _deviceOrientationHandler;
|
|
|
- constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean);
|
|
|
- _onOrientationEvent(evt: DeviceOrientationEvent): void;
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
- detachControl(element: HTMLElement): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare var HMDVRDevice: any;
|
|
|
-declare var PositionSensorVRDevice: any;
|
|
|
-declare module BABYLON {
|
|
|
- class WebVRFreeCamera extends FreeCamera {
|
|
|
- _hmdDevice: any;
|
|
|
- _sensorDevice: any;
|
|
|
- _cacheState: any;
|
|
|
- _cacheQuaternion: Quaternion;
|
|
|
- _cacheRotation: Vector3;
|
|
|
- _vrEnabled: boolean;
|
|
|
- constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean);
|
|
|
- private _getWebVRDevices(devices);
|
|
|
- _checkInputs(): void;
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
- detachControl(element: HTMLElement): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
interface IOctreeContainer<T> {
|
|
|
blocks: Array<OctreeBlock<T>>;
|
|
|
}
|
|
@@ -6704,6 +6682,41 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class VRDeviceOrientationFreeCamera extends FreeCamera {
|
|
|
+ _alpha: number;
|
|
|
+ _beta: number;
|
|
|
+ _gamma: number;
|
|
|
+ private _offsetOrientation;
|
|
|
+ private _deviceOrientationHandler;
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean);
|
|
|
+ _onOrientationEvent(evt: DeviceOrientationEvent): void;
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ detachControl(element: HTMLElement): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare var HMDVRDevice: any;
|
|
|
+declare var PositionSensorVRDevice: any;
|
|
|
+declare module BABYLON {
|
|
|
+ class WebVRFreeCamera extends FreeCamera {
|
|
|
+ _hmdDevice: any;
|
|
|
+ _sensorDevice: any;
|
|
|
+ _cacheState: any;
|
|
|
+ _cacheQuaternion: Quaternion;
|
|
|
+ _cacheRotation: Vector3;
|
|
|
+ _vrEnabled: boolean;
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean);
|
|
|
+ private _getWebVRDevices(devices);
|
|
|
+ _checkInputs(): void;
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ detachControl(element: HTMLElement): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON.Internals {
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class ShadowGenerator {
|
|
|
private static _FILTER_NONE;
|
|
|
private static _FILTER_VARIANCESHADOWMAP;
|
|
@@ -6761,9 +6774,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-declare module BABYLON.Internals {
|
|
|
-}
|
|
|
-
|
|
|
declare module BABYLON {
|
|
|
class BaseTexture {
|
|
|
name: string;
|