|
@@ -10627,6 +10627,11 @@ declare module BABYLON {
|
|
|
* @param updatable.
|
|
|
*/
|
|
|
createNormals(updatable: boolean): void;
|
|
|
+ /**
|
|
|
+ * Align the mesh with a normal.
|
|
|
+ * Returns the mesh.
|
|
|
+ */
|
|
|
+ alignWithNormal(normal: BABYLON.Vector3, upDirection?: BABYLON.Vector3): AbstractMesh;
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -12608,7 +12613,7 @@ declare module BABYLON {
|
|
|
* The parameter `lines` is an array of lines, each line being an array of successive Vector3.
|
|
|
* The optional parameter `instance` is an instance of an existing LineSystem object to be updated with the passed `lines` parameter. The way to update it is the same than for
|
|
|
* The optional parameter `colors` is an array of line colors, each line colors being an array of successive Color4, one per line point.
|
|
|
- * The optional parameter `useVertexAlpha' is to be set to `true` (default `false`) when the alpha value from the former `Color4` array must be used.
|
|
|
+ * The optional parameter `useVertexAlpha' is to be set to `false` (default `true`) when you don't need the alpha blending (faster).
|
|
|
* updating a simple Line mesh, you just need to update every line in the `lines` array : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#lines-and-dashedlines
|
|
|
* When updating an instance, remember that only line point positions can change, not the number of points, neither the number of lines.
|
|
|
* The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
|
|
@@ -12628,7 +12633,7 @@ declare module BABYLON {
|
|
|
* The parameter `points` is an array successive Vector3.
|
|
|
* The optional parameter `instance` is an instance of an existing LineMesh object to be updated with the passed `points` parameter : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#lines-and-dashedlines
|
|
|
* The optional parameter `colors` is an array of successive Color4, one per line point.
|
|
|
- * The optional parameter `useVertexAlpha' is to be set to `true` (default `false`) when the alpha value from the former `Color4` array must be used.
|
|
|
+ * The optional parameter `useVertexAlpha' is to be set to `false` (default `true`) when you don't need alpha blending (faster).
|
|
|
* When updating an instance, remember that only point positions can change, not the number of points.
|
|
|
* The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
|
|
|
*/
|
|
@@ -14378,7 +14383,7 @@ declare module BABYLON {
|
|
|
* Disposes the radialSphere.
|
|
|
* @param {bolean} force
|
|
|
*/
|
|
|
- cleanup(force?: boolean): void;
|
|
|
+ dispose(force?: boolean): void;
|
|
|
/*** Helpers ***/
|
|
|
|
|
|
|
|
@@ -14420,7 +14425,7 @@ declare module BABYLON {
|
|
|
* Disposes the radialSphere.
|
|
|
* @param {bolean} force
|
|
|
*/
|
|
|
- cleanup(force?: boolean): void;
|
|
|
+ dispose(force?: boolean): void;
|
|
|
|
|
|
}
|
|
|
interface PhysicsGravitationalFieldEventData {
|
|
@@ -14744,32 +14749,265 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class ReflectionProbe {
|
|
|
- name: string;
|
|
|
+ class BoundingBoxRenderer {
|
|
|
+ frontColor: Color3;
|
|
|
+ backColor: Color3;
|
|
|
+ showBackLines: boolean;
|
|
|
+ renderList: SmartArray<BoundingBox>;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ constructor(scene: Scene);
|
|
|
|
|
|
|
|
|
|
|
|
- invertYAxis: boolean;
|
|
|
- position: Vector3;
|
|
|
- constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
|
|
|
- samples: number;
|
|
|
- refreshRate: number;
|
|
|
- getScene(): Scene;
|
|
|
- readonly cubeTexture: RenderTargetTexture;
|
|
|
- readonly renderList: Nullable<AbstractMesh[]>;
|
|
|
- attachToMesh(mesh: AbstractMesh): void;
|
|
|
+ reset(): void;
|
|
|
+ render(): void;
|
|
|
+ renderOcclusionBoundingBox(mesh: AbstractMesh): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class DepthRenderer {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ constructor(scene: Scene, type?: number);
|
|
|
+ isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
+ getDepthMap(): RenderTargetTexture;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class EdgesRenderer {
|
|
|
+ edgesWidthScalerForOrthographic: number;
|
|
|
+ edgesWidthScalerForPerspective: number;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ constructor(source: AbstractMesh, epsilon?: number, checkVerticesInsteadOfIndices?: boolean);
|
|
|
+
|
|
|
+
|
|
|
+ dispose(): void;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ render(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class GeometryBufferRenderer {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ renderList: Mesh[];
|
|
|
+ readonly isSupported: boolean;
|
|
|
+ enablePosition: boolean;
|
|
|
+ constructor(scene: Scene, ratio?: number);
|
|
|
+ isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
+ getGBuffer(): MultiRenderTarget;
|
|
|
+ dispose(): void;
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class OutlineRenderer {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ zOffset: number;
|
|
|
+ constructor(scene: Scene);
|
|
|
+ render(subMesh: SubMesh, batch: _InstancesBatch, useOverlay?: boolean): void;
|
|
|
+ isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class RenderingGroup {
|
|
|
+ index: number;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ onBeforeTransparentRendering: () => void;
|
|
|
+ /**
|
|
|
+ * Set the opaque sort comparison function.
|
|
|
+ * If null the sub meshes will be render in the order they were created
|
|
|
+ */
|
|
|
+ opaqueSortCompareFn: Nullable<(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: Nullable<(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: Nullable<(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?: Nullable<(a: SubMesh, b: SubMesh) => number>, alphaTestSortCompareFn?: Nullable<(a: SubMesh, b: SubMesh) => number>, transparentSortCompareFn?: Nullable<(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: Nullable<(opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>) => void>, renderSprites: boolean, renderParticles: boolean, activeMeshes: Nullable<AbstractMesh[]>): void;
|
|
|
+ /**
|
|
|
+ * Renders the opaque submeshes in the order from the opaqueSortCompareFn.
|
|
|
+ * @param subMeshes The submeshes to render
|
|
|
+ */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Renders the opaque submeshes in the order from the alphatestSortCompareFn.
|
|
|
+ * @param subMeshes The submeshes to render
|
|
|
+ */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Renders the opaque submeshes in the order from the transparentSortCompareFn.
|
|
|
+ * @param subMeshes The submeshes to render
|
|
|
+ */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 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
|
|
|
+ */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Renders the submeshes in the order they were dispatched (no sort applied).
|
|
|
+ * @param subMeshes The submeshes to render
|
|
|
+ */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 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: IParticleSystem): void;
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+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;
|
|
|
+ /**
|
|
|
+ * Used to globally prevent autoclearing scenes.
|
|
|
+ */
|
|
|
+ static AUTOCLEAR: boolean;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ constructor(scene: Scene);
|
|
|
+
|
|
|
+ render(customRenderFunction: Nullable<(opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>) => void>, activeMeshes: Nullable<AbstractMesh[]>, renderParticles: boolean, renderSprites: boolean): void;
|
|
|
+ reset(): void;
|
|
|
+ dispose(): void;
|
|
|
+
|
|
|
+ dispatchSprites(spriteManager: SpriteManager): void;
|
|
|
+ dispatchParticles(particleSystem: IParticleSystem): 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?: Nullable<(a: SubMesh, b: SubMesh) => number>, alphaTestSortCompareFn?: Nullable<(a: SubMesh, b: SubMesh) => number>, transparentSortCompareFn?: Nullable<(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): void;
|
|
|
- dispose(): void;
|
|
|
+ setRenderingAutoClearDepthStencil(renderingGroupId: number, autoClearDepthStencil: boolean, depth?: boolean, stencil?: boolean): void;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -15025,7 +15263,7 @@ declare module BABYLON {
|
|
|
* Defines cache preventing GC.
|
|
|
*/
|
|
|
|
|
|
- constructor(name: string, options: number | PostProcessOptions, camera?: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
|
|
|
+ constructor(name: string, options: number | PostProcessOptions, camera?: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number, imageProcessingConfiguration?: ImageProcessingConfiguration);
|
|
|
getClassName(): string;
|
|
|
|
|
|
dispose(camera?: Camera): void;
|
|
@@ -15122,394 +15360,159 @@ declare module BABYLON {
|
|
|
|
|
|
|
|
|
|
|
|
- constructor(scene: Scene);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- directRender(postProcesses: PostProcess[], targetTexture?: Nullable<InternalTexture>, forceFullscreenViewport?: boolean): void;
|
|
|
-
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class RefractionPostProcess extends PostProcess {
|
|
|
- color: Color3;
|
|
|
- depth: number;
|
|
|
- colorLevel: number;
|
|
|
-
|
|
|
- constructor(name: string, refractionTextureUrl: string, color: Color3, depth: number, colorLevel: number, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
- dispose(camera: Camera): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class StereoscopicInterlacePostProcess extends PostProcess {
|
|
|
-
|
|
|
-
|
|
|
- constructor(name: string, rigCameras: Camera[], isStereoscopicHoriz: boolean, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- enum TonemappingOperator {
|
|
|
- Hable = 0,
|
|
|
- Reinhard = 1,
|
|
|
- HejiDawson = 2,
|
|
|
- Photographic = 3,
|
|
|
- }
|
|
|
- class TonemapPostProcess extends PostProcess {
|
|
|
-
|
|
|
- exposureAdjustment: number;
|
|
|
- constructor(name: string, _operator: TonemappingOperator, exposureAdjustment: number, camera: Camera, samplingMode?: number, engine?: Engine, textureFormat?: number);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class VolumetricLightScatteringPostProcess extends PostProcess {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * If not undefined, the mesh position is computed from the attached node position
|
|
|
- * @type {{position: Vector3}}
|
|
|
- */
|
|
|
- attachedNode: {
|
|
|
- position: Vector3;
|
|
|
- };
|
|
|
- /**
|
|
|
- * Custom position of the mesh. Used if "useCustomMeshPosition" is set to "true"
|
|
|
- * @type {Vector3}
|
|
|
- */
|
|
|
- customMeshPosition: Vector3;
|
|
|
- /**
|
|
|
- * Set if the post-process should use a custom position for the light source (true) or the internal mesh position (false)
|
|
|
- * @type {boolean}
|
|
|
- */
|
|
|
- useCustomMeshPosition: boolean;
|
|
|
- /**
|
|
|
- * If the post-process should inverse the light scattering direction
|
|
|
- * @type {boolean}
|
|
|
- */
|
|
|
- invert: boolean;
|
|
|
- /**
|
|
|
- * The internal mesh used by the post-process
|
|
|
- * @type {boolean}
|
|
|
- */
|
|
|
- mesh: Mesh;
|
|
|
- useDiffuseColor: boolean;
|
|
|
- /**
|
|
|
- * Array containing the excluded meshes not rendered in the internal pass
|
|
|
- */
|
|
|
- excludedMeshes: AbstractMesh[];
|
|
|
- /**
|
|
|
- * Controls the overall intensity of the post-process
|
|
|
- * @type {number}
|
|
|
- */
|
|
|
- exposure: number;
|
|
|
- /**
|
|
|
- * Dissipates each sample's contribution in range [0, 1]
|
|
|
- * @type {number}
|
|
|
- */
|
|
|
- decay: number;
|
|
|
- /**
|
|
|
- * Controls the overall intensity of each sample
|
|
|
- * @type {number}
|
|
|
- */
|
|
|
- weight: number;
|
|
|
- /**
|
|
|
- * Controls the density of each sample
|
|
|
- * @type {number}
|
|
|
- */
|
|
|
- density: number;
|
|
|
- /**
|
|
|
- * @constructor
|
|
|
- * @param {string} name - The post-process name
|
|
|
- * @param {any} ratio - The size of the post-process and/or internal pass (0.5 means that your postprocess will have a width = canvas.width 0.5 and a height = canvas.height 0.5)
|
|
|
- * @param {BABYLON.Camera} camera - The camera that the post-process will be attached to
|
|
|
- * @param {BABYLON.Mesh} mesh - The mesh used to create the light scattering
|
|
|
- * @param {number} samples - The post-process quality, default 100
|
|
|
- * @param {number} samplingMode - The post-process filtering mode
|
|
|
- * @param {BABYLON.Engine} engine - The babylon engine
|
|
|
- * @param {boolean} reusable - If the post-process is reusable
|
|
|
- * @param {BABYLON.Scene} scene - The constructor needs a scene reference to initialize internal components. If "camera" is null (RenderPipelineà, "scene" must be provided
|
|
|
- */
|
|
|
- constructor(name: string, ratio: any, camera: Camera, mesh?: Mesh, samples?: number, samplingMode?: number, engine?: Engine, reusable?: boolean, scene?: Scene);
|
|
|
- getClassName(): string;
|
|
|
- isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
- /**
|
|
|
- * Sets the new light position for light scattering effect
|
|
|
- * @param {BABYLON.Vector3} The new custom light position
|
|
|
- */
|
|
|
- setCustomMeshPosition(position: Vector3): void;
|
|
|
- /**
|
|
|
- * Returns the light position for light scattering effect
|
|
|
- * @return {BABYLON.Vector3} The custom light position
|
|
|
- */
|
|
|
- getCustomMeshPosition(): Vector3;
|
|
|
- /**
|
|
|
- * Disposes the internal assets and detaches the post-process from the camera
|
|
|
- */
|
|
|
- dispose(camera: Camera): void;
|
|
|
- /**
|
|
|
- * Returns the render target texture used by the post-process
|
|
|
- * @return {BABYLON.RenderTargetTexture} The render target texture used by the post-process
|
|
|
- */
|
|
|
- getPass(): RenderTargetTexture;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * Creates a default mesh for the Volumeric Light Scattering post-process
|
|
|
- * @param {string} The mesh name
|
|
|
- * @param {BABYLON.Scene} The scene where to create the mesh
|
|
|
- * @return {BABYLON.Mesh} the default mesh
|
|
|
- */
|
|
|
- static CreateDefaultMesh(name: string, scene: Scene): Mesh;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class VRDistortionCorrectionPostProcess extends PostProcess {
|
|
|
- aspectRatio: number;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- constructor(name: string, camera: Camera, isRightEye: boolean, vrMetrics: VRCameraMetrics);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class BoundingBoxRenderer {
|
|
|
- frontColor: Color3;
|
|
|
- backColor: Color3;
|
|
|
- showBackLines: boolean;
|
|
|
- renderList: SmartArray<BoundingBox>;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- constructor(scene: Scene);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- reset(): void;
|
|
|
- render(): void;
|
|
|
- renderOcclusionBoundingBox(mesh: AbstractMesh): void;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class DepthRenderer {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- constructor(scene: Scene, type?: number);
|
|
|
- isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
- getDepthMap(): RenderTargetTexture;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class EdgesRenderer {
|
|
|
- edgesWidthScalerForOrthographic: number;
|
|
|
- edgesWidthScalerForPerspective: number;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- constructor(source: AbstractMesh, epsilon?: number, checkVerticesInsteadOfIndices?: boolean);
|
|
|
-
|
|
|
-
|
|
|
- dispose(): void;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- render(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class GeometryBufferRenderer {
|
|
|
-
|
|
|
-
|
|
|
+ constructor(scene: Scene);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- renderList: Mesh[];
|
|
|
- readonly isSupported: boolean;
|
|
|
- enablePosition: boolean;
|
|
|
- constructor(scene: Scene, ratio?: number);
|
|
|
- isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
- getGBuffer(): MultiRenderTarget;
|
|
|
- dispose(): void;
|
|
|
+ directRender(postProcesses: PostProcess[], targetTexture?: Nullable<InternalTexture>, forceFullscreenViewport?: boolean): void;
|
|
|
|
|
|
+ dispose(): void;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class OutlineRenderer {
|
|
|
-
|
|
|
-
|
|
|
+ class RefractionPostProcess extends PostProcess {
|
|
|
+ color: Color3;
|
|
|
+ depth: number;
|
|
|
+ colorLevel: number;
|
|
|
|
|
|
- zOffset: number;
|
|
|
- constructor(scene: Scene);
|
|
|
- render(subMesh: SubMesh, batch: _InstancesBatch, useOverlay?: boolean): void;
|
|
|
- isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
+ constructor(name: string, refractionTextureUrl: string, color: Color3, depth: number, colorLevel: number, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
+ dispose(camera: Camera): void;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class RenderingGroup {
|
|
|
- index: number;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ class StereoscopicInterlacePostProcess extends PostProcess {
|
|
|
|
|
|
|
|
|
+ constructor(name: string, rigCameras: Camera[], isStereoscopicHoriz: boolean, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
+declare module BABYLON {
|
|
|
+ enum TonemappingOperator {
|
|
|
+ Hable = 0,
|
|
|
+ Reinhard = 1,
|
|
|
+ HejiDawson = 2,
|
|
|
+ Photographic = 3,
|
|
|
+ }
|
|
|
+ class TonemapPostProcess extends PostProcess {
|
|
|
|
|
|
+ exposureAdjustment: number;
|
|
|
+ constructor(name: string, _operator: TonemappingOperator, exposureAdjustment: number, camera: Camera, samplingMode?: number, engine?: Engine, textureFormat?: number);
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
+declare module BABYLON {
|
|
|
+ class VolumetricLightScatteringPostProcess extends PostProcess {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- onBeforeTransparentRendering: () => void;
|
|
|
/**
|
|
|
- * Set the opaque sort comparison function.
|
|
|
- * If null the sub meshes will be render in the order they were created
|
|
|
- */
|
|
|
- opaqueSortCompareFn: Nullable<(a: SubMesh, b: SubMesh) => number>;
|
|
|
+ * If not undefined, the mesh position is computed from the attached node position
|
|
|
+ * @type {{position: Vector3}}
|
|
|
+ */
|
|
|
+ attachedNode: {
|
|
|
+ position: Vector3;
|
|
|
+ };
|
|
|
/**
|
|
|
- * Set the alpha test sort comparison function.
|
|
|
- * If null the sub meshes will be render in the order they were created
|
|
|
- */
|
|
|
- alphaTestSortCompareFn: Nullable<(a: SubMesh, b: SubMesh) => number>;
|
|
|
+ * Custom position of the mesh. Used if "useCustomMeshPosition" is set to "true"
|
|
|
+ * @type {Vector3}
|
|
|
+ */
|
|
|
+ customMeshPosition: Vector3;
|
|
|
/**
|
|
|
- * Set the transparent sort comparison function.
|
|
|
- * If null the sub meshes will be render in the order they were created
|
|
|
- */
|
|
|
- transparentSortCompareFn: Nullable<(a: SubMesh, b: SubMesh) => number>;
|
|
|
+ * Set if the post-process should use a custom position for the light source (true) or the internal mesh position (false)
|
|
|
+ * @type {boolean}
|
|
|
+ */
|
|
|
+ useCustomMeshPosition: boolean;
|
|
|
/**
|
|
|
- * 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?: Nullable<(a: SubMesh, b: SubMesh) => number>, alphaTestSortCompareFn?: Nullable<(a: SubMesh, b: SubMesh) => number>, transparentSortCompareFn?: Nullable<(a: SubMesh, b: SubMesh) => number>);
|
|
|
+ * If the post-process should inverse the light scattering direction
|
|
|
+ * @type {boolean}
|
|
|
+ */
|
|
|
+ invert: boolean;
|
|
|
/**
|
|
|
- * 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: Nullable<(opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>) => void>, renderSprites: boolean, renderParticles: boolean, activeMeshes: Nullable<AbstractMesh[]>): void;
|
|
|
+ * The internal mesh used by the post-process
|
|
|
+ * @type {boolean}
|
|
|
+ */
|
|
|
+ mesh: Mesh;
|
|
|
+ useDiffuseColor: boolean;
|
|
|
/**
|
|
|
- * Renders the opaque submeshes in the order from the opaqueSortCompareFn.
|
|
|
- * @param subMeshes The submeshes to render
|
|
|
- */
|
|
|
-
|
|
|
+ * Array containing the excluded meshes not rendered in the internal pass
|
|
|
+ */
|
|
|
+ excludedMeshes: AbstractMesh[];
|
|
|
/**
|
|
|
- * Renders the opaque submeshes in the order from the alphatestSortCompareFn.
|
|
|
- * @param subMeshes The submeshes to render
|
|
|
- */
|
|
|
-
|
|
|
+ * Controls the overall intensity of the post-process
|
|
|
+ * @type {number}
|
|
|
+ */
|
|
|
+ exposure: number;
|
|
|
/**
|
|
|
- * Renders the opaque submeshes in the order from the transparentSortCompareFn.
|
|
|
- * @param subMeshes The submeshes to render
|
|
|
- */
|
|
|
-
|
|
|
+ * Dissipates each sample's contribution in range [0, 1]
|
|
|
+ * @type {number}
|
|
|
+ */
|
|
|
+ decay: 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
|
|
|
- */
|
|
|
-
|
|
|
+ * Controls the overall intensity of each sample
|
|
|
+ * @type {number}
|
|
|
+ */
|
|
|
+ weight: number;
|
|
|
/**
|
|
|
- * Renders the submeshes in the order they were dispatched (no sort applied).
|
|
|
- * @param subMeshes The submeshes to render
|
|
|
- */
|
|
|
-
|
|
|
+ * Controls the density of each sample
|
|
|
+ * @type {number}
|
|
|
+ */
|
|
|
+ density: number;
|
|
|
/**
|
|
|
- * 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
|
|
|
+ * @constructor
|
|
|
+ * @param {string} name - The post-process name
|
|
|
+ * @param {any} ratio - The size of the post-process and/or internal pass (0.5 means that your postprocess will have a width = canvas.width 0.5 and a height = canvas.height 0.5)
|
|
|
+ * @param {BABYLON.Camera} camera - The camera that the post-process will be attached to
|
|
|
+ * @param {BABYLON.Mesh} mesh - The mesh used to create the light scattering
|
|
|
+ * @param {number} samples - The post-process quality, default 100
|
|
|
+ * @param {number} samplingMode - The post-process filtering mode
|
|
|
+ * @param {BABYLON.Engine} engine - The babylon engine
|
|
|
+ * @param {boolean} reusable - If the post-process is reusable
|
|
|
+ * @param {BABYLON.Scene} scene - The constructor needs a scene reference to initialize internal components. If "camera" is null (RenderPipelineà, "scene" must be provided
|
|
|
*/
|
|
|
- static defaultTransparentSortCompare(a: SubMesh, b: SubMesh): number;
|
|
|
+ constructor(name: string, ratio: any, camera: Camera, mesh?: Mesh, samples?: number, samplingMode?: number, engine?: Engine, reusable?: boolean, scene?: Scene);
|
|
|
+ getClassName(): string;
|
|
|
+ isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
/**
|
|
|
- * 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
|
|
|
+ * Sets the new light position for light scattering effect
|
|
|
+ * @param {BABYLON.Vector3} The new custom light position
|
|
|
*/
|
|
|
- static backToFrontSortCompare(a: SubMesh, b: SubMesh): number;
|
|
|
+ setCustomMeshPosition(position: Vector3): void;
|
|
|
/**
|
|
|
- * 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
|
|
|
+ * Returns the light position for light scattering effect
|
|
|
+ * @return {BABYLON.Vector3} The custom light position
|
|
|
*/
|
|
|
- static frontToBackSortCompare(a: SubMesh, b: SubMesh): number;
|
|
|
+ getCustomMeshPosition(): Vector3;
|
|
|
/**
|
|
|
- * Resets the different lists of submeshes to prepare a new frame.
|
|
|
+ * Disposes the internal assets and detaches the post-process from the camera
|
|
|
*/
|
|
|
- prepare(): void;
|
|
|
- dispose(): void;
|
|
|
+ dispose(camera: Camera): void;
|
|
|
/**
|
|
|
- * Inserts the submesh in its correct queue depending on its material.
|
|
|
- * @param subMesh The submesh to dispatch
|
|
|
+ * Returns the render target texture used by the post-process
|
|
|
+ * @return {BABYLON.RenderTargetTexture} The render target texture used by the post-process
|
|
|
*/
|
|
|
- dispatch(subMesh: SubMesh): void;
|
|
|
- dispatchSprites(spriteManager: SpriteManager): void;
|
|
|
- dispatchParticles(particleSystem: IParticleSystem): void;
|
|
|
+ getPass(): RenderTargetTexture;
|
|
|
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Creates a default mesh for the Volumeric Light Scattering post-process
|
|
|
+ * @param {string} The mesh name
|
|
|
+ * @param {BABYLON.Scene} The scene where to create the mesh
|
|
|
+ * @return {BABYLON.Mesh} the default mesh
|
|
|
+ */
|
|
|
+ static CreateDefaultMesh(name: string, scene: Scene): Mesh;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
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;
|
|
|
- /**
|
|
|
- * Used to globally prevent autoclearing scenes.
|
|
|
- */
|
|
|
- static AUTOCLEAR: boolean;
|
|
|
+ class VRDistortionCorrectionPostProcess extends PostProcess {
|
|
|
+ aspectRatio: number;
|
|
|
|
|
|
|
|
|
|
|
@@ -15517,35 +15520,37 @@ declare module BABYLON {
|
|
|
|
|
|
|
|
|
|
|
|
+ constructor(name: string, camera: Camera, isRightEye: boolean, vrMetrics: VRCameraMetrics);
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
- constructor(scene: Scene);
|
|
|
+declare module BABYLON {
|
|
|
+ class ReflectionProbe {
|
|
|
+ name: string;
|
|
|
|
|
|
- render(customRenderFunction: Nullable<(opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>) => void>, activeMeshes: Nullable<AbstractMesh[]>, renderParticles: boolean, renderSprites: boolean): void;
|
|
|
- reset(): void;
|
|
|
- dispose(): void;
|
|
|
|
|
|
- dispatchSprites(spriteManager: SpriteManager): void;
|
|
|
- dispatchParticles(particleSystem: IParticleSystem): 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?: Nullable<(a: SubMesh, b: SubMesh) => number>, alphaTestSortCompareFn?: Nullable<(a: SubMesh, b: SubMesh) => number>, transparentSortCompareFn?: Nullable<(a: SubMesh, b: SubMesh) => number>): void;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ invertYAxis: boolean;
|
|
|
+ position: Vector3;
|
|
|
+ constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
|
|
|
+ samples: number;
|
|
|
+ refreshRate: number;
|
|
|
+ getScene(): Scene;
|
|
|
+ readonly cubeTexture: RenderTargetTexture;
|
|
|
+ readonly renderList: Nullable<AbstractMesh[]>;
|
|
|
+ attachToMesh(mesh: AbstractMesh): 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;
|
|
|
+ setRenderingAutoClearDepthStencil(renderingGroupId: number, autoClearDepthStencil: boolean): void;
|
|
|
+ dispose(): void;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -20631,6 +20636,8 @@ declare module BABYLON.GUI {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+ renderScale: number;
|
|
|
background: string;
|
|
|
idealWidth: number;
|
|
|
idealHeight: number;
|
|
@@ -20655,7 +20662,7 @@ declare module BABYLON.GUI {
|
|
|
|
|
|
|
|
|
static CreateForMesh(mesh: AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean): AdvancedDynamicTexture;
|
|
|
- static CreateFullscreenUI(name: string, foreground?: boolean, scene?: Nullable<Scene>): AdvancedDynamicTexture;
|
|
|
+ static CreateFullscreenUI(name: string, foreground?: boolean, scene?: Nullable<Scene>, sampling?: number): AdvancedDynamicTexture;
|
|
|
}
|
|
|
}
|
|
|
|