@galacean/engine-physics-physx 0.9.20 → 0.9.21

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,33 +1,8 @@
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';
1
4
  import { Vector3, Quaternion } from '@galacean/engine';
2
5
 
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
-
31
6
  /**
32
7
  * PhysX runtime mode.
33
8
  */ var PhysXRuntimeMode;
@@ -37,26 +12,6 @@ function __decorate(decorators, target, key, desc) {
37
12
  PhysXRuntimeMode[PhysXRuntimeMode[/** JavaScript mode. */ "JavaScript"] = 2] = "JavaScript";
38
13
  })(PhysXRuntimeMode || (PhysXRuntimeMode = {}));
39
14
 
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
-
60
15
  /**
61
16
  * a base interface providing common functionality for PhysX joints
62
17
  */ var PhysXJoint = /*#__PURE__*/ function() {
@@ -120,15 +75,9 @@ function _inherits(subClass, superClass) {
120
75
  };
121
76
  return PhysXJoint;
122
77
  }();
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
- })();
78
+ PhysXJoint._xAxis = new Vector3(1, 0, 0);
79
+ PhysXJoint._defaultVec = new Vector3();
80
+ PhysXJoint._defaultQuat = new Quaternion();
132
81
 
133
82
  /**
134
83
  * A fixed joint permits no relative movement between two colliders. ie the bodies are glued together.
@@ -406,15 +355,11 @@ var ShapeFlag;
406
355
  };
407
356
  return PhysXColliderShape;
408
357
  }();
409
- (function() {
410
- PhysXColliderShape.halfSqrt = 0.70710678118655;
411
- })();
412
- (function() {
413
- PhysXColliderShape.transform = {
414
- translation: new Vector3(),
415
- rotation: null
416
- };
417
- })();
358
+ PhysXColliderShape.halfSqrt = 0.70710678118655;
359
+ PhysXColliderShape.transform = {
360
+ translation: new Vector3(),
361
+ rotation: null
362
+ };
418
363
 
419
364
  /**
420
365
  * Box collider shape in PhysX.
@@ -457,9 +402,7 @@ var ShapeFlag;
457
402
  };
458
403
  return PhysXBoxColliderShape;
459
404
  }(PhysXColliderShape);
460
- (function() {
461
- PhysXBoxColliderShape._tempHalfExtents = new Vector3();
462
- })();
405
+ PhysXBoxColliderShape._tempHalfExtents = new Vector3();
463
406
 
464
407
  /**
465
408
  * Capsule collider shape in PhysX.
@@ -710,12 +653,10 @@ var /**
710
653
  };
711
654
  return PhysXCollider;
712
655
  }();
713
- (function() {
714
- PhysXCollider._tempTransform = {
715
- translation: null,
716
- rotation: null
717
- };
718
- })();
656
+ PhysXCollider._tempTransform = {
657
+ translation: null,
658
+ rotation: null
659
+ };
719
660
 
720
661
  var CollisionDetectionMode;
721
662
  (function(CollisionDetectionMode) {
@@ -872,12 +813,8 @@ var CollisionDetectionMode;
872
813
  };
873
814
  return PhysXDynamicCollider;
874
815
  }(PhysXCollider);
875
- (function() {
876
- PhysXDynamicCollider._tempTranslation = new Vector3();
877
- })();
878
- (function() {
879
- PhysXDynamicCollider._tempRotation = new Quaternion();
880
- })();
816
+ PhysXDynamicCollider._tempTranslation = new Vector3();
817
+ PhysXDynamicCollider._tempRotation = new Quaternion();
881
818
 
882
819
  /**
883
820
  * A manager is a collection of colliders and constraints which can interact.
@@ -1077,12 +1014,8 @@ var CollisionDetectionMode;
1077
1014
  };
1078
1015
  return PhysXPhysicsManager;
1079
1016
  }();
1080
- (function() {
1081
- PhysXPhysicsManager._tempPosition = new Vector3();
1082
- })();
1083
- (function() {
1084
- PhysXPhysicsManager._tempNormal = new Vector3();
1085
- })();
1017
+ PhysXPhysicsManager._tempPosition = new Vector3();
1018
+ PhysXPhysicsManager._tempNormal = new Vector3();
1086
1019
  var /**
1087
1020
  * Filtering flags for scene queries.
1088
1021
  */ QueryFlag;
@@ -1370,7 +1303,7 @@ var PhysXPhysics = /*#__PURE__*/ function() {
1370
1303
  };
1371
1304
  return PhysXPhysics1;
1372
1305
  }();
1373
- PhysXPhysics = __decorate([
1306
+ PhysXPhysics = _ts_decorate([
1374
1307
  StaticInterfaceImplement()
1375
1308
  ], PhysXPhysics);
1376
1309