Browse Source

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js into p8/CapsuleMesh

Andrew V Butt Sr 5 năm trước cách đây
mục cha
commit
2d29cdfd05
29 tập tin đã thay đổi với 886 bổ sung177 xóa
  1. 77 11
      dist/preview release/babylon.d.ts
  2. 1 1
      dist/preview release/babylon.js
  3. 1 0
      dist/preview release/babylon.ktx2Decoder.js.map
  4. 326 35
      dist/preview release/babylon.max.js
  5. 1 1
      dist/preview release/babylon.max.js.map
  6. 161 23
      dist/preview release/babylon.module.d.ts
  7. 77 11
      dist/preview release/documentation.d.ts
  8. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.js
  9. 9 9
      dist/preview release/inspector/babylon.inspector.bundle.max.js
  10. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.max.js.map
  11. 1 1
      dist/preview release/nodeEditor/babylon.nodeEditor.js
  12. 1 1
      dist/preview release/nodeEditor/babylon.nodeEditor.max.js
  13. 1 1
      dist/preview release/nodeEditor/babylon.nodeEditor.max.js.map
  14. 1 1
      dist/preview release/packagesSizeBaseLine.json
  15. 161 23
      dist/preview release/viewer/babylon.module.d.ts
  16. 17 13
      dist/preview release/viewer/babylon.viewer.js
  17. 1 1
      dist/preview release/viewer/babylon.viewer.max.js
  18. 1 0
      dist/preview release/what's new.md
  19. 2 3
      inspector/src/components/actionTabs/tabs/gradientNodePropertyComponent.tsx
  20. 1 1
      nodeEditor/src/diagram/properties/gradientNodePropertyComponent.tsx
  21. 2 2
      src/Behaviors/Meshes/pointerDragBehavior.ts
  22. 11 6
      src/Collisions/collider.ts
  23. 1 0
      src/Collisions/meshCollisionData.ts
  24. 2 11
      src/Debug/skeletonViewer.ts
  25. 4 10
      src/Materials/Node/Blocks/gradientBlock.ts
  26. 9 9
      src/Meshes/Builders/capsuleBuilder.ts
  27. 13 0
      src/Meshes/abstractMesh.ts
  28. BIN
      tests/validation/ReferenceImages/CreateCapsule.png
  29. 2 1
      tests/validation/config.json

+ 77 - 11
dist/preview release/babylon.d.ts

