|
@@ -6816,6 +6816,46 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
|
|
+ * The options Interface for creating a Capsule Mesh
|
|
|
|
+ */
|
|
|
|
+ export interface ICreateCapsuleOptions {
|
|
|
|
+ /** The Orientation of the capsule. Default : Vector3.Up() */
|
|
|
|
+ orientation?: Vector3;
|
|
|
|
+ /** Number of sub segments on the tube section of the capsule running parallel to orientation. */
|
|
|
|
+ subdivisions: number;
|
|
|
|
+ /** Number of cylindrical segments on the capsule. */
|
|
|
|
+ tessellation: number;
|
|
|
|
+ /** Height or Length of the capsule. */
|
|
|
|
+ height: number;
|
|
|
|
+ /** Radius of the capsule. */
|
|
|
|
+ radius: number;
|
|
|
|
+ /** Height or Length of the capsule. */
|
|
|
|
+ capSubdivisions: number;
|
|
|
|
+ /** Overwrite for the top radius. */
|
|
|
|
+ radiusTop?: number;
|
|
|
|
+ /** Overwrite for the bottom radius. */
|
|
|
|
+ radiusBottom?: number;
|
|
|
|
+ /** Overwrite for the top capSubdivisions. */
|
|
|
|
+ topCapSubdivisions?: number;
|
|
|
|
+ /** Overwrite for the bottom capSubdivisions. */
|
|
|
|
+ bottomCapSubdivisions?: number;
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * Class containing static functions to help procedurally build meshes
|
|
|
|
+ */
|
|
|
|
+ export class CapsuleBuilder {
|
|
|
|
+ /**
|
|
|
|
+ * Creates a capsule or a pill mesh
|
|
|
|
+ * @param name defines the name of the mesh
|
|
|
|
+ * @param options The constructors options.
|
|
|
|
+ * @param scene The scene the mesh is scoped to.
|
|
|
|
+ * @returns Capsule Mesh
|
|
|
|
+ */
|
|
|
|
+ static CreateCapsule(name: string, options: ICreateCapsuleOptions | undefined, scene: any): Mesh;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ /**
|
|
* @hidden
|
|
* @hidden
|
|
*/
|
|
*/
|
|
export class IntersectionInfo {
|
|
export class IntersectionInfo {
|
|
@@ -8566,6 +8606,14 @@ declare module BABYLON {
|
|
};
|
|
};
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ /**
|
|
|
|
+ * Type used to define a render target texture size (either with a number or with a rect width and height)
|
|
|
|
+ */
|
|
|
|
+ export type RenderTargetTextureSize = number | {
|
|
|
|
+ width: number;
|
|
|
|
+ height: number;
|
|
|
|
+ layers?: number;
|
|
|
|
+ };
|
|
interface ThinEngine {
|
|
interface ThinEngine {
|
|
/**
|
|
/**
|
|
* Creates a new render target texture
|
|
* Creates a new render target texture
|
|
@@ -8573,11 +8621,7 @@ declare module BABYLON {
|
|
* @param options defines the options used to create the texture
|
|
* @param options defines the options used to create the texture
|
|
* @returns a new render target texture stored in an InternalTexture
|
|
* @returns a new render target texture stored in an InternalTexture
|
|
*/
|
|
*/
|
|
- createRenderTargetTexture(size: number | {
|
|
|
|
- width: number;
|
|
|
|
- height: number;
|
|
|
|
- layers?: number;
|
|
|
|
- }, options: boolean | RenderTargetCreationOptions): InternalTexture;
|
|
|
|
|
|
+ createRenderTargetTexture(size: RenderTargetTextureSize, options: boolean | RenderTargetCreationOptions): InternalTexture;
|
|
/**
|
|
/**
|
|
* Creates a depth stencil texture.
|
|
* Creates a depth stencil texture.
|
|
* This is only available in WebGL 2 or with the depth texture extension available.
|
|
* This is only available in WebGL 2 or with the depth texture extension available.
|
|
@@ -8585,17 +8629,9 @@ declare module BABYLON {
|
|
* @param options The options defining the texture.
|
|
* @param options The options defining the texture.
|
|
* @returns The texture
|
|
* @returns The texture
|
|
*/
|
|
*/
|
|
- createDepthStencilTexture(size: number | {
|
|
|
|
- width: number;
|
|
|
|
- height: number;
|
|
|
|
- layers?: number;
|
|
|
|
- }, options: DepthTextureCreationOptions): InternalTexture;
|
|
|
|
|
|
+ createDepthStencilTexture(size: RenderTargetTextureSize, options: DepthTextureCreationOptions): InternalTexture;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- _createDepthStencilTexture(size: number | {
|
|
|
|
- width: number;
|
|
|
|
- height: number;
|
|
|
|
- layers?: number;
|
|
|
|
- }, options: DepthTextureCreationOptions): InternalTexture;
|
|
|
|
|
|
+ _createDepthStencilTexture(size: RenderTargetTextureSize, options: DepthTextureCreationOptions): InternalTexture;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -11679,6 +11715,14 @@ declare module BABYLON {
|
|
* Event raised when the texture is generated
|
|
* Event raised when the texture is generated
|
|
*/
|
|
*/
|
|
onGeneratedObservable: Observable<ProceduralTexture>;
|
|
onGeneratedObservable: Observable<ProceduralTexture>;
|
|
|
|
+ /**
|
|
|
|
+ * Event raised before the texture is generated
|
|
|
|
+ */
|
|
|
|
+ onBeforeGenerationObservable: Observable<ProceduralTexture>;
|
|
|
|
+ /**
|
|
|
|
+ * Gets or sets the node material used to create this texture (null if the texture was manually created)
|
|
|
|
+ */
|
|
|
|
+ nodeMaterialSource: Nullable<NodeMaterial>;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_generateMipMaps: boolean;
|
|
_generateMipMaps: boolean;
|
|
/** @hidden **/
|
|
/** @hidden **/
|
|
@@ -11724,7 +11768,7 @@ declare module BABYLON {
|
|
* @param generateMipMaps Define if the texture should creates mip maps or not
|
|
* @param generateMipMaps Define if the texture should creates mip maps or not
|
|
* @param isCube Define if the texture is a cube texture or not (this will render each faces of the cube)
|
|
* @param isCube Define if the texture is a cube texture or not (this will render each faces of the cube)
|
|
*/
|
|
*/
|
|
- constructor(name: string, size: any, fragment: any, scene: Nullable<Scene>, fallbackTexture?: Nullable<Texture>, generateMipMaps?: boolean, isCube?: boolean);
|
|
|
|
|
|
+ constructor(name: string, size: RenderTargetTextureSize, fragment: any, scene: Nullable<Scene>, fallbackTexture?: Nullable<Texture>, generateMipMaps?: boolean, isCube?: boolean);
|
|
/**
|
|
/**
|
|
* The effect that is created when initializing the post process.
|
|
* The effect that is created when initializing the post process.
|
|
* @returns The created effect corresponding the the postprocess.
|
|
* @returns The created effect corresponding the the postprocess.
|
|
@@ -11769,9 +11813,9 @@ declare module BABYLON {
|
|
_shouldRender(): boolean;
|
|
_shouldRender(): boolean;
|
|
/**
|
|
/**
|
|
* Get the size the texture is rendering at.
|
|
* Get the size the texture is rendering at.
|
|
- * @returns the size (texture is always squared)
|
|
|
|
|
|
+ * @returns the size (on cube texture it is always squared)
|
|
*/
|
|
*/
|
|
- getRenderSize(): number;
|
|
|
|
|
|
+ getRenderSize(): RenderTargetTextureSize;
|
|
/**
|
|
/**
|
|
* Resize the texture to new value.
|
|
* Resize the texture to new value.
|
|
* @param size Define the new size the texture should have
|
|
* @param size Define the new size the texture should have
|
|
@@ -14696,7 +14740,8 @@ declare module BABYLON {
|
|
private _absoluteRotationQuaternion;
|
|
private _absoluteRotationQuaternion;
|
|
private _pivotMatrix;
|
|
private _pivotMatrix;
|
|
private _pivotMatrixInverse;
|
|
private _pivotMatrixInverse;
|
|
- protected _postMultiplyPivotMatrix: boolean;
|
|
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _postMultiplyPivotMatrix: boolean;
|
|
protected _isWorldMatrixFrozen: boolean;
|
|
protected _isWorldMatrixFrozen: boolean;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_indexInSceneTransformNodesArray: number;
|
|
_indexInSceneTransformNodesArray: number;
|
|
@@ -20444,8 +20489,6 @@ declare module BABYLON {
|
|
matrixMode: number;
|
|
matrixMode: number;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_systemValue: Nullable<NodeMaterialSystemValues>;
|
|
_systemValue: Nullable<NodeMaterialSystemValues>;
|
|
- /** Gets or sets a boolean indicating that this input can be edited in the Inspector (false by default) */
|
|
|
|
- visibleInInspector: boolean;
|
|
|
|
/** Gets or sets a boolean indicating that the value of this input will not change after a build */
|
|
/** Gets or sets a boolean indicating that the value of this input will not change after a build */
|
|
isConstant: boolean;
|
|
isConstant: boolean;
|
|
/** Gets or sets the group to use to display this block in the Inspector */
|
|
/** Gets or sets the group to use to display this block in the Inspector */
|
|
@@ -20755,7 +20798,9 @@ declare module BABYLON {
|
|
/** For post process */
|
|
/** For post process */
|
|
PostProcess = 1,
|
|
PostProcess = 1,
|
|
/** For particle system */
|
|
/** For particle system */
|
|
- Particle = 2
|
|
|
|
|
|
+ Particle = 2,
|
|
|
|
+ /** For procedural texture */
|
|
|
|
+ ProceduralTexture = 3
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -21608,6 +21653,8 @@ declare module BABYLON {
|
|
* @returns the output or null if not found
|
|
* @returns the output or null if not found
|
|
*/
|
|
*/
|
|
getOutputByName(name: string): Nullable<NodeMaterialConnectionPoint>;
|
|
getOutputByName(name: string): Nullable<NodeMaterialConnectionPoint>;
|
|
|
|
+ /** Gets or sets a boolean indicating that this input can be edited in the Inspector (false by default) */
|
|
|
|
+ visibleInInspector: boolean;
|
|
/**
|
|
/**
|
|
* Creates a new NodeMaterialBlock
|
|
* Creates a new NodeMaterialBlock
|
|
* @param name defines the block name
|
|
* @param name defines the block name
|
|
@@ -22197,6 +22244,80 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
|
|
+ * Operations supported by the Trigonometry block
|
|
|
|
+ */
|
|
|
|
+ export enum TrigonometryBlockOperations {
|
|
|
|
+ /** Cos */
|
|
|
|
+ Cos = 0,
|
|
|
|
+ /** Sin */
|
|
|
|
+ Sin = 1,
|
|
|
|
+ /** Abs */
|
|
|
|
+ Abs = 2,
|
|
|
|
+ /** Exp */
|
|
|
|
+ Exp = 3,
|
|
|
|
+ /** Exp2 */
|
|
|
|
+ Exp2 = 4,
|
|
|
|
+ /** Round */
|
|
|
|
+ Round = 5,
|
|
|
|
+ /** Floor */
|
|
|
|
+ Floor = 6,
|
|
|
|
+ /** Ceiling */
|
|
|
|
+ Ceiling = 7,
|
|
|
|
+ /** Square root */
|
|
|
|
+ Sqrt = 8,
|
|
|
|
+ /** Log */
|
|
|
|
+ Log = 9,
|
|
|
|
+ /** Tangent */
|
|
|
|
+ Tan = 10,
|
|
|
|
+ /** Arc tangent */
|
|
|
|
+ ArcTan = 11,
|
|
|
|
+ /** Arc cosinus */
|
|
|
|
+ ArcCos = 12,
|
|
|
|
+ /** Arc sinus */
|
|
|
|
+ ArcSin = 13,
|
|
|
|
+ /** Fraction */
|
|
|
|
+ Fract = 14,
|
|
|
|
+ /** Sign */
|
|
|
|
+ Sign = 15,
|
|
|
|
+ /** To radians (from degrees) */
|
|
|
|
+ Radians = 16,
|
|
|
|
+ /** To degrees (from radians) */
|
|
|
|
+ Degrees = 17
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * Block used to apply trigonometry operation to floats
|
|
|
|
+ */
|
|
|
|
+ export class TrigonometryBlock extends NodeMaterialBlock {
|
|
|
|
+ /**
|
|
|
|
+ * Gets or sets the operation applied by the block
|
|
|
|
+ */
|
|
|
|
+ operation: TrigonometryBlockOperations;
|
|
|
|
+ /**
|
|
|
|
+ * Creates a new TrigonometryBlock
|
|
|
|
+ * @param name defines the block name
|
|
|
|
+ */
|
|
|
|
+ constructor(name: string);
|
|
|
|
+ /**
|
|
|
|
+ * Gets the current class name
|
|
|
|
+ * @returns the class name
|
|
|
|
+ */
|
|
|
|
+ getClassName(): string;
|
|
|
|
+ /**
|
|
|
|
+ * Gets the input component
|
|
|
|
+ */
|
|
|
|
+ get input(): NodeMaterialConnectionPoint;
|
|
|
|
+ /**
|
|
|
|
+ * Gets the output component
|
|
|
|
+ */
|
|
|
|
+ get output(): NodeMaterialConnectionPoint;
|
|
|
|
+ protected _buildBlock(state: NodeMaterialBuildState): this;
|
|
|
|
+ serialize(): any;
|
|
|
|
+ _deserialize(serializationObject: any, scene: Scene, rootUrl: string): void;
|
|
|
|
+ protected _dumpPropertiesCode(): string;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ /**
|
|
* Interface used to configure the node material editor
|
|
* Interface used to configure the node material editor
|
|
*/
|
|
*/
|
|
export interface INodeMaterialEditorOptions {
|
|
export interface INodeMaterialEditorOptions {
|
|
@@ -22446,8 +22567,20 @@ declare module BABYLON {
|
|
* @param postProcess The post process to create the effect for
|
|
* @param postProcess The post process to create the effect for
|
|
*/
|
|
*/
|
|
createEffectForPostProcess(postProcess: PostProcess): void;
|
|
createEffectForPostProcess(postProcess: PostProcess): void;
|
|
- private _createEffectOrPostProcess;
|
|
|
|
|
|
+ private _createEffectForPostProcess;
|
|
|
|
+ /**
|
|
|
|
+ * Create a new procedural texture based on this node material
|
|
|
|
+ * @param size defines the size of the texture
|
|
|
|
+ * @param scene defines the hosting scene
|
|
|
|
+ * @returns the new procedural texture attached to this node material
|
|
|
|
+ */
|
|
|
|
+ createProceduralTexture(size: number | {
|
|
|
|
+ width: number;
|
|
|
|
+ height: number;
|
|
|
|
+ layers?: number;
|
|
|
|
+ }, scene: Scene): ProceduralTexture;
|
|
private _createEffectForParticles;
|
|
private _createEffectForParticles;
|
|
|
|
+ private _checkInternals;
|
|
/**
|
|
/**
|
|
* Create the effect to be used as the custom effect for a particle system
|
|
* Create the effect to be used as the custom effect for a particle system
|
|
* @param particleSystem Particle system to create the effect for
|
|
* @param particleSystem Particle system to create the effect for
|
|
@@ -22525,6 +22658,10 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
setToDefaultPostProcess(): void;
|
|
setToDefaultPostProcess(): void;
|
|
/**
|
|
/**
|
|
|
|
+ * Clear the current material and set it to a default state for procedural texture
|
|
|
|
+ */
|
|
|
|
+ setToDefaultProceduralTexture(): void;
|
|
|
|
+ /**
|
|
* Clear the current material and set it to a default state for particle
|
|
* Clear the current material and set it to a default state for particle
|
|
*/
|
|
*/
|
|
setToDefaultParticle(): void;
|
|
setToDefaultParticle(): void;
|
|
@@ -22806,7 +22943,7 @@ declare module BABYLON {
|
|
* @param textureType Type of textures used when performing the post process. (default: 0)
|
|
* @param textureType Type of textures used when performing the post process. (default: 0)
|
|
* @param vertexUrl The url of the vertex shader to be used. (default: "postprocess")
|
|
* @param vertexUrl The url of the vertex shader to be used. (default: "postprocess")
|
|
* @param indexParameters The index parameters to be used for babylons include syntax "#include<kernelBlurVaryingDeclaration>[0..varyingCount]". (default: undefined) See usage in babylon.blurPostProcess.ts and kernelBlur.vertex.fx
|
|
* @param indexParameters The index parameters to be used for babylons include syntax "#include<kernelBlurVaryingDeclaration>[0..varyingCount]". (default: undefined) See usage in babylon.blurPostProcess.ts and kernelBlur.vertex.fx
|
|
- * @param blockCompilation If the shader should not be compiled imediatly. (default: false)
|
|
|
|
|
|
+ * @param blockCompilation If the shader should not be compiled immediatly. (default: false)
|
|
* @param textureFormat Format of textures used when performing the post process. (default: TEXTUREFORMAT_RGBA)
|
|
* @param textureFormat Format of textures used when performing the post process. (default: TEXTUREFORMAT_RGBA)
|
|
*/
|
|
*/
|
|
constructor(name: string, fragmentUrl: string, parameters: Nullable<string[]>, samplers: Nullable<string[]>, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, defines?: Nullable<string>, textureType?: number, vertexUrl?: string, indexParameters?: any, blockCompilation?: boolean, textureFormat?: number);
|
|
constructor(name: string, fragmentUrl: string, parameters: Nullable<string[]>, samplers: Nullable<string[]>, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, defines?: Nullable<string>, textureType?: number, vertexUrl?: string, indexParameters?: any, blockCompilation?: boolean, textureFormat?: number);
|
|
@@ -26459,6 +26596,12 @@ declare module BABYLON {
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
}): VertexData;
|
|
}): VertexData;
|
|
/**
|
|
/**
|
|
|
|
+ * Creates the VertexData for a Capsule, inspired from https://github.com/maximeq/three-js-capsule-geometry/blob/master/src/CapsuleBufferGeometry.js
|
|
|
|
+ * @param options an object used to set the following optional parameters for the capsule, required but can be empty
|
|
|
|
+ * @returns the VertexData of the Capsule
|
|
|
|
+ */
|
|
|
|
+ static CreateCapsule(options?: ICreateCapsuleOptions): VertexData;
|
|
|
|
+ /**
|
|
* Creates the VertexData for a TorusKnot
|
|
* Creates the VertexData for a TorusKnot
|
|
* @param options an object used to set the following optional parameters for the TorusKnot, required but can be empty
|
|
* @param options an object used to set the following optional parameters for the TorusKnot, required but can be empty
|
|
* * radius the radius of the torus knot, optional, default 2
|
|
* * radius the radius of the torus knot, optional, default 2
|
|
@@ -28087,6 +28230,7 @@ declare module BABYLON {
|
|
hardwareInstancedRendering: boolean;
|
|
hardwareInstancedRendering: boolean;
|
|
sideOrientation: number;
|
|
sideOrientation: number;
|
|
manualUpdate: boolean;
|
|
manualUpdate: boolean;
|
|
|
|
+ previousRenderId: number;
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* @hidden
|
|
* @hidden
|
|
@@ -29248,6 +29392,14 @@ declare module BABYLON {
|
|
* @returns a new Mesh
|
|
* @returns a new Mesh
|
|
*/
|
|
*/
|
|
static CreateDecal(name: string, sourceMesh: AbstractMesh, position: Vector3, normal: Vector3, size: Vector3, angle: number): Mesh;
|
|
static CreateDecal(name: string, sourceMesh: AbstractMesh, position: Vector3, normal: Vector3, size: Vector3, angle: number): Mesh;
|
|
|
|
+ /** Creates a Capsule Mesh
|
|
|
|
+ * @param name defines the name of the mesh.
|
|
|
|
+ * @param options the constructors options used to shape the mesh.
|
|
|
|
+ * @param scene defines the scene the mesh is scoped to.
|
|
|
|
+ * @returns the capsule mesh
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/capsule_shape
|
|
|
|
+ */
|
|
|
|
+ static CreateCapsule(name: string, options: ICreateCapsuleOptions, scene: Scene): Mesh;
|
|
/**
|
|
/**
|
|
* Prepare internal position array for software CPU skinning
|
|
* Prepare internal position array for software CPU skinning
|
|
* @returns original positions used for CPU skinning. Useful for integrating Morphing with skeletons in same mesh
|
|
* @returns original positions used for CPU skinning. Useful for integrating Morphing with skeletons in same mesh
|
|
@@ -31902,6 +32054,7 @@ declare module BABYLON {
|
|
_diffPositionForCollisions: Vector3;
|
|
_diffPositionForCollisions: Vector3;
|
|
_onCollideObserver: Nullable<Observer<AbstractMesh>>;
|
|
_onCollideObserver: Nullable<Observer<AbstractMesh>>;
|
|
_onCollisionPositionChangeObserver: Nullable<Observer<Vector3>>;
|
|
_onCollisionPositionChangeObserver: Nullable<Observer<Vector3>>;
|
|
|
|
+ _collisionResponse: boolean;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -32215,6 +32368,14 @@ declare module BABYLON {
|
|
get collisionMask(): number;
|
|
get collisionMask(): number;
|
|
set collisionMask(mask: number);
|
|
set collisionMask(mask: number);
|
|
/**
|
|
/**
|
|
|
|
+ * Gets or sets a collision response flag (default is true).
|
|
|
|
+ * when collisionResponse is false, events are still triggered but colliding entity has no response
|
|
|
|
+ * This helps creating trigger volume when user wants collision feedback events but not position/velocity
|
|
|
|
+ * to respond to the collision.
|
|
|
|
+ */
|
|
|
|
+ get collisionResponse(): boolean;
|
|
|
|
+ set collisionResponse(response: boolean);
|
|
|
|
+ /**
|
|
* Gets or sets the current collision group mask (-1 by default).
|
|
* Gets or sets the current collision group mask (-1 by default).
|
|
* A collision between A and B will happen if A.collisionGroup & b.collisionMask !== 0
|
|
* A collision between A and B will happen if A.collisionGroup & b.collisionMask !== 0
|
|
*/
|
|
*/
|
|
@@ -33936,12 +34097,14 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
get is2DArray(): boolean;
|
|
get is2DArray(): boolean;
|
|
set is2DArray(value: boolean);
|
|
set is2DArray(value: boolean);
|
|
|
|
+ private _gammaSpace;
|
|
/**
|
|
/**
|
|
* Define if the texture contains data in gamma space (most of the png/jpg aside bump).
|
|
* Define if the texture contains data in gamma space (most of the png/jpg aside bump).
|
|
* HDR texture are usually stored in linear space.
|
|
* HDR texture are usually stored in linear space.
|
|
* This only impacts the PBR and Background materials
|
|
* This only impacts the PBR and Background materials
|
|
*/
|
|
*/
|
|
- gammaSpace: boolean;
|
|
|
|
|
|
+ get gammaSpace(): boolean;
|
|
|
|
+ set gammaSpace(gamma: boolean);
|
|
/**
|
|
/**
|
|
* Gets or sets whether or not the texture contains RGBD data.
|
|
* Gets or sets whether or not the texture contains RGBD data.
|
|
*/
|
|
*/
|
|
@@ -34793,6 +34956,8 @@ declare module BABYLON {
|
|
etc2: any;
|
|
etc2: any;
|
|
/** Defines if astc texture compression is supported */
|
|
/** Defines if astc texture compression is supported */
|
|
astc: any;
|
|
astc: any;
|
|
|
|
+ /** Defines if bptc texture compression is supported */
|
|
|
|
+ bptc: any;
|
|
/** Defines if float textures are supported */
|
|
/** Defines if float textures are supported */
|
|
textureFloat: boolean;
|
|
textureFloat: boolean;
|
|
/** Defines if vertex array objects are supported */
|
|
/** Defines if vertex array objects are supported */
|
|
@@ -36688,6 +36853,8 @@ declare module BABYLON {
|
|
_webGLTexture: Nullable<WebGLTexture>;
|
|
_webGLTexture: Nullable<WebGLTexture>;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_references: number;
|
|
_references: number;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _gammaSpace: Nullable<boolean>;
|
|
private _engine;
|
|
private _engine;
|
|
/**
|
|
/**
|
|
* Gets the Engine the texture belongs to.
|
|
* Gets the Engine the texture belongs to.
|
|
@@ -42031,6 +42198,8 @@ declare module BABYLON {
|
|
* in a given scene.
|
|
* in a given scene.
|
|
*/
|
|
*/
|
|
export class AudioSceneComponent implements ISceneSerializableComponent {
|
|
export class AudioSceneComponent implements ISceneSerializableComponent {
|
|
|
|
+ private static _CameraDirectionLH;
|
|
|
|
+ private static _CameraDirectionRH;
|
|
/**
|
|
/**
|
|
* The component name helpfull to identify the component in the list of scene components.
|
|
* The component name helpfull to identify the component in the list of scene components.
|
|
*/
|
|
*/
|
|
@@ -43397,6 +43566,7 @@ declare module BABYLON {
|
|
private static _OldPivotPoint;
|
|
private static _OldPivotPoint;
|
|
private static _PivotTranslation;
|
|
private static _PivotTranslation;
|
|
private static _PivotTmpVector;
|
|
private static _PivotTmpVector;
|
|
|
|
+ private static _PivotPostMultiplyPivotMatrix;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
static _RemoveAndStorePivotPoint(mesh: AbstractMesh): void;
|
|
static _RemoveAndStorePivotPoint(mesh: AbstractMesh): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
@@ -43587,9 +43757,9 @@ declare module BABYLON {
|
|
* @param startPickedPoint picked point of the pointer to be simulated (Default: attached mesh position)
|
|
* @param startPickedPoint picked point of the pointer to be simulated (Default: attached mesh position)
|
|
*/
|
|
*/
|
|
startDrag(pointerId?: number, fromRay?: Ray, startPickedPoint?: Vector3): void;
|
|
startDrag(pointerId?: number, fromRay?: Ray, startPickedPoint?: Vector3): void;
|
|
- private _startDrag;
|
|
|
|
|
|
+ protected _startDrag(pointerId: number, fromRay?: Ray, startPickedPoint?: Vector3): void;
|
|
private _dragDelta;
|
|
private _dragDelta;
|
|
- private _moveDrag;
|
|
|
|
|
|
+ protected _moveDrag(ray: Ray): void;
|
|
private _pickWithRayOnDragPlane;
|
|
private _pickWithRayOnDragPlane;
|
|
private _pointA;
|
|
private _pointA;
|
|
private _pointC;
|
|
private _pointC;
|
|
@@ -47112,6 +47282,10 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
isCompatible(): boolean;
|
|
isCompatible(): boolean;
|
|
/**
|
|
/**
|
|
|
|
+ * Was this feature disposed;
|
|
|
|
+ */
|
|
|
|
+ isDisposed: boolean;
|
|
|
|
+ /**
|
|
* The name of the native xr feature name, if applicable (like anchor, hit-test, or hand-tracking)
|
|
* The name of the native xr feature name, if applicable (like anchor, hit-test, or hand-tracking)
|
|
*/
|
|
*/
|
|
xrNativeFeatureName?: string;
|
|
xrNativeFeatureName?: string;
|
|
@@ -48667,6 +48841,10 @@ declare module BABYLON {
|
|
private _attached;
|
|
private _attached;
|
|
private _removeOnDetach;
|
|
private _removeOnDetach;
|
|
/**
|
|
/**
|
|
|
|
+ * Is this feature disposed?
|
|
|
|
+ */
|
|
|
|
+ isDisposed: boolean;
|
|
|
|
+ /**
|
|
* Should auto-attach be disabled?
|
|
* Should auto-attach be disabled?
|
|
*/
|
|
*/
|
|
disableAutoAttach: boolean;
|
|
disableAutoAttach: boolean;
|
|
@@ -49382,6 +49560,10 @@ declare module BABYLON {
|
|
* Babylon XR Input class for controller
|
|
* Babylon XR Input class for controller
|
|
*/
|
|
*/
|
|
xrInput: WebXRInput;
|
|
xrInput: WebXRInput;
|
|
|
|
+ /**
|
|
|
|
+ * Meshes that the teleportation ray cannot go through
|
|
|
|
+ */
|
|
|
|
+ pickBlockerMeshes?: AbstractMesh[];
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* This is a teleportation feature to be used with WebXR-enabled motion controllers.
|
|
* This is a teleportation feature to be used with WebXR-enabled motion controllers.
|
|
@@ -49400,6 +49582,7 @@ declare module BABYLON {
|
|
private _teleportationRingMaterial?;
|
|
private _teleportationRingMaterial?;
|
|
private _tmpRay;
|
|
private _tmpRay;
|
|
private _tmpVector;
|
|
private _tmpVector;
|
|
|
|
+ private _tmpQuaternion;
|
|
/**
|
|
/**
|
|
* The module's name
|
|
* The module's name
|
|
*/
|
|
*/
|
|
@@ -49489,7 +49672,7 @@ declare module BABYLON {
|
|
* This is used to remove the selection rays when moving.
|
|
* This is used to remove the selection rays when moving.
|
|
* @param selectionFeature the feature to disable when forward movement is enabled
|
|
* @param selectionFeature the feature to disable when forward movement is enabled
|
|
*/
|
|
*/
|
|
- setSelectionFeature(selectionFeature: IWebXRFeature): void;
|
|
|
|
|
|
+ setSelectionFeature(selectionFeature: Nullable<IWebXRFeature>): void;
|
|
protected _onXRFrame(_xrFrame: XRFrame): void;
|
|
protected _onXRFrame(_xrFrame: XRFrame): void;
|
|
private _attachController;
|
|
private _attachController;
|
|
private _createDefaultTargetMesh;
|
|
private _createDefaultTargetMesh;
|
|
@@ -50356,6 +50539,9 @@ declare module BABYLON {
|
|
private _tempQuaternion;
|
|
private _tempQuaternion;
|
|
private _tempVector;
|
|
private _tempVector;
|
|
private _tempVector2;
|
|
private _tempVector2;
|
|
|
|
+ private _tempMatrix1;
|
|
|
|
+ private _tempMatrix2;
|
|
|
|
+ private _rightHandtoLeftHandMatrix;
|
|
/**
|
|
/**
|
|
* Creates a gizmo
|
|
* Creates a gizmo
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
@@ -50989,6 +51175,8 @@ declare module BABYLON {
|
|
displayOptions: ISkeletonViewerDisplayOptions;
|
|
displayOptions: ISkeletonViewerDisplayOptions;
|
|
/** Flag to toggle if the Viewer should use the CPU for animations or not? */
|
|
/** Flag to toggle if the Viewer should use the CPU for animations or not? */
|
|
computeBonesUsingShaders: boolean;
|
|
computeBonesUsingShaders: boolean;
|
|
|
|
+ /** Flag ignore non weighted bones */
|
|
|
|
+ useAllBones: boolean;
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* Defines how to display the various bone meshes for the viewer.
|
|
* Defines how to display the various bone meshes for the viewer.
|
|
@@ -51005,6 +51193,43 @@ declare module BABYLON {
|
|
/** Ratio for the Sphere Size */
|
|
/** Ratio for the Sphere Size */
|
|
sphereFactor?: number;
|
|
sphereFactor?: number;
|
|
}
|
|
}
|
|
|
|
+ /**
|
|
|
|
+ * Defines the constructor options for the BoneWeight Shader.
|
|
|
|
+ */
|
|
|
|
+ export interface IBoneWeightShaderOptions {
|
|
|
|
+ /** Skeleton to Map */
|
|
|
|
+ skeleton: Skeleton;
|
|
|
|
+ /** Colors for Uninfluenced bones */
|
|
|
|
+ colorBase?: Color3;
|
|
|
|
+ /** Colors for 0.0-0.25 Weight bones */
|
|
|
|
+ colorZero?: Color3;
|
|
|
|
+ /** Color for 0.25-0.5 Weight Influence */
|
|
|
|
+ colorQuarter?: Color3;
|
|
|
|
+ /** Color for 0.5-0.75 Weight Influence */
|
|
|
|
+ colorHalf?: Color3;
|
|
|
|
+ /** Color for 0.75-1 Weight Influence */
|
|
|
|
+ colorFull?: Color3;
|
|
|
|
+ /** Color for Zero Weight Influence */
|
|
|
|
+ targetBoneIndex?: number;
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * Simple structure of the gradient steps for the Color Map.
|
|
|
|
+ */
|
|
|
|
+ export interface ISkeletonMapShaderColorMapKnot {
|
|
|
|
+ /** Color of the Knot */
|
|
|
|
+ color: Color3;
|
|
|
|
+ /** Location of the Knot */
|
|
|
|
+ location: number;
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * Defines the constructor options for the SkeletonMap Shader.
|
|
|
|
+ */
|
|
|
|
+ export interface ISkeletonMapShaderOptions {
|
|
|
|
+ /** Skeleton to Map */
|
|
|
|
+ skeleton: Skeleton;
|
|
|
|
+ /** Array of ColorMapKnots that make the gradient must be ordered with knot[i].location < knot[i+1].location*/
|
|
|
|
+ colorMap?: ISkeletonMapShaderColorMapKnot[];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
@@ -51154,6 +51379,26 @@ declare module BABYLON.Debug {
|
|
static readonly DISPLAY_SPHERES: number;
|
|
static readonly DISPLAY_SPHERES: number;
|
|
/** public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERE_AND_SPURS */
|
|
/** public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERE_AND_SPURS */
|
|
static readonly DISPLAY_SPHERE_AND_SPURS: number;
|
|
static readonly DISPLAY_SPHERE_AND_SPURS: number;
|
|
|
|
+ /** public static method to create a BoneWeight Shader
|
|
|
|
+ * @param options The constructor options
|
|
|
|
+ * @param scene The scene that the shader is scoped to
|
|
|
|
+ * @returns The created ShaderMaterial
|
|
|
|
+ * @see http://www.babylonjs-playground.com/#1BZJVJ#395
|
|
|
|
+ */
|
|
|
|
+ static CreateBoneWeightShader(options: IBoneWeightShaderOptions, scene: Scene): ShaderMaterial;
|
|
|
|
+ /** public static method to create a BoneWeight Shader
|
|
|
|
+ * @param options The constructor options
|
|
|
|
+ * @param scene The scene that the shader is scoped to
|
|
|
|
+ * @returns The created ShaderMaterial
|
|
|
|
+ */
|
|
|
|
+ static CreateSkeletonMapShader(options: ISkeletonMapShaderOptions, scene: Scene): ShaderMaterial;
|
|
|
|
+ /** private static method to create a BoneWeight Shader
|
|
|
|
+ * @param size The size of the buffer to create (usually the bone count)
|
|
|
|
+ * @param colorMap The gradient data to generate
|
|
|
|
+ * @param scene The scene that the shader is scoped to
|
|
|
|
+ * @returns an Array of floats from the color gradient values
|
|
|
|
+ */
|
|
|
|
+ private static _CreateBoneMapColorBuffer;
|
|
/** If SkeletonViewer scene scope. */
|
|
/** If SkeletonViewer scene scope. */
|
|
private _scene;
|
|
private _scene;
|
|
/** Gets or sets the color used to render the skeleton */
|
|
/** Gets or sets the color used to render the skeleton */
|
|
@@ -51183,13 +51428,9 @@ declare module BABYLON.Debug {
|
|
get debugMesh(): Nullable<AbstractMesh> | Nullable<LinesMesh>;
|
|
get debugMesh(): Nullable<AbstractMesh> | Nullable<LinesMesh>;
|
|
/** Sets the debugMesh */
|
|
/** Sets the debugMesh */
|
|
set debugMesh(value: Nullable<AbstractMesh> | Nullable<LinesMesh>);
|
|
set debugMesh(value: Nullable<AbstractMesh> | Nullable<LinesMesh>);
|
|
- /** Gets the material */
|
|
|
|
- get material(): StandardMaterial;
|
|
|
|
- /** Sets the material */
|
|
|
|
- set material(value: StandardMaterial);
|
|
|
|
- /** Gets the material */
|
|
|
|
|
|
+ /** Gets the displayMode */
|
|
get displayMode(): number;
|
|
get displayMode(): number;
|
|
- /** Sets the material */
|
|
|
|
|
|
+ /** Sets the displayMode */
|
|
set displayMode(value: number);
|
|
set displayMode(value: number);
|
|
/**
|
|
/**
|
|
* Creates a new SkeletonViewer
|
|
* Creates a new SkeletonViewer
|
|
@@ -54152,6 +54393,11 @@ declare module BABYLON {
|
|
private _cachedPosition;
|
|
private _cachedPosition;
|
|
private _cachedForward;
|
|
private _cachedForward;
|
|
private _attachedMeshParent;
|
|
private _attachedMeshParent;
|
|
|
|
+ private _pointerObserver;
|
|
|
|
+ /**
|
|
|
|
+ * Event that fires each time the gizmo is clicked
|
|
|
|
+ */
|
|
|
|
+ onClickedObservable: Observable<Light>;
|
|
/**
|
|
/**
|
|
* Creates a LightGizmo
|
|
* Creates a LightGizmo
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
@@ -54195,6 +54441,11 @@ declare module BABYLON {
|
|
private _cameraMesh;
|
|
private _cameraMesh;
|
|
private _cameraLinesMesh;
|
|
private _cameraLinesMesh;
|
|
private _material;
|
|
private _material;
|
|
|
|
+ private _pointerObserver;
|
|
|
|
+ /**
|
|
|
|
+ * Event that fires each time the gizmo is clicked
|
|
|
|
+ */
|
|
|
|
+ onClickedObservable: Observable<Camera>;
|
|
/**
|
|
/**
|
|
* Creates a CameraGizmo
|
|
* Creates a CameraGizmo
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
@@ -57653,16 +57904,60 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
|
|
+ * Helper class to push actions to a pool of workers.
|
|
|
|
+ */
|
|
|
|
+ export class WorkerPool implements IDisposable {
|
|
|
|
+ private _workerInfos;
|
|
|
|
+ private _pendingActions;
|
|
|
|
+ /**
|
|
|
|
+ * Constructor
|
|
|
|
+ * @param workers Array of workers to use for actions
|
|
|
|
+ */
|
|
|
|
+ constructor(workers: Array<Worker>);
|
|
|
|
+ /**
|
|
|
|
+ * Terminates all workers and clears any pending actions.
|
|
|
|
+ */
|
|
|
|
+ dispose(): void;
|
|
|
|
+ /**
|
|
|
|
+ * Pushes an action to the worker pool. If all the workers are active, the action will be
|
|
|
|
+ * pended until a worker has completed its action.
|
|
|
|
+ * @param action The action to perform. Call onComplete when the action is complete.
|
|
|
|
+ */
|
|
|
|
+ push(action: (worker: Worker, onComplete: () => void) => void): void;
|
|
|
|
+ private _execute;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ /**
|
|
* Class for loading KTX2 files
|
|
* Class for loading KTX2 files
|
|
- * !!! Experimental Extension Subject to Changes !!!
|
|
|
|
* @hidden
|
|
* @hidden
|
|
*/
|
|
*/
|
|
export class KhronosTextureContainer2 {
|
|
export class KhronosTextureContainer2 {
|
|
- private static _ModulePromise;
|
|
|
|
- private static _TranscodeFormat;
|
|
|
|
- constructor(engine: ThinEngine);
|
|
|
|
|
|
+ private static _WorkerPoolPromise?;
|
|
|
|
+ private static _Initialized;
|
|
|
|
+ private static _Ktx2Decoder;
|
|
|
|
+ /**
|
|
|
|
+ * URL to use when loading the KTX2 decoder module
|
|
|
|
+ */
|
|
|
|
+ static JSModuleURL: string;
|
|
|
|
+ /**
|
|
|
|
+ * Default number of workers used to handle data decoding
|
|
|
|
+ */
|
|
|
|
+ static DefaultNumWorkers: number;
|
|
|
|
+ private static GetDefaultNumWorkers;
|
|
|
|
+ private _engine;
|
|
|
|
+ private static _CreateWorkerPool;
|
|
|
|
+ /**
|
|
|
|
+ * Constructor
|
|
|
|
+ * @param numWorkers The number of workers for async operations. Specify `0` to disable web workers and run synchronously in the current context.
|
|
|
|
+ */
|
|
|
|
+ constructor(engine: ThinEngine, numWorkers?: number);
|
|
uploadAsync(data: ArrayBufferView, internalTexture: InternalTexture): Promise<void>;
|
|
uploadAsync(data: ArrayBufferView, internalTexture: InternalTexture): Promise<void>;
|
|
- private _determineTranscodeFormat;
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Stop all async operations and release resources.
|
|
|
|
+ */
|
|
|
|
+ dispose(): void;
|
|
|
|
+ protected _createTexture(data: any, internalTexture: InternalTexture): void;
|
|
/**
|
|
/**
|
|
* Checks if the given data starts with a KTX2 file identifier.
|
|
* Checks if the given data starts with a KTX2 file identifier.
|
|
* @param data the data to check
|
|
* @param data the data to check
|
|
@@ -57670,6 +57965,7 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
static IsValid(data: ArrayBufferView): boolean;
|
|
static IsValid(data: ArrayBufferView): boolean;
|
|
}
|
|
}
|
|
|
|
+ export function workerFunc(): void;
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
@@ -61985,7 +62281,8 @@ declare module BABYLON {
|
|
* Class used to generate noise procedural textures
|
|
* Class used to generate noise procedural textures
|
|
*/
|
|
*/
|
|
export class NoiseProceduralTexture extends ProceduralTexture {
|
|
export class NoiseProceduralTexture extends ProceduralTexture {
|
|
- private _time;
|
|
|
|
|
|
+ /** Gets or sets the start time (default is 0) */
|
|
|
|
+ time: number;
|
|
/** Gets or sets a value between 0 and 1 indicating the overall brightness of the texture (default is 0.2) */
|
|
/** Gets or sets a value between 0 and 1 indicating the overall brightness of the texture (default is 0.2) */
|
|
brightness: number;
|
|
brightness: number;
|
|
/** Defines the number of octaves to process */
|
|
/** Defines the number of octaves to process */
|
|
@@ -62984,80 +63281,6 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
- * Operations supported by the Trigonometry block
|
|
|
|
- */
|
|
|
|
- export enum TrigonometryBlockOperations {
|
|
|
|
- /** Cos */
|
|
|
|
- Cos = 0,
|
|
|
|
- /** Sin */
|
|
|
|
- Sin = 1,
|
|
|
|
- /** Abs */
|
|
|
|
- Abs = 2,
|
|
|
|
- /** Exp */
|
|
|
|
- Exp = 3,
|
|
|
|
- /** Exp2 */
|
|
|
|
- Exp2 = 4,
|
|
|
|
- /** Round */
|
|
|
|
- Round = 5,
|
|
|
|
- /** Floor */
|
|
|
|
- Floor = 6,
|
|
|
|
- /** Ceiling */
|
|
|
|
- Ceiling = 7,
|
|
|
|
- /** Square root */
|
|
|
|
- Sqrt = 8,
|
|
|
|
- /** Log */
|
|
|
|
- Log = 9,
|
|
|
|
- /** Tangent */
|
|
|
|
- Tan = 10,
|
|
|
|
- /** Arc tangent */
|
|
|
|
- ArcTan = 11,
|
|
|
|
- /** Arc cosinus */
|
|
|
|
- ArcCos = 12,
|
|
|
|
- /** Arc sinus */
|
|
|
|
- ArcSin = 13,
|
|
|
|
- /** Fraction */
|
|
|
|
- Fract = 14,
|
|
|
|
- /** Sign */
|
|
|
|
- Sign = 15,
|
|
|
|
- /** To radians (from degrees) */
|
|
|
|
- Radians = 16,
|
|
|
|
- /** To degrees (from radians) */
|
|
|
|
- Degrees = 17
|
|
|
|
- }
|
|
|
|
- /**
|
|
|
|
- * Block used to apply trigonometry operation to floats
|
|
|
|
- */
|
|
|
|
- export class TrigonometryBlock extends NodeMaterialBlock {
|
|
|
|
- /**
|
|
|
|
- * Gets or sets the operation applied by the block
|
|
|
|
- */
|
|
|
|
- operation: TrigonometryBlockOperations;
|
|
|
|
- /**
|
|
|
|
- * Creates a new TrigonometryBlock
|
|
|
|
- * @param name defines the block name
|
|
|
|
- */
|
|
|
|
- constructor(name: string);
|
|
|
|
- /**
|
|
|
|
- * Gets the current class name
|
|
|
|
- * @returns the class name
|
|
|
|
- */
|
|
|
|
- getClassName(): string;
|
|
|
|
- /**
|
|
|
|
- * Gets the input component
|
|
|
|
- */
|
|
|
|
- get input(): NodeMaterialConnectionPoint;
|
|
|
|
- /**
|
|
|
|
- * Gets the output component
|
|
|
|
- */
|
|
|
|
- get output(): NodeMaterialConnectionPoint;
|
|
|
|
- protected _buildBlock(state: NodeMaterialBuildState): this;
|
|
|
|
- serialize(): any;
|
|
|
|
- _deserialize(serializationObject: any, scene: Scene, rootUrl: string): void;
|
|
|
|
- protected _dumpPropertiesCode(): string;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-declare module BABYLON {
|
|
|
|
- /**
|
|
|
|
* Block used to create a Color3/4 out of individual inputs (one for each component)
|
|
* Block used to create a Color3/4 out of individual inputs (one for each component)
|
|
*/
|
|
*/
|
|
export class ColorMergerBlock extends NodeMaterialBlock {
|
|
export class ColorMergerBlock extends NodeMaterialBlock {
|
|
@@ -63788,28 +64011,30 @@ declare module BABYLON {
|
|
* Class used to store a color step for the GradientBlock
|
|
* Class used to store a color step for the GradientBlock
|
|
*/
|
|
*/
|
|
export class GradientBlockColorStep {
|
|
export class GradientBlockColorStep {
|
|
|
|
+ private _step;
|
|
/**
|
|
/**
|
|
- * Gets or sets a value indicating which step this color is associated with (between 0 and 1)
|
|
|
|
|
|
+ * Gets value indicating which step this color is associated with (between 0 and 1)
|
|
*/
|
|
*/
|
|
- step: number;
|
|
|
|
|
|
+ get step(): number;
|
|
/**
|
|
/**
|
|
- * Gets or sets the color associated with this step
|
|
|
|
- */
|
|
|
|
- color: Color3;
|
|
|
|
|
|
+ * Sets a value indicating which step this color is associated with (between 0 and 1)
|
|
|
|
+ */
|
|
|
|
+ set step(val: number);
|
|
|
|
+ private _color;
|
|
/**
|
|
/**
|
|
- * Creates a new GradientBlockColorStep
|
|
|
|
- * @param step defines a value indicating which step this color is associated with (between 0 and 1)
|
|
|
|
- * @param color defines the color associated with this step
|
|
|
|
|
|
+ * Gets the color associated with this step
|
|
*/
|
|
*/
|
|
- constructor(
|
|
|
|
|
|
+ get color(): Color3;
|
|
/**
|
|
/**
|
|
- * Gets or sets a value indicating which step this color is associated with (between 0 and 1)
|
|
|
|
|
|
+ * Sets the color associated with this step
|
|
*/
|
|
*/
|
|
- step: number,
|
|
|
|
|
|
+ set color(val: Color3);
|
|
/**
|
|
/**
|
|
- * Gets or sets the color associated with this step
|
|
|
|
|
|
+ * Creates a new GradientBlockColorStep
|
|
|
|
+ * @param step defines a value indicating which step this color is associated with (between 0 and 1)
|
|
|
|
+ * @param color defines the color associated with this step
|
|
*/
|
|
*/
|
|
- color: Color3);
|
|
|
|
|
|
+ constructor(step: number, color: Color3);
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* Block used to return a color from a gradient based on an input value between 0 and 1
|
|
* Block used to return a color from a gradient based on an input value between 0 and 1
|
|
@@ -63819,6 +64044,10 @@ declare module BABYLON {
|
|
* Gets or sets the list of color steps
|
|
* Gets or sets the list of color steps
|
|
*/
|
|
*/
|
|
colorSteps: GradientBlockColorStep[];
|
|
colorSteps: GradientBlockColorStep[];
|
|
|
|
+ /** Gets an observable raised when the value is changed */
|
|
|
|
+ onValueChangedObservable: Observable<GradientBlock>;
|
|
|
|
+ /** calls observable when the value is changed*/
|
|
|
|
+ colorStepsUpdated(): void;
|
|
/**
|
|
/**
|
|
* Creates a new GradientBlock
|
|
* Creates a new GradientBlock
|
|
* @param name defines the block name
|
|
* @param name defines the block name
|
|
@@ -64912,31 +65141,6 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
- * Helper class to push actions to a pool of workers.
|
|
|
|
- */
|
|
|
|
- export class WorkerPool implements IDisposable {
|
|
|
|
- private _workerInfos;
|
|
|
|
- private _pendingActions;
|
|
|
|
- /**
|
|
|
|
- * Constructor
|
|
|
|
- * @param workers Array of workers to use for actions
|
|
|
|
- */
|
|
|
|
- constructor(workers: Array<Worker>);
|
|
|
|
- /**
|
|
|
|
- * Terminates all workers and clears any pending actions.
|
|
|
|
- */
|
|
|
|
- dispose(): void;
|
|
|
|
- /**
|
|
|
|
- * Pushes an action to the worker pool. If all the workers are active, the action will be
|
|
|
|
- * pended until a worker has completed its action.
|
|
|
|
- * @param action The action to perform. Call onComplete when the action is complete.
|
|
|
|
- */
|
|
|
|
- push(action: (worker: Worker, onComplete: () => void) => void): void;
|
|
|
|
- private _execute;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-declare module BABYLON {
|
|
|
|
- /**
|
|
|
|
* Configuration for Draco compression
|
|
* Configuration for Draco compression
|
|
*/
|
|
*/
|
|
export interface IDracoCompressionConfiguration {
|
|
export interface IDracoCompressionConfiguration {
|
|
@@ -66345,6 +66549,15 @@ declare module BABYLON {
|
|
size?: Vector3;
|
|
size?: Vector3;
|
|
angle?: number;
|
|
angle?: number;
|
|
}): Mesh;
|
|
}): Mesh;
|
|
|
|
+ /**
|
|
|
|
+ * Creates a Capsule Mesh
|
|
|
|
+ * @param name defines the name of the mesh.
|
|
|
|
+ * @param options the constructors options used to shape the mesh.
|
|
|
|
+ * @param scene defines the scene the mesh is scoped to.
|
|
|
|
+ * @returns the capsule mesh
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/capsule_shape
|
|
|
|
+ */
|
|
|
|
+ static CreateCapsule(name: string, options?: ICreateCapsuleOptions, scene?: Nullable<Scene>): Mesh;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -66635,6 +66848,14 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
thinInstanceBufferUpdated(kind: string): void;
|
|
thinInstanceBufferUpdated(kind: string): void;
|
|
/**
|
|
/**
|
|
|
|
+ * Applies a partial update to a buffer directly on the GPU
|
|
|
|
+ * Note that the buffer located on the CPU is NOT updated! It's up to you to update it (or not) with the same data you pass to this method
|
|
|
|
+ * @param kind name of the attribute to update. Use "matrix" to update the buffer of matrices
|
|
|
|
+ * @param data the data to set in the GPU buffer
|
|
|
|
+ * @param offset the offset in the GPU buffer where to update the data
|
|
|
|
+ */
|
|
|
|
+ thinInstancePartialBufferUpdate(kind: string, data: Float32Array, offset: number): void;
|
|
|
|
+ /**
|
|
* Refreshes the bounding info, taking into account all the thin instances defined
|
|
* Refreshes the bounding info, taking into account all the thin instances defined
|
|
* @param forceRefreshParentInfo true to force recomputing the mesh bounding info and use it to compute the aggregated bounding info
|
|
* @param forceRefreshParentInfo true to force recomputing the mesh bounding info and use it to compute the aggregated bounding info
|
|
*/
|
|
*/
|
|
@@ -74339,6 +74560,7 @@ declare module BABYLON {
|
|
autoCloneTransformation: boolean;
|
|
autoCloneTransformation: boolean;
|
|
/**
|
|
/**
|
|
* Triggered when new babylon (transformed) hit test results are available
|
|
* Triggered when new babylon (transformed) hit test results are available
|
|
|
|
+ * Note - this will be called when results come back from the device. It can be an empty array!!
|
|
*/
|
|
*/
|
|
onHitTestResultObservable: Observable<IWebXRHitResult[]>;
|
|
onHitTestResultObservable: Observable<IWebXRHitResult[]>;
|
|
/**
|
|
/**
|
|
@@ -75002,14 +75224,14 @@ declare module BABYLON {
|
|
/**
|
|
/**
|
|
* Hand-parts definition (key is HandPart)
|
|
* Hand-parts definition (key is HandPart)
|
|
*/
|
|
*/
|
|
- static HandPartsDefinition: {
|
|
|
|
|
|
+ handPartsDefinition: {
|
|
[key: string]: number[];
|
|
[key: string]: number[];
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
* Populate the HandPartsDefinition object.
|
|
* Populate the HandPartsDefinition object.
|
|
* This is called as a side effect since certain browsers don't have XRHand defined.
|
|
* This is called as a side effect since certain browsers don't have XRHand defined.
|
|
*/
|
|
*/
|
|
- static _PopulateHandPartsDefinition(): void;
|
|
|
|
|
|
+ private generateHandPartsDefinition;
|
|
/**
|
|
/**
|
|
* Construct a new hand object
|
|
* Construct a new hand object
|
|
* @param xrController the controller to which the hand correlates
|
|
* @param xrController the controller to which the hand correlates
|
|
@@ -76055,39 +76277,43 @@ interface XRJointPose extends XRPose {
|
|
radius: number | undefined;
|
|
radius: number | undefined;
|
|
}
|
|
}
|
|
|
|
|
|
-declare class XRHand extends Array<XRJointSpace> {
|
|
|
|
|
|
+interface XRHand /*extends Iterablele<XRJointSpace>*/ {
|
|
readonly length: number;
|
|
readonly length: number;
|
|
|
|
|
|
- static readonly WRIST = 0;
|
|
|
|
|
|
+ [index: number]: XRJointSpace;
|
|
|
|
+
|
|
|
|
+ // Specs have the function 'joint(idx: number)', but chrome doesn't support it yet.
|
|
|
|
+
|
|
|
|
+ readonly WRIST: number;
|
|
|
|
|
|
- static readonly THUMB_METACARPAL = 1;
|
|
|
|
- static readonly THUMB_PHALANX_PROXIMAL = 2;
|
|
|
|
- static readonly THUMB_PHALANX_DISTAL = 3;
|
|
|
|
- static readonly THUMB_PHALANX_TIP = 4;
|
|
|
|
|
|
+ readonly THUMB_METACARPAL: number;
|
|
|
|
+ readonly THUMB_PHALANX_PROXIMAL: number;
|
|
|
|
+ readonly THUMB_PHALANX_DISTAL: number;
|
|
|
|
+ readonly THUMB_PHALANX_TIP: number;
|
|
|
|
|
|
- static readonly INDEX_METACARPAL = 5;
|
|
|
|
- static readonly INDEX_PHALANX_PROXIMAL = 6;
|
|
|
|
- static readonly INDEX_PHALANX_INTERMEDIATE = 7;
|
|
|
|
- static readonly INDEX_PHALANX_DISTAL = 8;
|
|
|
|
- static readonly INDEX_PHALANX_TIP = 9;
|
|
|
|
|
|
+ readonly INDEX_METACARPAL: number;
|
|
|
|
+ readonly INDEX_PHALANX_PROXIMAL: number;
|
|
|
|
+ readonly INDEX_PHALANX_INTERMEDIATE: number;
|
|
|
|
+ readonly INDEX_PHALANX_DISTAL: number;
|
|
|
|
+ readonly INDEX_PHALANX_TIP: number;
|
|
|
|
|
|
- static readonly MIDDLE_METACARPAL = 10;
|
|
|
|
- static readonly MIDDLE_PHALANX_PROXIMAL = 11;
|
|
|
|
- static readonly MIDDLE_PHALANX_INTERMEDIATE = 12;
|
|
|
|
- static readonly MIDDLE_PHALANX_DISTAL = 13;
|
|
|
|
- static readonly MIDDLE_PHALANX_TIP = 14;
|
|
|
|
|
|
+ readonly MIDDLE_METACARPAL: number;
|
|
|
|
+ readonly MIDDLE_PHALANX_PROXIMAL: number;
|
|
|
|
+ readonly MIDDLE_PHALANX_INTERMEDIATE: number;
|
|
|
|
+ readonly MIDDLE_PHALANX_DISTAL: number;
|
|
|
|
+ readonly MIDDLE_PHALANX_TIP: number;
|
|
|
|
|
|
- static readonly RING_METACARPAL = 15;
|
|
|
|
- static readonly RING_PHALANX_PROXIMAL = 16;
|
|
|
|
- static readonly RING_PHALANX_INTERMEDIATE = 17;
|
|
|
|
- static readonly RING_PHALANX_DISTAL = 18;
|
|
|
|
- static readonly RING_PHALANX_TIP = 19;
|
|
|
|
|
|
+ readonly RING_METACARPAL: number;
|
|
|
|
+ readonly RING_PHALANX_PROXIMAL: number;
|
|
|
|
+ readonly RING_PHALANX_INTERMEDIATE: number;
|
|
|
|
+ readonly RING_PHALANX_DISTAL: number;
|
|
|
|
+ readonly RING_PHALANX_TIP: number;
|
|
|
|
|
|
- static readonly LITTLE_METACARPAL = 20;
|
|
|
|
- static readonly LITTLE_PHALANX_PROXIMAL = 21;
|
|
|
|
- static readonly LITTLE_PHALANX_INTERMEDIATE = 22;
|
|
|
|
- static readonly LITTLE_PHALANX_DISTAL = 23;
|
|
|
|
- static readonly LITTLE_PHALANX_TIP = 24;
|
|
|
|
|
|
+ readonly LITTLE_METACARPAL: number;
|
|
|
|
+ readonly LITTLE_PHALANX_PROXIMAL: number;
|
|
|
|
+ readonly LITTLE_PHALANX_INTERMEDIATE: number;
|
|
|
|
+ readonly LITTLE_PHALANX_DISTAL: number;
|
|
|
|
+ readonly LITTLE_PHALANX_TIP: number;
|
|
}
|
|
}
|
|
|
|
|
|
// This file contains native only extensions for WebXR These APIs are not supported in the browser yet.
|
|
// This file contains native only extensions for WebXR These APIs are not supported in the browser yet.
|