|
@@ -376,7 +376,7 @@ declare module BABYLON {
|
|
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;
|
|
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, indexParameters?: any): Effect;
|
|
|
|
|
|
+ createEffect(baseName: any, attributesNamesOrOptions: string[] | EffectCreationOptions, uniformsNamesOrEngine: string[] | Engine, samplers?: string[], defines?: string, fallbacks?: EffectFallbacks, onCompiled?: (effect: Effect) => void, onError?: (effect: Effect, errors: string) => void, indexParameters?: any): 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;
|
|
createShaderProgram(vertexCode: string, fragmentCode: string, defines: string, context?: WebGLRenderingContext): WebGLProgram;
|
|
createShaderProgram(vertexCode: string, fragmentCode: string, defines: string, context?: WebGLRenderingContext): WebGLProgram;
|
|
getUniforms(shaderProgram: WebGLProgram, uniformsNames: string[]): WebGLUniformLocation[];
|
|
getUniforms(shaderProgram: WebGLProgram, uniformsNames: string[]): WebGLUniformLocation[];
|
|
@@ -3887,6 +3887,111 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+declare module BABYLON.Debug {
|
|
|
|
+ class AxesViewer {
|
|
|
|
+ private _xline;
|
|
|
|
+ private _yline;
|
|
|
|
+ private _zline;
|
|
|
|
+ private _xmesh;
|
|
|
|
+ private _ymesh;
|
|
|
|
+ private _zmesh;
|
|
|
|
+ scene: Scene;
|
|
|
|
+ scaleLines: number;
|
|
|
|
+ constructor(scene: Scene, scaleLines?: number);
|
|
|
|
+ update(position: Vector3, xaxis: Vector3, yaxis: Vector3, zaxis: Vector3): void;
|
|
|
|
+ dispose(): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON.Debug {
|
|
|
|
+ class BoneAxesViewer extends Debug.AxesViewer {
|
|
|
|
+ mesh: Mesh;
|
|
|
|
+ bone: Bone;
|
|
|
|
+ pos: Vector3;
|
|
|
|
+ xaxis: Vector3;
|
|
|
|
+ yaxis: Vector3;
|
|
|
|
+ zaxis: Vector3;
|
|
|
|
+ constructor(scene: Scene, bone: Bone, mesh: Mesh, scaleLines?: number);
|
|
|
|
+ update(): void;
|
|
|
|
+ dispose(): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class DebugLayer {
|
|
|
|
+ private _scene;
|
|
|
|
+ static InspectorURL: string;
|
|
|
|
+ private _inspector;
|
|
|
|
+ constructor(scene: Scene);
|
|
|
|
+ /** Creates the inspector window. */
|
|
|
|
+ private _createInspector(config?);
|
|
|
|
+ isVisible(): boolean;
|
|
|
|
+ hide(): void;
|
|
|
|
+ show(config?: {
|
|
|
|
+ popup?: boolean;
|
|
|
|
+ initialTab?: number;
|
|
|
|
+ parentElement?: HTMLElement;
|
|
|
|
+ newColors?: {
|
|
|
|
+ backgroundColor?: string;
|
|
|
|
+ backgroundColorLighter?: string;
|
|
|
|
+ backgroundColorLighter2?: string;
|
|
|
|
+ backgroundColorLighter3?: string;
|
|
|
|
+ color?: string;
|
|
|
|
+ colorTop?: string;
|
|
|
|
+ colorBot?: string;
|
|
|
|
+ };
|
|
|
|
+ }): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class RayHelper {
|
|
|
|
+ ray: Ray;
|
|
|
|
+ private _renderPoints;
|
|
|
|
+ private _renderLine;
|
|
|
|
+ private _renderFunction;
|
|
|
|
+ private _scene;
|
|
|
|
+ private _updateToMeshFunction;
|
|
|
|
+ private _attachedToMesh;
|
|
|
|
+ private _meshSpaceDirection;
|
|
|
|
+ private _meshSpaceOrigin;
|
|
|
|
+ static CreateAndShow(ray: Ray, scene: Scene, color: Color3): RayHelper;
|
|
|
|
+ constructor(ray: Ray);
|
|
|
|
+ show(scene: Scene, color: Color3): void;
|
|
|
|
+ hide(): void;
|
|
|
|
+ private _render();
|
|
|
|
+ attachToMesh(mesh: AbstractMesh, meshSpaceDirection?: Vector3, meshSpaceOrigin?: Vector3, length?: number): void;
|
|
|
|
+ detachFromMesh(): void;
|
|
|
|
+ private _updateToMesh();
|
|
|
|
+ dispose(): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON.Debug {
|
|
|
|
+ /**
|
|
|
|
+ * Demo available here: http://www.babylonjs-playground.com/#1BZJVJ#8
|
|
|
|
+ */
|
|
|
|
+ class SkeletonViewer {
|
|
|
|
+ skeleton: Skeleton;
|
|
|
|
+ mesh: AbstractMesh;
|
|
|
|
+ autoUpdateBonesMatrices: boolean;
|
|
|
|
+ renderingGroupId: number;
|
|
|
|
+ color: Color3;
|
|
|
|
+ private _scene;
|
|
|
|
+ private _debugLines;
|
|
|
|
+ private _debugMesh;
|
|
|
|
+ private _isEnabled;
|
|
|
|
+ private _renderFunction;
|
|
|
|
+ constructor(skeleton: Skeleton, mesh: AbstractMesh, scene: Scene, autoUpdateBonesMatrices?: boolean, renderingGroupId?: number);
|
|
|
|
+ isEnabled: boolean;
|
|
|
|
+ private _getBonePosition(position, bone, meshMat, x?, y?, z?);
|
|
|
|
+ private _getLinesForBonesWithLength(bones, meshMat);
|
|
|
|
+ private _getLinesForBonesNoLength(bones, meshMat);
|
|
|
|
+ update(): void;
|
|
|
|
+ dispose(): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
class BoundingBox implements ICullable {
|
|
class BoundingBox implements ICullable {
|
|
minimum: Vector3;
|
|
minimum: Vector3;
|
|
@@ -4001,111 +4106,6 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-declare module BABYLON.Debug {
|
|
|
|
- class AxesViewer {
|
|
|
|
- private _xline;
|
|
|
|
- private _yline;
|
|
|
|
- private _zline;
|
|
|
|
- private _xmesh;
|
|
|
|
- private _ymesh;
|
|
|
|
- private _zmesh;
|
|
|
|
- scene: Scene;
|
|
|
|
- scaleLines: number;
|
|
|
|
- constructor(scene: Scene, scaleLines?: number);
|
|
|
|
- update(position: Vector3, xaxis: Vector3, yaxis: Vector3, zaxis: Vector3): void;
|
|
|
|
- dispose(): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON.Debug {
|
|
|
|
- class BoneAxesViewer extends Debug.AxesViewer {
|
|
|
|
- mesh: Mesh;
|
|
|
|
- bone: Bone;
|
|
|
|
- pos: Vector3;
|
|
|
|
- xaxis: Vector3;
|
|
|
|
- yaxis: Vector3;
|
|
|
|
- zaxis: Vector3;
|
|
|
|
- constructor(scene: Scene, bone: Bone, mesh: Mesh, scaleLines?: number);
|
|
|
|
- update(): void;
|
|
|
|
- dispose(): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class DebugLayer {
|
|
|
|
- private _scene;
|
|
|
|
- static InspectorURL: string;
|
|
|
|
- private _inspector;
|
|
|
|
- constructor(scene: Scene);
|
|
|
|
- /** Creates the inspector window. */
|
|
|
|
- private _createInspector(config?);
|
|
|
|
- isVisible(): boolean;
|
|
|
|
- hide(): void;
|
|
|
|
- show(config?: {
|
|
|
|
- popup?: boolean;
|
|
|
|
- initialTab?: number;
|
|
|
|
- parentElement?: HTMLElement;
|
|
|
|
- newColors?: {
|
|
|
|
- backgroundColor?: string;
|
|
|
|
- backgroundColorLighter?: string;
|
|
|
|
- backgroundColorLighter2?: string;
|
|
|
|
- backgroundColorLighter3?: string;
|
|
|
|
- color?: string;
|
|
|
|
- colorTop?: string;
|
|
|
|
- colorBot?: string;
|
|
|
|
- };
|
|
|
|
- }): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class RayHelper {
|
|
|
|
- ray: Ray;
|
|
|
|
- private _renderPoints;
|
|
|
|
- private _renderLine;
|
|
|
|
- private _renderFunction;
|
|
|
|
- private _scene;
|
|
|
|
- private _updateToMeshFunction;
|
|
|
|
- private _attachedToMesh;
|
|
|
|
- private _meshSpaceDirection;
|
|
|
|
- private _meshSpaceOrigin;
|
|
|
|
- static CreateAndShow(ray: Ray, scene: Scene, color: Color3): RayHelper;
|
|
|
|
- constructor(ray: Ray);
|
|
|
|
- show(scene: Scene, color: Color3): void;
|
|
|
|
- hide(): void;
|
|
|
|
- private _render();
|
|
|
|
- attachToMesh(mesh: AbstractMesh, meshSpaceDirection?: Vector3, meshSpaceOrigin?: Vector3, length?: number): void;
|
|
|
|
- detachFromMesh(): void;
|
|
|
|
- private _updateToMesh();
|
|
|
|
- dispose(): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON.Debug {
|
|
|
|
- /**
|
|
|
|
- * Demo available here: http://www.babylonjs-playground.com/#1BZJVJ#8
|
|
|
|
- */
|
|
|
|
- class SkeletonViewer {
|
|
|
|
- skeleton: Skeleton;
|
|
|
|
- mesh: AbstractMesh;
|
|
|
|
- autoUpdateBonesMatrices: boolean;
|
|
|
|
- renderingGroupId: number;
|
|
|
|
- color: Color3;
|
|
|
|
- private _scene;
|
|
|
|
- private _debugLines;
|
|
|
|
- private _debugMesh;
|
|
|
|
- private _isEnabled;
|
|
|
|
- private _renderFunction;
|
|
|
|
- constructor(skeleton: Skeleton, mesh: AbstractMesh, scene: Scene, autoUpdateBonesMatrices?: boolean, renderingGroupId?: number);
|
|
|
|
- isEnabled: boolean;
|
|
|
|
- private _getBonePosition(position, bone, meshMat, x?, y?, z?);
|
|
|
|
- private _getLinesForBonesWithLength(bones, meshMat);
|
|
|
|
- private _getLinesForBonesNoLength(bones, meshMat);
|
|
|
|
- update(): void;
|
|
|
|
- dispose(): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
class LensFlare {
|
|
class LensFlare {
|
|
size: number;
|
|
size: number;
|
|
@@ -5091,6 +5091,16 @@ declare module BABYLON {
|
|
readonly isMoreFallbacks: boolean;
|
|
readonly isMoreFallbacks: boolean;
|
|
reduce(currentDefines: string): string;
|
|
reduce(currentDefines: string): string;
|
|
}
|
|
}
|
|
|
|
+ class EffectCreationOptions {
|
|
|
|
+ attributes: string[];
|
|
|
|
+ uniformsNames: string[];
|
|
|
|
+ samplers: string[];
|
|
|
|
+ defines: string;
|
|
|
|
+ fallbacks: EffectFallbacks;
|
|
|
|
+ onCompiled: (effect: Effect) => void;
|
|
|
|
+ onError: (effect: Effect, errors: string) => void;
|
|
|
|
+ indexParameters: any;
|
|
|
|
+ }
|
|
class Effect {
|
|
class Effect {
|
|
name: any;
|
|
name: any;
|
|
defines: string;
|
|
defines: string;
|
|
@@ -5109,9 +5119,10 @@ declare module BABYLON {
|
|
private _uniforms;
|
|
private _uniforms;
|
|
_key: string;
|
|
_key: string;
|
|
private _indexParameters;
|
|
private _indexParameters;
|
|
|
|
+ private _fallbacks;
|
|
private _program;
|
|
private _program;
|
|
private _valueCache;
|
|
private _valueCache;
|
|
- constructor(baseName: any, attributesNames: string[], uniformsNames: string[], samplers: string[], engine: any, defines?: string, fallbacks?: EffectFallbacks, onCompiled?: (effect: Effect) => void, onError?: (effect: Effect, errors: string) => void, indexParameters?: any);
|
|
|
|
|
|
+ constructor(baseName: any, attributesNamesOrOptions: string[] | EffectCreationOptions, uniformsNamesOrEngine: string[] | Engine, samplers?: string[], engine?: Engine, defines?: string, fallbacks?: EffectFallbacks, onCompiled?: (effect: Effect) => void, onError?: (effect: Effect, errors: string) => void, indexParameters?: any);
|
|
readonly key: string;
|
|
readonly key: string;
|
|
isReady(): boolean;
|
|
isReady(): boolean;
|
|
getProgram(): WebGLProgram;
|
|
getProgram(): WebGLProgram;
|
|
@@ -7981,83 +7992,29 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- class MorphTarget {
|
|
|
|
- name: string;
|
|
|
|
- private _positions;
|
|
|
|
- private _normals;
|
|
|
|
- private _influence;
|
|
|
|
- onInfluenceChanged: Observable<boolean>;
|
|
|
|
- influence: number;
|
|
|
|
- constructor(name: string, influence?: number);
|
|
|
|
- readonly hasNormals: boolean;
|
|
|
|
- setPositions(data: Float32Array | number[]): void;
|
|
|
|
- getPositions(): Float32Array;
|
|
|
|
- setNormals(data: Float32Array | number[]): void;
|
|
|
|
- getNormals(): Float32Array;
|
|
|
|
|
|
+ class AbstractMesh extends Node implements IDisposable, ICullable, IGetSetVerticesData {
|
|
|
|
+ private static _BILLBOARDMODE_NONE;
|
|
|
|
+ private static _BILLBOARDMODE_X;
|
|
|
|
+ private static _BILLBOARDMODE_Y;
|
|
|
|
+ private static _BILLBOARDMODE_Z;
|
|
|
|
+ private static _BILLBOARDMODE_ALL;
|
|
|
|
+ static readonly BILLBOARDMODE_NONE: number;
|
|
|
|
+ static readonly BILLBOARDMODE_X: number;
|
|
|
|
+ static readonly BILLBOARDMODE_Y: number;
|
|
|
|
+ static readonly BILLBOARDMODE_Z: number;
|
|
|
|
+ static readonly BILLBOARDMODE_ALL: number;
|
|
|
|
+ private _facetPositions;
|
|
|
|
+ private _facetNormals;
|
|
|
|
+ private _facetPartitioning;
|
|
|
|
+ private _facetNb;
|
|
|
|
+ private _partitioningSubdivisions;
|
|
|
|
+ private _partitioningBBoxRatio;
|
|
|
|
+ private _facetDataEnabled;
|
|
|
|
+ private _facetParameters;
|
|
|
|
+ private _bbSize;
|
|
|
|
+ private _subDiv;
|
|
/**
|
|
/**
|
|
- * Serializes the current target into a Serialization object.
|
|
|
|
- * Returns the serialized object.
|
|
|
|
- */
|
|
|
|
- serialize(): any;
|
|
|
|
- static Parse(serializationObject: any): MorphTarget;
|
|
|
|
- static FromMesh(mesh: AbstractMesh, name?: string, influence?: number): MorphTarget;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class MorphTargetManager {
|
|
|
|
- private _targets;
|
|
|
|
- private _targetObservable;
|
|
|
|
- private _activeTargets;
|
|
|
|
- private _scene;
|
|
|
|
- private _influences;
|
|
|
|
- private _supportsNormals;
|
|
|
|
- private _vertexCount;
|
|
|
|
- private _uniqueId;
|
|
|
|
- constructor(scene?: Scene);
|
|
|
|
- readonly uniqueId: number;
|
|
|
|
- readonly vertexCount: number;
|
|
|
|
- readonly supportsNormals: boolean;
|
|
|
|
- readonly numInfluencers: number;
|
|
|
|
- readonly influences: Float32Array;
|
|
|
|
- getActiveTarget(index: number): MorphTarget;
|
|
|
|
- addTarget(target: MorphTarget): void;
|
|
|
|
- removeTarget(target: MorphTarget): void;
|
|
|
|
- /**
|
|
|
|
- * Serializes the current manager into a Serialization object.
|
|
|
|
- * Returns the serialized object.
|
|
|
|
- */
|
|
|
|
- serialize(): any;
|
|
|
|
- private _onInfluenceChanged(needUpdate);
|
|
|
|
- private _syncActiveTargets(needUpdate);
|
|
|
|
- static Parse(serializationObject: any, scene: Scene): MorphTargetManager;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class AbstractMesh extends Node implements IDisposable, ICullable, IGetSetVerticesData {
|
|
|
|
- private static _BILLBOARDMODE_NONE;
|
|
|
|
- private static _BILLBOARDMODE_X;
|
|
|
|
- private static _BILLBOARDMODE_Y;
|
|
|
|
- private static _BILLBOARDMODE_Z;
|
|
|
|
- private static _BILLBOARDMODE_ALL;
|
|
|
|
- static readonly BILLBOARDMODE_NONE: number;
|
|
|
|
- static readonly BILLBOARDMODE_X: number;
|
|
|
|
- static readonly BILLBOARDMODE_Y: number;
|
|
|
|
- static readonly BILLBOARDMODE_Z: number;
|
|
|
|
- static readonly BILLBOARDMODE_ALL: number;
|
|
|
|
- private _facetPositions;
|
|
|
|
- private _facetNormals;
|
|
|
|
- private _facetPartitioning;
|
|
|
|
- private _facetNb;
|
|
|
|
- private _partitioningSubdivisions;
|
|
|
|
- private _partitioningBBoxRatio;
|
|
|
|
- private _facetDataEnabled;
|
|
|
|
- private _facetParameters;
|
|
|
|
- private _bbSize;
|
|
|
|
- private _subDiv;
|
|
|
|
- /**
|
|
|
|
- * Read-only : the number of facets in the mesh
|
|
|
|
|
|
+ * Read-only : the number of facets in the mesh
|
|
*/
|
|
*/
|
|
readonly facetNb: number;
|
|
readonly facetNb: number;
|
|
/**
|
|
/**
|
|
@@ -11710,6 +11667,60 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ class MorphTarget {
|
|
|
|
+ name: string;
|
|
|
|
+ private _positions;
|
|
|
|
+ private _normals;
|
|
|
|
+ private _influence;
|
|
|
|
+ onInfluenceChanged: Observable<boolean>;
|
|
|
|
+ influence: number;
|
|
|
|
+ constructor(name: string, influence?: number);
|
|
|
|
+ readonly hasNormals: boolean;
|
|
|
|
+ setPositions(data: Float32Array | number[]): void;
|
|
|
|
+ getPositions(): Float32Array;
|
|
|
|
+ setNormals(data: Float32Array | number[]): void;
|
|
|
|
+ getNormals(): Float32Array;
|
|
|
|
+ /**
|
|
|
|
+ * Serializes the current target into a Serialization object.
|
|
|
|
+ * Returns the serialized object.
|
|
|
|
+ */
|
|
|
|
+ serialize(): any;
|
|
|
|
+ static Parse(serializationObject: any): MorphTarget;
|
|
|
|
+ static FromMesh(mesh: AbstractMesh, name?: string, influence?: number): MorphTarget;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class MorphTargetManager {
|
|
|
|
+ private _targets;
|
|
|
|
+ private _targetObservable;
|
|
|
|
+ private _activeTargets;
|
|
|
|
+ private _scene;
|
|
|
|
+ private _influences;
|
|
|
|
+ private _supportsNormals;
|
|
|
|
+ private _vertexCount;
|
|
|
|
+ private _uniqueId;
|
|
|
|
+ constructor(scene?: Scene);
|
|
|
|
+ readonly uniqueId: number;
|
|
|
|
+ readonly vertexCount: number;
|
|
|
|
+ readonly supportsNormals: boolean;
|
|
|
|
+ readonly numInfluencers: number;
|
|
|
|
+ readonly influences: Float32Array;
|
|
|
|
+ getActiveTarget(index: number): MorphTarget;
|
|
|
|
+ addTarget(target: MorphTarget): void;
|
|
|
|
+ removeTarget(target: MorphTarget): void;
|
|
|
|
+ /**
|
|
|
|
+ * Serializes the current manager into a Serialization object.
|
|
|
|
+ * Returns the serialized object.
|
|
|
|
+ */
|
|
|
|
+ serialize(): any;
|
|
|
|
+ private _onInfluenceChanged(needUpdate);
|
|
|
|
+ private _syncActiveTargets(needUpdate);
|
|
|
|
+ static Parse(serializationObject: any, scene: Scene): MorphTargetManager;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
interface PhysicsImpostorJoint {
|
|
interface PhysicsImpostorJoint {
|
|
mainImpostor: PhysicsImpostor;
|
|
mainImpostor: PhysicsImpostor;
|
|
connectedImpostor: PhysicsImpostor;
|
|
connectedImpostor: PhysicsImpostor;
|
|
@@ -13006,76 +13017,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;
|
|
|
|
- private _onAnimationEnd;
|
|
|
|
- size: number;
|
|
|
|
- constructor(name: string, manager: SpriteManager);
|
|
|
|
- playAnimation(from: number, to: number, loop: boolean, delay: number, onAnimationEnd: () => void): void;
|
|
|
|
- stopAnimation(): void;
|
|
|
|
- _animate(deltaTime: number): void;
|
|
|
|
- dispose(): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class SpriteManager {
|
|
|
|
- name: string;
|
|
|
|
- sprites: Sprite[];
|
|
|
|
- renderingGroupId: number;
|
|
|
|
- layerMask: number;
|
|
|
|
- fogEnabled: boolean;
|
|
|
|
- isPickable: boolean;
|
|
|
|
- cellWidth: number;
|
|
|
|
- cellHeight: number;
|
|
|
|
- /**
|
|
|
|
- * An event triggered when the manager is disposed.
|
|
|
|
- * @type {BABYLON.Observable}
|
|
|
|
- */
|
|
|
|
- onDisposeObservable: Observable<SpriteManager>;
|
|
|
|
- private _onDisposeObserver;
|
|
|
|
- onDispose: () => void;
|
|
|
|
- private _capacity;
|
|
|
|
- private _spriteTexture;
|
|
|
|
- private _epsilon;
|
|
|
|
- private _scene;
|
|
|
|
- private _vertexData;
|
|
|
|
- private _buffer;
|
|
|
|
- private _vertexBuffers;
|
|
|
|
- private _indexBuffer;
|
|
|
|
- private _effectBase;
|
|
|
|
- private _effectFog;
|
|
|
|
- texture: Texture;
|
|
|
|
- constructor(name: string, imgUrl: string, capacity: number, cellSize: any, 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.Internals {
|
|
declare module BABYLON.Internals {
|
|
class _AlphaState {
|
|
class _AlphaState {
|
|
private _isAlphaBlendDirty;
|
|
private _isAlphaBlendDirty;
|
|
@@ -14469,6 +14410,199 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
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;
|
|
|
|
+ private _onAnimationEnd;
|
|
|
|
+ size: number;
|
|
|
|
+ constructor(name: string, manager: SpriteManager);
|
|
|
|
+ playAnimation(from: number, to: number, loop: boolean, delay: number, onAnimationEnd: () => void): void;
|
|
|
|
+ stopAnimation(): void;
|
|
|
|
+ _animate(deltaTime: number): void;
|
|
|
|
+ dispose(): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class SpriteManager {
|
|
|
|
+ name: string;
|
|
|
|
+ sprites: Sprite[];
|
|
|
|
+ renderingGroupId: number;
|
|
|
|
+ layerMask: number;
|
|
|
|
+ fogEnabled: boolean;
|
|
|
|
+ isPickable: boolean;
|
|
|
|
+ cellWidth: number;
|
|
|
|
+ cellHeight: number;
|
|
|
|
+ /**
|
|
|
|
+ * An event triggered when the manager is disposed.
|
|
|
|
+ * @type {BABYLON.Observable}
|
|
|
|
+ */
|
|
|
|
+ onDisposeObservable: Observable<SpriteManager>;
|
|
|
|
+ private _onDisposeObserver;
|
|
|
|
+ onDispose: () => void;
|
|
|
|
+ private _capacity;
|
|
|
|
+ private _spriteTexture;
|
|
|
|
+ private _epsilon;
|
|
|
|
+ private _scene;
|
|
|
|
+ private _vertexData;
|
|
|
|
+ private _buffer;
|
|
|
|
+ private _vertexBuffers;
|
|
|
|
+ private _indexBuffer;
|
|
|
|
+ private _effectBase;
|
|
|
|
+ private _effectFog;
|
|
|
|
+ texture: Texture;
|
|
|
|
+ constructor(name: string, imgUrl: string, capacity: number, cellSize: any, 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 VRCameraMetrics {
|
|
|
|
+ hResolution: number;
|
|
|
|
+ vResolution: number;
|
|
|
|
+ hScreenSize: number;
|
|
|
|
+ vScreenSize: number;
|
|
|
|
+ vScreenCenter: number;
|
|
|
|
+ eyeToScreenDistance: number;
|
|
|
|
+ lensSeparationDistance: number;
|
|
|
|
+ interpupillaryDistance: number;
|
|
|
|
+ distortionK: number[];
|
|
|
|
+ chromaAbCorrection: number[];
|
|
|
|
+ postProcessScaleFactor: number;
|
|
|
|
+ lensCenterOffset: number;
|
|
|
|
+ compensateDistortion: boolean;
|
|
|
|
+ readonly aspectRatio: number;
|
|
|
|
+ readonly aspectRatioFov: number;
|
|
|
|
+ readonly leftHMatrix: Matrix;
|
|
|
|
+ readonly rightHMatrix: Matrix;
|
|
|
|
+ readonly leftPreViewMatrix: Matrix;
|
|
|
|
+ readonly rightPreViewMatrix: Matrix;
|
|
|
|
+ static GetDefault(): VRCameraMetrics;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class VRDeviceOrientationFreeCamera extends DeviceOrientationCamera {
|
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
|
+ getClassName(): string;
|
|
|
|
+ }
|
|
|
|
+ class VRDeviceOrientationGamepadCamera extends VRDeviceOrientationFreeCamera {
|
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
|
+ getClassName(): string;
|
|
|
|
+ }
|
|
|
|
+ class VRDeviceOrientationArcRotateCamera extends ArcRotateCamera {
|
|
|
|
+ constructor(name: string, alpha: number, beta: number, radius: number, target: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
|
+ getClassName(): string;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare var HMDVRDevice: any;
|
|
|
|
+declare var VRDisplay: any;
|
|
|
|
+declare var VRFrameData: any;
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ /**
|
|
|
|
+ * This is a copy of VRPose.
|
|
|
|
+ * IMPORTANT!! The data is right-hand data.
|
|
|
|
+ * @export
|
|
|
|
+ * @interface DevicePose
|
|
|
|
+ */
|
|
|
|
+ interface DevicePose {
|
|
|
|
+ readonly position?: Float32Array;
|
|
|
|
+ readonly linearVelocity?: Float32Array;
|
|
|
|
+ readonly linearAcceleration?: Float32Array;
|
|
|
|
+ readonly orientation?: Float32Array;
|
|
|
|
+ readonly angularVelocity?: Float32Array;
|
|
|
|
+ readonly angularAcceleration?: Float32Array;
|
|
|
|
+ }
|
|
|
|
+ interface PoseControlled {
|
|
|
|
+ position: Vector3;
|
|
|
|
+ rotationQuaternion: Quaternion;
|
|
|
|
+ devicePosition?: Vector3;
|
|
|
|
+ deviceRotationQuaternion: Quaternion;
|
|
|
|
+ rawPose: DevicePose;
|
|
|
|
+ deviceScaleFactor: number;
|
|
|
|
+ updateFromDevice(poseData: DevicePose): any;
|
|
|
|
+ }
|
|
|
|
+ interface WebVROptions {
|
|
|
|
+ trackPosition?: boolean;
|
|
|
|
+ positionScale?: number;
|
|
|
|
+ displayName?: string;
|
|
|
|
+ controllerMeshes?: boolean;
|
|
|
|
+ defaultLightningOnControllers?: boolean;
|
|
|
|
+ }
|
|
|
|
+ class WebVRFreeCamera extends FreeCamera implements PoseControlled {
|
|
|
|
+ private webVROptions;
|
|
|
|
+ _vrDevice: any;
|
|
|
|
+ rawPose: DevicePose;
|
|
|
|
+ private _vrEnabled;
|
|
|
|
+ private _specsVersion;
|
|
|
|
+ private _attached;
|
|
|
|
+ private _oldSize;
|
|
|
|
+ private _oldHardwareScaleFactor;
|
|
|
|
+ private _frameData;
|
|
|
|
+ private _quaternionCache;
|
|
|
|
+ private _positionOffset;
|
|
|
|
+ protected _descendants: Array<Node>;
|
|
|
|
+ devicePosition: Vector3;
|
|
|
|
+ deviceRotationQuaternion: any;
|
|
|
|
+ deviceScaleFactor: number;
|
|
|
|
+ controllers: Array<WebVRController>;
|
|
|
|
+ onControllersAttached: (controllers: Array<WebVRController>) => void;
|
|
|
|
+ rigParenting: boolean;
|
|
|
|
+ private _lightOnControllers;
|
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene, webVROptions?: WebVROptions);
|
|
|
|
+ _checkInputs(): void;
|
|
|
|
+ updateFromDevice(poseData: DevicePose): void;
|
|
|
|
+ /**
|
|
|
|
+ * WebVR's attach control will start broadcasting frames to the device.
|
|
|
|
+ * Note that in certain browsers (chrome for example) this function must be called
|
|
|
|
+ * within a user-interaction callback. Example:
|
|
|
|
+ * <pre> scene.onPointerDown = function() { camera.attachControl(canvas); }</pre>
|
|
|
|
+ *
|
|
|
|
+ * @param {HTMLElement} element
|
|
|
|
+ * @param {boolean} [noPreventDefault]
|
|
|
|
+ *
|
|
|
|
+ * @memberOf WebVRFreeCamera
|
|
|
|
+ */
|
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
|
+ detachControl(element: HTMLElement): void;
|
|
|
|
+ getClassName(): string;
|
|
|
|
+ resetToCurrentRotation(): void;
|
|
|
|
+ _updateRigCameras(): void;
|
|
|
|
+ /**
|
|
|
|
+ * This function is called by the two RIG cameras.
|
|
|
|
+ * 'this' is the left or right camera (and NOT (!!!) the WebVRFreeCamera instance)
|
|
|
|
+ */
|
|
|
|
+ protected _getWebVRViewMatrix(): Matrix;
|
|
|
|
+ protected _getWebVRProjectionMatrix(): Matrix;
|
|
|
|
+ initControllers(): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
class ArcRotateCameraGamepadInput implements ICameraInput<ArcRotateCamera> {
|
|
class ArcRotateCameraGamepadInput implements ICameraInput<ArcRotateCamera> {
|
|
camera: ArcRotateCamera;
|
|
camera: ArcRotateCamera;
|
|
gamepad: Gamepad;
|
|
gamepad: Gamepad;
|
|
@@ -14679,129 +14813,6 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- class VRCameraMetrics {
|
|
|
|
- hResolution: number;
|
|
|
|
- vResolution: number;
|
|
|
|
- hScreenSize: number;
|
|
|
|
- vScreenSize: number;
|
|
|
|
- vScreenCenter: number;
|
|
|
|
- eyeToScreenDistance: number;
|
|
|
|
- lensSeparationDistance: number;
|
|
|
|
- interpupillaryDistance: number;
|
|
|
|
- distortionK: number[];
|
|
|
|
- chromaAbCorrection: number[];
|
|
|
|
- postProcessScaleFactor: number;
|
|
|
|
- lensCenterOffset: number;
|
|
|
|
- compensateDistortion: boolean;
|
|
|
|
- readonly aspectRatio: number;
|
|
|
|
- readonly aspectRatioFov: number;
|
|
|
|
- readonly leftHMatrix: Matrix;
|
|
|
|
- readonly rightHMatrix: Matrix;
|
|
|
|
- readonly leftPreViewMatrix: Matrix;
|
|
|
|
- readonly rightPreViewMatrix: Matrix;
|
|
|
|
- static GetDefault(): VRCameraMetrics;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class VRDeviceOrientationFreeCamera extends DeviceOrientationCamera {
|
|
|
|
- constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
|
- getClassName(): string;
|
|
|
|
- }
|
|
|
|
- class VRDeviceOrientationGamepadCamera extends VRDeviceOrientationFreeCamera {
|
|
|
|
- constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
|
- getClassName(): string;
|
|
|
|
- }
|
|
|
|
- class VRDeviceOrientationArcRotateCamera extends ArcRotateCamera {
|
|
|
|
- constructor(name: string, alpha: number, beta: number, radius: number, target: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
|
- getClassName(): string;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare var HMDVRDevice: any;
|
|
|
|
-declare var VRDisplay: any;
|
|
|
|
-declare var VRFrameData: any;
|
|
|
|
-declare module BABYLON {
|
|
|
|
- /**
|
|
|
|
- * This is a copy of VRPose.
|
|
|
|
- * IMPORTANT!! The data is right-hand data.
|
|
|
|
- * @export
|
|
|
|
- * @interface DevicePose
|
|
|
|
- */
|
|
|
|
- interface DevicePose {
|
|
|
|
- readonly position?: Float32Array;
|
|
|
|
- readonly linearVelocity?: Float32Array;
|
|
|
|
- readonly linearAcceleration?: Float32Array;
|
|
|
|
- readonly orientation?: Float32Array;
|
|
|
|
- readonly angularVelocity?: Float32Array;
|
|
|
|
- readonly angularAcceleration?: Float32Array;
|
|
|
|
- }
|
|
|
|
- interface PoseControlled {
|
|
|
|
- position: Vector3;
|
|
|
|
- rotationQuaternion: Quaternion;
|
|
|
|
- devicePosition?: Vector3;
|
|
|
|
- deviceRotationQuaternion: Quaternion;
|
|
|
|
- rawPose: DevicePose;
|
|
|
|
- deviceScaleFactor: number;
|
|
|
|
- updateFromDevice(poseData: DevicePose): any;
|
|
|
|
- }
|
|
|
|
- interface WebVROptions {
|
|
|
|
- trackPosition?: boolean;
|
|
|
|
- positionScale?: number;
|
|
|
|
- displayName?: string;
|
|
|
|
- controllerMeshes?: boolean;
|
|
|
|
- defaultLightningOnControllers?: boolean;
|
|
|
|
- }
|
|
|
|
- class WebVRFreeCamera extends FreeCamera implements PoseControlled {
|
|
|
|
- private webVROptions;
|
|
|
|
- _vrDevice: any;
|
|
|
|
- rawPose: DevicePose;
|
|
|
|
- private _vrEnabled;
|
|
|
|
- private _specsVersion;
|
|
|
|
- private _attached;
|
|
|
|
- private _oldSize;
|
|
|
|
- private _oldHardwareScaleFactor;
|
|
|
|
- private _frameData;
|
|
|
|
- private _quaternionCache;
|
|
|
|
- private _positionOffset;
|
|
|
|
- protected _descendants: Array<Node>;
|
|
|
|
- devicePosition: Vector3;
|
|
|
|
- deviceRotationQuaternion: any;
|
|
|
|
- deviceScaleFactor: number;
|
|
|
|
- controllers: Array<WebVRController>;
|
|
|
|
- onControllersAttached: (controllers: Array<WebVRController>) => void;
|
|
|
|
- rigParenting: boolean;
|
|
|
|
- private _lightOnControllers;
|
|
|
|
- constructor(name: string, position: Vector3, scene: Scene, webVROptions?: WebVROptions);
|
|
|
|
- _checkInputs(): void;
|
|
|
|
- updateFromDevice(poseData: DevicePose): void;
|
|
|
|
- /**
|
|
|
|
- * WebVR's attach control will start broadcasting frames to the device.
|
|
|
|
- * Note that in certain browsers (chrome for example) this function must be called
|
|
|
|
- * within a user-interaction callback. Example:
|
|
|
|
- * <pre> scene.onPointerDown = function() { camera.attachControl(canvas); }</pre>
|
|
|
|
- *
|
|
|
|
- * @param {HTMLElement} element
|
|
|
|
- * @param {boolean} [noPreventDefault]
|
|
|
|
- *
|
|
|
|
- * @memberOf WebVRFreeCamera
|
|
|
|
- */
|
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
|
- detachControl(element: HTMLElement): void;
|
|
|
|
- getClassName(): string;
|
|
|
|
- resetToCurrentRotation(): void;
|
|
|
|
- _updateRigCameras(): void;
|
|
|
|
- /**
|
|
|
|
- * This function is called by the two RIG cameras.
|
|
|
|
- * 'this' is the left or right camera (and NOT (!!!) the WebVRFreeCamera instance)
|
|
|
|
- */
|
|
|
|
- protected _getWebVRViewMatrix(): Matrix;
|
|
|
|
- protected _getWebVRProjectionMatrix(): Matrix;
|
|
|
|
- initControllers(): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
interface IOctreeContainer<T> {
|
|
interface IOctreeContainer<T> {
|
|
blocks: Array<OctreeBlock<T>>;
|
|
blocks: Array<OctreeBlock<T>>;
|
|
}
|
|
}
|