|
@@ -17787,6 +17787,8 @@ declare module "babylonjs/Lights/Shadows/shadowGenerator" {
|
|
|
* Interface to implement to create a shadow generator compatible with BJS.
|
|
|
*/
|
|
|
export interface IShadowGenerator {
|
|
|
+ /** Gets or set the id of the shadow generator. It will be the one from the light if not defined */
|
|
|
+ id: string;
|
|
|
/**
|
|
|
* Gets the main RTT containing the shadow map (usually storing depth from the light point of view).
|
|
|
* @returns The render target texture if present otherwise, null
|
|
@@ -17931,6 +17933,8 @@ declare module "babylonjs/Lights/Shadows/shadowGenerator" {
|
|
|
* Execute PCSS with 16 taps blocker search and 16 taps PCF.
|
|
|
*/
|
|
|
static readonly QUALITY_LOW: number;
|
|
|
+ /** Gets or set the id of the shadow generator. It will be the one from the light if not defined */
|
|
|
+ id: string;
|
|
|
/** Gets or sets the custom shader name to use */
|
|
|
customShaderOptions: ICustomShaderOptions;
|
|
|
/**
|
|
@@ -52755,6 +52759,173 @@ declare module "babylonjs/Debug/rayHelper" {
|
|
|
dispose(): void;
|
|
|
}
|
|
|
}
|
|
|
+declare module "babylonjs/Debug/ISkeletonViewer" {
|
|
|
+ /**
|
|
|
+ * Defines the options associated with the creation of a SkeletonViewer.
|
|
|
+ */
|
|
|
+ export interface ISkeletonViewerOptions {
|
|
|
+ /** Should the system pause animations before building the Viewer? */
|
|
|
+ pauseAnimations: boolean;
|
|
|
+ /** Should the system return the skeleton to rest before building? */
|
|
|
+ returnToRest: boolean;
|
|
|
+ /** public Display Mode of the Viewer */
|
|
|
+ displayMode: number;
|
|
|
+ /** Flag to toggle if the Viewer should use the CPU for animations or not? */
|
|
|
+ displayOptions: ISkeletonViewerDisplayOptions;
|
|
|
+ /** Flag to toggle if the Viewer should use the CPU for animations or not? */
|
|
|
+ computeBonesUsingShaders: boolean;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * Defines how to display the various bone meshes for the viewer.
|
|
|
+ */
|
|
|
+ export interface ISkeletonViewerDisplayOptions {
|
|
|
+ /** How far down to start tapering the bone spurs */
|
|
|
+ midStep?: number;
|
|
|
+ /** How big is the midStep? */
|
|
|
+ midStepFactor?: number;
|
|
|
+ /** Base for the Sphere Size */
|
|
|
+ sphereBaseSize?: number;
|
|
|
+ /** The ratio of the sphere to the longest bone in units */
|
|
|
+ sphereScaleUnit?: number;
|
|
|
+ /** Ratio for the Sphere Size */
|
|
|
+ sphereFactor?: number;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module "babylonjs/Meshes/Builders/ribbonBuilder" {
|
|
|
+ import { Nullable } from "babylonjs/types";
|
|
|
+ import { Scene } from "babylonjs/scene";
|
|
|
+ import { Vector3, Vector2, Vector4 } from "babylonjs/Maths/math.vector";
|
|
|
+ import { Color4 } from "babylonjs/Maths/math.color";
|
|
|
+ import { Mesh } from "babylonjs/Meshes/mesh";
|
|
|
+ /**
|
|
|
+ * Class containing static functions to help procedurally build meshes
|
|
|
+ */
|
|
|
+ export class RibbonBuilder {
|
|
|
+ /**
|
|
|
+ * Creates a ribbon mesh. The ribbon is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters
|
|
|
+ * * The parameter `pathArray` is a required array of paths, what are each an array of successive Vector3. The pathArray parameter depicts the ribbon geometry
|
|
|
+ * * The parameter `closeArray` (boolean, default false) creates a seam between the first and the last paths of the path array
|
|
|
+ * * The parameter `closePath` (boolean, default false) creates a seam between the first and the last points of each path of the path array
|
|
|
+ * * The parameter `offset` (positive integer, default : rounded half size of the pathArray length), is taken in account only if the `pathArray` is containing a single path
|
|
|
+ * * It's the offset to join the points from the same path. Ex : offset = 10 means the point 1 is joined to the point 11
|
|
|
+ * * The optional parameter `instance` is an instance of an existing Ribbon object to be updated with the passed `pathArray` parameter : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#ribbon
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
+ * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
|
|
|
+ * * The parameter `uvs` is an optional flat array of `Vector2` to update/set each ribbon vertex with its own custom UV values instead of the computed ones
|
|
|
+ * * The parameters `colors` is an optional flat array of `Color4` to set/update each ribbon vertex with its own custom color values
|
|
|
+ * * Note that if you use the parameters `uvs` or `colors`, the passed arrays must be populated with the right number of elements, it is to say the number of ribbon vertices. Remember that if you set `closePath` to `true`, there's one extra vertex per path in the geometry
|
|
|
+ * * Moreover, you can use the parameter `color` with `instance` (to update the ribbon), only if you previously used it at creation time
|
|
|
+ * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
|
+ * @param name defines the name of the mesh
|
|
|
+ * @param options defines the options used to create the mesh
|
|
|
+ * @param scene defines the hosting scene
|
|
|
+ * @returns the ribbon mesh
|
|
|
+ * @see https://doc.babylonjs.com/how_to/ribbon_tutorial
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes
|
|
|
+ */
|
|
|
+ static CreateRibbon(name: string, options: {
|
|
|
+ pathArray: Vector3[][];
|
|
|
+ closeArray?: boolean;
|
|
|
+ closePath?: boolean;
|
|
|
+ offset?: number;
|
|
|
+ updatable?: boolean;
|
|
|
+ sideOrientation?: number;
|
|
|
+ frontUVs?: Vector4;
|
|
|
+ backUVs?: Vector4;
|
|
|
+ instance?: Mesh;
|
|
|
+ invertUV?: boolean;
|
|
|
+ uvs?: Vector2[];
|
|
|
+ colors?: Color4[];
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module "babylonjs/Meshes/Builders/shapeBuilder" {
|
|
|
+ import { Nullable } from "babylonjs/types";
|
|
|
+ import { Scene } from "babylonjs/scene";
|
|
|
+ import { Vector3, Vector4 } from "babylonjs/Maths/math.vector";
|
|
|
+ import { Mesh } from "babylonjs/Meshes/mesh";
|
|
|
+ /**
|
|
|
+ * Class containing static functions to help procedurally build meshes
|
|
|
+ */
|
|
|
+ export class ShapeBuilder {
|
|
|
+ /**
|
|
|
+ * Creates an extruded shape mesh. The extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.
|
|
|
+ * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.
|
|
|
+ * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.
|
|
|
+ * * The parameter `rotation` (float, default 0 radians) is the angle value to rotate the shape each step (each path point), from the former step (so rotation added each step) along the curve.
|
|
|
+ * * The parameter `scale` (float, default 1) is the value to scale the shape.
|
|
|
+ * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL
|
|
|
+ * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#extruded-shape
|
|
|
+ * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape.
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
+ * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture.
|
|
|
+ * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
|
|
|
+ * @param name defines the name of the mesh
|
|
|
+ * @param options defines the options used to create the mesh
|
|
|
+ * @param scene defines the hosting scene
|
|
|
+ * @returns the extruded shape mesh
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes
|
|
|
+ */
|
|
|
+ static ExtrudeShape(name: string, options: {
|
|
|
+ shape: Vector3[];
|
|
|
+ path: Vector3[];
|
|
|
+ scale?: number;
|
|
|
+ rotation?: number;
|
|
|
+ cap?: number;
|
|
|
+ updatable?: boolean;
|
|
|
+ sideOrientation?: number;
|
|
|
+ frontUVs?: Vector4;
|
|
|
+ backUVs?: Vector4;
|
|
|
+ instance?: Mesh;
|
|
|
+ invertUV?: boolean;
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
|
+ /**
|
|
|
+ * Creates an custom extruded shape mesh.
|
|
|
+ * The custom extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.
|
|
|
+ * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.
|
|
|
+ * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.
|
|
|
+ * * The parameter `rotationFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the begining of the path
|
|
|
+ * * It must returns a float value that will be the rotation in radians applied to the shape on each path point.
|
|
|
+ * * The parameter `scaleFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the begining of the path
|
|
|
+ * * It must returns a float value that will be the scale value applied to the shape on each path point
|
|
|
+ * * The parameter `ribbonClosePath` (boolean, default false) forces the extrusion underlying ribbon to close all the paths in its `pathArray`
|
|
|
+ * * The parameter `ribbonCloseArray` (boolean, default false) forces the extrusion underlying ribbon to close its `pathArray`
|
|
|
+ * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL
|
|
|
+ * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#extruded-shape
|
|
|
+ * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
+ * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
|
|
|
+ * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
|
+ * @param name defines the name of the mesh
|
|
|
+ * @param options defines the options used to create the mesh
|
|
|
+ * @param scene defines the hosting scene
|
|
|
+ * @returns the custom extruded shape mesh
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes#custom-extruded-shapes
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes
|
|
|
+ */
|
|
|
+ static ExtrudeShapeCustom(name: string, options: {
|
|
|
+ shape: Vector3[];
|
|
|
+ path: Vector3[];
|
|
|
+ scaleFunction?: any;
|
|
|
+ rotationFunction?: any;
|
|
|
+ ribbonCloseArray?: boolean;
|
|
|
+ ribbonClosePath?: boolean;
|
|
|
+ cap?: number;
|
|
|
+ updatable?: boolean;
|
|
|
+ sideOrientation?: number;
|
|
|
+ frontUVs?: Vector4;
|
|
|
+ backUVs?: Vector4;
|
|
|
+ instance?: Mesh;
|
|
|
+ invertUV?: boolean;
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
|
+ private static _ExtrudeShapeGeneric;
|
|
|
+ }
|
|
|
+}
|
|
|
declare module "babylonjs/Debug/skeletonViewer" {
|
|
|
import { Color3 } from "babylonjs/Maths/math.color";
|
|
|
import { Scene } from "babylonjs/scene";
|
|
@@ -52762,10 +52933,13 @@ declare module "babylonjs/Debug/skeletonViewer" {
|
|
|
import { Skeleton } from "babylonjs/Bones/skeleton";
|
|
|
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
|
import { LinesMesh } from "babylonjs/Meshes/linesMesh";
|
|
|
+ import { UtilityLayerRenderer } from "babylonjs/Rendering/utilityLayerRenderer";
|
|
|
+ import { StandardMaterial } from "babylonjs/Materials/standardMaterial";
|
|
|
+ import { ISkeletonViewerOptions } from "babylonjs/Debug/ISkeletonViewer";
|
|
|
/**
|
|
|
- * Class used to render a debug view of a given skeleton
|
|
|
- * @see http://www.babylonjs-playground.com/#1BZJVJ#8
|
|
|
- */
|
|
|
+ * Class used to render a debug view of a given skeleton
|
|
|
+ * @see http://www.babylonjs-playground.com/#1BZJVJ#8
|
|
|
+ */
|
|
|
export class SkeletonViewer {
|
|
|
/** defines the skeleton to render */
|
|
|
skeleton: Skeleton;
|
|
@@ -52775,18 +52949,46 @@ declare module "babylonjs/Debug/skeletonViewer" {
|
|
|
autoUpdateBonesMatrices: boolean;
|
|
|
/** defines the rendering group id to use with the viewer */
|
|
|
renderingGroupId: number;
|
|
|
+ /** is the options for the viewer */
|
|
|
+ options: Partial<ISkeletonViewerOptions>;
|
|
|
+ /** public Display constants BABYLON.SkeletonViewer.DISPLAY_LINES */
|
|
|
+ static readonly DISPLAY_LINES: number;
|
|
|
+ /** public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERES */
|
|
|
+ static readonly DISPLAY_SPHERES: number;
|
|
|
+ /** public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERE_AND_SPURS */
|
|
|
+ static readonly DISPLAY_SPHERE_AND_SPURS: number;
|
|
|
+ /** If SkeletonViewer scene scope. */
|
|
|
+ private _scene;
|
|
|
/** Gets or sets the color used to render the skeleton */
|
|
|
color: Color3;
|
|
|
- private _scene;
|
|
|
+ /** Array of the points of the skeleton fo the line view. */
|
|
|
private _debugLines;
|
|
|
+ /** The SkeletonViewers Mesh. */
|
|
|
private _debugMesh;
|
|
|
+ /** If SkeletonViewer is enabled. */
|
|
|
private _isEnabled;
|
|
|
- private _renderFunction;
|
|
|
+ /** If SkeletonViewer is ready. */
|
|
|
+ private _ready;
|
|
|
+ /** SkeletonViewer render observable. */
|
|
|
+ private _obs;
|
|
|
+ /** The Utility Layer to render the gizmos in. */
|
|
|
private _utilityLayer;
|
|
|
- /**
|
|
|
- * Returns the mesh used to render the bones
|
|
|
- */
|
|
|
- get debugMesh(): Nullable<LinesMesh>;
|
|
|
+ /** Gets the Scene. */
|
|
|
+ get scene(): Scene;
|
|
|
+ /** Gets the utilityLayer. */
|
|
|
+ get utilityLayer(): Nullable<UtilityLayerRenderer>;
|
|
|
+ /** Checks Ready Status. */
|
|
|
+ get isReady(): Boolean;
|
|
|
+ /** Sets Ready Status. */
|
|
|
+ set ready(value: boolean);
|
|
|
+ /** Gets the debugMesh */
|
|
|
+ get debugMesh(): Nullable<AbstractMesh> | Nullable<LinesMesh>;
|
|
|
+ /** Sets the debugMesh */
|
|
|
+ set debugMesh(value: Nullable<AbstractMesh> | Nullable<LinesMesh>);
|
|
|
+ /** Gets the material */
|
|
|
+ get material(): StandardMaterial;
|
|
|
+ /** Sets the material */
|
|
|
+ set material(value: StandardMaterial);
|
|
|
/**
|
|
|
* Creates a new SkeletonViewer
|
|
|
* @param skeleton defines the skeleton to render
|
|
@@ -52794,24 +52996,37 @@ declare module "babylonjs/Debug/skeletonViewer" {
|
|
|
* @param scene defines the hosting scene
|
|
|
* @param autoUpdateBonesMatrices defines a boolean indicating if bones matrices must be forced to update before rendering (true by default)
|
|
|
* @param renderingGroupId defines the rendering group id to use with the viewer
|
|
|
+ * @param options All of the extra constructor options for the SkeletonViewer
|
|
|
*/
|
|
|
constructor(
|
|
|
/** defines the skeleton to render */
|
|
|
skeleton: Skeleton,
|
|
|
/** defines the mesh attached to the skeleton */
|
|
|
- mesh: AbstractMesh, scene: Scene,
|
|
|
+ mesh: AbstractMesh,
|
|
|
+ /** The Scene scope*/
|
|
|
+ scene: Scene,
|
|
|
/** defines a boolean indicating if bones matrices must be forced to update before rendering (true by default) */
|
|
|
autoUpdateBonesMatrices?: boolean,
|
|
|
/** defines the rendering group id to use with the viewer */
|
|
|
- renderingGroupId?: number);
|
|
|
+ renderingGroupId?: number,
|
|
|
+ /** is the options for the viewer */
|
|
|
+ options?: Partial<ISkeletonViewerOptions>);
|
|
|
+ /** The Dynamic bindings for the update functions */
|
|
|
+ private _bindObs;
|
|
|
+ /** Update the viewer to sync with current skeleton state, only used to manually update. */
|
|
|
+ update(): void;
|
|
|
/** Gets or sets a boolean indicating if the viewer is enabled */
|
|
|
set isEnabled(value: boolean);
|
|
|
get isEnabled(): boolean;
|
|
|
private _getBonePosition;
|
|
|
private _getLinesForBonesWithLength;
|
|
|
private _getLinesForBonesNoLength;
|
|
|
- /** Update the viewer to sync with current skeleton state */
|
|
|
- update(): void;
|
|
|
+ /** function to revert the mesh and scene back to the initial state. */
|
|
|
+ private _revert;
|
|
|
+ /** function to build and bind sphere joint points and spur bone representations. */
|
|
|
+ private _buildSpheresAndSpurs;
|
|
|
+ /** Update the viewer to sync with current skeleton state, only used for the line display. */
|
|
|
+ private _displayLinesUpdate;
|
|
|
/** Release associated resources */
|
|
|
dispose(): void;
|
|
|
}
|
|
@@ -52823,6 +53038,7 @@ declare module "babylonjs/Debug/index" {
|
|
|
export * from "babylonjs/Debug/physicsViewer";
|
|
|
export * from "babylonjs/Debug/rayHelper";
|
|
|
export * from "babylonjs/Debug/skeletonViewer";
|
|
|
+ export * from "babylonjs/Debug/ISkeletonViewer";
|
|
|
}
|
|
|
declare module "babylonjs/DeviceInput/InputDevices/deviceEnums" {
|
|
|
/**
|
|
@@ -62857,141 +63073,6 @@ declare module "babylonjs/Physics/Plugins/oimoJSPlugin" {
|
|
|
raycast(from: Vector3, to: Vector3): PhysicsRaycastResult;
|
|
|
}
|
|
|
}
|
|
|
-declare module "babylonjs/Meshes/Builders/ribbonBuilder" {
|
|
|
- import { Nullable } from "babylonjs/types";
|
|
|
- import { Scene } from "babylonjs/scene";
|
|
|
- import { Vector3, Vector2, Vector4 } from "babylonjs/Maths/math.vector";
|
|
|
- import { Color4 } from "babylonjs/Maths/math.color";
|
|
|
- import { Mesh } from "babylonjs/Meshes/mesh";
|
|
|
- /**
|
|
|
- * Class containing static functions to help procedurally build meshes
|
|
|
- */
|
|
|
- export class RibbonBuilder {
|
|
|
- /**
|
|
|
- * Creates a ribbon mesh. The ribbon is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters
|
|
|
- * * The parameter `pathArray` is a required array of paths, what are each an array of successive Vector3. The pathArray parameter depicts the ribbon geometry
|
|
|
- * * The parameter `closeArray` (boolean, default false) creates a seam between the first and the last paths of the path array
|
|
|
- * * The parameter `closePath` (boolean, default false) creates a seam between the first and the last points of each path of the path array
|
|
|
- * * The parameter `offset` (positive integer, default : rounded half size of the pathArray length), is taken in account only if the `pathArray` is containing a single path
|
|
|
- * * It's the offset to join the points from the same path. Ex : offset = 10 means the point 1 is joined to the point 11
|
|
|
- * * The optional parameter `instance` is an instance of an existing Ribbon object to be updated with the passed `pathArray` parameter : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#ribbon
|
|
|
- * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
- * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
|
|
|
- * * The parameter `uvs` is an optional flat array of `Vector2` to update/set each ribbon vertex with its own custom UV values instead of the computed ones
|
|
|
- * * The parameters `colors` is an optional flat array of `Color4` to set/update each ribbon vertex with its own custom color values
|
|
|
- * * Note that if you use the parameters `uvs` or `colors`, the passed arrays must be populated with the right number of elements, it is to say the number of ribbon vertices. Remember that if you set `closePath` to `true`, there's one extra vertex per path in the geometry
|
|
|
- * * Moreover, you can use the parameter `color` with `instance` (to update the ribbon), only if you previously used it at creation time
|
|
|
- * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
|
- * @param name defines the name of the mesh
|
|
|
- * @param options defines the options used to create the mesh
|
|
|
- * @param scene defines the hosting scene
|
|
|
- * @returns the ribbon mesh
|
|
|
- * @see https://doc.babylonjs.com/how_to/ribbon_tutorial
|
|
|
- * @see https://doc.babylonjs.com/how_to/parametric_shapes
|
|
|
- */
|
|
|
- static CreateRibbon(name: string, options: {
|
|
|
- pathArray: Vector3[][];
|
|
|
- closeArray?: boolean;
|
|
|
- closePath?: boolean;
|
|
|
- offset?: number;
|
|
|
- updatable?: boolean;
|
|
|
- sideOrientation?: number;
|
|
|
- frontUVs?: Vector4;
|
|
|
- backUVs?: Vector4;
|
|
|
- instance?: Mesh;
|
|
|
- invertUV?: boolean;
|
|
|
- uvs?: Vector2[];
|
|
|
- colors?: Color4[];
|
|
|
- }, scene?: Nullable<Scene>): Mesh;
|
|
|
- }
|
|
|
-}
|
|
|
-declare module "babylonjs/Meshes/Builders/shapeBuilder" {
|
|
|
- import { Nullable } from "babylonjs/types";
|
|
|
- import { Scene } from "babylonjs/scene";
|
|
|
- import { Vector3, Vector4 } from "babylonjs/Maths/math.vector";
|
|
|
- import { Mesh } from "babylonjs/Meshes/mesh";
|
|
|
- /**
|
|
|
- * Class containing static functions to help procedurally build meshes
|
|
|
- */
|
|
|
- export class ShapeBuilder {
|
|
|
- /**
|
|
|
- * Creates an extruded shape mesh. The extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.
|
|
|
- * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.
|
|
|
- * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.
|
|
|
- * * The parameter `rotation` (float, default 0 radians) is the angle value to rotate the shape each step (each path point), from the former step (so rotation added each step) along the curve.
|
|
|
- * * The parameter `scale` (float, default 1) is the value to scale the shape.
|
|
|
- * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL
|
|
|
- * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#extruded-shape
|
|
|
- * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape.
|
|
|
- * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
- * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture.
|
|
|
- * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
|
|
|
- * @param name defines the name of the mesh
|
|
|
- * @param options defines the options used to create the mesh
|
|
|
- * @param scene defines the hosting scene
|
|
|
- * @returns the extruded shape mesh
|
|
|
- * @see https://doc.babylonjs.com/how_to/parametric_shapes
|
|
|
- * @see https://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes
|
|
|
- */
|
|
|
- static ExtrudeShape(name: string, options: {
|
|
|
- shape: Vector3[];
|
|
|
- path: Vector3[];
|
|
|
- scale?: number;
|
|
|
- rotation?: number;
|
|
|
- cap?: number;
|
|
|
- updatable?: boolean;
|
|
|
- sideOrientation?: number;
|
|
|
- frontUVs?: Vector4;
|
|
|
- backUVs?: Vector4;
|
|
|
- instance?: Mesh;
|
|
|
- invertUV?: boolean;
|
|
|
- }, scene?: Nullable<Scene>): Mesh;
|
|
|
- /**
|
|
|
- * Creates an custom extruded shape mesh.
|
|
|
- * The custom extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.
|
|
|
- * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.
|
|
|
- * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.
|
|
|
- * * The parameter `rotationFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the begining of the path
|
|
|
- * * It must returns a float value that will be the rotation in radians applied to the shape on each path point.
|
|
|
- * * The parameter `scaleFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the begining of the path
|
|
|
- * * It must returns a float value that will be the scale value applied to the shape on each path point
|
|
|
- * * The parameter `ribbonClosePath` (boolean, default false) forces the extrusion underlying ribbon to close all the paths in its `pathArray`
|
|
|
- * * The parameter `ribbonCloseArray` (boolean, default false) forces the extrusion underlying ribbon to close its `pathArray`
|
|
|
- * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL
|
|
|
- * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#extruded-shape
|
|
|
- * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape
|
|
|
- * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
- * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
|
|
|
- * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
|
- * @param name defines the name of the mesh
|
|
|
- * @param options defines the options used to create the mesh
|
|
|
- * @param scene defines the hosting scene
|
|
|
- * @returns the custom extruded shape mesh
|
|
|
- * @see https://doc.babylonjs.com/how_to/parametric_shapes#custom-extruded-shapes
|
|
|
- * @see https://doc.babylonjs.com/how_to/parametric_shapes
|
|
|
- * @see https://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes
|
|
|
- */
|
|
|
- static ExtrudeShapeCustom(name: string, options: {
|
|
|
- shape: Vector3[];
|
|
|
- path: Vector3[];
|
|
|
- scaleFunction?: any;
|
|
|
- rotationFunction?: any;
|
|
|
- ribbonCloseArray?: boolean;
|
|
|
- ribbonClosePath?: boolean;
|
|
|
- cap?: number;
|
|
|
- updatable?: boolean;
|
|
|
- sideOrientation?: number;
|
|
|
- frontUVs?: Vector4;
|
|
|
- backUVs?: Vector4;
|
|
|
- instance?: Mesh;
|
|
|
- invertUV?: boolean;
|
|
|
- }, scene?: Nullable<Scene>): Mesh;
|
|
|
- private static _ExtrudeShapeGeneric;
|
|
|
- }
|
|
|
-}
|
|
|
declare module "babylonjs/Physics/Plugins/ammoJSPlugin" {
|
|
|
import { Quaternion, Vector3 } from "babylonjs/Maths/math.vector";
|
|
|
import { IPhysicsEnginePlugin, PhysicsImpostorJoint } from "babylonjs/Physics/IPhysicsEngine";
|
|
@@ -77614,6 +77695,7 @@ declare module "babylonjs/Misc/sceneRecorder" {
|
|
|
private _compareArray;
|
|
|
private _compareObjects;
|
|
|
private _compareCollections;
|
|
|
+ private static GetShadowGeneratorById;
|
|
|
/**
|
|
|
* Apply a given delta to a given scene
|
|
|
* @param deltaJSON defines the JSON containing the delta
|
|
@@ -96054,6 +96136,8 @@ declare module BABYLON {
|
|
|
* Interface to implement to create a shadow generator compatible with BJS.
|
|
|
*/
|
|
|
export interface IShadowGenerator {
|
|
|
+ /** Gets or set the id of the shadow generator. It will be the one from the light if not defined */
|
|
|
+ id: string;
|
|
|
/**
|
|
|
* Gets the main RTT containing the shadow map (usually storing depth from the light point of view).
|
|
|
* @returns The render target texture if present otherwise, null
|
|
@@ -96198,6 +96282,8 @@ declare module BABYLON {
|
|
|
* Execute PCSS with 16 taps blocker search and 16 taps PCF.
|
|
|
*/
|
|
|
static readonly QUALITY_LOW: number;
|
|
|
+ /** Gets or set the id of the shadow generator. It will be the one from the light if not defined */
|
|
|
+ id: string;
|
|
|
/** Gets or sets the custom shader name to use */
|
|
|
customShaderOptions: ICustomShaderOptions;
|
|
|
/**
|
|
@@ -129505,11 +129591,169 @@ declare module BABYLON {
|
|
|
dispose(): void;
|
|
|
}
|
|
|
}
|
|
|
-declare module BABYLON.Debug {
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
+ * Defines the options associated with the creation of a SkeletonViewer.
|
|
|
+ */
|
|
|
+ export interface ISkeletonViewerOptions {
|
|
|
+ /** Should the system pause animations before building the Viewer? */
|
|
|
+ pauseAnimations: boolean;
|
|
|
+ /** Should the system return the skeleton to rest before building? */
|
|
|
+ returnToRest: boolean;
|
|
|
+ /** public Display Mode of the Viewer */
|
|
|
+ displayMode: number;
|
|
|
+ /** Flag to toggle if the Viewer should use the CPU for animations or not? */
|
|
|
+ displayOptions: ISkeletonViewerDisplayOptions;
|
|
|
+ /** Flag to toggle if the Viewer should use the CPU for animations or not? */
|
|
|
+ computeBonesUsingShaders: boolean;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * Defines how to display the various bone meshes for the viewer.
|
|
|
+ */
|
|
|
+ export interface ISkeletonViewerDisplayOptions {
|
|
|
+ /** How far down to start tapering the bone spurs */
|
|
|
+ midStep?: number;
|
|
|
+ /** How big is the midStep? */
|
|
|
+ midStepFactor?: number;
|
|
|
+ /** Base for the Sphere Size */
|
|
|
+ sphereBaseSize?: number;
|
|
|
+ /** The ratio of the sphere to the longest bone in units */
|
|
|
+ sphereScaleUnit?: number;
|
|
|
+ /** Ratio for the Sphere Size */
|
|
|
+ sphereFactor?: number;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
+ * Class containing static functions to help procedurally build meshes
|
|
|
+ */
|
|
|
+ export class RibbonBuilder {
|
|
|
+ /**
|
|
|
+ * Creates a ribbon mesh. The ribbon is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters
|
|
|
+ * * The parameter `pathArray` is a required array of paths, what are each an array of successive Vector3. The pathArray parameter depicts the ribbon geometry
|
|
|
+ * * The parameter `closeArray` (boolean, default false) creates a seam between the first and the last paths of the path array
|
|
|
+ * * The parameter `closePath` (boolean, default false) creates a seam between the first and the last points of each path of the path array
|
|
|
+ * * The parameter `offset` (positive integer, default : rounded half size of the pathArray length), is taken in account only if the `pathArray` is containing a single path
|
|
|
+ * * It's the offset to join the points from the same path. Ex : offset = 10 means the point 1 is joined to the point 11
|
|
|
+ * * The optional parameter `instance` is an instance of an existing Ribbon object to be updated with the passed `pathArray` parameter : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#ribbon
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
+ * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
|
|
|
+ * * The parameter `uvs` is an optional flat array of `Vector2` to update/set each ribbon vertex with its own custom UV values instead of the computed ones
|
|
|
+ * * The parameters `colors` is an optional flat array of `Color4` to set/update each ribbon vertex with its own custom color values
|
|
|
+ * * Note that if you use the parameters `uvs` or `colors`, the passed arrays must be populated with the right number of elements, it is to say the number of ribbon vertices. Remember that if you set `closePath` to `true`, there's one extra vertex per path in the geometry
|
|
|
+ * * Moreover, you can use the parameter `color` with `instance` (to update the ribbon), only if you previously used it at creation time
|
|
|
+ * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
|
+ * @param name defines the name of the mesh
|
|
|
+ * @param options defines the options used to create the mesh
|
|
|
+ * @param scene defines the hosting scene
|
|
|
+ * @returns the ribbon mesh
|
|
|
+ * @see https://doc.babylonjs.com/how_to/ribbon_tutorial
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes
|
|
|
+ */
|
|
|
+ static CreateRibbon(name: string, options: {
|
|
|
+ pathArray: Vector3[][];
|
|
|
+ closeArray?: boolean;
|
|
|
+ closePath?: boolean;
|
|
|
+ offset?: number;
|
|
|
+ updatable?: boolean;
|
|
|
+ sideOrientation?: number;
|
|
|
+ frontUVs?: Vector4;
|
|
|
+ backUVs?: Vector4;
|
|
|
+ instance?: Mesh;
|
|
|
+ invertUV?: boolean;
|
|
|
+ uvs?: Vector2[];
|
|
|
+ colors?: Color4[];
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
/**
|
|
|
- * Class used to render a debug view of a given skeleton
|
|
|
- * @see http://www.babylonjs-playground.com/#1BZJVJ#8
|
|
|
+ * Class containing static functions to help procedurally build meshes
|
|
|
+ */
|
|
|
+ export class ShapeBuilder {
|
|
|
+ /**
|
|
|
+ * Creates an extruded shape mesh. The extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.
|
|
|
+ * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.
|
|
|
+ * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.
|
|
|
+ * * The parameter `rotation` (float, default 0 radians) is the angle value to rotate the shape each step (each path point), from the former step (so rotation added each step) along the curve.
|
|
|
+ * * The parameter `scale` (float, default 1) is the value to scale the shape.
|
|
|
+ * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL
|
|
|
+ * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#extruded-shape
|
|
|
+ * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape.
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
+ * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture.
|
|
|
+ * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
|
|
|
+ * @param name defines the name of the mesh
|
|
|
+ * @param options defines the options used to create the mesh
|
|
|
+ * @param scene defines the hosting scene
|
|
|
+ * @returns the extruded shape mesh
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes
|
|
|
+ */
|
|
|
+ static ExtrudeShape(name: string, options: {
|
|
|
+ shape: Vector3[];
|
|
|
+ path: Vector3[];
|
|
|
+ scale?: number;
|
|
|
+ rotation?: number;
|
|
|
+ cap?: number;
|
|
|
+ updatable?: boolean;
|
|
|
+ sideOrientation?: number;
|
|
|
+ frontUVs?: Vector4;
|
|
|
+ backUVs?: Vector4;
|
|
|
+ instance?: Mesh;
|
|
|
+ invertUV?: boolean;
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
|
+ /**
|
|
|
+ * Creates an custom extruded shape mesh.
|
|
|
+ * The custom extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.
|
|
|
+ * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.
|
|
|
+ * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.
|
|
|
+ * * The parameter `rotationFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the begining of the path
|
|
|
+ * * It must returns a float value that will be the rotation in radians applied to the shape on each path point.
|
|
|
+ * * The parameter `scaleFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the begining of the path
|
|
|
+ * * It must returns a float value that will be the scale value applied to the shape on each path point
|
|
|
+ * * The parameter `ribbonClosePath` (boolean, default false) forces the extrusion underlying ribbon to close all the paths in its `pathArray`
|
|
|
+ * * The parameter `ribbonCloseArray` (boolean, default false) forces the extrusion underlying ribbon to close its `pathArray`
|
|
|
+ * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL
|
|
|
+ * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#extruded-shape
|
|
|
+ * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
+ * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
|
|
|
+ * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
|
+ * @param name defines the name of the mesh
|
|
|
+ * @param options defines the options used to create the mesh
|
|
|
+ * @param scene defines the hosting scene
|
|
|
+ * @returns the custom extruded shape mesh
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes#custom-extruded-shapes
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes
|
|
|
*/
|
|
|
+ static ExtrudeShapeCustom(name: string, options: {
|
|
|
+ shape: Vector3[];
|
|
|
+ path: Vector3[];
|
|
|
+ scaleFunction?: any;
|
|
|
+ rotationFunction?: any;
|
|
|
+ ribbonCloseArray?: boolean;
|
|
|
+ ribbonClosePath?: boolean;
|
|
|
+ cap?: number;
|
|
|
+ updatable?: boolean;
|
|
|
+ sideOrientation?: number;
|
|
|
+ frontUVs?: Vector4;
|
|
|
+ backUVs?: Vector4;
|
|
|
+ instance?: Mesh;
|
|
|
+ invertUV?: boolean;
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
|
+ private static _ExtrudeShapeGeneric;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON.Debug {
|
|
|
+ /**
|
|
|
+ * Class used to render a debug view of a given skeleton
|
|
|
+ * @see http://www.babylonjs-playground.com/#1BZJVJ#8
|
|
|
+ */
|
|
|
export class SkeletonViewer {
|
|
|
/** defines the skeleton to render */
|
|
|
skeleton: Skeleton;
|
|
@@ -129519,18 +129763,46 @@ declare module BABYLON.Debug {
|
|
|
autoUpdateBonesMatrices: boolean;
|
|
|
/** defines the rendering group id to use with the viewer */
|
|
|
renderingGroupId: number;
|
|
|
+ /** is the options for the viewer */
|
|
|
+ options: Partial<ISkeletonViewerOptions>;
|
|
|
+ /** public Display constants BABYLON.SkeletonViewer.DISPLAY_LINES */
|
|
|
+ static readonly DISPLAY_LINES: number;
|
|
|
+ /** public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERES */
|
|
|
+ static readonly DISPLAY_SPHERES: number;
|
|
|
+ /** public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERE_AND_SPURS */
|
|
|
+ static readonly DISPLAY_SPHERE_AND_SPURS: number;
|
|
|
+ /** If SkeletonViewer scene scope. */
|
|
|
+ private _scene;
|
|
|
/** Gets or sets the color used to render the skeleton */
|
|
|
color: Color3;
|
|
|
- private _scene;
|
|
|
+ /** Array of the points of the skeleton fo the line view. */
|
|
|
private _debugLines;
|
|
|
+ /** The SkeletonViewers Mesh. */
|
|
|
private _debugMesh;
|
|
|
+ /** If SkeletonViewer is enabled. */
|
|
|
private _isEnabled;
|
|
|
- private _renderFunction;
|
|
|
+ /** If SkeletonViewer is ready. */
|
|
|
+ private _ready;
|
|
|
+ /** SkeletonViewer render observable. */
|
|
|
+ private _obs;
|
|
|
+ /** The Utility Layer to render the gizmos in. */
|
|
|
private _utilityLayer;
|
|
|
- /**
|
|
|
- * Returns the mesh used to render the bones
|
|
|
- */
|
|
|
- get debugMesh(): Nullable<LinesMesh>;
|
|
|
+ /** Gets the Scene. */
|
|
|
+ get scene(): Scene;
|
|
|
+ /** Gets the utilityLayer. */
|
|
|
+ get utilityLayer(): Nullable<UtilityLayerRenderer>;
|
|
|
+ /** Checks Ready Status. */
|
|
|
+ get isReady(): Boolean;
|
|
|
+ /** Sets Ready Status. */
|
|
|
+ set ready(value: boolean);
|
|
|
+ /** Gets the debugMesh */
|
|
|
+ get debugMesh(): Nullable<AbstractMesh> | Nullable<LinesMesh>;
|
|
|
+ /** Sets the debugMesh */
|
|
|
+ set debugMesh(value: Nullable<AbstractMesh> | Nullable<LinesMesh>);
|
|
|
+ /** Gets the material */
|
|
|
+ get material(): StandardMaterial;
|
|
|
+ /** Sets the material */
|
|
|
+ set material(value: StandardMaterial);
|
|
|
/**
|
|
|
* Creates a new SkeletonViewer
|
|
|
* @param skeleton defines the skeleton to render
|
|
@@ -129538,24 +129810,37 @@ declare module BABYLON.Debug {
|
|
|
* @param scene defines the hosting scene
|
|
|
* @param autoUpdateBonesMatrices defines a boolean indicating if bones matrices must be forced to update before rendering (true by default)
|
|
|
* @param renderingGroupId defines the rendering group id to use with the viewer
|
|
|
+ * @param options All of the extra constructor options for the SkeletonViewer
|
|
|
*/
|
|
|
constructor(
|
|
|
/** defines the skeleton to render */
|
|
|
skeleton: Skeleton,
|
|
|
/** defines the mesh attached to the skeleton */
|
|
|
- mesh: AbstractMesh, scene: Scene,
|
|
|
+ mesh: AbstractMesh,
|
|
|
+ /** The Scene scope*/
|
|
|
+ scene: Scene,
|
|
|
/** defines a boolean indicating if bones matrices must be forced to update before rendering (true by default) */
|
|
|
autoUpdateBonesMatrices?: boolean,
|
|
|
/** defines the rendering group id to use with the viewer */
|
|
|
- renderingGroupId?: number);
|
|
|
+ renderingGroupId?: number,
|
|
|
+ /** is the options for the viewer */
|
|
|
+ options?: Partial<ISkeletonViewerOptions>);
|
|
|
+ /** The Dynamic bindings for the update functions */
|
|
|
+ private _bindObs;
|
|
|
+ /** Update the viewer to sync with current skeleton state, only used to manually update. */
|
|
|
+ update(): void;
|
|
|
/** Gets or sets a boolean indicating if the viewer is enabled */
|
|
|
set isEnabled(value: boolean);
|
|
|
get isEnabled(): boolean;
|
|
|
private _getBonePosition;
|
|
|
private _getLinesForBonesWithLength;
|
|
|
private _getLinesForBonesNoLength;
|
|
|
- /** Update the viewer to sync with current skeleton state */
|
|
|
- update(): void;
|
|
|
+ /** function to revert the mesh and scene back to the initial state. */
|
|
|
+ private _revert;
|
|
|
+ /** function to build and bind sphere joint points and spur bone representations. */
|
|
|
+ private _buildSpheresAndSpurs;
|
|
|
+ /** Update the viewer to sync with current skeleton state, only used for the line display. */
|
|
|
+ private _displayLinesUpdate;
|
|
|
/** Release associated resources */
|
|
|
dispose(): void;
|
|
|
}
|
|
@@ -138850,132 +139135,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
- * Class containing static functions to help procedurally build meshes
|
|
|
- */
|
|
|
- export class RibbonBuilder {
|
|
|
- /**
|
|
|
- * Creates a ribbon mesh. The ribbon is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters
|
|
|
- * * The parameter `pathArray` is a required array of paths, what are each an array of successive Vector3. The pathArray parameter depicts the ribbon geometry
|
|
|
- * * The parameter `closeArray` (boolean, default false) creates a seam between the first and the last paths of the path array
|
|
|
- * * The parameter `closePath` (boolean, default false) creates a seam between the first and the last points of each path of the path array
|
|
|
- * * The parameter `offset` (positive integer, default : rounded half size of the pathArray length), is taken in account only if the `pathArray` is containing a single path
|
|
|
- * * It's the offset to join the points from the same path. Ex : offset = 10 means the point 1 is joined to the point 11
|
|
|
- * * The optional parameter `instance` is an instance of an existing Ribbon object to be updated with the passed `pathArray` parameter : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#ribbon
|
|
|
- * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
- * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
|
|
|
- * * The parameter `uvs` is an optional flat array of `Vector2` to update/set each ribbon vertex with its own custom UV values instead of the computed ones
|
|
|
- * * The parameters `colors` is an optional flat array of `Color4` to set/update each ribbon vertex with its own custom color values
|
|
|
- * * Note that if you use the parameters `uvs` or `colors`, the passed arrays must be populated with the right number of elements, it is to say the number of ribbon vertices. Remember that if you set `closePath` to `true`, there's one extra vertex per path in the geometry
|
|
|
- * * Moreover, you can use the parameter `color` with `instance` (to update the ribbon), only if you previously used it at creation time
|
|
|
- * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
|
- * @param name defines the name of the mesh
|
|
|
- * @param options defines the options used to create the mesh
|
|
|
- * @param scene defines the hosting scene
|
|
|
- * @returns the ribbon mesh
|
|
|
- * @see https://doc.babylonjs.com/how_to/ribbon_tutorial
|
|
|
- * @see https://doc.babylonjs.com/how_to/parametric_shapes
|
|
|
- */
|
|
|
- static CreateRibbon(name: string, options: {
|
|
|
- pathArray: Vector3[][];
|
|
|
- closeArray?: boolean;
|
|
|
- closePath?: boolean;
|
|
|
- offset?: number;
|
|
|
- updatable?: boolean;
|
|
|
- sideOrientation?: number;
|
|
|
- frontUVs?: Vector4;
|
|
|
- backUVs?: Vector4;
|
|
|
- instance?: Mesh;
|
|
|
- invertUV?: boolean;
|
|
|
- uvs?: Vector2[];
|
|
|
- colors?: Color4[];
|
|
|
- }, scene?: Nullable<Scene>): Mesh;
|
|
|
- }
|
|
|
-}
|
|
|
-declare module BABYLON {
|
|
|
- /**
|
|
|
- * Class containing static functions to help procedurally build meshes
|
|
|
- */
|
|
|
- export class ShapeBuilder {
|
|
|
- /**
|
|
|
- * Creates an extruded shape mesh. The extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.
|
|
|
- * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.
|
|
|
- * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.
|
|
|
- * * The parameter `rotation` (float, default 0 radians) is the angle value to rotate the shape each step (each path point), from the former step (so rotation added each step) along the curve.
|
|
|
- * * The parameter `scale` (float, default 1) is the value to scale the shape.
|
|
|
- * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL
|
|
|
- * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#extruded-shape
|
|
|
- * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape.
|
|
|
- * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
- * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture.
|
|
|
- * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
|
|
|
- * @param name defines the name of the mesh
|
|
|
- * @param options defines the options used to create the mesh
|
|
|
- * @param scene defines the hosting scene
|
|
|
- * @returns the extruded shape mesh
|
|
|
- * @see https://doc.babylonjs.com/how_to/parametric_shapes
|
|
|
- * @see https://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes
|
|
|
- */
|
|
|
- static ExtrudeShape(name: string, options: {
|
|
|
- shape: Vector3[];
|
|
|
- path: Vector3[];
|
|
|
- scale?: number;
|
|
|
- rotation?: number;
|
|
|
- cap?: number;
|
|
|
- updatable?: boolean;
|
|
|
- sideOrientation?: number;
|
|
|
- frontUVs?: Vector4;
|
|
|
- backUVs?: Vector4;
|
|
|
- instance?: Mesh;
|
|
|
- invertUV?: boolean;
|
|
|
- }, scene?: Nullable<Scene>): Mesh;
|
|
|
- /**
|
|
|
- * Creates an custom extruded shape mesh.
|
|
|
- * The custom extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.
|
|
|
- * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.
|
|
|
- * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.
|
|
|
- * * The parameter `rotationFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the begining of the path
|
|
|
- * * It must returns a float value that will be the rotation in radians applied to the shape on each path point.
|
|
|
- * * The parameter `scaleFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the begining of the path
|
|
|
- * * It must returns a float value that will be the scale value applied to the shape on each path point
|
|
|
- * * The parameter `ribbonClosePath` (boolean, default false) forces the extrusion underlying ribbon to close all the paths in its `pathArray`
|
|
|
- * * The parameter `ribbonCloseArray` (boolean, default false) forces the extrusion underlying ribbon to close its `pathArray`
|
|
|
- * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL
|
|
|
- * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#extruded-shape
|
|
|
- * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape
|
|
|
- * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
- * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
|
|
|
- * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
|
- * @param name defines the name of the mesh
|
|
|
- * @param options defines the options used to create the mesh
|
|
|
- * @param scene defines the hosting scene
|
|
|
- * @returns the custom extruded shape mesh
|
|
|
- * @see https://doc.babylonjs.com/how_to/parametric_shapes#custom-extruded-shapes
|
|
|
- * @see https://doc.babylonjs.com/how_to/parametric_shapes
|
|
|
- * @see https://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes
|
|
|
- */
|
|
|
- static ExtrudeShapeCustom(name: string, options: {
|
|
|
- shape: Vector3[];
|
|
|
- path: Vector3[];
|
|
|
- scaleFunction?: any;
|
|
|
- rotationFunction?: any;
|
|
|
- ribbonCloseArray?: boolean;
|
|
|
- ribbonClosePath?: boolean;
|
|
|
- cap?: number;
|
|
|
- updatable?: boolean;
|
|
|
- sideOrientation?: number;
|
|
|
- frontUVs?: Vector4;
|
|
|
- backUVs?: Vector4;
|
|
|
- instance?: Mesh;
|
|
|
- invertUV?: boolean;
|
|
|
- }, scene?: Nullable<Scene>): Mesh;
|
|
|
- private static _ExtrudeShapeGeneric;
|
|
|
- }
|
|
|
-}
|
|
|
-declare module BABYLON {
|
|
|
- /**
|
|
|
* AmmoJS Physics plugin
|
|
|
* @see https://doc.babylonjs.com/how_to/using_the_physics_engine
|
|
|
* @see https://github.com/kripken/ammo.js/
|
|
@@ -152352,6 +152511,7 @@ declare module BABYLON {
|
|
|
private _compareArray;
|
|
|
private _compareObjects;
|
|
|
private _compareCollections;
|
|
|
+ private static GetShadowGeneratorById;
|
|
|
/**
|
|
|
* Apply a given delta to a given scene
|
|
|
* @param deltaJSON defines the JSON containing the delta
|