@@ -6816,6 +6816,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 {
@@ -26460,6 +26500,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
@@ -29249,6 +29295,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
@@ -31903,6 +31957,7 @@ declare module BABYLON {
         _diffPositionForCollisions: Vector3;
         _onCollideObserver: Nullable<Observer<AbstractMesh>>;
         _onCollisionPositionChangeObserver: Nullable<Observer<Vector3>>;
+        _collisionResponse: boolean;
     }
 }
 declare module BABYLON {
@@ -32216,6 +32271,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
          */
@@ -43597,9 +43660,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;
@@ -51268,13 +51331,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
@@ -63929,7 +63988,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)
@@ -63950,11 +64008,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
@@ -66469,6 +66526,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 {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/babylon.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 0
dist/preview release/babylon.ktx2Decoder.js.map


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 326 - 35
dist/preview release/babylon.max.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/babylon.max.js.map


+ 161 - 23
dist/preview release/babylon.module.d.ts

@@ -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 {

+ 77 - 11
dist/preview release/documentation.d.ts

@@ -6816,6 +6816,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 {
@@ -26460,6 +26500,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
@@ -29249,6 +29295,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
@@ -31903,6 +31957,7 @@ declare module BABYLON {
         _diffPositionForCollisions: Vector3;
         _onCollideObserver: Nullable<Observer<AbstractMesh>>;
         _onCollisionPositionChangeObserver: Nullable<Observer<Vector3>>;
+        _collisionResponse: boolean;
     }
 }
 declare module BABYLON {
@@ -32216,6 +32271,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
          */
@@ -43597,9 +43660,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;
@@ -51268,13 +51331,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
@@ -63929,7 +63988,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)
@@ -63950,11 +64008,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
@@ -66469,6 +66526,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 {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.js


+ 9 - 9
dist/preview release/inspector/babylon.inspector.bundle.max.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-inspector"] = factory(require("babylonjs-gui"), require("babylonjs-loaders"), require("babylonjs-materials"), require("babylonjs-serializers"), require("babylonjs"));
 	else
 		root["INSPECTOR"] = factory(root["BABYLON"]["GUI"], root["BABYLON"], root["BABYLON"], root["BABYLON"], root["BABYLON"]);
-})((typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this), function(__WEBPACK_EXTERNAL_MODULE_babylonjs_gui_2D_controls_image__, __WEBPACK_EXTERNAL_MODULE_babylonjs_loaders_glTF_index__, __WEBPACK_EXTERNAL_MODULE_babylonjs_materials_grid_gridMaterial__, __WEBPACK_EXTERNAL_MODULE_babylonjs_serializers_glTF_2_0_index__, __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_observable__) {
+})((typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this), function(__WEBPACK_EXTERNAL_MODULE_babylonjs_gui_2D_controls_control__, __WEBPACK_EXTERNAL_MODULE_babylonjs_loaders_glTF_index__, __WEBPACK_EXTERNAL_MODULE_babylonjs_materials_grid_gridMaterial__, __WEBPACK_EXTERNAL_MODULE_babylonjs_serializers_glTF_2_0_index__, __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_observable__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -62834,7 +62834,7 @@ var GradientPropertyTabComponent = /** @class */ (function (_super) {
         }
     };
     GradientPropertyTabComponent.prototype.addNewStep = function () {
-        var newStep = new babylonjs_Materials_Node_Blocks_gradientBlock__WEBPACK_IMPORTED_MODULE_2__["GradientBlockColorStep"](this._gradientBlock, 1.0, babylonjs_Materials_Node_Blocks_gradientBlock__WEBPACK_IMPORTED_MODULE_2__["Color3"].White());
+        var newStep = new babylonjs_Materials_Node_Blocks_gradientBlock__WEBPACK_IMPORTED_MODULE_2__["GradientBlockColorStep"](1.0, babylonjs_Materials_Node_Blocks_gradientBlock__WEBPACK_IMPORTED_MODULE_2__["Color3"].White());
         this._gradientBlock.colorSteps.push(newStep);
         this.forceRebuild();
     };
@@ -62842,7 +62842,7 @@ var GradientPropertyTabComponent = /** @class */ (function (_super) {
         this._gradientBlock.colorSteps.sort(function (a, b) {
             return a.step - b.step;
         });
-        this.forceUpdate();
+        this.forceRebuild();
     };
     GradientPropertyTabComponent.prototype.render = function () {
         var _this = this;
@@ -67862,7 +67862,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../lineContainerComponent */ "./components/actionTabs/lineContainerComponent.tsx");
 /* harmony import */ var _lines_textLineComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lines/textLineComponent */ "./components/actionTabs/lines/textLineComponent.tsx");
-/* harmony import */ var babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babylonjs-gui/2D/controls/control */ "babylonjs-gui/2D/controls/image");
+/* harmony import */ var babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babylonjs-gui/2D/controls/control */ "babylonjs-gui/2D/controls/control");
 /* harmony import */ var babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_4__);
 /* harmony import */ var _lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../lines/sliderLineComponent */ "./components/actionTabs/lines/sliderLineComponent.tsx");
 /* harmony import */ var _lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../lines/floatLineComponent */ "./components/actionTabs/lines/floatLineComponent.tsx");
@@ -68168,7 +68168,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _commonControlPropertyGridComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./commonControlPropertyGridComponent */ "./components/actionTabs/tabs/propertyGrids/gui/commonControlPropertyGridComponent.tsx");
 /* harmony import */ var _lineContainerComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lineContainerComponent */ "./components/actionTabs/lineContainerComponent.tsx");
