|
@@ -1944,6 +1944,63 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ class DebugLayer {
|
|
|
|
+ private _scene;
|
|
|
|
+ private _camera;
|
|
|
|
+ private _transformationMatrix;
|
|
|
|
+ private _enabled;
|
|
|
|
+ private _labelsEnabled;
|
|
|
|
+ private _displayStatistics;
|
|
|
|
+ private _displayTree;
|
|
|
|
+ private _displayLogs;
|
|
|
|
+ private _globalDiv;
|
|
|
|
+ private _statsDiv;
|
|
|
|
+ private _statsSubsetDiv;
|
|
|
|
+ private _optionsDiv;
|
|
|
|
+ private _optionsSubsetDiv;
|
|
|
|
+ private _logDiv;
|
|
|
|
+ private _logSubsetDiv;
|
|
|
|
+ private _treeDiv;
|
|
|
|
+ private _treeSubsetDiv;
|
|
|
|
+ private _drawingCanvas;
|
|
|
|
+ private _drawingContext;
|
|
|
|
+ private _rootElement;
|
|
|
|
+ _syncPositions: () => void;
|
|
|
|
+ private _syncData;
|
|
|
|
+ private _syncUI;
|
|
|
|
+ private _onCanvasClick;
|
|
|
|
+ private _clickPosition;
|
|
|
|
+ private _ratio;
|
|
|
|
+ private _identityMatrix;
|
|
|
|
+ private _showUI;
|
|
|
|
+ private _needToRefreshMeshesTree;
|
|
|
|
+ shouldDisplayLabel: (node: Node) => boolean;
|
|
|
|
+ shouldDisplayAxis: (mesh: Mesh) => boolean;
|
|
|
|
+ axisRatio: number;
|
|
|
|
+ accentColor: string;
|
|
|
|
+ customStatsFunction: () => string;
|
|
|
|
+ constructor(scene: Scene);
|
|
|
|
+ private _refreshMeshesTreeContent();
|
|
|
|
+ private _renderSingleAxis(zero, unit, unitText, label, color);
|
|
|
|
+ private _renderAxis(projectedPosition, mesh, globalViewport);
|
|
|
|
+ private _renderLabel(text, projectedPosition, labelOffset, onClick, getFillStyle);
|
|
|
|
+ private _isClickInsideRect(x, y, width, height);
|
|
|
|
+ isVisible(): boolean;
|
|
|
|
+ hide(): void;
|
|
|
|
+ show(showUI?: boolean, camera?: Camera, rootElement?: HTMLElement): void;
|
|
|
|
+ private _clearLabels();
|
|
|
|
+ private _generateheader(root, text);
|
|
|
|
+ private _generateTexBox(root, title, color);
|
|
|
|
+ private _generateAdvancedCheckBox(root, leftTitle, rightTitle, initialState, task, tag?);
|
|
|
|
+ private _generateCheckBox(root, title, initialState, task, tag?);
|
|
|
|
+ private _generateButton(root, title, task, tag?);
|
|
|
|
+ private _generateRadio(root, title, name, initialState, task, tag?);
|
|
|
|
+ private _generateDOMelements();
|
|
|
|
+ private _displayStats();
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
class BoundingBox {
|
|
class BoundingBox {
|
|
minimum: Vector3;
|
|
minimum: Vector3;
|
|
maximum: Vector3;
|
|
maximum: Vector3;
|
|
@@ -2417,6 +2474,50 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ class LensFlare {
|
|
|
|
+ size: number;
|
|
|
|
+ position: number;
|
|
|
|
+ color: Color3;
|
|
|
|
+ texture: Texture;
|
|
|
|
+ private _system;
|
|
|
|
+ constructor(size: number, position: number, color: any, imgUrl: string, system: LensFlareSystem);
|
|
|
|
+ dispose: () => void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class LensFlareSystem {
|
|
|
|
+ name: string;
|
|
|
|
+ lensFlares: LensFlare[];
|
|
|
|
+ borderLimit: number;
|
|
|
|
+ meshesSelectionPredicate: (mesh: Mesh) => boolean;
|
|
|
|
+ layerMask: number;
|
|
|
|
+ private _scene;
|
|
|
|
+ private _emitter;
|
|
|
|
+ private _vertexDeclaration;
|
|
|
|
+ private _vertexStrideSize;
|
|
|
|
+ private _vertexBuffer;
|
|
|
|
+ private _indexBuffer;
|
|
|
|
+ private _effect;
|
|
|
|
+ private _positionX;
|
|
|
|
+ private _positionY;
|
|
|
|
+ private _isEnabled;
|
|
|
|
+ constructor(name: string, emitter: any, scene: Scene);
|
|
|
|
+ isEnabled: boolean;
|
|
|
|
+ getScene(): Scene;
|
|
|
|
+ getEmitter(): any;
|
|
|
|
+ setEmitter(newEmitter: any): void;
|
|
|
|
+ getEmitterPosition(): Vector3;
|
|
|
|
+ computeEffectivePosition(globalViewport: Viewport): boolean;
|
|
|
|
+ _isVisible(): boolean;
|
|
|
|
+ render(): boolean;
|
|
|
|
+ dispose(): void;
|
|
|
|
+ static Parse(parsedLensFlareSystem: any, scene: Scene, rootUrl: string): LensFlareSystem;
|
|
|
|
+ serialize(): any;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
class Layer {
|
|
class Layer {
|
|
name: string;
|
|
name: string;
|
|
texture: Texture;
|
|
texture: Texture;
|
|
@@ -2439,63 +2540,6 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- class DebugLayer {
|
|
|
|
- private _scene;
|
|
|
|
- private _camera;
|
|
|
|
- private _transformationMatrix;
|
|
|
|
- private _enabled;
|
|
|
|
- private _labelsEnabled;
|
|
|
|
- private _displayStatistics;
|
|
|
|
- private _displayTree;
|
|
|
|
- private _displayLogs;
|
|
|
|
- private _globalDiv;
|
|
|
|
- private _statsDiv;
|
|
|
|
- private _statsSubsetDiv;
|
|
|
|
- private _optionsDiv;
|
|
|
|
- private _optionsSubsetDiv;
|
|
|
|
- private _logDiv;
|
|
|
|
- private _logSubsetDiv;
|
|
|
|
- private _treeDiv;
|
|
|
|
- private _treeSubsetDiv;
|
|
|
|
- private _drawingCanvas;
|
|
|
|
- private _drawingContext;
|
|
|
|
- private _rootElement;
|
|
|
|
- _syncPositions: () => void;
|
|
|
|
- private _syncData;
|
|
|
|
- private _syncUI;
|
|
|
|
- private _onCanvasClick;
|
|
|
|
- private _clickPosition;
|
|
|
|
- private _ratio;
|
|
|
|
- private _identityMatrix;
|
|
|
|
- private _showUI;
|
|
|
|
- private _needToRefreshMeshesTree;
|
|
|
|
- shouldDisplayLabel: (node: Node) => boolean;
|
|
|
|
- shouldDisplayAxis: (mesh: Mesh) => boolean;
|
|
|
|
- axisRatio: number;
|
|
|
|
- accentColor: string;
|
|
|
|
- customStatsFunction: () => string;
|
|
|
|
- constructor(scene: Scene);
|
|
|
|
- private _refreshMeshesTreeContent();
|
|
|
|
- private _renderSingleAxis(zero, unit, unitText, label, color);
|
|
|
|
- private _renderAxis(projectedPosition, mesh, globalViewport);
|
|
|
|
- private _renderLabel(text, projectedPosition, labelOffset, onClick, getFillStyle);
|
|
|
|
- private _isClickInsideRect(x, y, width, height);
|
|
|
|
- isVisible(): boolean;
|
|
|
|
- hide(): void;
|
|
|
|
- show(showUI?: boolean, camera?: Camera, rootElement?: HTMLElement): void;
|
|
|
|
- private _clearLabels();
|
|
|
|
- private _generateheader(root, text);
|
|
|
|
- private _generateTexBox(root, title, color);
|
|
|
|
- private _generateAdvancedCheckBox(root, leftTitle, rightTitle, initialState, task, tag?);
|
|
|
|
- private _generateCheckBox(root, title, initialState, task, tag?);
|
|
|
|
- private _generateButton(root, title, task, tag?);
|
|
|
|
- private _generateRadio(root, title, name, initialState, task, tag?);
|
|
|
|
- private _generateDOMelements();
|
|
|
|
- private _displayStats();
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
class DirectionalLight extends Light implements IShadowLight {
|
|
class DirectionalLight extends Light implements IShadowLight {
|
|
direction: Vector3;
|
|
direction: Vector3;
|
|
position: Vector3;
|
|
position: Vector3;
|
|
@@ -2623,50 +2667,6 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- class LensFlare {
|
|
|
|
- size: number;
|
|
|
|
- position: number;
|
|
|
|
- color: Color3;
|
|
|
|
- texture: Texture;
|
|
|
|
- private _system;
|
|
|
|
- constructor(size: number, position: number, color: any, imgUrl: string, system: LensFlareSystem);
|
|
|
|
- dispose: () => void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class LensFlareSystem {
|
|
|
|
- name: string;
|
|
|
|
- lensFlares: LensFlare[];
|
|
|
|
- borderLimit: number;
|
|
|
|
- meshesSelectionPredicate: (mesh: Mesh) => boolean;
|
|
|
|
- layerMask: number;
|
|
|
|
- private _scene;
|
|
|
|
- private _emitter;
|
|
|
|
- private _vertexDeclaration;
|
|
|
|
- private _vertexStrideSize;
|
|
|
|
- private _vertexBuffer;
|
|
|
|
- private _indexBuffer;
|
|
|
|
- private _effect;
|
|
|
|
- private _positionX;
|
|
|
|
- private _positionY;
|
|
|
|
- private _isEnabled;
|
|
|
|
- constructor(name: string, emitter: any, scene: Scene);
|
|
|
|
- isEnabled: boolean;
|
|
|
|
- getScene(): Scene;
|
|
|
|
- getEmitter(): any;
|
|
|
|
- setEmitter(newEmitter: any): void;
|
|
|
|
- getEmitterPosition(): Vector3;
|
|
|
|
- computeEffectivePosition(globalViewport: Viewport): boolean;
|
|
|
|
- _isVisible(): boolean;
|
|
|
|
- render(): boolean;
|
|
|
|
- dispose(): void;
|
|
|
|
- static Parse(parsedLensFlareSystem: any, scene: Scene, rootUrl: string): LensFlareSystem;
|
|
|
|
- serialize(): any;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
interface ISceneLoaderPlugin {
|
|
interface ISceneLoaderPlugin {
|
|
extensions: string;
|
|
extensions: string;
|
|
importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
|
|
importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
|
|
@@ -4359,6 +4359,66 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ interface IPhysicsEnginePlugin {
|
|
|
|
+ name: string;
|
|
|
|
+ initialize(iterations?: number): any;
|
|
|
|
+ setGravity(gravity: Vector3): void;
|
|
|
|
+ getGravity(): Vector3;
|
|
|
|
+ runOneStep(delta: number): void;
|
|
|
|
+ registerMesh(mesh: AbstractMesh, impostor: number, options: PhysicsBodyCreationOptions): any;
|
|
|
|
+ registerMeshesAsCompound(parts: PhysicsCompoundBodyPart[], options: PhysicsBodyCreationOptions): any;
|
|
|
|
+ unregisterMesh(mesh: AbstractMesh): any;
|
|
|
|
+ applyImpulse(mesh: AbstractMesh, force: Vector3, contactPoint: Vector3): void;
|
|
|
|
+ createLink(mesh1: AbstractMesh, mesh2: AbstractMesh, pivot1: Vector3, pivot2: Vector3, options?: any): boolean;
|
|
|
|
+ dispose(): void;
|
|
|
|
+ isSupported(): boolean;
|
|
|
|
+ updateBodyPosition(mesh: AbstractMesh): void;
|
|
|
|
+ getWorldObject(): any;
|
|
|
|
+ getPhysicsBodyOfMesh(mesh: AbstractMesh): any;
|
|
|
|
+ }
|
|
|
|
+ interface PhysicsBodyCreationOptions {
|
|
|
|
+ mass: number;
|
|
|
|
+ friction: number;
|
|
|
|
+ restitution: number;
|
|
|
|
+ }
|
|
|
|
+ interface PhysicsCompoundBodyPart {
|
|
|
|
+ mesh: Mesh;
|
|
|
|
+ impostor: number;
|
|
|
|
+ }
|
|
|
|
+ class PhysicsEngine {
|
|
|
|
+ gravity: Vector3;
|
|
|
|
+ private _currentPlugin;
|
|
|
|
+ constructor(plugin?: IPhysicsEnginePlugin);
|
|
|
|
+ _initialize(gravity?: Vector3): void;
|
|
|
|
+ _runOneStep(delta: number): void;
|
|
|
|
+ _setGravity(gravity: Vector3): void;
|
|
|
|
+ _getGravity(): Vector3;
|
|
|
|
+ _registerMesh(mesh: AbstractMesh, impostor: number, options: PhysicsBodyCreationOptions): any;
|
|
|
|
+ _registerMeshesAsCompound(parts: PhysicsCompoundBodyPart[], options: PhysicsBodyCreationOptions): any;
|
|
|
|
+ _unregisterMesh(mesh: AbstractMesh): void;
|
|
|
|
+ _applyImpulse(mesh: AbstractMesh, force: Vector3, contactPoint: Vector3): void;
|
|
|
|
+ _createLink(mesh1: AbstractMesh, mesh2: AbstractMesh, pivot1: Vector3, pivot2: Vector3, options?: any): boolean;
|
|
|
|
+ _updateBodyPosition(mesh: AbstractMesh): void;
|
|
|
|
+ dispose(): void;
|
|
|
|
+ isSupported(): boolean;
|
|
|
|
+ getPhysicsBodyOfMesh(mesh: AbstractMesh): any;
|
|
|
|
+ getPhysicsPluginName(): string;
|
|
|
|
+ getWorldObject(): any;
|
|
|
|
+ static NoImpostor: number;
|
|
|
|
+ static SphereImpostor: number;
|
|
|
|
+ static BoxImpostor: number;
|
|
|
|
+ static PlaneImpostor: number;
|
|
|
|
+ static MeshImpostor: number;
|
|
|
|
+ static CapsuleImpostor: number;
|
|
|
|
+ static ConeImpostor: number;
|
|
|
|
+ static CylinderImpostor: number;
|
|
|
|
+ static ConvexHullImpostor: number;
|
|
|
|
+ static HeightmapImpostor: number;
|
|
|
|
+ static Epsilon: number;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
class SIMDVector3 {
|
|
class SIMDVector3 {
|
|
static TransformCoordinatesToRefSIMD(vector: Vector3, transformation: Matrix, result: Vector3): void;
|
|
static TransformCoordinatesToRefSIMD(vector: Vector3, transformation: Matrix, result: Vector3): void;
|
|
static TransformCoordinatesFromFloatsToRefSIMD(x: number, y: number, z: number, transformation: Matrix, result: Vector3): void;
|
|
static TransformCoordinatesFromFloatsToRefSIMD(x: number, y: number, z: number, transformation: Matrix, result: Vector3): void;
|
|
@@ -5324,66 +5384,6 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- interface IPhysicsEnginePlugin {
|
|
|
|
- name: string;
|
|
|
|
- initialize(iterations?: number): any;
|
|
|
|
- setGravity(gravity: Vector3): void;
|
|
|
|
- getGravity(): Vector3;
|
|
|
|
- runOneStep(delta: number): void;
|
|
|
|
- registerMesh(mesh: AbstractMesh, impostor: number, options: PhysicsBodyCreationOptions): any;
|
|
|
|
- registerMeshesAsCompound(parts: PhysicsCompoundBodyPart[], options: PhysicsBodyCreationOptions): any;
|
|
|
|
- unregisterMesh(mesh: AbstractMesh): any;
|
|
|
|
- applyImpulse(mesh: AbstractMesh, force: Vector3, contactPoint: Vector3): void;
|
|
|
|
- createLink(mesh1: AbstractMesh, mesh2: AbstractMesh, pivot1: Vector3, pivot2: Vector3, options?: any): boolean;
|
|
|
|
- dispose(): void;
|
|
|
|
- isSupported(): boolean;
|
|
|
|
- updateBodyPosition(mesh: AbstractMesh): void;
|
|
|
|
- getWorldObject(): any;
|
|
|
|
- getPhysicsBodyOfMesh(mesh: AbstractMesh): any;
|
|
|
|
- }
|
|
|
|
- interface PhysicsBodyCreationOptions {
|
|
|
|
- mass: number;
|
|
|
|
- friction: number;
|
|
|
|
- restitution: number;
|
|
|
|
- }
|
|
|
|
- interface PhysicsCompoundBodyPart {
|
|
|
|
- mesh: Mesh;
|
|
|
|
- impostor: number;
|
|
|
|
- }
|
|
|
|
- class PhysicsEngine {
|
|
|
|
- gravity: Vector3;
|
|
|
|
- private _currentPlugin;
|
|
|
|
- constructor(plugin?: IPhysicsEnginePlugin);
|
|
|
|
- _initialize(gravity?: Vector3): void;
|
|
|
|
- _runOneStep(delta: number): void;
|
|
|
|
- _setGravity(gravity: Vector3): void;
|
|
|
|
- _getGravity(): Vector3;
|
|
|
|
- _registerMesh(mesh: AbstractMesh, impostor: number, options: PhysicsBodyCreationOptions): any;
|
|
|
|
- _registerMeshesAsCompound(parts: PhysicsCompoundBodyPart[], options: PhysicsBodyCreationOptions): any;
|
|
|
|
- _unregisterMesh(mesh: AbstractMesh): void;
|
|
|
|
- _applyImpulse(mesh: AbstractMesh, force: Vector3, contactPoint: Vector3): void;
|
|
|
|
- _createLink(mesh1: AbstractMesh, mesh2: AbstractMesh, pivot1: Vector3, pivot2: Vector3, options?: any): boolean;
|
|
|
|
- _updateBodyPosition(mesh: AbstractMesh): void;
|
|
|
|
- dispose(): void;
|
|
|
|
- isSupported(): boolean;
|
|
|
|
- getPhysicsBodyOfMesh(mesh: AbstractMesh): any;
|
|
|
|
- getPhysicsPluginName(): string;
|
|
|
|
- getWorldObject(): any;
|
|
|
|
- static NoImpostor: number;
|
|
|
|
- static SphereImpostor: number;
|
|
|
|
- static BoxImpostor: number;
|
|
|
|
- static PlaneImpostor: number;
|
|
|
|
- static MeshImpostor: number;
|
|
|
|
- static CapsuleImpostor: number;
|
|
|
|
- static ConeImpostor: number;
|
|
|
|
- static CylinderImpostor: number;
|
|
|
|
- static ConvexHullImpostor: number;
|
|
|
|
- static HeightmapImpostor: number;
|
|
|
|
- static Epsilon: number;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
class AnaglyphPostProcess extends PostProcess {
|
|
class AnaglyphPostProcess extends PostProcess {
|
|
constructor(name: string, ratio: number, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
constructor(name: string, ratio: number, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
}
|
|
}
|
|
@@ -6137,6 +6137,7 @@ declare module BABYLON {
|
|
private _vertices;
|
|
private _vertices;
|
|
private _effectBase;
|
|
private _effectBase;
|
|
private _effectFog;
|
|
private _effectFog;
|
|
|
|
+ texture: Texture;
|
|
constructor(name: string, imgUrl: string, capacity: number, cellSize: number, scene: Scene, epsilon?: number, samplingMode?: number);
|
|
constructor(name: string, imgUrl: string, capacity: number, cellSize: number, scene: Scene, epsilon?: number, samplingMode?: number);
|
|
private _appendSpriteVertex(index, sprite, offsetX, offsetY, rowSize);
|
|
private _appendSpriteVertex(index, sprite, offsetX, offsetY, rowSize);
|
|
intersects(ray: Ray, camera: Camera, predicate?: (sprite: Sprite) => boolean, fastCheck?: boolean): PickingInfo;
|
|
intersects(ray: Ray, camera: Camera, predicate?: (sprite: Sprite) => boolean, fastCheck?: boolean): PickingInfo;
|