|
@@ -16426,7 +16426,7 @@ declare module "babylonjs/Materials/Textures/texture" {
|
|
|
* Get the current texture matrix which includes the requested offsetting, tiling and rotation components.
|
|
|
* @returns the transform matrix of the texture.
|
|
|
*/
|
|
|
- getTextureMatrix(): Matrix;
|
|
|
+ getTextureMatrix(uBase?: number): Matrix;
|
|
|
/**
|
|
|
* Get the current matrix used to apply reflection. This is useful to rotate an environment texture for instance.
|
|
|
* @returns The reflection texture transform
|
|
@@ -26345,6 +26345,11 @@ declare module "babylonjs/Particles/solidParticleSystem" {
|
|
|
private _isNotBuilt;
|
|
|
private _lastParticleId;
|
|
|
private _idxOfId;
|
|
|
+ private _multimaterialEnabled;
|
|
|
+ private _indicesByMaterial;
|
|
|
+ private _materialIndexes;
|
|
|
+ private _depthSortFunction;
|
|
|
+ private _materialSortFunction;
|
|
|
/**
|
|
|
* Creates a SPS (Solid Particle System) object.
|
|
|
* @param name (String) is the SPS name, this will be the underlying mesh name.
|
|
@@ -26353,6 +26358,7 @@ declare module "babylonjs/Particles/solidParticleSystem" {
|
|
|
* * updatable (optional boolean, default true) : if the SPS must be updatable or immutable.
|
|
|
* * isPickable (optional boolean, default false) : if the solid particles must be pickable.
|
|
|
* * enableDepthSort (optional boolean, default false) : if the solid particles must be sorted in the geometry according to their distance to the camera.
|
|
|
+ * * enableMultiMaterial (optional boolean, default false) : if the solid particles can be given different materials.
|
|
|
* * expandable (optional boolean, default false) : if particles can still be added after the initial SPS mesh creation.
|
|
|
* * particleIntersection (optional boolean, default false) : if the solid particle intersections must be computed.
|
|
|
* * boundingSphereOnly (optional boolean, default false) : if the particle intersection must be computed only with the bounding sphere (no bounding box computation, so faster).
|
|
@@ -26367,6 +26373,7 @@ declare module "babylonjs/Particles/solidParticleSystem" {
|
|
|
boundingSphereOnly?: boolean;
|
|
|
bSphereRadiusFactor?: number;
|
|
|
expandable?: boolean;
|
|
|
+ enableMultiMaterial?: boolean;
|
|
|
});
|
|
|
/**
|
|
|
* Builds the SPS underlying mesh. Returns a standard Mesh.
|
|
@@ -26404,6 +26411,7 @@ declare module "babylonjs/Particles/solidParticleSystem" {
|
|
|
/**
|
|
|
* Inserts the shape model geometry in the global SPS mesh by updating the positions, indices, normals, colors, uvs arrays
|
|
|
* @param p the current index in the positions array to be updated
|
|
|
+ * @param ind the current index in the indices array
|
|
|
* @param shape a Vector3 array, the shape geometry
|
|
|
* @param positions the positions array to be updated
|
|
|
* @param meshInd the shape indices array
|
|
@@ -26544,6 +26552,21 @@ declare module "babylonjs/Particles/solidParticleSystem" {
|
|
|
*/
|
|
|
getParticlesByShapeIdToRef(shapeId: number, ref: SolidParticle[]): SolidParticleSystem;
|
|
|
/**
|
|
|
+ * Computes the required SubMeshes according the materials assigned to the particles.
|
|
|
+ * @returns the solid particle system.
|
|
|
+ * Does nothing if called before the SPS mesh is built.
|
|
|
+ */
|
|
|
+ computeSubMeshes(): SolidParticleSystem;
|
|
|
+ /**
|
|
|
+ * Sorts the solid particles by material when MultiMaterial is enabled.
|
|
|
+ * Updates the indices32 array.
|
|
|
+ * Updates the indicesByMaterial array.
|
|
|
+ * Updates the mesh indices array.
|
|
|
+ * @returns the SPS
|
|
|
+ * @hidden
|
|
|
+ */
|
|
|
+ private _sortParticlesByMaterial;
|
|
|
+ /**
|
|
|
* Visibilty helper : Recomputes the visible size according to the mesh bounding box
|
|
|
* doc : http://doc.babylonjs.com/how_to/Solid_Particle_System#sps-visibility
|
|
|
* @returns the SPS.
|
|
@@ -26637,6 +26660,10 @@ declare module "babylonjs/Particles/solidParticleSystem" {
|
|
|
*/
|
|
|
readonly expandable: boolean;
|
|
|
/**
|
|
|
+ * Gets if the SPS supports the Multi Materials
|
|
|
+ */
|
|
|
+ readonly multimaterialEnabled: boolean;
|
|
|
+ /**
|
|
|
* This function does nothing. It may be overwritten to set all the particle first values.
|
|
|
* The SPS doesn't call this function, you may have to call it by your own.
|
|
|
* doc : http://doc.babylonjs.com/how_to/Solid_Particle_System#particle-management
|
|
@@ -26802,6 +26829,10 @@ declare module "babylonjs/Particles/solidParticle" {
|
|
|
*/
|
|
|
parentId: Nullable<number>;
|
|
|
/**
|
|
|
+ * The particle material identifier (integer) when MultiMaterials are enabled in the SPS.
|
|
|
+ */
|
|
|
+ materialIndex: Nullable<number>;
|
|
|
+ /**
|
|
|
* The culling strategy to use to check whether the solid particle must be culled or not when using isInFrustum().
|
|
|
* The possible values are :
|
|
|
* - AbstractMesh.CULLINGSTRATEGY_STANDARD
|
|
@@ -26828,8 +26859,9 @@ declare module "babylonjs/Particles/solidParticle" {
|
|
|
* @param idxInShape (integer) is the index of the particle in the current model (ex: the 10th box of addShape(box, 30))
|
|
|
* @param sps defines the sps it is associated to
|
|
|
* @param modelBoundingInfo is the reference to the model BoundingInfo used for intersection computations.
|
|
|
+ * @param materialIndex is the particle material identifier (integer) when the MultiMaterials are enabled in the SPS.
|
|
|
*/
|
|
|
- constructor(particleIndex: number, particleId: number, positionIndex: number, indiceIndex: number, model: Nullable<ModelShape>, shapeId: number, idxInShape: number, sps: SolidParticleSystem, modelBoundingInfo?: Nullable<BoundingInfo>);
|
|
|
+ constructor(particleIndex: number, particleId: number, positionIndex: number, indiceIndex: number, model: Nullable<ModelShape>, shapeId: number, idxInShape: number, sps: SolidParticleSystem, modelBoundingInfo?: Nullable<BoundingInfo>, materialIndex?: Nullable<number>);
|
|
|
/**
|
|
|
* Copies the particle property values into the existing target : position, rotation, scaling, uvs, colors, pivot, parent, visibility, alive
|
|
|
* @param target the particle target
|
|
@@ -26929,6 +26961,7 @@ declare module "babylonjs/Particles/solidParticle" {
|
|
|
}
|
|
|
/**
|
|
|
* Represents a Depth Sorted Particle in the solid particle system.
|
|
|
+ * @hidden
|
|
|
*/
|
|
|
export class DepthSortedParticle {
|
|
|
/**
|
|
@@ -26943,6 +26976,15 @@ declare module "babylonjs/Particles/solidParticle" {
|
|
|
* Squared distance from the particle to the camera
|
|
|
*/
|
|
|
sqDistance: number;
|
|
|
+ /**
|
|
|
+ * Material index when used with MultiMaterials
|
|
|
+ */
|
|
|
+ materialIndex: number;
|
|
|
+ /**
|
|
|
+ * Creates a new sorted particle
|
|
|
+ * @param materialIndex
|
|
|
+ */
|
|
|
+ constructor(ind: number, indLength: number, materialIndex: number);
|
|
|
}
|
|
|
}
|
|
|
declare module "babylonjs/Collisions/meshCollisionData" {
|
|
@@ -30261,6 +30303,8 @@ declare module "babylonjs/Engines/thinEngine" {
|
|
|
deterministicLockstep?: boolean;
|
|
|
/** Defines the maximum steps to use with deterministic lock step mode */
|
|
|
lockstepMaxSteps?: number;
|
|
|
+ /** Defines the seconds between each deterministic lock step */
|
|
|
+ timeStep?: number;
|
|
|
/**
|
|
|
* Defines that engine should ignore context lost events
|
|
|
* If this event happens when this parameter is true, you will have to reload the page to restore rendering
|
|
@@ -31261,6 +31305,11 @@ declare module "babylonjs/Engines/thinEngine" {
|
|
|
* @returns frame number
|
|
|
*/
|
|
|
static QueueNewFrame(func: () => void, requester?: any): number;
|
|
|
+ /**
|
|
|
+ * Gets host document
|
|
|
+ * @returns the host document object
|
|
|
+ */
|
|
|
+ getHostDocument(): Document;
|
|
|
}
|
|
|
}
|
|
|
declare module "babylonjs/Maths/sphericalPolynomial" {
|
|
@@ -32592,6 +32641,7 @@ declare module "babylonjs/Engines/engine" {
|
|
|
protected _alphaEquation: number;
|
|
|
private _deterministicLockstep;
|
|
|
private _lockstepMaxSteps;
|
|
|
+ private _timeStep;
|
|
|
protected readonly _supportsHardwareTextureRescaling: boolean;
|
|
|
private _fps;
|
|
|
private _deltaTime;
|
|
@@ -32640,11 +32690,6 @@ declare module "babylonjs/Engines/engine" {
|
|
|
*/
|
|
|
getScreenAspectRatio(): number;
|
|
|
/**
|
|
|
- * Gets host document
|
|
|
- * @returns the host document object
|
|
|
- */
|
|
|
- getHostDocument(): Document;
|
|
|
- /**
|
|
|
* Gets the client rect of the HTML canvas attached with the current webGL context
|
|
|
* @returns a client rectanglee
|
|
|
*/
|
|
@@ -32667,6 +32712,11 @@ declare module "babylonjs/Engines/engine" {
|
|
|
*/
|
|
|
getLockstepMaxSteps(): number;
|
|
|
/**
|
|
|
+ * Returns the time in ms between steps when using deterministic lock step.
|
|
|
+ * @returns time step in (ms)
|
|
|
+ */
|
|
|
+ getTimeStep(): number;
|
|
|
+ /**
|
|
|
* Force the mipmap generation for the given render target texture
|
|
|
* @param texture defines the render target texture to use
|
|
|
*/
|
|
@@ -56574,6 +56624,7 @@ declare module "babylonjs/Materials/Node/Blocks/Dual/textureBlock" {
|
|
|
autoConfigure(material: NodeMaterial): void;
|
|
|
initializeDefines(mesh: AbstractMesh, nodeMaterial: NodeMaterial, defines: NodeMaterialDefines, useInstances?: boolean): void;
|
|
|
prepareDefines(mesh: AbstractMesh, nodeMaterial: NodeMaterial, defines: NodeMaterialDefines): void;
|
|
|
+ private _getTextureBase;
|
|
|
isReady(): boolean;
|
|
|
bind(effect: Effect, nodeMaterial: NodeMaterial, mesh?: Mesh): void;
|
|
|
private readonly _isMixed;
|
|
@@ -57741,12 +57792,46 @@ declare module "babylonjs/Materials/Node/Blocks/Fragment/frontFacingBlock" {
|
|
|
protected _buildBlock(state: NodeMaterialBuildState): this;
|
|
|
}
|
|
|
}
|
|
|
+declare module "babylonjs/Materials/Node/Blocks/Fragment/derivativeBlock" {
|
|
|
+ import { NodeMaterialBlock } from "babylonjs/Materials/Node/nodeMaterialBlock";
|
|
|
+ import { NodeMaterialBuildState } from "babylonjs/Materials/Node/nodeMaterialBuildState";
|
|
|
+ import { NodeMaterialConnectionPoint } from "babylonjs/Materials/Node/nodeMaterialBlockConnectionPoint";
|
|
|
+ /**
|
|
|
+ * Block used to get the derivative value on x and y of a given input
|
|
|
+ */
|
|
|
+ export class DerivativeBlock extends NodeMaterialBlock {
|
|
|
+ /**
|
|
|
+ * Create a new DerivativeBlock
|
|
|
+ * @param name defines the block name
|
|
|
+ */
|
|
|
+ constructor(name: string);
|
|
|
+ /**
|
|
|
+ * Gets the current class name
|
|
|
+ * @returns the class name
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
+ /**
|
|
|
+ * Gets the input component
|
|
|
+ */
|
|
|
+ readonly input: NodeMaterialConnectionPoint;
|
|
|
+ /**
|
|
|
+ * Gets the derivative output on x
|
|
|
+ */
|
|
|
+ readonly dx: NodeMaterialConnectionPoint;
|
|
|
+ /**
|
|
|
+ * Gets the derivative output on y
|
|
|
+ */
|
|
|
+ readonly dy: NodeMaterialConnectionPoint;
|
|
|
+ protected _buildBlock(state: NodeMaterialBuildState): this;
|
|
|
+ }
|
|
|
+}
|
|
|
declare module "babylonjs/Materials/Node/Blocks/Fragment/index" {
|
|
|
export * from "babylonjs/Materials/Node/Blocks/Fragment/fragmentOutputBlock";
|
|
|
export * from "babylonjs/Materials/Node/Blocks/Fragment/imageProcessingBlock";
|
|
|
export * from "babylonjs/Materials/Node/Blocks/Fragment/perturbNormalBlock";
|
|
|
export * from "babylonjs/Materials/Node/Blocks/Fragment/discardBlock";
|
|
|
export * from "babylonjs/Materials/Node/Blocks/Fragment/frontFacingBlock";
|
|
|
+ export * from "babylonjs/Materials/Node/Blocks/Fragment/derivativeBlock";
|
|
|
}
|
|
|
declare module "babylonjs/Materials/Node/Blocks/Dual/fogBlock" {
|
|
|
import { NodeMaterialBlock } from "babylonjs/Materials/Node/nodeMaterialBlock";
|
|
@@ -59396,6 +59481,76 @@ declare module "babylonjs/Materials/Node/Blocks/rotate2dBlock" {
|
|
|
protected _buildBlock(state: NodeMaterialBuildState): this;
|
|
|
}
|
|
|
}
|
|
|
+declare module "babylonjs/Materials/Node/Blocks/reflectBlock" {
|
|
|
+ import { NodeMaterialBlock } from "babylonjs/Materials/Node/nodeMaterialBlock";
|
|
|
+ import { NodeMaterialBuildState } from "babylonjs/Materials/Node/nodeMaterialBuildState";
|
|
|
+ import { NodeMaterialConnectionPoint } from "babylonjs/Materials/Node/nodeMaterialBlockConnectionPoint";
|
|
|
+ /**
|
|
|
+ * Block used to get the reflected vector from a direction and a normal
|
|
|
+ */
|
|
|
+ export class ReflectBlock extends NodeMaterialBlock {
|
|
|
+ /**
|
|
|
+ * Creates a new ReflectBlock
|
|
|
+ * @param name defines the block name
|
|
|
+ */
|
|
|
+ constructor(name: string);
|
|
|
+ /**
|
|
|
+ * Gets the current class name
|
|
|
+ * @returns the class name
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
+ /**
|
|
|
+ * Gets the incident component
|
|
|
+ */
|
|
|
+ readonly incident: NodeMaterialConnectionPoint;
|
|
|
+ /**
|
|
|
+ * Gets the normal component
|
|
|
+ */
|
|
|
+ readonly normal: NodeMaterialConnectionPoint;
|
|
|
+ /**
|
|
|
+ * Gets the output component
|
|
|
+ */
|
|
|
+ readonly output: NodeMaterialConnectionPoint;
|
|
|
+ protected _buildBlock(state: NodeMaterialBuildState): this;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module "babylonjs/Materials/Node/Blocks/refractBlock" {
|
|
|
+ import { NodeMaterialBlock } from "babylonjs/Materials/Node/nodeMaterialBlock";
|
|
|
+ import { NodeMaterialBuildState } from "babylonjs/Materials/Node/nodeMaterialBuildState";
|
|
|
+ import { NodeMaterialConnectionPoint } from "babylonjs/Materials/Node/nodeMaterialBlockConnectionPoint";
|
|
|
+ /**
|
|
|
+ * Block used to get the refracted vector from a direction and a normal
|
|
|
+ */
|
|
|
+ export class RefractBlock extends NodeMaterialBlock {
|
|
|
+ /**
|
|
|
+ * Creates a new RefractBlock
|
|
|
+ * @param name defines the block name
|
|
|
+ */
|
|
|
+ constructor(name: string);
|
|
|
+ /**
|
|
|
+ * Gets the current class name
|
|
|
+ * @returns the class name
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
+ /**
|
|
|
+ * Gets the incident component
|
|
|
+ */
|
|
|
+ readonly incident: NodeMaterialConnectionPoint;
|
|
|
+ /**
|
|
|
+ * Gets the normal component
|
|
|
+ */
|
|
|
+ readonly normal: NodeMaterialConnectionPoint;
|
|
|
+ /**
|
|
|
+ * Gets the index of refraction component
|
|
|
+ */
|
|
|
+ readonly ior: NodeMaterialConnectionPoint;
|
|
|
+ /**
|
|
|
+ * Gets the output component
|
|
|
+ */
|
|
|
+ readonly output: NodeMaterialConnectionPoint;
|
|
|
+ protected _buildBlock(state: NodeMaterialBuildState): this;
|
|
|
+ }
|
|
|
+}
|
|
|
declare module "babylonjs/Materials/Node/Blocks/index" {
|
|
|
export * from "babylonjs/Materials/Node/Blocks/Vertex/index";
|
|
|
export * from "babylonjs/Materials/Node/Blocks/Fragment/index";
|
|
@@ -59441,6 +59596,8 @@ declare module "babylonjs/Materials/Node/Blocks/index" {
|
|
|
export * from "babylonjs/Materials/Node/Blocks/simplexPerlin3DBlock";
|
|
|
export * from "babylonjs/Materials/Node/Blocks/normalBlendBlock";
|
|
|
export * from "babylonjs/Materials/Node/Blocks/rotate2dBlock";
|
|
|
+ export * from "babylonjs/Materials/Node/Blocks/reflectBlock";
|
|
|
+ export * from "babylonjs/Materials/Node/Blocks/refractBlock";
|
|
|
}
|
|
|
declare module "babylonjs/Materials/Node/Optimizers/index" {
|
|
|
export * from "babylonjs/Materials/Node/Optimizers/nodeMaterialOptimizer";
|
|
@@ -84448,7 +84605,7 @@ declare module BABYLON {
|
|
|
* Get the current texture matrix which includes the requested offsetting, tiling and rotation components.
|
|
|
* @returns the transform matrix of the texture.
|
|
|
*/
|
|
|
- getTextureMatrix(): Matrix;
|
|
|
+ getTextureMatrix(uBase?: number): Matrix;
|
|
|
/**
|
|
|
* Get the current matrix used to apply reflection. This is useful to rotate an environment texture for instance.
|
|
|
* @returns The reflection texture transform
|
|
@@ -94018,6 +94175,11 @@ declare module BABYLON {
|
|
|
private _isNotBuilt;
|
|
|
private _lastParticleId;
|
|
|
private _idxOfId;
|
|
|
+ private _multimaterialEnabled;
|
|
|
+ private _indicesByMaterial;
|
|
|
+ private _materialIndexes;
|
|
|
+ private _depthSortFunction;
|
|
|
+ private _materialSortFunction;
|
|
|
/**
|
|
|
* Creates a SPS (Solid Particle System) object.
|
|
|
* @param name (String) is the SPS name, this will be the underlying mesh name.
|
|
@@ -94026,6 +94188,7 @@ declare module BABYLON {
|
|
|
* * updatable (optional boolean, default true) : if the SPS must be updatable or immutable.
|
|
|
* * isPickable (optional boolean, default false) : if the solid particles must be pickable.
|
|
|
* * enableDepthSort (optional boolean, default false) : if the solid particles must be sorted in the geometry according to their distance to the camera.
|
|
|
+ * * enableMultiMaterial (optional boolean, default false) : if the solid particles can be given different materials.
|
|
|
* * expandable (optional boolean, default false) : if particles can still be added after the initial SPS mesh creation.
|
|
|
* * particleIntersection (optional boolean, default false) : if the solid particle intersections must be computed.
|
|
|
* * boundingSphereOnly (optional boolean, default false) : if the particle intersection must be computed only with the bounding sphere (no bounding box computation, so faster).
|
|
@@ -94040,6 +94203,7 @@ declare module BABYLON {
|
|
|
boundingSphereOnly?: boolean;
|
|
|
bSphereRadiusFactor?: number;
|
|
|
expandable?: boolean;
|
|
|
+ enableMultiMaterial?: boolean;
|
|
|
});
|
|
|
/**
|
|
|
* Builds the SPS underlying mesh. Returns a standard Mesh.
|
|
@@ -94077,6 +94241,7 @@ declare module BABYLON {
|
|
|
/**
|
|
|
* Inserts the shape model geometry in the global SPS mesh by updating the positions, indices, normals, colors, uvs arrays
|
|
|
* @param p the current index in the positions array to be updated
|
|
|
+ * @param ind the current index in the indices array
|
|
|
* @param shape a Vector3 array, the shape geometry
|
|
|
* @param positions the positions array to be updated
|
|
|
* @param meshInd the shape indices array
|
|
@@ -94217,6 +94382,21 @@ declare module BABYLON {
|
|
|
*/
|
|
|
getParticlesByShapeIdToRef(shapeId: number, ref: SolidParticle[]): SolidParticleSystem;
|
|
|
/**
|
|
|
+ * Computes the required SubMeshes according the materials assigned to the particles.
|
|
|
+ * @returns the solid particle system.
|
|
|
+ * Does nothing if called before the SPS mesh is built.
|
|
|
+ */
|
|
|
+ computeSubMeshes(): SolidParticleSystem;
|
|
|
+ /**
|
|
|
+ * Sorts the solid particles by material when MultiMaterial is enabled.
|
|
|
+ * Updates the indices32 array.
|
|
|
+ * Updates the indicesByMaterial array.
|
|
|
+ * Updates the mesh indices array.
|
|
|
+ * @returns the SPS
|
|
|
+ * @hidden
|
|
|
+ */
|
|
|
+ private _sortParticlesByMaterial;
|
|
|
+ /**
|
|
|
* Visibilty helper : Recomputes the visible size according to the mesh bounding box
|
|
|
* doc : http://doc.babylonjs.com/how_to/Solid_Particle_System#sps-visibility
|
|
|
* @returns the SPS.
|
|
@@ -94310,6 +94490,10 @@ declare module BABYLON {
|
|
|
*/
|
|
|
readonly expandable: boolean;
|
|
|
/**
|
|
|
+ * Gets if the SPS supports the Multi Materials
|
|
|
+ */
|
|
|
+ readonly multimaterialEnabled: boolean;
|
|
|
+ /**
|
|
|
* This function does nothing. It may be overwritten to set all the particle first values.
|
|
|
* The SPS doesn't call this function, you may have to call it by your own.
|
|
|
* doc : http://doc.babylonjs.com/how_to/Solid_Particle_System#particle-management
|
|
@@ -94468,6 +94652,10 @@ declare module BABYLON {
|
|
|
*/
|
|
|
parentId: Nullable<number>;
|
|
|
/**
|
|
|
+ * The particle material identifier (integer) when MultiMaterials are enabled in the SPS.
|
|
|
+ */
|
|
|
+ materialIndex: Nullable<number>;
|
|
|
+ /**
|
|
|
* The culling strategy to use to check whether the solid particle must be culled or not when using isInFrustum().
|
|
|
* The possible values are :
|
|
|
* - AbstractMesh.CULLINGSTRATEGY_STANDARD
|
|
@@ -94494,8 +94682,9 @@ declare module BABYLON {
|
|
|
* @param idxInShape (integer) is the index of the particle in the current model (ex: the 10th box of addShape(box, 30))
|
|
|
* @param sps defines the sps it is associated to
|
|
|
* @param modelBoundingInfo is the reference to the model BoundingInfo used for intersection computations.
|
|
|
+ * @param materialIndex is the particle material identifier (integer) when the MultiMaterials are enabled in the SPS.
|
|
|
*/
|
|
|
- constructor(particleIndex: number, particleId: number, positionIndex: number, indiceIndex: number, model: Nullable<ModelShape>, shapeId: number, idxInShape: number, sps: SolidParticleSystem, modelBoundingInfo?: Nullable<BoundingInfo>);
|
|
|
+ constructor(particleIndex: number, particleId: number, positionIndex: number, indiceIndex: number, model: Nullable<ModelShape>, shapeId: number, idxInShape: number, sps: SolidParticleSystem, modelBoundingInfo?: Nullable<BoundingInfo>, materialIndex?: Nullable<number>);
|
|
|
/**
|
|
|
* Copies the particle property values into the existing target : position, rotation, scaling, uvs, colors, pivot, parent, visibility, alive
|
|
|
* @param target the particle target
|
|
@@ -94595,6 +94784,7 @@ declare module BABYLON {
|
|
|
}
|
|
|
/**
|
|
|
* Represents a Depth Sorted Particle in the solid particle system.
|
|
|
+ * @hidden
|
|
|
*/
|
|
|
export class DepthSortedParticle {
|
|
|
/**
|
|
@@ -94609,6 +94799,15 @@ declare module BABYLON {
|
|
|
* Squared distance from the particle to the camera
|
|
|
*/
|
|
|
sqDistance: number;
|
|
|
+ /**
|
|
|
+ * Material index when used with MultiMaterials
|
|
|
+ */
|
|
|
+ materialIndex: number;
|
|
|
+ /**
|
|
|
+ * Creates a new sorted particle
|
|
|
+ * @param materialIndex
|
|
|
+ */
|
|
|
+ constructor(ind: number, indLength: number, materialIndex: number);
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
@@ -97804,6 +98003,8 @@ declare module BABYLON {
|
|
|
deterministicLockstep?: boolean;
|
|
|
/** Defines the maximum steps to use with deterministic lock step mode */
|
|
|
lockstepMaxSteps?: number;
|
|
|
+ /** Defines the seconds between each deterministic lock step */
|
|
|
+ timeStep?: number;
|
|
|
/**
|
|
|
* Defines that engine should ignore context lost events
|
|
|
* If this event happens when this parameter is true, you will have to reload the page to restore rendering
|
|
@@ -98804,6 +99005,11 @@ declare module BABYLON {
|
|
|
* @returns frame number
|
|
|
*/
|
|
|
static QueueNewFrame(func: () => void, requester?: any): number;
|
|
|
+ /**
|
|
|
+ * Gets host document
|
|
|
+ * @returns the host document object
|
|
|
+ */
|
|
|
+ getHostDocument(): Document;
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
@@ -100105,6 +100311,7 @@ declare module BABYLON {
|
|
|
protected _alphaEquation: number;
|
|
|
private _deterministicLockstep;
|
|
|
private _lockstepMaxSteps;
|
|
|
+ private _timeStep;
|
|
|
protected readonly _supportsHardwareTextureRescaling: boolean;
|
|
|
private _fps;
|
|
|
private _deltaTime;
|
|
@@ -100153,11 +100360,6 @@ declare module BABYLON {
|
|
|
*/
|
|
|
getScreenAspectRatio(): number;
|
|
|
/**
|
|
|
- * Gets host document
|
|
|
- * @returns the host document object
|
|
|
- */
|
|
|
- getHostDocument(): Document;
|
|
|
- /**
|
|
|
* Gets the client rect of the HTML canvas attached with the current webGL context
|
|
|
* @returns a client rectanglee
|
|
|
*/
|
|
@@ -100180,6 +100382,11 @@ declare module BABYLON {
|
|
|
*/
|
|
|
getLockstepMaxSteps(): number;
|
|
|
/**
|
|
|
+ * Returns the time in ms between steps when using deterministic lock step.
|
|
|
+ * @returns time step in (ms)
|
|
|
+ */
|
|
|
+ getTimeStep(): number;
|
|
|
+ /**
|
|
|
* Force the mipmap generation for the given render target texture
|
|
|
* @param texture defines the render target texture to use
|
|
|
*/
|
|
@@ -122439,6 +122646,7 @@ declare module BABYLON {
|
|
|
autoConfigure(material: NodeMaterial): void;
|
|
|
initializeDefines(mesh: AbstractMesh, nodeMaterial: NodeMaterial, defines: NodeMaterialDefines, useInstances?: boolean): void;
|
|
|
prepareDefines(mesh: AbstractMesh, nodeMaterial: NodeMaterial, defines: NodeMaterialDefines): void;
|
|
|
+ private _getTextureBase;
|
|
|
isReady(): boolean;
|
|
|
bind(effect: Effect, nodeMaterial: NodeMaterial, mesh?: Mesh): void;
|
|
|
private readonly _isMixed;
|
|
@@ -123504,6 +123712,36 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
+ * Block used to get the derivative value on x and y of a given input
|
|
|
+ */
|
|
|
+ export class DerivativeBlock extends NodeMaterialBlock {
|
|
|
+ /**
|
|
|
+ * Create a new DerivativeBlock
|
|
|
+ * @param name defines the block name
|
|
|
+ */
|
|
|
+ constructor(name: string);
|
|
|
+ /**
|
|
|
+ * Gets the current class name
|
|
|
+ * @returns the class name
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
+ /**
|
|
|
+ * Gets the input component
|
|
|
+ */
|
|
|
+ readonly input: NodeMaterialConnectionPoint;
|
|
|
+ /**
|
|
|
+ * Gets the derivative output on x
|
|
|
+ */
|
|
|
+ readonly dx: NodeMaterialConnectionPoint;
|
|
|
+ /**
|
|
|
+ * Gets the derivative output on y
|
|
|
+ */
|
|
|
+ readonly dy: NodeMaterialConnectionPoint;
|
|
|
+ protected _buildBlock(state: NodeMaterialBuildState): this;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
* Block used to add support for scene fog
|
|
|
*/
|
|
|
export class FogBlock extends NodeMaterialBlock {
|
|
@@ -124987,6 +125225,70 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
+ * Block used to get the reflected vector from a direction and a normal
|
|
|
+ */
|
|
|
+ export class ReflectBlock extends NodeMaterialBlock {
|
|
|
+ /**
|
|
|
+ * Creates a new ReflectBlock
|
|
|
+ * @param name defines the block name
|
|
|
+ */
|
|
|
+ constructor(name: string);
|
|
|
+ /**
|
|
|
+ * Gets the current class name
|
|
|
+ * @returns the class name
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
+ /**
|
|
|
+ * Gets the incident component
|
|
|
+ */
|
|
|
+ readonly incident: NodeMaterialConnectionPoint;
|
|
|
+ /**
|
|
|
+ * Gets the normal component
|
|
|
+ */
|
|
|
+ readonly normal: NodeMaterialConnectionPoint;
|
|
|
+ /**
|
|
|
+ * Gets the output component
|
|
|
+ */
|
|
|
+ readonly output: NodeMaterialConnectionPoint;
|
|
|
+ protected _buildBlock(state: NodeMaterialBuildState): this;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
+ * Block used to get the refracted vector from a direction and a normal
|
|
|
+ */
|
|
|
+ export class RefractBlock extends NodeMaterialBlock {
|
|
|
+ /**
|
|
|
+ * Creates a new RefractBlock
|
|
|
+ * @param name defines the block name
|
|
|
+ */
|
|
|
+ constructor(name: string);
|
|
|
+ /**
|
|
|
+ * Gets the current class name
|
|
|
+ * @returns the class name
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
+ /**
|
|
|
+ * Gets the incident component
|
|
|
+ */
|
|
|
+ readonly incident: NodeMaterialConnectionPoint;
|
|
|
+ /**
|
|
|
+ * Gets the normal component
|
|
|
+ */
|
|
|
+ readonly normal: NodeMaterialConnectionPoint;
|
|
|
+ /**
|
|
|
+ * Gets the index of refraction component
|
|
|
+ */
|
|
|
+ readonly ior: NodeMaterialConnectionPoint;
|
|
|
+ /**
|
|
|
+ * Gets the output component
|
|
|
+ */
|
|
|
+ readonly output: NodeMaterialConnectionPoint;
|
|
|
+ protected _buildBlock(state: NodeMaterialBuildState): this;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
* Effect Render Options
|
|
|
*/
|
|
|
export interface IEffectRendererOptions {
|