@galacean/engine-physics-physx 1.4.0-alpha.1 → 1.4.0-alpha.2
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 +35 -19
- 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 +35 -19
- package/dist/main.js.map +1 -1
- package/dist/module.js +36 -20
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
- package/types/PhysXDynamicCollider.d.ts +4 -0
- package/types/PhysXPhysics.d.ts +2 -2
- package/types/PhysXPhysicsScene.d.ts +2 -2
- package/types/shape/PhysXColliderShape.d.ts +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-physics-physx",
|
|
3
|
-
"version": "1.4.0-alpha.
|
|
3
|
+
"version": "1.4.0-alpha.2",
|
|
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
|
|
30
|
-
"@galacean/engine": "1.4.0-alpha.
|
|
29
|
+
"@galacean/engine": "1.4.0-alpha.2",
|
|
30
|
+
"@galacean/engine-design": "1.4.0-alpha.2"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@galacean/engine": "1.4.0-alpha.
|
|
33
|
+
"@galacean/engine": "1.4.0-alpha.2"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"b:types": "tsc"
|
|
@@ -103,6 +103,10 @@ export declare class PhysXDynamicCollider extends PhysXCollider implements IDyna
|
|
|
103
103
|
* {@inheritDoc IDynamicCollider.setCollisionDetectionMode }
|
|
104
104
|
*/
|
|
105
105
|
setCollisionDetectionMode(value: number): void;
|
|
106
|
+
/**
|
|
107
|
+
* {@inheritDoc IDynamicCollider.setUseGravity }
|
|
108
|
+
*/
|
|
109
|
+
setUseGravity(value: boolean): void;
|
|
106
110
|
/**
|
|
107
111
|
* {@inheritDoc IDynamicCollider.setIsKinematic }
|
|
108
112
|
*/
|
package/types/PhysXPhysics.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Quaternion, Vector3 } from "@galacean/engine";
|
|
2
|
-
import { IBoxColliderShape, ICapsuleColliderShape, ICharacterController, IDynamicCollider, IFixedJoint, IHingeJoint, IPhysics, IPhysicsManager, IPhysicsMaterial, IPhysicsScene, IPlaneColliderShape, ISphereColliderShape, ISpringJoint, IStaticCollider } from "@galacean/engine-design";
|
|
2
|
+
import { IBoxColliderShape, ICapsuleColliderShape, ICharacterController, ICollision, IDynamicCollider, IFixedJoint, IHingeJoint, IPhysics, IPhysicsManager, IPhysicsMaterial, IPhysicsScene, IPlaneColliderShape, ISphereColliderShape, ISpringJoint, IStaticCollider } from "@galacean/engine-design";
|
|
3
3
|
import { PhysXCollider } from "./PhysXCollider";
|
|
4
4
|
import { PhysXPhysicsManager } from "./PhysXPhysicsManager";
|
|
5
5
|
import { PhysXPhysicsMaterial } from "./PhysXPhysicsMaterial";
|
|
@@ -29,7 +29,7 @@ export declare class PhysXPhysics implements IPhysics {
|
|
|
29
29
|
/**
|
|
30
30
|
* {@inheritDoc IPhysics.createPhysicsScene }
|
|
31
31
|
*/
|
|
32
|
-
createPhysicsScene(physicsManager: PhysXPhysicsManager, onContactBegin?: (
|
|
32
|
+
createPhysicsScene(physicsManager: PhysXPhysicsManager, onContactBegin?: (collision: ICollision) => void, onContactEnd?: (collision: ICollision) => void, onContactStay?: (collision: ICollision) => void, onTriggerBegin?: (obj1: number, obj2: number) => void, onTriggerEnd?: (obj1: number, obj2: number) => void, onTriggerStay?: (obj1: number, obj2: number) => void): IPhysicsScene;
|
|
33
33
|
/**
|
|
34
34
|
* {@inheritDoc IPhysics.createStaticCollider }
|
|
35
35
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ray, Vector3 } from "@galacean/engine";
|
|
2
|
-
import { IPhysicsScene } from "@galacean/engine-design";
|
|
2
|
+
import { ICollision, IPhysicsScene } from "@galacean/engine-design";
|
|
3
3
|
import { PhysXCharacterController } from "./PhysXCharacterController";
|
|
4
4
|
import { PhysXCollider } from "./PhysXCollider";
|
|
5
5
|
import { PhysXPhysics } from "./PhysXPhysics";
|
|
@@ -23,7 +23,7 @@ export declare class PhysXPhysicsScene implements IPhysicsScene {
|
|
|
23
23
|
private readonly _onTriggerStay?;
|
|
24
24
|
private _currentEvents;
|
|
25
25
|
private _eventPool;
|
|
26
|
-
constructor(physXPhysics: PhysXPhysics, physicsManager: PhysXPhysicsManager, onContactEnter?: (
|
|
26
|
+
constructor(physXPhysics: PhysXPhysics, physicsManager: PhysXPhysicsManager, onContactEnter?: (collision: ICollision) => void, onContactExit?: (collision: ICollision) => void, onContactStay?: (collision: ICollision) => void, onTriggerEnter?: (obj1: number, obj2: number) => void, onTriggerExit?: (obj1: number, obj2: number) => void, onTriggerStay?: (obj1: number, obj2: number) => void);
|
|
27
27
|
/**
|
|
28
28
|
* {@inheritDoc IPhysicsManager.setGravity }
|
|
29
29
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Quaternion, Vector3 } from "@galacean/engine";
|
|
1
|
+
import { Quaternion, Vector3, Vector4 } from "@galacean/engine";
|
|
2
2
|
import { IColliderShape } from "@galacean/engine-design";
|
|
3
3
|
import { PhysXPhysics } from "../PhysXPhysics";
|
|
4
4
|
import { PhysXPhysicsMaterial } from "../PhysXPhysicsMaterial";
|
|
@@ -17,6 +17,7 @@ export declare enum ShapeFlag {
|
|
|
17
17
|
* Abstract class for collider shapes.
|
|
18
18
|
*/
|
|
19
19
|
export declare abstract class PhysXColliderShape implements IColliderShape {
|
|
20
|
+
protected static _tempVector4: Vector4;
|
|
20
21
|
static readonly halfSqrt: number;
|
|
21
22
|
static transform: {
|
|
22
23
|
translation: Vector3;
|
|
@@ -55,6 +56,10 @@ export declare abstract class PhysXColliderShape implements IColliderShape {
|
|
|
55
56
|
* {@inheritDoc IColliderShape.setIsTrigger }
|
|
56
57
|
*/
|
|
57
58
|
setIsTrigger(value: boolean): void;
|
|
59
|
+
/**
|
|
60
|
+
* {@inheritDoc IColliderShape.pointDistance }
|
|
61
|
+
*/
|
|
62
|
+
pointDistance(point: Vector3): Vector4;
|
|
58
63
|
/**
|
|
59
64
|
* {@inheritDoc IColliderShape.destroy }
|
|
60
65
|
*/
|