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