@esotericsoftware/spine-webgl 4.2.35 → 4.2.36

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.
@@ -69,6 +69,8 @@ var spine = (() => {
69
69
  IkConstraint: () => IkConstraint,
70
70
  IkConstraintData: () => IkConstraintData,
71
71
  IkConstraintTimeline: () => IkConstraintTimeline,
72
+ Inherit: () => Inherit,
73
+ InheritTimeline: () => InheritTimeline,
72
74
  Input: () => Input,
73
75
  IntSet: () => IntSet,
74
76
  Interpolation: () => Interpolation,
@@ -142,7 +144,7 @@ var spine = (() => {
142
144
  ShearTimeline: () => ShearTimeline,
143
145
  ShearXTimeline: () => ShearXTimeline,
144
146
  ShearYTimeline: () => ShearYTimeline,
145
- Skeleton: () => Skeleton2,
147
+ Skeleton: () => Skeleton,
146
148
  SkeletonBinary: () => SkeletonBinary,
147
149
  SkeletonBounds: () => SkeletonBounds,
148
150
  SkeletonClipping: () => SkeletonClipping,
@@ -172,7 +174,6 @@ var spine = (() => {
172
174
  TransformConstraint: () => TransformConstraint,
173
175
  TransformConstraintData: () => TransformConstraintData,
174
176
  TransformConstraintTimeline: () => TransformConstraintTimeline,
175
- TransformMode: () => TransformMode,
176
177
  TranslateTimeline: () => TranslateTimeline,
177
178
  TranslateXTimeline: () => TranslateXTimeline,
178
179
  TranslateYTimeline: () => TranslateYTimeline,
@@ -814,27 +815,28 @@ var spine = (() => {
814
815
  scaleY: 4,
815
816
  shearX: 5,
816
817
  shearY: 6,
817
- rgb: 7,
818
- alpha: 8,
819
- rgb2: 9,
820
- attachment: 10,
821
- deform: 11,
822
- event: 12,
823
- drawOrder: 13,
824
- ikConstraint: 14,
825
- transformConstraint: 15,
826
- pathConstraintPosition: 16,
827
- pathConstraintSpacing: 17,
828
- pathConstraintMix: 18,
829
- physicsConstraintInertia: 19,
830
- physicsConstraintStrength: 20,
831
- physicsConstraintDamping: 21,
832
- physicsConstraintMass: 22,
833
- physicsConstraintWind: 23,
834
- physicsConstraintGravity: 24,
835
- physicsConstraintMix: 25,
836
- physicsConstraintReset: 26,
837
- sequence: 27
818
+ inherit: 7,
819
+ rgb: 8,
820
+ alpha: 9,
821
+ rgb2: 10,
822
+ attachment: 11,
823
+ deform: 12,
824
+ event: 13,
825
+ drawOrder: 14,
826
+ ikConstraint: 15,
827
+ transformConstraint: 16,
828
+ pathConstraintPosition: 17,
829
+ pathConstraintSpacing: 18,
830
+ pathConstraintMix: 19,
831
+ physicsConstraintInertia: 20,
832
+ physicsConstraintStrength: 21,
833
+ physicsConstraintDamping: 22,
834
+ physicsConstraintMass: 23,
835
+ physicsConstraintWind: 24,
836
+ physicsConstraintGravity: 25,
837
+ physicsConstraintMix: 26,
838
+ physicsConstraintReset: 27,
839
+ sequence: 28
838
840
  };
839
841
  var Timeline = class {
840
842
  propertyIds;
@@ -1431,7 +1433,7 @@ var spine = (() => {
1431
1433
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
1432
1434
  let bone = skeleton.bones[this.boneIndex];
1433
1435
  if (bone.active)
1434
- bone.scaleY = this.getScaleValue(time, alpha, blend, direction, bone.scaleX, bone.data.scaleY);
1436
+ bone.scaleY = this.getScaleValue(time, alpha, blend, direction, bone.scaleY, bone.data.scaleY);
1435
1437
  }
1436
1438
  };
1437
1439
  var ShearTimeline = class extends CurveTimeline2 {
@@ -1560,7 +1562,48 @@ var spine = (() => {
1560
1562
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
1561
1563
  let bone = skeleton.bones[this.boneIndex];
1562
1564
  if (bone.active)
1563
- bone.shearY = this.getRelativeValue(time, alpha, blend, bone.shearX, bone.data.shearY);
1565
+ bone.shearY = this.getRelativeValue(time, alpha, blend, bone.shearY, bone.data.shearY);
1566
+ }
1567
+ };
1568
+ var InheritTimeline = class extends Timeline {
1569
+ boneIndex = 0;
1570
+ constructor(frameCount, boneIndex) {
1571
+ super(frameCount, [Property.inherit + "|" + boneIndex]);
1572
+ this.boneIndex = boneIndex;
1573
+ }
1574
+ getFrameEntries() {
1575
+ return 2;
1576
+ }
1577
+ /** Sets the transform mode for the specified frame.
1578
+ * @param frame Between 0 and <code>frameCount</code>, inclusive.
1579
+ * @param time The frame time in seconds. */
1580
+ setFrame(frame, time, inherit) {
1581
+ frame *= 2;
1582
+ this.frames[frame] = time;
1583
+ this.frames[
1584
+ frame + 1
1585
+ /*INHERIT*/
1586
+ ] = inherit;
1587
+ }
1588
+ apply(skeleton, lastTime, time, events, alpha, blend, direction) {
1589
+ let bone = skeleton.bones[this.boneIndex];
1590
+ if (!bone.active)
1591
+ return;
1592
+ let frames = this.frames;
1593
+ if (time < frames[0]) {
1594
+ if (blend == 0 /* setup */ || blend == 1 /* first */)
1595
+ bone.inherit = bone.data.inherit;
1596
+ return;
1597
+ }
1598
+ bone.inherit = this.frames[
1599
+ Timeline.search(
1600
+ frames,
1601
+ time,
1602
+ 2
1603
+ /*ENTRIES*/
1604
+ ) + 1
1605
+ /*INHERIT*/
1606
+ ];
1564
1607
  }
1565
1608
  };
1566
1609
  var RGBATimeline = class extends CurveTimeline {
@@ -2736,7 +2779,7 @@ var spine = (() => {
2736
2779
  var DrawOrderTimeline = _DrawOrderTimeline;
2737
2780
  __publicField(DrawOrderTimeline, "propertyIds", ["" + Property.drawOrder]);
2738
2781
  var IkConstraintTimeline = class extends CurveTimeline {
2739
- /** The index of the IK constraint in {@link Skeleton#getIkConstraints()} that will be changed when this timeline is */
2782
+ /** The index of the IK constraint in {@link Skeleton#getIkConstraints()} that will be changed when this timeline is applied */
2740
2783
  constraintIndex = 0;
2741
2784
  constructor(frameCount, bezierCount, ikConstraintIndex) {
2742
2785
  super(frameCount, bezierCount, [
@@ -3921,9 +3964,14 @@ var spine = (() => {
3921
3964
  this.queue.event(entry, event);
3922
3965
  }
3923
3966
  let complete = false;
3924
- if (entry.loop)
3925
- complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
3926
- else
3967
+ if (entry.loop) {
3968
+ if (duration == 0)
3969
+ complete = true;
3970
+ else {
3971
+ const cycles = Math.floor(entry.trackTime / duration);
3972
+ complete = cycles > 0 && cycles > Math.floor(entry.trackTime / duration);
3973
+ }
3974
+ } else
3927
3975
  complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
3928
3976
  if (complete)
3929
3977
  this.queue.complete(entry);
@@ -5427,7 +5475,7 @@ var spine = (() => {
5427
5475
  /** The local shearX. */
5428
5476
  shearY = 0;
5429
5477
  /** The transform mode for how parent world transforms affect this bone. */
5430
- transformMode = TransformMode.Normal;
5478
+ inherit = Inherit.Normal;
5431
5479
  /** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
5432
5480
  * bone.
5433
5481
  * @see Skin#bones */
@@ -5449,14 +5497,14 @@ var spine = (() => {
5449
5497
  this.parent = parent;
5450
5498
  }
5451
5499
  };
5452
- var TransformMode = /* @__PURE__ */ ((TransformMode2) => {
5453
- TransformMode2[TransformMode2["Normal"] = 0] = "Normal";
5454
- TransformMode2[TransformMode2["OnlyTranslation"] = 1] = "OnlyTranslation";
5455
- TransformMode2[TransformMode2["NoRotationOrReflection"] = 2] = "NoRotationOrReflection";
5456
- TransformMode2[TransformMode2["NoScale"] = 3] = "NoScale";
5457
- TransformMode2[TransformMode2["NoScaleOrReflection"] = 4] = "NoScaleOrReflection";
5458
- return TransformMode2;
5459
- })(TransformMode || {});
5500
+ var Inherit = /* @__PURE__ */ ((Inherit2) => {
5501
+ Inherit2[Inherit2["Normal"] = 0] = "Normal";
5502
+ Inherit2[Inherit2["OnlyTranslation"] = 1] = "OnlyTranslation";
5503
+ Inherit2[Inherit2["NoRotationOrReflection"] = 2] = "NoRotationOrReflection";
5504
+ Inherit2[Inherit2["NoScale"] = 3] = "NoScale";
5505
+ Inherit2[Inherit2["NoScaleOrReflection"] = 4] = "NoScaleOrReflection";
5506
+ return Inherit2;
5507
+ })(Inherit || {});
5460
5508
 
5461
5509
  // spine-core/src/Bone.ts
5462
5510
  var Bone = class {
@@ -5508,6 +5556,7 @@ var spine = (() => {
5508
5556
  worldY = 0;
5509
5557
  /** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
5510
5558
  worldX = 0;
5559
+ inherit = 0 /* Normal */;
5511
5560
  sorted = false;
5512
5561
  active = false;
5513
5562
  /** @param parent May be null. */
@@ -5566,7 +5615,7 @@ var spine = (() => {
5566
5615
  let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
5567
5616
  this.worldX = pa * x + pb * y + parent.worldX;
5568
5617
  this.worldY = pc * x + pd * y + parent.worldY;
5569
- switch (this.data.transformMode) {
5618
+ switch (this.inherit) {
5570
5619
  case 0 /* Normal */: {
5571
5620
  const rx = (rotation + shearX) * MathUtils.degRad;
5572
5621
  const ry = (rotation + 90 + shearY) * MathUtils.degRad;
@@ -5628,7 +5677,7 @@ var spine = (() => {
5628
5677
  za *= s;
5629
5678
  zc *= s;
5630
5679
  s = Math.sqrt(za * za + zc * zc);
5631
- if (this.data.transformMode == 3 /* NoScale */ && pa * pd - pb * pc < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))
5680
+ if (this.inherit == 3 /* NoScale */ && pa * pd - pb * pc < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))
5632
5681
  s = -s;
5633
5682
  rotation = Math.PI / 2 + Math.atan2(zc, za);
5634
5683
  const zb = Math.cos(rotation) * s;
@@ -5661,6 +5710,7 @@ var spine = (() => {
5661
5710
  this.scaleY = data.scaleY;
5662
5711
  this.shearX = data.shearX;
5663
5712
  this.shearY = data.shearY;
5713
+ this.inherit = data.inherit;
5664
5714
  }
5665
5715
  /** Computes the applied transform values from the world transform.
5666
5716
  *
@@ -5689,13 +5739,13 @@ var spine = (() => {
5689
5739
  this.ax = dx * ia - dy * ib;
5690
5740
  this.ay = dy * id - dx * ic;
5691
5741
  let ra, rb, rc, rd;
5692
- if (this.data.transformMode == 1 /* OnlyTranslation */) {
5742
+ if (this.inherit == 1 /* OnlyTranslation */) {
5693
5743
  ra = this.a;
5694
5744
  rb = this.b;
5695
5745
  rc = this.c;
5696
5746
  rd = this.d;
5697
5747
  } else {
5698
- switch (this.data.transformMode) {
5748
+ switch (this.inherit) {
5699
5749
  case 2 /* NoRotationOrReflection */: {
5700
5750
  let s2 = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);
5701
5751
  let sa = pa / this.skeleton.scaleX;
@@ -5718,7 +5768,7 @@ var spine = (() => {
5718
5768
  pa *= s;
5719
5769
  pc *= s;
5720
5770
  s = Math.sqrt(pa * pa + pc * pc);
5721
- if (this.data.transformMode == 3 /* NoScale */ && pid < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))
5771
+ if (this.inherit == 3 /* NoScale */ && pid < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))
5722
5772
  s = -s;
5723
5773
  let r = MathUtils.PI / 2 + Math.atan2(pc, pa);
5724
5774
  pb = Math.cos(r) * s;
@@ -6232,7 +6282,7 @@ var spine = (() => {
6232
6282
  throw new Error("IK bone must have parent.");
6233
6283
  let pa = p.a, pb = p.b, pc = p.c, pd = p.d;
6234
6284
  let rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;
6235
- switch (bone.data.transformMode) {
6285
+ switch (bone.inherit) {
6236
6286
  case 1 /* OnlyTranslation */:
6237
6287
  tx = (targetX - bone.worldX) * MathUtils.signum(bone.skeleton.scaleX);
6238
6288
  ty = (targetY - bone.worldY) * MathUtils.signum(bone.skeleton.scaleY);
@@ -6264,7 +6314,7 @@ var spine = (() => {
6264
6314
  rotationIK += 360;
6265
6315
  let sx = bone.ascaleX, sy = bone.ascaleY;
6266
6316
  if (compress || stretch) {
6267
- switch (bone.data.transformMode) {
6317
+ switch (bone.inherit) {
6268
6318
  case 3 /* NoScale */:
6269
6319
  case 4 /* NoScaleOrReflection */:
6270
6320
  tx = targetX - bone.worldX;
@@ -6294,6 +6344,8 @@ var spine = (() => {
6294
6344
  /** Applies 2 bone IK. The target is specified in the world coordinate system.
6295
6345
  * @param child A direct descendant of the parent bone. */
6296
6346
  apply2(parent, child, targetX, targetY, bendDir, stretch, uniform, softness, alpha) {
6347
+ if (parent.inherit != 0 /* Normal */ || child.inherit != 0 /* Normal */)
6348
+ return;
6297
6349
  let px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, sx = psx, sy = psy, csx = child.ascaleX;
6298
6350
  let os1 = 0, os2 = 0, s2 = 0;
6299
6351
  if (psx < 0) {
@@ -6460,7 +6512,7 @@ var spine = (() => {
6460
6512
  return this._target;
6461
6513
  }
6462
6514
  /** Controls the bend direction of the IK bones, either 1 or -1. */
6463
- bendDirection = 1;
6515
+ bendDirection = 0;
6464
6516
  /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
6465
6517
  compress = false;
6466
6518
  /** When true, if the target is out of range, the parent bone is scaled to reach it. If more than one bone is being constrained
@@ -6470,7 +6522,7 @@ var spine = (() => {
6470
6522
  * is scaled on both the X and Y axes. */
6471
6523
  uniform = false;
6472
6524
  /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
6473
- mix = 1;
6525
+ mix = 0;
6474
6526
  /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
6475
6527
  softness = 0;
6476
6528
  constructor(name) {
@@ -7074,7 +7126,8 @@ var spine = (() => {
7074
7126
  case 1 /* reset */:
7075
7127
  this.reset();
7076
7128
  case 2 /* update */:
7077
- this.remaining += Math.max(this.skeleton.time - this.lastTime, 0);
7129
+ const delta = Math.max(this.skeleton.time - this.lastTime, 0);
7130
+ this.remaining += delta;
7078
7131
  this.lastTime = this.skeleton.time;
7079
7132
  const bx = bone.worldX, by = bone.worldY;
7080
7133
  if (this._reset) {
@@ -7082,32 +7135,34 @@ var spine = (() => {
7082
7135
  this.ux = bx;
7083
7136
  this.uy = by;
7084
7137
  } else {
7085
- let remaining = this.remaining, i = this.inertia, step = this.data.step;
7138
+ let a = this.remaining, i = this.inertia, q = this.data.limit * delta, t = this.data.step, f = this.skeleton.data.referenceScale, d = -1;
7086
7139
  if (x || y) {
7087
7140
  if (x) {
7088
- this.xOffset += (this.ux - bx) * i;
7141
+ const u = (this.ux - bx) * i;
7142
+ this.xOffset += u > q ? q : u < -q ? -q : u;
7089
7143
  this.ux = bx;
7090
7144
  }
7091
7145
  if (y) {
7092
- this.yOffset += (this.uy - by) * i;
7146
+ const u = (this.uy - by) * i;
7147
+ this.yOffset += u > q ? q : u < -q ? -q : u;
7093
7148
  this.uy = by;
7094
7149
  }
7095
- if (remaining >= step) {
7096
- const m = this.massInverse * step, e = this.strength, w = this.wind * 100, g = this.gravity * -100;
7097
- const d = Math.pow(this.damping, 60 * step);
7150
+ if (a >= t) {
7151
+ d = Math.pow(this.damping, 60 * t);
7152
+ const m = this.massInverse * t, e = this.strength, w = this.wind * f, g = (Skeleton.yDown ? -this.gravity : this.gravity) * f;
7098
7153
  do {
7099
7154
  if (x) {
7100
7155
  this.xVelocity += (w - this.xOffset * e) * m;
7101
- this.xOffset += this.xVelocity * step;
7156
+ this.xOffset += this.xVelocity * t;
7102
7157
  this.xVelocity *= d;
7103
7158
  }
7104
7159
  if (y) {
7105
- this.yVelocity += (g - this.yOffset * e) * m;
7106
- this.yOffset += this.yVelocity * step;
7160
+ this.yVelocity -= (g + this.yOffset * e) * m;
7161
+ this.yOffset += this.yVelocity * t;
7107
7162
  this.yVelocity *= d;
7108
7163
  }
7109
- remaining -= step;
7110
- } while (remaining >= step);
7164
+ a -= t;
7165
+ } while (a >= t);
7111
7166
  }
7112
7167
  if (x)
7113
7168
  bone.worldX += this.xOffset * mix * this.data.x;
@@ -7116,9 +7171,18 @@ var spine = (() => {
7116
7171
  }
7117
7172
  if (rotateOrShearX || scaleX) {
7118
7173
  let ca = Math.atan2(bone.c, bone.a), c = 0, s = 0, mr = 0;
7174
+ let dx = this.cx - bone.worldX, dy = this.cy - bone.worldY;
7175
+ if (dx > q)
7176
+ dx = q;
7177
+ else if (dx < -q)
7178
+ dx = -q;
7179
+ if (dy > q)
7180
+ dy = q;
7181
+ else if (dy < -q)
7182
+ dy = -q;
7119
7183
  if (rotateOrShearX) {
7120
7184
  mr = (this.data.rotate + this.data.shearX) * mix;
7121
- let dx = this.cx - bone.worldX, dy = this.cy - bone.worldY, r = Math.atan2(dy + this.ty, dx + this.tx) - ca - this.rotateOffset * mr;
7185
+ let r = Math.atan2(dy + this.ty, dx + this.tx) - ca - this.rotateOffset * mr;
7122
7186
  this.rotateOffset += (r - Math.ceil(r * MathUtils.invPI2 - 0.5) * MathUtils.PI2) * i;
7123
7187
  r = this.rotateOffset * mr + ca;
7124
7188
  c = Math.cos(r);
@@ -7133,34 +7197,35 @@ var spine = (() => {
7133
7197
  s = Math.sin(ca);
7134
7198
  const r = l * bone.getWorldScaleX();
7135
7199
  if (r > 0)
7136
- this.scaleOffset += ((this.cx - bone.worldX) * c + (this.cy - bone.worldY) * s) * i / r;
7200
+ this.scaleOffset += (dx * c + dy * s) * i / r;
7137
7201
  }
7138
- remaining = this.remaining;
7139
- if (remaining >= step) {
7140
- const m = this.massInverse * step, e = this.strength, w = this.wind, g = this.gravity;
7141
- const d = Math.pow(this.damping, 60 * step);
7202
+ a = this.remaining;
7203
+ if (a >= t) {
7204
+ if (d == -1)
7205
+ d = Math.pow(this.damping, 60 * t);
7206
+ const m = this.massInverse * t, e = this.strength, w = this.wind, g = Skeleton.yDown ? -this.gravity : this.gravity, h = l / f;
7142
7207
  while (true) {
7143
- remaining -= step;
7208
+ a -= t;
7144
7209
  if (scaleX) {
7145
7210
  this.scaleVelocity += (w * c - g * s - this.scaleOffset * e) * m;
7146
- this.scaleOffset += this.scaleVelocity * step;
7211
+ this.scaleOffset += this.scaleVelocity * t;
7147
7212
  this.scaleVelocity *= d;
7148
7213
  }
7149
7214
  if (rotateOrShearX) {
7150
- this.rotateVelocity += (-0.01 * l * (w * s + g * c) - this.rotateOffset * e) * m;
7151
- this.rotateOffset += this.rotateVelocity * step;
7215
+ this.rotateVelocity -= ((w * s + g * c) * h + this.rotateOffset * e) * m;
7216
+ this.rotateOffset += this.rotateVelocity * t;
7152
7217
  this.rotateVelocity *= d;
7153
- if (remaining < step)
7218
+ if (a < t)
7154
7219
  break;
7155
7220
  const r = this.rotateOffset * mr + ca;
7156
7221
  c = Math.cos(r);
7157
7222
  s = Math.sin(r);
7158
- } else if (remaining < step)
7223
+ } else if (a < t)
7159
7224
  break;
7160
7225
  }
7161
7226
  }
7162
7227
  }
7163
- this.remaining = remaining;
7228
+ this.remaining = a;
7164
7229
  }
7165
7230
  this.cx = bone.worldX;
7166
7231
  this.cy = bone.worldY;
@@ -7212,6 +7277,21 @@ var spine = (() => {
7212
7277
  }
7213
7278
  bone.updateAppliedTransform();
7214
7279
  }
7280
+ /** Translates the physics constraint so next {@link #update(Physics)} forces are applied as if the bone moved an additional
7281
+ * amount in world space. */
7282
+ translate(x, y) {
7283
+ this.ux -= x;
7284
+ this.uy -= y;
7285
+ this.cx -= x;
7286
+ this.cy -= y;
7287
+ }
7288
+ /** Rotates the physics constraint so next {@link #update(Physics)} forces are applied as if the bone rotated around the
7289
+ * specified point in world space. */
7290
+ rotate(x, y, degrees) {
7291
+ const r = degrees * MathUtils.degRad, cos = Math.cos(r), sin = Math.sin(r);
7292
+ const dx = this.cx - x, dy = this.cy - y;
7293
+ this.translate(dx * cos - dy * sin - dx, dx * sin + dy * cos - dy);
7294
+ }
7215
7295
  };
7216
7296
 
7217
7297
  // spine-core/src/Slot.ts
@@ -7471,11 +7551,8 @@ var spine = (() => {
7471
7551
  for (let i = 0, n = bones.length; i < n; i++) {
7472
7552
  let bone = bones[i];
7473
7553
  let rotation = bone.arotation;
7474
- if (mixRotate != 0) {
7475
- let r = target.arotation - rotation + this.data.offsetRotation;
7476
- r -= Math.ceil(r / 360 - 0.5) * 360;
7477
- rotation += r * mixRotate;
7478
- }
7554
+ if (mixRotate != 0)
7555
+ rotation += (target.arotation - rotation + this.data.offsetRotation) * mixRotate;
7479
7556
  let x = bone.ax, y = bone.ay;
7480
7557
  x += (target.ax - x + this.data.offsetX) * mixX;
7481
7558
  y += (target.ay - y + this.data.offsetY) * mixY;
@@ -7485,11 +7562,8 @@ var spine = (() => {
7485
7562
  if (mixScaleY != 0 && scaleY != 0)
7486
7563
  scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * mixScaleY) / scaleY;
7487
7564
  let shearY = bone.ashearY;
7488
- if (mixShearY != 0) {
7489
- let r = target.ashearY - shearY + this.data.offsetShearY;
7490
- r -= Math.ceil(r / 360 - 0.5) * 360;
7491
- shearY += r * mixShearY;
7492
- }
7565
+ if (mixShearY != 0)
7566
+ shearY += (target.ashearY - shearY + this.data.offsetShearY) * mixShearY;
7493
7567
  bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);
7494
7568
  }
7495
7569
  }
@@ -7516,7 +7590,7 @@ var spine = (() => {
7516
7590
  data;
7517
7591
  /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
7518
7592
  bones;
7519
- /** The skeleton's slots. */
7593
+ /** The skeleton's slots in the setup pose draw order. */
7520
7594
  slots;
7521
7595
  /** The skeleton's slots in the order they should be drawn. The returned array may be modified to change the draw order. */
7522
7596
  drawOrder;
@@ -8068,9 +8142,20 @@ var spine = (() => {
8068
8142
  update(delta) {
8069
8143
  this.time += delta;
8070
8144
  }
8145
+ physicsTranslate(x, y) {
8146
+ const physicsConstraints = this.physicsConstraints;
8147
+ for (let i = 0, n = physicsConstraints.length; i < n; i++)
8148
+ physicsConstraints[i].translate(x, y);
8149
+ }
8150
+ /** Calls {@link PhysicsConstraint#rotate(float, float, float)} for each physics constraint. */
8151
+ physicsRotate(x, y, degrees) {
8152
+ const physicsConstraints = this.physicsConstraints;
8153
+ for (let i = 0, n = physicsConstraints.length; i < n; i++)
8154
+ physicsConstraints[i].rotate(x, y, degrees);
8155
+ }
8071
8156
  };
8072
- var Skeleton2 = _Skeleton;
8073
- __publicField(Skeleton2, "yDown", false);
8157
+ var Skeleton = _Skeleton;
8158
+ __publicField(Skeleton, "yDown", false);
8074
8159
  var Physics = /* @__PURE__ */ ((Physics2) => {
8075
8160
  Physics2[Physics2["none"] = 0] = "none";
8076
8161
  Physics2[Physics2["reset"] = 1] = "reset";
@@ -8097,6 +8182,7 @@ var spine = (() => {
8097
8182
  rotate = 0;
8098
8183
  scaleX = 0;
8099
8184
  shearX = 0;
8185
+ limit = 0;
8100
8186
  step = 0;
8101
8187
  inertia = 0;
8102
8188
  strength = 0;
@@ -8125,7 +8211,7 @@ var spine = (() => {
8125
8211
  /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
8126
8212
  bones = new Array();
8127
8213
  // Ordered parents first.
8128
- /** The skeleton's slots. */
8214
+ /** The skeleton's slots in the setup pose draw order. */
8129
8215
  slots = new Array();
8130
8216
  // Setup pose draw order.
8131
8217
  skins = new Array();
@@ -8154,6 +8240,9 @@ var spine = (() => {
8154
8240
  width = 0;
8155
8241
  /** The height of the skeleton's axis aligned bounding box in the setup pose. */
8156
8242
  height = 0;
8243
+ /** Baseline scale factor for applying distance-dependent effects on non-scalable properties, such as angle or scale. Default
8244
+ * is 100. */
8245
+ referenceScale = 100;
8157
8246
  /** The Spine version used to export the skeleton data, or null. */
8158
8247
  version = null;
8159
8248
  /** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
@@ -8485,6 +8574,8 @@ var spine = (() => {
8485
8574
  blendMode = BlendMode.Normal;
8486
8575
  /** False if the slot was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
8487
8576
  visible = true;
8577
+ /** The folders for this slot in the draw order, delimited by <code>/</code>, or null if nonessential data was not exported. */
8578
+ path = null;
8488
8579
  constructor(index, name, boneData) {
8489
8580
  if (index < 0)
8490
8581
  throw new Error("index must be >= 0.");
@@ -8570,6 +8661,7 @@ var spine = (() => {
8570
8661
  skeletonData.y = input.readFloat();
8571
8662
  skeletonData.width = input.readFloat();
8572
8663
  skeletonData.height = input.readFloat();
8664
+ skeletonData.referenceScale = input.readFloat() * scale;
8573
8665
  let nonessential = input.readBoolean();
8574
8666
  if (nonessential) {
8575
8667
  skeletonData.fps = input.readFloat();
@@ -8599,7 +8691,7 @@ var spine = (() => {
8599
8691
  data.shearX = input.readFloat();
8600
8692
  data.shearY = input.readFloat();
8601
8693
  data.length = input.readFloat() * scale;
8602
- data.transformMode = input.readInt(true);
8694
+ data.inherit = input.readByte();
8603
8695
  data.skinRequired = input.readBoolean();
8604
8696
  if (nonessential) {
8605
8697
  Color.rgba8888ToColor(data.color, input.readInt32());
@@ -8613,6 +8705,14 @@ var spine = (() => {
8613
8705
  let slotName = input.readString();
8614
8706
  if (!slotName)
8615
8707
  throw new Error("Slot name must not be null.");
8708
+ let path = null;
8709
+ if (nonessential) {
8710
+ const slash = slotName.lastIndexOf("/");
8711
+ if (slash != -1) {
8712
+ path = slotName.substring(0, slash);
8713
+ slotName = slotName.substring(slash + 1);
8714
+ }
8715
+ }
8616
8716
  let boneData = skeletonData.bones[input.readInt(true)];
8617
8717
  let data = new SlotData(i, slotName, boneData);
8618
8718
  Color.rgba8888ToColor(data.color, input.readInt32());
@@ -8621,8 +8721,10 @@ var spine = (() => {
8621
8721
  Color.rgb888ToColor(data.darkColor = new Color(), darkColor);
8622
8722
  data.attachmentName = input.readStringRef();
8623
8723
  data.blendMode = input.readInt(true);
8624
- if (nonessential)
8724
+ if (nonessential) {
8625
8725
  data.visible = input.readBoolean();
8726
+ data.path = path;
8727
+ }
8626
8728
  skeletonData.slots.push(data);
8627
8729
  }
8628
8730
  n = input.readInt(true);
@@ -8636,14 +8738,16 @@ var spine = (() => {
8636
8738
  for (let ii = 0; ii < nn; ii++)
8637
8739
  data.bones.push(skeletonData.bones[input.readInt(true)]);
8638
8740
  data.target = skeletonData.bones[input.readInt(true)];
8639
- data.mix = input.readFloat();
8640
- data.softness = input.readFloat() * scale;
8641
8741
  let flags = input.readByte();
8642
8742
  data.skinRequired = (flags & 1) != 0;
8643
8743
  data.bendDirection = (flags & 2) != 0 ? 1 : -1;
8644
8744
  data.compress = (flags & 4) != 0;
8645
8745
  data.stretch = (flags & 8) != 0;
8646
8746
  data.uniform = (flags & 16) != 0;
8747
+ if ((flags & 32) != 0)
8748
+ data.mix = (flags & 64) != 0 ? input.readFloat() : 1;
8749
+ if ((flags & 128) != 0)
8750
+ data.softness = input.readFloat() * scale;
8647
8751
  skeletonData.ikConstraints.push(data);
8648
8752
  }
8649
8753
  n = input.readInt(true);
@@ -8657,22 +8761,35 @@ var spine = (() => {
8657
8761
  for (let ii = 0; ii < nn; ii++)
8658
8762
  data.bones.push(skeletonData.bones[input.readInt(true)]);
8659
8763
  data.target = skeletonData.bones[input.readInt(true)];
8660
- const flags = input.readByte();
8764
+ let flags = input.readByte();
8661
8765
  data.skinRequired = (flags & 1) != 0;
8662
8766
  data.local = (flags & 2) != 0;
8663
8767
  data.relative = (flags & 4) != 0;
8664
- data.offsetRotation = input.readFloat();
8665
- data.offsetX = input.readFloat() * scale;
8666
- data.offsetY = input.readFloat() * scale;
8667
- data.offsetScaleX = input.readFloat();
8668
- data.offsetScaleY = input.readFloat();
8669
- data.offsetShearY = input.readFloat();
8670
- data.mixRotate = input.readFloat();
8671
- data.mixX = input.readFloat();
8672
- data.mixY = input.readFloat();
8673
- data.mixScaleX = input.readFloat();
8674
- data.mixScaleY = input.readFloat();
8675
- data.mixShearY = input.readFloat();
8768
+ if ((flags & 8) != 0)
8769
+ data.offsetRotation = input.readFloat();
8770
+ if ((flags & 16) != 0)
8771
+ data.offsetX = input.readFloat() * scale;
8772
+ if ((flags & 32) != 0)
8773
+ data.offsetY = input.readFloat() * scale;
8774
+ if ((flags & 64) != 0)
8775
+ data.offsetScaleX = input.readFloat();
8776
+ if ((flags & 128) != 0)
8777
+ data.offsetScaleY = input.readFloat();
8778
+ flags = input.readByte();
8779
+ if ((flags & 1) != 0)
8780
+ data.offsetShearY = input.readFloat();
8781
+ if ((flags & 2) != 0)
8782
+ data.mixRotate = input.readFloat();
8783
+ if ((flags & 4) != 0)
8784
+ data.mixX = input.readFloat();
8785
+ if ((flags & 8) != 0)
8786
+ data.mixY = input.readFloat();
8787
+ if ((flags & 16) != 0)
8788
+ data.mixScaleX = input.readFloat();
8789
+ if ((flags & 32) != 0)
8790
+ data.mixScaleY = input.readFloat();
8791
+ if ((flags & 64) != 0)
8792
+ data.mixShearY = input.readFloat();
8676
8793
  skeletonData.transformConstraints.push(data);
8677
8794
  }
8678
8795
  n = input.readInt(true);
@@ -8687,10 +8804,12 @@ var spine = (() => {
8687
8804
  for (let ii = 0; ii < nn; ii++)
8688
8805
  data.bones.push(skeletonData.bones[input.readInt(true)]);
8689
8806
  data.target = skeletonData.slots[input.readInt(true)];
8690
- data.positionMode = input.readInt(true);
8691
- data.spacingMode = input.readInt(true);
8692
- data.rotateMode = input.readInt(true);
8693
- data.offsetRotation = input.readFloat();
8807
+ const flags = input.readByte();
8808
+ data.positionMode = flags & 1;
8809
+ data.spacingMode = flags >> 1 & 3;
8810
+ data.rotateMode = flags >> 3 & 3;
8811
+ if ((flags & 128) != 0)
8812
+ data.offsetRotation = input.readFloat();
8694
8813
  data.position = input.readFloat();
8695
8814
  if (data.positionMode == 0 /* Fixed */)
8696
8815
  data.position *= scale;
@@ -8722,14 +8841,14 @@ var spine = (() => {
8722
8841
  data.scaleX = input.readFloat();
8723
8842
  if ((flags & 32) != 0)
8724
8843
  data.shearX = input.readFloat();
8725
- data.step = 1 / input.readByte();
8844
+ data.limit = ((flags & 64) != 0 ? input.readFloat() : 5e3) * scale;
8845
+ data.step = 1 / input.readUnsignedByte();
8726
8846
  data.inertia = input.readFloat();
8727
8847
  data.strength = input.readFloat();
8728
8848
  data.damping = input.readFloat();
8729
- data.massInverse = input.readFloat();
8730
- data.wind = input.readFloat() * scale;
8731
- data.gravity = input.readFloat() * scale;
8732
- data.mix = input.readFloat();
8849
+ data.massInverse = (flags & 128) != 0 ? input.readFloat() : 1;
8850
+ data.wind = input.readFloat();
8851
+ data.gravity = input.readFloat();
8733
8852
  flags = input.readByte();
8734
8853
  if ((flags & 1) != 0)
8735
8854
  data.inertiaGlobal = true;
@@ -8745,6 +8864,7 @@ var spine = (() => {
8745
8864
  data.gravityGlobal = true;
8746
8865
  if ((flags & 64) != 0)
8747
8866
  data.mixGlobal = true;
8867
+ data.mix = (flags & 128) != 0 ? input.readFloat() : 1;
8748
8868
  skeletonData.physicsConstraints.push(data);
8749
8869
  }
8750
8870
  let defaultSkin = this.readSkin(input, skeletonData, true, nonessential);
@@ -8854,7 +8974,7 @@ var spine = (() => {
8854
8974
  let path = (flags & 16) != 0 ? input.readStringRef() : null;
8855
8975
  const color = (flags & 32) != 0 ? input.readInt32() : 4294967295;
8856
8976
  const sequence = (flags & 64) != 0 ? this.readSequence(input) : null;
8857
- let rotation = input.readFloat();
8977
+ let rotation = (flags & 128) != 0 ? input.readFloat() : 0;
8858
8978
  let x = input.readFloat();
8859
8979
  let y = input.readFloat();
8860
8980
  let scaleX = input.readFloat();
@@ -9013,8 +9133,6 @@ var spine = (() => {
9013
9133
  return null;
9014
9134
  }
9015
9135
  readSequence(input) {
9016
- if (!input.readBoolean())
9017
- return null;
9018
9136
  let sequence = new Sequence(input.readInt(true));
9019
9137
  sequence.start = input.readInt(true);
9020
9138
  sequence.digits = input.readInt(true);
@@ -9268,7 +9386,16 @@ var spine = (() => {
9268
9386
  for (let i = 0, n = input.readInt(true); i < n; i++) {
9269
9387
  let boneIndex = input.readInt(true);
9270
9388
  for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {
9271
- let type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);
9389
+ let type = input.readByte(), frameCount = input.readInt(true);
9390
+ if (type == BONE_INHERIT) {
9391
+ let timeline = new InheritTimeline(frameCount, boneIndex);
9392
+ for (let frame = 0; frame < frameCount; frame++) {
9393
+ timeline.setFrame(frame, input.readFloat(), input.readByte());
9394
+ }
9395
+ timelines.push(timeline);
9396
+ continue;
9397
+ }
9398
+ let bezierCount = input.readInt(true);
9272
9399
  switch (type) {
9273
9400
  case BONE_ROTATE:
9274
9401
  timelines.push(readTimeline1(input, new RotateTimeline(frameCount, bezierCount, boneIndex), 1));
@@ -9305,20 +9432,21 @@ var spine = (() => {
9305
9432
  for (let i = 0, n = input.readInt(true); i < n; i++) {
9306
9433
  let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;
9307
9434
  let timeline = new IkConstraintTimeline(frameCount, input.readInt(true), index);
9308
- let time = input.readFloat(), mix = input.readFloat(), softness = input.readFloat() * scale;
9435
+ let flags = input.readByte();
9436
+ let time = input.readFloat(), mix = (flags & 1) != 0 ? (flags & 2) != 0 ? input.readFloat() : 1 : 0;
9437
+ let softness = (flags & 4) != 0 ? input.readFloat() * scale : 0;
9309
9438
  for (let frame = 0, bezier = 0; ; frame++) {
9310
- const flags = input.readByte();
9311
- timeline.setFrame(frame, time, mix, softness, input.readByte(), (flags & 1) != 0, (flags & 2) != 0);
9439
+ timeline.setFrame(frame, time, mix, softness, (flags & 8) != 0 ? 1 : -1, (flags & 16) != 0, (flags & 32) != 0);
9312
9440
  if (frame == frameLast)
9313
9441
  break;
9314
- let time2 = input.readFloat(), mix2 = input.readFloat(), softness2 = input.readFloat() * scale;
9315
- switch (input.readByte()) {
9316
- case CURVE_STEPPED:
9317
- timeline.setStepped(frame);
9318
- break;
9319
- case CURVE_BEZIER:
9320
- setBezier(input, timeline, bezier++, frame, 0, time, time2, mix, mix2, 1);
9321
- setBezier(input, timeline, bezier++, frame, 1, time, time2, softness, softness2, scale);
9442
+ flags = input.readByte();
9443
+ const time2 = input.readFloat(), mix2 = (flags & 1) != 0 ? (flags & 2) != 0 ? input.readFloat() : 1 : 0;
9444
+ const softness2 = (flags & 4) != 0 ? input.readFloat() * scale : 0;
9445
+ if ((flags & 64) != 0) {
9446
+ timeline.setStepped(frame);
9447
+ } else if ((flags & 128) != 0) {
9448
+ setBezier(input, timeline, bezier++, frame, 0, time, time2, mix, mix2, 1);
9449
+ setBezier(input, timeline, bezier++, frame, 1, time, time2, softness, softness2, scale);
9322
9450
  }
9323
9451
  time = time2;
9324
9452
  mix = mix2;
@@ -9429,10 +9557,10 @@ var spine = (() => {
9429
9557
  timelines.push(readTimeline1(input, new PhysicsConstraintMassTimeline(frameCount, bezierCount, index), 1));
9430
9558
  break;
9431
9559
  case PHYSICS_WIND:
9432
- timelines.push(readTimeline1(input, new PhysicsConstraintWindTimeline(frameCount, bezierCount, index), scale));
9560
+ timelines.push(readTimeline1(input, new PhysicsConstraintWindTimeline(frameCount, bezierCount, index), 1));
9433
9561
  break;
9434
9562
  case PHYSICS_GRAVITY:
9435
- timelines.push(readTimeline1(input, new PhysicsConstraintGravityTimeline(frameCount, bezierCount, index), scale));
9563
+ timelines.push(readTimeline1(input, new PhysicsConstraintGravityTimeline(frameCount, bezierCount, index), 1));
9436
9564
  break;
9437
9565
  case PHYSICS_MIX:
9438
9566
  timelines.push(readTimeline1(input, new PhysicsConstraintMixTimeline(frameCount, bezierCount, index), 1));
@@ -9740,6 +9868,7 @@ var spine = (() => {
9740
9868
  var BONE_SHEAR = 7;
9741
9869
  var BONE_SHEARX = 8;
9742
9870
  var BONE_SHEARY = 9;
9871
+ var BONE_INHERIT = 10;
9743
9872
  var SLOT_ATTACHMENT = 0;
9744
9873
  var SLOT_RGBA = 1;
9745
9874
  var SLOT_RGB = 2;
@@ -10472,8 +10601,10 @@ var spine = (() => {
10472
10601
  skeletonData.y = skeletonMap.y;
10473
10602
  skeletonData.width = skeletonMap.width;
10474
10603
  skeletonData.height = skeletonMap.height;
10604
+ skeletonData.referenceScale = getValue(skeletonMap, "referenceScale", 100) * scale;
10475
10605
  skeletonData.fps = skeletonMap.fps;
10476
- skeletonData.imagesPath = skeletonMap.images;
10606
+ skeletonData.imagesPath = skeletonMap.images ?? null;
10607
+ skeletonData.audioPath = skeletonMap.audio ?? null;
10477
10608
  }
10478
10609
  if (root.bones) {
10479
10610
  for (let i = 0; i < root.bones.length; i++) {
@@ -10491,7 +10622,7 @@ var spine = (() => {
10491
10622
  data.scaleY = getValue(boneMap, "scaleY", 1);
10492
10623
  data.shearX = getValue(boneMap, "shearX", 0);
10493
10624
  data.shearY = getValue(boneMap, "shearY", 0);
10494
- data.transformMode = Utils.enumValue(TransformMode, getValue(boneMap, "transform", "Normal"));
10625
+ data.inherit = Utils.enumValue(Inherit, getValue(boneMap, "inherit", "Normal"));
10495
10626
  data.skinRequired = getValue(boneMap, "skin", false);
10496
10627
  let color = getValue(boneMap, "color", null);
10497
10628
  if (color)
@@ -10502,10 +10633,17 @@ var spine = (() => {
10502
10633
  if (root.slots) {
10503
10634
  for (let i = 0; i < root.slots.length; i++) {
10504
10635
  let slotMap = root.slots[i];
10636
+ let path = null;
10637
+ let slotName = slotMap.name;
10638
+ const slash = slotName.lastIndexOf("/");
10639
+ if (slash != -1) {
10640
+ path = slotName.substring(0, slash);
10641
+ slotName = slotName.substring(slash + 1);
10642
+ }
10505
10643
  let boneData = skeletonData.findBone(slotMap.bone);
10506
10644
  if (!boneData)
10507
- throw new Error(`Couldn't find bone ${slotMap.bone} for slot ${slotMap.name}`);
10508
- let data = new SlotData(skeletonData.slots.length, slotMap.name, boneData);
10645
+ throw new Error(`Couldn't find bone ${slotMap.bone} for slot ${slotName}`);
10646
+ let data = new SlotData(skeletonData.slots.length, slotName, boneData);
10509
10647
  let color = getValue(slotMap, "color", null);
10510
10648
  if (color)
10511
10649
  data.color.setFromString(color);
@@ -10514,6 +10652,8 @@ var spine = (() => {
10514
10652
  data.darkColor = Color.fromString(dark);
10515
10653
  data.attachmentName = getValue(slotMap, "attachment", null);
10516
10654
  data.blendMode = Utils.enumValue(BlendMode, getValue(slotMap, "blend", "normal"));
10655
+ data.visible = getValue(slotMap, "visible", true);
10656
+ data.path = path;
10517
10657
  skeletonData.slots.push(data);
10518
10658
  }
10519
10659
  }
@@ -10628,13 +10768,14 @@ var spine = (() => {
10628
10768
  data.rotate = getValue(constraintMap, "rotate", 0);
10629
10769
  data.scaleX = getValue(constraintMap, "scaleX", 0);
10630
10770
  data.shearX = getValue(constraintMap, "shearX", 0);
10771
+ data.limit = getValue(constraintMap, "limit", 5e3) * scale;
10631
10772
  data.step = 1 / getValue(constraintMap, "fps", 60);
10632
10773
  data.inertia = getValue(constraintMap, "inertia", 1);
10633
10774
  data.strength = getValue(constraintMap, "strength", 100);
10634
10775
  data.damping = getValue(constraintMap, "damping", 1);
10635
10776
  data.massInverse = 1 / getValue(constraintMap, "mass", 1);
10636
- data.wind = getValue(constraintMap, "wind", 0) * scale;
10637
- data.gravity = getValue(constraintMap, "gravity", 0) * scale;
10777
+ data.wind = getValue(constraintMap, "wind", 0);
10778
+ data.gravity = getValue(constraintMap, "gravity", 0);
10638
10779
  data.mix = getValue(constraintMap, "mix", 1);
10639
10780
  data.inertiaGlobal = getValue(constraintMap, "inertiaGlobal", false);
10640
10781
  data.strengthGlobal = getValue(constraintMap, "strengthGlobal", false);
@@ -11079,6 +11220,13 @@ var spine = (() => {
11079
11220
  } else if (timelineName === "sheary") {
11080
11221
  let timeline = new ShearYTimeline(frames, frames, boneIndex);
11081
11222
  timelines.push(readTimeline12(timelineMap, timeline, 0, 1));
11223
+ } else if (timelineName === "inherit") {
11224
+ let timeline = new InheritTimeline(frames, bone.index);
11225
+ for (let frame = 0; frame < timelineMap.length; frame++) {
11226
+ let aFrame = timelineMap[frame];
11227
+ timeline.setFrame(frame, getValue(aFrame, "time", 0), Utils.enumValue(Inherit, getValue(aFrame, "inherit", "Normal")));
11228
+ }
11229
+ timelines.push(timeline);
11082
11230
  }
11083
11231
  }
11084
11232
  }
@@ -11250,7 +11398,6 @@ var spine = (() => {
11250
11398
  continue;
11251
11399
  }
11252
11400
  let timeline;
11253
- let timelineScale = 1;
11254
11401
  if (timelineName == "inertia")
11255
11402
  timeline = new PhysicsConstraintInertiaTimeline(frames, frames, constraintIndex);
11256
11403
  else if (timelineName == "strength")
@@ -11259,17 +11406,15 @@ var spine = (() => {
11259
11406
  timeline = new PhysicsConstraintDampingTimeline(frames, frames, constraintIndex);
11260
11407
  else if (timelineName == "mass")
11261
11408
  timeline = new PhysicsConstraintMassTimeline(frames, frames, constraintIndex);
11262
- else if (timelineName == "wind") {
11409
+ else if (timelineName == "wind")
11263
11410
  timeline = new PhysicsConstraintWindTimeline(frames, frames, constraintIndex);
11264
- timelineScale = scale;
11265
- } else if (timelineName == "gravity") {
11411
+ else if (timelineName == "gravity")
11266
11412
  timeline = new PhysicsConstraintGravityTimeline(frames, frames, constraintIndex);
11267
- timelineScale = scale;
11268
- } else if (timelineName == "mix")
11413
+ else if (timelineName == "mix")
11269
11414
  timeline = new PhysicsConstraintMixTimeline(frames, frames, constraintIndex);
11270
11415
  else
11271
11416
  continue;
11272
- timelines.push(readTimeline12(timelineMap, timeline, 0, timelineScale));
11417
+ timelines.push(readTimeline12(timelineMap, timeline, 0, 1));
11273
11418
  }
11274
11419
  }
11275
11420
  }