The VS Code of video editing, built for agents.
TypeScript
Enhance cache eviction logic for animated values
konstantin-paulus7e1f3599a62b
diff --git a/packages/runtime/src/actions/cache.ts b/packages/runtime/src/actions/cache.tsindex c0b7ac4f..eb509237 100644--- a/packages/runtime/src/actions/cache.ts+++ b/packages/runtime/src/actions/cache.ts@@ -122,6 +122,12 @@ export function evictFromCaches(world: World, entity: Entity, parent: Entity | n// a new identity is the only signal a reader gets that one changed.if (members?.includes(entity)) {cache[list][pid] = members.filter((member) => member !== entity);+ // The motion system resets Computed only while motion remains, so+ // the last animation to leave must put the base values back itself+ // (rebuildCaches cannot: a destroy strips the traits it files by).+ if (list === 'animations' || list === 'keyframeTracks') {+ resetAnimatedValues(world, parent);+ }}}}