|
@@ -2420,188 +2420,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;
|
|
|
- unlocked: boolean;
|
|
|
- onAudioUnlocked: () => any;
|
|
|
- isMP3supported: boolean;
|
|
|
- isOGGsupported: boolean;
|
|
|
- readonly audioContext: AudioContext;
|
|
|
- constructor();
|
|
|
- private _unlockiOSaudio();
|
|
|
- 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;
|
|
|
- private _urlType;
|
|
|
- /**
|
|
|
- * 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;
|
|
|
- isReady(): boolean;
|
|
|
- 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.
|
|
|
- * @param offset (optional) Start the sound setting it at a specific time
|
|
|
- */
|
|
|
- play(time?: number, offset?: 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;
|
|
|
- detachFromMesh(): void;
|
|
|
- private _onRegisterAfterWorldMatrixUpdate(connectedMesh);
|
|
|
- clone(): Sound;
|
|
|
- getAudioBuffer(): AudioBuffer;
|
|
|
- serialize(): any;
|
|
|
- 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;
|
|
@@ -2822,13 +2640,195 @@ declare module BABYLON {
|
|
|
class SineEase extends EasingFunction implements IEasingFunction {
|
|
|
easeInCore(gradient: number): number;
|
|
|
}
|
|
|
- class BezierCurveEase extends EasingFunction implements IEasingFunction {
|
|
|
- x1: number;
|
|
|
- y1: number;
|
|
|
- x2: number;
|
|
|
- y2: number;
|
|
|
- constructor(x1?: number, y1?: number, x2?: number, y2?: number);
|
|
|
- easeInCore(gradient: number): number;
|
|
|
+ class BezierCurveEase extends EasingFunction implements IEasingFunction {
|
|
|
+ x1: number;
|
|
|
+ y1: number;
|
|
|
+ x2: number;
|
|
|
+ y2: number;
|
|
|
+ constructor(x1?: number, y1?: number, x2?: number, y2?: number);
|
|
|
+ easeInCore(gradient: number): number;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+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;
|
|
|
+ unlocked: boolean;
|
|
|
+ onAudioUnlocked: () => any;
|
|
|
+ isMP3supported: boolean;
|
|
|
+ isOGGsupported: boolean;
|
|
|
+ readonly audioContext: AudioContext;
|
|
|
+ constructor();
|
|
|
+ private _unlockiOSaudio();
|
|
|
+ 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;
|
|
|
+ private _urlType;
|
|
|
+ /**
|
|
|
+ * 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;
|
|
|
+ isReady(): boolean;
|
|
|
+ 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.
|
|
|
+ * @param offset (optional) Start the sound setting it at a specific time
|
|
|
+ */
|
|
|
+ play(time?: number, offset?: 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;
|
|
|
+ detachFromMesh(): void;
|
|
|
+ private _onRegisterAfterWorldMatrixUpdate(connectedMesh);
|
|
|
+ clone(): Sound;
|
|
|
+ getAudioBuffer(): AudioBuffer;
|
|
|
+ serialize(): any;
|
|
|
+ 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;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -3695,6 +3695,7 @@ declare module BABYLON {
|
|
|
_rigCameras: Camera[];
|
|
|
_rigPostProcess: PostProcess;
|
|
|
protected _webvrViewMatrix: Matrix;
|
|
|
+ customRenderTargets: RenderTargetTexture[];
|
|
|
private _computedViewMatrix;
|
|
|
_projectionMatrix: Matrix;
|
|
|
private _doNotComputeProjectionMatrix;
|
|
@@ -4127,120 +4128,6 @@ declare module BABYLON.Debug {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class BoundingBox implements ICullable {
|
|
|
- minimum: Vector3;
|
|
|
- maximum: Vector3;
|
|
|
- vectors: Vector3[];
|
|
|
- center: Vector3;
|
|
|
- centerWorld: Vector3;
|
|
|
- extendSize: Vector3;
|
|
|
- extendSizeWorld: Vector3;
|
|
|
- directions: Vector3[];
|
|
|
- vectorsWorld: Vector3[];
|
|
|
- minimumWorld: Vector3;
|
|
|
- maximumWorld: Vector3;
|
|
|
- private _worldMatrix;
|
|
|
- constructor(minimum: Vector3, maximum: Vector3);
|
|
|
- getWorldMatrix(): Matrix;
|
|
|
- setWorldMatrix(matrix: Matrix): BoundingBox;
|
|
|
- _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 {
|
|
|
- interface ICullable {
|
|
|
- isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
- isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
- }
|
|
|
- class BoundingInfo implements ICullable {
|
|
|
- minimum: Vector3;
|
|
|
- maximum: Vector3;
|
|
|
- boundingBox: BoundingBox;
|
|
|
- boundingSphere: BoundingSphere;
|
|
|
- private _isLocked;
|
|
|
- constructor(minimum: Vector3, maximum: Vector3);
|
|
|
- isLocked: boolean;
|
|
|
- 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 Ray {
|
|
|
- origin: Vector3;
|
|
|
- direction: Vector3;
|
|
|
- length: number;
|
|
|
- private _edge1;
|
|
|
- private _edge2;
|
|
|
- private _pvec;
|
|
|
- private _tvec;
|
|
|
- private _qvec;
|
|
|
- private _tmpRay;
|
|
|
- private _rayHelper;
|
|
|
- constructor(origin: Vector3, direction: Vector3, length?: number);
|
|
|
- intersectsBoxMinMax(minimum: Vector3, maximum: Vector3): boolean;
|
|
|
- intersectsBox(box: BoundingBox): boolean;
|
|
|
- intersectsSphere(sphere: BoundingSphere): boolean;
|
|
|
- intersectsTriangle(vertex0: Vector3, vertex1: Vector3, vertex2: Vector3): IntersectionInfo;
|
|
|
- intersectsPlane(plane: Plane): number;
|
|
|
- intersectsMesh(mesh: AbstractMesh, fastCheck?: boolean): PickingInfo;
|
|
|
- intersectsMeshes(meshes: Array<AbstractMesh>, fastCheck?: boolean, results?: Array<PickingInfo>): Array<PickingInfo>;
|
|
|
- private _comparePickingInfo(pickingInfoA, pickingInfoB);
|
|
|
- private static smallnum;
|
|
|
- private static rayl;
|
|
|
- /**
|
|
|
- * Intersection test between the ray and a given segment whithin a given tolerance (threshold)
|
|
|
- * @param sega the first point of the segment to test the intersection against
|
|
|
- * @param segb the second point of the segment to test the intersection against
|
|
|
- * @param threshold the tolerance margin, if the ray doesn't intersect the segment but is close to the given threshold, the intersection is successful
|
|
|
- * @return the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection
|
|
|
- */
|
|
|
- intersectionSegment(sega: Vector3, segb: Vector3, threshold: number): number;
|
|
|
- static CreateNew(x: number, y: number, viewportWidth: number, viewportHeight: number, world: Matrix, view: Matrix, projection: Matrix): Ray;
|
|
|
- /**
|
|
|
- * Function will create a new transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be
|
|
|
- * transformed to the given world matrix.
|
|
|
- * @param origin The origin point
|
|
|
- * @param end The end point
|
|
|
- * @param world a matrix to transform the ray to. Default is the identity matrix.
|
|
|
- */
|
|
|
- static CreateNewFromTo(origin: Vector3, end: Vector3, world?: Matrix): Ray;
|
|
|
- static Transform(ray: Ray, matrix: Matrix): Ray;
|
|
|
- static TransformToRef(ray: Ray, matrix: Matrix, result: Ray): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
/**
|
|
|
* Highlight layer options. This helps customizing the behaviour
|
|
|
* of the highlight layer.
|
|
@@ -4454,45 +4341,159 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class Layer {
|
|
|
- name: string;
|
|
|
- texture: Texture;
|
|
|
- isBackground: boolean;
|
|
|
- color: Color4;
|
|
|
- scale: Vector2;
|
|
|
- offset: Vector2;
|
|
|
- alphaBlendingMode: number;
|
|
|
- alphaTest: boolean;
|
|
|
- layerMask: number;
|
|
|
- private _scene;
|
|
|
- private _vertexBuffers;
|
|
|
- private _indexBuffer;
|
|
|
- private _effect;
|
|
|
- private _alphaTestEffect;
|
|
|
- /**
|
|
|
- * An event triggered when the layer is disposed.
|
|
|
- * @type {BABYLON.Observable}
|
|
|
- */
|
|
|
- onDisposeObservable: Observable<Layer>;
|
|
|
- private _onDisposeObserver;
|
|
|
- onDispose: () => void;
|
|
|
+ class Layer {
|
|
|
+ name: string;
|
|
|
+ texture: Texture;
|
|
|
+ isBackground: boolean;
|
|
|
+ color: Color4;
|
|
|
+ scale: Vector2;
|
|
|
+ offset: Vector2;
|
|
|
+ alphaBlendingMode: number;
|
|
|
+ alphaTest: boolean;
|
|
|
+ layerMask: number;
|
|
|
+ private _scene;
|
|
|
+ private _vertexBuffers;
|
|
|
+ private _indexBuffer;
|
|
|
+ private _effect;
|
|
|
+ private _alphaTestEffect;
|
|
|
+ /**
|
|
|
+ * An event triggered when the layer is disposed.
|
|
|
+ * @type {BABYLON.Observable}
|
|
|
+ */
|
|
|
+ onDisposeObservable: Observable<Layer>;
|
|
|
+ private _onDisposeObserver;
|
|
|
+ onDispose: () => void;
|
|
|
+ /**
|
|
|
+ * An event triggered before rendering the scene
|
|
|
+ * @type {BABYLON.Observable}
|
|
|
+ */
|
|
|
+ onBeforeRenderObservable: Observable<Layer>;
|
|
|
+ private _onBeforeRenderObserver;
|
|
|
+ onBeforeRender: () => void;
|
|
|
+ /**
|
|
|
+ * An event triggered after rendering the scene
|
|
|
+ * @type {BABYLON.Observable}
|
|
|
+ */
|
|
|
+ onAfterRenderObservable: Observable<Layer>;
|
|
|
+ private _onAfterRenderObserver;
|
|
|
+ onAfterRender: () => void;
|
|
|
+ constructor(name: string, imgUrl: string, scene: Scene, isBackground?: boolean, color?: Color4);
|
|
|
+ render(): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class BoundingBox implements ICullable {
|
|
|
+ minimum: Vector3;
|
|
|
+ maximum: Vector3;
|
|
|
+ vectors: Vector3[];
|
|
|
+ center: Vector3;
|
|
|
+ centerWorld: Vector3;
|
|
|
+ extendSize: Vector3;
|
|
|
+ extendSizeWorld: Vector3;
|
|
|
+ directions: Vector3[];
|
|
|
+ vectorsWorld: Vector3[];
|
|
|
+ minimumWorld: Vector3;
|
|
|
+ maximumWorld: Vector3;
|
|
|
+ private _worldMatrix;
|
|
|
+ constructor(minimum: Vector3, maximum: Vector3);
|
|
|
+ getWorldMatrix(): Matrix;
|
|
|
+ setWorldMatrix(matrix: Matrix): BoundingBox;
|
|
|
+ _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 {
|
|
|
+ interface ICullable {
|
|
|
+ isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ }
|
|
|
+ class BoundingInfo implements ICullable {
|
|
|
+ minimum: Vector3;
|
|
|
+ maximum: Vector3;
|
|
|
+ boundingBox: BoundingBox;
|
|
|
+ boundingSphere: BoundingSphere;
|
|
|
+ private _isLocked;
|
|
|
+ constructor(minimum: Vector3, maximum: Vector3);
|
|
|
+ isLocked: boolean;
|
|
|
+ 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 Ray {
|
|
|
+ origin: Vector3;
|
|
|
+ direction: Vector3;
|
|
|
+ length: number;
|
|
|
+ private _edge1;
|
|
|
+ private _edge2;
|
|
|
+ private _pvec;
|
|
|
+ private _tvec;
|
|
|
+ private _qvec;
|
|
|
+ private _tmpRay;
|
|
|
+ private _rayHelper;
|
|
|
+ constructor(origin: Vector3, direction: Vector3, length?: number);
|
|
|
+ intersectsBoxMinMax(minimum: Vector3, maximum: Vector3): boolean;
|
|
|
+ intersectsBox(box: BoundingBox): boolean;
|
|
|
+ intersectsSphere(sphere: BoundingSphere): boolean;
|
|
|
+ intersectsTriangle(vertex0: Vector3, vertex1: Vector3, vertex2: Vector3): IntersectionInfo;
|
|
|
+ intersectsPlane(plane: Plane): number;
|
|
|
+ intersectsMesh(mesh: AbstractMesh, fastCheck?: boolean): PickingInfo;
|
|
|
+ intersectsMeshes(meshes: Array<AbstractMesh>, fastCheck?: boolean, results?: Array<PickingInfo>): Array<PickingInfo>;
|
|
|
+ private _comparePickingInfo(pickingInfoA, pickingInfoB);
|
|
|
+ private static smallnum;
|
|
|
+ private static rayl;
|
|
|
/**
|
|
|
- * An event triggered before rendering the scene
|
|
|
- * @type {BABYLON.Observable}
|
|
|
- */
|
|
|
- onBeforeRenderObservable: Observable<Layer>;
|
|
|
- private _onBeforeRenderObserver;
|
|
|
- onBeforeRender: () => void;
|
|
|
+ * Intersection test between the ray and a given segment whithin a given tolerance (threshold)
|
|
|
+ * @param sega the first point of the segment to test the intersection against
|
|
|
+ * @param segb the second point of the segment to test the intersection against
|
|
|
+ * @param threshold the tolerance margin, if the ray doesn't intersect the segment but is close to the given threshold, the intersection is successful
|
|
|
+ * @return the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection
|
|
|
+ */
|
|
|
+ intersectionSegment(sega: Vector3, segb: Vector3, threshold: number): number;
|
|
|
+ static CreateNew(x: number, y: number, viewportWidth: number, viewportHeight: number, world: Matrix, view: Matrix, projection: Matrix): Ray;
|
|
|
/**
|
|
|
- * An event triggered after rendering the scene
|
|
|
- * @type {BABYLON.Observable}
|
|
|
+ * Function will create a new transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be
|
|
|
+ * transformed to the given world matrix.
|
|
|
+ * @param origin The origin point
|
|
|
+ * @param end The end point
|
|
|
+ * @param world a matrix to transform the ray to. Default is the identity matrix.
|
|
|
*/
|
|
|
- onAfterRenderObservable: Observable<Layer>;
|
|
|
- private _onAfterRenderObserver;
|
|
|
- onAfterRender: () => void;
|
|
|
- constructor(name: string, imgUrl: string, scene: Scene, isBackground?: boolean, color?: Color4);
|
|
|
- render(): void;
|
|
|
- dispose(): void;
|
|
|
+ static CreateNewFromTo(origin: Vector3, end: Vector3, world?: Matrix): Ray;
|
|
|
+ static Transform(ray: Ray, matrix: Matrix): Ray;
|
|
|
+ static TransformToRef(ray: Ray, matrix: Matrix, result: Ray): void;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -4542,61 +4543,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- interface ISceneLoaderPluginExtensions {
|
|
|
- [extension: string]: {
|
|
|
- isBinary: boolean;
|
|
|
- };
|
|
|
- }
|
|
|
- interface ISceneLoaderPlugin {
|
|
|
- extensions: string | ISceneLoaderPluginExtensions;
|
|
|
- importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
|
|
|
- load: (scene: Scene, data: string, rootUrl: string) => boolean;
|
|
|
- canDirectLoad?: (data: string) => boolean;
|
|
|
- }
|
|
|
- interface ISceneLoaderPluginAsync {
|
|
|
- extensions: string | ISceneLoaderPluginExtensions;
|
|
|
- importMeshAsync: (meshesNames: any, scene: Scene, data: any, rootUrl: string, onsuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onerror: () => void) => void;
|
|
|
- loadAsync: (scene: Scene, data: string, rootUrl: string, onsuccess: () => void, onerror: () => void) => void;
|
|
|
- canDirectLoad?: (data: string) => boolean;
|
|
|
- }
|
|
|
- class SceneLoader {
|
|
|
- private static _ForceFullSceneLoadingForIncremental;
|
|
|
- private static _ShowLoadingScreen;
|
|
|
- static readonly NO_LOGGING: number;
|
|
|
- static readonly MINIMAL_LOGGING: number;
|
|
|
- static readonly SUMMARY_LOGGING: number;
|
|
|
- static readonly DETAILED_LOGGING: number;
|
|
|
- private static _loggingLevel;
|
|
|
- static ForceFullSceneLoadingForIncremental: boolean;
|
|
|
- static ShowLoadingScreen: boolean;
|
|
|
- static loggingLevel: number;
|
|
|
- private static _registeredPlugins;
|
|
|
- private static _getDefaultPlugin();
|
|
|
- private static _getPluginForExtension(extension);
|
|
|
- private static _getPluginForDirectLoad(data);
|
|
|
- private static _getPluginForFilename(sceneFilename);
|
|
|
- private static _getDirectLoad(sceneFilename);
|
|
|
- static GetPluginForExtension(extension: string): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
|
|
|
- static RegisterPlugin(plugin: ISceneLoaderPlugin | ISceneLoaderPluginAsync): void;
|
|
|
- static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, message: string, exception?: 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 ShadowLight {
|
|
|
private _shadowFrustumSize;
|
|
|
/**
|
|
@@ -5130,6 +5076,61 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ interface ISceneLoaderPluginExtensions {
|
|
|
+ [extension: string]: {
|
|
|
+ isBinary: boolean;
|
|
|
+ };
|
|
|
+ }
|
|
|
+ interface ISceneLoaderPlugin {
|
|
|
+ extensions: string | ISceneLoaderPluginExtensions;
|
|
|
+ importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
|
|
|
+ load: (scene: Scene, data: string, rootUrl: string) => boolean;
|
|
|
+ canDirectLoad?: (data: string) => boolean;
|
|
|
+ }
|
|
|
+ interface ISceneLoaderPluginAsync {
|
|
|
+ extensions: string | ISceneLoaderPluginExtensions;
|
|
|
+ importMeshAsync: (meshesNames: any, scene: Scene, data: any, rootUrl: string, onsuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onerror: () => void) => void;
|
|
|
+ loadAsync: (scene: Scene, data: string, rootUrl: string, onsuccess: () => void, onerror: () => void) => void;
|
|
|
+ canDirectLoad?: (data: string) => boolean;
|
|
|
+ }
|
|
|
+ class SceneLoader {
|
|
|
+ private static _ForceFullSceneLoadingForIncremental;
|
|
|
+ private static _ShowLoadingScreen;
|
|
|
+ static readonly NO_LOGGING: number;
|
|
|
+ static readonly MINIMAL_LOGGING: number;
|
|
|
+ static readonly SUMMARY_LOGGING: number;
|
|
|
+ static readonly DETAILED_LOGGING: number;
|
|
|
+ private static _loggingLevel;
|
|
|
+ static ForceFullSceneLoadingForIncremental: boolean;
|
|
|
+ static ShowLoadingScreen: boolean;
|
|
|
+ static loggingLevel: number;
|
|
|
+ private static _registeredPlugins;
|
|
|
+ private static _getDefaultPlugin();
|
|
|
+ private static _getPluginForExtension(extension);
|
|
|
+ private static _getPluginForDirectLoad(data);
|
|
|
+ private static _getPluginForFilename(sceneFilename);
|
|
|
+ private static _getDirectLoad(sceneFilename);
|
|
|
+ static GetPluginForExtension(extension: string): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
|
|
|
+ static RegisterPlugin(plugin: ISceneLoaderPlugin | ISceneLoaderPluginAsync): void;
|
|
|
+ static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, message: string, exception?: 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 SIMDHelper {
|
|
|
private static _isEnabled;
|
|
|
static readonly IsEnabled: boolean;
|
|
@@ -12469,6 +12470,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 AnaglyphPostProcess extends PostProcess {
|
|
|
private _passedProcess;
|
|
|
constructor(name: string, options: number | PostProcessOptions, rigCameras: Camera[], samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
@@ -12873,29 +12897,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 BoundingBoxRenderer {
|
|
|
frontColor: Color3;
|
|
|
backColor: Color3;
|
|
@@ -15042,9 +15043,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-declare module BABYLON.Internals {
|
|
|
-}
|
|
|
-
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
* Interface to implement to create a shadow generator compatible with BJS.
|
|
@@ -15201,6 +15199,9 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+declare module BABYLON.Internals {
|
|
|
+}
|
|
|
+
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
* The Physically based material base class of BJS.
|