@galacean/engine-design 2.0.0-alpha.2 → 2.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-design",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"types": "types/index.d.ts",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@galacean/engine-math": "2.0.0-alpha.
|
|
20
|
+
"@galacean/engine-math": "2.0.0-alpha.5"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"b:types": "tsc"
|
|
@@ -89,13 +89,13 @@ export interface IPhysics {
|
|
|
89
89
|
/**
|
|
90
90
|
* Create mesh collider shape.
|
|
91
91
|
* @param uniqueID - Shape unique id
|
|
92
|
-
* @param
|
|
93
|
-
* @param vertexCount - Number of vertices
|
|
92
|
+
* @param positions - Vertex positions
|
|
94
93
|
* @param indices - Index array (null for convex mesh)
|
|
95
94
|
* @param isConvex - Whether to create convex mesh (true) or triangle mesh (false)
|
|
96
95
|
* @param material - The material of this shape
|
|
96
|
+
* @param cookingFlags - Cooking flags
|
|
97
97
|
*/
|
|
98
|
-
createMeshColliderShape(uniqueID: number,
|
|
98
|
+
createMeshColliderShape(uniqueID: number, positions: Vector3[], indices: Uint8Array | Uint16Array | Uint32Array | null, isConvex: boolean, material: IPhysicsMaterial, cookingFlags: number): IMeshColliderShape | null;
|
|
99
99
|
/**
|
|
100
100
|
* Create fixed joint.
|
|
101
101
|
* @param collider - collider of joint
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
1
2
|
import { IColliderShape } from "./IColliderShape";
|
|
2
3
|
/**
|
|
3
4
|
* Interface for mesh collider shape.
|
|
@@ -5,22 +6,11 @@ import { IColliderShape } from "./IColliderShape";
|
|
|
5
6
|
export interface IMeshColliderShape extends IColliderShape {
|
|
6
7
|
/**
|
|
7
8
|
* Set mesh data for this collider shape.
|
|
8
|
-
* @param
|
|
9
|
-
* @param vertexCount - Number of vertices
|
|
9
|
+
* @param positions - Vertex positions
|
|
10
10
|
* @param indices - The index array (Uint16Array or Uint32Array), required for triangle mesh
|
|
11
11
|
* @param isConvex - Whether to use convex mesh (true) or triangle mesh (false)
|
|
12
|
+
* @param cookingFlags - Cooking flags
|
|
13
|
+
* @returns Whether the mesh data was successfully set
|
|
12
14
|
*/
|
|
13
|
-
setMeshData(
|
|
14
|
-
/**
|
|
15
|
-
* Set whether the triangle mesh should be double-sided for collision detection.
|
|
16
|
-
* Only applies to triangle mesh (non-convex). Default: false
|
|
17
|
-
* @param value - Whether to enable double-sided collision
|
|
18
|
-
*/
|
|
19
|
-
setDoubleSided(value: boolean): void;
|
|
20
|
-
/**
|
|
21
|
-
* Set whether to use tight bounds for convex mesh.
|
|
22
|
-
* Only applies to convex mesh. Default: true
|
|
23
|
-
* @param value - Whether to enable tight bounds
|
|
24
|
-
*/
|
|
25
|
-
setTightBounds(value: boolean): void;
|
|
15
|
+
setMeshData(positions: Vector3[], indices: Uint8Array | Uint16Array | Uint32Array | null, isConvex: boolean, cookingFlags: number): boolean;
|
|
26
16
|
}
|