@galacean/engine-physics-physx 0.9.0-beta.82 → 0.9.0
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 +1349 -1337
- package/dist/main.js +54 -42
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +1325 -978
- package/dist/module.js +54 -42
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
package/dist/main.js
CHANGED
|
@@ -5,11 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var engine = require('@galacean/engine');
|
|
6
6
|
|
|
7
7
|
function _instanceof(left, right) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return left instanceof right;
|
|
12
|
-
}
|
|
8
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
9
|
+
return !!right[Symbol.hasInstance](left);
|
|
10
|
+
} else return left instanceof right;
|
|
13
11
|
}
|
|
14
12
|
|
|
15
13
|
/******************************************************************************
|
|
@@ -43,32 +41,24 @@ function __decorate(decorators, target, key, desc) {
|
|
|
43
41
|
PhysXRuntimeMode[PhysXRuntimeMode[/** JavaScript mode. */ "JavaScript"] = 2] = "JavaScript";
|
|
44
42
|
})(exports.PhysXRuntimeMode || (exports.PhysXRuntimeMode = {}));
|
|
45
43
|
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return o;
|
|
50
|
-
};
|
|
44
|
+
function _set_prototype_of(o, p) {
|
|
45
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
46
|
+
o.__proto__ = p;
|
|
51
47
|
|
|
52
|
-
|
|
53
|
-
}
|
|
48
|
+
return o;
|
|
49
|
+
};
|
|
54
50
|
|
|
55
|
-
|
|
56
|
-
return setPrototypeOf(o, p);
|
|
51
|
+
return _set_prototype_of(o, p);
|
|
57
52
|
}
|
|
58
53
|
|
|
59
54
|
function _inherits(subClass, superClass) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
65
|
-
constructor: {
|
|
66
|
-
value: subClass,
|
|
67
|
-
writable: true,
|
|
68
|
-
configurable: true
|
|
55
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
56
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
69
57
|
}
|
|
70
|
-
|
|
71
|
-
|
|
58
|
+
|
|
59
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
|
|
60
|
+
|
|
61
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
72
62
|
}
|
|
73
63
|
|
|
74
64
|
/**
|
|
@@ -134,9 +124,15 @@ function _inherits(subClass, superClass) {
|
|
|
134
124
|
};
|
|
135
125
|
return PhysXJoint;
|
|
136
126
|
}();
|
|
137
|
-
|
|
138
|
-
PhysXJoint.
|
|
139
|
-
|
|
127
|
+
(function() {
|
|
128
|
+
PhysXJoint._xAxis = new engine.Vector3(1, 0, 0);
|
|
129
|
+
})();
|
|
130
|
+
(function() {
|
|
131
|
+
PhysXJoint._defaultVec = new engine.Vector3();
|
|
132
|
+
})();
|
|
133
|
+
(function() {
|
|
134
|
+
PhysXJoint._defaultQuat = new engine.Quaternion();
|
|
135
|
+
})();
|
|
140
136
|
|
|
141
137
|
/**
|
|
142
138
|
* A fixed joint permits no relative movement between two colliders. ie the bodies are glued together.
|
|
@@ -414,11 +410,15 @@ var ShapeFlag;
|
|
|
414
410
|
};
|
|
415
411
|
return PhysXColliderShape;
|
|
416
412
|
}();
|
|
417
|
-
|
|
418
|
-
PhysXColliderShape.
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
413
|
+
(function() {
|
|
414
|
+
PhysXColliderShape.halfSqrt = 0.70710678118655;
|
|
415
|
+
})();
|
|
416
|
+
(function() {
|
|
417
|
+
PhysXColliderShape.transform = {
|
|
418
|
+
translation: new engine.Vector3(),
|
|
419
|
+
rotation: null
|
|
420
|
+
};
|
|
421
|
+
})();
|
|
422
422
|
|
|
423
423
|
/**
|
|
424
424
|
* Box collider shape in PhysX.
|
|
@@ -461,7 +461,9 @@ PhysXColliderShape.transform = {
|
|
|
461
461
|
};
|
|
462
462
|
return PhysXBoxColliderShape;
|
|
463
463
|
}(PhysXColliderShape);
|
|
464
|
-
|
|
464
|
+
(function() {
|
|
465
|
+
PhysXBoxColliderShape._tempHalfExtents = new engine.Vector3();
|
|
466
|
+
})();
|
|
465
467
|
|
|
466
468
|
/**
|
|
467
469
|
* Capsule collider shape in PhysX.
|
|
@@ -712,10 +714,12 @@ var /**
|
|
|
712
714
|
};
|
|
713
715
|
return PhysXCollider;
|
|
714
716
|
}();
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
717
|
+
(function() {
|
|
718
|
+
PhysXCollider._tempTransform = {
|
|
719
|
+
translation: null,
|
|
720
|
+
rotation: null
|
|
721
|
+
};
|
|
722
|
+
})();
|
|
719
723
|
|
|
720
724
|
var CollisionDetectionMode;
|
|
721
725
|
(function(CollisionDetectionMode) {
|
|
@@ -872,8 +876,12 @@ var CollisionDetectionMode;
|
|
|
872
876
|
};
|
|
873
877
|
return PhysXDynamicCollider;
|
|
874
878
|
}(PhysXCollider);
|
|
875
|
-
|
|
876
|
-
PhysXDynamicCollider.
|
|
879
|
+
(function() {
|
|
880
|
+
PhysXDynamicCollider._tempTranslation = new engine.Vector3();
|
|
881
|
+
})();
|
|
882
|
+
(function() {
|
|
883
|
+
PhysXDynamicCollider._tempRotation = new engine.Quaternion();
|
|
884
|
+
})();
|
|
877
885
|
|
|
878
886
|
/**
|
|
879
887
|
* A manager is a collection of colliders and constraints which can interact.
|
|
@@ -1074,8 +1082,12 @@ PhysXDynamicCollider._tempRotation = new engine.Quaternion();
|
|
|
1074
1082
|
};
|
|
1075
1083
|
return PhysXPhysicsManager;
|
|
1076
1084
|
}();
|
|
1077
|
-
|
|
1078
|
-
PhysXPhysicsManager.
|
|
1085
|
+
(function() {
|
|
1086
|
+
PhysXPhysicsManager._tempPosition = new engine.Vector3();
|
|
1087
|
+
})();
|
|
1088
|
+
(function() {
|
|
1089
|
+
PhysXPhysicsManager._tempNormal = new engine.Vector3();
|
|
1090
|
+
})();
|
|
1079
1091
|
var /**
|
|
1080
1092
|
* Filtering flags for scene queries.
|
|
1081
1093
|
*/ QueryFlag;
|