Files
hyperframes/packages/core/src/runtime/sceneRest.ts
T
Miguel Ángel ec9a3a8ef2 fix(core): a sealed move inside a nested composition shows where it was dropped (#8517)
* fix(core): a patched tween on a resting scene timeline is drawn before the frame says patched

* fix(core): the frame says patched only once each patched tween has rendered
2026-11-22 16:17:17 +00:00

18 lines
675 B
TypeScript

// The local time each scene timeline was last drawn at: a seek that would draw it there again skips it.
const restingAt = new WeakMap<object, number>();
const redrawDue = new WeakSet<object>();
export function restSceneAt(timeline: object, time: number): void {
restingAt.set(timeline, time);
}
export const sceneRestingAt = (timeline: object): number | undefined => restingAt.get(timeline);
export function takeSceneRedrawDue(timeline: object): boolean {
return redrawDue.delete(timeline);
}
export function markRestingScenesForRedraw(timelines: readonly object[]): void {
for (const timeline of timelines) if (restingAt.has(timeline)) redrawDue.add(timeline);
}