|
@@ -6858,6 +6858,48 @@ declare module "babylonjs/Meshes/buffer" {
|
|
|
private static _GetFloatValue;
|
|
|
}
|
|
|
}
|
|
|
+declare module "babylonjs/Meshes/Builders/capsuleBuilder" {
|
|
|
+ import { Vector3 } from "babylonjs/Maths/math.vector";
|
|
|
+ import { Mesh } from "babylonjs/Meshes/mesh";
|
|
|
+ /**
|
|
|
+ * 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 "babylonjs/Collisions/intersectionInfo" {
|
|
|
import { Nullable } from "babylonjs/types";
|
|
|
/**
|
|
@@ -26814,6 +26856,7 @@ declare module "babylonjs/Meshes/mesh.vertexData" {
|
|
|
import { Color4, Color3 } from "babylonjs/Maths/math.color";
|
|
|
import { Geometry } from "babylonjs/Meshes/geometry";
|
|
|
import { Mesh } from "babylonjs/Meshes/mesh";
|
|
|
+ import { ICreateCapsuleOptions } from "babylonjs/Meshes/Builders/capsuleBuilder";
|
|
|
/**
|
|
|
* Define an interface for all classes that will get and set the data on vertices
|
|
|
*/
|
|
@@ -27418,6 +27461,12 @@ declare module "babylonjs/Meshes/mesh.vertexData" {
|
|
|
backUVs?: Vector4;
|
|
|
}): 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
|
|
|
* @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
|
|
@@ -29071,6 +29120,7 @@ declare module "babylonjs/Meshes/mesh" {
|
|
|
import { Path3D } from "babylonjs/Maths/math.path";
|
|
|
import { Plane } from "babylonjs/Maths/math.plane";
|
|
|
import { TransformNode } from "babylonjs/Meshes/transformNode";
|
|
|
+ import { ICreateCapsuleOptions } from "babylonjs/Meshes/Builders/capsuleBuilder";
|
|
|
import { LinesMesh } from "babylonjs/Meshes/linesMesh";
|
|
|
import { InstancedMesh } from "babylonjs/Meshes/instancedMesh";
|
|
|
import { GroundMesh } from "babylonjs/Meshes/groundMesh";
|
|
@@ -30268,6 +30318,14 @@ declare module "babylonjs/Meshes/mesh" {
|
|
|
* @returns a new 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
|
|
|
* @returns original positions used for CPU skinning. Useful for integrating Morphing with skeletons in same mesh
|
|
@@ -33033,6 +33091,7 @@ declare module "babylonjs/Collisions/meshCollisionData" {
|
|
|
_diffPositionForCollisions: Vector3;
|
|
|
_onCollideObserver: Nullable<Observer<AbstractMesh>>;
|
|
|
_onCollisionPositionChangeObserver: Nullable<Observer<Vector3>>;
|
|
|
+ _collisionResponse: boolean;
|
|
|
}
|
|
|
}
|
|
|
declare module "babylonjs/Meshes/abstractMesh" {
|
|
@@ -33371,6 +33430,14 @@ declare module "babylonjs/Meshes/abstractMesh" {
|
|
|
get collisionMask(): 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).
|
|
|
* A collision between A and B will happen if A.collisionGroup & b.collisionMask !== 0
|
|
|
*/
|
|
@@ -45122,9 +45189,9 @@ declare module "babylonjs/Behaviors/Meshes/pointerDragBehavior" {
|
|
|
* @param startPickedPoint picked point of the pointer to be simulated (Default: attached mesh position)
|
|
|
*/
|
|
|
startDrag(pointerId?: number, fromRay?: Ray, startPickedPoint?: Vector3): void;
|
|
|
- private _startDrag;
|
|
|
+ protected _startDrag(pointerId: number, fromRay?: Ray, startPickedPoint?: Vector3): void;
|
|
|
private _dragDelta;
|
|
|
- private _moveDrag;
|
|
|
+ protected _moveDrag(ray: Ray): void;
|
|
|
private _pickWithRayOnDragPlane;
|
|
|
private _pointA;
|
|
|
private _pointC;
|
|
@@ -53260,7 +53327,6 @@ declare module "babylonjs/Debug/skeletonViewer" {
|
|
|
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 { ShaderMaterial } from "babylonjs/Materials/shaderMaterial";
|
|
|
import { ISkeletonViewerOptions, IBoneWeightShaderOptions, ISkeletonMapShaderOptions } from "babylonjs/Debug/ISkeletonViewer";
|
|
|
/**
|
|
@@ -53333,13 +53399,9 @@ declare module "babylonjs/Debug/skeletonViewer" {
|
|
|
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);
|
|
|
- /** Gets the material */
|
|
|
+ /** Gets the displayMode */
|
|
|
get displayMode(): number;
|
|
|
- /** Sets the material */
|
|
|
+ /** Sets the displayMode */
|
|
|
set displayMode(value: number);
|
|
|
/**
|
|
|
* Creates a new SkeletonViewer
|
|
@@ -67139,7 +67201,6 @@ declare module "babylonjs/Materials/Node/Blocks/gradientBlock" {
|
|
|
* Class used to store a color step for the GradientBlock
|
|
|
*/
|
|
|
export class GradientBlockColorStep {
|
|
|
- private _parent;
|
|
|
private _step;
|
|
|
/**
|
|
|
* Gets value indicating which step this color is associated with (between 0 and 1)
|
|
@@ -67160,11 +67221,10 @@ declare module "babylonjs/Materials/Node/Blocks/gradientBlock" {
|
|
|
set color(val: Color3);
|
|
|
/**
|
|
|
* Creates a new GradientBlockColorStep
|
|
|
- * @param parent defines the parent gradient for this block
|
|
|
* @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
|
|
|
*/
|
|
|
- constructor(parent: GradientBlock, step: number, 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
|
|
@@ -69217,6 +69277,7 @@ declare module "babylonjs/Meshes/Builders/decalBuilder" {
|
|
|
}
|
|
|
}
|
|
|
declare module "babylonjs/Meshes/meshBuilder" {
|
|
|
+ import { ICreateCapsuleOptions } from "babylonjs/Meshes/Builders/capsuleBuilder";
|
|
|
import { Vector4, Vector3, Vector2 } from "babylonjs/Maths/math.vector";
|
|
|
import { Nullable } from "babylonjs/types";
|
|
|
import { Scene } from "babylonjs/scene";
|
|
@@ -69943,6 +70004,15 @@ declare module "babylonjs/Meshes/meshBuilder" {
|
|
|
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?: Nullable<Scene>): Mesh;
|
|
|
}
|
|
|
}
|
|
|
declare module "babylonjs/Meshes/meshSimplification" {
|
|
@@ -70199,6 +70269,8 @@ declare module "babylonjs/Meshes/Builders/index" {
|
|
|
export * from "babylonjs/Meshes/Builders/polyhedronBuilder";
|
|
|
export * from "babylonjs/Meshes/Builders/icoSphereBuilder";
|
|
|
export * from "babylonjs/Meshes/Builders/decalBuilder";
|
|
|
+ export * from "babylonjs/Meshes/Builders/icoSphereBuilder";
|
|
|
+ export * from "babylonjs/Meshes/Builders/capsuleBuilder";
|
|
|
}
|
|
|
declare module "babylonjs/Meshes/thinInstanceMesh" {
|
|
|
import { Nullable, DeepImmutableObject } from "babylonjs/types";
|
|
@@ -86609,6 +86681,46 @@ 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
|
|
|
*/
|
|
|
export class IntersectionInfo {
|
|
@@ -106253,6 +106365,12 @@ declare module BABYLON {
|
|
|
backUVs?: Vector4;
|
|
|
}): 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
|
|
|
* @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
|
|
@@ -109042,6 +109160,14 @@ declare module BABYLON {
|
|
|
* @returns a new 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
|
|
|
* @returns original positions used for CPU skinning. Useful for integrating Morphing with skeletons in same mesh
|
|
@@ -111696,6 +111822,7 @@ declare module BABYLON {
|
|
|
_diffPositionForCollisions: Vector3;
|
|
|
_onCollideObserver: Nullable<Observer<AbstractMesh>>;
|
|
|
_onCollisionPositionChangeObserver: Nullable<Observer<Vector3>>;
|
|
|
+ _collisionResponse: boolean;
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
@@ -112009,6 +112136,14 @@ declare module BABYLON {
|
|
|
get collisionMask(): 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).
|
|
|
* A collision between A and B will happen if A.collisionGroup & b.collisionMask !== 0
|
|
|
*/
|
|
@@ -123390,9 +123525,9 @@ declare module BABYLON {
|
|
|
* @param startPickedPoint picked point of the pointer to be simulated (Default: attached mesh position)
|
|
|
*/
|
|
|
startDrag(pointerId?: number, fromRay?: Ray, startPickedPoint?: Vector3): void;
|
|
|
- private _startDrag;
|
|
|
+ protected _startDrag(pointerId: number, fromRay?: Ray, startPickedPoint?: Vector3): void;
|
|
|
private _dragDelta;
|
|
|
- private _moveDrag;
|
|
|
+ protected _moveDrag(ray: Ray): void;
|
|
|
private _pickWithRayOnDragPlane;
|
|
|
private _pointA;
|
|
|
private _pointC;
|
|
@@ -131061,13 +131196,9 @@ declare module BABYLON.Debug {
|
|
|
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);
|
|
|
- /** Gets the material */
|
|
|
+ /** Gets the displayMode */
|
|
|
get displayMode(): number;
|
|
|
- /** Sets the material */
|
|
|
+ /** Sets the displayMode */
|
|
|
set displayMode(value: number);
|
|
|
/**
|
|
|
* Creates a new SkeletonViewer
|
|
@@ -143722,7 +143853,6 @@ declare module BABYLON {
|
|
|
* Class used to store a color step for the GradientBlock
|
|
|
*/
|
|
|
export class GradientBlockColorStep {
|
|
|
- private _parent;
|
|
|
private _step;
|
|
|
/**
|
|
|
* Gets value indicating which step this color is associated with (between 0 and 1)
|
|
@@ -143743,11 +143873,10 @@ declare module BABYLON {
|
|
|
set color(val: Color3);
|
|
|
/**
|
|
|
* Creates a new GradientBlockColorStep
|
|
|
- * @param parent defines the parent gradient for this block
|
|
|
* @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
|
|
|
*/
|
|
|
- constructor(parent: GradientBlock, step: number, 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
|
|
@@ -146262,6 +146391,15 @@ declare module BABYLON {
|
|
|
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?: Nullable<Scene>): Mesh;
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|