|
@@ -2477,15 +2477,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- interface Behavior<T extends Node> {
|
|
|
- name: string;
|
|
|
- init(): void;
|
|
|
- attach(node: T): void;
|
|
|
- detach(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class Bone extends Node {
|
|
|
name: string;
|
|
|
|
|
@@ -2967,6 +2958,15 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ interface Behavior<T extends Node> {
|
|
|
+ name: string;
|
|
|
+ init(): void;
|
|
|
+ attach(node: T): void;
|
|
|
+ detach(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class ArcRotateCamera extends TargetCamera {
|
|
|
alpha: number;
|
|
|
beta: number;
|
|
@@ -4273,7 +4273,7 @@ declare module BABYLON {
|
|
|
|
|
|
|
|
|
|
|
|
- [key: string]: Nullable<WebGLTexture>;
|
|
|
+ [key: string]: Nullable<InternalTexture>;
|
|
|
};
|
|
|
|
|
|
|
|
@@ -4301,6 +4301,8 @@ declare module BABYLON {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
readonly texturesSupported: Array<string>;
|
|
|
readonly textureFormatInUse: Nullable<string>;
|
|
|
readonly currentViewport: Nullable<Viewport>;
|
|
@@ -4598,14 +4600,18 @@ declare module BABYLON {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
bindSamplers(effect: Effect): void;
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
setTextureFromPostProcess(channel: number, postProcess: Nullable<PostProcess>): void;
|
|
|
unbindAllTextures(): void;
|
|
|
setTexture(channel: number, uniform: Nullable<WebGLUniformLocation>, texture: Nullable<BaseTexture>): void;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
setTextureArray(channel: number, uniform: Nullable<WebGLUniformLocation>, textures: BaseTexture[]): void;
|
|
|
|
|
|
readPixels(x: number, y: number, width: number, height: number): Uint8Array;
|
|
@@ -14749,424 +14755,161 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class BoundingBoxRenderer {
|
|
|
- frontColor: Color3;
|
|
|
- backColor: Color3;
|
|
|
- showBackLines: boolean;
|
|
|
- renderList: SmartArray<BoundingBox>;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- constructor(scene: Scene);
|
|
|
-
|
|
|
-
|
|
|
+ class AnaglyphPostProcess extends PostProcess {
|
|
|
|
|
|
- reset(): void;
|
|
|
- render(): void;
|
|
|
- renderOcclusionBoundingBox(mesh: AbstractMesh): void;
|
|
|
- dispose(): void;
|
|
|
+ constructor(name: string, options: number | PostProcessOptions, rigCameras: Camera[], samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class DepthRenderer {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- constructor(scene: Scene, type?: number);
|
|
|
- isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
- getDepthMap(): RenderTargetTexture;
|
|
|
- dispose(): void;
|
|
|
+ class BlackAndWhitePostProcess extends PostProcess {
|
|
|
+ degree: number;
|
|
|
+ constructor(name: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class EdgesRenderer {
|
|
|
- edgesWidthScalerForOrthographic: number;
|
|
|
- edgesWidthScalerForPerspective: number;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ class BlurPostProcess extends PostProcess {
|
|
|
+ direction: Vector2;
|
|
|
|
|
|
- constructor(source: AbstractMesh, epsilon?: number, checkVerticesInsteadOfIndices?: boolean);
|
|
|
|
|
|
|
|
|
- dispose(): void;
|
|
|
+ /**
|
|
|
+ * Gets the length in pixels of the blur sample region
|
|
|
+ */
|
|
|
+ /**
|
|
|
+ * Sets the length in pixels of the blur sample region
|
|
|
+ */
|
|
|
+ kernel: number;
|
|
|
+ /**
|
|
|
+ * Gets wether or not the blur is unpacking/repacking floats
|
|
|
+ */
|
|
|
+ /**
|
|
|
+ * Sets wether or not the blur needs to unpack/repack floats
|
|
|
+ */
|
|
|
+ packedFloat: boolean;
|
|
|
+ constructor(name: string, direction: Vector2, kernel: number, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
|
|
|
|
|
|
+ /**
|
|
|
+ * Best kernels are odd numbers that when divided by 2, their integer part is even, so 5, 9 or 13.
|
|
|
+ * Other odd kernels optimize correctly but require proportionally more samples, even kernels are
|
|
|
+ * possible but will produce minor visual artifacts. Since each new kernel requires a new shader we
|
|
|
+ * want to minimize kernel changes, having gaps between physical kernels is helpful in that regard.
|
|
|
+ * The gaps between physical kernels are compensated for in the weighting of the samples
|
|
|
+ * @param idealKernel Ideal blur kernel.
|
|
|
+ * @return Nearest best kernel.
|
|
|
+ */
|
|
|
|
|
|
+ /**
|
|
|
+ * Calculates the value of a Gaussian distribution with sigma 3 at a given point.
|
|
|
+ * @param x The point on the Gaussian distribution to sample.
|
|
|
+ * @return the value of the Gaussian function at x.
|
|
|
+ */
|
|
|
|
|
|
+ /**
|
|
|
+ * Generates a string that can be used as a floating point number in GLSL.
|
|
|
+ * @param x Value to print.
|
|
|
+ * @param decimalFigures Number of decimal places to print the number to (excluding trailing 0s).
|
|
|
+ * @return GLSL float string.
|
|
|
+ */
|
|
|
|
|
|
- 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;
|
|
|
+ class ColorCorrectionPostProcess extends PostProcess {
|
|
|
|
|
|
+ constructor(name: string, colorTableUrl: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class OutlineRenderer {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- zOffset: number;
|
|
|
- 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;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ class DisplayPassPostProcess extends PostProcess {
|
|
|
+ constructor(name: string, options: number | PostProcessOptions, camera: Nullable<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: Nullable<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?: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
+declare module BABYLON {
|
|
|
+ class HighlightsPostProcess extends PostProcess {
|
|
|
+ constructor(name: string, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: 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>;
|
|
|
+declare module BABYLON {
|
|
|
+ class ImageProcessingPostProcess extends PostProcess {
|
|
|
/**
|
|
|
- * Set the alpha test sort comparison function.
|
|
|
- * If null the sub meshes will be render in the order they were created
|
|
|
+ * Default configuration related to image processing available in the PBR Material.
|
|
|
*/
|
|
|
- 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
|
|
|
+ * Gets the image processing configuration used either in this material.
|
|
|
*/
|
|
|
- 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
|
|
|
+ * Sets the Default image processing configuration used either in the this material.
|
|
|
+ *
|
|
|
+ * If sets to null, the scene one is in use.
|
|
|
*/
|
|
|
- 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>);
|
|
|
+ imageProcessingConfiguration: ImageProcessingConfiguration;
|
|
|
/**
|
|
|
- * 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.
|
|
|
+ * Keep track of the image processing observer to allow dispose and replace.
|
|
|
*/
|
|
|
- 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
|
|
|
+ * Attaches a new image processing configuration to the PBR Material.
|
|
|
+ * @param configuration
|
|
|
*/
|
|
|
|
|
|
/**
|
|
|
- * Renders the opaque submeshes in the order from the alphatestSortCompareFn.
|
|
|
- * @param subMeshes The submeshes to render
|
|
|
+ * Gets Color curves setup used in the effect if colorCurvesEnabled is set to true .
|
|
|
*/
|
|
|
-
|
|
|
/**
|
|
|
- * Renders the opaque submeshes in the order from the transparentSortCompareFn.
|
|
|
- * @param subMeshes The submeshes to render
|
|
|
+ * Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .
|
|
|
*/
|
|
|
-
|
|
|
+ colorCurves: Nullable<ColorCurves>;
|
|
|
/**
|
|
|
- * 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
|
|
|
+ * Gets wether the color curves effect is enabled.
|
|
|
*/
|
|
|
-
|
|
|
/**
|
|
|
- * Renders the submeshes in the order they were dispatched (no sort applied).
|
|
|
- * @param subMeshes The submeshes to render
|
|
|
+ * Sets wether the color curves effect is enabled.
|
|
|
*/
|
|
|
-
|
|
|
+ colorCurvesEnabled: boolean;
|
|
|
/**
|
|
|
- * 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
|
|
|
+ * Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
|
|
|
*/
|
|
|
- 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
|
|
|
+ * Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
|
|
|
*/
|
|
|
- static backToFrontSortCompare(a: SubMesh, b: SubMesh): number;
|
|
|
+ colorGradingTexture: Nullable<BaseTexture>;
|
|
|
/**
|
|
|
- * 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, depth?: boolean, stencil?: boolean): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class AnaglyphPostProcess extends PostProcess {
|
|
|
-
|
|
|
- constructor(name: string, options: number | PostProcessOptions, rigCameras: Camera[], samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class BlackAndWhitePostProcess extends PostProcess {
|
|
|
- degree: number;
|
|
|
- constructor(name: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class BlurPostProcess extends PostProcess {
|
|
|
- direction: Vector2;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * Gets the length in pixels of the blur sample region
|
|
|
- */
|
|
|
- /**
|
|
|
- * Sets the length in pixels of the blur sample region
|
|
|
- */
|
|
|
- kernel: number;
|
|
|
- /**
|
|
|
- * Gets wether or not the blur is unpacking/repacking floats
|
|
|
- */
|
|
|
- /**
|
|
|
- * Sets wether or not the blur needs to unpack/repack floats
|
|
|
- */
|
|
|
- packedFloat: boolean;
|
|
|
- constructor(name: string, direction: Vector2, kernel: number, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
|
|
|
-
|
|
|
- /**
|
|
|
- * Best kernels are odd numbers that when divided by 2, their integer part is even, so 5, 9 or 13.
|
|
|
- * Other odd kernels optimize correctly but require proportionally more samples, even kernels are
|
|
|
- * possible but will produce minor visual artifacts. Since each new kernel requires a new shader we
|
|
|
- * want to minimize kernel changes, having gaps between physical kernels is helpful in that regard.
|
|
|
- * The gaps between physical kernels are compensated for in the weighting of the samples
|
|
|
- * @param idealKernel Ideal blur kernel.
|
|
|
- * @return Nearest best kernel.
|
|
|
- */
|
|
|
-
|
|
|
- /**
|
|
|
- * Calculates the value of a Gaussian distribution with sigma 3 at a given point.
|
|
|
- * @param x The point on the Gaussian distribution to sample.
|
|
|
- * @return the value of the Gaussian function at x.
|
|
|
- */
|
|
|
-
|
|
|
- /**
|
|
|
- * Generates a string that can be used as a floating point number in GLSL.
|
|
|
- * @param x Value to print.
|
|
|
- * @param decimalFigures Number of decimal places to print the number to (excluding trailing 0s).
|
|
|
- * @return GLSL float string.
|
|
|
- */
|
|
|
-
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class ColorCorrectionPostProcess extends PostProcess {
|
|
|
-
|
|
|
- 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: Nullable<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: Nullable<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?: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class HighlightsPostProcess extends PostProcess {
|
|
|
- constructor(name: string, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class ImageProcessingPostProcess extends PostProcess {
|
|
|
- /**
|
|
|
- * Default configuration related to image processing available in the PBR Material.
|
|
|
- */
|
|
|
-
|
|
|
- /**
|
|
|
- * Gets the image processing configuration used either in this material.
|
|
|
- */
|
|
|
- /**
|
|
|
- * Sets the Default image processing configuration used either in the this material.
|
|
|
- *
|
|
|
- * If sets to null, the scene one is in use.
|
|
|
- */
|
|
|
- imageProcessingConfiguration: ImageProcessingConfiguration;
|
|
|
- /**
|
|
|
- * Keep track of the image processing observer to allow dispose and replace.
|
|
|
- */
|
|
|
-
|
|
|
- /**
|
|
|
- * Attaches a new image processing configuration to the PBR Material.
|
|
|
- * @param configuration
|
|
|
- */
|
|
|
-
|
|
|
- /**
|
|
|
- * Gets Color curves setup used in the effect if colorCurvesEnabled is set to true .
|
|
|
- */
|
|
|
- /**
|
|
|
- * Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .
|
|
|
- */
|
|
|
- colorCurves: Nullable<ColorCurves>;
|
|
|
- /**
|
|
|
- * Gets wether the color curves effect is enabled.
|
|
|
- */
|
|
|
- /**
|
|
|
- * Sets wether the color curves effect is enabled.
|
|
|
- */
|
|
|
- colorCurvesEnabled: boolean;
|
|
|
- /**
|
|
|
- * Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
|
|
|
- */
|
|
|
- /**
|
|
|
- * Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
|
|
|
- */
|
|
|
- colorGradingTexture: Nullable<BaseTexture>;
|
|
|
- /**
|
|
|
- * Gets wether the color grading effect is enabled.
|
|
|
+ * Gets wether the color grading effect is enabled.
|
|
|
*/
|
|
|
/**
|
|
|
* Gets wether the color grading effect is enabled.
|
|
@@ -15555,6 +15298,269 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
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 {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ 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, depth?: boolean, stencil?: boolean): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class Sprite {
|
|
|
name: string;
|
|
|
position: Vector3;
|