@galacean/engine-physics-physx 2.0.0-alpha.40 → 2.0.0-alpha.43
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 +27 -36
- 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 +27 -36
- package/dist/main.js.map +1 -1
- package/dist/module.js +27 -36
- package/dist/module.js.map +1 -1
- package/libs/physx.release.simd.wasm +0 -0
- package/libs/physx.release.wasm +0 -0
- package/package.json +4 -4
- package/types/PhysXDynamicCollider.d.ts +2 -6
- package/types/PhysXPhysicsScene.d.ts +4 -0
package/dist/browser.js
CHANGED
|
@@ -676,44 +676,27 @@
|
|
|
676
676
|
this._pxActor.setSolverIterationCounts(value, 1);
|
|
677
677
|
};
|
|
678
678
|
/**
|
|
679
|
-
* {@inheritDoc IDynamicCollider.setCollisionDetectionMode }
|
|
680
|
-
*/ _proto.setCollisionDetectionMode = function setCollisionDetectionMode(value) {
|
|
681
|
-
var physX = this._physXPhysics._physX;
|
|
682
|
-
switch(value){
|
|
683
|
-
case 1:
|
|
684
|
-
this._pxActor.setRigidBodyFlag(physX.PxRigidBodyFlag.eENABLE_CCD, true);
|
|
685
|
-
this._pxActor.setRigidBodyFlag(physX.PxRigidBodyFlag.eENABLE_CCD_FRICTION, false);
|
|
686
|
-
this._pxActor.setRigidBodyFlag(physX.PxRigidBodyFlag.eENABLE_SPECULATIVE_CCD, false);
|
|
687
|
-
break;
|
|
688
|
-
case 2:
|
|
689
|
-
this._pxActor.setRigidBodyFlag(physX.PxRigidBodyFlag.eENABLE_CCD, true);
|
|
690
|
-
this._pxActor.setRigidBodyFlag(physX.PxRigidBodyFlag.eENABLE_CCD_FRICTION, true);
|
|
691
|
-
this._pxActor.setRigidBodyFlag(physX.PxRigidBodyFlag.eENABLE_SPECULATIVE_CCD, false);
|
|
692
|
-
break;
|
|
693
|
-
case 3:
|
|
694
|
-
this._pxActor.setRigidBodyFlag(physX.PxRigidBodyFlag.eENABLE_CCD, false);
|
|
695
|
-
this._pxActor.setRigidBodyFlag(physX.PxRigidBodyFlag.eENABLE_CCD_FRICTION, false);
|
|
696
|
-
this._pxActor.setRigidBodyFlag(physX.PxRigidBodyFlag.eENABLE_SPECULATIVE_CCD, true);
|
|
697
|
-
break;
|
|
698
|
-
case 0:
|
|
699
|
-
this._pxActor.setRigidBodyFlag(physX.PxRigidBodyFlag.eENABLE_CCD, false);
|
|
700
|
-
this._pxActor.setRigidBodyFlag(physX.PxRigidBodyFlag.eENABLE_CCD_FRICTION, false);
|
|
701
|
-
this._pxActor.setRigidBodyFlag(physX.PxRigidBodyFlag.eENABLE_SPECULATIVE_CCD, false);
|
|
702
|
-
break;
|
|
703
|
-
}
|
|
704
|
-
};
|
|
705
|
-
/**
|
|
706
679
|
* {@inheritDoc IDynamicCollider.setUseGravity }
|
|
707
680
|
*/ _proto.setUseGravity = function setUseGravity(value) {
|
|
708
681
|
this._pxActor.setActorFlag(this._physXPhysics._physX.PxActorFlag.eDISABLE_GRAVITY, !value);
|
|
709
682
|
};
|
|
710
683
|
/**
|
|
711
|
-
* {@inheritDoc IDynamicCollider.
|
|
712
|
-
*/ _proto.
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
684
|
+
* {@inheritDoc IDynamicCollider.setMotionState }
|
|
685
|
+
*/ _proto.setMotionState = function setMotionState(isKinematic, collisionDetectionMode) {
|
|
686
|
+
var PxRigidBodyFlag = this._physXPhysics._physX.PxRigidBodyFlag;
|
|
687
|
+
// PhysX 4.1 does not support sweep-based CCD on kinematic bodies
|
|
688
|
+
var useSpeculativeCCD = collisionDetectionMode === 3 || isKinematic && collisionDetectionMode !== 0;
|
|
689
|
+
this._pxActor.setRigidBodyFlag(PxRigidBodyFlag.eENABLE_CCD, false);
|
|
690
|
+
this._pxActor.setRigidBodyFlag(PxRigidBodyFlag.eENABLE_CCD_FRICTION, false);
|
|
691
|
+
this._pxActor.setRigidBodyFlag(PxRigidBodyFlag.eENABLE_SPECULATIVE_CCD, false);
|
|
692
|
+
this._pxActor.setRigidBodyFlag(PxRigidBodyFlag.eKINEMATIC, isKinematic);
|
|
693
|
+
if (useSpeculativeCCD) {
|
|
694
|
+
this._pxActor.setRigidBodyFlag(PxRigidBodyFlag.eENABLE_SPECULATIVE_CCD, true);
|
|
695
|
+
} else if (collisionDetectionMode !== 0) {
|
|
696
|
+
this._pxActor.setRigidBodyFlag(PxRigidBodyFlag.eENABLE_CCD, true);
|
|
697
|
+
if (collisionDetectionMode === 2) {
|
|
698
|
+
this._pxActor.setRigidBodyFlag(PxRigidBodyFlag.eENABLE_CCD_FRICTION, true);
|
|
699
|
+
}
|
|
717
700
|
}
|
|
718
701
|
};
|
|
719
702
|
/**
|
|
@@ -974,6 +957,14 @@
|
|
|
974
957
|
this._fetchResults();
|
|
975
958
|
};
|
|
976
959
|
/**
|
|
960
|
+
* {@inheritDoc IPhysicsScene.setContactEventEnabled }
|
|
961
|
+
*/ _proto.setContactEventEnabled = function setContactEventEnabled(enabled) {
|
|
962
|
+
this._physXPhysics._physX.setContactEventEnabled(this._physXSimulationCallbackInstance, enabled);
|
|
963
|
+
if (!enabled) {
|
|
964
|
+
this._contactEventCount = 0;
|
|
965
|
+
}
|
|
966
|
+
};
|
|
967
|
+
/**
|
|
977
968
|
* {@inheritDoc IPhysicsScene.updateEvents }
|
|
978
969
|
*/ _proto.updateEvents = function updateEvents() {
|
|
979
970
|
var physicsEvents = this._physicsEvents;
|
|
@@ -1777,9 +1768,9 @@
|
|
|
1777
1768
|
this._initializeState = 0;
|
|
1778
1769
|
this._runTimeMode = runtimeMode;
|
|
1779
1770
|
var _runtimeUrls_wasmSIMDModeUrl;
|
|
1780
|
-
this._wasmSIMDModeUrl = (_runtimeUrls_wasmSIMDModeUrl = runtimeUrls == null ? void 0 : runtimeUrls.wasmSIMDModeUrl) != null ? _runtimeUrls_wasmSIMDModeUrl : "https://mdn.alipayobjects.com/rms/uri/file/as/apwallet/
|
|
1771
|
+
this._wasmSIMDModeUrl = (_runtimeUrls_wasmSIMDModeUrl = runtimeUrls == null ? void 0 : runtimeUrls.wasmSIMDModeUrl) != null ? _runtimeUrls_wasmSIMDModeUrl : "https://mdn.alipayobjects.com/rms/uri/file/as/apwallet/1787063975729/suyi/physx.release.simd.js";
|
|
1781
1772
|
var _runtimeUrls_wasmModeUrl;
|
|
1782
|
-
this._wasmModeUrl = (_runtimeUrls_wasmModeUrl = runtimeUrls == null ? void 0 : runtimeUrls.wasmModeUrl) != null ? _runtimeUrls_wasmModeUrl : "https://mdn.alipayobjects.com/rms/uri/file/as/apwallet/
|
|
1773
|
+
this._wasmModeUrl = (_runtimeUrls_wasmModeUrl = runtimeUrls == null ? void 0 : runtimeUrls.wasmModeUrl) != null ? _runtimeUrls_wasmModeUrl : "https://mdn.alipayobjects.com/rms/uri/file/as/apwallet/1787063975729/suyi/physx.release.js";
|
|
1783
1774
|
}
|
|
1784
1775
|
var _proto = PhysXPhysics.prototype;
|
|
1785
1776
|
/**
|
|
@@ -1949,7 +1940,7 @@
|
|
|
1949
1940
|
}();
|
|
1950
1941
|
|
|
1951
1942
|
//@ts-ignore
|
|
1952
|
-
var version = "2.0.0-alpha.
|
|
1943
|
+
var version = "2.0.0-alpha.43";
|
|
1953
1944
|
console.log("Galacean Engine Physics PhysX Version: " + version);
|
|
1954
1945
|
|
|
1955
1946
|
exports.PhysXPhysics = PhysXPhysics;
|