|
@@ -7509,6 +7509,8 @@ declare module "babylonjs/Meshes/transformNode" {
|
|
|
private _pivotMatrix;
|
|
|
private _pivotMatrixInverse;
|
|
|
protected _postMultiplyPivotMatrix: boolean;
|
|
|
+ private _tempMatrix;
|
|
|
+ private _tempMatrix2;
|
|
|
protected _isWorldMatrixFrozen: boolean;
|
|
|
/** @hidden */
|
|
|
_indexInSceneTransformNodesArray: number;
|
|
@@ -8316,7 +8318,7 @@ declare module "babylonjs/Materials/Textures/cubeTexture" {
|
|
|
* @param scene defines the scene the texture is attached to
|
|
|
* @param extensions defines the suffixes add to the picture name in case six images are in use like _px.jpg...
|
|
|
* @param noMipmap defines if mipmaps should be created or not
|
|
|
- * @param files defines the six files to load for the different faces
|
|
|
+ * @param files defines the six files to load for the different faces in that order: px, py, pz, nx, ny, nz
|
|
|
* @param onLoad defines a callback triggered at the end of the file load if no errors occured
|
|
|
* @param onError defines a callback triggered in case of error during load
|
|
|
* @param format defines the internal format to use for the texture once loaded
|
|
@@ -20871,9 +20873,10 @@ declare module "babylonjs/Meshes/mesh" {
|
|
|
* Update the current index buffer
|
|
|
* @param indices defines the source data
|
|
|
* @param offset defines the offset in the index buffer where to store the new data (can be null)
|
|
|
+ * @param gpuMemoryOnly defines a boolean indicating that only the GPU memory must be updated leaving the CPU version of the indices unchanged (false by default)
|
|
|
* @returns the current mesh
|
|
|
*/
|
|
|
- updateIndices(indices: IndicesArray, offset?: number): Mesh;
|
|
|
+ updateIndices(indices: IndicesArray, offset?: number, gpuMemoryOnly?: boolean): Mesh;
|
|
|
/**
|
|
|
* Invert the geometry to move from a right handed system to a left handed one.
|
|
|
* @returns the current mesh
|
|
@@ -22489,8 +22492,9 @@ declare module "babylonjs/Meshes/geometry" {
|
|
|
* Update index buffer
|
|
|
* @param indices defines the indices to store in the index buffer
|
|
|
* @param offset defines the offset in the target buffer where to store the data
|
|
|
+ * @param gpuMemoryOnly defines a boolean indicating that only the GPU memory must be updated leaving the CPU version of the indices unchanged (false by default)
|
|
|
*/
|
|
|
- updateIndices(indices: IndicesArray, offset?: number): void;
|
|
|
+ updateIndices(indices: IndicesArray, offset?: number, gpuMemoryOnly?: boolean): void;
|
|
|
/**
|
|
|
* Creates a new index buffer
|
|
|
* @param indices defines the indices to store in the index buffer
|
|
@@ -24565,9 +24569,11 @@ declare module "babylonjs/Meshes/abstractMesh" {
|
|
|
/**
|
|
|
* Updates the AbstractMesh indices array
|
|
|
* @param indices defines the data source
|
|
|
+ * @param offset defines the offset in the index buffer where to store the new data (can be null)
|
|
|
+ * @param gpuMemoryOnly defines a boolean indicating that only the GPU memory must be updated leaving the CPU version of the indices unchanged (false by default)
|
|
|
* @returns the current mesh
|
|
|
*/
|
|
|
- updateIndices(indices: IndicesArray): AbstractMesh;
|
|
|
+ updateIndices(indices: IndicesArray, offset?: number, gpuMemoryOnly?: boolean): AbstractMesh;
|
|
|
/**
|
|
|
* Creates new normals data for the mesh
|
|
|
* @param updatable defines if the normal vertex buffer must be flagged as updatable
|
|
@@ -38560,6 +38566,16 @@ declare module "babylonjs/Materials/materialFlags" {
|
|
|
* Are clear coat tint textures enabled in the application.
|
|
|
*/
|
|
|
static ClearCoatTintTextureEnabled: boolean;
|
|
|
+ private static _SheenTextureEnabled;
|
|
|
+ /**
|
|
|
+ * Are sheen textures enabled in the application.
|
|
|
+ */
|
|
|
+ static SheenTextureEnabled: boolean;
|
|
|
+ private static _AnisotropicTextureEnabled;
|
|
|
+ /**
|
|
|
+ * Are anisotropic textures enabled in the application.
|
|
|
+ */
|
|
|
+ static AnisotropicTextureEnabled: boolean;
|
|
|
}
|
|
|
}
|
|
|
declare module "babylonjs/Shaders/ShadersInclude/defaultFragmentDeclaration" {
|
|
@@ -44424,21 +44440,6 @@ declare module "babylonjs/Materials/PBR/pbrClearCoatConfiguration" {
|
|
|
*/
|
|
|
getClassName(): string;
|
|
|
/**
|
|
|
- * Makes a duplicate of the current configuration into another one.
|
|
|
- * @param clearCoatConfiguration define the config where to copy the info
|
|
|
- */
|
|
|
- copyTo(clearCoatConfiguration: PBRClearCoatConfiguration): void;
|
|
|
- /**
|
|
|
- * Serializes this clear coat configuration.
|
|
|
- * @returns - An object with the serialized config.
|
|
|
- */
|
|
|
- serialize(): any;
|
|
|
- /**
|
|
|
- * Parses a Clear Coat Configuration from a serialized object.
|
|
|
- * @param source - Serialized object.
|
|
|
- */
|
|
|
- parse(source: any): void;
|
|
|
- /**
|
|
|
* Add fallbacks to the effect fallbacks list.
|
|
|
* @param defines defines the Base texture to use.
|
|
|
* @param fallbacks defines the current fallback list.
|
|
@@ -44461,19 +44462,41 @@ declare module "babylonjs/Materials/PBR/pbrClearCoatConfiguration" {
|
|
|
* @param uniformBuffer defines the current uniform buffer.
|
|
|
*/
|
|
|
static PrepareUniformBuffer(uniformBuffer: UniformBuffer): void;
|
|
|
+ /**
|
|
|
+ * Makes a duplicate of the current configuration into another one.
|
|
|
+ * @param clearCoatConfiguration define the config where to copy the info
|
|
|
+ */
|
|
|
+ copyTo(clearCoatConfiguration: PBRClearCoatConfiguration): void;
|
|
|
+ /**
|
|
|
+ * Serializes this clear coat configuration.
|
|
|
+ * @returns - An object with the serialized config.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ /**
|
|
|
+ * Parses a Clear Coat Configuration from a serialized object.
|
|
|
+ * @param source - Serialized object.
|
|
|
+ */
|
|
|
+ parse(source: any): void;
|
|
|
}
|
|
|
}
|
|
|
declare module "babylonjs/Materials/PBR/pbrAnisotropicConfiguration" {
|
|
|
import { EffectFallbacks } from "babylonjs/Materials/effect";
|
|
|
import { UniformBuffer } from "babylonjs/Materials/uniformBuffer";
|
|
|
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
|
+ import { Vector2 } from "babylonjs/Maths/math";
|
|
|
+ import { Scene } from "babylonjs/scene";
|
|
|
+ import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
|
+ import { IAnimatable } from "babylonjs/Misc/tools";
|
|
|
+ import { Nullable } from "babylonjs/types";
|
|
|
/**
|
|
|
* @hidden
|
|
|
*/
|
|
|
export interface IMaterialAnisotropicDefines {
|
|
|
ANISOTROPIC: boolean;
|
|
|
+ ANISOTROPIC_TEXTURE: boolean;
|
|
|
+ ANISOTROPIC_TEXTUREDIRECTUV: number;
|
|
|
MAINUV1: boolean;
|
|
|
- _areMiscDirty: boolean;
|
|
|
+ _areTexturesDirty: boolean;
|
|
|
_needUVs: boolean;
|
|
|
}
|
|
|
/**
|
|
@@ -44490,51 +44513,73 @@ declare module "babylonjs/Materials/PBR/pbrAnisotropicConfiguration" {
|
|
|
*/
|
|
|
intensity: number;
|
|
|
/**
|
|
|
- * Defines if the effect is along the tangents or bitangents.
|
|
|
+ * Defines if the effect is along the tangents, bitangents or in between.
|
|
|
* By default, the effect is "strectching" the highlights along the tangents.
|
|
|
*/
|
|
|
- followTangents: boolean;
|
|
|
+ direction: Vector2;
|
|
|
+ private _texture;
|
|
|
+ /**
|
|
|
+ * Stores the anisotropy values in a texture.
|
|
|
+ * rg is direction (like normal from -1 to 1)
|
|
|
+ * b is a intensity
|
|
|
+ */
|
|
|
+ texture: Nullable<BaseTexture>;
|
|
|
/** @hidden */
|
|
|
- private _internalMarkAllSubMeshesAsMiscDirty;
|
|
|
+ private _internalMarkAllSubMeshesAsTexturesDirty;
|
|
|
/** @hidden */
|
|
|
- _markAllSubMeshesAsMiscDirty(): void;
|
|
|
+ _markAllSubMeshesAsTexturesDirty(): void;
|
|
|
/**
|
|
|
- * Instantiate a new istance of clear coat configuration.
|
|
|
- * @param markAllSubMeshesAsMiscDirty Callback to flag the material to dirty
|
|
|
+ * Instantiate a new istance of anisotropy configuration.
|
|
|
+ * @param markAllSubMeshesAsTexturesDirty Callback to flag the material to dirty
|
|
|
*/
|
|
|
- constructor(markAllSubMeshesAsMiscDirty: () => void);
|
|
|
+ constructor(markAllSubMeshesAsTexturesDirty: () => void);
|
|
|
+ /**
|
|
|
+ * Specifies that the submesh is ready to be used.
|
|
|
+ * @param defines the list of "defines" to update.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
+ * @returns - boolean indicating that the submesh is ready or not.
|
|
|
+ */
|
|
|
+ isReadyForSubMesh(defines: IMaterialAnisotropicDefines, scene: Scene): boolean;
|
|
|
/**
|
|
|
* Checks to see if a texture is used in the material.
|
|
|
* @param defines the list of "defines" to update.
|
|
|
* @param mesh the mesh we are preparing the defines for.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
*/
|
|
|
- prepareDefines(defines: IMaterialAnisotropicDefines, mesh: AbstractMesh): void;
|
|
|
+ prepareDefines(defines: IMaterialAnisotropicDefines, mesh: AbstractMesh, scene: Scene): void;
|
|
|
/**
|
|
|
* Binds the material data.
|
|
|
* @param uniformBuffer defines the Uniform buffer to fill in.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
* @param isFrozen defines wether the material is frozen or not.
|
|
|
*/
|
|
|
- bindForSubMesh(uniformBuffer: UniformBuffer, isFrozen: boolean): void;
|
|
|
+ bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, isFrozen: boolean): void;
|
|
|
/**
|
|
|
- * Get the current class name of the texture useful for serialization or dynamic coding.
|
|
|
- * @returns "PBRAnisotropicConfiguration"
|
|
|
- */
|
|
|
- getClassName(): string;
|
|
|
+ * Checks to see if a texture is used in the material.
|
|
|
+ * @param texture - Base texture to use.
|
|
|
+ * @returns - Boolean specifying if a texture is used in the material.
|
|
|
+ */
|
|
|
+ hasTexture(texture: BaseTexture): boolean;
|
|
|
/**
|
|
|
- * Makes a duplicate of the current configuration into another one.
|
|
|
- * @param anisotropicConfiguration define the config where to copy the info
|
|
|
+ * Returns an array of the actively used textures.
|
|
|
+ * @param activeTextures Array of BaseTextures
|
|
|
*/
|
|
|
- copyTo(anisotropicConfiguration: PBRAnisotropicConfiguration): void;
|
|
|
+ getActiveTextures(activeTextures: BaseTexture[]): void;
|
|
|
/**
|
|
|
- * Serializes this clear coat configuration.
|
|
|
- * @returns - An object with the serialized config.
|
|
|
+ * Returns the animatable textures.
|
|
|
+ * @param animatables Array of animatable textures.
|
|
|
*/
|
|
|
- serialize(): any;
|
|
|
+ getAnimatables(animatables: IAnimatable[]): void;
|
|
|
/**
|
|
|
- * Parses a Clear Coat Configuration from a serialized object.
|
|
|
- * @param source - Serialized object.
|
|
|
+ * Disposes the resources of the material.
|
|
|
+ * @param forceDisposeTextures - Forces the disposal of all textures.
|
|
|
*/
|
|
|
- parse(source: any): void;
|
|
|
+ dispose(forceDisposeTextures?: boolean): void;
|
|
|
+ /**
|
|
|
+ * Get the current class name of the texture useful for serialization or dynamic coding.
|
|
|
+ * @returns "PBRAnisotropicConfiguration"
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
/**
|
|
|
* Add fallbacks to the effect fallbacks list.
|
|
|
* @param defines defines the Base texture to use.
|
|
@@ -44553,6 +44598,26 @@ declare module "babylonjs/Materials/PBR/pbrAnisotropicConfiguration" {
|
|
|
* @param uniformBuffer defines the current uniform buffer.
|
|
|
*/
|
|
|
static PrepareUniformBuffer(uniformBuffer: UniformBuffer): void;
|
|
|
+ /**
|
|
|
+ * Add the required samplers to the current list.
|
|
|
+ * @param samplers defines the current sampler list.
|
|
|
+ */
|
|
|
+ static AddSamplers(samplers: string[]): void;
|
|
|
+ /**
|
|
|
+ * Makes a duplicate of the current configuration into another one.
|
|
|
+ * @param anisotropicConfiguration define the config where to copy the info
|
|
|
+ */
|
|
|
+ copyTo(anisotropicConfiguration: PBRAnisotropicConfiguration): void;
|
|
|
+ /**
|
|
|
+ * Serializes this anisotropy configuration.
|
|
|
+ * @returns - An object with the serialized config.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ /**
|
|
|
+ * Parses a anisotropy Configuration from a serialized object.
|
|
|
+ * @param source - Serialized object.
|
|
|
+ */
|
|
|
+ parse(source: any): void;
|
|
|
}
|
|
|
}
|
|
|
declare module "babylonjs/Materials/PBR/pbrBRDFConfiguration" {
|
|
@@ -44620,6 +44685,149 @@ declare module "babylonjs/Materials/PBR/pbrBRDFConfiguration" {
|
|
|
parse(source: any): void;
|
|
|
}
|
|
|
}
|
|
|
+declare module "babylonjs/Materials/PBR/pbrSheenConfiguration" {
|
|
|
+ import { EffectFallbacks } from "babylonjs/Materials/effect";
|
|
|
+ import { UniformBuffer } from "babylonjs/Materials/uniformBuffer";
|
|
|
+ import { Color3 } from "babylonjs/Maths/math";
|
|
|
+ import { Scene } from "babylonjs/scene";
|
|
|
+ import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
|
+ import { IAnimatable } from "babylonjs/Misc/tools";
|
|
|
+ import { Nullable } from "babylonjs/types";
|
|
|
+ /**
|
|
|
+ * @hidden
|
|
|
+ */
|
|
|
+ export interface IMaterialSheenDefines {
|
|
|
+ SHEEN: boolean;
|
|
|
+ SHEEN_TEXTURE: boolean;
|
|
|
+ SHEEN_TEXTUREDIRECTUV: number;
|
|
|
+ SHEEN_LINKWITHALBEDO: boolean;
|
|
|
+ /** @hidden */
|
|
|
+ _areTexturesDirty: boolean;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * Define the code related to the Sheen parameters of the pbr material.
|
|
|
+ */
|
|
|
+ export class PBRSheenConfiguration {
|
|
|
+ private _isEnabled;
|
|
|
+ /**
|
|
|
+ * Defines if the material uses sheen.
|
|
|
+ */
|
|
|
+ isEnabled: boolean;
|
|
|
+ private _linkSheenWithAlbedo;
|
|
|
+ /**
|
|
|
+ * Defines if the sheen is linked to the sheen color.
|
|
|
+ */
|
|
|
+ linkSheenWithAlbedo: boolean;
|
|
|
+ /**
|
|
|
+ * Defines the sheen intensity.
|
|
|
+ */
|
|
|
+ intensity: number;
|
|
|
+ /**
|
|
|
+ * Defines the sheen color.
|
|
|
+ */
|
|
|
+ color: Color3;
|
|
|
+ private _texture;
|
|
|
+ /**
|
|
|
+ * Stores the sheen tint values in a texture.
|
|
|
+ * rgb is tint
|
|
|
+ * a is a intensity
|
|
|
+ */
|
|
|
+ texture: Nullable<BaseTexture>;
|
|
|
+ /** @hidden */
|
|
|
+ private _internalMarkAllSubMeshesAsTexturesDirty;
|
|
|
+ /** @hidden */
|
|
|
+ _markAllSubMeshesAsTexturesDirty(): void;
|
|
|
+ /**
|
|
|
+ * Instantiate a new istance of clear coat configuration.
|
|
|
+ * @param markAllSubMeshesAsTexturesDirty Callback to flag the material to dirty
|
|
|
+ */
|
|
|
+ constructor(markAllSubMeshesAsTexturesDirty: () => void);
|
|
|
+ /**
|
|
|
+ * Specifies that the submesh is ready to be used.
|
|
|
+ * @param defines the list of "defines" to update.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
+ * @returns - boolean indicating that the submesh is ready or not.
|
|
|
+ */
|
|
|
+ isReadyForSubMesh(defines: IMaterialSheenDefines, scene: Scene): boolean;
|
|
|
+ /**
|
|
|
+ * Checks to see if a texture is used in the material.
|
|
|
+ * @param defines the list of "defines" to update.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
+ */
|
|
|
+ prepareDefines(defines: IMaterialSheenDefines, scene: Scene): void;
|
|
|
+ /**
|
|
|
+ * Binds the material data.
|
|
|
+ * @param uniformBuffer defines the Uniform buffer to fill in.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
+ * @param isFrozen defines wether the material is frozen or not.
|
|
|
+ */
|
|
|
+ bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, isFrozen: boolean): void;
|
|
|
+ /**
|
|
|
+ * Checks to see if a texture is used in the material.
|
|
|
+ * @param texture - Base texture to use.
|
|
|
+ * @returns - Boolean specifying if a texture is used in the material.
|
|
|
+ */
|
|
|
+ hasTexture(texture: BaseTexture): boolean;
|
|
|
+ /**
|
|
|
+ * Returns an array of the actively used textures.
|
|
|
+ * @param activeTextures Array of BaseTextures
|
|
|
+ */
|
|
|
+ getActiveTextures(activeTextures: BaseTexture[]): void;
|
|
|
+ /**
|
|
|
+ * Returns the animatable textures.
|
|
|
+ * @param animatables Array of animatable textures.
|
|
|
+ */
|
|
|
+ getAnimatables(animatables: IAnimatable[]): void;
|
|
|
+ /**
|
|
|
+ * Disposes the resources of the material.
|
|
|
+ * @param forceDisposeTextures - Forces the disposal of all textures.
|
|
|
+ */
|
|
|
+ dispose(forceDisposeTextures?: boolean): void;
|
|
|
+ /**
|
|
|
+ * Get the current class name of the texture useful for serialization or dynamic coding.
|
|
|
+ * @returns "PBRSheenConfiguration"
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
+ /**
|
|
|
+ * Add fallbacks to the effect fallbacks list.
|
|
|
+ * @param defines defines the Base texture to use.
|
|
|
+ * @param fallbacks defines the current fallback list.
|
|
|
+ * @param currentRank defines the current fallback rank.
|
|
|
+ * @returns the new fallback rank.
|
|
|
+ */
|
|
|
+ static AddFallbacks(defines: IMaterialSheenDefines, fallbacks: EffectFallbacks, currentRank: number): number;
|
|
|
+ /**
|
|
|
+ * Add the required uniforms to the current list.
|
|
|
+ * @param uniforms defines the current uniform list.
|
|
|
+ */
|
|
|
+ static AddUniforms(uniforms: string[]): void;
|
|
|
+ /**
|
|
|
+ * Add the required uniforms to the current buffer.
|
|
|
+ * @param uniformBuffer defines the current uniform buffer.
|
|
|
+ */
|
|
|
+ static PrepareUniformBuffer(uniformBuffer: UniformBuffer): void;
|
|
|
+ /**
|
|
|
+ * Add the required samplers to the current list.
|
|
|
+ * @param samplers defines the current sampler list.
|
|
|
+ */
|
|
|
+ static AddSamplers(samplers: string[]): void;
|
|
|
+ /**
|
|
|
+ * Makes a duplicate of the current configuration into another one.
|
|
|
+ * @param sheenConfiguration define the config where to copy the info
|
|
|
+ */
|
|
|
+ copyTo(sheenConfiguration: PBRSheenConfiguration): void;
|
|
|
+ /**
|
|
|
+ * Serializes this BRDF configuration.
|
|
|
+ * @returns - An object with the serialized config.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ /**
|
|
|
+ * Parses a Sheen Configuration from a serialized object.
|
|
|
+ * @param source - Serialized object.
|
|
|
+ */
|
|
|
+ parse(source: any): void;
|
|
|
+ }
|
|
|
+}
|
|
|
declare module "babylonjs/Shaders/ShadersInclude/pbrFragmentDeclaration" {
|
|
|
/** @hidden */
|
|
|
export var pbrFragmentDeclaration: {
|
|
@@ -44755,6 +44963,7 @@ declare module "babylonjs/Materials/PBR/pbrBaseMaterial" {
|
|
|
import { PBRClearCoatConfiguration } from "babylonjs/Materials/PBR/pbrClearCoatConfiguration";
|
|
|
import { PBRAnisotropicConfiguration } from "babylonjs/Materials/PBR/pbrAnisotropicConfiguration";
|
|
|
import { PBRBRDFConfiguration } from "babylonjs/Materials/PBR/pbrBRDFConfiguration";
|
|
|
+ import { PBRSheenConfiguration } from "babylonjs/Materials/PBR/pbrSheenConfiguration";
|
|
|
import { ImageProcessingConfiguration } from "babylonjs/Materials/imageProcessingConfiguration";
|
|
|
import { Material } from "babylonjs/Materials/material";
|
|
|
import { PushMaterial } from "babylonjs/Materials/pushMaterial";
|
|
@@ -45141,6 +45350,10 @@ declare module "babylonjs/Materials/PBR/pbrBaseMaterial" {
|
|
|
*/
|
|
|
readonly brdf: PBRBRDFConfiguration;
|
|
|
/**
|
|
|
+ * Defines the Sheen parameters for the material.
|
|
|
+ */
|
|
|
+ readonly sheen: PBRSheenConfiguration;
|
|
|
+ /**
|
|
|
* Instantiates a new PBRMaterial instance.
|
|
|
*
|
|
|
* @param name The material name
|
|
@@ -56962,21 +57175,6 @@ interface Window {
|
|
|
setImmediate(handler: (...args: any[]) => void): number;
|
|
|
}
|
|
|
|
|
|
-interface Document {
|
|
|
- mozCancelFullScreen(): void;
|
|
|
- msCancelFullScreen(): void;
|
|
|
- webkitCancelFullScreen(): void;
|
|
|
- requestPointerLock(): void;
|
|
|
- exitPointerLock(): void;
|
|
|
- mozFullScreen: boolean;
|
|
|
- msIsFullScreen: boolean;
|
|
|
- readonly webkitIsFullScreen: boolean;
|
|
|
- readonly pointerLockElement: Element;
|
|
|
- mozPointerLockElement: HTMLElement;
|
|
|
- msPointerLockElement: HTMLElement;
|
|
|
- webkitPointerLockElement: HTMLElement;
|
|
|
-}
|
|
|
-
|
|
|
interface HTMLCanvasElement {
|
|
|
requestPointerLock(): void;
|
|
|
msRequestPointerLock?(): void;
|
|
@@ -64959,6 +65157,8 @@ declare module BABYLON {
|
|
|
private _pivotMatrix;
|
|
|
private _pivotMatrixInverse;
|
|
|
protected _postMultiplyPivotMatrix: boolean;
|
|
|
+ private _tempMatrix;
|
|
|
+ private _tempMatrix2;
|
|
|
protected _isWorldMatrixFrozen: boolean;
|
|
|
/** @hidden */
|
|
|
_indexInSceneTransformNodesArray: number;
|
|
@@ -65755,7 +65955,7 @@ declare module BABYLON {
|
|
|
* @param scene defines the scene the texture is attached to
|
|
|
* @param extensions defines the suffixes add to the picture name in case six images are in use like _px.jpg...
|
|
|
* @param noMipmap defines if mipmaps should be created or not
|
|
|
- * @param files defines the six files to load for the different faces
|
|
|
+ * @param files defines the six files to load for the different faces in that order: px, py, pz, nx, ny, nz
|
|
|
* @param onLoad defines a callback triggered at the end of the file load if no errors occured
|
|
|
* @param onError defines a callback triggered in case of error during load
|
|
|
* @param format defines the internal format to use for the texture once loaded
|
|
@@ -77848,9 +78048,10 @@ declare module BABYLON {
|
|
|
* Update the current index buffer
|
|
|
* @param indices defines the source data
|
|
|
* @param offset defines the offset in the index buffer where to store the new data (can be null)
|
|
|
+ * @param gpuMemoryOnly defines a boolean indicating that only the GPU memory must be updated leaving the CPU version of the indices unchanged (false by default)
|
|
|
* @returns the current mesh
|
|
|
*/
|
|
|
- updateIndices(indices: IndicesArray, offset?: number): Mesh;
|
|
|
+ updateIndices(indices: IndicesArray, offset?: number, gpuMemoryOnly?: boolean): Mesh;
|
|
|
/**
|
|
|
* Invert the geometry to move from a right handed system to a left handed one.
|
|
|
* @returns the current mesh
|
|
@@ -79429,8 +79630,9 @@ declare module BABYLON {
|
|
|
* Update index buffer
|
|
|
* @param indices defines the indices to store in the index buffer
|
|
|
* @param offset defines the offset in the target buffer where to store the data
|
|
|
+ * @param gpuMemoryOnly defines a boolean indicating that only the GPU memory must be updated leaving the CPU version of the indices unchanged (false by default)
|
|
|
*/
|
|
|
- updateIndices(indices: IndicesArray, offset?: number): void;
|
|
|
+ updateIndices(indices: IndicesArray, offset?: number, gpuMemoryOnly?: boolean): void;
|
|
|
/**
|
|
|
* Creates a new index buffer
|
|
|
* @param indices defines the indices to store in the index buffer
|
|
@@ -81467,9 +81669,11 @@ declare module BABYLON {
|
|
|
/**
|
|
|
* Updates the AbstractMesh indices array
|
|
|
* @param indices defines the data source
|
|
|
+ * @param offset defines the offset in the index buffer where to store the new data (can be null)
|
|
|
+ * @param gpuMemoryOnly defines a boolean indicating that only the GPU memory must be updated leaving the CPU version of the indices unchanged (false by default)
|
|
|
* @returns the current mesh
|
|
|
*/
|
|
|
- updateIndices(indices: IndicesArray): AbstractMesh;
|
|
|
+ updateIndices(indices: IndicesArray, offset?: number, gpuMemoryOnly?: boolean): AbstractMesh;
|
|
|
/**
|
|
|
* Creates new normals data for the mesh
|
|
|
* @param updatable defines if the normal vertex buffer must be flagged as updatable
|
|
@@ -94939,6 +95143,16 @@ declare module BABYLON {
|
|
|
* Are clear coat tint textures enabled in the application.
|
|
|
*/
|
|
|
static ClearCoatTintTextureEnabled: boolean;
|
|
|
+ private static _SheenTextureEnabled;
|
|
|
+ /**
|
|
|
+ * Are sheen textures enabled in the application.
|
|
|
+ */
|
|
|
+ static SheenTextureEnabled: boolean;
|
|
|
+ private static _AnisotropicTextureEnabled;
|
|
|
+ /**
|
|
|
+ * Are anisotropic textures enabled in the application.
|
|
|
+ */
|
|
|
+ static AnisotropicTextureEnabled: boolean;
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
@@ -100274,21 +100488,6 @@ declare module BABYLON {
|
|
|
*/
|
|
|
getClassName(): string;
|
|
|
/**
|
|
|
- * Makes a duplicate of the current configuration into another one.
|
|
|
- * @param clearCoatConfiguration define the config where to copy the info
|
|
|
- */
|
|
|
- copyTo(clearCoatConfiguration: PBRClearCoatConfiguration): void;
|
|
|
- /**
|
|
|
- * Serializes this clear coat configuration.
|
|
|
- * @returns - An object with the serialized config.
|
|
|
- */
|
|
|
- serialize(): any;
|
|
|
- /**
|
|
|
- * Parses a Clear Coat Configuration from a serialized object.
|
|
|
- * @param source - Serialized object.
|
|
|
- */
|
|
|
- parse(source: any): void;
|
|
|
- /**
|
|
|
* Add fallbacks to the effect fallbacks list.
|
|
|
* @param defines defines the Base texture to use.
|
|
|
* @param fallbacks defines the current fallback list.
|
|
@@ -100311,6 +100510,21 @@ declare module BABYLON {
|
|
|
* @param uniformBuffer defines the current uniform buffer.
|
|
|
*/
|
|
|
static PrepareUniformBuffer(uniformBuffer: UniformBuffer): void;
|
|
|
+ /**
|
|
|
+ * Makes a duplicate of the current configuration into another one.
|
|
|
+ * @param clearCoatConfiguration define the config where to copy the info
|
|
|
+ */
|
|
|
+ copyTo(clearCoatConfiguration: PBRClearCoatConfiguration): void;
|
|
|
+ /**
|
|
|
+ * Serializes this clear coat configuration.
|
|
|
+ * @returns - An object with the serialized config.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ /**
|
|
|
+ * Parses a Clear Coat Configuration from a serialized object.
|
|
|
+ * @param source - Serialized object.
|
|
|
+ */
|
|
|
+ parse(source: any): void;
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
@@ -100319,8 +100533,10 @@ declare module BABYLON {
|
|
|
*/
|
|
|
export interface IMaterialAnisotropicDefines {
|
|
|
ANISOTROPIC: boolean;
|
|
|
+ ANISOTROPIC_TEXTURE: boolean;
|
|
|
+ ANISOTROPIC_TEXTUREDIRECTUV: number;
|
|
|
MAINUV1: boolean;
|
|
|
- _areMiscDirty: boolean;
|
|
|
+ _areTexturesDirty: boolean;
|
|
|
_needUVs: boolean;
|
|
|
}
|
|
|
/**
|
|
@@ -100337,51 +100553,73 @@ declare module BABYLON {
|
|
|
*/
|
|
|
intensity: number;
|
|
|
/**
|
|
|
- * Defines if the effect is along the tangents or bitangents.
|
|
|
+ * Defines if the effect is along the tangents, bitangents or in between.
|
|
|
* By default, the effect is "strectching" the highlights along the tangents.
|
|
|
*/
|
|
|
- followTangents: boolean;
|
|
|
+ direction: Vector2;
|
|
|
+ private _texture;
|
|
|
+ /**
|
|
|
+ * Stores the anisotropy values in a texture.
|
|
|
+ * rg is direction (like normal from -1 to 1)
|
|
|
+ * b is a intensity
|
|
|
+ */
|
|
|
+ texture: Nullable<BaseTexture>;
|
|
|
/** @hidden */
|
|
|
- private _internalMarkAllSubMeshesAsMiscDirty;
|
|
|
+ private _internalMarkAllSubMeshesAsTexturesDirty;
|
|
|
/** @hidden */
|
|
|
- _markAllSubMeshesAsMiscDirty(): void;
|
|
|
+ _markAllSubMeshesAsTexturesDirty(): void;
|
|
|
/**
|
|
|
- * Instantiate a new istance of clear coat configuration.
|
|
|
- * @param markAllSubMeshesAsMiscDirty Callback to flag the material to dirty
|
|
|
+ * Instantiate a new istance of anisotropy configuration.
|
|
|
+ * @param markAllSubMeshesAsTexturesDirty Callback to flag the material to dirty
|
|
|
*/
|
|
|
- constructor(markAllSubMeshesAsMiscDirty: () => void);
|
|
|
+ constructor(markAllSubMeshesAsTexturesDirty: () => void);
|
|
|
+ /**
|
|
|
+ * Specifies that the submesh is ready to be used.
|
|
|
+ * @param defines the list of "defines" to update.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
+ * @returns - boolean indicating that the submesh is ready or not.
|
|
|
+ */
|
|
|
+ isReadyForSubMesh(defines: IMaterialAnisotropicDefines, scene: Scene): boolean;
|
|
|
/**
|
|
|
* Checks to see if a texture is used in the material.
|
|
|
* @param defines the list of "defines" to update.
|
|
|
* @param mesh the mesh we are preparing the defines for.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
*/
|
|
|
- prepareDefines(defines: IMaterialAnisotropicDefines, mesh: AbstractMesh): void;
|
|
|
+ prepareDefines(defines: IMaterialAnisotropicDefines, mesh: AbstractMesh, scene: Scene): void;
|
|
|
/**
|
|
|
* Binds the material data.
|
|
|
* @param uniformBuffer defines the Uniform buffer to fill in.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
* @param isFrozen defines wether the material is frozen or not.
|
|
|
*/
|
|
|
- bindForSubMesh(uniformBuffer: UniformBuffer, isFrozen: boolean): void;
|
|
|
+ bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, isFrozen: boolean): void;
|
|
|
/**
|
|
|
- * Get the current class name of the texture useful for serialization or dynamic coding.
|
|
|
- * @returns "PBRAnisotropicConfiguration"
|
|
|
- */
|
|
|
- getClassName(): string;
|
|
|
+ * Checks to see if a texture is used in the material.
|
|
|
+ * @param texture - Base texture to use.
|
|
|
+ * @returns - Boolean specifying if a texture is used in the material.
|
|
|
+ */
|
|
|
+ hasTexture(texture: BaseTexture): boolean;
|
|
|
/**
|
|
|
- * Makes a duplicate of the current configuration into another one.
|
|
|
- * @param anisotropicConfiguration define the config where to copy the info
|
|
|
+ * Returns an array of the actively used textures.
|
|
|
+ * @param activeTextures Array of BaseTextures
|
|
|
*/
|
|
|
- copyTo(anisotropicConfiguration: PBRAnisotropicConfiguration): void;
|
|
|
+ getActiveTextures(activeTextures: BaseTexture[]): void;
|
|
|
/**
|
|
|
- * Serializes this clear coat configuration.
|
|
|
- * @returns - An object with the serialized config.
|
|
|
+ * Returns the animatable textures.
|
|
|
+ * @param animatables Array of animatable textures.
|
|
|
*/
|
|
|
- serialize(): any;
|
|
|
+ getAnimatables(animatables: IAnimatable[]): void;
|
|
|
/**
|
|
|
- * Parses a Clear Coat Configuration from a serialized object.
|
|
|
- * @param source - Serialized object.
|
|
|
+ * Disposes the resources of the material.
|
|
|
+ * @param forceDisposeTextures - Forces the disposal of all textures.
|
|
|
*/
|
|
|
- parse(source: any): void;
|
|
|
+ dispose(forceDisposeTextures?: boolean): void;
|
|
|
+ /**
|
|
|
+ * Get the current class name of the texture useful for serialization or dynamic coding.
|
|
|
+ * @returns "PBRAnisotropicConfiguration"
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
/**
|
|
|
* Add fallbacks to the effect fallbacks list.
|
|
|
* @param defines defines the Base texture to use.
|
|
@@ -100400,6 +100638,26 @@ declare module BABYLON {
|
|
|
* @param uniformBuffer defines the current uniform buffer.
|
|
|
*/
|
|
|
static PrepareUniformBuffer(uniformBuffer: UniformBuffer): void;
|
|
|
+ /**
|
|
|
+ * Add the required samplers to the current list.
|
|
|
+ * @param samplers defines the current sampler list.
|
|
|
+ */
|
|
|
+ static AddSamplers(samplers: string[]): void;
|
|
|
+ /**
|
|
|
+ * Makes a duplicate of the current configuration into another one.
|
|
|
+ * @param anisotropicConfiguration define the config where to copy the info
|
|
|
+ */
|
|
|
+ copyTo(anisotropicConfiguration: PBRAnisotropicConfiguration): void;
|
|
|
+ /**
|
|
|
+ * Serializes this anisotropy configuration.
|
|
|
+ * @returns - An object with the serialized config.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ /**
|
|
|
+ * Parses a anisotropy Configuration from a serialized object.
|
|
|
+ * @param source - Serialized object.
|
|
|
+ */
|
|
|
+ parse(source: any): void;
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
@@ -100468,6 +100726,142 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
+ /**
|
|
|
+ * @hidden
|
|
|
+ */
|
|
|
+ export interface IMaterialSheenDefines {
|
|
|
+ SHEEN: boolean;
|
|
|
+ SHEEN_TEXTURE: boolean;
|
|
|
+ SHEEN_TEXTUREDIRECTUV: number;
|
|
|
+ SHEEN_LINKWITHALBEDO: boolean;
|
|
|
+ /** @hidden */
|
|
|
+ _areTexturesDirty: boolean;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * Define the code related to the Sheen parameters of the pbr material.
|
|
|
+ */
|
|
|
+ export class PBRSheenConfiguration {
|
|
|
+ private _isEnabled;
|
|
|
+ /**
|
|
|
+ * Defines if the material uses sheen.
|
|
|
+ */
|
|
|
+ isEnabled: boolean;
|
|
|
+ private _linkSheenWithAlbedo;
|
|
|
+ /**
|
|
|
+ * Defines if the sheen is linked to the sheen color.
|
|
|
+ */
|
|
|
+ linkSheenWithAlbedo: boolean;
|
|
|
+ /**
|
|
|
+ * Defines the sheen intensity.
|
|
|
+ */
|
|
|
+ intensity: number;
|
|
|
+ /**
|
|
|
+ * Defines the sheen color.
|
|
|
+ */
|
|
|
+ color: Color3;
|
|
|
+ private _texture;
|
|
|
+ /**
|
|
|
+ * Stores the sheen tint values in a texture.
|
|
|
+ * rgb is tint
|
|
|
+ * a is a intensity
|
|
|
+ */
|
|
|
+ texture: Nullable<BaseTexture>;
|
|
|
+ /** @hidden */
|
|
|
+ private _internalMarkAllSubMeshesAsTexturesDirty;
|
|
|
+ /** @hidden */
|
|
|
+ _markAllSubMeshesAsTexturesDirty(): void;
|
|
|
+ /**
|
|
|
+ * Instantiate a new istance of clear coat configuration.
|
|
|
+ * @param markAllSubMeshesAsTexturesDirty Callback to flag the material to dirty
|
|
|
+ */
|
|
|
+ constructor(markAllSubMeshesAsTexturesDirty: () => void);
|
|
|
+ /**
|
|
|
+ * Specifies that the submesh is ready to be used.
|
|
|
+ * @param defines the list of "defines" to update.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
+ * @returns - boolean indicating that the submesh is ready or not.
|
|
|
+ */
|
|
|
+ isReadyForSubMesh(defines: IMaterialSheenDefines, scene: Scene): boolean;
|
|
|
+ /**
|
|
|
+ * Checks to see if a texture is used in the material.
|
|
|
+ * @param defines the list of "defines" to update.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
+ */
|
|
|
+ prepareDefines(defines: IMaterialSheenDefines, scene: Scene): void;
|
|
|
+ /**
|
|
|
+ * Binds the material data.
|
|
|
+ * @param uniformBuffer defines the Uniform buffer to fill in.
|
|
|
+ * @param scene defines the scene the material belongs to.
|
|
|
+ * @param isFrozen defines wether the material is frozen or not.
|
|
|
+ */
|
|
|
+ bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, isFrozen: boolean): void;
|
|
|
+ /**
|
|
|
+ * Checks to see if a texture is used in the material.
|
|
|
+ * @param texture - Base texture to use.
|
|
|
+ * @returns - Boolean specifying if a texture is used in the material.
|
|
|
+ */
|
|
|
+ hasTexture(texture: BaseTexture): boolean;
|
|
|
+ /**
|
|
|
+ * Returns an array of the actively used textures.
|
|
|
+ * @param activeTextures Array of BaseTextures
|
|
|
+ */
|
|
|
+ getActiveTextures(activeTextures: BaseTexture[]): void;
|
|
|
+ /**
|
|
|
+ * Returns the animatable textures.
|
|
|
+ * @param animatables Array of animatable textures.
|
|
|
+ */
|
|
|
+ getAnimatables(animatables: IAnimatable[]): void;
|
|
|
+ /**
|
|
|
+ * Disposes the resources of the material.
|
|
|
+ * @param forceDisposeTextures - Forces the disposal of all textures.
|
|
|
+ */
|
|
|
+ dispose(forceDisposeTextures?: boolean): void;
|
|
|
+ /**
|
|
|
+ * Get the current class name of the texture useful for serialization or dynamic coding.
|
|
|
+ * @returns "PBRSheenConfiguration"
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
+ /**
|
|
|
+ * Add fallbacks to the effect fallbacks list.
|
|
|
+ * @param defines defines the Base texture to use.
|
|
|
+ * @param fallbacks defines the current fallback list.
|
|
|
+ * @param currentRank defines the current fallback rank.
|
|
|
+ * @returns the new fallback rank.
|
|
|
+ */
|
|
|
+ static AddFallbacks(defines: IMaterialSheenDefines, fallbacks: EffectFallbacks, currentRank: number): number;
|
|
|
+ /**
|
|
|
+ * Add the required uniforms to the current list.
|
|
|
+ * @param uniforms defines the current uniform list.
|
|
|
+ */
|
|
|
+ static AddUniforms(uniforms: string[]): void;
|
|
|
+ /**
|
|
|
+ * Add the required uniforms to the current buffer.
|
|
|
+ * @param uniformBuffer defines the current uniform buffer.
|
|
|
+ */
|
|
|
+ static PrepareUniformBuffer(uniformBuffer: UniformBuffer): void;
|
|
|
+ /**
|
|
|
+ * Add the required samplers to the current list.
|
|
|
+ * @param samplers defines the current sampler list.
|
|
|
+ */
|
|
|
+ static AddSamplers(samplers: string[]): void;
|
|
|
+ /**
|
|
|
+ * Makes a duplicate of the current configuration into another one.
|
|
|
+ * @param sheenConfiguration define the config where to copy the info
|
|
|
+ */
|
|
|
+ copyTo(sheenConfiguration: PBRSheenConfiguration): void;
|
|
|
+ /**
|
|
|
+ * Serializes this BRDF configuration.
|
|
|
+ * @returns - An object with the serialized config.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ /**
|
|
|
+ * Parses a Sheen Configuration from a serialized object.
|
|
|
+ * @param source - Serialized object.
|
|
|
+ */
|
|
|
+ parse(source: any): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
/** @hidden */
|
|
|
export var pbrFragmentDeclaration: {
|
|
|
name: string;
|
|
@@ -100925,6 +101319,10 @@ declare module BABYLON {
|
|
|
*/
|
|
|
readonly brdf: PBRBRDFConfiguration;
|
|
|
/**
|
|
|
+ * Defines the Sheen parameters for the material.
|
|
|
+ */
|
|
|
+ readonly sheen: PBRSheenConfiguration;
|
|
|
+ /**
|
|
|
* Instantiates a new PBRMaterial instance.
|
|
|
*
|
|
|
* @param name The material name
|
|
@@ -111795,20 +112193,6 @@ interface Window {
|
|
|
DracoDecoderModule: any;
|
|
|
setImmediate(handler: (...args: any[]) => void): number;
|
|
|
}
|
|
|
-interface Document {
|
|
|
- mozCancelFullScreen(): void;
|
|
|
- msCancelFullScreen(): void;
|
|
|
- webkitCancelFullScreen(): void;
|
|
|
- requestPointerLock(): void;
|
|
|
- exitPointerLock(): void;
|
|
|
- mozFullScreen: boolean;
|
|
|
- msIsFullScreen: boolean;
|
|
|
- readonly webkitIsFullScreen: boolean;
|
|
|
- readonly pointerLockElement: Element;
|
|
|
- mozPointerLockElement: HTMLElement;
|
|
|
- msPointerLockElement: HTMLElement;
|
|
|
- webkitPointerLockElement: HTMLElement;
|
|
|
-}
|
|
|
interface HTMLCanvasElement {
|
|
|
requestPointerLock(): void;
|
|
|
msRequestPointerLock?(): void;
|