@galacean/engine-physics-physx 1.3.24 → 1.4.0-alpha.1
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/dist/browser.js +219 -206
- package/dist/browser.js.map +1 -1
- package/dist/browser.min.js +1 -1
- package/dist/browser.min.js.map +1 -1
- package/dist/main.js +219 -206
- package/dist/main.js.map +1 -1
- package/dist/module.js +212 -200
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
- package/types/PhysXDynamicCollider.d.ts +36 -0
- package/types/PhysXPhysicsScene.d.ts +0 -9
- package/types/joint/PhysXHingeJoint.d.ts +5 -5
- package/types/joint/PhysXJoint.d.ts +15 -9
- package/types/joint/PhysXSpringJoint.d.ts +0 -6
- package/types/shape/PhysXBoxColliderShape.d.ts +0 -1
- package/types/shape/PhysXCapsuleColliderShape.d.ts +0 -1
- package/dist/miniprogram.js +0 -1406
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-physics-physx",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0-alpha.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"types/**/*"
|
|
27
27
|
],
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@galacean/engine-design": "1.
|
|
30
|
-
"@galacean/engine": "1.
|
|
29
|
+
"@galacean/engine-design": "1.4.0-alpha.1",
|
|
30
|
+
"@galacean/engine": "1.4.0-alpha.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@galacean/engine": "1.
|
|
33
|
+
"@galacean/engine": "1.4.0-alpha.1"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"b:types": "tsc"
|
|
@@ -22,18 +22,34 @@ export declare class PhysXDynamicCollider extends PhysXCollider implements IDyna
|
|
|
22
22
|
private static _tempTranslation;
|
|
23
23
|
private static _tempRotation;
|
|
24
24
|
constructor(physXPhysics: PhysXPhysics, position: Vector3, rotation: Quaternion);
|
|
25
|
+
/**
|
|
26
|
+
* {@inheritDoc IDynamicCollider.getLinearDamping }
|
|
27
|
+
*/
|
|
28
|
+
getLinearDamping(): number;
|
|
25
29
|
/**
|
|
26
30
|
* {@inheritDoc IDynamicCollider.setLinearDamping }
|
|
27
31
|
*/
|
|
28
32
|
setLinearDamping(value: number): void;
|
|
33
|
+
/**
|
|
34
|
+
* {@inheritDoc IDynamicCollider.getAngularDamping }
|
|
35
|
+
*/
|
|
36
|
+
getAngularDamping(): number;
|
|
29
37
|
/**
|
|
30
38
|
* {@inheritDoc IDynamicCollider.setAngularDamping }
|
|
31
39
|
*/
|
|
32
40
|
setAngularDamping(value: number): void;
|
|
41
|
+
/**
|
|
42
|
+
* {@inheritDoc IDynamicCollider.getLinearVelocity }
|
|
43
|
+
*/
|
|
44
|
+
getLinearVelocity(out: Vector3): Vector3;
|
|
33
45
|
/**
|
|
34
46
|
* {@inheritDoc IDynamicCollider.setLinearVelocity }
|
|
35
47
|
*/
|
|
36
48
|
setLinearVelocity(value: Vector3): void;
|
|
49
|
+
/**
|
|
50
|
+
* {@inheritDoc IDynamicCollider.getAngularVelocity }
|
|
51
|
+
*/
|
|
52
|
+
getAngularVelocity(out: Vector3): Vector3;
|
|
37
53
|
/**
|
|
38
54
|
* {@inheritDoc IDynamicCollider.setAngularVelocity }
|
|
39
55
|
*/
|
|
@@ -42,6 +58,10 @@ export declare class PhysXDynamicCollider extends PhysXCollider implements IDyna
|
|
|
42
58
|
* {@inheritDoc IDynamicCollider.setMass }
|
|
43
59
|
*/
|
|
44
60
|
setMass(value: number): void;
|
|
61
|
+
/**
|
|
62
|
+
* {@inheritDoc IDynamicCollider.getCenterOfMass }
|
|
63
|
+
*/
|
|
64
|
+
getCenterOfMass(out: Vector3): Vector3;
|
|
45
65
|
/**
|
|
46
66
|
* {@inheritDoc IDynamicCollider.setCenterOfMass }
|
|
47
67
|
*/
|
|
@@ -50,10 +70,22 @@ export declare class PhysXDynamicCollider extends PhysXCollider implements IDyna
|
|
|
50
70
|
* {@inheritDoc IDynamicCollider.setInertiaTensor }
|
|
51
71
|
*/
|
|
52
72
|
setInertiaTensor(value: Vector3): void;
|
|
73
|
+
/**
|
|
74
|
+
* {@inheritDoc IDynamicCollider.getInertiaTensor }
|
|
75
|
+
*/
|
|
76
|
+
getInertiaTensor(out: Vector3): Vector3;
|
|
77
|
+
/**
|
|
78
|
+
* {@inheritDoc IDynamicCollider.setMassAndUpdateInertia }
|
|
79
|
+
*/
|
|
80
|
+
setMassAndUpdateInertia(mass: number): void;
|
|
53
81
|
/**
|
|
54
82
|
* {@inheritDoc IDynamicCollider.setMaxAngularVelocity }
|
|
55
83
|
*/
|
|
56
84
|
setMaxAngularVelocity(value: number): void;
|
|
85
|
+
/**
|
|
86
|
+
* {@inheritDoc IDynamicCollider.getMaxDepenetrationVelocity }
|
|
87
|
+
*/
|
|
88
|
+
getMaxDepenetrationVelocity(): number;
|
|
57
89
|
/**
|
|
58
90
|
* {@inheritDoc IDynamicCollider.setMaxDepenetrationVelocity }
|
|
59
91
|
*/
|
|
@@ -95,6 +127,10 @@ export declare class PhysXDynamicCollider extends PhysXCollider implements IDyna
|
|
|
95
127
|
* {@inheritDoc IDynamicCollider.sleep }
|
|
96
128
|
*/
|
|
97
129
|
sleep(): void;
|
|
130
|
+
/**
|
|
131
|
+
* {@inheritDoc IDynamicCollider.isSleeping }
|
|
132
|
+
*/
|
|
133
|
+
isSleeping(): boolean;
|
|
98
134
|
/**
|
|
99
135
|
* {@inheritDoc IDynamicCollider.wakeUp }
|
|
100
136
|
*/
|
|
@@ -4,7 +4,6 @@ import { PhysXCharacterController } from "./PhysXCharacterController";
|
|
|
4
4
|
import { PhysXCollider } from "./PhysXCollider";
|
|
5
5
|
import { PhysXPhysics } from "./PhysXPhysics";
|
|
6
6
|
import { PhysXPhysicsManager } from "./PhysXPhysicsManager";
|
|
7
|
-
import { PhysXColliderShape } from "./shape/PhysXColliderShape";
|
|
8
7
|
/**
|
|
9
8
|
* A manager is a collection of colliders and constraints which can interact.
|
|
10
9
|
*/
|
|
@@ -29,14 +28,6 @@ export declare class PhysXPhysicsScene implements IPhysicsScene {
|
|
|
29
28
|
* {@inheritDoc IPhysicsManager.setGravity }
|
|
30
29
|
*/
|
|
31
30
|
setGravity(value: Vector3): void;
|
|
32
|
-
/**
|
|
33
|
-
* {@inheritDoc IPhysicsManager.addColliderShape }
|
|
34
|
-
*/
|
|
35
|
-
addColliderShape(colliderShape: PhysXColliderShape): void;
|
|
36
|
-
/**
|
|
37
|
-
* {@inheritDoc IPhysicsManager.removeColliderShape }
|
|
38
|
-
*/
|
|
39
|
-
removeColliderShape(colliderShape: PhysXColliderShape): void;
|
|
40
31
|
/**
|
|
41
32
|
* {@inheritDoc IPhysicsManager.addCollider }
|
|
42
33
|
*/
|
|
@@ -7,17 +7,17 @@ import { PhysXJoint } from "./PhysXJoint";
|
|
|
7
7
|
* A joint which behaves in a similar way to a hinge or axle.
|
|
8
8
|
*/
|
|
9
9
|
export declare class PhysXHingeJoint extends PhysXJoint implements IHingeJoint {
|
|
10
|
+
protected static _xAxis: Vector3;
|
|
11
|
+
private _anchor;
|
|
12
|
+
private _connectedAnchor;
|
|
10
13
|
private _axisRotationQuaternion;
|
|
11
|
-
private _swingOffset;
|
|
12
14
|
constructor(physXPhysics: PhysXPhysics, collider: PhysXCollider);
|
|
13
15
|
/**
|
|
14
16
|
* {@inheritDoc IHingeJoint.setAxis }
|
|
15
17
|
*/
|
|
16
18
|
setAxis(value: Vector3): void;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*/
|
|
20
|
-
setSwingOffset(value: Vector3): void;
|
|
19
|
+
setAnchor(value: Vector3): void;
|
|
20
|
+
setConnectedAnchor(value: Vector3): void;
|
|
21
21
|
/**
|
|
22
22
|
* {@inheritDoc IHingeJoint.getAngle }
|
|
23
23
|
*/
|
|
@@ -6,12 +6,10 @@ import { PhysXPhysics } from "../PhysXPhysics";
|
|
|
6
6
|
* a base interface providing common functionality for PhysX joints
|
|
7
7
|
*/
|
|
8
8
|
export declare class PhysXJoint implements IJoint {
|
|
9
|
-
protected static _xAxis: Vector3;
|
|
10
9
|
protected static _defaultVec: Vector3;
|
|
11
10
|
protected static _defaultQuat: Quaternion;
|
|
12
11
|
protected _pxJoint: any;
|
|
13
12
|
protected _collider: PhysXCollider;
|
|
14
|
-
private _connectedAnchor;
|
|
15
13
|
private _breakForce;
|
|
16
14
|
private _breakTorque;
|
|
17
15
|
protected _physXPhysics: PhysXPhysics;
|
|
@@ -23,23 +21,27 @@ export declare class PhysXJoint implements IJoint {
|
|
|
23
21
|
/**
|
|
24
22
|
* {@inheritDoc IJoint.setConnectedAnchor }
|
|
25
23
|
*/
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* {@inheritDoc IJoint.setConnectedMassScale }
|
|
29
|
-
*/
|
|
30
|
-
setConnectedMassScale(value: number): void;
|
|
24
|
+
setAnchor(value: Vector3): void;
|
|
31
25
|
/**
|
|
32
|
-
* {@inheritDoc IJoint.
|
|
26
|
+
* {@inheritDoc IJoint.setConnectedAnchor }
|
|
33
27
|
*/
|
|
34
|
-
|
|
28
|
+
setConnectedAnchor(value: Vector3): void;
|
|
35
29
|
/**
|
|
36
30
|
* {@inheritDoc IJoint.setMassScale }
|
|
37
31
|
*/
|
|
38
32
|
setMassScale(value: number): void;
|
|
33
|
+
/**
|
|
34
|
+
* {@inheritDoc IJoint.setConnectedMassScale }
|
|
35
|
+
*/
|
|
36
|
+
setConnectedMassScale(value: number): void;
|
|
39
37
|
/**
|
|
40
38
|
* {@inheritDoc IJoint.setInertiaScale }
|
|
41
39
|
*/
|
|
42
40
|
setInertiaScale(value: number): void;
|
|
41
|
+
/**
|
|
42
|
+
* {@inheritDoc IJoint.setConnectedInertiaScale }
|
|
43
|
+
*/
|
|
44
|
+
setConnectedInertiaScale(value: number): void;
|
|
43
45
|
/**
|
|
44
46
|
* {@inheritDoc IJoint.setBreakForce }
|
|
45
47
|
*/
|
|
@@ -48,6 +50,10 @@ export declare class PhysXJoint implements IJoint {
|
|
|
48
50
|
* {@inheritDoc IJoint.setBreakTorque }
|
|
49
51
|
*/
|
|
50
52
|
setBreakTorque(value: number): void;
|
|
53
|
+
/**
|
|
54
|
+
* {@inheritDoc IJoint.destroy }
|
|
55
|
+
*/
|
|
56
|
+
destroy(): void;
|
|
51
57
|
/**
|
|
52
58
|
* Set the joint local pose for an actor.
|
|
53
59
|
* @param actor 0 for the first actor, 1 for the second actor.
|
|
@@ -2,17 +2,11 @@ import { PhysXPhysics } from "../PhysXPhysics";
|
|
|
2
2
|
import { PhysXJoint } from "./PhysXJoint";
|
|
3
3
|
import { ISpringJoint } from "@galacean/engine-design";
|
|
4
4
|
import { PhysXCollider } from "../PhysXCollider";
|
|
5
|
-
import { Vector3 } from "@galacean/engine";
|
|
6
5
|
/**
|
|
7
6
|
* a joint that maintains an upper or lower bound (or both) on the distance between two points on different objects
|
|
8
7
|
*/
|
|
9
8
|
export declare class PhysXSpringJoint extends PhysXJoint implements ISpringJoint {
|
|
10
|
-
private _swingOffset;
|
|
11
9
|
constructor(physXPhysics: PhysXPhysics, collider: PhysXCollider);
|
|
12
|
-
/**
|
|
13
|
-
* {@inheritDoc ISpringJoint.setSwingOffset }
|
|
14
|
-
*/
|
|
15
|
-
setSwingOffset(value: Vector3): void;
|
|
16
10
|
/**
|
|
17
11
|
* {@inheritDoc ISpringJoint.setMinDistance }
|
|
18
12
|
*/
|
|
@@ -8,7 +8,6 @@ import { PhysXColliderShape } from "./PhysXColliderShape";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class PhysXBoxColliderShape extends PhysXColliderShape implements IBoxColliderShape {
|
|
10
10
|
private static _tempHalfExtents;
|
|
11
|
-
private _sizeScale;
|
|
12
11
|
constructor(physXPhysics: PhysXPhysics, uniqueID: number, size: Vector3, material: PhysXPhysicsMaterial);
|
|
13
12
|
/**
|
|
14
13
|
* {@inheritDoc IBoxColliderShape.setSize }
|
|
@@ -8,7 +8,6 @@ import { PhysXColliderShape } from "./PhysXColliderShape";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class PhysXCapsuleColliderShape extends PhysXColliderShape implements ICapsuleColliderShape {
|
|
10
10
|
private _upAxis;
|
|
11
|
-
private _sizeScale;
|
|
12
11
|
constructor(physXPhysics: PhysXPhysics, uniqueID: number, radius: number, height: number, material: PhysXPhysicsMaterial);
|
|
13
12
|
/**
|
|
14
13
|
* {@inheritDoc ICapsuleColliderShape.setRadius }
|