|
@@ -3634,6 +3634,120 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class BoundingBox implements ICullable {
|
|
|
+ minimum: Vector3;
|
|
|
+ maximum: Vector3;
|
|
|
+ vectors: Vector3[];
|
|
|
+ center: Vector3;
|
|
|
+ centerWorld: Vector3;
|
|
|
+ extendSize: Vector3;
|
|
|
+ extendSizeWorld: Vector3;
|
|
|
+ directions: Vector3[];
|
|
|
+ vectorsWorld: Vector3[];
|
|
|
+ minimumWorld: Vector3;
|
|
|
+ maximumWorld: Vector3;
|
|
|
+ private _worldMatrix;
|
|
|
+ constructor(minimum: Vector3, maximum: Vector3);
|
|
|
+ getWorldMatrix(): Matrix;
|
|
|
+ setWorldMatrix(matrix: Matrix): BoundingBox;
|
|
|
+ _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 {
|
|
|
+ interface ICullable {
|
|
|
+ isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ }
|
|
|
+ class BoundingInfo implements ICullable {
|
|
|
+ minimum: Vector3;
|
|
|
+ maximum: Vector3;
|
|
|
+ boundingBox: BoundingBox;
|
|
|
+ boundingSphere: BoundingSphere;
|
|
|
+ private _isLocked;
|
|
|
+ constructor(minimum: Vector3, maximum: Vector3);
|
|
|
+ isLocked: boolean;
|
|
|
+ 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 Ray {
|
|
|
+ origin: Vector3;
|
|
|
+ direction: Vector3;
|
|
|
+ length: number;
|
|
|
+ private _edge1;
|
|
|
+ private _edge2;
|
|
|
+ private _pvec;
|
|
|
+ private _tvec;
|
|
|
+ private _qvec;
|
|
|
+ private _tmpRay;
|
|
|
+ private _rayHelper;
|
|
|
+ constructor(origin: Vector3, direction: Vector3, length?: number);
|
|
|
+ intersectsBoxMinMax(minimum: Vector3, maximum: Vector3): boolean;
|
|
|
+ intersectsBox(box: BoundingBox): boolean;
|
|
|
+ intersectsSphere(sphere: BoundingSphere): boolean;
|
|
|
+ intersectsTriangle(vertex0: Vector3, vertex1: Vector3, vertex2: Vector3): IntersectionInfo;
|
|
|
+ intersectsPlane(plane: Plane): number;
|
|
|
+ intersectsMesh(mesh: AbstractMesh, fastCheck?: boolean): PickingInfo;
|
|
|
+ intersectsMeshes(meshes: Array<AbstractMesh>, fastCheck?: boolean, results?: Array<PickingInfo>): Array<PickingInfo>;
|
|
|
+ private _comparePickingInfo(pickingInfoA, pickingInfoB);
|
|
|
+ private static smallnum;
|
|
|
+ private static rayl;
|
|
|
+ /**
|
|
|
+ * Intersection test between the ray and a given segment whithin a given tolerance (threshold)
|
|
|
+ * @param sega the first point of the segment to test the intersection against
|
|
|
+ * @param segb the second point of the segment to test the intersection against
|
|
|
+ * @param threshold the tolerance margin, if the ray doesn't intersect the segment but is close to the given threshold, the intersection is successful
|
|
|
+ * @return the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection
|
|
|
+ */
|
|
|
+ intersectionSegment(sega: Vector3, segb: Vector3, threshold: number): number;
|
|
|
+ static CreateNew(x: number, y: number, viewportWidth: number, viewportHeight: number, world: Matrix, view: Matrix, projection: Matrix): Ray;
|
|
|
+ /**
|
|
|
+ * Function will create a new transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be
|
|
|
+ * transformed to the given world matrix.
|
|
|
+ * @param origin The origin point
|
|
|
+ * @param end The end point
|
|
|
+ * @param world a matrix to transform the ray to. Default is the identity matrix.
|
|
|
+ */
|
|
|
+ static CreateNewFromTo(origin: Vector3, end: Vector3, world?: Matrix): Ray;
|
|
|
+ static Transform(ray: Ray, matrix: Matrix): Ray;
|
|
|
+ static TransformToRef(ray: Ray, matrix: Matrix, result: Ray): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class Collider {
|
|
|
radius: Vector3;
|
|
|
retry: number;
|
|
@@ -3877,225 +3991,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class BoundingBox implements ICullable {
|
|
|
- minimum: Vector3;
|
|
|
- maximum: Vector3;
|
|
|
- vectors: Vector3[];
|
|
|
- center: Vector3;
|
|
|
- centerWorld: Vector3;
|
|
|
- extendSize: Vector3;
|
|
|
- extendSizeWorld: Vector3;
|
|
|
- directions: Vector3[];
|
|
|
- vectorsWorld: Vector3[];
|
|
|
- minimumWorld: Vector3;
|
|
|
- maximumWorld: Vector3;
|
|
|
- private _worldMatrix;
|
|
|
- constructor(minimum: Vector3, maximum: Vector3);
|
|
|
- getWorldMatrix(): Matrix;
|
|
|
- setWorldMatrix(matrix: Matrix): BoundingBox;
|
|
|
- _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 {
|
|
|
- interface ICullable {
|
|
|
- isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
- isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
- }
|
|
|
- class BoundingInfo implements ICullable {
|
|
|
- minimum: Vector3;
|
|
|
- maximum: Vector3;
|
|
|
- boundingBox: BoundingBox;
|
|
|
- boundingSphere: BoundingSphere;
|
|
|
- private _isLocked;
|
|
|
- constructor(minimum: Vector3, maximum: Vector3);
|
|
|
- isLocked: boolean;
|
|
|
- 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 Ray {
|
|
|
- origin: Vector3;
|
|
|
- direction: Vector3;
|
|
|
- length: number;
|
|
|
- private _edge1;
|
|
|
- private _edge2;
|
|
|
- private _pvec;
|
|
|
- private _tvec;
|
|
|
- private _qvec;
|
|
|
- private _tmpRay;
|
|
|
- private _rayHelper;
|
|
|
- constructor(origin: Vector3, direction: Vector3, length?: number);
|
|
|
- intersectsBoxMinMax(minimum: Vector3, maximum: Vector3): boolean;
|
|
|
- intersectsBox(box: BoundingBox): boolean;
|
|
|
- intersectsSphere(sphere: BoundingSphere): boolean;
|
|
|
- intersectsTriangle(vertex0: Vector3, vertex1: Vector3, vertex2: Vector3): IntersectionInfo;
|
|
|
- intersectsPlane(plane: Plane): number;
|
|
|
- intersectsMesh(mesh: AbstractMesh, fastCheck?: boolean): PickingInfo;
|
|
|
- intersectsMeshes(meshes: Array<AbstractMesh>, fastCheck?: boolean, results?: Array<PickingInfo>): Array<PickingInfo>;
|
|
|
- private _comparePickingInfo(pickingInfoA, pickingInfoB);
|
|
|
- private static smallnum;
|
|
|
- private static rayl;
|
|
|
- /**
|
|
|
- * Intersection test between the ray and a given segment whithin a given tolerance (threshold)
|
|
|
- * @param sega the first point of the segment to test the intersection against
|
|
|
- * @param segb the second point of the segment to test the intersection against
|
|
|
- * @param threshold the tolerance margin, if the ray doesn't intersect the segment but is close to the given threshold, the intersection is successful
|
|
|
- * @return the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection
|
|
|
- */
|
|
|
- intersectionSegment(sega: Vector3, segb: Vector3, threshold: number): number;
|
|
|
- static CreateNew(x: number, y: number, viewportWidth: number, viewportHeight: number, world: Matrix, view: Matrix, projection: Matrix): Ray;
|
|
|
- /**
|
|
|
- * Function will create a new transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be
|
|
|
- * transformed to the given world matrix.
|
|
|
- * @param origin The origin point
|
|
|
- * @param end The end point
|
|
|
- * @param world a matrix to transform the ray to. Default is the identity matrix.
|
|
|
- */
|
|
|
- static CreateNewFromTo(origin: Vector3, end: Vector3, world?: Matrix): Ray;
|
|
|
- static Transform(ray: Ray, matrix: Matrix): Ray;
|
|
|
- static TransformToRef(ray: Ray, matrix: Matrix, result: Ray): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-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 {
|
|
|
/**
|
|
|
* Highlight layer options. This helps customizing the behaviour
|
|
|
* of the highlight layer.
|
|
@@ -4373,25 +4268,130 @@ declare module BABYLON {
|
|
|
layerMask: number;
|
|
|
id: string;
|
|
|
private _scene;
|
|
|
- private _emitter;
|
|
|
- private _vertexBuffers;
|
|
|
- private _indexBuffer;
|
|
|
- private _effect;
|
|
|
- private _positionX;
|
|
|
- private _positionY;
|
|
|
+ private _emitter;
|
|
|
+ private _vertexBuffers;
|
|
|
+ private _indexBuffer;
|
|
|
+ private _effect;
|
|
|
+ private _positionX;
|
|
|
+ private _positionY;
|
|
|
+ private _isEnabled;
|
|
|
+ constructor(name: string, emitter: any, scene: Scene);
|
|
|
+ isEnabled: boolean;
|
|
|
+ getScene(): Scene;
|
|
|
+ getEmitter(): any;
|
|
|
+ setEmitter(newEmitter: any): void;
|
|
|
+ getEmitterPosition(): Vector3;
|
|
|
+ computeEffectivePosition(globalViewport: Viewport): boolean;
|
|
|
+ _isVisible(): boolean;
|
|
|
+ render(): boolean;
|
|
|
+ dispose(): void;
|
|
|
+ static Parse(parsedLensFlareSystem: any, scene: Scene, rootUrl: string): LensFlareSystem;
|
|
|
+ serialize(): any;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON.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;
|
|
|
- constructor(name: string, emitter: any, scene: Scene);
|
|
|
+ private _renderFunction;
|
|
|
+ constructor(skeleton: Skeleton, mesh: AbstractMesh, scene: Scene, autoUpdateBonesMatrices?: boolean, renderingGroupId?: number);
|
|
|
isEnabled: boolean;
|
|
|
- getScene(): Scene;
|
|
|
- getEmitter(): any;
|
|
|
- setEmitter(newEmitter: any): void;
|
|
|
- getEmitterPosition(): Vector3;
|
|
|
- computeEffectivePosition(globalViewport: Viewport): boolean;
|
|
|
- _isVisible(): boolean;
|
|
|
- render(): boolean;
|
|
|
+ private _getBonePosition(position, bone, meshMat, x?, y?, z?);
|
|
|
+ private _getLinesForBonesWithLength(bones, meshMat);
|
|
|
+ private _getLinesForBonesNoLength(bones, meshMat);
|
|
|
+ update(): void;
|
|
|
dispose(): void;
|
|
|
- static Parse(parsedLensFlareSystem: any, scene: Scene, rootUrl: string): LensFlareSystem;
|
|
|
- serialize(): any;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -5306,7 +5306,7 @@ declare module BABYLON {
|
|
|
declare module BABYLON {
|
|
|
class MaterialHelper {
|
|
|
static PrepareDefinesForAttributes(mesh: AbstractMesh, defines: MaterialDefines, useInstances: boolean): void;
|
|
|
- static PrepareDefinesForLights(scene: Scene, mesh: AbstractMesh, defines: MaterialDefines, maxSimultaneousLights?: number, disableLighting?: boolean): boolean;
|
|
|
+ static PrepareDefinesForLights(scene: Scene, mesh: AbstractMesh, defines: MaterialDefines, specularSupported: boolean, maxSimultaneousLights?: number, disableLighting?: boolean): boolean;
|
|
|
static PrepareUniformsAndSamplersList(uniformsList: string[], samplersList: string[], defines: MaterialDefines, maxSimultaneousLights?: number): void;
|
|
|
static HandleFallbacksForShadows(defines: MaterialDefines, fallbacks: EffectFallbacks, maxSimultaneousLights?: number): void;
|
|
|
static PrepareAttributesForBones(attribs: string[], mesh: AbstractMesh, defines: MaterialDefines, fallbacks: EffectFallbacks): void;
|
|
@@ -11868,6 +11868,245 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class BoundingBoxRenderer {
|
|
|
+ frontColor: Color3;
|
|
|
+ backColor: Color3;
|
|
|
+ showBackLines: boolean;
|
|
|
+ renderList: SmartArray<BoundingBox>;
|
|
|
+ private _scene;
|
|
|
+ private _colorShader;
|
|
|
+ private _vertexBuffers;
|
|
|
+ private _indexBuffer;
|
|
|
+ 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 {
|
|
|
+ edgesWidthScalerForOrthographic: number;
|
|
|
+ edgesWidthScalerForPerspective: number;
|
|
|
+ private _source;
|
|
|
+ private _linesPositions;
|
|
|
+ private _linesNormals;
|
|
|
+ private _linesIndices;
|
|
|
+ private _epsilon;
|
|
|
+ private _indicesCount;
|
|
|
+ private _lineShader;
|
|
|
+ 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 _particleSystems;
|
|
|
+ private _spriteManagers;
|
|
|
+ private _activeVertices;
|
|
|
+ private _opaqueSortCompareFn;
|
|
|
+ private _alphaTestSortCompareFn;
|
|
|
+ private _transparentSortCompareFn;
|
|
|
+ private _renderOpaque;
|
|
|
+ private _renderAlphaTest;
|
|
|
+ private _renderTransparent;
|
|
|
+ onBeforeTransparentRendering: () => void;
|
|
|
+ /**
|
|
|
+ * Set the opaque sort comparison function.
|
|
|
+ * If null the sub meshes will be render in the order they were created
|
|
|
+ */
|
|
|
+ opaqueSortCompareFn: (a: SubMesh, b: SubMesh) => number;
|
|
|
+ /**
|
|
|
+ * Set the alpha test sort comparison function.
|
|
|
+ * If null the sub meshes will be render in the order they were created
|
|
|
+ */
|
|
|
+ alphaTestSortCompareFn: (a: SubMesh, b: SubMesh) => number;
|
|
|
+ /**
|
|
|
+ * Set the transparent sort comparison function.
|
|
|
+ * If null the sub meshes will be render in the order they were created
|
|
|
+ */
|
|
|
+ transparentSortCompareFn: (a: SubMesh, b: SubMesh) => number;
|
|
|
+ /**
|
|
|
+ * Creates a new rendering group.
|
|
|
+ * @param index The rendering group index
|
|
|
+ * @param opaqueSortCompareFn The opaque sort comparison function. If null no order is applied
|
|
|
+ * @param alphaTestSortCompareFn The alpha test sort comparison function. If null no order is applied
|
|
|
+ * @param transparentSortCompareFn The transparent sort comparison function. If null back to front + alpha index sort is applied
|
|
|
+ */
|
|
|
+ constructor(index: number, scene: Scene, opaqueSortCompareFn?: (a: SubMesh, b: SubMesh) => number, alphaTestSortCompareFn?: (a: SubMesh, b: SubMesh) => number, transparentSortCompareFn?: (a: SubMesh, b: SubMesh) => number);
|
|
|
+ /**
|
|
|
+ * Render all the sub meshes contained in the group.
|
|
|
+ * @param customRenderFunction Used to override the default render behaviour of the group.
|
|
|
+ * @returns true if rendered some submeshes.
|
|
|
+ */
|
|
|
+ render(customRenderFunction: (opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>) => void, renderSprites: boolean, renderParticles: boolean, activeMeshes: AbstractMesh[]): void;
|
|
|
+ /**
|
|
|
+ * Renders the opaque submeshes in the order from the opaqueSortCompareFn.
|
|
|
+ * @param subMeshes The submeshes to render
|
|
|
+ */
|
|
|
+ private renderOpaqueSorted(subMeshes);
|
|
|
+ /**
|
|
|
+ * Renders the opaque submeshes in the order from the alphatestSortCompareFn.
|
|
|
+ * @param subMeshes The submeshes to render
|
|
|
+ */
|
|
|
+ private renderAlphaTestSorted(subMeshes);
|
|
|
+ /**
|
|
|
+ * Renders the opaque submeshes in the order from the transparentSortCompareFn.
|
|
|
+ * @param subMeshes The submeshes to render
|
|
|
+ */
|
|
|
+ private renderTransparentSorted(subMeshes);
|
|
|
+ /**
|
|
|
+ * Renders the submeshes in a specified order.
|
|
|
+ * @param subMeshes The submeshes to sort before render
|
|
|
+ * @param sortCompareFn The comparison function use to sort
|
|
|
+ * @param cameraPosition The camera position use to preprocess the submeshes to help sorting
|
|
|
+ * @param transparent Specifies to activate blending if true
|
|
|
+ */
|
|
|
+ private static renderSorted(subMeshes, sortCompareFn, cameraPosition, transparent);
|
|
|
+ /**
|
|
|
+ * Renders the submeshes in the order they were dispatched (no sort applied).
|
|
|
+ * @param subMeshes The submeshes to render
|
|
|
+ */
|
|
|
+ private static renderUnsorted(subMeshes);
|
|
|
+ /**
|
|
|
+ * Build in function which can be applied to ensure meshes of a special queue (opaque, alpha test, transparent)
|
|
|
+ * are rendered back to front if in the same alpha index.
|
|
|
+ *
|
|
|
+ * @param a The first submesh
|
|
|
+ * @param b The second submesh
|
|
|
+ * @returns The result of the comparison
|
|
|
+ */
|
|
|
+ static defaultTransparentSortCompare(a: SubMesh, b: SubMesh): number;
|
|
|
+ /**
|
|
|
+ * Build in function which can be applied to ensure meshes of a special queue (opaque, alpha test, transparent)
|
|
|
+ * are rendered back to front.
|
|
|
+ *
|
|
|
+ * @param a The first submesh
|
|
|
+ * @param b The second submesh
|
|
|
+ * @returns The result of the comparison
|
|
|
+ */
|
|
|
+ static backToFrontSortCompare(a: SubMesh, b: SubMesh): number;
|
|
|
+ /**
|
|
|
+ * Build in function which can be applied to ensure meshes of a special queue (opaque, alpha test, transparent)
|
|
|
+ * are rendered front to back (prevent overdraw).
|
|
|
+ *
|
|
|
+ * @param a The first submesh
|
|
|
+ * @param b The second submesh
|
|
|
+ * @returns The result of the comparison
|
|
|
+ */
|
|
|
+ static frontToBackSortCompare(a: SubMesh, b: SubMesh): number;
|
|
|
+ /**
|
|
|
+ * Resets the different lists of submeshes to prepare a new frame.
|
|
|
+ */
|
|
|
+ prepare(): void;
|
|
|
+ dispose(): void;
|
|
|
+ /**
|
|
|
+ * Inserts the submesh in its correct queue depending on its material.
|
|
|
+ * @param subMesh The submesh to dispatch
|
|
|
+ */
|
|
|
+ dispatch(subMesh: SubMesh): void;
|
|
|
+ dispatchSprites(spriteManager: SpriteManager): void;
|
|
|
+ dispatchParticles(particleSystem: ParticleSystem): void;
|
|
|
+ private _renderParticles(activeMeshes);
|
|
|
+ private _renderSprites();
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class RenderingManager {
|
|
|
+ /**
|
|
|
+ * The max id used for rendering groups (not included)
|
|
|
+ */
|
|
|
+ static MAX_RENDERINGGROUPS: number;
|
|
|
+ /**
|
|
|
+ * The min id used for rendering groups (included)
|
|
|
+ */
|
|
|
+ static MIN_RENDERINGGROUPS: number;
|
|
|
+ private _scene;
|
|
|
+ private _renderingGroups;
|
|
|
+ private _depthStencilBufferAlreadyCleaned;
|
|
|
+ private _currentIndex;
|
|
|
+ private _autoClearDepthStencil;
|
|
|
+ private _customOpaqueSortCompareFn;
|
|
|
+ private _customAlphaTestSortCompareFn;
|
|
|
+ private _customTransparentSortCompareFn;
|
|
|
+ private _renderinGroupInfo;
|
|
|
+ constructor(scene: Scene);
|
|
|
+ private _clearDepthStencilBuffer(depth?, stencil?);
|
|
|
+ render(customRenderFunction: (opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>) => void, activeMeshes: AbstractMesh[], renderParticles: boolean, renderSprites: boolean): void;
|
|
|
+ reset(): void;
|
|
|
+ dispose(): void;
|
|
|
+ private _prepareRenderingGroup(renderingGroupId);
|
|
|
+ dispatchSprites(spriteManager: SpriteManager): void;
|
|
|
+ dispatchParticles(particleSystem: ParticleSystem): void;
|
|
|
+ dispatch(subMesh: SubMesh): void;
|
|
|
+ /**
|
|
|
+ * Overrides the default sort function applied in the renderging group to prepare the meshes.
|
|
|
+ * This allowed control for front to back rendering or reversly depending of the special needs.
|
|
|
+ *
|
|
|
+ * @param renderingGroupId The rendering group id corresponding to its index
|
|
|
+ * @param opaqueSortCompareFn The opaque queue comparison function use to sort.
|
|
|
+ * @param alphaTestSortCompareFn The alpha test queue comparison function use to sort.
|
|
|
+ * @param transparentSortCompareFn The transparent queue comparison function use to sort.
|
|
|
+ */
|
|
|
+ setRenderingOrder(renderingGroupId: number, opaqueSortCompareFn?: (a: SubMesh, b: SubMesh) => number, alphaTestSortCompareFn?: (a: SubMesh, b: SubMesh) => number, transparentSortCompareFn?: (a: SubMesh, b: SubMesh) => number): void;
|
|
|
+ /**
|
|
|
+ * Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.
|
|
|
+ *
|
|
|
+ * @param renderingGroupId The rendering group id corresponding to its index
|
|
|
+ * @param autoClearDepthStencil Automatically clears depth and stencil between groups if true.
|
|
|
+ * @param depth Automatically clears depth between groups if true and autoClear is true.
|
|
|
+ * @param stencil Automatically clears stencil between groups if true and autoClear is true.
|
|
|
+ */
|
|
|
+ setRenderingAutoClearDepthStencil(renderingGroupId: number, autoClearDepthStencil: boolean, depth?: boolean, stencil?: boolean): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class AnaglyphPostProcess extends PostProcess {
|
|
|
private _passedProcess;
|
|
|
constructor(name: string, options: number | PostProcessOptions, rigCameras: Camera[], samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
@@ -12541,245 +12780,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class BoundingBoxRenderer {
|
|
|
- frontColor: Color3;
|
|
|
- backColor: Color3;
|
|
|
- showBackLines: boolean;
|
|
|
- renderList: SmartArray<BoundingBox>;
|
|
|
- private _scene;
|
|
|
- private _colorShader;
|
|
|
- private _vertexBuffers;
|
|
|
- private _indexBuffer;
|
|
|
- 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 {
|
|
|
- edgesWidthScalerForOrthographic: number;
|
|
|
- edgesWidthScalerForPerspective: number;
|
|
|
- private _source;
|
|
|
- private _linesPositions;
|
|
|
- private _linesNormals;
|
|
|
- private _linesIndices;
|
|
|
- private _epsilon;
|
|
|
- private _indicesCount;
|
|
|
- private _lineShader;
|
|
|
- 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 _particleSystems;
|
|
|
- private _spriteManagers;
|
|
|
- private _activeVertices;
|
|
|
- private _opaqueSortCompareFn;
|
|
|
- private _alphaTestSortCompareFn;
|
|
|
- private _transparentSortCompareFn;
|
|
|
- private _renderOpaque;
|
|
|
- private _renderAlphaTest;
|
|
|
- private _renderTransparent;
|
|
|
- onBeforeTransparentRendering: () => void;
|
|
|
- /**
|
|
|
- * Set the opaque sort comparison function.
|
|
|
- * If null the sub meshes will be render in the order they were created
|
|
|
- */
|
|
|
- opaqueSortCompareFn: (a: SubMesh, b: SubMesh) => number;
|
|
|
- /**
|
|
|
- * Set the alpha test sort comparison function.
|
|
|
- * If null the sub meshes will be render in the order they were created
|
|
|
- */
|
|
|
- alphaTestSortCompareFn: (a: SubMesh, b: SubMesh) => number;
|
|
|
- /**
|
|
|
- * Set the transparent sort comparison function.
|
|
|
- * If null the sub meshes will be render in the order they were created
|
|
|
- */
|
|
|
- transparentSortCompareFn: (a: SubMesh, b: SubMesh) => number;
|
|
|
- /**
|
|
|
- * Creates a new rendering group.
|
|
|
- * @param index The rendering group index
|
|
|
- * @param opaqueSortCompareFn The opaque sort comparison function. If null no order is applied
|
|
|
- * @param alphaTestSortCompareFn The alpha test sort comparison function. If null no order is applied
|
|
|
- * @param transparentSortCompareFn The transparent sort comparison function. If null back to front + alpha index sort is applied
|
|
|
- */
|
|
|
- constructor(index: number, scene: Scene, opaqueSortCompareFn?: (a: SubMesh, b: SubMesh) => number, alphaTestSortCompareFn?: (a: SubMesh, b: SubMesh) => number, transparentSortCompareFn?: (a: SubMesh, b: SubMesh) => number);
|
|
|
- /**
|
|
|
- * Render all the sub meshes contained in the group.
|
|
|
- * @param customRenderFunction Used to override the default render behaviour of the group.
|
|
|
- * @returns true if rendered some submeshes.
|
|
|
- */
|
|
|
- render(customRenderFunction: (opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>) => void, renderSprites: boolean, renderParticles: boolean, activeMeshes: AbstractMesh[]): void;
|
|
|
- /**
|
|
|
- * Renders the opaque submeshes in the order from the opaqueSortCompareFn.
|
|
|
- * @param subMeshes The submeshes to render
|
|
|
- */
|
|
|
- private renderOpaqueSorted(subMeshes);
|
|
|
- /**
|
|
|
- * Renders the opaque submeshes in the order from the alphatestSortCompareFn.
|
|
|
- * @param subMeshes The submeshes to render
|
|
|
- */
|
|
|
- private renderAlphaTestSorted(subMeshes);
|
|
|
- /**
|
|
|
- * Renders the opaque submeshes in the order from the transparentSortCompareFn.
|
|
|
- * @param subMeshes The submeshes to render
|
|
|
- */
|
|
|
- private renderTransparentSorted(subMeshes);
|
|
|
- /**
|
|
|
- * Renders the submeshes in a specified order.
|
|
|
- * @param subMeshes The submeshes to sort before render
|
|
|
- * @param sortCompareFn The comparison function use to sort
|
|
|
- * @param cameraPosition The camera position use to preprocess the submeshes to help sorting
|
|
|
- * @param transparent Specifies to activate blending if true
|
|
|
- */
|
|
|
- private static renderSorted(subMeshes, sortCompareFn, cameraPosition, transparent);
|
|
|
- /**
|
|
|
- * Renders the submeshes in the order they were dispatched (no sort applied).
|
|
|
- * @param subMeshes The submeshes to render
|
|
|
- */
|
|
|
- private static renderUnsorted(subMeshes);
|
|
|
- /**
|
|
|
- * Build in function which can be applied to ensure meshes of a special queue (opaque, alpha test, transparent)
|
|
|
- * are rendered back to front if in the same alpha index.
|
|
|
- *
|
|
|
- * @param a The first submesh
|
|
|
- * @param b The second submesh
|
|
|
- * @returns The result of the comparison
|
|
|
- */
|
|
|
- static defaultTransparentSortCompare(a: SubMesh, b: SubMesh): number;
|
|
|
- /**
|
|
|
- * Build in function which can be applied to ensure meshes of a special queue (opaque, alpha test, transparent)
|
|
|
- * are rendered back to front.
|
|
|
- *
|
|
|
- * @param a The first submesh
|
|
|
- * @param b The second submesh
|
|
|
- * @returns The result of the comparison
|
|
|
- */
|
|
|
- static backToFrontSortCompare(a: SubMesh, b: SubMesh): number;
|
|
|
- /**
|
|
|
- * Build in function which can be applied to ensure meshes of a special queue (opaque, alpha test, transparent)
|
|
|
- * are rendered front to back (prevent overdraw).
|
|
|
- *
|
|
|
- * @param a The first submesh
|
|
|
- * @param b The second submesh
|
|
|
- * @returns The result of the comparison
|
|
|
- */
|
|
|
- static frontToBackSortCompare(a: SubMesh, b: SubMesh): number;
|
|
|
- /**
|
|
|
- * Resets the different lists of submeshes to prepare a new frame.
|
|
|
- */
|
|
|
- prepare(): void;
|
|
|
- dispose(): void;
|
|
|
- /**
|
|
|
- * Inserts the submesh in its correct queue depending on its material.
|
|
|
- * @param subMesh The submesh to dispatch
|
|
|
- */
|
|
|
- dispatch(subMesh: SubMesh): void;
|
|
|
- dispatchSprites(spriteManager: SpriteManager): void;
|
|
|
- dispatchParticles(particleSystem: ParticleSystem): void;
|
|
|
- private _renderParticles(activeMeshes);
|
|
|
- private _renderSprites();
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class RenderingManager {
|
|
|
- /**
|
|
|
- * The max id used for rendering groups (not included)
|
|
|
- */
|
|
|
- static MAX_RENDERINGGROUPS: number;
|
|
|
- /**
|
|
|
- * The min id used for rendering groups (included)
|
|
|
- */
|
|
|
- static MIN_RENDERINGGROUPS: number;
|
|
|
- private _scene;
|
|
|
- private _renderingGroups;
|
|
|
- private _depthStencilBufferAlreadyCleaned;
|
|
|
- private _currentIndex;
|
|
|
- private _autoClearDepthStencil;
|
|
|
- private _customOpaqueSortCompareFn;
|
|
|
- private _customAlphaTestSortCompareFn;
|
|
|
- private _customTransparentSortCompareFn;
|
|
|
- private _renderinGroupInfo;
|
|
|
- constructor(scene: Scene);
|
|
|
- private _clearDepthStencilBuffer(depth?, stencil?);
|
|
|
- render(customRenderFunction: (opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>) => void, activeMeshes: AbstractMesh[], renderParticles: boolean, renderSprites: boolean): void;
|
|
|
- reset(): void;
|
|
|
- dispose(): void;
|
|
|
- private _prepareRenderingGroup(renderingGroupId);
|
|
|
- dispatchSprites(spriteManager: SpriteManager): void;
|
|
|
- dispatchParticles(particleSystem: ParticleSystem): void;
|
|
|
- dispatch(subMesh: SubMesh): void;
|
|
|
- /**
|
|
|
- * Overrides the default sort function applied in the renderging group to prepare the meshes.
|
|
|
- * This allowed control for front to back rendering or reversly depending of the special needs.
|
|
|
- *
|
|
|
- * @param renderingGroupId The rendering group id corresponding to its index
|
|
|
- * @param opaqueSortCompareFn The opaque queue comparison function use to sort.
|
|
|
- * @param alphaTestSortCompareFn The alpha test queue comparison function use to sort.
|
|
|
- * @param transparentSortCompareFn The transparent queue comparison function use to sort.
|
|
|
- */
|
|
|
- setRenderingOrder(renderingGroupId: number, opaqueSortCompareFn?: (a: SubMesh, b: SubMesh) => number, alphaTestSortCompareFn?: (a: SubMesh, b: SubMesh) => number, transparentSortCompareFn?: (a: SubMesh, b: SubMesh) => number): void;
|
|
|
- /**
|
|
|
- * Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.
|
|
|
- *
|
|
|
- * @param renderingGroupId The rendering group id corresponding to its index
|
|
|
- * @param autoClearDepthStencil Automatically clears depth and stencil between groups if true.
|
|
|
- * @param depth Automatically clears depth between groups if true and autoClear is true.
|
|
|
- * @param stencil Automatically clears stencil between groups if true and autoClear is true.
|
|
|
- */
|
|
|
- setRenderingAutoClearDepthStencil(renderingGroupId: number, autoClearDepthStencil: boolean, depth?: boolean, stencil?: boolean): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class Sprite {
|
|
|
name: string;
|
|
|
position: Vector3;
|