@esotericsoftware/spine-core 4.0.14 → 4.0.15

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.
Files changed (92) hide show
  1. package/dist/Animation.d.ts +363 -363
  2. package/dist/Animation.js +1949 -1949
  3. package/dist/AnimationState.d.ts +396 -396
  4. package/dist/AnimationState.js +958 -958
  5. package/dist/AnimationStateData.d.ts +51 -51
  6. package/dist/AnimationStateData.js +69 -69
  7. package/dist/AssetManagerBase.d.ts +72 -72
  8. package/dist/AssetManagerBase.js +302 -302
  9. package/dist/AtlasAttachmentLoader.d.ts +51 -51
  10. package/dist/AtlasAttachmentLoader.js +73 -73
  11. package/dist/Bone.d.ts +138 -138
  12. package/dist/Bone.js +333 -333
  13. package/dist/BoneData.d.ts +72 -72
  14. package/dist/BoneData.js +73 -73
  15. package/dist/ConstraintData.d.ts +35 -35
  16. package/dist/ConstraintData.js +36 -36
  17. package/dist/Event.d.ts +44 -44
  18. package/dist/Event.js +41 -41
  19. package/dist/EventData.d.ts +41 -41
  20. package/dist/EventData.js +36 -36
  21. package/dist/IkConstraint.d.ts +64 -64
  22. package/dist/IkConstraint.js +284 -284
  23. package/dist/IkConstraintData.d.ts +54 -54
  24. package/dist/IkConstraintData.js +53 -53
  25. package/dist/PathConstraint.d.ts +71 -71
  26. package/dist/PathConstraint.js +468 -468
  27. package/dist/PathConstraintData.d.ts +80 -80
  28. package/dist/PathConstraintData.js +69 -69
  29. package/dist/Skeleton.d.ts +158 -158
  30. package/dist/Skeleton.js +570 -570
  31. package/dist/SkeletonBinary.d.ts +67 -67
  32. package/dist/SkeletonBinary.js +1093 -1093
  33. package/dist/SkeletonBounds.d.ts +77 -77
  34. package/dist/SkeletonBounds.js +218 -218
  35. package/dist/SkeletonClipping.d.ts +50 -50
  36. package/dist/SkeletonClipping.js +323 -323
  37. package/dist/SkeletonData.d.ts +114 -114
  38. package/dist/SkeletonData.js +166 -166
  39. package/dist/SkeletonJson.d.ts +51 -51
  40. package/dist/SkeletonJson.js +915 -915
  41. package/dist/Skin.d.ts +71 -71
  42. package/dist/Skin.js +200 -200
  43. package/dist/Slot.d.ts +72 -72
  44. package/dist/Slot.js +93 -93
  45. package/dist/SlotData.d.ts +57 -57
  46. package/dist/SlotData.js +54 -54
  47. package/dist/Texture.d.ts +69 -69
  48. package/dist/Texture.js +72 -72
  49. package/dist/TextureAtlas.d.ts +65 -65
  50. package/dist/TextureAtlas.js +245 -245
  51. package/dist/TransformConstraint.d.ts +60 -60
  52. package/dist/TransformConstraint.js +239 -239
  53. package/dist/TransformConstraintData.d.ts +60 -60
  54. package/dist/TransformConstraintData.js +59 -59
  55. package/dist/Triangulator.d.ts +43 -43
  56. package/dist/Triangulator.js +243 -243
  57. package/dist/Updatable.d.ts +37 -37
  58. package/dist/Updatable.js +29 -29
  59. package/dist/Utils.d.ts +168 -168
  60. package/dist/Utils.js +403 -403
  61. package/dist/VertexEffect.d.ts +35 -35
  62. package/dist/VertexEffect.js +29 -29
  63. package/dist/attachments/Attachment.d.ts +71 -71
  64. package/dist/attachments/Attachment.js +139 -139
  65. package/dist/attachments/AttachmentLoader.d.ts +53 -53
  66. package/dist/attachments/AttachmentLoader.js +29 -29
  67. package/dist/attachments/BoundingBoxAttachment.d.ts +40 -40
  68. package/dist/attachments/BoundingBoxAttachment.js +47 -47
  69. package/dist/attachments/ClippingAttachment.d.ts +42 -42
  70. package/dist/attachments/ClippingAttachment.js +47 -47
  71. package/dist/attachments/MeshAttachment.d.ts +74 -74
  72. package/dist/attachments/MeshAttachment.js +159 -159
  73. package/dist/attachments/PathAttachment.d.ts +47 -47
  74. package/dist/attachments/PathAttachment.js +56 -56
  75. package/dist/attachments/PointAttachment.d.ts +48 -48
  76. package/dist/attachments/PointAttachment.js +62 -62
  77. package/dist/attachments/RegionAttachment.d.ts +108 -108
  78. package/dist/attachments/RegionAttachment.js +196 -196
  79. package/dist/attachments/index.d.ts +8 -8
  80. package/dist/attachments/index.js +8 -8
  81. package/dist/iife/spine-core.js +0 -3
  82. package/dist/iife/spine-core.js.map +2 -2
  83. package/dist/iife/spine-core.min.js +1 -1
  84. package/dist/index.d.ts +42 -42
  85. package/dist/index.js +42 -42
  86. package/dist/polyfills.d.ts +29 -29
  87. package/dist/polyfills.js +38 -38
  88. package/dist/vertexeffects/JitterEffect.d.ts +39 -39
  89. package/dist/vertexeffects/JitterEffect.js +45 -45
  90. package/dist/vertexeffects/SwirlEffect.d.ts +44 -44
  91. package/dist/vertexeffects/SwirlEffect.js +60 -60
  92. package/package.json +32 -32
