@perplexdotgg/bounce 1.3.0 → 1.3.1
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/build/bounce.js +11 -7
- package/package.json +1 -1
package/build/bounce.js
CHANGED
|
@@ -943,12 +943,16 @@ const quatProps = {
|
|
|
943
943
|
class Quat extends createClass(quatProps) {
|
|
944
944
|
constructor(data, index, pool) {
|
|
945
945
|
if (Array.isArray(data)) {
|
|
946
|
-
data
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
946
|
+
if (data.length && data.length < 4) {
|
|
947
|
+
tempQuat.setFromEulerRadians(data[0], data[1] ?? 0, data[2] ?? 0);
|
|
948
|
+
} else {
|
|
949
|
+
tempQuat.x = data[0] ?? 0;
|
|
950
|
+
tempQuat.y = data[1] ?? 0;
|
|
951
|
+
tempQuat.z = data[2] ?? 0;
|
|
952
|
+
tempQuat.w = data[3] ?? 1;
|
|
953
|
+
}
|
|
954
|
+
super(tempQuat, index, pool);
|
|
955
|
+
return;
|
|
952
956
|
}
|
|
953
957
|
super(data, index, pool);
|
|
954
958
|
}
|
|
@@ -1151,6 +1155,7 @@ class Quat extends createClass(quatProps) {
|
|
|
1151
1155
|
}
|
|
1152
1156
|
const vector = /* @__PURE__ */ Vec3.create();
|
|
1153
1157
|
const tempMat3 = /* @__PURE__ */ Mat3.create();
|
|
1158
|
+
const tempQuat = /* @__PURE__ */ Quat.create();
|
|
1154
1159
|
const rotationMatrix$2 = /* @__PURE__ */ Mat3.create();
|
|
1155
1160
|
const scaling = /* @__PURE__ */ Vec3.create();
|
|
1156
1161
|
const conjugatedRotation = /* @__PURE__ */ Quat.create();
|
|
@@ -15664,7 +15669,6 @@ class World {
|
|
|
15664
15669
|
const bodyCopy = this.staticBodyCopies.create(options);
|
|
15665
15670
|
bodyCopy.copy(body2);
|
|
15666
15671
|
body2.copyForDiff = bodyCopy;
|
|
15667
|
-
body2.world = this;
|
|
15668
15672
|
this.broadphase.addStaticBody(body2);
|
|
15669
15673
|
return body2;
|
|
15670
15674
|
}
|