|
@@ -239,6 +239,7 @@ declare module BABYLON {
|
|
applyStates(): void;
|
|
applyStates(): void;
|
|
draw(useTriangles: boolean, indexStart: number, indexCount: number, instancesCount?: number): void;
|
|
draw(useTriangles: boolean, indexStart: number, indexCount: number, instancesCount?: number): void;
|
|
drawPointClouds(verticesStart: number, verticesCount: number, instancesCount?: number): void;
|
|
drawPointClouds(verticesStart: number, verticesCount: number, instancesCount?: number): void;
|
|
|
|
+ drawUnIndexed(useTriangles: boolean, verticesStart: number, verticesCount: number, instancesCount?: number): void;
|
|
_releaseEffect(effect: Effect): void;
|
|
_releaseEffect(effect: Effect): void;
|
|
createEffect(baseName: any, attributesNames: string[], uniformsNames: string[], samplers: string[], defines: string, fallbacks?: EffectFallbacks, onCompiled?: (effect: Effect) => void, onError?: (effect: Effect, errors: string) => void): Effect;
|
|
createEffect(baseName: any, attributesNames: string[], uniformsNames: string[], samplers: string[], defines: string, fallbacks?: EffectFallbacks, onCompiled?: (effect: Effect) => void, onError?: (effect: Effect, errors: string) => void): Effect;
|
|
createEffectForParticles(fragmentName: string, uniformsNames?: string[], samplers?: string[], defines?: string, fallbacks?: EffectFallbacks, onCompiled?: (effect: Effect) => void, onError?: (effect: Effect, errors: string) => void): Effect;
|
|
createEffectForParticles(fragmentName: string, uniformsNames?: string[], samplers?: string[], defines?: string, fallbacks?: EffectFallbacks, onCompiled?: (effect: Effect) => void, onError?: (effect: Effect, errors: string) => void): Effect;
|
|
@@ -903,6 +904,8 @@ declare module BABYLON {
|
|
private _switchAudioModeForNormalSpeakers();
|
|
private _switchAudioModeForNormalSpeakers();
|
|
enableDepthRenderer(): DepthRenderer;
|
|
enableDepthRenderer(): DepthRenderer;
|
|
disableDepthRenderer(): void;
|
|
disableDepthRenderer(): void;
|
|
|
|
+ freezeMaterials(): void;
|
|
|
|
+ unfreezeMaterials(): void;
|
|
dispose(): void;
|
|
dispose(): void;
|
|
disposeSounds(): void;
|
|
disposeSounds(): void;
|
|
getWorldExtends(): {
|
|
getWorldExtends(): {
|
|
@@ -2039,6 +2042,123 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ class BoundingBox {
|
|
|
|
+ minimum: Vector3;
|
|
|
|
+ maximum: Vector3;
|
|
|
|
+ vectors: Vector3[];
|
|
|
|
+ center: Vector3;
|
|
|
|
+ extendSize: Vector3;
|
|
|
|
+ directions: Vector3[];
|
|
|
|
+ vectorsWorld: Vector3[];
|
|
|
|
+ minimumWorld: Vector3;
|
|
|
|
+ maximumWorld: Vector3;
|
|
|
|
+ private _worldMatrix;
|
|
|
|
+ constructor(minimum: Vector3, maximum: Vector3);
|
|
|
|
+ getWorldMatrix(): Matrix;
|
|
|
|
+ _update(world: Matrix): void;
|
|
|
|
+ isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
|
+ isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
|
+ intersectsPoint(point: Vector3): boolean;
|
|
|
|
+ intersectsSphere(sphere: BoundingSphere): boolean;
|
|
|
|
+ intersectsMinMax(min: Vector3, max: Vector3): boolean;
|
|
|
|
+ static Intersects(box0: BoundingBox, box1: BoundingBox): boolean;
|
|
|
|
+ static IntersectsSphere(minPoint: Vector3, maxPoint: Vector3, sphereCenter: Vector3, sphereRadius: number): boolean;
|
|
|
|
+ static IsCompletelyInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
|
|
|
|
+ static IsInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class BoundingInfo {
|
|
|
|
+ minimum: Vector3;
|
|
|
|
+ maximum: Vector3;
|
|
|
|
+ boundingBox: BoundingBox;
|
|
|
|
+ boundingSphere: BoundingSphere;
|
|
|
|
+ constructor(minimum: Vector3, maximum: Vector3);
|
|
|
|
+ _update(world: Matrix): void;
|
|
|
|
+ isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
|
+ isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
|
+ _checkCollision(collider: Collider): boolean;
|
|
|
|
+ intersectsPoint(point: Vector3): boolean;
|
|
|
|
+ intersects(boundingInfo: BoundingInfo, precise: boolean): boolean;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class BoundingSphere {
|
|
|
|
+ minimum: Vector3;
|
|
|
|
+ maximum: Vector3;
|
|
|
|
+ center: Vector3;
|
|
|
|
+ radius: number;
|
|
|
|
+ centerWorld: Vector3;
|
|
|
|
+ radiusWorld: number;
|
|
|
|
+ private _tempRadiusVector;
|
|
|
|
+ constructor(minimum: Vector3, maximum: Vector3);
|
|
|
|
+ _update(world: Matrix): void;
|
|
|
|
+ isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
|
+ intersectsPoint(point: Vector3): boolean;
|
|
|
|
+ static Intersects(sphere0: BoundingSphere, sphere1: BoundingSphere): boolean;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class 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 Collider {
|
|
class Collider {
|
|
radius: Vector3;
|
|
radius: Vector3;
|
|
retry: number;
|
|
retry: number;
|
|
@@ -2280,143 +2400,6 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- class BoundingBox {
|
|
|
|
- minimum: Vector3;
|
|
|
|
- maximum: Vector3;
|
|
|
|
- vectors: Vector3[];
|
|
|
|
- center: Vector3;
|
|
|
|
- extendSize: Vector3;
|
|
|
|
- directions: Vector3[];
|
|
|
|
- vectorsWorld: Vector3[];
|
|
|
|
- minimumWorld: Vector3;
|
|
|
|
- maximumWorld: Vector3;
|
|
|
|
- private _worldMatrix;
|
|
|
|
- constructor(minimum: Vector3, maximum: Vector3);
|
|
|
|
- getWorldMatrix(): Matrix;
|
|
|
|
- _update(world: Matrix): void;
|
|
|
|
- isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
|
- isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
|
- intersectsPoint(point: Vector3): boolean;
|
|
|
|
- intersectsSphere(sphere: BoundingSphere): boolean;
|
|
|
|
- intersectsMinMax(min: Vector3, max: Vector3): boolean;
|
|
|
|
- static Intersects(box0: BoundingBox, box1: BoundingBox): boolean;
|
|
|
|
- static IntersectsSphere(minPoint: Vector3, maxPoint: Vector3, sphereCenter: Vector3, sphereRadius: number): boolean;
|
|
|
|
- static IsCompletelyInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
|
|
|
|
- static IsInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class BoundingInfo {
|
|
|
|
- minimum: Vector3;
|
|
|
|
- maximum: Vector3;
|
|
|
|
- boundingBox: BoundingBox;
|
|
|
|
- boundingSphere: BoundingSphere;
|
|
|
|
- constructor(minimum: Vector3, maximum: Vector3);
|
|
|
|
- _update(world: Matrix): void;
|
|
|
|
- isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
|
- isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
|
- _checkCollision(collider: Collider): boolean;
|
|
|
|
- intersectsPoint(point: Vector3): boolean;
|
|
|
|
- intersects(boundingInfo: BoundingInfo, precise: boolean): boolean;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class BoundingSphere {
|
|
|
|
- minimum: Vector3;
|
|
|
|
- maximum: Vector3;
|
|
|
|
- center: Vector3;
|
|
|
|
- radius: number;
|
|
|
|
- centerWorld: Vector3;
|
|
|
|
- radiusWorld: number;
|
|
|
|
- private _tempRadiusVector;
|
|
|
|
- constructor(minimum: Vector3, maximum: Vector3);
|
|
|
|
- _update(world: Matrix): void;
|
|
|
|
- isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
|
- intersectsPoint(point: Vector3): boolean;
|
|
|
|
- static Intersects(sphere0: BoundingSphere, sphere1: BoundingSphere): boolean;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class 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 Layer {
|
|
|
|
- name: string;
|
|
|
|
- texture: Texture;
|
|
|
|
- isBackground: boolean;
|
|
|
|
- color: Color4;
|
|
|
|
- onDispose: () => void;
|
|
|
|
- alphaBlendingMode: number;
|
|
|
|
- private _scene;
|
|
|
|
- private _vertexDeclaration;
|
|
|
|
- private _vertexStrideSize;
|
|
|
|
- private _vertexBuffer;
|
|
|
|
- private _indexBuffer;
|
|
|
|
- private _effect;
|
|
|
|
- constructor(name: string, imgUrl: string, scene: Scene, isBackground?: boolean, color?: Color4);
|
|
|
|
- render(): void;
|
|
|
|
- dispose(): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
class LensFlare {
|
|
class LensFlare {
|
|
size: number;
|
|
size: number;
|
|
position: number;
|
|
position: number;
|
|
@@ -2461,6 +2444,26 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ class Layer {
|
|
|
|
+ name: string;
|
|
|
|
+ texture: Texture;
|
|
|
|
+ isBackground: boolean;
|
|
|
|
+ color: Color4;
|
|
|
|
+ onDispose: () => void;
|
|
|
|
+ alphaBlendingMode: number;
|
|
|
|
+ private _scene;
|
|
|
|
+ private _vertexDeclaration;
|
|
|
|
+ private _vertexStrideSize;
|
|
|
|
+ private _vertexBuffer;
|
|
|
|
+ private _indexBuffer;
|
|
|
|
+ private _effect;
|
|
|
|
+ constructor(name: string, imgUrl: string, scene: Scene, isBackground?: boolean, color?: Color4);
|
|
|
|
+ render(): void;
|
|
|
|
+ dispose(): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
class DirectionalLight extends Light implements IShadowLight {
|
|
class DirectionalLight extends Light implements IShadowLight {
|
|
direction: Vector3;
|
|
direction: Vector3;
|
|
position: Vector3;
|
|
position: Vector3;
|
|
@@ -2581,40 +2584,8 @@ declare module BABYLON {
|
|
setDirectionToTarget(target: Vector3): Vector3;
|
|
setDirectionToTarget(target: Vector3): Vector3;
|
|
computeTransformedPosition(): boolean;
|
|
computeTransformedPosition(): boolean;
|
|
transferToEffect(effect: Effect, positionUniformName: string, directionUniformName: string): void;
|
|
transferToEffect(effect: Effect, positionUniformName: string, directionUniformName: string): void;
|
|
- _getWorldMatrix(): Matrix;
|
|
|
|
- serialize(): any;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-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 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;
|
|
|
|
|
|
+ _getWorldMatrix(): Matrix;
|
|
|
|
+ serialize(): any;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2738,6 +2709,9 @@ declare module BABYLON {
|
|
pointsCloud: boolean;
|
|
pointsCloud: boolean;
|
|
fillMode: number;
|
|
fillMode: number;
|
|
constructor(name: string, scene: Scene, doNotAdd?: boolean);
|
|
constructor(name: string, scene: Scene, doNotAdd?: boolean);
|
|
|
|
+ isFrozen: boolean;
|
|
|
|
+ freeze(): void;
|
|
|
|
+ unfreeze(): void;
|
|
isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean;
|
|
isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean;
|
|
getEffect(): Effect;
|
|
getEffect(): Effect;
|
|
getScene(): Scene;
|
|
getScene(): Scene;
|
|
@@ -2891,6 +2865,38 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
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 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 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;
|
|
@@ -3517,6 +3523,7 @@ declare module BABYLON {
|
|
_intersectionsInProgress: AbstractMesh[];
|
|
_intersectionsInProgress: AbstractMesh[];
|
|
private _onAfterWorldMatrixUpdate;
|
|
private _onAfterWorldMatrixUpdate;
|
|
private _isWorldMatrixFrozen;
|
|
private _isWorldMatrixFrozen;
|
|
|
|
+ _unIndexed: boolean;
|
|
_waitingActions: any;
|
|
_waitingActions: any;
|
|
_waitingFreezeWorldMatrix: boolean;
|
|
_waitingFreezeWorldMatrix: boolean;
|
|
constructor(name: string, scene: Scene);
|
|
constructor(name: string, scene: Scene);
|
|
@@ -4031,6 +4038,7 @@ declare module BABYLON {
|
|
applyDisplacementMap(url: string, minHeight: number, maxHeight: number, onSuccess?: (mesh: Mesh) => void): void;
|
|
applyDisplacementMap(url: string, minHeight: number, maxHeight: number, onSuccess?: (mesh: Mesh) => void): void;
|
|
applyDisplacementMapFromBuffer(buffer: Uint8Array, heightMapWidth: number, heightMapHeight: number, minHeight: number, maxHeight: number): void;
|
|
applyDisplacementMapFromBuffer(buffer: Uint8Array, heightMapWidth: number, heightMapHeight: number, minHeight: number, maxHeight: number): void;
|
|
convertToFlatShadedMesh(): void;
|
|
convertToFlatShadedMesh(): void;
|
|
|
|
+ convertToUnIndexedMesh(): void;
|
|
flipFaces(flipNormals?: boolean): void;
|
|
flipFaces(flipNormals?: boolean): void;
|
|
createInstance(name: string): InstancedMesh;
|
|
createInstance(name: string): InstancedMesh;
|
|
synchronizeInstances(): void;
|
|
synchronizeInstances(): void;
|
|
@@ -4671,6 +4679,7 @@ declare module BABYLON {
|
|
_distanceToCamera: number;
|
|
_distanceToCamera: number;
|
|
_id: number;
|
|
_id: number;
|
|
constructor(materialIndex: number, verticesStart: number, verticesCount: number, indexStart: any, indexCount: number, mesh: AbstractMesh, renderingMesh?: Mesh, createBoundingBox?: boolean);
|
|
constructor(materialIndex: number, verticesStart: number, verticesCount: number, indexStart: any, indexCount: number, mesh: AbstractMesh, renderingMesh?: Mesh, createBoundingBox?: boolean);
|
|
|
|
+ IsGlobal: boolean;
|
|
getBoundingInfo(): BoundingInfo;
|
|
getBoundingInfo(): BoundingInfo;
|
|
getMesh(): AbstractMesh;
|
|
getMesh(): AbstractMesh;
|
|
getRenderingMesh(): Mesh;
|
|
getRenderingMesh(): Mesh;
|
|
@@ -5018,6 +5027,114 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ class BoundingBoxRenderer {
|
|
|
|
+ frontColor: Color3;
|
|
|
|
+ backColor: Color3;
|
|
|
|
+ showBackLines: boolean;
|
|
|
|
+ renderList: SmartArray<BoundingBox>;
|
|
|
|
+ private _scene;
|
|
|
|
+ private _colorShader;
|
|
|
|
+ private _vb;
|
|
|
|
+ private _ib;
|
|
|
|
+ constructor(scene: Scene);
|
|
|
|
+ private _prepareRessources();
|
|
|
|
+ reset(): void;
|
|
|
|
+ render(): void;
|
|
|
|
+ dispose(): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class DepthRenderer {
|
|
|
|
+ private _scene;
|
|
|
|
+ private _depthMap;
|
|
|
|
+ private _effect;
|
|
|
|
+ private _viewMatrix;
|
|
|
|
+ private _projectionMatrix;
|
|
|
|
+ private _transformMatrix;
|
|
|
|
+ private _worldViewProjection;
|
|
|
|
+ private _cachedDefines;
|
|
|
|
+ constructor(scene: Scene, type?: number);
|
|
|
|
+ isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
|
+ getDepthMap(): RenderTargetTexture;
|
|
|
|
+ dispose(): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class EdgesRenderer {
|
|
|
|
+ private _source;
|
|
|
|
+ private _linesPositions;
|
|
|
|
+ private _linesNormals;
|
|
|
|
+ private _linesIndices;
|
|
|
|
+ private _epsilon;
|
|
|
|
+ private _indicesCount;
|
|
|
|
+ private _lineShader;
|
|
|
|
+ private _vb0;
|
|
|
|
+ private _vb1;
|
|
|
|
+ private _ib;
|
|
|
|
+ private _buffers;
|
|
|
|
+ private _checkVerticesInsteadOfIndices;
|
|
|
|
+ constructor(source: AbstractMesh, epsilon?: number, checkVerticesInsteadOfIndices?: boolean);
|
|
|
|
+ private _prepareRessources();
|
|
|
|
+ dispose(): void;
|
|
|
|
+ private _processEdgeForAdjacencies(pa, pb, p0, p1, p2);
|
|
|
|
+ private _processEdgeForAdjacenciesWithVertices(pa, pb, p0, p1, p2);
|
|
|
|
+ private _checkEdge(faceIndex, edge, faceNormals, p0, p1);
|
|
|
|
+ _generateEdgesLines(): void;
|
|
|
|
+ render(): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class OutlineRenderer {
|
|
|
|
+ private _scene;
|
|
|
|
+ private _effect;
|
|
|
|
+ private _cachedDefines;
|
|
|
|
+ constructor(scene: Scene);
|
|
|
|
+ render(subMesh: SubMesh, batch: _InstancesBatch, useOverlay?: boolean): void;
|
|
|
|
+ isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class RenderingGroup {
|
|
|
|
+ index: number;
|
|
|
|
+ private _scene;
|
|
|
|
+ private _opaqueSubMeshes;
|
|
|
|
+ private _transparentSubMeshes;
|
|
|
|
+ private _alphaTestSubMeshes;
|
|
|
|
+ private _activeVertices;
|
|
|
|
+ onBeforeTransparentRendering: () => void;
|
|
|
|
+ constructor(index: number, scene: Scene);
|
|
|
|
+ render(customRenderFunction: (opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>) => void): boolean;
|
|
|
|
+ prepare(): void;
|
|
|
|
+ dispatch(subMesh: SubMesh): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class RenderingManager {
|
|
|
|
+ static MAX_RENDERINGGROUPS: number;
|
|
|
|
+ private _scene;
|
|
|
|
+ private _renderingGroups;
|
|
|
|
+ private _depthBufferAlreadyCleaned;
|
|
|
|
+ private _currentIndex;
|
|
|
|
+ private _currentActiveMeshes;
|
|
|
|
+ private _currentRenderParticles;
|
|
|
|
+ private _currentRenderSprites;
|
|
|
|
+ constructor(scene: Scene);
|
|
|
|
+ private _renderParticles(index, activeMeshes);
|
|
|
|
+ private _renderSprites(index);
|
|
|
|
+ private _clearDepthBuffer();
|
|
|
|
+ private _renderSpritesAndParticles();
|
|
|
|
+ render(customRenderFunction: (opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>) => void, activeMeshes: AbstractMesh[], renderParticles: boolean, renderSprites: boolean): void;
|
|
|
|
+ reset(): void;
|
|
|
|
+ dispatch(subMesh: SubMesh): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+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);
|
|
}
|
|
}
|
|
@@ -5608,114 +5725,6 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- class BoundingBoxRenderer {
|
|
|
|
- frontColor: Color3;
|
|
|
|
- backColor: Color3;
|
|
|
|
- showBackLines: boolean;
|
|
|
|
- renderList: SmartArray<BoundingBox>;
|
|
|
|
- private _scene;
|
|
|
|
- private _colorShader;
|
|
|
|
- private _vb;
|
|
|
|
- private _ib;
|
|
|
|
- constructor(scene: Scene);
|
|
|
|
- private _prepareRessources();
|
|
|
|
- reset(): void;
|
|
|
|
- render(): void;
|
|
|
|
- dispose(): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class DepthRenderer {
|
|
|
|
- private _scene;
|
|
|
|
- private _depthMap;
|
|
|
|
- private _effect;
|
|
|
|
- private _viewMatrix;
|
|
|
|
- private _projectionMatrix;
|
|
|
|
- private _transformMatrix;
|
|
|
|
- private _worldViewProjection;
|
|
|
|
- private _cachedDefines;
|
|
|
|
- constructor(scene: Scene, type?: number);
|
|
|
|
- isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
|
- getDepthMap(): RenderTargetTexture;
|
|
|
|
- dispose(): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class EdgesRenderer {
|
|
|
|
- private _source;
|
|
|
|
- private _linesPositions;
|
|
|
|
- private _linesNormals;
|
|
|
|
- private _linesIndices;
|
|
|
|
- private _epsilon;
|
|
|
|
- private _indicesCount;
|
|
|
|
- private _lineShader;
|
|
|
|
- private _vb0;
|
|
|
|
- private _vb1;
|
|
|
|
- private _ib;
|
|
|
|
- private _buffers;
|
|
|
|
- private _checkVerticesInsteadOfIndices;
|
|
|
|
- constructor(source: AbstractMesh, epsilon?: number, checkVerticesInsteadOfIndices?: boolean);
|
|
|
|
- private _prepareRessources();
|
|
|
|
- dispose(): void;
|
|
|
|
- private _processEdgeForAdjacencies(pa, pb, p0, p1, p2);
|
|
|
|
- private _processEdgeForAdjacenciesWithVertices(pa, pb, p0, p1, p2);
|
|
|
|
- private _checkEdge(faceIndex, edge, faceNormals, p0, p1);
|
|
|
|
- _generateEdgesLines(): void;
|
|
|
|
- render(): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class OutlineRenderer {
|
|
|
|
- private _scene;
|
|
|
|
- private _effect;
|
|
|
|
- private _cachedDefines;
|
|
|
|
- constructor(scene: Scene);
|
|
|
|
- render(subMesh: SubMesh, batch: _InstancesBatch, useOverlay?: boolean): void;
|
|
|
|
- isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class RenderingGroup {
|
|
|
|
- index: number;
|
|
|
|
- private _scene;
|
|
|
|
- private _opaqueSubMeshes;
|
|
|
|
- private _transparentSubMeshes;
|
|
|
|
- private _alphaTestSubMeshes;
|
|
|
|
- private _activeVertices;
|
|
|
|
- onBeforeTransparentRendering: () => void;
|
|
|
|
- constructor(index: number, scene: Scene);
|
|
|
|
- render(customRenderFunction: (opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>) => void): boolean;
|
|
|
|
- prepare(): void;
|
|
|
|
- dispatch(subMesh: SubMesh): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class RenderingManager {
|
|
|
|
- static MAX_RENDERINGGROUPS: number;
|
|
|
|
- private _scene;
|
|
|
|
- private _renderingGroups;
|
|
|
|
- private _depthBufferAlreadyCleaned;
|
|
|
|
- private _currentIndex;
|
|
|
|
- private _currentActiveMeshes;
|
|
|
|
- private _currentRenderParticles;
|
|
|
|
- private _currentRenderSprites;
|
|
|
|
- constructor(scene: Scene);
|
|
|
|
- private _renderParticles(index, activeMeshes);
|
|
|
|
- private _renderSprites(index);
|
|
|
|
- private _clearDepthBuffer();
|
|
|
|
- private _renderSpritesAndParticles();
|
|
|
|
- render(customRenderFunction: (opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>) => void, activeMeshes: AbstractMesh[], renderParticles: boolean, renderSprites: boolean): void;
|
|
|
|
- reset(): void;
|
|
|
|
- dispatch(subMesh: SubMesh): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
class Sprite {
|
|
class Sprite {
|
|
name: string;
|
|
name: string;
|
|
position: Vector3;
|
|
position: Vector3;
|
|
@@ -6579,9 +6588,6 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-declare module BABYLON.Internals {
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
class BaseTexture {
|
|
class BaseTexture {
|
|
name: string;
|
|
name: string;
|
|
@@ -6789,6 +6795,9 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+declare module BABYLON.Internals {
|
|
|
|
+}
|
|
|
|
+
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
class CannonJSPlugin implements IPhysicsEnginePlugin {
|
|
class CannonJSPlugin implements IPhysicsEnginePlugin {
|
|
private _world;
|
|
private _world;
|