-/* harmony import */ var babylonjs_gui_2D_controls_image__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babylonjs-gui/2D/controls/image */ "babylonjs-gui/2D/controls/image");
+/* harmony import */ var babylonjs_gui_2D_controls_image__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babylonjs-gui/2D/controls/image */ "babylonjs-gui/2D/controls/control");
 /* harmony import */ var babylonjs_gui_2D_controls_image__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(babylonjs_gui_2D_controls_image__WEBPACK_IMPORTED_MODULE_4__);
 /* harmony import */ var _lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../lines/floatLineComponent */ "./components/actionTabs/lines/floatLineComponent.tsx");
 /* harmony import */ var _lines_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../lines/checkBoxLineComponent */ "./components/actionTabs/lines/checkBoxLineComponent.tsx");
@@ -68582,7 +68582,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../node_modules/react/index.js");
 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _commonControlPropertyGridComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./commonControlPropertyGridComponent */ "./components/actionTabs/tabs/propertyGrids/gui/commonControlPropertyGridComponent.tsx");
-/* harmony import */ var babylonjs_gui_2D_controls_textBlock__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babylonjs-gui/2D/controls/textBlock */ "babylonjs-gui/2D/controls/image");
+/* harmony import */ var babylonjs_gui_2D_controls_textBlock__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babylonjs-gui/2D/controls/textBlock */ "babylonjs-gui/2D/controls/control");
 /* harmony import */ var babylonjs_gui_2D_controls_textBlock__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(babylonjs_gui_2D_controls_textBlock__WEBPACK_IMPORTED_MODULE_3__);
 /* harmony import */ var _lineContainerComponent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../lineContainerComponent */ "./components/actionTabs/lineContainerComponent.tsx");
 /* harmony import */ var _lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../lines/textInputLineComponent */ "./components/actionTabs/lines/textInputLineComponent.tsx");
@@ -70075,7 +70075,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var _lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../lines/optionsLineComponent */ "./components/actionTabs/lines/optionsLineComponent.tsx");
 /* harmony import */ var _lines_fileButtonLineComponent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../lines/fileButtonLineComponent */ "./components/actionTabs/lines/fileButtonLineComponent.tsx");
 /* harmony import */ var _lines_valueLineComponent__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../lines/valueLineComponent */ "./components/actionTabs/lines/valueLineComponent.tsx");
-/* harmony import */ var babylonjs_gui_2D_adtInstrumentation__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! babylonjs-gui/2D/adtInstrumentation */ "babylonjs-gui/2D/controls/image");
+/* harmony import */ var babylonjs_gui_2D_adtInstrumentation__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! babylonjs-gui/2D/adtInstrumentation */ "babylonjs-gui/2D/controls/control");
 /* harmony import */ var babylonjs_gui_2D_adtInstrumentation__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(babylonjs_gui_2D_adtInstrumentation__WEBPACK_IMPORTED_MODULE_12__);
 /* harmony import */ var _customPropertyGridComponent__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../customPropertyGridComponent */ "./components/actionTabs/tabs/propertyGrids/customPropertyGridComponent.tsx");
 /* harmony import */ var _lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../lines/buttonLineComponent */ "./components/actionTabs/lines/buttonLineComponent.tsx");
@@ -79502,14 +79502,14 @@ var Tools = /** @class */ (function () {
 
 /***/ }),
 
-/***/ "babylonjs-gui/2D/controls/image":
+/***/ "babylonjs-gui/2D/controls/control":
 /*!************************************************************************************************************************!*\
   !*** external {"root":["BABYLON","GUI"],"commonjs":"babylonjs-gui","commonjs2":"babylonjs-gui","amd":"babylonjs-gui"} ***!
   \************************************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_gui_2D_controls_image__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_gui_2D_controls_control__;
 
 /***/ }),
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.max.js.map


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/nodeEditor/babylon.nodeEditor.js


+ 1 - 1
dist/preview release/nodeEditor/babylon.nodeEditor.max.js

