@esotericsoftware/spine-webgl 4.3.7 → 4.3.9
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/iife/spine-webgl.js
CHANGED
|
@@ -6515,21 +6515,22 @@ ${error}` : ""}`);
|
|
|
6515
6515
|
modifyLocal(skeleton) {
|
|
6516
6516
|
if (this.local === skeleton._update) this.updateLocalTransform(skeleton);
|
|
6517
6517
|
this.world = 0;
|
|
6518
|
-
this.resetWorld(skeleton._update);
|
|
6518
|
+
this.resetWorld(skeleton, skeleton._update);
|
|
6519
6519
|
}
|
|
6520
|
-
modifyWorld(
|
|
6520
|
+
modifyWorld(skeleton) {
|
|
6521
|
+
const update = skeleton._update;
|
|
6521
6522
|
this.local = update;
|
|
6522
6523
|
this.world = update;
|
|
6523
|
-
this.resetWorld(update);
|
|
6524
|
+
this.resetWorld(skeleton, update);
|
|
6524
6525
|
}
|
|
6525
|
-
resetWorld(update) {
|
|
6526
|
+
resetWorld(skeleton, update) {
|
|
6526
6527
|
const children = this.bone.children;
|
|
6527
6528
|
for (let i = 0, n = children.length; i < n; i++) {
|
|
6528
6529
|
const child = children[i].appliedPose;
|
|
6529
6530
|
if (child.world === update) {
|
|
6531
|
+
if (child.local === update) child.updateLocalTransform(skeleton);
|
|
6530
6532
|
child.world = 0;
|
|
6531
|
-
child.
|
|
6532
|
-
child.resetWorld(update);
|
|
6533
|
+
child.resetWorld(skeleton, update);
|
|
6533
6534
|
}
|
|
6534
6535
|
}
|
|
6535
6536
|
}
|
|
@@ -7322,8 +7323,9 @@ ${error}` : ""}`);
|
|
|
7322
7323
|
const bone = this.slot.bone.appliedPose;
|
|
7323
7324
|
offsetRotation *= bone.a * bone.d - bone.b * bone.c > 0 ? MathUtils.degRad : -MathUtils.degRad;
|
|
7324
7325
|
}
|
|
7325
|
-
for (let i = 0, ip = 3
|
|
7326
|
+
for (let i = 0, ip = 3; i < boneCount; i++, ip += 3) {
|
|
7326
7327
|
const bone = bones[i];
|
|
7328
|
+
bone.modifyWorld(skeleton);
|
|
7327
7329
|
bone.worldX += (boneX - bone.worldX) * mixX;
|
|
7328
7330
|
bone.worldY += (boneY - bone.worldY) * mixY;
|
|
7329
7331
|
const x = positions[ip], y = positions[ip + 1], dx = x - boneX, dy = y - boneY;
|
|
@@ -7367,7 +7369,6 @@ ${error}` : ""}`);
|
|
|
7367
7369
|
bone.c = sin * a + cos * c;
|
|
7368
7370
|
bone.d = sin * b + cos * d;
|
|
7369
7371
|
}
|
|
7370
|
-
bone.modifyWorld(u);
|
|
7371
7372
|
}
|
|
7372
7373
|
}
|
|
7373
7374
|
computeWorldPositions(skeleton, path, spacesCount, tangents) {
|
|
@@ -8280,9 +8281,9 @@ ${error}` : ""}`);
|
|
|
8280
8281
|
const x = this.data.x > 0, y = this.data.y > 0, rotateOrShearX = this.data.rotate > 0 || this.data.shearX > 0, scaleX = this.data.scaleX > 0;
|
|
8281
8282
|
const bone = this.bone;
|
|
8282
8283
|
let l = bone.bone.data.length, t = this.data.step, z = 0;
|
|
8284
|
+
if (physics === 0 /* none */) return;
|
|
8285
|
+
bone.modifyWorld(skeleton);
|
|
8283
8286
|
switch (physics) {
|
|
8284
|
-
case 0 /* none */:
|
|
8285
|
-
return;
|
|
8286
8287
|
// biome-ignore lint/suspicious/noFallthroughSwitchClause: fall through expected
|
|
8287
8288
|
case 1 /* reset */:
|
|
8288
8289
|
this.reset(skeleton);
|
|
@@ -8460,7 +8461,6 @@ ${error}` : ""}`);
|
|
|
8460
8461
|
this.tx = l * bone.a;
|
|
8461
8462
|
this.ty = l * bone.c;
|
|
8462
8463
|
}
|
|
8463
|
-
bone.modifyWorld(skeleton._update);
|
|
8464
8464
|
}
|
|
8465
8465
|
sort(skeleton) {
|
|
8466
8466
|
const bone = this.bone.bone;
|
|
@@ -9027,14 +9027,14 @@ ${error}` : ""}`);
|
|
|
9027
9027
|
const source = this.source.appliedPose;
|
|
9028
9028
|
if (localSource) source.validateLocalTransform(skeleton);
|
|
9029
9029
|
const fromItems = data.properties;
|
|
9030
|
-
const fn = data.properties.length
|
|
9030
|
+
const fn = data.properties.length;
|
|
9031
9031
|
const bones = this.bones;
|
|
9032
9032
|
for (let i = 0, n = this.bones.length; i < n; i++) {
|
|
9033
9033
|
const bone = bones[i];
|
|
9034
9034
|
if (localTarget)
|
|
9035
9035
|
bone.modifyLocal(skeleton);
|
|
9036
9036
|
else
|
|
9037
|
-
bone.modifyWorld(
|
|
9037
|
+
bone.modifyWorld(skeleton);
|
|
9038
9038
|
for (let f = 0; f < fn; f++) {
|
|
9039
9039
|
const from = fromItems[f];
|
|
9040
9040
|
const value = from.value(skeleton, source, localSource, offsets) - from.offset;
|