@esotericsoftware/spine-core 4.3.4 → 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.
- package/dist/Animation.d.ts +87 -75
- package/dist/Animation.js +329 -186
- package/dist/AnimationState.d.ts +16 -14
- package/dist/AnimationState.js +86 -56
- package/dist/PhysicsConstraintData.d.ts +1 -1
- package/dist/PhysicsConstraintData.js +2 -2
- package/dist/SkeletonBinary.js +8 -3
- package/dist/SkeletonJson.js +6 -4
- package/dist/Slider.js +3 -3
- package/dist/SliderData.d.ts +2 -0
- package/dist/SliderData.js +4 -1
- package/dist/TransformConstraintData.js +4 -4
- package/dist/esm/spine-core.min.mjs +2 -2
- package/dist/esm/spine-core.mjs +457 -271
- package/dist/esm/spine-core.mjs.map +3 -3
- package/dist/iife/spine-core.js +457 -271
- package/dist/iife/spine-core.js.map +3 -3
- package/dist/iife/spine-core.min.js +2 -2
- package/package.json +1 -1
package/dist/AnimationState.d.ts
CHANGED
|
@@ -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
|
|
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:
|
|
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,
|
|
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,
|
|
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. */
|
|
@@ -277,7 +278,7 @@ export declare class TrackEntry {
|
|
|
277
278
|
* properties keyed by the animation are set to the setup pose and the track is cleared.
|
|
278
279
|
*
|
|
279
280
|
* Usually you want to use {@link AnimationState.addEmptyAnimation} rather than have the animation
|
|
280
|
-
* abruptly cease being applied. */
|
|
281
|
+
* abruptly cease being applied, leaving the current pose. */
|
|
281
282
|
trackEnd: number;
|
|
282
283
|
/** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
|
|
283
284
|
* faster. Defaults to 1.
|
|
@@ -343,8 +344,8 @@ export declare class TrackEntry {
|
|
|
343
344
|
setMixInterpolation(mixInterpolation: Interpolation): void;
|
|
344
345
|
mix(): number;
|
|
345
346
|
/** For each timeline:
|
|
346
|
-
* -
|
|
347
|
-
* - Bit
|
|
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
|
|
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
|
|
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;
|