@esotericsoftware/spine-canvas 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.
@@ -6475,21 +6475,22 @@ ${error}` : ""}`);
6475
6475
  modifyLocal(skeleton) {
6476
6476
  if (this.local === skeleton._update) this.updateLocalTransform(skeleton);
6477
6477
  this.world = 0;
6478
- this.resetWorld(skeleton._update);
6478
+ this.resetWorld(skeleton, skeleton._update);
6479
6479
  }
6480
- modifyWorld(update) {
6480
+ modifyWorld(skeleton) {
6481
+ const update = skeleton._update;
6481
6482
  this.local = update;
6482
6483
  this.world = update;
6483
- this.resetWorld(update);
6484
+ this.resetWorld(skeleton, update);
6484
6485
  }
6485
- resetWorld(update) {
6486
+ resetWorld(skeleton, update) {
6486
6487
  const children = this.bone.children;
6487
6488
  for (let i = 0, n = children.length; i < n; i++) {
6488
6489
  const child = children[i].appliedPose;
6489
6490
  if (child.world === update) {
6491
+ if (child.local === update) child.updateLocalTransform(skeleton);
6490
6492
  child.world = 0;
6491
- child.local = 0;
6492
- child.resetWorld(update);
6493
+ child.resetWorld(skeleton, update);
6493
6494
  }
6494
6495
  }
6495
6496
  }
@@ -7282,8 +7283,9 @@ ${error}` : ""}`);
7282
7283
  const bone = this.slot.bone.appliedPose;
7283
7284
  offsetRotation *= bone.a * bone.d - bone.b * bone.c > 0 ? MathUtils.degRad : -MathUtils.degRad;
7284
7285
  }
7285
- for (let i = 0, ip = 3, u = skeleton._update; i < boneCount; i++, ip += 3) {
7286
+ for (let i = 0, ip = 3; i < boneCount; i++, ip += 3) {
7286
7287
  const bone = bones[i];
7288
+ bone.modifyWorld(skeleton);
7287
7289
  bone.worldX += (boneX - bone.worldX) * mixX;
7288
7290
  bone.worldY += (boneY - bone.worldY) * mixY;
7289
7291
  const x = positions[ip], y = positions[ip + 1], dx = x - boneX, dy = y - boneY;
@@ -7327,7 +7329,6 @@ ${error}` : ""}`);
7327
7329
  bone.c = sin * a + cos * c;
7328
7330
  bone.d = sin * b + cos * d;
7329
7331
  }
7330
- bone.modifyWorld(u);
7331
7332
  }
7332
7333
  }
7333
7334
  computeWorldPositions(skeleton, path, spacesCount, tangents) {
@@ -8240,9 +8241,9 @@ ${error}` : ""}`);
8240
8241
  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;
8241
8242
  const bone = this.bone;
8242
8243
  let l = bone.bone.data.length, t = this.data.step, z = 0;
8244
+ if (physics === 0 /* none */) return;
8245
+ bone.modifyWorld(skeleton);
8243
8246
  switch (physics) {
8244
- case 0 /* none */:
8245
- return;
8246
8247
  // biome-ignore lint/suspicious/noFallthroughSwitchClause: fall through expected
8247
8248
  case 1 /* reset */:
8248
8249
  this.reset(skeleton);
@@ -8420,7 +8421,6 @@ ${error}` : ""}`);
8420
8421
  this.tx = l * bone.a;
8421
8422
  this.ty = l * bone.c;
8422
8423
  }
8423
- bone.modifyWorld(skeleton._update);
8424
8424
  }
8425
8425
  sort(skeleton) {
8426
8426
  const bone = this.bone.bone;
@@ -8987,14 +8987,14 @@ ${error}` : ""}`);
8987
8987
  const source = this.source.appliedPose;
8988
8988
  if (localSource) source.validateLocalTransform(skeleton);
8989
8989
  const fromItems = data.properties;
8990
- const fn = data.properties.length, update = skeleton._update;
8990
+ const fn = data.properties.length;
8991
8991
  const bones = this.bones;
8992
8992
  for (let i = 0, n = this.bones.length; i < n; i++) {
8993
8993
  const bone = bones[i];
8994
8994
  if (localTarget)
8995
8995
  bone.modifyLocal(skeleton);
8996
8996
  else
8997
- bone.modifyWorld(update);
8997
+ bone.modifyWorld(skeleton);
8998
8998
  for (let f = 0; f < fn; f++) {
8999
8999
  const from = fromItems[f];
9000
9000
  const value = from.value(skeleton, source, localSource, offsets) - from.offset;