mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-25 22:23:42 +08:00
[ts] Port of 0e16ef9c, 409bf9d6.
Added DrawOrderFolderTimeline. Fixed AnimationStateTests for discarding a never applied entry.
This commit is contained in:
parent
7f24ed23af
commit
000a1882b9
@ -1139,9 +1139,9 @@ export class EventQueue {
|
||||
this.drainDisabled = true;
|
||||
|
||||
const listeners = this.animState.listeners;
|
||||
const objects = this.objects;
|
||||
|
||||
for (let i = 0; i < objects.length; i += 2) {
|
||||
for (let i = 0; i < this.objects.length; i += 2) {
|
||||
const objects = this.objects;
|
||||
const type = objects[i] as EventType;
|
||||
const entry = objects[i + 1] as TrackEntry;
|
||||
switch (type) {
|
||||
|
||||
@ -32,6 +32,7 @@ import type { BoneData } from "./BoneData.js";
|
||||
import type { ConstraintData } from "./ConstraintData.js";
|
||||
import type { EventData } from "./EventData.js";
|
||||
import type { Skin } from "./Skin.js";
|
||||
import { SliderData } from "./SliderData.js";
|
||||
import type { SlotData } from "./SlotData.js";
|
||||
|
||||
/** Stores the setup pose and all of the stateless data for a skeleton.
|
||||
@ -143,6 +144,19 @@ export class SkeletonData {
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Collects animations used by {@link SliderData slider constraints}.
|
||||
* <p>
|
||||
* Slider animations are designed to be applied by slider constraints rather than on their own. Applications that have a user
|
||||
* choose an animation may want to exclude them. */
|
||||
findSliderAnimations (animations: Animation[]): Animation[] {
|
||||
const constraints = this.constraints;
|
||||
for (let i = 0, n = this.constraints.length; i < n; i++) {
|
||||
const data = constraints[i];
|
||||
if (data instanceof SliderData && data.animation != null) animations.push(data.animation);
|
||||
}
|
||||
return animations;
|
||||
}
|
||||
|
||||
/** Finds an animation by comparing each animation's name. It is more efficient to cache the results of this method than to
|
||||
* call it multiple times.
|
||||
* @returns May be null. */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user