|
@@ -2537,6 +2537,39 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ interface ISceneLoaderPlugin {
|
|
|
+ extensions: string;
|
|
|
+ importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
|
|
|
+ load: (scene: Scene, data: string, rootUrl: string) => boolean;
|
|
|
+ }
|
|
|
+ class SceneLoader {
|
|
|
+ private static _ForceFullSceneLoadingForIncremental;
|
|
|
+ private static _ShowLoadingScreen;
|
|
|
+ static ForceFullSceneLoadingForIncremental: boolean;
|
|
|
+ static ShowLoadingScreen: boolean;
|
|
|
+ private static _registeredPlugins;
|
|
|
+ private static _getPluginForFilename(sceneFilename);
|
|
|
+ static GetPluginForExtension(extension: string): ISceneLoaderPlugin;
|
|
|
+ static RegisterPlugin(plugin: ISceneLoaderPlugin): void;
|
|
|
+ static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, e: any) => void): void;
|
|
|
+ /**
|
|
|
+ * Load a scene
|
|
|
+ * @param rootUrl a string that defines the root url for scene and resources
|
|
|
+ * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
+ * @param engine is the instance of BABYLON.Engine to use to create the scene
|
|
|
+ */
|
|
|
+ static Load(rootUrl: string, sceneFilename: any, engine: Engine, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
|
|
|
+ /**
|
|
|
+ * Append a scene
|
|
|
+ * @param rootUrl a string that defines the root url for scene and resources
|
|
|
+ * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
+ * @param scene is the instance of BABYLON.Scene to append to
|
|
|
+ */
|
|
|
+ static Append(rootUrl: string, sceneFilename: any, scene: Scene, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class DirectionalLight extends Light implements IShadowLight {
|
|
|
direction: Vector3;
|
|
|
position: Vector3;
|
|
@@ -3230,39 +3263,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- interface ISceneLoaderPlugin {
|
|
|
- extensions: string;
|
|
|
- importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
|
|
|
- load: (scene: Scene, data: string, rootUrl: string) => boolean;
|
|
|
- }
|
|
|
- class SceneLoader {
|
|
|
- private static _ForceFullSceneLoadingForIncremental;
|
|
|
- private static _ShowLoadingScreen;
|
|
|
- static ForceFullSceneLoadingForIncremental: boolean;
|
|
|
- static ShowLoadingScreen: boolean;
|
|
|
- private static _registeredPlugins;
|
|
|
- private static _getPluginForFilename(sceneFilename);
|
|
|
- static GetPluginForExtension(extension: string): ISceneLoaderPlugin;
|
|
|
- static RegisterPlugin(plugin: ISceneLoaderPlugin): void;
|
|
|
- static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, e: any) => void): void;
|
|
|
- /**
|
|
|
- * Load a scene
|
|
|
- * @param rootUrl a string that defines the root url for scene and resources
|
|
|
- * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
- * @param engine is the instance of BABYLON.Engine to use to create the scene
|
|
|
- */
|
|
|
- static Load(rootUrl: string, sceneFilename: any, engine: Engine, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
|
|
|
- /**
|
|
|
- * Append a scene
|
|
|
- * @param rootUrl a string that defines the root url for scene and resources
|
|
|
- * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
- * @param scene is the instance of BABYLON.Scene to append to
|
|
|
- */
|
|
|
- static Append(rootUrl: string, sceneFilename: any, scene: Scene, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class EffectFallbacks {
|
|
|
private _defines;
|
|
|
private _currentRank;
|
|
@@ -3305,6 +3305,7 @@ declare module BABYLON {
|
|
|
_loadVertexShader(vertex: any, callback: (data: any) => void): void;
|
|
|
_loadFragmentShader(fragment: any, callback: (data: any) => void): void;
|
|
|
private _dumpShadersName();
|
|
|
+ private _processIncludes(sourceCode, callback);
|
|
|
private _prepareEffect(vertexSourceCode, fragmentSourceCode, attributesNames, defines, fallbacks?);
|
|
|
isSupported: boolean;
|
|
|
_bindTexture(channel: string, texture: WebGLTexture): void;
|
|
@@ -3333,6 +3334,7 @@ declare module BABYLON {
|
|
|
setColor3(uniformName: string, color3: Color3): Effect;
|
|
|
setColor4(uniformName: string, color3: Color3, alpha: number): Effect;
|
|
|
static ShadersStore: {};
|
|
|
+ static IncludesShadersStore: {};
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -3543,6 +3545,66 @@ 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 AbstractMesh extends Node implements IDisposable {
|
|
|
private static _BILLBOARDMODE_NONE;
|
|
|
private static _BILLBOARDMODE_X;
|
|
@@ -5135,13 +5197,11 @@ declare module BABYLON {
|
|
|
* Thus the particles generated from digest() have their property "positiion" yet set.
|
|
|
* @param mesh the mesh to be digested
|
|
|
* @param facetNb the number of mesh facets per particle (optional, default 1), this parameter is overriden by the parameter "number" if any
|
|
|
- * @param delta the random extra number of facets per partical (optional, default 0), each particle will have between facetNb and facetNb + delta facets
|
|
|
* @param number the wanted number of particles : each particle is built with mesh_total_facets / number facets (optional)
|
|
|
*/
|
|
|
digest(mesh: Mesh, options?: {
|
|
|
facetNb?: number;
|
|
|
number?: number;
|
|
|
- delta?: number;
|
|
|
}): void;
|
|
|
private _resetCopy();
|
|
|
private _meshBuilder(p, shape, positions, meshInd, indices, meshUV, uvs, meshCol, colors, idx, idxInShape, options);
|
|
@@ -5284,66 +5344,6 @@ 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 ReflectionProbe {
|
|
|
name: string;
|
|
|
private _scene;
|
|
@@ -5365,68 +5365,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class Sprite {
|
|
|
- name: string;
|
|
|
- position: Vector3;
|
|
|
- color: Color4;
|
|
|
- width: number;
|
|
|
- height: number;
|
|
|
- angle: number;
|
|
|
- cellIndex: number;
|
|
|
- invertU: number;
|
|
|
- invertV: number;
|
|
|
- disposeWhenFinishedAnimating: boolean;
|
|
|
- animations: Animation[];
|
|
|
- isPickable: boolean;
|
|
|
- actionManager: ActionManager;
|
|
|
- private _animationStarted;
|
|
|
- private _loopAnimation;
|
|
|
- private _fromIndex;
|
|
|
- private _toIndex;
|
|
|
- private _delay;
|
|
|
- private _direction;
|
|
|
- private _frameCount;
|
|
|
- private _manager;
|
|
|
- private _time;
|
|
|
- size: number;
|
|
|
- constructor(name: string, manager: SpriteManager);
|
|
|
- playAnimation(from: number, to: number, loop: boolean, delay: number): void;
|
|
|
- stopAnimation(): void;
|
|
|
- _animate(deltaTime: number): void;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class SpriteManager {
|
|
|
- name: string;
|
|
|
- cellSize: number;
|
|
|
- sprites: Sprite[];
|
|
|
- renderingGroupId: number;
|
|
|
- layerMask: number;
|
|
|
- onDispose: () => void;
|
|
|
- fogEnabled: boolean;
|
|
|
- isPickable: boolean;
|
|
|
- private _capacity;
|
|
|
- private _spriteTexture;
|
|
|
- private _epsilon;
|
|
|
- private _scene;
|
|
|
- private _vertexDeclaration;
|
|
|
- private _vertexStrideSize;
|
|
|
- private _vertexBuffer;
|
|
|
- private _indexBuffer;
|
|
|
- private _vertices;
|
|
|
- private _effectBase;
|
|
|
- private _effectFog;
|
|
|
- constructor(name: string, imgUrl: string, capacity: number, cellSize: number, scene: Scene, epsilon?: number, samplingMode?: number);
|
|
|
- private _appendSpriteVertex(index, sprite, offsetX, offsetY, rowSize);
|
|
|
- intersects(ray: Ray, camera: Camera, predicate?: (sprite: Sprite) => boolean, fastCheck?: boolean): PickingInfo;
|
|
|
- render(): void;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class AnaglyphPostProcess extends PostProcess {
|
|
|
constructor(name: string, ratio: number, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
}
|
|
@@ -5996,6 +5934,68 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class Sprite {
|
|
|
+ name: string;
|
|
|
+ position: Vector3;
|
|
|
+ color: Color4;
|
|
|
+ width: number;
|
|
|
+ height: number;
|
|
|
+ angle: number;
|
|
|
+ cellIndex: number;
|
|
|
+ invertU: number;
|
|
|
+ invertV: number;
|
|
|
+ disposeWhenFinishedAnimating: boolean;
|
|
|
+ animations: Animation[];
|
|
|
+ isPickable: boolean;
|
|
|
+ actionManager: ActionManager;
|
|
|
+ private _animationStarted;
|
|
|
+ private _loopAnimation;
|
|
|
+ private _fromIndex;
|
|
|
+ private _toIndex;
|
|
|
+ private _delay;
|
|
|
+ private _direction;
|
|
|
+ private _frameCount;
|
|
|
+ private _manager;
|
|
|
+ private _time;
|
|
|
+ size: number;
|
|
|
+ constructor(name: string, manager: SpriteManager);
|
|
|
+ playAnimation(from: number, to: number, loop: boolean, delay: number): void;
|
|
|
+ stopAnimation(): void;
|
|
|
+ _animate(deltaTime: number): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class SpriteManager {
|
|
|
+ name: string;
|
|
|
+ cellSize: number;
|
|
|
+ sprites: Sprite[];
|
|
|
+ renderingGroupId: number;
|
|
|
+ layerMask: number;
|
|
|
+ onDispose: () => void;
|
|
|
+ fogEnabled: boolean;
|
|
|
+ isPickable: boolean;
|
|
|
+ private _capacity;
|
|
|
+ private _spriteTexture;
|
|
|
+ private _epsilon;
|
|
|
+ private _scene;
|
|
|
+ private _vertexDeclaration;
|
|
|
+ private _vertexStrideSize;
|
|
|
+ private _vertexBuffer;
|
|
|
+ private _indexBuffer;
|
|
|
+ private _vertices;
|
|
|
+ private _effectBase;
|
|
|
+ private _effectFog;
|
|
|
+ constructor(name: string, imgUrl: string, capacity: number, cellSize: number, scene: Scene, epsilon?: number, samplingMode?: number);
|
|
|
+ private _appendSpriteVertex(index, sprite, offsetX, offsetY, rowSize);
|
|
|
+ intersects(ray: Ray, camera: Camera, predicate?: (sprite: Sprite) => boolean, fastCheck?: boolean): PickingInfo;
|
|
|
+ render(): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class BoundingBoxRenderer {
|
|
|
frontColor: Color3;
|
|
|
backColor: Color3;
|
|
@@ -6848,6 +6848,9 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+declare module BABYLON.Internals {
|
|
|
+}
|
|
|
+
|
|
|
declare module BABYLON {
|
|
|
class ShadowGenerator {
|
|
|
private static _FILTER_NONE;
|
|
@@ -6906,9 +6909,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-declare module BABYLON.Internals {
|
|
|
-}
|
|
|
-
|
|
|
declare module BABYLON {
|
|
|
class BaseTexture {
|
|
|
name: string;
|