@galacean/engine-physics-physx 0.9.21 → 0.9.22

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/module.js CHANGED
@@ -1,8 +1,33 @@
1
- import _instanceof from '@swc/helpers/src/_instanceof.mjs';
2
- import _ts_decorate from '@swc/helpers/src/_ts_decorate.mjs';
3
- import _inherits from '@swc/helpers/src/_inherits.mjs';
4
1
  import { Vector3, Quaternion } from '@galacean/engine';
5
2
 
3
+ function _instanceof(left, right) {
4
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
5
+ return !!right[Symbol.hasInstance](left);
6
+ } else return left instanceof right;
7
+ }
8
+
9
+ /******************************************************************************
10
+ Copyright (c) Microsoft Corporation.
11
+
12
+ Permission to use, copy, modify, and/or distribute this software for any
13
+ purpose with or without fee is hereby granted.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
16
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
17
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
18
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
19
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
20
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21
+ PERFORMANCE OF THIS SOFTWARE.
22
+ ***************************************************************************** */
23
+
24
+ function __decorate(decorators, target, key, desc) {
25
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
26
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
27
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
28
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
29
+ }
30
+
6
31
  /**
7
32
  * PhysX runtime mode.
8
33
  */ var PhysXRuntimeMode;
@@ -12,6 +37,26 @@ import { Vector3, Quaternion } from '@galacean/engine';
12
37
  PhysXRuntimeMode[PhysXRuntimeMode[/** JavaScript mode. */ "JavaScript"] = 2] = "JavaScript";
13
38
  })(PhysXRuntimeMode || (PhysXRuntimeMode = {}));
14
39
 
40
+ function _set_prototype_of(o, p) {
41
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
42
+ o.__proto__ = p;
43
+
44
+ return o;
45
+ };
46
+
47
+ return _set_prototype_of(o, p);
48
+ }
49
+
50
+ function _inherits(subClass, superClass) {
51
+ if (typeof superClass !== "function" && superClass !== null) {
52
+ throw new TypeError("Super expression must either be null or a function");
53
+ }
54
+
55
+ subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
56
+
57
+ if (superClass) _set_prototype_of(subClass, superClass);
58
+ }
59
+
15
60
  /**
16
61
  * a base interface providing common functionality for PhysX joints
17
62
  */ var PhysXJoint = /*#__PURE__*/ function() {
@@ -75,9 +120,15 @@ import { Vector3, Quaternion } from '@galacean/engine';
75
120
  };
76
121
  return PhysXJoint;
77
122
  }();
78
- PhysXJoint._xAxis = new Vector3(1, 0, 0);
79
- PhysXJoint._defaultVec = new Vector3();
80
- PhysXJoint._defaultQuat = new Quaternion();
123
+ (function() {
124
+ PhysXJoint._xAxis = new Vector3(1, 0, 0);
125
+ })();
126
+ (function() {
127
+ PhysXJoint._defaultVec = new Vector3();
128
+ })();
129
+ (function() {
130
+ PhysXJoint._defaultQuat = new Quaternion();
131
+ })();
81
132
 
82
133
  /**
83
134
  * A fixed joint permits no relative movement between two colliders. ie the bodies are glued together.
@@ -355,11 +406,15 @@ var ShapeFlag;
355
406
  };
356
407
  return PhysXColliderShape;
357
408
  }();
358
- PhysXColliderShape.halfSqrt = 0.70710678118655;
359
- PhysXColliderShape.transform = {
360
- translation: new Vector3(),
361
- rotation: null
362
- };
409
+ (function() {
410
+ PhysXColliderShape.halfSqrt = 0.70710678118655;
411
+ })();
412
+ (function() {
413
+ PhysXColliderShape.transform = {
414
+ translation: new Vector3(),
415
+ rotation: null
416
+ };
417
+ })();
363
418
 
364
419
  /**
365
420
  * Box collider shape in PhysX.
@@ -402,7 +457,9 @@ PhysXColliderShape.transform = {
402
457
  };
403
458
  return PhysXBoxColliderShape;
404
459
  }(PhysXColliderShape);
405
- PhysXBoxColliderShape._tempHalfExtents = new Vector3();
460
+ (function() {
461
+ PhysXBoxColliderShape._tempHalfExtents = new Vector3();
462
+ })();
406
463
 
407
464
  /**
408
465
  * Capsule collider shape in PhysX.
@@ -653,10 +710,12 @@ var /**
653
710
  };
654
711
  return PhysXCollider;
655
712
  }();
656
- PhysXCollider._tempTransform = {
657
- translation: null,
658
- rotation: null
659
- };
713
+ (function() {
714
+ PhysXCollider._tempTransform = {
715
+ translation: null,
716
+ rotation: null
717
+ };
718
+ })();
660
719
 
661
720
  var CollisionDetectionMode;
662
721
  (function(CollisionDetectionMode) {
@@ -813,8 +872,12 @@ var CollisionDetectionMode;
813
872
  };
814
873
  return PhysXDynamicCollider;
815
874
  }(PhysXCollider);
816
- PhysXDynamicCollider._tempTranslation = new Vector3();
817
- PhysXDynamicCollider._tempRotation = new Quaternion();
875
+ (function() {
876
+ PhysXDynamicCollider._tempTranslation = new Vector3();
877
+ })();
878
+ (function() {
879
+ PhysXDynamicCollider._tempRotation = new Quaternion();
880
+ })();
818
881
 
819
882
  /**
820
883
  * A manager is a collection of colliders and constraints which can interact.
@@ -1014,8 +1077,12 @@ PhysXDynamicCollider._tempRotation = new Quaternion();
1014
1077
  };
1015
1078
  return PhysXPhysicsManager;
1016
1079
  }();
1017
- PhysXPhysicsManager._tempPosition = new Vector3();
1018
- PhysXPhysicsManager._tempNormal = new Vector3();
1080
+ (function() {
1081
+ PhysXPhysicsManager._tempPosition = new Vector3();
1082
+ })();
1083
+ (function() {
1084
+ PhysXPhysicsManager._tempNormal = new Vector3();
1085
+ })();
1019
1086
  var /**
1020
1087
  * Filtering flags for scene queries.
1021
1088
  */ QueryFlag;
@@ -1303,7 +1370,7 @@ var PhysXPhysics = /*#__PURE__*/ function() {
1303
1370
  };
1304
1371
  return PhysXPhysics1;
1305
1372
  }();
1306
- PhysXPhysics = _ts_decorate([
1373
+ PhysXPhysics = __decorate([
1307
1374
  StaticInterfaceImplement()
1308
1375
  ], PhysXPhysics);
1309
1376