@galacean/engine-design 1.5.0-alpha.1 → 1.5.0-beta.0
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": "1.5.0-
|
|
3
|
+
"version": "1.5.0-beta.0",
|
|
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": "1.5.0-
|
|
20
|
+
"@galacean/engine-math": "1.5.0-beta.0"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"b:types": "tsc"
|
|
@@ -13,6 +13,11 @@ export interface ICollider {
|
|
|
13
13
|
* @param shape - The collider shape attached
|
|
14
14
|
*/
|
|
15
15
|
removeShape(shape: IColliderShape): void;
|
|
16
|
+
/**
|
|
17
|
+
* Set the collision group of the collider.
|
|
18
|
+
* @param layer - The layer of the collider which the collider belongs to
|
|
19
|
+
*/
|
|
20
|
+
setCollisionLayer(layer: number): void;
|
|
16
21
|
/**
|
|
17
22
|
* Deletes the collider.
|
|
18
23
|
*/
|
|
@@ -88,17 +88,35 @@ export interface IPhysics {
|
|
|
88
88
|
createCapsuleColliderShape(uniqueID: number, radius: number, height: number, material: IPhysicsMaterial): ICapsuleColliderShape;
|
|
89
89
|
/**
|
|
90
90
|
* Create fixed joint.
|
|
91
|
-
* @param collider -
|
|
91
|
+
* @param collider - collider of joint
|
|
92
92
|
*/
|
|
93
93
|
createFixedJoint(collider: ICollider): IFixedJoint;
|
|
94
94
|
/**
|
|
95
95
|
* Create hinge joint.
|
|
96
|
-
* @param collider -
|
|
96
|
+
* @param collider - collider of joint
|
|
97
97
|
*/
|
|
98
98
|
createHingeJoint(collider: ICollider): IHingeJoint;
|
|
99
99
|
/**
|
|
100
100
|
* Create spring joint
|
|
101
|
-
* @param collider -
|
|
101
|
+
* @param collider - collider of joint
|
|
102
102
|
*/
|
|
103
103
|
createSpringJoint(collider: ICollider): ISpringJoint;
|
|
104
|
+
/**
|
|
105
|
+
* Get whether two collision layers can collide with each other.
|
|
106
|
+
* @param layer1 - The first collision layer
|
|
107
|
+
* @param layer2 - The second collision layer
|
|
108
|
+
* @returns Whether the layers should collide
|
|
109
|
+
*/
|
|
110
|
+
getColliderLayerCollision(layer1: number, layer2: number): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Set whether two collision layers can collide with each other.
|
|
113
|
+
* @param layer1 - The first collision layer
|
|
114
|
+
* @param layer2 - The second collision layer
|
|
115
|
+
* @param isCollide - Whether the layers should collide
|
|
116
|
+
*/
|
|
117
|
+
setColliderLayerCollision(layer1: number, layer2: number, isCollide: boolean): void;
|
|
118
|
+
/**
|
|
119
|
+
* Destroy physics scene.
|
|
120
|
+
*/
|
|
121
|
+
destroy(): void;
|
|
104
122
|
}
|
|
@@ -44,4 +44,8 @@ export interface IPhysicsScene {
|
|
|
44
44
|
* @returns Returns True if the ray intersects with a collider, otherwise false
|
|
45
45
|
*/
|
|
46
46
|
raycast(ray: Ray, distance: number, onRaycast: (obj: number) => boolean, outHitResult?: (shapeUniqueID: number, distance: number, point: Vector3, normal: Vector3) => void): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Destroy the physics scene.
|
|
49
|
+
*/
|
|
50
|
+
destroy(): void;
|
|
47
51
|
}
|