[ts] Port of commit 9d49999: Changed SequenceTimeline to match AttachmentTimeline behavior.

This commit is contained in:
Davide Tantillo 2024-11-15 10:39:25 +01:00
parent 1b3194a67c
commit f64b20d17d

View File

@ -30,7 +30,7 @@
import { VertexAttachment, Attachment } from "./attachments/Attachment.js";
import { IkConstraint } from "./IkConstraint.js";
import { PathConstraint } from "./PathConstraint.js";
import { Physics, Skeleton } from "./Skeleton.js";
import { Skeleton } from "./Skeleton.js";
import { Slot } from "./Slot.js";
import { TransformConstraint } from "./TransformConstraint.js";
import { StringSet, Utils, MathUtils, NumberArrayLike } from "./Utils.js";
@ -2330,6 +2330,11 @@ export class SequenceTimeline extends Timeline implements SlotTimeline {
|| (slotAttachment as VertexAttachment).timelineAttachment != attachment) return;
}
if (direction == MixDirection.mixOut) {
if (blend == MixBlend.setup) slot.sequenceIndex = -1;
return;
}
let frames = this.frames;
if (time < frames[0]) {
if (blend == MixBlend.setup || blend == MixBlend.first) slot.sequenceIndex = -1;