|
@@ -51,6 +51,11 @@ declare module BABYLON {
|
|
private static _DELAYLOADSTATE_LOADED;
|
|
private static _DELAYLOADSTATE_LOADED;
|
|
private static _DELAYLOADSTATE_LOADING;
|
|
private static _DELAYLOADSTATE_LOADING;
|
|
private static _DELAYLOADSTATE_NOTLOADED;
|
|
private static _DELAYLOADSTATE_NOTLOADED;
|
|
|
|
+ private static _TEXTUREFORMAT_ALPHA;
|
|
|
|
+ private static _TEXTUREFORMAT_LUMINANCE;
|
|
|
|
+ private static _TEXTUREFORMAT_LUMINANCE_ALPHA;
|
|
|
|
+ private static _TEXTUREFORMAT_RGB;
|
|
|
|
+ private static _TEXTUREFORMAT_RGBA;
|
|
static ALPHA_DISABLE : number;
|
|
static ALPHA_DISABLE : number;
|
|
static ALPHA_ADD : number;
|
|
static ALPHA_ADD : number;
|
|
static ALPHA_COMBINE : number;
|
|
static ALPHA_COMBINE : number;
|
|
@@ -58,6 +63,11 @@ declare module BABYLON {
|
|
static DELAYLOADSTATE_LOADED : number;
|
|
static DELAYLOADSTATE_LOADED : number;
|
|
static DELAYLOADSTATE_LOADING : number;
|
|
static DELAYLOADSTATE_LOADING : number;
|
|
static DELAYLOADSTATE_NOTLOADED : number;
|
|
static DELAYLOADSTATE_NOTLOADED : number;
|
|
|
|
+ static TEXTUREFORMAT_ALPHA : number;
|
|
|
|
+ static TEXTUREFORMAT_LUMINANCE : number;
|
|
|
|
+ static TEXTUREFORMAT_LUMINANCE_ALPHA : number;
|
|
|
|
+ static TEXTUREFORMAT_RGB : number;
|
|
|
|
+ static TEXTUREFORMAT_RGBA : number;
|
|
static Version : string;
|
|
static Version : string;
|
|
static Epsilon: number;
|
|
static Epsilon: number;
|
|
static CollisionsEpsilon: number;
|
|
static CollisionsEpsilon: number;
|
|
@@ -67,7 +77,7 @@ declare module BABYLON {
|
|
public cullBackFaces: boolean;
|
|
public cullBackFaces: boolean;
|
|
public renderEvenInBackground: boolean;
|
|
public renderEvenInBackground: boolean;
|
|
public scenes: Scene[];
|
|
public scenes: Scene[];
|
|
- private _gl;
|
|
|
|
|
|
+ public _gl: WebGLRenderingContext;
|
|
private _renderingCanvas;
|
|
private _renderingCanvas;
|
|
private _windowIsBackground;
|
|
private _windowIsBackground;
|
|
private _audioEngine;
|
|
private _audioEngine;
|
|
@@ -84,6 +94,9 @@ declare module BABYLON {
|
|
private _loadingTextDiv;
|
|
private _loadingTextDiv;
|
|
private _loadingDivBackgroundColor;
|
|
private _loadingDivBackgroundColor;
|
|
private _drawCalls;
|
|
private _drawCalls;
|
|
|
|
+ private _glVersion;
|
|
|
|
+ private _glRenderer;
|
|
|
|
+ private _glVendor;
|
|
private _renderingQueueLaunched;
|
|
private _renderingQueueLaunched;
|
|
private _activeRenderLoops;
|
|
private _activeRenderLoops;
|
|
private fpsRange;
|
|
private fpsRange;
|
|
@@ -108,6 +121,11 @@ declare module BABYLON {
|
|
private _workingCanvas;
|
|
private _workingCanvas;
|
|
private _workingContext;
|
|
private _workingContext;
|
|
constructor(canvas: HTMLCanvasElement, antialias?: boolean, options?: any);
|
|
constructor(canvas: HTMLCanvasElement, antialias?: boolean, options?: any);
|
|
|
|
+ public getGlInfo(): {
|
|
|
|
+ vendor: string;
|
|
|
|
+ renderer: string;
|
|
|
|
+ version: string;
|
|
|
|
+ };
|
|
public getAudioEngine(): AudioEngine;
|
|
public getAudioEngine(): AudioEngine;
|
|
public getAspectRatio(camera: Camera): number;
|
|
public getAspectRatio(camera: Camera): number;
|
|
public getRenderWidth(): number;
|
|
public getRenderWidth(): number;
|
|
@@ -184,6 +202,7 @@ declare module BABYLON {
|
|
public wipeCaches(): void;
|
|
public wipeCaches(): void;
|
|
public setSamplingMode(texture: WebGLTexture, samplingMode: number): void;
|
|
public setSamplingMode(texture: WebGLTexture, samplingMode: number): void;
|
|
public createTexture(url: string, noMipmap: boolean, invertY: boolean, scene: Scene, samplingMode?: number, onLoad?: () => void, onError?: () => void, buffer?: any): WebGLTexture;
|
|
public createTexture(url: string, noMipmap: boolean, invertY: boolean, scene: Scene, samplingMode?: number, onLoad?: () => void, onError?: () => void, buffer?: any): WebGLTexture;
|
|
|
|
+ public createRawTexture(data: ArrayBufferView, width: number, height: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number): WebGLTexture;
|
|
public createDynamicTexture(width: number, height: number, generateMipMaps: boolean, samplingMode: number): WebGLTexture;
|
|
public createDynamicTexture(width: number, height: number, generateMipMaps: boolean, samplingMode: number): WebGLTexture;
|
|
public updateDynamicTexture(texture: WebGLTexture, canvas: HTMLCanvasElement, invertY: boolean): void;
|
|
public updateDynamicTexture(texture: WebGLTexture, canvas: HTMLCanvasElement, invertY: boolean): void;
|
|
public updateVideoTexture(texture: WebGLTexture, video: HTMLVideoElement, invertY: boolean): void;
|
|
public updateVideoTexture(texture: WebGLTexture, video: HTMLVideoElement, invertY: boolean): void;
|
|
@@ -252,6 +271,7 @@ interface WebGLTexture {
|
|
isCube: boolean;
|
|
isCube: boolean;
|
|
url: string;
|
|
url: string;
|
|
noMipmap: boolean;
|
|
noMipmap: boolean;
|
|
|
|
+ samplingMode: number;
|
|
references: number;
|
|
references: number;
|
|
generateMipMaps: boolean;
|
|
generateMipMaps: boolean;
|
|
_size: number;
|
|
_size: number;
|
|
@@ -787,6 +807,7 @@ declare module BABYLON {
|
|
public color3InterpolateFunction(startValue: Color3, endValue: Color3, gradient: number): Color3;
|
|
public color3InterpolateFunction(startValue: Color3, endValue: Color3, gradient: number): Color3;
|
|
public clone(): Animation;
|
|
public clone(): Animation;
|
|
public setKeys(values: any[]): void;
|
|
public setKeys(values: any[]): void;
|
|
|
|
+ private _getKeyValue(value);
|
|
private _interpolate(currentFrame, repeatCount, loopMode, offsetValue?, highLimitValue?);
|
|
private _interpolate(currentFrame, repeatCount, loopMode, offsetValue?, highLimitValue?);
|
|
public animate(delay: number, from: number, to: number, loop: boolean, speedRatio: number): boolean;
|
|
public animate(delay: number, from: number, to: number, loop: boolean, speedRatio: number): boolean;
|
|
private static _ANIMATIONTYPE_FLOAT;
|
|
private static _ANIMATIONTYPE_FLOAT;
|
|
@@ -892,11 +913,18 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
class Sound {
|
|
class Sound {
|
|
- public maxDistance: number;
|
|
|
|
public autoplay: boolean;
|
|
public autoplay: boolean;
|
|
public loop: boolean;
|
|
public loop: boolean;
|
|
- public useBabylonJSAttenuation: boolean;
|
|
|
|
|
|
+ public useCustomAttenuation: boolean;
|
|
public soundTrackId: number;
|
|
public soundTrackId: number;
|
|
|
|
+ public spatialSound: boolean;
|
|
|
|
+ public refDistance: number;
|
|
|
|
+ public rolloffFactor: number;
|
|
|
|
+ public maxDistance: number;
|
|
|
|
+ public distanceModel: string;
|
|
|
|
+ public panningModel: string;
|
|
|
|
+ private startTime;
|
|
|
|
+ private startOffset;
|
|
private _position;
|
|
private _position;
|
|
private _localDirection;
|
|
private _localDirection;
|
|
private _volume;
|
|
private _volume;
|
|
@@ -910,20 +938,24 @@ declare module BABYLON {
|
|
private _soundSource;
|
|
private _soundSource;
|
|
private _soundPanner;
|
|
private _soundPanner;
|
|
private _soundGain;
|
|
private _soundGain;
|
|
|
|
+ private _audioNode;
|
|
private _coneInnerAngle;
|
|
private _coneInnerAngle;
|
|
private _coneOuterAngle;
|
|
private _coneOuterAngle;
|
|
private _coneOuterGain;
|
|
private _coneOuterGain;
|
|
private _scene;
|
|
private _scene;
|
|
private _name;
|
|
private _name;
|
|
private _connectedMesh;
|
|
private _connectedMesh;
|
|
|
|
+ private _customAttenuationFunction;
|
|
/**
|
|
/**
|
|
* Create a sound and attach it to a scene
|
|
* Create a sound and attach it to a scene
|
|
* @param name Name of your sound
|
|
* @param name Name of your sound
|
|
- * @param url Url to the sound to load async
|
|
|
|
|
|
+ * @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 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, distanceMax
|
|
|
|
|
|
+ * @param options Objects to provide with the current available options: autoplay, loop, volume, spatialSound, maxDistance, rolloffFactor, refDistance, distanceModel, panningModel
|
|
*/
|
|
*/
|
|
- constructor(name: string, url: string, scene: Scene, readyToPlayCallback?: () => void, options?: any);
|
|
|
|
|
|
+ constructor(name: string, urlOrArrayBuffer: any, scene: Scene, readyToPlayCallback?: () => void, options?: any);
|
|
|
|
+ public updateOptions(options: any): void;
|
|
|
|
+ private _createSpatialParameters();
|
|
public connectToSoundTrackAudioNode(soundTrackAudioNode: AudioNode): void;
|
|
public connectToSoundTrackAudioNode(soundTrackAudioNode: AudioNode): void;
|
|
/**
|
|
/**
|
|
* Transform this sound into a directional source
|
|
* Transform this sound into a directional source
|
|
@@ -936,6 +968,7 @@ declare module BABYLON {
|
|
public setLocalDirectionToMesh(newLocalDirection: Vector3): void;
|
|
public setLocalDirectionToMesh(newLocalDirection: Vector3): void;
|
|
private _updateDirection();
|
|
private _updateDirection();
|
|
public updateDistanceFromListener(): void;
|
|
public updateDistanceFromListener(): void;
|
|
|
|
+ public setAttenuationFunction(callback: (currentVolume: number, currentDistance: number, maxDistance: number, refDistance: number, rolloffFactor: number) => number): void;
|
|
/**
|
|
/**
|
|
* Play the sound
|
|
* Play the sound
|
|
* @param time (optional) Start the sound after X seconds. Start immediately (0) by default.
|
|
* @param time (optional) Start the sound after X seconds. Start immediately (0) by default.
|
|
@@ -1227,41 +1260,6 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- class OculusCamera extends FreeCamera {
|
|
|
|
- private _leftCamera;
|
|
|
|
- private _rightCamera;
|
|
|
|
- private _offsetOrientation;
|
|
|
|
- private _deviceOrientationHandler;
|
|
|
|
- constructor(name: string, position: Vector3, scene: Scene);
|
|
|
|
- public _update(): void;
|
|
|
|
- public _updateCamera(camera: FreeCamera): void;
|
|
|
|
- public _onOrientationEvent(evt: DeviceOrientationEvent): void;
|
|
|
|
- public attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
|
- public detachControl(element: HTMLElement): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class OculusGamepadCamera extends FreeCamera {
|
|
|
|
- private _leftCamera;
|
|
|
|
- private _rightCamera;
|
|
|
|
- private _offsetOrientation;
|
|
|
|
- private _deviceOrientationHandler;
|
|
|
|
- private _gamepad;
|
|
|
|
- private _gamepads;
|
|
|
|
- public angularSensibility: number;
|
|
|
|
- public moveSensibility: number;
|
|
|
|
- constructor(name: string, position: Vector3, scene: Scene);
|
|
|
|
- private _onNewGameConnected(gamepad);
|
|
|
|
- public _update(): void;
|
|
|
|
- public _checkInputs(): void;
|
|
|
|
- public _updateCamera(camera: FreeCamera): void;
|
|
|
|
- public _onOrientationEvent(evt: DeviceOrientationEvent): void;
|
|
|
|
- public attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
|
- public detachControl(element: HTMLElement): void;
|
|
|
|
- public dispose(): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-declare module BABYLON {
|
|
|
|
class TargetCamera extends Camera {
|
|
class TargetCamera extends Camera {
|
|
public cameraDirection: Vector3;
|
|
public cameraDirection: Vector3;
|
|
public cameraRotation: Vector2;
|
|
public cameraRotation: Vector2;
|
|
@@ -1322,6 +1320,41 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ class OculusCamera extends FreeCamera {
|
|
|
|
+ private _leftCamera;
|
|
|
|
+ private _rightCamera;
|
|
|
|
+ private _offsetOrientation;
|
|
|
|
+ private _deviceOrientationHandler;
|
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene);
|
|
|
|
+ public _update(): void;
|
|
|
|
+ public _updateCamera(camera: FreeCamera): void;
|
|
|
|
+ public _onOrientationEvent(evt: DeviceOrientationEvent): void;
|
|
|
|
+ public attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
|
+ public detachControl(element: HTMLElement): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class OculusGamepadCamera extends FreeCamera {
|
|
|
|
+ private _leftCamera;
|
|
|
|
+ private _rightCamera;
|
|
|
|
+ private _offsetOrientation;
|
|
|
|
+ private _deviceOrientationHandler;
|
|
|
|
+ private _gamepad;
|
|
|
|
+ private _gamepads;
|
|
|
|
+ public angularSensibility: number;
|
|
|
|
+ public moveSensibility: number;
|
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene);
|
|
|
|
+ private _onNewGameConnected(gamepad);
|
|
|
|
+ public _update(): void;
|
|
|
|
+ public _checkInputs(): void;
|
|
|
|
+ public _updateCamera(camera: FreeCamera): void;
|
|
|
|
+ public _onOrientationEvent(evt: DeviceOrientationEvent): void;
|
|
|
|
+ public attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
|
+ public detachControl(element: HTMLElement): void;
|
|
|
|
+ public dispose(): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
class VRDeviceOrientationCamera extends OculusCamera {
|
|
class VRDeviceOrientationCamera extends OculusCamera {
|
|
public _alpha: number;
|
|
public _alpha: number;
|
|
public _beta: number;
|
|
public _beta: number;
|
|
@@ -1535,6 +1568,8 @@ declare module BABYLON {
|
|
public shouldDisplayLabel: (node: Node) => boolean;
|
|
public shouldDisplayLabel: (node: Node) => boolean;
|
|
public shouldDisplayAxis: (mesh: Mesh) => boolean;
|
|
public shouldDisplayAxis: (mesh: Mesh) => boolean;
|
|
public axisRatio: number;
|
|
public axisRatio: number;
|
|
|
|
+ public accentColor: string;
|
|
|
|
+ public customStatsFunction: () => string;
|
|
constructor(scene: Scene);
|
|
constructor(scene: Scene);
|
|
private _refreshMeshesTreeContent();
|
|
private _refreshMeshesTreeContent();
|
|
private _renderSingleAxis(zero, unit, unitText, label, color);
|
|
private _renderSingleAxis(zero, unit, unitText, label, color);
|
|
@@ -1546,7 +1581,7 @@ declare module BABYLON {
|
|
public show(showUI?: boolean): void;
|
|
public show(showUI?: boolean): void;
|
|
private _clearLabels();
|
|
private _clearLabels();
|
|
private _generateheader(root, text);
|
|
private _generateheader(root, text);
|
|
- private _generateTexBox(root, title);
|
|
|
|
|
|
+ private _generateTexBox(root, title, color);
|
|
private _generateAdvancedCheckBox(root, leftTitle, rightTitle, initialState, task, tag?);
|
|
private _generateAdvancedCheckBox(root, leftTitle, rightTitle, initialState, task, tag?);
|
|
private _generateCheckBox(root, title, initialState, task, tag?);
|
|
private _generateCheckBox(root, title, initialState, task, tag?);
|
|
private _generateRadio(root, title, name, initialState, task, tag?);
|
|
private _generateRadio(root, title, name, initialState, task, tag?);
|
|
@@ -1611,16 +1646,16 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- class DirectionalLight extends Light {
|
|
|
|
|
|
+ class DirectionalLight extends Light implements IShadowLight {
|
|
public direction: Vector3;
|
|
public direction: Vector3;
|
|
public position: Vector3;
|
|
public position: Vector3;
|
|
private _transformedDirection;
|
|
private _transformedDirection;
|
|
- public _transformedPosition: Vector3;
|
|
|
|
|
|
+ public transformedPosition: Vector3;
|
|
private _worldMatrix;
|
|
private _worldMatrix;
|
|
constructor(name: string, direction: Vector3, scene: Scene);
|
|
constructor(name: string, direction: Vector3, scene: Scene);
|
|
public getAbsolutePosition(): Vector3;
|
|
public getAbsolutePosition(): Vector3;
|
|
public setDirectionToTarget(target: Vector3): Vector3;
|
|
public setDirectionToTarget(target: Vector3): Vector3;
|
|
- public _computeTransformedPosition(): boolean;
|
|
|
|
|
|
+ public computeTransformedPosition(): boolean;
|
|
public transferToEffect(effect: Effect, directionUniformName: string): void;
|
|
public transferToEffect(effect: Effect, directionUniformName: string): void;
|
|
public _getWorldMatrix(): Matrix;
|
|
public _getWorldMatrix(): Matrix;
|
|
}
|
|
}
|
|
@@ -1638,6 +1673,15 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ interface IShadowLight {
|
|
|
|
+ position: Vector3;
|
|
|
|
+ direction: Vector3;
|
|
|
|
+ transformedPosition: Vector3;
|
|
|
|
+ name: string;
|
|
|
|
+ computeTransformedPosition(): boolean;
|
|
|
|
+ getScene(): Scene;
|
|
|
|
+ _shadowGenerator: ShadowGenerator;
|
|
|
|
+ }
|
|
class Light extends Node {
|
|
class Light extends Node {
|
|
public diffuse: Color3;
|
|
public diffuse: Color3;
|
|
public specular: Color3;
|
|
public specular: Color3;
|
|
@@ -1672,17 +1716,18 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- class SpotLight extends Light {
|
|
|
|
|
|
+ class SpotLight extends Light implements IShadowLight {
|
|
public position: Vector3;
|
|
public position: Vector3;
|
|
public direction: Vector3;
|
|
public direction: Vector3;
|
|
public angle: number;
|
|
public angle: number;
|
|
public exponent: number;
|
|
public exponent: number;
|
|
|
|
+ public transformedPosition: Vector3;
|
|
private _transformedDirection;
|
|
private _transformedDirection;
|
|
- private _transformedPosition;
|
|
|
|
private _worldMatrix;
|
|
private _worldMatrix;
|
|
constructor(name: string, position: Vector3, direction: Vector3, angle: number, exponent: number, scene: Scene);
|
|
constructor(name: string, position: Vector3, direction: Vector3, angle: number, exponent: number, scene: Scene);
|
|
public getAbsolutePosition(): Vector3;
|
|
public getAbsolutePosition(): Vector3;
|
|
public setDirectionToTarget(target: Vector3): Vector3;
|
|
public setDirectionToTarget(target: Vector3): Vector3;
|
|
|
|
+ public computeTransformedPosition(): boolean;
|
|
public transferToEffect(effect: Effect, positionUniformName: string, directionUniformName: string): void;
|
|
public transferToEffect(effect: Effect, positionUniformName: string, directionUniformName: string): void;
|
|
public _getWorldMatrix(): Matrix;
|
|
public _getWorldMatrix(): Matrix;
|
|
}
|
|
}
|
|
@@ -1711,10 +1756,10 @@ declare module BABYLON {
|
|
private _cachedPosition;
|
|
private _cachedPosition;
|
|
private _cachedDirection;
|
|
private _cachedDirection;
|
|
private _cachedDefines;
|
|
private _cachedDefines;
|
|
- constructor(mapSize: number, light: DirectionalLight);
|
|
|
|
|
|
+ constructor(mapSize: number, light: IShadowLight);
|
|
public isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
public isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
public getShadowMap(): RenderTargetTexture;
|
|
public getShadowMap(): RenderTargetTexture;
|
|
- public getLight(): DirectionalLight;
|
|
|
|
|
|
+ public getLight(): IShadowLight;
|
|
public getTransformMatrix(): Matrix;
|
|
public getTransformMatrix(): Matrix;
|
|
public getDarkness(): number;
|
|
public getDarkness(): number;
|
|
public setDarkness(darkness: number): void;
|
|
public setDarkness(darkness: number): void;
|
|
@@ -1986,7 +2031,7 @@ declare module BABYLON {
|
|
public scale(ratio: number): void;
|
|
public scale(ratio: number): void;
|
|
public canRescale : boolean;
|
|
public canRescale : boolean;
|
|
public _removeFromCache(url: string, noMipmap: boolean): void;
|
|
public _removeFromCache(url: string, noMipmap: boolean): void;
|
|
- public _getFromCache(url: string, noMipmap: boolean): WebGLTexture;
|
|
|
|
|
|
+ public _getFromCache(url: string, noMipmap: boolean, sampling?: number): WebGLTexture;
|
|
public delayLoad(): void;
|
|
public delayLoad(): void;
|
|
public releaseInternalTexture(): void;
|
|
public releaseInternalTexture(): void;
|
|
public clone(): BaseTexture;
|
|
public clone(): BaseTexture;
|
|
@@ -2015,8 +2060,9 @@ declare module BABYLON {
|
|
public canRescale : boolean;
|
|
public canRescale : boolean;
|
|
public scale(ratio: number): void;
|
|
public scale(ratio: number): void;
|
|
public getContext(): CanvasRenderingContext2D;
|
|
public getContext(): CanvasRenderingContext2D;
|
|
|
|
+ public clear(): void;
|
|
public update(invertY?: boolean): void;
|
|
public update(invertY?: boolean): void;
|
|
- public drawText(text: string, x: number, y: number, font: string, color: string, clearColor: string, invertY?: boolean): void;
|
|
|
|
|
|
+ public drawText(text: string, x: number, y: number, font: string, color: string, clearColor: string, invertY?: boolean, update?: boolean): void;
|
|
public clone(): DynamicTexture;
|
|
public clone(): DynamicTexture;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2032,7 +2078,12 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
class RawTexture extends Texture {
|
|
class RawTexture extends Texture {
|
|
- constructor(scene: Scene, samplingMode?: number);
|
|
|
|
|
|
+ constructor(data: ArrayBufferView, width: number, height: number, format: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number);
|
|
|
|
+ static CreateLuminanceTexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number): RawTexture;
|
|
|
|
+ static CreateLuminanceAlphaTexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number): RawTexture;
|
|
|
|
+ static CreateAlphaTexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number): RawTexture;
|
|
|
|
+ static CreateRGBTexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number): RawTexture;
|
|
|
|
+ static CreateRGBATexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number): RawTexture;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -2635,6 +2686,58 @@ declare module BABYLON {
|
|
class BezierCurve {
|
|
class BezierCurve {
|
|
static interpolate(t: number, x1: number, y1: number, x2: number, y2: number): number;
|
|
static interpolate(t: number, x1: number, y1: number, x2: number, y2: number): number;
|
|
}
|
|
}
|
|
|
|
+ enum Orientation {
|
|
|
|
+ CW = 0,
|
|
|
|
+ CCW = 1,
|
|
|
|
+ }
|
|
|
|
+ class Angle {
|
|
|
|
+ private _radians;
|
|
|
|
+ constructor(radians: number);
|
|
|
|
+ public degrees: () => number;
|
|
|
|
+ public radians: () => number;
|
|
|
|
+ static BetweenTwoPoints(a: Vector2, b: Vector2): Angle;
|
|
|
|
+ static FromRadians(radians: number): Angle;
|
|
|
|
+ static FromDegrees(degrees: number): Angle;
|
|
|
|
+ }
|
|
|
|
+ class Arc2 {
|
|
|
|
+ public startPoint: Vector2;
|
|
|
|
+ public midPoint: Vector2;
|
|
|
|
+ public endPoint: Vector2;
|
|
|
|
+ public centerPoint: Vector2;
|
|
|
|
+ public radius: number;
|
|
|
|
+ public angle: Angle;
|
|
|
|
+ public startAngle: Angle;
|
|
|
|
+ public orientation: Orientation;
|
|
|
|
+ constructor(startPoint: Vector2, midPoint: Vector2, endPoint: Vector2);
|
|
|
|
+ }
|
|
|
|
+ class PathCursor {
|
|
|
|
+ private path;
|
|
|
|
+ private _onchange;
|
|
|
|
+ public value: number;
|
|
|
|
+ public animations: Animation[];
|
|
|
|
+ constructor(path: Path2);
|
|
|
|
+ public getPoint(): Vector3;
|
|
|
|
+ public moveAhead(step?: number): void;
|
|
|
|
+ public moveBack(step?: number): void;
|
|
|
|
+ public move(step: number): void;
|
|
|
|
+ private ensureLimits();
|
|
|
|
+ private markAsDirty(propertyName);
|
|
|
|
+ private raiseOnChange();
|
|
|
|
+ public onchange(f: (cursor: PathCursor) => void): void;
|
|
|
|
+ }
|
|
|
|
+ class Path2 {
|
|
|
|
+ private _points;
|
|
|
|
+ private _length;
|
|
|
|
+ public closed: boolean;
|
|
|
|
+ constructor(x: number, y: number);
|
|
|
|
+ public addLineTo(x: number, y: number): Path2;
|
|
|
|
+ public addArcTo(midX: number, midY: number, endX: number, endY: number, numberOfSegments?: number): Path2;
|
|
|
|
+ public close(): Path2;
|
|
|
|
+ public length(): number;
|
|
|
|
+ public getPoints(): Vector2[];
|
|
|
|
+ public getPointAtLengthPosition(normalizedLengthPosition: number): Vector2;
|
|
|
|
+ static StartingAt(x: number, y: number): Path2;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
class AbstractMesh extends Node implements IDisposable {
|
|
class AbstractMesh extends Node implements IDisposable {
|
|
@@ -3018,7 +3121,17 @@ declare module BABYLON {
|
|
private _instancesBufferSize;
|
|
private _instancesBufferSize;
|
|
public _shouldGenerateFlatShading: boolean;
|
|
public _shouldGenerateFlatShading: boolean;
|
|
private _preActivateId;
|
|
private _preActivateId;
|
|
- constructor(name: string, scene: Scene);
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @param {string} name - The value used by scene.getMeshByName() to do a lookup.
|
|
|
|
+ * @param {BABYLON.Scene} scene - The scene to add this mesh to.
|
|
|
|
+ * @param {BABYLON.Node} parent - The parent of this mesh, if it has one
|
|
|
|
+ * @param {BABYLON.Mesh} source - An optional Mesh from which geometry is shared, cloned.
|
|
|
|
+ * @param {boolean} doNotCloneChildren - When cloning, skip cloning child meshes of source, default False.
|
|
|
|
+ * When false, achieved by calling a clone(), also passing False.
|
|
|
|
+ * This will make creation of children, recursive.
|
|
|
|
+ */
|
|
|
|
+ constructor(name: string, scene: Scene, parent?: Node, source?: Mesh, doNotCloneChildren?: boolean);
|
|
|
|
+ private _clone();
|
|
public hasLODLevels : boolean;
|
|
public hasLODLevels : boolean;
|
|
private _sortLODLevels();
|
|
private _sortLODLevels();
|
|
public addLODLevel(distance: number, mesh: Mesh): Mesh;
|
|
public addLODLevel(distance: number, mesh: Mesh): Mesh;
|
|
@@ -3152,6 +3265,24 @@ declare module BABYLON.Internals {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ class Polygon {
|
|
|
|
+ static Rectangle(xmin: number, ymin: number, xmax: number, ymax: number): Vector2[];
|
|
|
|
+ static Circle(radius: number, cx?: number, cy?: number, numberOfSides?: number): Vector2[];
|
|
|
|
+ static Parse(input: string): Vector2[];
|
|
|
|
+ static StartingAt(x: number, y: number): Path2;
|
|
|
|
+ }
|
|
|
|
+ class PolygonMeshBuilder {
|
|
|
|
+ private _swctx;
|
|
|
|
+ private _points;
|
|
|
|
+ private _name;
|
|
|
|
+ private _scene;
|
|
|
|
+ constructor(name: string, contours: Path2, scene: Scene);
|
|
|
|
+ constructor(name: string, contours: Vector2[], scene: Scene);
|
|
|
|
+ public addHole(hole: Vector2[]): PolygonMeshBuilder;
|
|
|
|
+ public build(updatable?: boolean): Mesh;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
class SubMesh {
|
|
class SubMesh {
|
|
public materialIndex: number;
|
|
public materialIndex: number;
|
|
public verticesStart: number;
|
|
public verticesStart: number;
|
|
@@ -4120,7 +4251,7 @@ declare module BABYLON {
|
|
static Clamp(value: number, min?: number, max?: number): number;
|
|
static Clamp(value: number, min?: number, max?: number): number;
|
|
static Format(value: number, decimals?: number): string;
|
|
static Format(value: number, decimals?: number): string;
|
|
static CheckExtends(v: Vector3, min: Vector3, max: Vector3): void;
|
|
static CheckExtends(v: Vector3, min: Vector3, max: Vector3): void;
|
|
- static WithinEpsilon(a: number, b: number): boolean;
|
|
|
|
|
|
+ static WithinEpsilon(a: number, b: number, epsilon?: number): boolean;
|
|
static DeepCopy(source: any, destination: any, doNotCopyList?: string[], mustCopyList?: string[]): void;
|
|
static DeepCopy(source: any, destination: any, doNotCopyList?: string[], mustCopyList?: string[]): void;
|
|
static IsEmpty(obj: any): boolean;
|
|
static IsEmpty(obj: any): boolean;
|
|
static RegisterTopRootEvents(events: {
|
|
static RegisterTopRootEvents(events: {
|