|
@@ -2110,6 +2110,185 @@ 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: Nullable<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 _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?: Nullable<() => 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(node);
|
|
|
+ clone(): Nullable<Sound>;
|
|
|
+ getAudioBuffer(): AudioBuffer | null;
|
|
|
+ serialize(): any;
|
|
|
+ static Parse(parsedSound: any, scene: Scene, rootUrl: string, sourceSound?: Sound): Sound;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class SoundTrack {
|
|
|
+ private _outputAudioNode;
|
|
|
+ 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;
|
|
@@ -2572,232 +2751,53 @@ declare module BABYLON {
|
|
|
readonly currentValue: any;
|
|
|
/**
|
|
|
* Gets the path where to store the animated value in the target
|
|
|
- */
|
|
|
- readonly targetPath: string;
|
|
|
- /**
|
|
|
- * Gets the actual target of the runtime animation
|
|
|
- */
|
|
|
- readonly target: any;
|
|
|
- /**
|
|
|
- * Create a new RuntimeAnimation object
|
|
|
- * @param target defines the target of the animation
|
|
|
- * @param animation defines the source {BABYLON.Animation} object
|
|
|
- * @param scene defines the hosting scene
|
|
|
- * @param host defines the initiating Animatable
|
|
|
- */
|
|
|
- constructor(target: any, animation: Animation, scene: Scene, host: Animatable);
|
|
|
- readonly animation: Animation;
|
|
|
- reset(): void;
|
|
|
- isStopped(): boolean;
|
|
|
- dispose(): void;
|
|
|
- private _getKeyValue(value);
|
|
|
- private _interpolate(currentFrame, repeatCount, loopMode?, offsetValue?, highLimitValue?);
|
|
|
- /**
|
|
|
- * Affect the interpolated value to the target
|
|
|
- * @param currentValue defines the value computed by the animation
|
|
|
- * @param weight defines the weight to apply to this value
|
|
|
- */
|
|
|
- setValue(currentValue: any, weight?: number): void;
|
|
|
- private _getCorrectLoopMode();
|
|
|
- /**
|
|
|
- * Move the current animation to a given frame
|
|
|
- * @param frame defines the frame to move to
|
|
|
- */
|
|
|
- goToFrame(frame: number): void;
|
|
|
- _prepareForSpeedRatioChange(newSpeedRatio: number): void;
|
|
|
- private _ratioOffset;
|
|
|
- private _previousDelay;
|
|
|
- private _previousRatio;
|
|
|
- /**
|
|
|
- * Execute the current animation
|
|
|
- * @param delay defines the delay to add to the current frame
|
|
|
- * @param from defines the lower bound of the animation range
|
|
|
- * @param to defines the upper bound of the animation range
|
|
|
- * @param loop defines if the current animation must loop
|
|
|
- * @param speedRatio defines the current speed ratio
|
|
|
- * @param weight defines the weight of the animation (default is -1 so no weight)
|
|
|
- * @returns a boolean indicating if the animation has ended
|
|
|
- */
|
|
|
- animate(delay: number, from: number, to: number, loop: boolean, speedRatio: number, weight?: number): boolean;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-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: Nullable<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 _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?: Nullable<() => 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(node);
|
|
|
- clone(): Nullable<Sound>;
|
|
|
- getAudioBuffer(): AudioBuffer | null;
|
|
|
- serialize(): any;
|
|
|
- static Parse(parsedSound: any, scene: Scene, rootUrl: string, sourceSound?: Sound): Sound;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class SoundTrack {
|
|
|
- private _outputAudioNode;
|
|
|
- private _scene;
|
|
|
- id: number;
|
|
|
- soundCollection: Array<Sound>;
|
|
|
- private _isMainTrack;
|
|
|
- private _connectedAnalyser;
|
|
|
- private _options;
|
|
|
- private _isInitialized;
|
|
|
- constructor(scene: Scene, options?: any);
|
|
|
- private _initializeSoundTrackAudioGraph();
|
|
|
+ */
|
|
|
+ readonly targetPath: string;
|
|
|
+ /**
|
|
|
+ * Gets the actual target of the runtime animation
|
|
|
+ */
|
|
|
+ readonly target: any;
|
|
|
+ /**
|
|
|
+ * Create a new RuntimeAnimation object
|
|
|
+ * @param target defines the target of the animation
|
|
|
+ * @param animation defines the source {BABYLON.Animation} object
|
|
|
+ * @param scene defines the hosting scene
|
|
|
+ * @param host defines the initiating Animatable
|
|
|
+ */
|
|
|
+ constructor(target: any, animation: Animation, scene: Scene, host: Animatable);
|
|
|
+ readonly animation: Animation;
|
|
|
+ reset(): void;
|
|
|
+ isStopped(): boolean;
|
|
|
dispose(): void;
|
|
|
- AddSound(sound: Sound): void;
|
|
|
- RemoveSound(sound: Sound): void;
|
|
|
- setVolume(newVolume: number): void;
|
|
|
- switchPanningModelToHRTF(): void;
|
|
|
- switchPanningModelToEqualPower(): void;
|
|
|
- connectToAnalyser(analyser: Analyser): void;
|
|
|
+ private _getKeyValue(value);
|
|
|
+ private _interpolate(currentFrame, repeatCount, loopMode?, offsetValue?, highLimitValue?);
|
|
|
+ /**
|
|
|
+ * Affect the interpolated value to the target
|
|
|
+ * @param currentValue defines the value computed by the animation
|
|
|
+ * @param weight defines the weight to apply to this value
|
|
|
+ */
|
|
|
+ setValue(currentValue: any, weight?: number): void;
|
|
|
+ private _getCorrectLoopMode();
|
|
|
+ /**
|
|
|
+ * Move the current animation to a given frame
|
|
|
+ * @param frame defines the frame to move to
|
|
|
+ */
|
|
|
+ goToFrame(frame: number): void;
|
|
|
+ _prepareForSpeedRatioChange(newSpeedRatio: number): void;
|
|
|
+ private _ratioOffset;
|
|
|
+ private _previousDelay;
|
|
|
+ private _previousRatio;
|
|
|
+ /**
|
|
|
+ * Execute the current animation
|
|
|
+ * @param delay defines the delay to add to the current frame
|
|
|
+ * @param from defines the lower bound of the animation range
|
|
|
+ * @param to defines the upper bound of the animation range
|
|
|
+ * @param loop defines if the current animation must loop
|
|
|
+ * @param speedRatio defines the current speed ratio
|
|
|
+ * @param weight defines the weight of the animation (default is -1 so no weight)
|
|
|
+ * @returns a boolean indicating if the animation has ended
|
|
|
+ */
|
|
|
+ animate(delay: number, from: number, to: number, loop: boolean, speedRatio: number, weight?: number): boolean;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -24085,6 +24085,236 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class ArcRotateCameraGamepadInput implements ICameraInput<ArcRotateCamera> {
|
|
|
+ camera: ArcRotateCamera;
|
|
|
+ gamepad: Nullable<Gamepad>;
|
|
|
+ private _onGamepadConnectedObserver;
|
|
|
+ private _onGamepadDisconnectedObserver;
|
|
|
+ gamepadRotationSensibility: number;
|
|
|
+ gamepadMoveSensibility: number;
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ detachControl(element: Nullable<HTMLElement>): void;
|
|
|
+ checkInputs(): void;
|
|
|
+ getClassName(): string;
|
|
|
+ getSimpleName(): string;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class ArcRotateCameraKeyboardMoveInput implements ICameraInput<ArcRotateCamera> {
|
|
|
+ camera: ArcRotateCamera;
|
|
|
+ private _keys;
|
|
|
+ keysUp: number[];
|
|
|
+ keysDown: number[];
|
|
|
+ keysLeft: number[];
|
|
|
+ keysRight: number[];
|
|
|
+ keysReset: number[];
|
|
|
+ panningSensibility: number;
|
|
|
+ zoomingSensibility: number;
|
|
|
+ useAltToZoom: boolean;
|
|
|
+ private _ctrlPressed;
|
|
|
+ private _altPressed;
|
|
|
+ private _onCanvasBlurObserver;
|
|
|
+ private _onKeyboardObserver;
|
|
|
+ private _engine;
|
|
|
+ private _scene;
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ detachControl(element: Nullable<HTMLElement>): void;
|
|
|
+ checkInputs(): void;
|
|
|
+ getClassName(): string;
|
|
|
+ getSimpleName(): string;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class ArcRotateCameraMouseWheelInput implements ICameraInput<ArcRotateCamera> {
|
|
|
+ camera: ArcRotateCamera;
|
|
|
+ private _wheel;
|
|
|
+ private _observer;
|
|
|
+ wheelPrecision: number;
|
|
|
+ /**
|
|
|
+ * wheelDeltaPercentage will be used instead of wheelPrecision if different from 0.
|
|
|
+ * It defines the percentage of current camera.radius to use as delta when wheel is used.
|
|
|
+ */
|
|
|
+ wheelDeltaPercentage: number;
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ detachControl(element: Nullable<HTMLElement>): void;
|
|
|
+ getClassName(): string;
|
|
|
+ getSimpleName(): string;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class ArcRotateCameraPointersInput implements ICameraInput<ArcRotateCamera> {
|
|
|
+ camera: ArcRotateCamera;
|
|
|
+ buttons: number[];
|
|
|
+ angularSensibilityX: number;
|
|
|
+ angularSensibilityY: number;
|
|
|
+ pinchPrecision: number;
|
|
|
+ /**
|
|
|
+ * pinchDeltaPercentage will be used instead of pinchPrecision if different from 0.
|
|
|
+ * It defines the percentage of current camera.radius to use as delta when pinch zoom is used.
|
|
|
+ */
|
|
|
+ pinchDeltaPercentage: number;
|
|
|
+ panningSensibility: number;
|
|
|
+ multiTouchPanning: boolean;
|
|
|
+ multiTouchPanAndZoom: boolean;
|
|
|
+ private _isPanClick;
|
|
|
+ pinchInwards: boolean;
|
|
|
+ private _pointerInput;
|
|
|
+ private _observer;
|
|
|
+ private _onMouseMove;
|
|
|
+ private _onGestureStart;
|
|
|
+ private _onGesture;
|
|
|
+ private _MSGestureHandler;
|
|
|
+ private _onLostFocus;
|
|
|
+ private _onContextMenu;
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ detachControl(element: Nullable<HTMLElement>): void;
|
|
|
+ getClassName(): string;
|
|
|
+ getSimpleName(): string;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class ArcRotateCameraVRDeviceOrientationInput implements ICameraInput<ArcRotateCamera> {
|
|
|
+ camera: ArcRotateCamera;
|
|
|
+ alphaCorrection: number;
|
|
|
+ betaCorrection: number;
|
|
|
+ gammaCorrection: number;
|
|
|
+ private _alpha;
|
|
|
+ private _gamma;
|
|
|
+ private _dirty;
|
|
|
+ private _deviceOrientationHandler;
|
|
|
+ constructor();
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ _onOrientationEvent(evt: DeviceOrientationEvent): void;
|
|
|
+ checkInputs(): void;
|
|
|
+ detachControl(element: Nullable<HTMLElement>): void;
|
|
|
+ getClassName(): string;
|
|
|
+ getSimpleName(): string;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
+ * Takes information about the orientation of the device as reported by the deviceorientation event to orient the camera.
|
|
|
+ * Screen rotation is taken into account.
|
|
|
+ */
|
|
|
+ class FreeCameraDeviceOrientationInput implements ICameraInput<FreeCamera> {
|
|
|
+ private _camera;
|
|
|
+ private _screenOrientationAngle;
|
|
|
+ private _constantTranform;
|
|
|
+ private _screenQuaternion;
|
|
|
+ private _alpha;
|
|
|
+ private _beta;
|
|
|
+ private _gamma;
|
|
|
+ constructor();
|
|
|
+ camera: FreeCamera;
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ private _orientationChanged;
|
|
|
+ private _deviceOrientation;
|
|
|
+ detachControl(element: Nullable<HTMLElement>): void;
|
|
|
+ checkInputs(): void;
|
|
|
+ getClassName(): string;
|
|
|
+ getSimpleName(): string;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class FreeCameraGamepadInput implements ICameraInput<FreeCamera> {
|
|
|
+ camera: FreeCamera;
|
|
|
+ gamepad: Nullable<Gamepad>;
|
|
|
+ private _onGamepadConnectedObserver;
|
|
|
+ private _onGamepadDisconnectedObserver;
|
|
|
+ gamepadAngularSensibility: number;
|
|
|
+ gamepadMoveSensibility: number;
|
|
|
+ private _cameraTransform;
|
|
|
+ private _deltaTransform;
|
|
|
+ private _vector3;
|
|
|
+ private _vector2;
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ detachControl(element: Nullable<HTMLElement>): void;
|
|
|
+ checkInputs(): void;
|
|
|
+ getClassName(): string;
|
|
|
+ getSimpleName(): string;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class FreeCameraKeyboardMoveInput implements ICameraInput<FreeCamera> {
|
|
|
+ camera: FreeCamera;
|
|
|
+ private _keys;
|
|
|
+ private _onCanvasBlurObserver;
|
|
|
+ private _onKeyboardObserver;
|
|
|
+ private _engine;
|
|
|
+ private _scene;
|
|
|
+ keysUp: number[];
|
|
|
+ keysDown: number[];
|
|
|
+ keysLeft: number[];
|
|
|
+ keysRight: number[];
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ detachControl(element: Nullable<HTMLElement>): void;
|
|
|
+ checkInputs(): void;
|
|
|
+ getClassName(): string;
|
|
|
+ _onLostFocus(e: FocusEvent): void;
|
|
|
+ getSimpleName(): string;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class FreeCameraMouseInput implements ICameraInput<FreeCamera> {
|
|
|
+ touchEnabled: boolean;
|
|
|
+ camera: FreeCamera;
|
|
|
+ buttons: number[];
|
|
|
+ angularSensibility: number;
|
|
|
+ private _pointerInput;
|
|
|
+ private _onMouseMove;
|
|
|
+ private _observer;
|
|
|
+ private previousPosition;
|
|
|
+ constructor(touchEnabled?: boolean);
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ detachControl(element: Nullable<HTMLElement>): void;
|
|
|
+ getClassName(): string;
|
|
|
+ getSimpleName(): string;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class FreeCameraTouchInput implements ICameraInput<FreeCamera> {
|
|
|
+ camera: FreeCamera;
|
|
|
+ private _offsetX;
|
|
|
+ private _offsetY;
|
|
|
+ private _pointerPressed;
|
|
|
+ private _pointerInput;
|
|
|
+ private _observer;
|
|
|
+ private _onLostFocus;
|
|
|
+ touchAngularSensibility: number;
|
|
|
+ touchMoveSensibility: number;
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ detachControl(element: Nullable<HTMLElement>): void;
|
|
|
+ checkInputs(): void;
|
|
|
+ getClassName(): string;
|
|
|
+ getSimpleName(): string;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class FreeCameraVirtualJoystickInput implements ICameraInput<FreeCamera> {
|
|
|
+ camera: FreeCamera;
|
|
|
+ private _leftjoystick;
|
|
|
+ private _rightjoystick;
|
|
|
+ getLeftJoystick(): VirtualJoystick;
|
|
|
+ getRightJoystick(): VirtualJoystick;
|
|
|
+ checkInputs(): void;
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ detachControl(element: Nullable<HTMLElement>): void;
|
|
|
+ getClassName(): string;
|
|
|
+ getSimpleName(): string;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class VRCameraMetrics {
|
|
|
hResolution: number;
|
|
|
vResolution: number;
|
|
@@ -24692,236 +24922,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class ArcRotateCameraGamepadInput implements ICameraInput<ArcRotateCamera> {
|
|
|
- camera: ArcRotateCamera;
|
|
|
- gamepad: Nullable<Gamepad>;
|
|
|
- private _onGamepadConnectedObserver;
|
|
|
- private _onGamepadDisconnectedObserver;
|
|
|
- gamepadRotationSensibility: number;
|
|
|
- gamepadMoveSensibility: number;
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
- detachControl(element: Nullable<HTMLElement>): void;
|
|
|
- checkInputs(): void;
|
|
|
- getClassName(): string;
|
|
|
- getSimpleName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class ArcRotateCameraKeyboardMoveInput implements ICameraInput<ArcRotateCamera> {
|
|
|
- camera: ArcRotateCamera;
|
|
|
- private _keys;
|
|
|
- keysUp: number[];
|
|
|
- keysDown: number[];
|
|
|
- keysLeft: number[];
|
|
|
- keysRight: number[];
|
|
|
- keysReset: number[];
|
|
|
- panningSensibility: number;
|
|
|
- zoomingSensibility: number;
|
|
|
- useAltToZoom: boolean;
|
|
|
- private _ctrlPressed;
|
|
|
- private _altPressed;
|
|
|
- private _onCanvasBlurObserver;
|
|
|
- private _onKeyboardObserver;
|
|
|
- private _engine;
|
|
|
- private _scene;
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
- detachControl(element: Nullable<HTMLElement>): void;
|
|
|
- checkInputs(): void;
|
|
|
- getClassName(): string;
|
|
|
- getSimpleName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class ArcRotateCameraMouseWheelInput implements ICameraInput<ArcRotateCamera> {
|
|
|
- camera: ArcRotateCamera;
|
|
|
- private _wheel;
|
|
|
- private _observer;
|
|
|
- wheelPrecision: number;
|
|
|
- /**
|
|
|
- * wheelDeltaPercentage will be used instead of wheelPrecision if different from 0.
|
|
|
- * It defines the percentage of current camera.radius to use as delta when wheel is used.
|
|
|
- */
|
|
|
- wheelDeltaPercentage: number;
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
- detachControl(element: Nullable<HTMLElement>): void;
|
|
|
- getClassName(): string;
|
|
|
- getSimpleName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class ArcRotateCameraPointersInput implements ICameraInput<ArcRotateCamera> {
|
|
|
- camera: ArcRotateCamera;
|
|
|
- buttons: number[];
|
|
|
- angularSensibilityX: number;
|
|
|
- angularSensibilityY: number;
|
|
|
- pinchPrecision: number;
|
|
|
- /**
|
|
|
- * pinchDeltaPercentage will be used instead of pinchPrecision if different from 0.
|
|
|
- * It defines the percentage of current camera.radius to use as delta when pinch zoom is used.
|
|
|
- */
|
|
|
- pinchDeltaPercentage: number;
|
|
|
- panningSensibility: number;
|
|
|
- multiTouchPanning: boolean;
|
|
|
- multiTouchPanAndZoom: boolean;
|
|
|
- private _isPanClick;
|
|
|
- pinchInwards: boolean;
|
|
|
- private _pointerInput;
|
|
|
- private _observer;
|
|
|
- private _onMouseMove;
|
|
|
- private _onGestureStart;
|
|
|
- private _onGesture;
|
|
|
- private _MSGestureHandler;
|
|
|
- private _onLostFocus;
|
|
|
- private _onContextMenu;
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
- detachControl(element: Nullable<HTMLElement>): void;
|
|
|
- getClassName(): string;
|
|
|
- getSimpleName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class ArcRotateCameraVRDeviceOrientationInput implements ICameraInput<ArcRotateCamera> {
|
|
|
- camera: ArcRotateCamera;
|
|
|
- alphaCorrection: number;
|
|
|
- betaCorrection: number;
|
|
|
- gammaCorrection: number;
|
|
|
- private _alpha;
|
|
|
- private _gamma;
|
|
|
- private _dirty;
|
|
|
- private _deviceOrientationHandler;
|
|
|
- constructor();
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
- _onOrientationEvent(evt: DeviceOrientationEvent): void;
|
|
|
- checkInputs(): void;
|
|
|
- detachControl(element: Nullable<HTMLElement>): void;
|
|
|
- getClassName(): string;
|
|
|
- getSimpleName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- /**
|
|
|
- * Takes information about the orientation of the device as reported by the deviceorientation event to orient the camera.
|
|
|
- * Screen rotation is taken into account.
|
|
|
- */
|
|
|
- class FreeCameraDeviceOrientationInput implements ICameraInput<FreeCamera> {
|
|
|
- private _camera;
|
|
|
- private _screenOrientationAngle;
|
|
|
- private _constantTranform;
|
|
|
- private _screenQuaternion;
|
|
|
- private _alpha;
|
|
|
- private _beta;
|
|
|
- private _gamma;
|
|
|
- constructor();
|
|
|
- camera: FreeCamera;
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
- private _orientationChanged;
|
|
|
- private _deviceOrientation;
|
|
|
- detachControl(element: Nullable<HTMLElement>): void;
|
|
|
- checkInputs(): void;
|
|
|
- getClassName(): string;
|
|
|
- getSimpleName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class FreeCameraGamepadInput implements ICameraInput<FreeCamera> {
|
|
|
- camera: FreeCamera;
|
|
|
- gamepad: Nullable<Gamepad>;
|
|
|
- private _onGamepadConnectedObserver;
|
|
|
- private _onGamepadDisconnectedObserver;
|
|
|
- gamepadAngularSensibility: number;
|
|
|
- gamepadMoveSensibility: number;
|
|
|
- private _cameraTransform;
|
|
|
- private _deltaTransform;
|
|
|
- private _vector3;
|
|
|
- private _vector2;
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
- detachControl(element: Nullable<HTMLElement>): void;
|
|
|
- checkInputs(): void;
|
|
|
- getClassName(): string;
|
|
|
- getSimpleName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class FreeCameraKeyboardMoveInput implements ICameraInput<FreeCamera> {
|
|
|
- camera: FreeCamera;
|
|
|
- private _keys;
|
|
|
- private _onCanvasBlurObserver;
|
|
|
- private _onKeyboardObserver;
|
|
|
- private _engine;
|
|
|
- private _scene;
|
|
|
- keysUp: number[];
|
|
|
- keysDown: number[];
|
|
|
- keysLeft: number[];
|
|
|
- keysRight: number[];
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
- detachControl(element: Nullable<HTMLElement>): void;
|
|
|
- checkInputs(): void;
|
|
|
- getClassName(): string;
|
|
|
- _onLostFocus(e: FocusEvent): void;
|
|
|
- getSimpleName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class FreeCameraMouseInput implements ICameraInput<FreeCamera> {
|
|
|
- touchEnabled: boolean;
|
|
|
- camera: FreeCamera;
|
|
|
- buttons: number[];
|
|
|
- angularSensibility: number;
|
|
|
- private _pointerInput;
|
|
|
- private _onMouseMove;
|
|
|
- private _observer;
|
|
|
- private previousPosition;
|
|
|
- constructor(touchEnabled?: boolean);
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
- detachControl(element: Nullable<HTMLElement>): void;
|
|
|
- getClassName(): string;
|
|
|
- getSimpleName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class FreeCameraTouchInput implements ICameraInput<FreeCamera> {
|
|
|
- camera: FreeCamera;
|
|
|
- private _offsetX;
|
|
|
- private _offsetY;
|
|
|
- private _pointerPressed;
|
|
|
- private _pointerInput;
|
|
|
- private _observer;
|
|
|
- private _onLostFocus;
|
|
|
- touchAngularSensibility: number;
|
|
|
- touchMoveSensibility: number;
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
- detachControl(element: Nullable<HTMLElement>): void;
|
|
|
- checkInputs(): void;
|
|
|
- getClassName(): string;
|
|
|
- getSimpleName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class FreeCameraVirtualJoystickInput implements ICameraInput<FreeCamera> {
|
|
|
- camera: FreeCamera;
|
|
|
- private _leftjoystick;
|
|
|
- private _rightjoystick;
|
|
|
- getLeftJoystick(): VirtualJoystick;
|
|
|
- getRightJoystick(): VirtualJoystick;
|
|
|
- checkInputs(): void;
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
- detachControl(element: Nullable<HTMLElement>): void;
|
|
|
- getClassName(): string;
|
|
|
- getSimpleName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
interface IOctreeContainer<T> {
|
|
|
blocks: Array<OctreeBlock<T>>;
|
|
|
}
|