@@ -1,959 +1,959 @@
1
- /******************************************************************************
2
- * Spine Runtimes License Agreement
3
- * Last updated January 1, 2020. Replaces all prior versions.
4
- *
5
- * Copyright (c) 2013-2020, Esoteric Software LLC
6
- *
7
- * Integration of the Spine Runtimes into software or otherwise creating
8
- * derivative works of the Spine Runtimes is permitted under the terms and
9
- * conditions of Section 2 of the Spine Editor License Agreement:
10
- * http://esotericsoftware.com/spine-editor-license
11
- *
12
- * Otherwise, it is permitted to integrate the Spine Runtimes into software
13
- * or otherwise create derivative works of the Spine Runtimes (collectively,
14
- * "Products"), provided that each user of the Products must obtain their own
15
- * Spine Editor license and redistribution of the Products in any form must
16
- * include this license and copyright notice.
17
- *
18
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27
- * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
- *****************************************************************************/
29
- import { Animation, MixBlend, AttachmentTimeline, MixDirection, RotateTimeline, DrawOrderTimeline, Timeline, EventTimeline } from "./Animation";
30
- import { StringSet, Pool, Utils, MathUtils } from "./Utils";
31
- /** Applies animations over time, queues animations for later playback, mixes (crossfading) between animations, and applies
32
- * multiple animations on top of each other (layering).
33
- *
34
- * See [Applying Animations](http://esotericsoftware.com/spine-applying-animations/) in the Spine Runtimes Guide. */
35
- export class AnimationState {
36
- constructor(data) {
37
- /** The list of tracks that currently have animations, which may contain null entries. */
38
- this.tracks = new Array();
39
- /** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
40
- * or faster. Defaults to 1.
41
- *
42
- * See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
43
- this.timeScale = 1;
44
- this.unkeyedState = 0;
45
- this.events = new Array();
46
- this.listeners = new Array();
47
- this.queue = new EventQueue(this);
48
- this.propertyIDs = new StringSet();
49
- this.animationsChanged = false;
50
- this.trackEntryPool = new Pool(() => new TrackEntry());
51
- this.data = data;
52
- }
53
- static emptyAnimation() {
54
- if (!_emptyAnimation)
55
- _emptyAnimation = new Animation("<empty>", [], 0);
56
- return _emptyAnimation;
57
- }
58
- /** Increments each track entry {@link TrackEntry#trackTime()}, setting queued animations as current if needed. */
59
- update(delta) {
60
- delta *= this.timeScale;
61
- let tracks = this.tracks;
62
- for (let i = 0, n = tracks.length; i < n; i++) {
63
- let current = tracks[i];
64
- if (!current)
65
- continue;
66
- current.animationLast = current.nextAnimationLast;
67
- current.trackLast = current.nextTrackLast;
68
- let currentDelta = delta * current.timeScale;
69
- if (current.delay > 0) {
70
- current.delay -= currentDelta;
71
- if (current.delay > 0)
72
- continue;
73
- currentDelta = -current.delay;
74
- current.delay = 0;
75
- }
76
- let next = current.next;
77
- if (next) {
78
- // When the next entry's delay is passed, change to the next entry, preserving leftover time.
79
- let nextTime = current.trackLast - next.delay;
80
- if (nextTime >= 0) {
81
- next.delay = 0;
82
- next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;
83
- current.trackTime += currentDelta;
84
- this.setCurrent(i, next, true);
85
- while (next.mixingFrom) {
86
- next.mixTime += delta;
87
- next = next.mixingFrom;
88
- }
89
- continue;
90
- }
91
- }
92
- else if (current.trackLast >= current.trackEnd && !current.mixingFrom) {
93
- tracks[i] = null;
94
- this.queue.end(current);
95
- this.clearNext(current);
96
- continue;
97
- }
98
- if (current.mixingFrom && this.updateMixingFrom(current, delta)) {
99
- // End mixing from entries once all have completed.
100
- let from = current.mixingFrom;
101
- current.mixingFrom = null;
102
- if (from)
103
- from.mixingTo = null;
104
- while (from) {
105
- this.queue.end(from);
106
- from = from.mixingFrom;
107
- }
108
- }
109
- current.trackTime += currentDelta;
110
- }
111
- this.queue.drain();
112
- }
113
- /** Returns true when all mixing from entries are complete. */
114
- updateMixingFrom(to, delta) {
115
- let from = to.mixingFrom;
116
- if (!from)
117
- return true;
118
- let finished = this.updateMixingFrom(from, delta);
119
- from.animationLast = from.nextAnimationLast;
120
- from.trackLast = from.nextTrackLast;
121
- // Require mixTime > 0 to ensure the mixing from entry was applied at least once.
122
- if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {
123
- // Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).
124
- if (from.totalAlpha == 0 || to.mixDuration == 0) {
125
- to.mixingFrom = from.mixingFrom;
126
- if (from.mixingFrom)
127
- from.mixingFrom.mixingTo = to;
128
- to.interruptAlpha = from.interruptAlpha;
129
- this.queue.end(from);
130
- }
131
- return finished;
132
- }
133
- from.trackTime += delta * from.timeScale;
134
- to.mixTime += delta;
135
- return false;
136
- }
137
- /** Poses the skeleton using the track entry animations. There are no side effects other than invoking listeners, so the
138
- * animation state can be applied to multiple skeletons to pose them identically.
139
- * @returns True if any animations were applied. */
140
- apply(skeleton) {
141
- if (!skeleton)
142
- throw new Error("skeleton cannot be null.");
143
- if (this.animationsChanged)
144
- this._animationsChanged();
145
- let events = this.events;
146
- let tracks = this.tracks;
147
- let applied = false;
148
- for (let i = 0, n = tracks.length; i < n; i++) {
149
- let current = tracks[i];
150
- if (!current || current.delay > 0)
151
- continue;
152
- applied = true;
153
- let blend = i == 0 ? MixBlend.first : current.mixBlend;
154
- // Apply mixing from entries first.
155
- let mix = current.alpha;
156
- if (current.mixingFrom)
157
- mix *= this.applyMixingFrom(current, skeleton, blend);
158
- else if (current.trackTime >= current.trackEnd && !current.next)
159
- mix = 0;
160
- // Apply current entry.
161
- let animationLast = current.animationLast, animationTime = current.getAnimationTime(), applyTime = animationTime;
162
- let applyEvents = events;
163
- if (current.reverse) {
164
- applyTime = current.animation.duration - applyTime;
165
- applyEvents = null;
166
- }
167
- let timelines = current.animation.timelines;
168
- let timelineCount = timelines.length;
169
- if ((i == 0 && mix == 1) || blend == MixBlend.add) {
170
- for (let ii = 0; ii < timelineCount; ii++) {
171
- // Fixes issue #302 on IOS9 where mix, blend sometimes became undefined and caused assets
172
- // to sometimes stop rendering when using color correction, as their RGBA values become NaN.
173
- // (https://github.com/pixijs/pixi-spine/issues/302)
174
- Utils.webkit602BugfixHelper(mix, blend);
175
- var timeline = timelines[ii];
176
- if (timeline instanceof AttachmentTimeline)
177
- this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);
178
- else
179
- timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, blend, MixDirection.mixIn);
180
- }
181
- }
182
- else {
183
- let timelineMode = current.timelineMode;
184
- let firstFrame = current.timelinesRotation.length != timelineCount << 1;
185
- if (firstFrame)
186
- current.timelinesRotation.length = timelineCount << 1;
187
- for (let ii = 0; ii < timelineCount; ii++) {
188
- let timeline = timelines[ii];
189
- let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : MixBlend.setup;
190
- if (timeline instanceof RotateTimeline) {
191
- this.applyRotateTimeline(timeline, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);
192
- }
193
- else if (timeline instanceof AttachmentTimeline) {
194
- this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);
195
- }
196
- else {
197
- // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109
198
- Utils.webkit602BugfixHelper(mix, blend);
199
- timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, timelineBlend, MixDirection.mixIn);
200
- }
201
- }
202
- }
203
- this.queueEvents(current, animationTime);
204
- events.length = 0;
205
- current.nextAnimationLast = animationTime;
206
- current.nextTrackLast = current.trackTime;
207
- }
208
- // Set slots attachments to the setup pose, if needed. This occurs if an animation that is mixing out sets attachments so
209
- // subsequent timelines see any deform, but the subsequent timelines don't set an attachment (eg they are also mixing out or
210
- // the time is before the first key).
211
- var setupState = this.unkeyedState + SETUP;
212
- var slots = skeleton.slots;
213
- for (var i = 0, n = skeleton.slots.length; i < n; i++) {
214
- var slot = slots[i];
215
- if (slot.attachmentState == setupState) {
216
- var attachmentName = slot.data.attachmentName;
217
- slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));
218
- }
219
- }
220
- this.unkeyedState += 2; // Increasing after each use avoids the need to reset attachmentState for every slot.
221
- this.queue.drain();
222
- return applied;
223
- }
224
- applyMixingFrom(to, skeleton, blend) {
225
- let from = to.mixingFrom;
226
- if (from.mixingFrom)
227
- this.applyMixingFrom(from, skeleton, blend);
228
- let mix = 0;
229
- if (to.mixDuration == 0) { // Single frame mix to undo mixingFrom changes.
230
- mix = 1;
231
- if (blend == MixBlend.first)
232
- blend = MixBlend.setup;
233
- }
234
- else {
235
- mix = to.mixTime / to.mixDuration;
236
- if (mix > 1)
237
- mix = 1;
238
- if (blend != MixBlend.first)
239
- blend = from.mixBlend;
240
- }
241
- let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;
242
- let timelines = from.animation.timelines;
243
- let timelineCount = timelines.length;
244
- let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);
245
- let animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;
246
- let events = null;
247
- if (from.reverse)
248
- applyTime = from.animation.duration - applyTime;
249
- else if (mix < from.eventThreshold)
250
- events = this.events;
251
- if (blend == MixBlend.add) {
252
- for (let i = 0; i < timelineCount; i++)
253
- timelines[i].apply(skeleton, animationLast, applyTime, events, alphaMix, blend, MixDirection.mixOut);
254
- }
255
- else {
256
- let timelineMode = from.timelineMode;
257
- let timelineHoldMix = from.timelineHoldMix;
258
- let firstFrame = from.timelinesRotation.length != timelineCount << 1;
259
- if (firstFrame)
260
- from.timelinesRotation.length = timelineCount << 1;
261
- from.totalAlpha = 0;
262
- for (let i = 0; i < timelineCount; i++) {
263
- let timeline = timelines[i];
264
- let direction = MixDirection.mixOut;
265
- let timelineBlend;
266
- let alpha = 0;
267
- switch (timelineMode[i]) {
268
- case SUBSEQUENT:
269
- if (!drawOrder && timeline instanceof DrawOrderTimeline)
270
- continue;
271
- timelineBlend = blend;
272
- alpha = alphaMix;
273
- break;
274
- case FIRST:
275
- timelineBlend = MixBlend.setup;
276
- alpha = alphaMix;
277
- break;
278
- case HOLD_SUBSEQUENT:
279
- timelineBlend = blend;
280
- alpha = alphaHold;
281
- break;
282
- case HOLD_FIRST:
283
- timelineBlend = MixBlend.setup;
284
- alpha = alphaHold;
285
- break;
286
- default:
287
- timelineBlend = MixBlend.setup;
288
- let holdMix = timelineHoldMix[i];
289
- alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);
290
- break;
291
- }
292
- from.totalAlpha += alpha;
293
- if (timeline instanceof RotateTimeline)
294
- this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);
295
- else if (timeline instanceof AttachmentTimeline)
296
- this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);
297
- else {
298
- // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109
299
- Utils.webkit602BugfixHelper(alpha, blend);
300
- if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == MixBlend.setup)
301
- direction = MixDirection.mixIn;
302
- timeline.apply(skeleton, animationLast, applyTime, events, alpha, timelineBlend, direction);
303
- }
304
- }
305
- }
306
- if (to.mixDuration > 0)
307
- this.queueEvents(from, animationTime);
308
- this.events.length = 0;
309
- from.nextAnimationLast = animationTime;
310
- from.nextTrackLast = from.trackTime;
311
- return mix;
312
- }
313
- applyAttachmentTimeline(timeline, skeleton, time, blend, attachments) {
314
- var slot = skeleton.slots[timeline.slotIndex];
315
- if (!slot.bone.active)
316
- return;
317
- if (time < timeline.frames[0]) { // Time is before first frame.
318
- if (blend == MixBlend.setup || blend == MixBlend.first)
319
- this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);
320
- }
321
- else
322
- this.setAttachment(skeleton, slot, timeline.attachmentNames[Timeline.search1(timeline.frames, time)], attachments);
323
- // If an attachment wasn't set (ie before the first frame or attachments is false), set the setup attachment later.
324
- if (slot.attachmentState <= this.unkeyedState)
325
- slot.attachmentState = this.unkeyedState + SETUP;
326
- }
327
- setAttachment(skeleton, slot, attachmentName, attachments) {
328
- slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));
329
- if (attachments)
330
- slot.attachmentState = this.unkeyedState + CURRENT;
331
- }
332
- applyRotateTimeline(timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {
333
- if (firstFrame)
334
- timelinesRotation[i] = 0;
335
- if (alpha == 1) {
336
- timeline.apply(skeleton, 0, time, null, 1, blend, MixDirection.mixIn);
337
- return;
338
- }
339
- let bone = skeleton.bones[timeline.boneIndex];
340
- if (!bone.active)
341
- return;
342
- let frames = timeline.frames;
343
- let r1 = 0, r2 = 0;
344
- if (time < frames[0]) {
345
- switch (blend) {
346
- case MixBlend.setup:
347
- bone.rotation = bone.data.rotation;
348
- default:
349
- return;
350
- case MixBlend.first:
351
- r1 = bone.rotation;
352
- r2 = bone.data.rotation;
353
- }
354
- }
355
- else {
356
- r1 = blend == MixBlend.setup ? bone.data.rotation : bone.rotation;
357
- r2 = bone.data.rotation + timeline.getCurveValue(time);
358
- }
359
- // Mix between rotations using the direction of the shortest route on the first frame while detecting crosses.
360
- let total = 0, diff = r2 - r1;
361
- diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;
362
- if (diff == 0) {
363
- total = timelinesRotation[i];
364
- }
365
- else {
366
- let lastTotal = 0, lastDiff = 0;
367
- if (firstFrame) {
368
- lastTotal = 0;
369
- lastDiff = diff;
370
- }
371
- else {
372
- lastTotal = timelinesRotation[i]; // Angle and direction of mix, including loops.
373
- lastDiff = timelinesRotation[i + 1]; // Difference between bones.
374
- }
375
- let current = diff > 0, dir = lastTotal >= 0;
376
- // Detect cross at 0 (not 180).
377
- if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {
378
- // A cross after a 360 rotation is a loop.
379
- if (Math.abs(lastTotal) > 180)
380
- lastTotal += 360 * MathUtils.signum(lastTotal);
381
- dir = current;
382
- }
383
- total = diff + lastTotal - lastTotal % 360; // Store loops as part of lastTotal.
384
- if (dir != current)
385
- total += 360 * MathUtils.signum(lastTotal);
386
- timelinesRotation[i] = total;
387
- }
388
- timelinesRotation[i + 1] = diff;
389
- bone.rotation = r1 + total * alpha;
390
- }
391
- queueEvents(entry, animationTime) {
392
- let animationStart = entry.animationStart, animationEnd = entry.animationEnd;
393
- let duration = animationEnd - animationStart;
394
- let trackLastWrapped = entry.trackLast % duration;
395
- // Queue events before complete.
396
- let events = this.events;
397
- let i = 0, n = events.length;
398
- for (; i < n; i++) {
399
- let event = events[i];
400
- if (event.time < trackLastWrapped)
401
- break;
402
- if (event.time > animationEnd)
403
- continue; // Discard events outside animation start/end.
404
- this.queue.event(entry, event);
405
- }
406
- // Queue complete if completed a loop iteration or the animation.
407
- let complete = false;
408
- if (entry.loop)
409
- complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
410
- else
411
- complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
412
- if (complete)
413
- this.queue.complete(entry);
414
- // Queue events after complete.
415
- for (; i < n; i++) {
416
- let event = events[i];
417
- if (event.time < animationStart)
418
- continue; // Discard events outside animation start/end.
419
- this.queue.event(entry, event);
420
- }
421
- }
422
- /** Removes all animations from all tracks, leaving skeletons in their current pose.
423
- *
424
- * It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,
425
- * rather than leaving them in their current pose. */
426
- clearTracks() {
427
- let oldDrainDisabled = this.queue.drainDisabled;
428
- this.queue.drainDisabled = true;
429
- for (let i = 0, n = this.tracks.length; i < n; i++)
430
- this.clearTrack(i);
431
- this.tracks.length = 0;
432
- this.queue.drainDisabled = oldDrainDisabled;
433
- this.queue.drain();
434
- }
435
- /** Removes all animations from the track, leaving skeletons in their current pose.
436
- *
437
- * It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,
438
- * rather than leaving them in their current pose. */
439
- clearTrack(trackIndex) {
440
- if (trackIndex >= this.tracks.length)
441
- return;
442
- let current = this.tracks[trackIndex];
443
- if (!current)
444
- return;
445
- this.queue.end(current);
446
- this.clearNext(current);
447
- let entry = current;
448
- while (true) {
449
- let from = entry.mixingFrom;
450
- if (!from)
451
- break;
452
- this.queue.end(from);
453
- entry.mixingFrom = null;
454
- entry.mixingTo = null;
455
- entry = from;
456
- }
457
- this.tracks[current.trackIndex] = null;
458
- this.queue.drain();
459
- }
460
- setCurrent(index, current, interrupt) {
461
- let from = this.expandToIndex(index);
462
- this.tracks[index] = current;
463
- current.previous = null;
464
- if (from) {
465
- if (interrupt)
466
- this.queue.interrupt(from);
467
- current.mixingFrom = from;
468
- from.mixingTo = current;
469
- current.mixTime = 0;
470
- // Store the interrupted mix percentage.
471
- if (from.mixingFrom && from.mixDuration > 0)
472
- current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);
473
- from.timelinesRotation.length = 0; // Reset rotation for mixing out, in case entry was mixed in.
474
- }
475
- this.queue.start(current);
476
- }
477
- /** Sets an animation by name.
478
- *
479
- * See {@link #setAnimationWith()}. */
480
- setAnimation(trackIndex, animationName, loop = false) {
481
- let animation = this.data.skeletonData.findAnimation(animationName);
482
- if (!animation)
483
- throw new Error("Animation not found: " + animationName);
484
- return this.setAnimationWith(trackIndex, animation, loop);
485
- }
486
- /** Sets the current animation for a track, discarding any queued animations. If the formerly current track entry was never
487
- * applied to a skeleton, it is replaced (not mixed from).
488
- * @param loop If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
489
- * duration. In either case {@link TrackEntry#trackEnd} determines when the track is cleared.
490
- * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept
491
- * after the {@link AnimationStateListener#dispose()} event occurs. */
492
- setAnimationWith(trackIndex, animation, loop = false) {
493
- if (!animation)
494
- throw new Error("animation cannot be null.");
495
- let interrupt = true;
496
- let current = this.expandToIndex(trackIndex);
497
- if (current) {
498
- if (current.nextTrackLast == -1) {
499
- // Don't mix from an entry that was never applied.
500
- this.tracks[trackIndex] = current.mixingFrom;
501
- this.queue.interrupt(current);
502
- this.queue.end(current);
503
- this.clearNext(current);
504
- current = current.mixingFrom;
505
- interrupt = false;
506
- }
507
- else
508
- this.clearNext(current);
509
- }
510
- let entry = this.trackEntry(trackIndex, animation, loop, current);
511
- this.setCurrent(trackIndex, entry, interrupt);
512
- this.queue.drain();
513
- return entry;
514
- }
515
- /** Queues an animation by name.
516
- *
517
- * See {@link #addAnimationWith()}. */
518
- addAnimation(trackIndex, animationName, loop = false, delay = 0) {
519
- let animation = this.data.skeletonData.findAnimation(animationName);
520
- if (!animation)
521
- throw new Error("Animation not found: " + animationName);
522
- return this.addAnimationWith(trackIndex, animation, loop, delay);
523
- }
524
- /** Adds an animation to be played after the current or last queued animation for a track. If the track is empty, it is
525
- * equivalent to calling {@link #setAnimationWith()}.
526
- * @param delay If > 0, sets {@link TrackEntry#delay}. If <= 0, the delay set is the duration of the previous track entry
527
- * minus any mix duration (from the {@link AnimationStateData}) plus the specified `delay` (ie the mix
528
- * ends at (`delay` = 0) or before (`delay` < 0) the previous track entry duration). If the
529
- * previous entry is looping, its next loop completion is used instead of its duration.
530
- * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept
531
- * after the {@link AnimationStateListener#dispose()} event occurs. */
532
- addAnimationWith(trackIndex, animation, loop = false, delay = 0) {
533
- if (!animation)
534
- throw new Error("animation cannot be null.");
535
- let last = this.expandToIndex(trackIndex);
536
- if (last) {
537
- while (last.next)
538
- last = last.next;
539
- }
540
- let entry = this.trackEntry(trackIndex, animation, loop, last);
541
- if (!last) {
542
- this.setCurrent(trackIndex, entry, true);
543
- this.queue.drain();
544
- }
545
- else {
546
- last.next = entry;
547
- entry.previous = last;
548
- if (delay <= 0)
549
- delay += last.getTrackComplete() - entry.mixDuration;
550
- }
551
- entry.delay = delay;
552
- return entry;
553
- }
554
- /** Sets an empty animation for a track, discarding any queued animations, and sets the track entry's
555
- * {@link TrackEntry#mixduration}. An empty animation has no timelines and serves as a placeholder for mixing in or out.
556
- *
557
- * Mixing out is done by setting an empty animation with a mix duration using either {@link #setEmptyAnimation()},
558
- * {@link #setEmptyAnimations()}, or {@link #addEmptyAnimation()}. Mixing to an empty animation causes
559
- * the previous animation to be applied less and less over the mix duration. Properties keyed in the previous animation
560
- * transition to the value from lower tracks or to the setup pose value if no lower tracks key the property. A mix duration of
561
- * 0 still mixes out over one frame.
562
- *
563
- * Mixing in is done by first setting an empty animation, then adding an animation using
564
- * {@link #addAnimation()} and on the returned track entry, set the
565
- * {@link TrackEntry#setMixDuration()}. Mixing from an empty animation causes the new animation to be applied more and
566
- * more over the mix duration. Properties keyed in the new animation transition from the value from lower tracks or from the
567
- * setup pose value if no lower tracks key the property to the value keyed in the new animation. */
568
- setEmptyAnimation(trackIndex, mixDuration = 0) {
569
- let entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation(), false);
570
- entry.mixDuration = mixDuration;
571
- entry.trackEnd = mixDuration;
572
- return entry;
573
- }
574
- /** Adds an empty animation to be played after the current or last queued animation for a track, and sets the track entry's
575
- * {@link TrackEntry#mixDuration}. If the track is empty, it is equivalent to calling
576
- * {@link #setEmptyAnimation()}.
577
- *
578
- * See {@link #setEmptyAnimation()}.
579
- * @param delay If > 0, sets {@link TrackEntry#delay}. If <= 0, the delay set is the duration of the previous track entry
580
- * minus any mix duration plus the specified `delay` (ie the mix ends at (`delay` = 0) or
581
- * before (`delay` < 0) the previous track entry duration). If the previous entry is looping, its next
582
- * loop completion is used instead of its duration.
583
- * @return A track entry to allow further customization of animation playback. References to the track entry must not be kept
584
- * after the {@link AnimationStateListener#dispose()} event occurs. */
585
- addEmptyAnimation(trackIndex, mixDuration = 0, delay = 0) {
586
- let entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation(), false, delay);
587
- if (delay <= 0)
588
- entry.delay += entry.mixDuration - mixDuration;
589
- entry.mixDuration = mixDuration;
590
- entry.trackEnd = mixDuration;
591
- return entry;
592
- }
593
- /** Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix
594
- * duration. */
595
- setEmptyAnimations(mixDuration = 0) {
596
- let oldDrainDisabled = this.queue.drainDisabled;
597
- this.queue.drainDisabled = true;
598
- for (let i = 0, n = this.tracks.length; i < n; i++) {
599
- let current = this.tracks[i];
600
- if (current)
601
- this.setEmptyAnimation(current.trackIndex, mixDuration);
602
- }
603
- this.queue.drainDisabled = oldDrainDisabled;
604
- this.queue.drain();
605
- }
606
- expandToIndex(index) {
607
- if (index < this.tracks.length)
608
- return this.tracks[index];
609
- Utils.ensureArrayCapacity(this.tracks, index + 1, null);
610
- this.tracks.length = index + 1;
611
- return null;
612
- }
613
- /** @param last May be null. */
614
- trackEntry(trackIndex, animation, loop, last) {
615
- let entry = this.trackEntryPool.obtain();
616
- entry.trackIndex = trackIndex;
617
- entry.animation = animation;
618
- entry.loop = loop;
619
- entry.holdPrevious = false;
620
- entry.eventThreshold = 0;
621
- entry.attachmentThreshold = 0;
622
- entry.drawOrderThreshold = 0;
623
- entry.animationStart = 0;
624
- entry.animationEnd = animation.duration;
625
- entry.animationLast = -1;
626
- entry.nextAnimationLast = -1;
627
- entry.delay = 0;
628
- entry.trackTime = 0;
629
- entry.trackLast = -1;
630
- entry.nextTrackLast = -1;
631
- entry.trackEnd = Number.MAX_VALUE;
632
- entry.timeScale = 1;
633
- entry.alpha = 1;
634
- entry.interruptAlpha = 1;
635
- entry.mixTime = 0;
636
- entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);
637
- entry.mixBlend = MixBlend.replace;
638
- return entry;
639
- }
640
- /** Removes the {@link TrackEntry#getNext() next entry} and all entries after it for the specified entry. */
641
- clearNext(entry) {
642
- let next = entry.next;
643
- while (next) {
644
- this.queue.dispose(next);
645
- next = next.next;
646
- }
647
- entry.next = null;
648
- }
649
- _animationsChanged() {
650
- this.animationsChanged = false;
651
- this.propertyIDs.clear();
652
- let tracks = this.tracks;
653
- for (let i = 0, n = tracks.length; i < n; i++) {
654
- let entry = tracks[i];
655
- if (!entry)
656
- continue;
657
- while (entry.mixingFrom)
658
- entry = entry.mixingFrom;
659
- do {
660
- if (!entry.mixingTo || entry.mixBlend != MixBlend.add)
661
- this.computeHold(entry);
662
- entry = entry.mixingTo;
663
- } while (entry);
664
- }
665
- }
666
- computeHold(entry) {
667
- let to = entry.mixingTo;
668
- let timelines = entry.animation.timelines;
669
- let timelinesCount = entry.animation.timelines.length;
670
- let timelineMode = entry.timelineMode;
671
- timelineMode.length = timelinesCount;
672
- let timelineHoldMix = entry.timelineHoldMix;
673
- timelineHoldMix.length = 0;
674
- let propertyIDs = this.propertyIDs;
675
- if (to && to.holdPrevious) {
676
- for (let i = 0; i < timelinesCount; i++)
677
- timelineMode[i] = propertyIDs.addAll(timelines[i].getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;
678
- return;
679
- }
680
- outer: for (let i = 0; i < timelinesCount; i++) {
681
- let timeline = timelines[i];
682
- let ids = timeline.getPropertyIds();
683
- if (!propertyIDs.addAll(ids))
684
- timelineMode[i] = SUBSEQUENT;
685
- else if (!to || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline
686
- || timeline instanceof EventTimeline || !to.animation.hasTimeline(ids)) {
687
- timelineMode[i] = FIRST;
688
- }
689
- else {
690
- for (let next = to.mixingTo; next; next = next.mixingTo) {
691
- if (next.animation.hasTimeline(ids))
692
- continue;
693
- if (entry.mixDuration > 0) {
694
- timelineMode[i] = HOLD_MIX;
695
- timelineHoldMix[i] = next;
696
- continue outer;
697
- }
698
- break;
699
- }
700
- timelineMode[i] = HOLD_FIRST;
701
- }
702
- }
703
- }
704
- /** Returns the track entry for the animation currently playing on the track, or null if no animation is currently playing. */
705
- getCurrent(trackIndex) {
706
- if (trackIndex >= this.tracks.length)
707
- return null;
708
- return this.tracks[trackIndex];
709
- }
710
- /** Adds a listener to receive events for all track entries. */
711
- addListener(listener) {
712
- if (!listener)
713
- throw new Error("listener cannot be null.");
714
- this.listeners.push(listener);
715
- }
716
- /** Removes the listener added with {@link #addListener()}. */
717
- removeListener(listener) {
718
- let index = this.listeners.indexOf(listener);
719
- if (index >= 0)
720
- this.listeners.splice(index, 1);
721
- }
722
- /** Removes all listeners added with {@link #addListener()}. */
723
- clearListeners() {
724
- this.listeners.length = 0;
725
- }
726
- /** Discards all listener notifications that have not yet been delivered. This can be useful to call from an
727
- * {@link AnimationStateListener} when it is known that further notifications that may have been already queued for delivery
728
- * are not wanted because new animations are being set. */
729
- clearListenerNotifications() {
730
- this.queue.clear();
731
- }
732
- }
733
- /** Stores settings and other state for the playback of an animation on an {@link AnimationState} track.
734
- *
735
- * References to a track entry must not be kept after the {@link AnimationStateListener#dispose()} event occurs. */
736
- export class TrackEntry {
737
- constructor() {
738
- /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
739
- * replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
740
- * the values from the lower tracks.
741
- *
742
- * The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
743
- * called. */
744
- this.mixBlend = MixBlend.replace;
745
- this.timelineMode = new Array();
746
- this.timelineHoldMix = new Array();
747
- this.timelinesRotation = new Array();
748
- }
749
- reset() {
750
- this.next = null;
751
- this.previous = null;
752
- this.mixingFrom = null;
753
- this.mixingTo = null;
754
- this.animation = null;
755
- this.listener = null;
756
- this.timelineMode.length = 0;
757
- this.timelineHoldMix.length = 0;
758
- this.timelinesRotation.length = 0;
759
- }
760
- /** Uses {@link #trackTime} to compute the `animationTime`, which is between {@link #animationStart}
761
- * and {@link #animationEnd}. When the `trackTime` is 0, the `animationTime` is equal to the
762
- * `animationStart` time. */
763
- getAnimationTime() {
764
- if (this.loop) {
765
- let duration = this.animationEnd - this.animationStart;
766
- if (duration == 0)
767
- return this.animationStart;
768
- return (this.trackTime % duration) + this.animationStart;
769
- }
770
- return Math.min(this.trackTime + this.animationStart, this.animationEnd);
771
- }
772
- setAnimationLast(animationLast) {
773
- this.animationLast = animationLast;
774
- this.nextAnimationLast = animationLast;
775
- }
776
- /** Returns true if at least one loop has been completed.
777
- *
778
- * See {@link AnimationStateListener#complete()}. */
779
- isComplete() {
780
- return this.trackTime >= this.animationEnd - this.animationStart;
781
- }
782
- /** Resets the rotation directions for mixing this entry's rotate timelines. This can be useful to avoid bones rotating the
783
- * long way around when using {@link #alpha} and starting animations on other tracks.
784
- *
785
- * Mixing with {@link MixBlend#replace} involves finding a rotation between two others, which has two possible solutions:
786
- * the short way or the long way around. The two rotations likely change over time, so which direction is the short or long
787
- * way also changes. If the short way was always chosen, bones would flip to the other side when that direction became the
788
- * long way. TrackEntry chooses the short way the first time it is applied and remembers that direction. */
789
- resetRotationDirections() {
790
- this.timelinesRotation.length = 0;
791
- }
792
- getTrackComplete() {
793
- let duration = this.animationEnd - this.animationStart;
794
- if (duration != 0) {
795
- if (this.loop)
796
- return duration * (1 + ((this.trackTime / duration) | 0)); // Completion of next loop.
797
- if (this.trackTime < duration)
798
- return duration; // Before duration.
799
- }
800
- return this.trackTime; // Next update.
801
- }
802
- }
803
- export class EventQueue {
804
- constructor(animState) {
805
- this.objects = [];
806
- this.drainDisabled = false;
807
- this.animState = animState;
808
- }
809
- start(entry) {
810
- this.objects.push(EventType.start);
811
- this.objects.push(entry);
812
- this.animState.animationsChanged = true;
813
- }
814
- interrupt(entry) {
815
- this.objects.push(EventType.interrupt);
816
- this.objects.push(entry);
817
- }
818
- end(entry) {
819
- this.objects.push(EventType.end);
820
- this.objects.push(entry);
821
- this.animState.animationsChanged = true;
822
- }
823
- dispose(entry) {
824
- this.objects.push(EventType.dispose);
825
- this.objects.push(entry);
826
- }
827
- complete(entry) {
828
- this.objects.push(EventType.complete);
829
- this.objects.push(entry);
830
- }
831
- event(entry, event) {
832
- this.objects.push(EventType.event);
833
- this.objects.push(entry);
834
- this.objects.push(event);
835
- }
836
- drain() {
837
- if (this.drainDisabled)
838
- return;
839
- this.drainDisabled = true;
840
- let objects = this.objects;
841
- let listeners = this.animState.listeners;
842
- for (let i = 0; i < objects.length; i += 2) {
843
- let type = objects[i];
844
- let entry = objects[i + 1];
845
- switch (type) {
846
- case EventType.start:
847
- if (entry.listener && entry.listener.start)
848
- entry.listener.start(entry);
849
- for (let ii = 0; ii < listeners.length; ii++)
850
- if (listeners[ii].start)
851
- listeners[ii].start(entry);
852
- break;
853
- case EventType.interrupt:
854
- if (entry.listener && entry.listener.interrupt)
855
- entry.listener.interrupt(entry);
856
- for (let ii = 0; ii < listeners.length; ii++)
857
- if (listeners[ii].interrupt)
858
- listeners[ii].interrupt(entry);
859
- break;
860
- case EventType.end:
861
- if (entry.listener && entry.listener.end)
862
- entry.listener.end(entry);
863
- for (let ii = 0; ii < listeners.length; ii++)
864
- if (listeners[ii].end)
865
- listeners[ii].end(entry);
866
- // Fall through.
867
- case EventType.dispose:
868
- if (entry.listener && entry.listener.dispose)
869
- entry.listener.dispose(entry);
870
- for (let ii = 0; ii < listeners.length; ii++)
871
- if (listeners[ii].dispose)
872
- listeners[ii].dispose(entry);
873
- this.animState.trackEntryPool.free(entry);
874
- break;
875
- case EventType.complete:
876
- if (entry.listener && entry.listener.complete)
877
- entry.listener.complete(entry);
878
- for (let ii = 0; ii < listeners.length; ii++)
879
- if (listeners[ii].complete)
880
- listeners[ii].complete(entry);
881
- break;
882
- case EventType.event:
883
- let event = objects[i++ + 2];
884
- if (entry.listener && entry.listener.event)
885
- entry.listener.event(entry, event);
886
- for (let ii = 0; ii < listeners.length; ii++)
887
- if (listeners[ii].event)
888
- listeners[ii].event(entry, event);
889
- break;
890
- }
891
- }
892
- this.clear();
893
- this.drainDisabled = false;
894
- }
895
- clear() {
896
- this.objects.length = 0;
897
- }
898
- }
899
- export var EventType;
900
- (function (EventType) {
901
- EventType[EventType["start"] = 0] = "start";
902
- EventType[EventType["interrupt"] = 1] = "interrupt";
903
- EventType[EventType["end"] = 2] = "end";
904
- EventType[EventType["dispose"] = 3] = "dispose";
905
- EventType[EventType["complete"] = 4] = "complete";
906
- EventType[EventType["event"] = 5] = "event";
907
- })(EventType || (EventType = {}));
908
- export class AnimationStateAdapter {
909
- start(entry) {
910
- }
911
- interrupt(entry) {
912
- }
913
- end(entry) {
914
- }
915
- dispose(entry) {
916
- }
917
- complete(entry) {
918
- }
919
- event(entry, event) {
920
- }
921
- }
922
- /** 1. A previously applied timeline has set this property.
923
- *
924
- * Result: Mix from the current pose to the timeline pose. */
925
- export const SUBSEQUENT = 0;
926
- /** 1. This is the first timeline to set this property.
927
- * 2. The next track entry applied after this one does not have a timeline to set this property.
928
- *
929
- * Result: Mix from the setup pose to the timeline pose. */
930
- export const FIRST = 1;
931
- /** 1) A previously applied timeline has set this property.<br>
932
- * 2) The next track entry to be applied does have a timeline to set this property.<br>
933
- * 3) The next track entry after that one does not have a timeline to set this property.<br>
934
- * Result: Mix from the current pose to the timeline pose, but do not mix out. This avoids "dipping" when crossfading
935
- * animations that key the same property. A subsequent timeline will set this property using a mix. */
936
- export const HOLD_SUBSEQUENT = 2;
937
- /** 1) This is the first timeline to set this property.<br>
938
- * 2) The next track entry to be applied does have a timeline to set this property.<br>
939
- * 3) The next track entry after that one does not have a timeline to set this property.<br>
940
- * Result: Mix from the setup pose to the timeline pose, but do not mix out. This avoids "dipping" when crossfading animations
941
- * that key the same property. A subsequent timeline will set this property using a mix. */
942
- export const HOLD_FIRST = 3;
943
- /** 1. This is the first timeline to set this property.
944
- * 2. The next track entry to be applied does have a timeline to set this property.
945
- * 3. The next track entry after that one does have a timeline to set this property.
946
- * 4. timelineHoldMix stores the first subsequent track entry that does not have a timeline to set this property.
947
- *
948
- * Result: The same as HOLD except the mix percentage from the timelineHoldMix track entry is used. This handles when more than
949
- * 2 track entries in a row have a timeline that sets the same property.
950
- *
951
- * Eg, A -> B -> C -> D where A, B, and C have a timeline setting same property, but D does not. When A is applied, to avoid
952
- * "dipping" A is not mixed out, however D (the first entry that doesn't set the property) mixing in is used to mix out A
953
- * (which affects B and C). Without using D to mix out, A would be applied fully until mixing completes, then snap into
954
- * place. */
955
- export const HOLD_MIX = 4;
956
- export const SETUP = 1;
957
- export const CURRENT = 2;
958
- let _emptyAnimation = null;
1
+ /******************************************************************************
2
+ * Spine Runtimes License Agreement
3
+ * Last updated January 1, 2020. Replaces all prior versions.
4
+ *
5
+ * Copyright (c) 2013-2020, Esoteric Software LLC
6
+ *
7
+ * Integration of the Spine Runtimes into software or otherwise creating
8
+ * derivative works of the Spine Runtimes is permitted under the terms and
9
+ * conditions of Section 2 of the Spine Editor License Agreement:
10
+ * http://esotericsoftware.com/spine-editor-license
11
+ *
12
+ * Otherwise, it is permitted to integrate the Spine Runtimes into software
13
+ * or otherwise create derivative works of the Spine Runtimes (collectively,
14
+ * "Products"), provided that each user of the Products must obtain their own
15
+ * Spine Editor license and redistribution of the Products in any form must
16
+ * include this license and copyright notice.
17
+ *
18
+ * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24
+ * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27
+ * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ *****************************************************************************/
29
+ import { Animation, MixBlend, AttachmentTimeline, MixDirection, RotateTimeline, DrawOrderTimeline, Timeline, EventTimeline } from "./Animation";
30
+ import { StringSet, Pool, Utils, MathUtils } from "./Utils";
31
+ /** Applies animations over time, queues animations for later playback, mixes (crossfading) between animations, and applies
32
+ * multiple animations on top of each other (layering).
33
+ *
34
+ * See [Applying Animations](http://esotericsoftware.com/spine-applying-animations/) in the Spine Runtimes Guide. */
35
+ export class AnimationState {
36
+ constructor(data) {
37
+ /** The list of tracks that currently have animations, which may contain null entries. */
38
+ this.tracks = new Array();
39
+ /** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
40
+ * or faster. Defaults to 1.
41
+ *
42
+ * See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
43
+ this.timeScale = 1;
44
+ this.unkeyedState = 0;
45
+ this.events = new Array();
46
+ this.listeners = new Array();
47
+ this.queue = new EventQueue(this);
48
+ this.propertyIDs = new StringSet();
49
+ this.animationsChanged = false;
50
+ this.trackEntryPool = new Pool(() => new TrackEntry());
51
+ this.data = data;
52
+ }
53
+ static emptyAnimation() {
54
+ if (!_emptyAnimation)
55
+ _emptyAnimation = new Animation("<empty>", [], 0);
56
+ return _emptyAnimation;
57
+ }
58
+ /** Increments each track entry {@link TrackEntry#trackTime()}, setting queued animations as current if needed. */
59
+ update(delta) {
60
+ delta *= this.timeScale;
61
+ let tracks = this.tracks;
62
+ for (let i = 0, n = tracks.length; i < n; i++) {
63
+ let current = tracks[i];
64
+ if (!current)
65
+ continue;
66
+ current.animationLast = current.nextAnimationLast;
67
+ current.trackLast = current.nextTrackLast;
68
+ let currentDelta = delta * current.timeScale;
69
+ if (current.delay > 0) {
70
+ current.delay -= currentDelta;
71
+ if (current.delay > 0)
72
+ continue;
73
+ currentDelta = -current.delay;
74
+ current.delay = 0;
75
+ }
76
+ let next = current.next;
77
+ if (next) {
78
+ // When the next entry's delay is passed, change to the next entry, preserving leftover time.
79
+ let nextTime = current.trackLast - next.delay;
80
+ if (nextTime >= 0) {
81
+ next.delay = 0;
82
+ next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;
83
+ current.trackTime += currentDelta;
84
+ this.setCurrent(i, next, true);
85
+ while (next.mixingFrom) {
86
+ next.mixTime += delta;
87
+ next = next.mixingFrom;
88
+ }
89
+ continue;
90
+ }
91
+ }
92
+ else if (current.trackLast >= current.trackEnd && !current.mixingFrom) {
93
+ tracks[i] = null;
94
+ this.queue.end(current);
95
+ this.clearNext(current);
96
+ continue;
97
+ }
98
+ if (current.mixingFrom && this.updateMixingFrom(current, delta)) {
99
+ // End mixing from entries once all have completed.
100
+ let from = current.mixingFrom;
101
+ current.mixingFrom = null;
102
+ if (from)
103
+ from.mixingTo = null;
104
+ while (from) {
105
+ this.queue.end(from);
106
+ from = from.mixingFrom;
107
+ }
108
+ }
109
+ current.trackTime += currentDelta;
110
+ }
111
+ this.queue.drain();
112
+ }
113
+ /** Returns true when all mixing from entries are complete. */
114
+ updateMixingFrom(to, delta) {
115
+ let from = to.mixingFrom;
116
+ if (!from)
117
+ return true;
118
+ let finished = this.updateMixingFrom(from, delta);
119
+ from.animationLast = from.nextAnimationLast;
120
+ from.trackLast = from.nextTrackLast;
121
+ // Require mixTime > 0 to ensure the mixing from entry was applied at least once.
122
+ if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {
123
+ // Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).
124
+ if (from.totalAlpha == 0 || to.mixDuration == 0) {
125
+ to.mixingFrom = from.mixingFrom;
126
+ if (from.mixingFrom)
127
+ from.mixingFrom.mixingTo = to;
128
+ to.interruptAlpha = from.interruptAlpha;
129
+ this.queue.end(from);
130
+ }
131
+ return finished;
132
+ }
133
+ from.trackTime += delta * from.timeScale;
134
+ to.mixTime += delta;
135
+ return false;
136
+ }
137
+ /** Poses the skeleton using the track entry animations. There are no side effects other than invoking listeners, so the
138
+ * animation state can be applied to multiple skeletons to pose them identically.
139
+ * @returns True if any animations were applied. */
140
+ apply(skeleton) {
141
+ if (!skeleton)
142
+ throw new Error("skeleton cannot be null.");
143
+ if (this.animationsChanged)
144
+ this._animationsChanged();
145
+ let events = this.events;
146
+ let tracks = this.tracks;
147
+ let applied = false;
148
+ for (let i = 0, n = tracks.length; i < n; i++) {
149
+ let current = tracks[i];
150
+ if (!current || current.delay > 0)
151
+ continue;
152
+ applied = true;
153
+ let blend = i == 0 ? MixBlend.first : current.mixBlend;
154
+ // Apply mixing from entries first.
155
+ let mix = current.alpha;
156
+ if (current.mixingFrom)
157
+ mix *= this.applyMixingFrom(current, skeleton, blend);
158
+ else if (current.trackTime >= current.trackEnd && !current.next)
159
+ mix = 0;
160
+ // Apply current entry.
161
+ let animationLast = current.animationLast, animationTime = current.getAnimationTime(), applyTime = animationTime;
162
+ let applyEvents = events;
163
+ if (current.reverse) {
164
+ applyTime = current.animation.duration - applyTime;
165
+ applyEvents = null;
166
+ }
167
+ let timelines = current.animation.timelines;
168
+ let timelineCount = timelines.length;
169
+ if ((i == 0 && mix == 1) || blend == MixBlend.add) {
170
+ for (let ii = 0; ii < timelineCount; ii++) {
171
+ // Fixes issue #302 on IOS9 where mix, blend sometimes became undefined and caused assets
172
+ // to sometimes stop rendering when using color correction, as their RGBA values become NaN.
173
+ // (https://github.com/pixijs/pixi-spine/issues/302)
174
+ Utils.webkit602BugfixHelper(mix, blend);
175
+ var timeline = timelines[ii];
176
+ if (timeline instanceof AttachmentTimeline)
177
+ this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);
178
+ else
179
+ timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, blend, MixDirection.mixIn);
180
+ }
181
+ }
182
+ else {
183
+ let timelineMode = current.timelineMode;
184
+ let firstFrame = current.timelinesRotation.length != timelineCount << 1;
185
+ if (firstFrame)
186
+ current.timelinesRotation.length = timelineCount << 1;
187
+ for (let ii = 0; ii < timelineCount; ii++) {
188
+ let timeline = timelines[ii];
189
+ let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : MixBlend.setup;
190
+ if (timeline instanceof RotateTimeline) {
191
+ this.applyRotateTimeline(timeline, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);
192
+ }
193
+ else if (timeline instanceof AttachmentTimeline) {
194
+ this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);
195
+ }
196
+ else {
197
+ // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109
198
+ Utils.webkit602BugfixHelper(mix, blend);
199
+ timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, timelineBlend, MixDirection.mixIn);
200
+ }
201
+ }
202
+ }
203
+ this.queueEvents(current, animationTime);
204
+ events.length = 0;
205
+ current.nextAnimationLast = animationTime;
206
+ current.nextTrackLast = current.trackTime;
207
+ }
208
+ // Set slots attachments to the setup pose, if needed. This occurs if an animation that is mixing out sets attachments so
209
+ // subsequent timelines see any deform, but the subsequent timelines don't set an attachment (eg they are also mixing out or
210
+ // the time is before the first key).
211
+ var setupState = this.unkeyedState + SETUP;
212
+ var slots = skeleton.slots;
213
+ for (var i = 0, n = skeleton.slots.length; i < n; i++) {
214
+ var slot = slots[i];
215
+ if (slot.attachmentState == setupState) {
216
+ var attachmentName = slot.data.attachmentName;
217
+ slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));
218
+ }
219
+ }
220
+ this.unkeyedState += 2; // Increasing after each use avoids the need to reset attachmentState for every slot.
221
+ this.queue.drain();
222
+ return applied;
223
+ }
224
+ applyMixingFrom(to, skeleton, blend) {
225
+ let from = to.mixingFrom;
226
+ if (from.mixingFrom)
227
+ this.applyMixingFrom(from, skeleton, blend);
228
+ let mix = 0;
229
+ if (to.mixDuration == 0) { // Single frame mix to undo mixingFrom changes.
230
+ mix = 1;
231
+ if (blend == MixBlend.first)
232
+ blend = MixBlend.setup;
233
+ }
234
+ else {
235
+ mix = to.mixTime / to.mixDuration;
236
+ if (mix > 1)
237
+ mix = 1;
238
+ if (blend != MixBlend.first)
239
+ blend = from.mixBlend;
240
+ }
241
+ let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;
242
+ let timelines = from.animation.timelines;
243
+ let timelineCount = timelines.length;
244
+ let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);
245
+ let animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;
246
+ let events = null;
247
+ if (from.reverse)
248
+ applyTime = from.animation.duration - applyTime;
249
+ else if (mix < from.eventThreshold)
250
+ events = this.events;
251
+ if (blend == MixBlend.add) {
252
+ for (let i = 0; i < timelineCount; i++)
253
+ timelines[i].apply(skeleton, animationLast, applyTime, events, alphaMix, blend, MixDirection.mixOut);
254
+ }
255
+ else {
256
+ let timelineMode = from.timelineMode;
257
+ let timelineHoldMix = from.timelineHoldMix;
258
+ let firstFrame = from.timelinesRotation.length != timelineCount << 1;
259
+ if (firstFrame)
260
+ from.timelinesRotation.length = timelineCount << 1;
261
+ from.totalAlpha = 0;
262
+ for (let i = 0; i < timelineCount; i++) {
263
+ let timeline = timelines[i];
264
+ let direction = MixDirection.mixOut;
265
+ let timelineBlend;
266
+ let alpha = 0;
267
+ switch (timelineMode[i]) {
268
+ case SUBSEQUENT:
269
+ if (!drawOrder && timeline instanceof DrawOrderTimeline)
270
+ continue;
271
+ timelineBlend = blend;
272
+ alpha = alphaMix;
273
+ break;
274
+ case FIRST:
275
+ timelineBlend = MixBlend.setup;
276
+ alpha = alphaMix;
277
+ break;
278
+ case HOLD_SUBSEQUENT:
279
+ timelineBlend = blend;
280
+ alpha = alphaHold;
281
+ break;
282
+ case HOLD_FIRST:
283
+ timelineBlend = MixBlend.setup;
284
+ alpha = alphaHold;
285
+ break;
286
+ default:
287
+ timelineBlend = MixBlend.setup;
288
+ let holdMix = timelineHoldMix[i];
289
+ alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);
290
+ break;
291
+ }
292
+ from.totalAlpha += alpha;
293
+ if (timeline instanceof RotateTimeline)
294
+ this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);
295
+ else if (timeline instanceof AttachmentTimeline)
296
+ this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);
297
+ else {
298
+ // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109
299
+ Utils.webkit602BugfixHelper(alpha, blend);
300
+ if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == MixBlend.setup)
301
+ direction = MixDirection.mixIn;
302
+ timeline.apply(skeleton, animationLast, applyTime, events, alpha, timelineBlend, direction);
303
+ }
304
+ }
305
+ }
306
+ if (to.mixDuration > 0)
307
+ this.queueEvents(from, animationTime);
308
+ this.events.length = 0;
309
+ from.nextAnimationLast = animationTime;
310
+ from.nextTrackLast = from.trackTime;
311
+ return mix;
312
+ }
313
+ applyAttachmentTimeline(timeline, skeleton, time, blend, attachments) {
314
+ var slot = skeleton.slots[timeline.slotIndex];
315
+ if (!slot.bone.active)
316
+ return;
317
+ if (time < timeline.frames[0]) { // Time is before first frame.
318
+ if (blend == MixBlend.setup || blend == MixBlend.first)
319
+ this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);
320
+ }
321
+ else
322
+ this.setAttachment(skeleton, slot, timeline.attachmentNames[Timeline.search1(timeline.frames, time)], attachments);
323
+ // If an attachment wasn't set (ie before the first frame or attachments is false), set the setup attachment later.
324
+ if (slot.attachmentState <= this.unkeyedState)
325
+ slot.attachmentState = this.unkeyedState + SETUP;
326
+ }
327
+ setAttachment(skeleton, slot, attachmentName, attachments) {
328
+ slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));
329
+ if (attachments)
330
+ slot.attachmentState = this.unkeyedState + CURRENT;
331
+ }
332
+ applyRotateTimeline(timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {
333
+ if (firstFrame)
334
+ timelinesRotation[i] = 0;
335
+ if (alpha == 1) {
336
+ timeline.apply(skeleton, 0, time, null, 1, blend, MixDirection.mixIn);
337
+ return;
338
+ }
339
+ let bone = skeleton.bones[timeline.boneIndex];
340
+ if (!bone.active)
341
+ return;
342
+ let frames = timeline.frames;
343
+ let r1 = 0, r2 = 0;
344
+ if (time < frames[0]) {
345
+ switch (blend) {
346
+ case MixBlend.setup:
347
+ bone.rotation = bone.data.rotation;
348
+ default:
349
+ return;
350
+ case MixBlend.first:
351
+ r1 = bone.rotation;
352
+ r2 = bone.data.rotation;
353
+ }
354
+ }
355
+ else {
356
+ r1 = blend == MixBlend.setup ? bone.data.rotation : bone.rotation;
357
+ r2 = bone.data.rotation + timeline.getCurveValue(time);
358
+ }
359
+ // Mix between rotations using the direction of the shortest route on the first frame while detecting crosses.
360
+ let total = 0, diff = r2 - r1;
361
+ diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;
362
+ if (diff == 0) {
363
+ total = timelinesRotation[i];
364
+ }
365
+ else {
366
+ let lastTotal = 0, lastDiff = 0;
367
+ if (firstFrame) {
368
+ lastTotal = 0;
369
+ lastDiff = diff;
370
+ }
371
+ else {
372
+ lastTotal = timelinesRotation[i]; // Angle and direction of mix, including loops.
373
+ lastDiff = timelinesRotation[i + 1]; // Difference between bones.
374
+ }
375
+ let current = diff > 0, dir = lastTotal >= 0;
376
+ // Detect cross at 0 (not 180).
377
+ if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {
378
+ // A cross after a 360 rotation is a loop.
379
+ if (Math.abs(lastTotal) > 180)
380
+ lastTotal += 360 * MathUtils.signum(lastTotal);
381
+ dir = current;
382
+ }
383
+ total = diff + lastTotal - lastTotal % 360; // Store loops as part of lastTotal.
384
+ if (dir != current)
385
+ total += 360 * MathUtils.signum(lastTotal);
386
+ timelinesRotation[i] = total;
387
+ }
388
+ timelinesRotation[i + 1] = diff;
389
+ bone.rotation = r1 + total * alpha;
390
+ }
391
+ queueEvents(entry, animationTime) {
392
+ let animationStart = entry.animationStart, animationEnd = entry.animationEnd;
393
+ let duration = animationEnd - animationStart;
394
+ let trackLastWrapped = entry.trackLast % duration;
395
+ // Queue events before complete.
396
+ let events = this.events;
397
+ let i = 0, n = events.length;
398
+ for (; i < n; i++) {
399
+ let event = events[i];
400
+ if (event.time < trackLastWrapped)
401
+ break;
402
+ if (event.time > animationEnd)
403
+ continue; // Discard events outside animation start/end.
404
+ this.queue.event(entry, event);
405
+ }
406
+ // Queue complete if completed a loop iteration or the animation.
407
+ let complete = false;
408
+ if (entry.loop)
409
+ complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
410
+ else
411
+ complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
412
+ if (complete)
413
+ this.queue.complete(entry);
414
+ // Queue events after complete.
415
+ for (; i < n; i++) {
416
+ let event = events[i];
417
+ if (event.time < animationStart)
418
+ continue; // Discard events outside animation start/end.
419
+ this.queue.event(entry, event);
420
+ }
421
+ }
422
+ /** Removes all animations from all tracks, leaving skeletons in their current pose.
423
+ *
424
+ * It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,
425
+ * rather than leaving them in their current pose. */
426
+ clearTracks() {
427
+ let oldDrainDisabled = this.queue.drainDisabled;
428
+ this.queue.drainDisabled = true;
429
+ for (let i = 0, n = this.tracks.length; i < n; i++)
430
+ this.clearTrack(i);
431
+ this.tracks.length = 0;
432
+ this.queue.drainDisabled = oldDrainDisabled;
433
+ this.queue.drain();
434
+ }
435
+ /** Removes all animations from the track, leaving skeletons in their current pose.
436
+ *
437
+ * It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,
438
+ * rather than leaving them in their current pose. */
439
+ clearTrack(trackIndex) {
440
+ if (trackIndex >= this.tracks.length)
441
+ return;
442
+ let current = this.tracks[trackIndex];
443
+ if (!current)
444
+ return;
445
+ this.queue.end(current);
446
+ this.clearNext(current);
447
+ let entry = current;
448
+ while (true) {
449
+ let from = entry.mixingFrom;
450
+ if (!from)
451
+ break;
452
+ this.queue.end(from);
453
+ entry.mixingFrom = null;
454
+ entry.mixingTo = null;
455
+ entry = from;
456
+ }
457
+ this.tracks[current.trackIndex] = null;
458
+ this.queue.drain();
459
+ }
460
+ setCurrent(index, current, interrupt) {
461
+ let from = this.expandToIndex(index);
462
+ this.tracks[index] = current;
463
+ current.previous = null;
464
+ if (from) {
465
+ if (interrupt)
466
+ this.queue.interrupt(from);
467
+ current.mixingFrom = from;
468
+ from.mixingTo = current;
469
+ current.mixTime = 0;
470
+ // Store the interrupted mix percentage.
471
+ if (from.mixingFrom && from.mixDuration > 0)
472
+ current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);
473
+ from.timelinesRotation.length = 0; // Reset rotation for mixing out, in case entry was mixed in.
474
+ }
475
+ this.queue.start(current);
476
+ }
477
+ /** Sets an animation by name.
478
+ *
479
+ * See {@link #setAnimationWith()}. */
480
+ setAnimation(trackIndex, animationName, loop = false) {
481
+ let animation = this.data.skeletonData.findAnimation(animationName);
482
+ if (!animation)
483
+ throw new Error("Animation not found: " + animationName);
484
+ return this.setAnimationWith(trackIndex, animation, loop);
485
+ }
486
+ /** Sets the current animation for a track, discarding any queued animations. If the formerly current track entry was never
487
+ * applied to a skeleton, it is replaced (not mixed from).
488
+ * @param loop If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
489
+ * duration. In either case {@link TrackEntry#trackEnd} determines when the track is cleared.
490
+ * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept
491
+ * after the {@link AnimationStateListener#dispose()} event occurs. */
492
+ setAnimationWith(trackIndex, animation, loop = false) {
493
+ if (!animation)
494
+ throw new Error("animation cannot be null.");
495
+ let interrupt = true;
496
+ let current = this.expandToIndex(trackIndex);
497
+ if (current) {
498
+ if (current.nextTrackLast == -1) {
499
+ // Don't mix from an entry that was never applied.
500
+ this.tracks[trackIndex] = current.mixingFrom;
501
+ this.queue.interrupt(current);
502
+ this.queue.end(current);
503
+ this.clearNext(current);
504
+ current = current.mixingFrom;
505
+ interrupt = false;
506
+ }
507
+ else
508
+ this.clearNext(current);
509
+ }
510
+ let entry = this.trackEntry(trackIndex, animation, loop, current);
511
+ this.setCurrent(trackIndex, entry, interrupt);
512
+ this.queue.drain();
513
+ return entry;
514
+ }
515
+ /** Queues an animation by name.
516
+ *
517
+ * See {@link #addAnimationWith()}. */
518
+ addAnimation(trackIndex, animationName, loop = false, delay = 0) {
519
+ let animation = this.data.skeletonData.findAnimation(animationName);
520
+ if (!animation)
521
+ throw new Error("Animation not found: " + animationName);
522
+ return this.addAnimationWith(trackIndex, animation, loop, delay);
523
+ }
524
+ /** Adds an animation to be played after the current or last queued animation for a track. If the track is empty, it is
525
+ * equivalent to calling {@link #setAnimationWith()}.
526
+ * @param delay If > 0, sets {@link TrackEntry#delay}. If <= 0, the delay set is the duration of the previous track entry
527
+ * minus any mix duration (from the {@link AnimationStateData}) plus the specified `delay` (ie the mix
528
+ * ends at (`delay` = 0) or before (`delay` < 0) the previous track entry duration). If the
529
+ * previous entry is looping, its next loop completion is used instead of its duration.
530
+ * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept
531
+ * after the {@link AnimationStateListener#dispose()} event occurs. */
532
+ addAnimationWith(trackIndex, animation, loop = false, delay = 0) {
533
+ if (!animation)
534
+ throw new Error("animation cannot be null.");
535
+ let last = this.expandToIndex(trackIndex);
536
+ if (last) {
537
+ while (last.next)
538
+ last = last.next;
539
+ }
540
+ let entry = this.trackEntry(trackIndex, animation, loop, last);
541
+ if (!last) {
542
+ this.setCurrent(trackIndex, entry, true);
543
+ this.queue.drain();
544
+ }
545
+ else {
546
+ last.next = entry;
547
+ entry.previous = last;
548
+ if (delay <= 0)
549
+ delay += last.getTrackComplete() - entry.mixDuration;
550
+ }
551
+ entry.delay = delay;
552
+ return entry;
553
+ }
554
+ /** Sets an empty animation for a track, discarding any queued animations, and sets the track entry's
555
+ * {@link TrackEntry#mixduration}. An empty animation has no timelines and serves as a placeholder for mixing in or out.
556
+ *
557
+ * Mixing out is done by setting an empty animation with a mix duration using either {@link #setEmptyAnimation()},
558
+ * {@link #setEmptyAnimations()}, or {@link #addEmptyAnimation()}. Mixing to an empty animation causes
559
+ * the previous animation to be applied less and less over the mix duration. Properties keyed in the previous animation
560
+ * transition to the value from lower tracks or to the setup pose value if no lower tracks key the property. A mix duration of
561
+ * 0 still mixes out over one frame.
562
+ *
563
+ * Mixing in is done by first setting an empty animation, then adding an animation using
564
+ * {@link #addAnimation()} and on the returned track entry, set the
565
+ * {@link TrackEntry#setMixDuration()}. Mixing from an empty animation causes the new animation to be applied more and
566
+ * more over the mix duration. Properties keyed in the new animation transition from the value from lower tracks or from the
567
+ * setup pose value if no lower tracks key the property to the value keyed in the new animation. */
568
+ setEmptyAnimation(trackIndex, mixDuration = 0) {
569
+ let entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation(), false);
570
+ entry.mixDuration = mixDuration;
571
+ entry.trackEnd = mixDuration;
572
+ return entry;
573
+ }
574
+ /** Adds an empty animation to be played after the current or last queued animation for a track, and sets the track entry's
575
+ * {@link TrackEntry#mixDuration}. If the track is empty, it is equivalent to calling
576
+ * {@link #setEmptyAnimation()}.
577
+ *
578
+ * See {@link #setEmptyAnimation()}.
579
+ * @param delay If > 0, sets {@link TrackEntry#delay}. If <= 0, the delay set is the duration of the previous track entry
580
+ * minus any mix duration plus the specified `delay` (ie the mix ends at (`delay` = 0) or
581
+ * before (`delay` < 0) the previous track entry duration). If the previous entry is looping, its next
582
+ * loop completion is used instead of its duration.
583
+ * @return A track entry to allow further customization of animation playback. References to the track entry must not be kept
584
+ * after the {@link AnimationStateListener#dispose()} event occurs. */
585
+ addEmptyAnimation(trackIndex, mixDuration = 0, delay = 0) {
586
+ let entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation(), false, delay);
587
+ if (delay <= 0)
588
+ entry.delay += entry.mixDuration - mixDuration;
589
+ entry.mixDuration = mixDuration;
590
+ entry.trackEnd = mixDuration;
591
+ return entry;
592
+ }
593
+ /** Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix
594
+ * duration. */
595
+ setEmptyAnimations(mixDuration = 0) {
596
+ let oldDrainDisabled = this.queue.drainDisabled;
597
+ this.queue.drainDisabled = true;
598
+ for (let i = 0, n = this.tracks.length; i < n; i++) {
599
+ let current = this.tracks[i];
600
+ if (current)
601
+ this.setEmptyAnimation(current.trackIndex, mixDuration);
602
+ }
603
+ this.queue.drainDisabled = oldDrainDisabled;
604
+ this.queue.drain();
605
+ }
606
+ expandToIndex(index) {
607
+ if (index < this.tracks.length)
608
+ return this.tracks[index];
609
+ Utils.ensureArrayCapacity(this.tracks, index + 1, null);
610
+ this.tracks.length = index + 1;
611
+ return null;
612
+ }
613
+ /** @param last May be null. */
614
+ trackEntry(trackIndex, animation, loop, last) {
615
+ let entry = this.trackEntryPool.obtain();
616
+ entry.trackIndex = trackIndex;
617
+ entry.animation = animation;
618
+ entry.loop = loop;
619
+ entry.holdPrevious = false;
620
+ entry.eventThreshold = 0;
621
+ entry.attachmentThreshold = 0;
622
+ entry.drawOrderThreshold = 0;
623
+ entry.animationStart = 0;
624
+ entry.animationEnd = animation.duration;
625
+ entry.animationLast = -1;
626
+ entry.nextAnimationLast = -1;
627
+ entry.delay = 0;
628
+ entry.trackTime = 0;
629
+ entry.trackLast = -1;
630
+ entry.nextTrackLast = -1;
631
+ entry.trackEnd = Number.MAX_VALUE;
632
+ entry.timeScale = 1;
633
+ entry.alpha = 1;
634
+ entry.interruptAlpha = 1;
635
+ entry.mixTime = 0;
636
+ entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);
637
+ entry.mixBlend = MixBlend.replace;
638
+ return entry;
639
+ }
640
+ /** Removes the {@link TrackEntry#getNext() next entry} and all entries after it for the specified entry. */
641
+ clearNext(entry) {
642
+ let next = entry.next;
643
+ while (next) {
644
+ this.queue.dispose(next);
645
+ next = next.next;
646
+ }
647
+ entry.next = null;
648
+ }
649
+ _animationsChanged() {
650
+ this.animationsChanged = false;
651
+ this.propertyIDs.clear();
652
+ let tracks = this.tracks;
653
+ for (let i = 0, n = tracks.length; i < n; i++) {
654
+ let entry = tracks[i];
655
+ if (!entry)
656
+ continue;
657
+ while (entry.mixingFrom)
658
+ entry = entry.mixingFrom;
659
+ do {
660
+ if (!entry.mixingTo || entry.mixBlend != MixBlend.add)
661
+ this.computeHold(entry);
662
+ entry = entry.mixingTo;
663
+ } while (entry);
664
+ }
665
+ }
666
+ computeHold(entry) {
667
+ let to = entry.mixingTo;
668
+ let timelines = entry.animation.timelines;
669
+ let timelinesCount = entry.animation.timelines.length;
670
+ let timelineMode = entry.timelineMode;
671
+ timelineMode.length = timelinesCount;
672
+ let timelineHoldMix = entry.timelineHoldMix;
673
+ timelineHoldMix.length = 0;
674
+ let propertyIDs = this.propertyIDs;
675
+ if (to && to.holdPrevious) {
676
+ for (let i = 0; i < timelinesCount; i++)
677
+ timelineMode[i] = propertyIDs.addAll(timelines[i].getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;
678
+ return;
679
+ }
680
+ outer: for (let i = 0; i < timelinesCount; i++) {
681
+ let timeline = timelines[i];
682
+ let ids = timeline.getPropertyIds();
683
+ if (!propertyIDs.addAll(ids))
684
+ timelineMode[i] = SUBSEQUENT;
685
+ else if (!to || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline
686
+ || timeline instanceof EventTimeline || !to.animation.hasTimeline(ids)) {
687
+ timelineMode[i] = FIRST;
688
+ }
689
+ else {
690
+ for (let next = to.mixingTo; next; next = next.mixingTo) {
691
+ if (next.animation.hasTimeline(ids))
692
+ continue;
693
+ if (entry.mixDuration > 0) {
694
+ timelineMode[i] = HOLD_MIX;
695
+ timelineHoldMix[i] = next;
696
+ continue outer;
697
+ }
698
+ break;
699
+ }
700
+ timelineMode[i] = HOLD_FIRST;
701
+ }
702
+ }
703
+ }
704
+ /** Returns the track entry for the animation currently playing on the track, or null if no animation is currently playing. */
705
+ getCurrent(trackIndex) {
706
+ if (trackIndex >= this.tracks.length)
707
+ return null;
708
+ return this.tracks[trackIndex];
709
+ }
710
+ /** Adds a listener to receive events for all track entries. */
711
+ addListener(listener) {
712
+ if (!listener)
713
+ throw new Error("listener cannot be null.");
714
+ this.listeners.push(listener);
715
+ }
716
+ /** Removes the listener added with {@link #addListener()}. */
717
+ removeListener(listener) {
718
+ let index = this.listeners.indexOf(listener);
719
+ if (index >= 0)
720
+ this.listeners.splice(index, 1);
721
+ }
722
+ /** Removes all listeners added with {@link #addListener()}. */
723
+ clearListeners() {
724
+ this.listeners.length = 0;
725
+ }
726
+ /** Discards all listener notifications that have not yet been delivered. This can be useful to call from an
727
+ * {@link AnimationStateListener} when it is known that further notifications that may have been already queued for delivery
728
+ * are not wanted because new animations are being set. */
729
+ clearListenerNotifications() {
730
+ this.queue.clear();
731
+ }
732
+ }
733
+ /** Stores settings and other state for the playback of an animation on an {@link AnimationState} track.
734
+ *
735
+ * References to a track entry must not be kept after the {@link AnimationStateListener#dispose()} event occurs. */
736
+ export class TrackEntry {
737
+ constructor() {
738
+ /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
739
+ * replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
740
+ * the values from the lower tracks.
741
+ *
742
+ * The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
743
+ * called. */
744
+ this.mixBlend = MixBlend.replace;
745
+ this.timelineMode = new Array();
746
+ this.timelineHoldMix = new Array();
747
+ this.timelinesRotation = new Array();
748
+ }
749
+ reset() {
750
+ this.next = null;
751
+ this.previous = null;
752
+ this.mixingFrom = null;
753
+ this.mixingTo = null;
754
+ this.animation = null;
755
+ this.listener = null;
756
+ this.timelineMode.length = 0;
757
+ this.timelineHoldMix.length = 0;
758
+ this.timelinesRotation.length = 0;
759
+ }
760
+ /** Uses {@link #trackTime} to compute the `animationTime`, which is between {@link #animationStart}
761
+ * and {@link #animationEnd}. When the `trackTime` is 0, the `animationTime` is equal to the
762
+ * `animationStart` time. */
763
+ getAnimationTime() {
764
+ if (this.loop) {
765
+ let duration = this.animationEnd - this.animationStart;
766
+ if (duration == 0)
767
+ return this.animationStart;
768
+ return (this.trackTime % duration) + this.animationStart;
769
+ }
770
+ return Math.min(this.trackTime + this.animationStart, this.animationEnd);
771
+ }
772
+ setAnimationLast(animationLast) {
773
+ this.animationLast = animationLast;
774
+ this.nextAnimationLast = animationLast;
775
+ }
776
+ /** Returns true if at least one loop has been completed.
777
+ *
778
+ * See {@link AnimationStateListener#complete()}. */
779
+ isComplete() {
780
+ return this.trackTime >= this.animationEnd - this.animationStart;
781
+ }
782
+ /** Resets the rotation directions for mixing this entry's rotate timelines. This can be useful to avoid bones rotating the
783
+ * long way around when using {@link #alpha} and starting animations on other tracks.
784
+ *
785
+ * Mixing with {@link MixBlend#replace} involves finding a rotation between two others, which has two possible solutions:
786
+ * the short way or the long way around. The two rotations likely change over time, so which direction is the short or long
787
+ * way also changes. If the short way was always chosen, bones would flip to the other side when that direction became the
788
+ * long way. TrackEntry chooses the short way the first time it is applied and remembers that direction. */
789
+ resetRotationDirections() {
790
+ this.timelinesRotation.length = 0;
791
+ }
792
+ getTrackComplete() {
793
+ let duration = this.animationEnd - this.animationStart;
794
+ if (duration != 0) {
795
+ if (this.loop)
796
+ return duration * (1 + ((this.trackTime / duration) | 0)); // Completion of next loop.
797
+ if (this.trackTime < duration)
798
+ return duration; // Before duration.
799
+ }
800
+ return this.trackTime; // Next update.
801
+ }
802
+ }
803
+ export class EventQueue {
804
+ constructor(animState) {
805
+ this.objects = [];
806
+ this.drainDisabled = false;
807
+ this.animState = animState;
808
+ }
809
+ start(entry) {
810
+ this.objects.push(EventType.start);
811
+ this.objects.push(entry);
812
+ this.animState.animationsChanged = true;
813
+ }
814
+ interrupt(entry) {
815
+ this.objects.push(EventType.interrupt);
816
+ this.objects.push(entry);
817
+ }
818
+ end(entry) {
819
+ this.objects.push(EventType.end);
820
+ this.objects.push(entry);
821
+ this.animState.animationsChanged = true;
822
+ }
823
+ dispose(entry) {
824
+ this.objects.push(EventType.dispose);
825
+ this.objects.push(entry);
826
+ }
827
+ complete(entry) {
828
+ this.objects.push(EventType.complete);
829
+ this.objects.push(entry);
830
+ }
831
+ event(entry, event) {
832
+ this.objects.push(EventType.event);
833
+ this.objects.push(entry);
834
+ this.objects.push(event);
835
+ }
836
+ drain() {
837
+ if (this.drainDisabled)
838
+ return;
839
+ this.drainDisabled = true;
840
+ let objects = this.objects;
841
+ let listeners = this.animState.listeners;
842
+ for (let i = 0; i < objects.length; i += 2) {
843
+ let type = objects[i];
844
+ let entry = objects[i + 1];
845
+ switch (type) {
846
+ case EventType.start:
847
+ if (entry.listener && entry.listener.start)
848
+ entry.listener.start(entry);
849
+ for (let ii = 0; ii < listeners.length; ii++)
850
+ if (listeners[ii].start)
851
+ listeners[ii].start(entry);
852
+ break;
853
+ case EventType.interrupt:
854
+ if (entry.listener && entry.listener.interrupt)
855
+ entry.listener.interrupt(entry);
856
+ for (let ii = 0; ii < listeners.length; ii++)
857
+ if (listeners[ii].interrupt)
858
+ listeners[ii].interrupt(entry);
859
+ break;
860
+ case EventType.end:
861
+ if (entry.listener && entry.listener.end)
862
+ entry.listener.end(entry);
863
+ for (let ii = 0; ii < listeners.length; ii++)
864
+ if (listeners[ii].end)
865
+ listeners[ii].end(entry);
866
+ // Fall through.
867
+ case EventType.dispose:
868
+ if (entry.listener && entry.listener.dispose)
869
+ entry.listener.dispose(entry);
870
+ for (let ii = 0; ii < listeners.length; ii++)
871
+ if (listeners[ii].dispose)
872
+ listeners[ii].dispose(entry);
873
+ this.animState.trackEntryPool.free(entry);
874
+ break;
875
+ case EventType.complete:
876
+ if (entry.listener && entry.listener.complete)
877
+ entry.listener.complete(entry);
878
+ for (let ii = 0; ii < listeners.length; ii++)
879
+ if (listeners[ii].complete)
880
+ listeners[ii].complete(entry);
881
+ break;
882
+ case EventType.event:
883
+ let event = objects[i++ + 2];
884
+ if (entry.listener && entry.listener.event)
885
+ entry.listener.event(entry, event);
886
+ for (let ii = 0; ii < listeners.length; ii++)
887
+ if (listeners[ii].event)
888
+ listeners[ii].event(entry, event);
889
+ break;
890
+ }
891
+ }
892
+ this.clear();
893
+ this.drainDisabled = false;
894
+ }
895
+ clear() {
896
+ this.objects.length = 0;
897
+ }
898
+ }
899
+ export var EventType;
900
+ (function (EventType) {
901
+ EventType[EventType["start"] = 0] = "start";
902
+ EventType[EventType["interrupt"] = 1] = "interrupt";
903
+ EventType[EventType["end"] = 2] = "end";
904
+ EventType[EventType["dispose"] = 3] = "dispose";
905
+ EventType[EventType["complete"] = 4] = "complete";
906
+ EventType[EventType["event"] = 5] = "event";
907
+ })(EventType || (EventType = {}));
908
+ export class AnimationStateAdapter {
909
+ start(entry) {
910
+ }
911
+ interrupt(entry) {
912
+ }
913
+ end(entry) {
914
+ }
915
+ dispose(entry) {
916
+ }
917
+ complete(entry) {
918
+ }
919
+ event(entry, event) {
920
+ }
921
+ }
922
+ /** 1. A previously applied timeline has set this property.
923
+ *
924
+ * Result: Mix from the current pose to the timeline pose. */
925
+ export const SUBSEQUENT = 0;
926
+ /** 1. This is the first timeline to set this property.
927
+ * 2. The next track entry applied after this one does not have a timeline to set this property.
928
+ *
929
+ * Result: Mix from the setup pose to the timeline pose. */
930
+ export const FIRST = 1;
931
+ /** 1) A previously applied timeline has set this property.<br>
932
+ * 2) The next track entry to be applied does have a timeline to set this property.<br>
933
+ * 3) The next track entry after that one does not have a timeline to set this property.<br>
934
+ * Result: Mix from the current pose to the timeline pose, but do not mix out. This avoids "dipping" when crossfading
935
+ * animations that key the same property. A subsequent timeline will set this property using a mix. */
936
+ export const HOLD_SUBSEQUENT = 2;
937
+ /** 1) This is the first timeline to set this property.<br>
938
+ * 2) The next track entry to be applied does have a timeline to set this property.<br>
939
+ * 3) The next track entry after that one does not have a timeline to set this property.<br>
940
+ * Result: Mix from the setup pose to the timeline pose, but do not mix out. This avoids "dipping" when crossfading animations
941
+ * that key the same property. A subsequent timeline will set this property using a mix. */
942
+ export const HOLD_FIRST = 3;
943
+ /** 1. This is the first timeline to set this property.
944
+ * 2. The next track entry to be applied does have a timeline to set this property.
945
+ * 3. The next track entry after that one does have a timeline to set this property.
946
+ * 4. timelineHoldMix stores the first subsequent track entry that does not have a timeline to set this property.
947
+ *
948
+ * Result: The same as HOLD except the mix percentage from the timelineHoldMix track entry is used. This handles when more than
949
+ * 2 track entries in a row have a timeline that sets the same property.
950
+ *
951
+ * Eg, A -> B -> C -> D where A, B, and C have a timeline setting same property, but D does not. When A is applied, to avoid
952
+ * "dipping" A is not mixed out, however D (the first entry that doesn't set the property) mixing in is used to mix out A
953
+ * (which affects B and C). Without using D to mix out, A would be applied fully until mixing completes, then snap into
954
+ * place. */
955
+ export const HOLD_MIX = 4;
956
+ export const SETUP = 1;
957
+ export const CURRENT = 2;
958
+ let _emptyAnimation = null;
959
959
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQW5pbWF0aW9uU3RhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvQW5pbWF0aW9uU3RhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsrRUEyQitFO0FBRS9FLE9BQU8sRUFBRSxTQUFTLEVBQUUsUUFBUSxFQUFFLGtCQUFrQixFQUFFLFlBQVksRUFBRSxjQUFjLEVBQUUsaUJBQWlCLEVBQUUsUUFBUSxFQUFFLGFBQWEsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUloSixPQUFPLEVBQUUsU0FBUyxFQUFFLElBQUksRUFBRSxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0sU0FBUyxDQUFDO0FBSTVEOzs7b0hBR29IO0FBQ3BILE1BQU0sT0FBTyxjQUFjO0lBMkIxQixZQUFhLElBQXdCO1FBbEJyQyx5RkFBeUY7UUFDekYsV0FBTSxHQUFHLElBQUksS0FBSyxFQUFjLENBQUM7UUFFakM7OzsyRkFHbUY7UUFDbkYsY0FBUyxHQUFHLENBQUMsQ0FBQztRQUNkLGlCQUFZLEdBQUcsQ0FBQyxDQUFDO1FBRWpCLFdBQU0sR0FBRyxJQUFJLEtBQUssRUFBUyxDQUFDO1FBQzVCLGNBQVMsR0FBRyxJQUFJLEtBQUssRUFBMEIsQ0FBQztRQUNoRCxVQUFLLEdBQUcsSUFBSSxVQUFVLENBQUMs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