@@ -69368,7 +69368,7 @@ var GradientPropertyTabComponent = /** @class */ (function (_super) {
     };
     GradientPropertyTabComponent.prototype.addNewStep = function () {
         var gradientBlock = this.props.block;
-        var newStep = new babylonjs_Materials_Node_Blocks_gradientBlock__WEBPACK_IMPORTED_MODULE_3__["GradientBlockColorStep"](gradientBlock, 1.0, babylonjs_Materials_Node_Blocks_gradientBlock__WEBPACK_IMPORTED_MODULE_3__["Color3"].White());
+        var newStep = new babylonjs_Materials_Node_Blocks_gradientBlock__WEBPACK_IMPORTED_MODULE_3__["GradientBlockColorStep"](1.0, babylonjs_Materials_Node_Blocks_gradientBlock__WEBPACK_IMPORTED_MODULE_3__["Color3"].White());
         gradientBlock.colorSteps.push(newStep);
         gradientBlock.colorStepsUpdated();
         this.forceRebuild();

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/nodeEditor/babylon.nodeEditor.max.js.map


+ 1 - 1
dist/preview release/packagesSizeBaseLine.json

@@ -1 +1 @@
-{"thinEngineOnly":117404,"engineOnly":153844,"sceneOnly":518896,"minGridMaterial":658291,"minStandardMaterial":808502}
+{"thinEngineOnly":117404,"engineOnly":153844,"sceneOnly":519314,"minGridMaterial":658778,"minStandardMaterial":808989}

+ 161 - 23
dist/preview release/viewer/babylon.module.d.ts

@@ -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 {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 17 - 13
dist/preview release/viewer/babylon.viewer.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


+ 1 - 0
dist/preview release/what's new.md

@@ -108,6 +108,7 @@
 
 - Fixed time steps or delta time with sub time step for Oimo.js and Cannon.js ([cedricguillemet](https://github.com/cedricguillemet))
 - Ammo.js collision group and mask supported by impostor parameters ([cedricguillemet](https://github.com/cedricguillemet))
+- `collisionResponse` flag to disable response but still get onCollide events ([cedricguillemet](https://github.com/cedricguillemet))
 - Ammo.js IDL exposed property update and raycast vehicle stablization support ([MackeyK24](https://github.com/MackeyK24))
 - Recast.js plugin nav mesh and crowd agent to ref performance optimizations. ([MackeyK24](https://github.com/MackeyK24))
 - Added `scene.physicsEnabled` boolean ([Deltakosh](https://github.com/deltakosh))

+ 2 - 3
inspector/src/components/actionTabs/tabs/gradientNodePropertyComponent.tsx

@@ -29,7 +29,7 @@ export class GradientPropertyTabComponent extends React.Component<IPropertyCompo
     }
 
     addNewStep() {
-        let newStep = new GradientBlockColorStep( this._gradientBlock, 1.0, Color3.White());
+        let newStep = new GradientBlockColorStep(1.0, Color3.White());
         this._gradientBlock.colorSteps.push(newStep);
         this.forceRebuild();
     }
@@ -39,8 +39,7 @@ export class GradientPropertyTabComponent extends React.Component<IPropertyCompo
         this._gradientBlock.colorSteps.sort((a, b) => {
             return a.step - b.step;
         });
-
-        this.forceUpdate();
+        this.forceRebuild();
     }
 
     render() {

+ 1 - 1
nodeEditor/src/diagram/properties/gradientNodePropertyComponent.tsx

@@ -56,7 +56,7 @@ export class GradientPropertyTabComponent extends React.Component<IPropertyCompo
     addNewStep() {
         let gradientBlock = this.props.block as GradientBlock;
 
-        let newStep = new GradientBlockColorStep(gradientBlock, 1.0, Color3.White());
+        let newStep = new GradientBlockColorStep(1.0, Color3.White());
         gradientBlock.colorSteps.push(newStep);
         gradientBlock.colorStepsUpdated();
 

+ 2 - 2
src/Behaviors/Meshes/pointerDragBehavior.ts

@@ -290,7 +290,7 @@ export class PointerDragBehavior implements Behavior<AbstractMesh> {
         }
     }
 
-    private _startDrag(pointerId: number, fromRay?: Ray, startPickedPoint?: Vector3) {
+    protected _startDrag(pointerId: number, fromRay?: Ray, startPickedPoint?: Vector3) {
         if (!this._scene.activeCamera || this.dragging || !this.attachedNode) {
             return;
         }
@@ -330,7 +330,7 @@ export class PointerDragBehavior implements Behavior<AbstractMesh> {
     }
 
     private _dragDelta = new Vector3();
-    private _moveDrag(ray: Ray) {
+    protected _moveDrag(ray: Ray) {
         this._moving = true;
         var pickedPoint = this._pickWithRayOnDragPlane(ray);
 

+ 11 - 6
src/Collisions/collider.ts

@@ -368,13 +368,18 @@ export class Collider {
             var distToCollision = t * this._velocity.length();
 
             if (!this.collisionFound || distToCollision < this._nearestDistance) {
-                if (!this.intersectionPoint) {
-                    this.intersectionPoint = this._collisionPoint.clone();
-                } else {
-                    this.intersectionPoint.copyFrom(this._collisionPoint);
+                // if collisionResponse is false, collision is not found but the collidedMesh is set anyway.
+                // onCollide observable are triggered if collideMesh is set
+                // this allow trigger volumes to be created.
+                if (hostMesh.collisionResponse) {
+                    if (!this.intersectionPoint) {
+                        this.intersectionPoint = this._collisionPoint.clone();
+                    } else {
+                        this.intersectionPoint.copyFrom(this._collisionPoint);
+                    }
+                    this._nearestDistance = distToCollision;
+                    this.collisionFound = true;
                 }
-                this._nearestDistance = distToCollision;
-                this.collisionFound = true;
                 this.collidedMesh = hostMesh;
             }
         }

+ 1 - 0
src/Collisions/meshCollisionData.ts

@@ -18,4 +18,5 @@ export class _MeshCollisionData {
     public _diffPositionForCollisions = new Vector3(0, 0, 0);
     public _onCollideObserver: Nullable<Observer<AbstractMesh>>;
     public _onCollisionPositionChangeObserver: Nullable<Observer<Vector3>>;
+    public _collisionResponse = true;
 }

+ 2 - 11
src/Debug/skeletonViewer.ts

@@ -10,7 +10,6 @@ import { LinesMesh } from "../Meshes/linesMesh";
 import { LinesBuilder } from "../Meshes/Builders/linesBuilder";
 import { UtilityLayerRenderer } from "../Rendering/utilityLayerRenderer";
 import { Material } from '../Materials/material';
-import { StandardMaterial } from '../Materials/standardMaterial';
 import { ShaderMaterial } from '../Materials/shaderMaterial';
 import { DynamicTexture } from '../Materials/Textures/dynamicTexture';
 import { VertexBuffer } from '../Meshes/buffer';
@@ -339,19 +338,11 @@ export class SkeletonViewer {
     set debugMesh(value: Nullable<AbstractMesh> | Nullable<LinesMesh>) {
          this._debugMesh = (value as any);
     }
-    /** Gets the material */
-    get material(): StandardMaterial {
-        return this.material;
-    }
-    /** Sets the material */
-    set material(value: StandardMaterial) {
-         this.material = value;
-    }
-    /** Gets the material */
+    /** Gets the displayMode */
     get displayMode(): number {
         return this.options.displayMode || SkeletonViewer.DISPLAY_LINES;
     }
-    /** Sets the material */
+    /** Sets the displayMode */
     set displayMode(value: number) {
         if (value > SkeletonViewer.DISPLAY_SPHERE_AND_SPURS) {
             value = SkeletonViewer.DISPLAY_LINES;

+ 4 - 10
src/Materials/Node/Blocks/gradientBlock.ts

@@ -12,8 +12,6 @@ import { Observable } from '../../../Misc/observable';
  * Class used to store a color step for the GradientBlock
  */
 export class GradientBlockColorStep {
-    private _parent: GradientBlock;
-
     private _step: number;
     /**
      * Gets value indicating which step this color is associated with (between 0 and 1)
@@ -27,7 +25,6 @@ export class GradientBlockColorStep {
     */
     public set step(val: number) {
         this._step = val;
-        this._parent.onValueChangedObservable?.notifyObservers(this._parent);
     }
 
     private _color: Color3;
@@ -44,17 +41,14 @@ export class GradientBlockColorStep {
      */
     public set color(val: Color3) {
         this._color = val;
-        this._parent.onValueChangedObservable?.notifyObservers(this._parent);
     }
 
     /**
      * 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
      */
-    public constructor(parent: GradientBlock, step: number, color: Color3) {
-        this._parent = parent;
+    public constructor(step: number, color: Color3) {
         this.step = step;
         this.color = color;
     }
@@ -69,8 +63,8 @@ export class GradientBlock extends NodeMaterialBlock {
      * Gets or sets the list of color steps
      */
     public colorSteps: GradientBlockColorStep[] = [
-        new GradientBlockColorStep(this, 0, Color3.Black()),
-        new GradientBlockColorStep(this, 1.0, Color3.White())
+        new GradientBlockColorStep(0, Color3.Black()),
+        new GradientBlockColorStep(1.0, Color3.White())
     ];
 
     /** Gets an observable raised when the value is changed */
@@ -182,7 +176,7 @@ export class GradientBlock extends NodeMaterialBlock {
         this.colorSteps = [];
 
         for (var step of serializationObject.colorSteps) {
-            this.colorSteps.push(new GradientBlockColorStep(this, step.step, new Color3(step.color.r, step.color.g, step.color.b)));
+            this.colorSteps.push(new GradientBlockColorStep(step.step, new Color3(step.color.r, step.color.g, step.color.b)));
         }
     }
 

+ 9 - 9
src/Meshes/Builders/capsuleBuilder.ts

@@ -205,16 +205,16 @@ VertexData.CreateCapsule = function(
         }
         indices = indices.reverse();
 
-        if (options.orientation && !options.orientation.equals(Vector3.Up())) {
-            let m = new Matrix();
-            (options.orientation.clone().scale(Math.PI * 0.5).cross(Vector3.Up()).toQuaternion()).toRotationMatrix(m);
+        if(options.orientation && !options.orientation.equals(Vector3.Up())){
+            let m = new Matrix();             
+            (options.orientation.clone().scale(Math.PI*0.5).cross(Vector3.Up()).toQuaternion()).toRotationMatrix(m);
             let v = Vector3.Zero();
-            for (let i = 0; i < vertices.length; i += 3) {
-                v.set(vertices[i], vertices[i + 1], vertices[i + 2]);
+            for(let i = 0; i < vertices.length; i+=3){
+                v.set(vertices[i], vertices[i+1], vertices[i+2]);
                 Vector3.TransformCoordinatesToRef(v.clone(), m, v);
-                vertices[i] = v.x;
-                vertices[i + 1] = v.y;
-                vertices[i + 2] = v.z;
+                vertices[i] = v.x
+                vertices[i+1] = v.y
+                vertices[i+2] = v.z                
             }
         }
 
@@ -296,7 +296,7 @@ export class CapsuleBuilder {
 
         var capsule = new Mesh(name, scene);
         var vertexData = VertexData.CreateCapsule(options);
-        vertexData.applyToMesh(capsule);
+        vertexData.applyToMesh(capsule);  
         return capsule;
     }
 }

+ 13 - 0
src/Meshes/abstractMesh.ts

@@ -558,6 +558,19 @@ export class AbstractMesh extends TransformNode implements IDisposable, ICullabl
     }
 
     /**
+     * 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.
+     */
+    public get collisionResponse(): boolean {
+        return this._meshCollisionData._collisionResponse;
+    }
+
+    public set collisionResponse(response: boolean) {
+        this._meshCollisionData._collisionResponse = response;
+    }
+    /**
      * 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
      */

BIN
tests/validation/ReferenceImages/CreateCapsule.png


+ 2 - 1
tests/validation/config.json

@@ -334,7 +334,8 @@
         },
         {
             "title": "Capsule",
-            "playgroundId": "#JAFIIU#0",
+            "renderCount": 10,
+            "playgroundId": "#JAFIIU#1",
             "referenceImage": "CreateCapsule.png"
         },
         {