|
@@ -1155,12 +1155,6 @@ declare module BABYLON {
|
|
|
*/
|
|
|
getDescendants(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): Node[];
|
|
|
/**
|
|
|
- * @param predicate: an optional predicate that will be called on every evaluated children, the predicate must return true for a given child to be part of the result, otherwise it will be ignored.
|
|
|
- * @Deprecated, legacy support.
|
|
|
- * use getDecendants instead.
|
|
|
- */
|
|
|
- getChildren(predicate?: (node: Node) => boolean): Node[];
|
|
|
- /**
|
|
|
* Get all child-meshes of this node.
|
|
|
*/
|
|
|
getChildMeshes(directDecendantsOnly?: boolean, predicate?: (node: Node) => boolean): AbstractMesh[];
|
|
@@ -1375,21 +1369,9 @@ declare module BABYLON {
|
|
|
private _onPointerMove;
|
|
|
private _onPointerDown;
|
|
|
private _onPointerUp;
|
|
|
- /**
|
|
|
- * @deprecated Use onPointerObservable instead
|
|
|
- */
|
|
|
onPointerMove: (evt: PointerEvent, pickInfo: PickingInfo) => void;
|
|
|
- /**
|
|
|
- * @deprecated Use onPointerObservable instead
|
|
|
- */
|
|
|
onPointerDown: (evt: PointerEvent, pickInfo: PickingInfo) => void;
|
|
|
- /**
|
|
|
- * @deprecated Use onPointerObservable instead
|
|
|
- */
|
|
|
onPointerUp: (evt: PointerEvent, pickInfo: PickingInfo) => void;
|
|
|
- /**
|
|
|
- * @deprecated Use onPointerObservable instead
|
|
|
- */
|
|
|
onPointerPick: (evt: PointerEvent, pickInfo: PickingInfo) => void;
|
|
|
/**
|
|
|
* This observable event is triggered when any mouse event registered during Scene.attach() is called BEFORE the 3D engine to process anything (mesh/sprite picking for instance).
|
|
@@ -1880,17 +1862,6 @@ declare module BABYLON {
|
|
|
enablePhysics(gravity?: Vector3, plugin?: IPhysicsEnginePlugin): boolean;
|
|
|
disablePhysicsEngine(): void;
|
|
|
isPhysicsEnabled(): boolean;
|
|
|
- /**
|
|
|
- *
|
|
|
- * Sets the gravity of the physics engine (and NOT of the scene)
|
|
|
- * @param {BABYLON.Vector3} [gravity] - the new gravity to be used
|
|
|
- */
|
|
|
- setGravity(gravity: Vector3): void;
|
|
|
- /**
|
|
|
- * Legacy support, using the new API
|
|
|
- * @Deprecated
|
|
|
- */
|
|
|
- createCompoundImpostor(parts: any, options: PhysicsImpostorParameters): any;
|
|
|
deleteCompoundImpostor(compound: any): void;
|
|
|
createDefaultCameraOrLight(createArcRotateCamera?: boolean): void;
|
|
|
private _getByTags(list, tagsQuery, forEach?);
|
|
@@ -3539,7 +3510,7 @@ declare module BABYLON {
|
|
|
_decideIfNeedsToMove(): boolean;
|
|
|
_updatePosition(): void;
|
|
|
_checkInputs(): void;
|
|
|
- private _updateCameraRotationMatrix();
|
|
|
+ protected _updateCameraRotationMatrix(): void;
|
|
|
_getViewMatrix(): Matrix;
|
|
|
/**
|
|
|
* @override
|
|
@@ -3913,14 +3884,6 @@ declare module BABYLON {
|
|
|
intersectsMesh(mesh: AbstractMesh, fastCheck?: boolean): PickingInfo;
|
|
|
intersectsMeshes(meshes: Array<AbstractMesh>, fastCheck?: boolean, results?: Array<PickingInfo>): Array<PickingInfo>;
|
|
|
private _comparePickingInfo(pickingInfoA, pickingInfoB);
|
|
|
- /**
|
|
|
- * @Deprecated. Use new RayHelper.show() instead.
|
|
|
- * */
|
|
|
- show(scene: Scene, color: Color3): void;
|
|
|
- /**
|
|
|
- * @Deprecated. Use new RayHelper.hide() instead.
|
|
|
- * */
|
|
|
- hide(): void;
|
|
|
private static smallnum;
|
|
|
private static rayl;
|
|
|
/**
|
|
@@ -7775,7 +7738,6 @@ declare module BABYLON {
|
|
|
*/
|
|
|
actionManager: ActionManager;
|
|
|
physicsImpostor: BABYLON.PhysicsImpostor;
|
|
|
- onPhysicsCollide: (collidedMesh: AbstractMesh, contact: any) => void;
|
|
|
private _checkCollisions;
|
|
|
private _collisionMask;
|
|
|
private _collisionGroup;
|
|
@@ -8103,23 +8065,7 @@ declare module BABYLON {
|
|
|
* Returns a boolean.
|
|
|
*/
|
|
|
intersectsPoint(point: Vector3): boolean;
|
|
|
- /**
|
|
|
- * @Deprecated. Use new PhysicsImpostor instead.
|
|
|
- * */
|
|
|
- setPhysicsState(impostor?: any, options?: PhysicsImpostorParameters): any;
|
|
|
getPhysicsImpostor(): PhysicsImpostor;
|
|
|
- /**
|
|
|
- * @Deprecated. Use getPhysicsImpostor().getParam("mass");
|
|
|
- */
|
|
|
- getPhysicsMass(): number;
|
|
|
- /**
|
|
|
- * @Deprecated. Use getPhysicsImpostor().getParam("friction");
|
|
|
- */
|
|
|
- getPhysicsFriction(): number;
|
|
|
- /**
|
|
|
- * @Deprecated. Use getPhysicsImpostor().getParam("restitution");
|
|
|
- */
|
|
|
- getPhysicsRestitution(): number;
|
|
|
getPositionInCameraSpace(camera?: Camera): Vector3;
|
|
|
/**
|
|
|
* Returns the distance from the mesh to the active camera.
|
|
@@ -8129,16 +8075,6 @@ declare module BABYLON {
|
|
|
applyImpulse(force: Vector3, contactPoint: Vector3): AbstractMesh;
|
|
|
setPhysicsLinkWith(otherMesh: Mesh, pivot1: Vector3, pivot2: Vector3, options?: any): AbstractMesh;
|
|
|
/**
|
|
|
- * @Deprecated
|
|
|
- */
|
|
|
- updatePhysicsBodyPosition(): void;
|
|
|
- /**
|
|
|
- * @Deprecated
|
|
|
- * Calling this function is not needed anymore.
|
|
|
- * The physics engine takes care of transofmration automatically.
|
|
|
- */
|
|
|
- updatePhysicsBody(): void;
|
|
|
- /**
|
|
|
* Property checkCollisions : Boolean, whether the camera should check the collisions against the mesh.
|
|
|
* Default `false`.
|
|
|
*/
|
|
@@ -9060,10 +8996,6 @@ declare module BABYLON {
|
|
|
*/
|
|
|
updateVerticesData(kind: string, data: number[] | Float32Array, updateExtends?: boolean, makeItUnique?: boolean): Mesh;
|
|
|
/**
|
|
|
- * Deprecated since BabylonJS v2.3
|
|
|
- */
|
|
|
- updateVerticesDataDirectly(kind: string, data: Float32Array, offset?: number, makeItUnique?: boolean): void;
|
|
|
- /**
|
|
|
* This method updates the vertex positions of an updatable mesh according to the `positionFunction` returned values.
|
|
|
* tuto : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#other-shapes-updatemeshpositions
|
|
|
* The parameter `positionFunction` is a simple JS function what is passed the mesh `positions` array. It doesn't need to return anything.
|
|
@@ -11243,20 +11175,6 @@ declare module BABYLON {
|
|
|
setTimeStep(newTimeStep?: number): void;
|
|
|
dispose(): void;
|
|
|
getPhysicsPluginName(): string;
|
|
|
- /**
|
|
|
- * @Deprecated
|
|
|
- *
|
|
|
- */
|
|
|
- static NoImpostor: number;
|
|
|
- static SphereImpostor: number;
|
|
|
- static BoxImpostor: number;
|
|
|
- static PlaneImpostor: number;
|
|
|
- static MeshImpostor: number;
|
|
|
- static CylinderImpostor: number;
|
|
|
- static HeightmapImpostor: number;
|
|
|
- static CapsuleImpostor: number;
|
|
|
- static ConeImpostor: number;
|
|
|
- static ConvexHullImpostor: number;
|
|
|
static Epsilon: number;
|
|
|
private _impostors;
|
|
|
private _joints;
|
|
@@ -11597,372 +11515,112 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class ReflectionProbe {
|
|
|
- name: string;
|
|
|
- private _scene;
|
|
|
- private _renderTargetTexture;
|
|
|
- private _projectionMatrix;
|
|
|
- private _viewMatrix;
|
|
|
- private _target;
|
|
|
- private _add;
|
|
|
- private _attachedMesh;
|
|
|
- invertYAxis: boolean;
|
|
|
- position: Vector3;
|
|
|
- constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
|
|
|
- samples: number;
|
|
|
- refreshRate: number;
|
|
|
- getScene(): Scene;
|
|
|
- readonly cubeTexture: RenderTargetTexture;
|
|
|
- readonly renderList: AbstractMesh[];
|
|
|
- attachToMesh(mesh: AbstractMesh): void;
|
|
|
- dispose(): void;
|
|
|
+ class AnaglyphPostProcess extends PostProcess {
|
|
|
+ private _passedProcess;
|
|
|
+ constructor(name: string, options: number | PostProcessOptions, rigCameras: Camera[], samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
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;
|
|
|
+ class BlackAndWhitePostProcess extends PostProcess {
|
|
|
+ constructor(name: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
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;
|
|
|
+ class BlurPostProcess extends PostProcess {
|
|
|
+ direction: Vector2;
|
|
|
+ blurWidth: number;
|
|
|
+ constructor(name: string, direction: Vector2, blurWidth: number, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
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;
|
|
|
+ class ColorCorrectionPostProcess extends PostProcess {
|
|
|
+ private _colorTableTexture;
|
|
|
+ constructor(name: string, colorTableUrl: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
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;
|
|
|
+ class ConvolutionPostProcess extends PostProcess {
|
|
|
+ kernel: number[];
|
|
|
+ constructor(name: string, kernel: number[], options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
+ static EdgeDetect0Kernel: number[];
|
|
|
+ static EdgeDetect1Kernel: number[];
|
|
|
+ static EdgeDetect2Kernel: number[];
|
|
|
+ static SharpenKernel: number[];
|
|
|
+ static EmbossKernel: number[];
|
|
|
+ static GaussianKernel: number[];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
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;
|
|
|
+ class DisplayPassPostProcess extends PostProcess {
|
|
|
+ constructor(name: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class FilterPostProcess extends PostProcess {
|
|
|
+ kernelMatrix: Matrix;
|
|
|
+ constructor(name: string, kernelMatrix: Matrix, options: number | PostProcessOptions, camera?: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class FxaaPostProcess extends PostProcess {
|
|
|
+ texelWidth: number;
|
|
|
+ texelHeight: number;
|
|
|
+ constructor(name: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class HDRRenderingPipeline extends PostProcessRenderPipeline implements IDisposable {
|
|
|
/**
|
|
|
- * 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;
|
|
|
+ * Public members
|
|
|
+ */
|
|
|
/**
|
|
|
- * 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;
|
|
|
+ * Gaussian blur coefficient
|
|
|
+ * @type {number}
|
|
|
+ */
|
|
|
+ gaussCoeff: 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;
|
|
|
+ * Gaussian blur mean
|
|
|
+ * @type {number}
|
|
|
+ */
|
|
|
+ gaussMean: 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);
|
|
|
+ * Gaussian blur standard deviation
|
|
|
+ * @type {number}
|
|
|
+ */
|
|
|
+ gaussStandDev: 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;
|
|
|
+ * Gaussian blur multiplier. Multiplies the blur effect
|
|
|
+ * @type {number}
|
|
|
+ */
|
|
|
+ gaussMultiplier: number;
|
|
|
/**
|
|
|
- * Renders the opaque submeshes in the order from the opaqueSortCompareFn.
|
|
|
- * @param subMeshes The submeshes to render
|
|
|
- */
|
|
|
- private renderOpaqueSorted(subMeshes);
|
|
|
+ * Exposure, controls the overall intensity of the pipeline
|
|
|
+ * @type {number}
|
|
|
+ */
|
|
|
+ exposure: number;
|
|
|
/**
|
|
|
- * Renders the opaque submeshes in the order from the alphatestSortCompareFn.
|
|
|
- * @param subMeshes The submeshes to render
|
|
|
- */
|
|
|
- private renderAlphaTestSorted(subMeshes);
|
|
|
+ * Minimum luminance that the post-process can output. Luminance is >= 0
|
|
|
+ * @type {number}
|
|
|
+ */
|
|
|
+ minimumLuminance: number;
|
|
|
/**
|
|
|
- * Renders the opaque submeshes in the order from the transparentSortCompareFn.
|
|
|
- * @param subMeshes The submeshes to render
|
|
|
- */
|
|
|
- private renderTransparentSorted(subMeshes);
|
|
|
+ * Maximum luminance that the post-process can output. Must be suprerior to minimumLuminance
|
|
|
+ * @type {number}
|
|
|
+ */
|
|
|
+ maximumLuminance: number;
|
|
|
/**
|
|
|
- * 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;
|
|
|
- /**
|
|
|
- * 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;
|
|
|
- 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);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class BlackAndWhitePostProcess extends PostProcess {
|
|
|
- constructor(name: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class BlurPostProcess extends PostProcess {
|
|
|
- direction: Vector2;
|
|
|
- blurWidth: number;
|
|
|
- constructor(name: string, direction: Vector2, blurWidth: number, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class ColorCorrectionPostProcess extends PostProcess {
|
|
|
- private _colorTableTexture;
|
|
|
- constructor(name: string, colorTableUrl: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class ConvolutionPostProcess extends PostProcess {
|
|
|
- kernel: number[];
|
|
|
- constructor(name: string, kernel: number[], options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
- static EdgeDetect0Kernel: number[];
|
|
|
- static EdgeDetect1Kernel: number[];
|
|
|
- static EdgeDetect2Kernel: number[];
|
|
|
- static SharpenKernel: number[];
|
|
|
- static EmbossKernel: number[];
|
|
|
- static GaussianKernel: number[];
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class DisplayPassPostProcess extends PostProcess {
|
|
|
- constructor(name: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class FilterPostProcess extends PostProcess {
|
|
|
- kernelMatrix: Matrix;
|
|
|
- constructor(name: string, kernelMatrix: Matrix, options: number | PostProcessOptions, camera?: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class FxaaPostProcess extends PostProcess {
|
|
|
- texelWidth: number;
|
|
|
- texelHeight: number;
|
|
|
- constructor(name: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class HDRRenderingPipeline extends PostProcessRenderPipeline implements IDisposable {
|
|
|
- /**
|
|
|
- * Public members
|
|
|
- */
|
|
|
- /**
|
|
|
- * Gaussian blur coefficient
|
|
|
- * @type {number}
|
|
|
- */
|
|
|
- gaussCoeff: number;
|
|
|
- /**
|
|
|
- * Gaussian blur mean
|
|
|
- * @type {number}
|
|
|
- */
|
|
|
- gaussMean: number;
|
|
|
- /**
|
|
|
- * Gaussian blur standard deviation
|
|
|
- * @type {number}
|
|
|
- */
|
|
|
- gaussStandDev: number;
|
|
|
- /**
|
|
|
- * Gaussian blur multiplier. Multiplies the blur effect
|
|
|
- * @type {number}
|
|
|
- */
|
|
|
- gaussMultiplier: number;
|
|
|
- /**
|
|
|
- * Exposure, controls the overall intensity of the pipeline
|
|
|
- * @type {number}
|
|
|
- */
|
|
|
- exposure: number;
|
|
|
- /**
|
|
|
- * Minimum luminance that the post-process can output. Luminance is >= 0
|
|
|
- * @type {number}
|
|
|
- */
|
|
|
- minimumLuminance: number;
|
|
|
- /**
|
|
|
- * Maximum luminance that the post-process can output. Must be suprerior to minimumLuminance
|
|
|
- * @type {number}
|
|
|
- */
|
|
|
- maximumLuminance: number;
|
|
|
- /**
|
|
|
- * Increase rate for luminance: eye adaptation speed to dark
|
|
|
- * @type {number}
|
|
|
- */
|
|
|
- luminanceIncreaserate: number;
|
|
|
+ * Increase rate for luminance: eye adaptation speed to dark
|
|
|
+ * @type {number}
|
|
|
+ */
|
|
|
+ luminanceIncreaserate: number;
|
|
|
/**
|
|
|
* Decrease rate for luminance: eye adaptation speed to bright
|
|
|
* @type {number}
|
|
@@ -12312,16 +11970,6 @@ declare module BABYLON {
|
|
|
*/
|
|
|
constructor(name: string, scene: Scene, ratio: any, cameras?: Camera[]);
|
|
|
/**
|
|
|
- * Returns the horizontal blur PostProcess
|
|
|
- * @return {BABYLON.BlurPostProcess} The horizontal blur post-process
|
|
|
- */
|
|
|
- getBlurHPostProcess(): BlurPostProcess;
|
|
|
- /**
|
|
|
- * Returns the vertical blur PostProcess
|
|
|
- * @return {BABYLON.BlurPostProcess} The vertical blur post-process
|
|
|
- */
|
|
|
- getBlurVPostProcess(): BlurPostProcess;
|
|
|
- /**
|
|
|
* Removes the internal pipeline assets and detatches the pipeline from the scene cameras
|
|
|
*/
|
|
|
dispose(disableDepthRender?: boolean): void;
|
|
@@ -12540,6 +12188,266 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class ReflectionProbe {
|
|
|
+ name: string;
|
|
|
+ private _scene;
|
|
|
+ private _renderTargetTexture;
|
|
|
+ private _projectionMatrix;
|
|
|
+ private _viewMatrix;
|
|
|
+ private _target;
|
|
|
+ private _add;
|
|
|
+ private _attachedMesh;
|
|
|
+ invertYAxis: boolean;
|
|
|
+ position: Vector3;
|
|
|
+ constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
|
|
|
+ samples: number;
|
|
|
+ refreshRate: number;
|
|
|
+ getScene(): Scene;
|
|
|
+ readonly cubeTexture: RenderTargetTexture;
|
|
|
+ readonly renderList: AbstractMesh[];
|
|
|
+ attachToMesh(mesh: AbstractMesh): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+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;
|
|
|
+ /**
|
|
|
+ * 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;
|
|
|
+ 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;
|
|
@@ -14264,9 +14172,10 @@ declare module BABYLON {
|
|
|
private _quaternionCache;
|
|
|
private _positionOffset;
|
|
|
devicePosition: Vector3;
|
|
|
- deviceRotationQuaternion: Quaternion;
|
|
|
+ deviceRotationQuaternion: any;
|
|
|
deviceScaleFactor: number;
|
|
|
controllers: Array<WebVRController>;
|
|
|
+ onControllersAttached: (controllers: Array<WebVRController>) => void;
|
|
|
constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, webVROptions?: WebVROptions);
|
|
|
_checkInputs(): void;
|
|
|
updateFromDevice(poseData: DevicePose): void;
|
|
@@ -14283,24 +14192,14 @@ declare module BABYLON {
|
|
|
*/
|
|
|
attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
detachControl(element: HTMLElement): void;
|
|
|
- requestVRFullscreen(requestPointerlock: boolean): void;
|
|
|
getClassName(): string;
|
|
|
resetToCurrentRotation(): void;
|
|
|
/**
|
|
|
- *
|
|
|
- * @deprecated
|
|
|
- * This function was used to change the position offset. it is now done using camera.position.
|
|
|
- *
|
|
|
- * @param {Vector3} [newPosition] an optional new position. if not provided, the current camera position will be used.
|
|
|
- *
|
|
|
- * @memberOf WebVRFreeCamera
|
|
|
- */
|
|
|
- setPositionOffset(newPosition?: Vector3): 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 _updateCameraRotationMatrix(): void;
|
|
|
_isSynchronizedViewMatrix(): boolean;
|
|
|
protected _getWebVRProjectionMatrix(): Matrix;
|
|
|
initControllers(): void;
|