|
@@ -2267,6 +2267,25 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class Layer {
|
|
|
+ name: string;
|
|
|
+ texture: Texture;
|
|
|
+ isBackground: boolean;
|
|
|
+ color: Color4;
|
|
|
+ onDispose: () => void;
|
|
|
+ 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 DebugLayer {
|
|
|
private _scene;
|
|
|
private _camera;
|
|
@@ -2324,25 +2343,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class Layer {
|
|
|
- name: string;
|
|
|
- texture: Texture;
|
|
|
- isBackground: boolean;
|
|
|
- color: Color4;
|
|
|
- onDispose: () => void;
|
|
|
- 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 {
|
|
|
size: number;
|
|
|
position: number;
|
|
@@ -2779,7 +2779,7 @@ declare module BABYLON {
|
|
|
needAlphaTesting(): boolean;
|
|
|
private _shouldUseAlphaFromDiffuseTexture();
|
|
|
getAlphaTestTexture(): BaseTexture;
|
|
|
- private _checkCache(scene, mesh?);
|
|
|
+ private _checkCache(scene, mesh?, useInstances?);
|
|
|
isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean;
|
|
|
unbind(): void;
|
|
|
bindOnlyWorldMatrix(world: Matrix): void;
|
|
@@ -3326,203 +3326,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class Particle {
|
|
|
- position: Vector3;
|
|
|
- direction: Vector3;
|
|
|
- color: Color4;
|
|
|
- colorStep: Color4;
|
|
|
- lifeTime: number;
|
|
|
- age: number;
|
|
|
- size: number;
|
|
|
- angle: number;
|
|
|
- angularSpeed: number;
|
|
|
- copyTo(other: Particle): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class ParticleSystem implements IDisposable {
|
|
|
- name: string;
|
|
|
- static BLENDMODE_ONEONE: number;
|
|
|
- static BLENDMODE_STANDARD: number;
|
|
|
- id: string;
|
|
|
- renderingGroupId: number;
|
|
|
- emitter: any;
|
|
|
- emitRate: number;
|
|
|
- manualEmitCount: number;
|
|
|
- updateSpeed: number;
|
|
|
- targetStopDuration: number;
|
|
|
- disposeOnStop: boolean;
|
|
|
- minEmitPower: number;
|
|
|
- maxEmitPower: number;
|
|
|
- minLifeTime: number;
|
|
|
- maxLifeTime: number;
|
|
|
- minSize: number;
|
|
|
- maxSize: number;
|
|
|
- minAngularSpeed: number;
|
|
|
- maxAngularSpeed: number;
|
|
|
- particleTexture: Texture;
|
|
|
- layerMask: number;
|
|
|
- onDispose: () => void;
|
|
|
- updateFunction: (particles: Particle[]) => void;
|
|
|
- blendMode: number;
|
|
|
- forceDepthWrite: boolean;
|
|
|
- gravity: Vector3;
|
|
|
- direction1: Vector3;
|
|
|
- direction2: Vector3;
|
|
|
- minEmitBox: Vector3;
|
|
|
- maxEmitBox: Vector3;
|
|
|
- color1: Color4;
|
|
|
- color2: Color4;
|
|
|
- colorDead: Color4;
|
|
|
- textureMask: Color4;
|
|
|
- startDirectionFunction: (emitPower: number, worldMatrix: Matrix, directionToUpdate: Vector3) => void;
|
|
|
- startPositionFunction: (worldMatrix: Matrix, positionToUpdate: Vector3) => void;
|
|
|
- private particles;
|
|
|
- private _capacity;
|
|
|
- private _scene;
|
|
|
- private _vertexDeclaration;
|
|
|
- private _vertexStrideSize;
|
|
|
- private _stockParticles;
|
|
|
- private _newPartsExcess;
|
|
|
- private _vertexBuffer;
|
|
|
- private _indexBuffer;
|
|
|
- private _vertices;
|
|
|
- private _effect;
|
|
|
- private _customEffect;
|
|
|
- private _cachedDefines;
|
|
|
- private _scaledColorStep;
|
|
|
- private _colorDiff;
|
|
|
- private _scaledDirection;
|
|
|
- private _scaledGravity;
|
|
|
- private _currentRenderId;
|
|
|
- private _alive;
|
|
|
- private _started;
|
|
|
- private _stopped;
|
|
|
- private _actualFrame;
|
|
|
- private _scaledUpdateSpeed;
|
|
|
- constructor(name: string, capacity: number, scene: Scene, customEffect?: Effect);
|
|
|
- recycleParticle(particle: Particle): void;
|
|
|
- getCapacity(): number;
|
|
|
- isAlive(): boolean;
|
|
|
- isStarted(): boolean;
|
|
|
- start(): void;
|
|
|
- stop(): void;
|
|
|
- _appendParticleVertex(index: number, particle: Particle, offsetX: number, offsetY: number): void;
|
|
|
- private _update(newParticles);
|
|
|
- private _getEffect();
|
|
|
- animate(): void;
|
|
|
- render(): number;
|
|
|
- dispose(): void;
|
|
|
- clone(name: string, newEmitter: any): ParticleSystem;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class SolidParticle {
|
|
|
- idx: number;
|
|
|
- color: Color4;
|
|
|
- position: Vector3;
|
|
|
- rotation: Vector3;
|
|
|
- quaternion: Vector4;
|
|
|
- scale: Vector3;
|
|
|
- uvs: Vector4;
|
|
|
- velocity: Vector3;
|
|
|
- alive: boolean;
|
|
|
- _pos: number;
|
|
|
- _shape: Vector3[];
|
|
|
- _shapeUV: number[];
|
|
|
- shapeId: number;
|
|
|
- previous: SolidParticle;
|
|
|
- next: SolidParticle;
|
|
|
- idxInShape: number;
|
|
|
- constructor(particleIndex: number, positionIndex: number, shape: Vector3[], shapeUV: number[], shapeId: number, idxInShape: number);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class SolidParticleSystem implements IDisposable {
|
|
|
- particles: SolidParticle[];
|
|
|
- nbParticles: number;
|
|
|
- billboard: boolean;
|
|
|
- counter: number;
|
|
|
- name: string;
|
|
|
- mesh: Mesh;
|
|
|
- private _scene;
|
|
|
- private _positions;
|
|
|
- private _indices;
|
|
|
- private _normals;
|
|
|
- private _colors;
|
|
|
- private _uvs;
|
|
|
- private _positions32;
|
|
|
- private _normals32;
|
|
|
- private _colors32;
|
|
|
- private _uvs32;
|
|
|
- private _index;
|
|
|
- private _shapeCounter;
|
|
|
- private _copy;
|
|
|
- private _color;
|
|
|
- private _computeParticleColor;
|
|
|
- private _computeParticleTexture;
|
|
|
- private _computeParticleRotation;
|
|
|
- private _computeParticleVertex;
|
|
|
- private _cam_axisZ;
|
|
|
- private _cam_axisY;
|
|
|
- private _cam_axisX;
|
|
|
- private _axisX;
|
|
|
- private _axisY;
|
|
|
- private _axisZ;
|
|
|
- private _camera;
|
|
|
- private _particle;
|
|
|
- private _previousParticle;
|
|
|
- private _fakeCamPos;
|
|
|
- private _rotMatrix;
|
|
|
- private _invertedMatrix;
|
|
|
- private _rotated;
|
|
|
- private _quaternion;
|
|
|
- private _vertex;
|
|
|
- private _yaw;
|
|
|
- private _pitch;
|
|
|
- private _roll;
|
|
|
- private _halfroll;
|
|
|
- private _halfpitch;
|
|
|
- private _halfyaw;
|
|
|
- private _sinRoll;
|
|
|
- private _cosRoll;
|
|
|
- private _sinPitch;
|
|
|
- private _cosPitch;
|
|
|
- private _sinYaw;
|
|
|
- private _cosYaw;
|
|
|
- constructor(name: string, scene: Scene);
|
|
|
- buildMesh(upgradable?: boolean): Mesh;
|
|
|
- private _resetCopy();
|
|
|
- private _meshBuilder(p, shape, positions, meshInd, indices, meshUV, uvs, meshCol, colors, idxInShape, options);
|
|
|
- private _posToShape(positions);
|
|
|
- private _uvsToShapeUV(uvs);
|
|
|
- private _addParticle(p, idxpos, shape, shapeUV, shapeId, idxInShape);
|
|
|
- addShape(mesh: Mesh, nb: number, options?: {
|
|
|
- positionFunction?: any;
|
|
|
- vertexFunction?: any;
|
|
|
- }): number;
|
|
|
- resetParticle(particle: SolidParticle): void;
|
|
|
- setParticles(start?: number, end?: number, update?: boolean): void;
|
|
|
- private _quaternionRotationYPR();
|
|
|
- private _quaternionToRotationMatrix();
|
|
|
- dispose(): void;
|
|
|
- computeParticleRotation: boolean;
|
|
|
- computeParticleColor: boolean;
|
|
|
- computeParticleTexture: boolean;
|
|
|
- computeParticleVertex: boolean;
|
|
|
- initParticles(): void;
|
|
|
- recycleParticle(particle: SolidParticle): SolidParticle;
|
|
|
- updateParticle(particle: SolidParticle): SolidParticle;
|
|
|
- updateParticleVertex(particle: SolidParticle, vertex: Vector3, pt: number): Vector3;
|
|
|
- beforeUpdateParticles(start?: number, stop?: number, update?: boolean): void;
|
|
|
- afterUpdateParticles(start?: number, stop?: number, update?: boolean): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class AbstractMesh extends Node implements IDisposable {
|
|
|
private static _BILLBOARDMODE_NONE;
|
|
|
private static _BILLBOARDMODE_X;
|
|
@@ -4825,31 +4628,217 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class ReflectionProbe {
|
|
|
- name: string;
|
|
|
- private _scene;
|
|
|
- private _renderTargetTexture;
|
|
|
- private _projectionMatrix;
|
|
|
- private _viewMatrix;
|
|
|
- private _target;
|
|
|
- private _add;
|
|
|
- private _attachedMesh;
|
|
|
+ class Particle {
|
|
|
position: Vector3;
|
|
|
- constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
|
|
|
- refreshRate: number;
|
|
|
- getScene(): Scene;
|
|
|
- cubeTexture: RenderTargetTexture;
|
|
|
- renderList: AbstractMesh[];
|
|
|
- attachToMesh(mesh: AbstractMesh): void;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class AnaglyphPostProcess extends PostProcess {
|
|
|
- constructor(name: string, ratio: number, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
- }
|
|
|
-}
|
|
|
+ direction: Vector3;
|
|
|
+ color: Color4;
|
|
|
+ colorStep: Color4;
|
|
|
+ lifeTime: number;
|
|
|
+ age: number;
|
|
|
+ size: number;
|
|
|
+ angle: number;
|
|
|
+ angularSpeed: number;
|
|
|
+ copyTo(other: Particle): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class ParticleSystem implements IDisposable {
|
|
|
+ name: string;
|
|
|
+ static BLENDMODE_ONEONE: number;
|
|
|
+ static BLENDMODE_STANDARD: number;
|
|
|
+ id: string;
|
|
|
+ renderingGroupId: number;
|
|
|
+ emitter: any;
|
|
|
+ emitRate: number;
|
|
|
+ manualEmitCount: number;
|
|
|
+ updateSpeed: number;
|
|
|
+ targetStopDuration: number;
|
|
|
+ disposeOnStop: boolean;
|
|
|
+ minEmitPower: number;
|
|
|
+ maxEmitPower: number;
|
|
|
+ minLifeTime: number;
|
|
|
+ maxLifeTime: number;
|
|
|
+ minSize: number;
|
|
|
+ maxSize: number;
|
|
|
+ minAngularSpeed: number;
|
|
|
+ maxAngularSpeed: number;
|
|
|
+ particleTexture: Texture;
|
|
|
+ layerMask: number;
|
|
|
+ onDispose: () => void;
|
|
|
+ updateFunction: (particles: Particle[]) => void;
|
|
|
+ blendMode: number;
|
|
|
+ forceDepthWrite: boolean;
|
|
|
+ gravity: Vector3;
|
|
|
+ direction1: Vector3;
|
|
|
+ direction2: Vector3;
|
|
|
+ minEmitBox: Vector3;
|
|
|
+ maxEmitBox: Vector3;
|
|
|
+ color1: Color4;
|
|
|
+ color2: Color4;
|
|
|
+ colorDead: Color4;
|
|
|
+ textureMask: Color4;
|
|
|
+ startDirectionFunction: (emitPower: number, worldMatrix: Matrix, directionToUpdate: Vector3) => void;
|
|
|
+ startPositionFunction: (worldMatrix: Matrix, positionToUpdate: Vector3) => void;
|
|
|
+ private particles;
|
|
|
+ private _capacity;
|
|
|
+ private _scene;
|
|
|
+ private _vertexDeclaration;
|
|
|
+ private _vertexStrideSize;
|
|
|
+ private _stockParticles;
|
|
|
+ private _newPartsExcess;
|
|
|
+ private _vertexBuffer;
|
|
|
+ private _indexBuffer;
|
|
|
+ private _vertices;
|
|
|
+ private _effect;
|
|
|
+ private _customEffect;
|
|
|
+ private _cachedDefines;
|
|
|
+ private _scaledColorStep;
|
|
|
+ private _colorDiff;
|
|
|
+ private _scaledDirection;
|
|
|
+ private _scaledGravity;
|
|
|
+ private _currentRenderId;
|
|
|
+ private _alive;
|
|
|
+ private _started;
|
|
|
+ private _stopped;
|
|
|
+ private _actualFrame;
|
|
|
+ private _scaledUpdateSpeed;
|
|
|
+ constructor(name: string, capacity: number, scene: Scene, customEffect?: Effect);
|
|
|
+ recycleParticle(particle: Particle): void;
|
|
|
+ getCapacity(): number;
|
|
|
+ isAlive(): boolean;
|
|
|
+ isStarted(): boolean;
|
|
|
+ start(): void;
|
|
|
+ stop(): void;
|
|
|
+ _appendParticleVertex(index: number, particle: Particle, offsetX: number, offsetY: number): void;
|
|
|
+ private _update(newParticles);
|
|
|
+ private _getEffect();
|
|
|
+ animate(): void;
|
|
|
+ render(): number;
|
|
|
+ dispose(): void;
|
|
|
+ clone(name: string, newEmitter: any): ParticleSystem;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class SolidParticle {
|
|
|
+ idx: number;
|
|
|
+ color: Color4;
|
|
|
+ position: Vector3;
|
|
|
+ rotation: Vector3;
|
|
|
+ quaternion: Vector4;
|
|
|
+ scale: Vector3;
|
|
|
+ uvs: Vector4;
|
|
|
+ velocity: Vector3;
|
|
|
+ alive: boolean;
|
|
|
+ _pos: number;
|
|
|
+ _model: ModelShape;
|
|
|
+ shapeId: number;
|
|
|
+ previous: SolidParticle;
|
|
|
+ next: SolidParticle;
|
|
|
+ idxInShape: number;
|
|
|
+ constructor(particleIndex: number, positionIndex: number, model: ModelShape, shapeId: number, idxInShape: number);
|
|
|
+ }
|
|
|
+ class ModelShape {
|
|
|
+ shapeID: number;
|
|
|
+ _shape: Vector3[];
|
|
|
+ _shapeUV: number[];
|
|
|
+ _positionFunction: (particle: SolidParticle, i: number, s: number) => void;
|
|
|
+ _vertexFunction: (particle: SolidParticle, vertex: Vector3, i: number) => void;
|
|
|
+ constructor(id: number, shape: Vector3[], shapeUV: number[], posFunction: (particle: SolidParticle, i: number, s: number) => void, vtxFunction: (particle: SolidParticle, vertex: Vector3, i: number) => void);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class SolidParticleSystem implements IDisposable {
|
|
|
+ particles: SolidParticle[];
|
|
|
+ nbParticles: number;
|
|
|
+ billboard: boolean;
|
|
|
+ counter: number;
|
|
|
+ name: string;
|
|
|
+ mesh: Mesh;
|
|
|
+ private _scene;
|
|
|
+ private _positions;
|
|
|
+ private _indices;
|
|
|
+ private _normals;
|
|
|
+ private _colors;
|
|
|
+ private _uvs;
|
|
|
+ private _positions32;
|
|
|
+ private _normals32;
|
|
|
+ private _colors32;
|
|
|
+ private _uvs32;
|
|
|
+ private _index;
|
|
|
+ private _shapeCounter;
|
|
|
+ private _copy;
|
|
|
+ private _shape;
|
|
|
+ private _shapeUV;
|
|
|
+ private _color;
|
|
|
+ private _computeParticleColor;
|
|
|
+ private _computeParticleTexture;
|
|
|
+ private _computeParticleRotation;
|
|
|
+ private _computeParticleVertex;
|
|
|
+ private _cam_axisZ;
|
|
|
+ private _cam_axisY;
|
|
|
+ private _cam_axisX;
|
|
|
+ private _axisX;
|
|
|
+ private _axisY;
|
|
|
+ private _axisZ;
|
|
|
+ private _camera;
|
|
|
+ private _particle;
|
|
|
+ private _previousParticle;
|
|
|
+ private _fakeCamPos;
|
|
|
+ private _rotMatrix;
|
|
|
+ private _invertedMatrix;
|
|
|
+ private _rotated;
|
|
|
+ private _quaternion;
|
|
|
+ private _vertex;
|
|
|
+ private _yaw;
|
|
|
+ private _pitch;
|
|
|
+ private _roll;
|
|
|
+ private _halfroll;
|
|
|
+ private _halfpitch;
|
|
|
+ private _halfyaw;
|
|
|
+ private _sinRoll;
|
|
|
+ private _cosRoll;
|
|
|
+ private _sinPitch;
|
|
|
+ private _cosPitch;
|
|
|
+ private _sinYaw;
|
|
|
+ private _cosYaw;
|
|
|
+ constructor(name: string, scene: Scene);
|
|
|
+ buildMesh(upgradable?: boolean): Mesh;
|
|
|
+ private _resetCopy();
|
|
|
+ private _meshBuilder(p, shape, positions, meshInd, indices, meshUV, uvs, meshCol, colors, idx, idxInShape, options);
|
|
|
+ private _posToShape(positions);
|
|
|
+ private _uvsToShapeUV(uvs);
|
|
|
+ private _addParticle(p, idxpos, model, shapeId, idxInShape);
|
|
|
+ addShape(mesh: Mesh, nb: number, options?: {
|
|
|
+ positionFunction?: any;
|
|
|
+ vertexFunction?: any;
|
|
|
+ }): number;
|
|
|
+ private _rebuildParticle(particle);
|
|
|
+ rebuildMesh(): void;
|
|
|
+ setParticles(start?: number, end?: number, update?: boolean): void;
|
|
|
+ private _quaternionRotationYPR();
|
|
|
+ private _quaternionToRotationMatrix();
|
|
|
+ dispose(): void;
|
|
|
+ computeParticleRotation: boolean;
|
|
|
+ computeParticleColor: boolean;
|
|
|
+ computeParticleTexture: boolean;
|
|
|
+ computeParticleVertex: boolean;
|
|
|
+ initParticles(): void;
|
|
|
+ recycleParticle(particle: SolidParticle): SolidParticle;
|
|
|
+ updateParticle(particle: SolidParticle): SolidParticle;
|
|
|
+ updateParticleVertex(particle: SolidParticle, vertex: Vector3, pt: number): Vector3;
|
|
|
+ beforeUpdateParticles(start?: number, stop?: number, update?: boolean): void;
|
|
|
+ afterUpdateParticles(start?: number, stop?: number, update?: boolean): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class AnaglyphPostProcess extends PostProcess {
|
|
|
+ constructor(name: string, ratio: number, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
class BlackAndWhitePostProcess extends PostProcess {
|
|
@@ -5568,6 +5557,27 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+declare module BABYLON {
|
|
|
+ class ReflectionProbe {
|
|
|
+ name: string;
|
|
|
+ private _scene;
|
|
|
+ private _renderTargetTexture;
|
|
|
+ private _projectionMatrix;
|
|
|
+ private _viewMatrix;
|
|
|
+ private _target;
|
|
|
+ private _add;
|
|
|
+ private _attachedMesh;
|
|
|
+ position: Vector3;
|
|
|
+ constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
|
|
|
+ refreshRate: number;
|
|
|
+ getScene(): Scene;
|
|
|
+ cubeTexture: RenderTargetTexture;
|
|
|
+ renderList: AbstractMesh[];
|
|
|
+ attachToMesh(mesh: AbstractMesh): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
declare module BABYLON.Internals {
|
|
|
class AndOrNotEvaluator {
|
|
|
static Eval(query: string, evaluateCallback: (val: any) => boolean): boolean;
|
|
@@ -6563,61 +6573,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class CannonJSPlugin implements IPhysicsEnginePlugin {
|
|
|
- private _world;
|
|
|
- private _registeredMeshes;
|
|
|
- private _physicsMaterials;
|
|
|
- initialize(iterations?: number): void;
|
|
|
- private _checkWithEpsilon(value);
|
|
|
- runOneStep(delta: number): void;
|
|
|
- setGravity(gravity: Vector3): void;
|
|
|
- registerMesh(mesh: AbstractMesh, impostor: number, options?: PhysicsBodyCreationOptions): any;
|
|
|
- private _createShape(mesh, impostor, options?);
|
|
|
- private _createConvexPolyhedron(rawVerts, rawFaces, mesh, options?);
|
|
|
- private _addMaterial(friction, restitution);
|
|
|
- private _createRigidBodyFromShape(shape, mesh, mass, friction, restitution);
|
|
|
- registerMeshesAsCompound(parts: PhysicsCompoundBodyPart[], options: PhysicsBodyCreationOptions): any;
|
|
|
- private _unbindBody(body);
|
|
|
- unregisterMesh(mesh: AbstractMesh): void;
|
|
|
- applyImpulse(mesh: AbstractMesh, force: Vector3, contactPoint: Vector3): void;
|
|
|
- updateBodyPosition: (mesh: AbstractMesh) => void;
|
|
|
- createLink(mesh1: AbstractMesh, mesh2: AbstractMesh, pivot1: Vector3, pivot2: Vector3): boolean;
|
|
|
- dispose(): void;
|
|
|
- isSupported(): boolean;
|
|
|
- getWorldObject(): any;
|
|
|
- getPhysicsBodyOfMesh(mesh: AbstractMesh): any;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class OimoJSPlugin implements IPhysicsEnginePlugin {
|
|
|
- private _world;
|
|
|
- private _registeredMeshes;
|
|
|
- private _checkWithEpsilon(value);
|
|
|
- initialize(iterations?: number): void;
|
|
|
- setGravity(gravity: Vector3): void;
|
|
|
- registerMesh(mesh: AbstractMesh, impostor: number, options: PhysicsBodyCreationOptions): any;
|
|
|
- registerMeshesAsCompound(parts: PhysicsCompoundBodyPart[], options: PhysicsBodyCreationOptions): any;
|
|
|
- private _createBodyAsCompound(part, options, initialMesh);
|
|
|
- unregisterMesh(mesh: AbstractMesh): void;
|
|
|
- private _unbindBody(body);
|
|
|
- /**
|
|
|
- * Update the body position according to the mesh position
|
|
|
- * @param mesh
|
|
|
- */
|
|
|
- updateBodyPosition: (mesh: AbstractMesh) => void;
|
|
|
- applyImpulse(mesh: AbstractMesh, force: Vector3, contactPoint: Vector3): void;
|
|
|
- createLink(mesh1: AbstractMesh, mesh2: AbstractMesh, pivot1: Vector3, pivot2: Vector3, options?: any): boolean;
|
|
|
- dispose(): void;
|
|
|
- isSupported(): boolean;
|
|
|
- getWorldObject(): any;
|
|
|
- getPhysicsBodyOfMesh(mesh: AbstractMesh): any;
|
|
|
- private _getLastShape(body);
|
|
|
- runOneStep(time: number): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class PostProcessRenderEffect {
|
|
|
private _engine;
|
|
|
private _postProcesses;
|
|
@@ -6716,6 +6671,61 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class CannonJSPlugin implements IPhysicsEnginePlugin {
|
|
|
+ private _world;
|
|
|
+ private _registeredMeshes;
|
|
|
+ private _physicsMaterials;
|
|
|
+ initialize(iterations?: number): void;
|
|
|
+ private _checkWithEpsilon(value);
|
|
|
+ runOneStep(delta: number): void;
|
|
|
+ setGravity(gravity: Vector3): void;
|
|
|
+ registerMesh(mesh: AbstractMesh, impostor: number, options?: PhysicsBodyCreationOptions): any;
|
|
|
+ private _createShape(mesh, impostor, options?);
|
|
|
+ private _createConvexPolyhedron(rawVerts, rawFaces, mesh, options?);
|
|
|
+ private _addMaterial(friction, restitution);
|
|
|
+ private _createRigidBodyFromShape(shape, mesh, mass, friction, restitution);
|
|
|
+ registerMeshesAsCompound(parts: PhysicsCompoundBodyPart[], options: PhysicsBodyCreationOptions): any;
|
|
|
+ private _unbindBody(body);
|
|
|
+ unregisterMesh(mesh: AbstractMesh): void;
|
|
|
+ applyImpulse(mesh: AbstractMesh, force: Vector3, contactPoint: Vector3): void;
|
|
|
+ updateBodyPosition: (mesh: AbstractMesh) => void;
|
|
|
+ createLink(mesh1: AbstractMesh, mesh2: AbstractMesh, pivot1: Vector3, pivot2: Vector3): boolean;
|
|
|
+ dispose(): void;
|
|
|
+ isSupported(): boolean;
|
|
|
+ getWorldObject(): any;
|
|
|
+ getPhysicsBodyOfMesh(mesh: AbstractMesh): any;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class OimoJSPlugin implements IPhysicsEnginePlugin {
|
|
|
+ private _world;
|
|
|
+ private _registeredMeshes;
|
|
|
+ private _checkWithEpsilon(value);
|
|
|
+ initialize(iterations?: number): void;
|
|
|
+ setGravity(gravity: Vector3): void;
|
|
|
+ registerMesh(mesh: AbstractMesh, impostor: number, options: PhysicsBodyCreationOptions): any;
|
|
|
+ registerMeshesAsCompound(parts: PhysicsCompoundBodyPart[], options: PhysicsBodyCreationOptions): any;
|
|
|
+ private _createBodyAsCompound(part, options, initialMesh);
|
|
|
+ unregisterMesh(mesh: AbstractMesh): void;
|
|
|
+ private _unbindBody(body);
|
|
|
+ /**
|
|
|
+ * Update the body position according to the mesh position
|
|
|
+ * @param mesh
|
|
|
+ */
|
|
|
+ updateBodyPosition: (mesh: AbstractMesh) => void;
|
|
|
+ applyImpulse(mesh: AbstractMesh, force: Vector3, contactPoint: Vector3): void;
|
|
|
+ createLink(mesh1: AbstractMesh, mesh2: AbstractMesh, pivot1: Vector3, pivot2: Vector3, options?: any): boolean;
|
|
|
+ dispose(): void;
|
|
|
+ isSupported(): boolean;
|
|
|
+ getWorldObject(): any;
|
|
|
+ getPhysicsBodyOfMesh(mesh: AbstractMesh): any;
|
|
|
+ private _getLastShape(body);
|
|
|
+ runOneStep(time: number): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class CustomProceduralTexture extends ProceduralTexture {
|
|
|
private _animate;
|
|
|
private _time;
|