@esotericsoftware/spine-core 4.3.5 → 4.3.6

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.
@@ -27,11 +27,11 @@
27
27
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
28
  *****************************************************************************/
29
29
  /** biome-ignore-all lint/style/noNonNullAssertion: reference runtime expects some nullable to not be null */
30
- import { Animation, AttachmentTimeline, RotateTimeline } from "./Animation.js";
30
+ import { Animation, AttachmentTimeline, MixFrom, RotateTimeline } from "./Animation.js";
31
31
  import type { AnimationStateData } from "./AnimationStateData.js";
32
32
  import type { Event } from "./Event.js";
33
33
  import type { Skeleton } from "./Skeleton.js";
34
- import { Interpolation, Pool, StringSet } from "./Utils.js";
34
+ import { Interpolation, Pool } from "./Utils.js";
35
35
  /** Applies animations over time, queues animations for later playback, mixes (crossfading) between animations, and applies
36
36
  * multiple animations on top of each other (layering).
37
37
  *
@@ -51,7 +51,7 @@ export declare class AnimationState {
51
51
  readonly events: Event[];
52
52
  readonly listeners: AnimationStateListener[];
53
53
  queue: EventQueue;
54
- propertyIds: StringSet;
54
+ propertyIds: Map<string, TrackEntry>;
55
55
  animationsChanged: boolean;
56
56
  trackEntryPool: Pool<TrackEntry>;
57
57
  constructor(data: AnimationStateData);
@@ -66,10 +66,10 @@ export declare class AnimationState {
66
66
  applyMixingFrom(to: TrackEntry, skeleton: Skeleton): number;
67
67
  /** Applies the attachment timeline and sets {@link Slot.attachmentState}.
68
68
  * @param retain True if the attachment remains after apply, false if temporary for deform timelines. */
69
- applyAttachmentTimeline(timeline: AttachmentTimeline, skeleton: Skeleton, time: number, fromSetup: boolean, retain: boolean): void;
69
+ applyAttachmentTimeline(timeline: AttachmentTimeline, skeleton: Skeleton, time: number, from: MixFrom, retain: boolean): void;
70
70
  /** Applies the rotate timeline, mixing with the current pose while keeping the same rotation direction chosen as the shortest
71
71
  * the first time the mixing was applied. */
72
- applyRotateTimeline(timeline: RotateTimeline, skeleton: Skeleton, time: number, alpha: number, fromSetup: boolean, timelinesRotation: Array<number>, i: number, firstFrame: boolean): void;
72
+ applyRotateTimeline(timeline: RotateTimeline, skeleton: Skeleton, time: number, alpha: number, from: MixFrom, timelinesRotation: Array<number>, i: number, firstFrame: boolean): void;
73
73
  queueEvents(entry: TrackEntry, animationTime: number): void;
74
74
  private eventsReverse;
75
75
  /** Removes all animations from all tracks, leaving skeletons in their current pose.
@@ -164,7 +164,8 @@ export declare class AnimationState {
164
164
  /** Removes {@link TrackEntry.next} and all entries after it for the specified entry. */
165
165
  clearNext(entry: TrackEntry): void;
166
166
  _animationsChanged(): void;
167
- computeHold(entry: TrackEntry): void;
167
+ computeHold(entry: TrackEntry, track: TrackEntry): void;
168
+ private from;
168
169
  /** Returns the track entry for the animation currently playing on the track, or null if no animation is currently playing. */
169
170
  getTrack(trackIndex: number): TrackEntry | null;
170
171
  /** Adds a listener to receive events for all track entries. */
@@ -343,8 +344,8 @@ export declare class TrackEntry {
343
344
  setMixInterpolation(mixInterpolation: Interpolation): void;
344
345
  mix(): number;
345
346
  /** For each timeline:
346
- * - Bit 0, FIRST: 0 = mix from current pose, 1 = mix from setup pose. Timeline is first to set the property.
347
- * - Bit 1, HOLD: 0 = mix out using alphaMix, 1 = apply full alpha to prevent dipping. Timeline is first on its track to
347
+ * - Bits 0-1: MixFrom.
348
+ * - Bit 2, HOLD: 0 = mix out using alphaMix, 1 = apply full alpha to prevent dipping. Timeline is first on its track to
348
349
  * set the property and the next entry (mixingTo) also sets it. When held, timelineHoldMix's mix controls how the hold fades
349
350
  * out (for 3+ entry chains where the chain eventually stops setting the property). */
350
351
  timelineMode: number[];
@@ -448,9 +449,10 @@ export declare abstract class AnimationStateAdapter implements AnimationStateLis
448
449
  complete(entry: TrackEntry): void;
449
450
  event(entry: TrackEntry, event: Event): void;
450
451
  }
451
- export declare const SUBSEQUENT = 0;
452
- export declare const FIRST = 1;
453
- export declare const HOLD = 2;
454
- export declare const HOLD_FIRST = 3;
452
+ export declare const CURRENT = 0;
455
453
  export declare const SETUP = 1;
456
- export declare const RETAIN = 2;
454
+ export declare const FIRST = 2;
455
+ export declare const MODE = 3;
456
+ export declare const HOLD = 4;
457
+ export declare const ATTACH_SETUP = 1;
458
+ export declare const ATTACH_RETAIN = 2;