Repository navigation
Support animation blends in scene documents and editor - #340
Merged
Merged
Conversation
…lips and weights, editor clip fixes
InventivetalentDev
marked this pull request as ready for review
October 17, 2026 19:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scene documents and the editor previously selected one entity animation even though the renderer supports weighted clips. Entities can now store a nonempty
animation.clipslist with names and optional weights, while existinganimation.namedocuments keep working.The editor adds clip selection, removal, sliders, and numeric weights. Weight changes preserve the shared playback clock; clip changes also preserve the live clock when asynchronous loading finishes. Pause, speed, loop, seeking, and restart apply to the blend. JSON saves and copied embeds capture the live time, and off-screen embeds restore the blend after recreating their renderer.
Weights default to 1, must be finite and nonnegative, and are not normalized. Clip names must be unique and must be the entity's own animations: names inherited from
Object.prototype, such asconstructor, are missing clips. The loader resolves every clip before starting a blend, and a missing clip rejects and disposes the staged document. The HTTP API also limits a blend to 32 clips and each weight to 1024. Reference and editor documentation describe the format and controls.Validation:
yarn test: 804 passed. Scene and codec tests cover old and blended documents, validation including duplicate and inherited clip names, additive weights, repeated draws and layers, shared time and pause, and atomic load failure.yarn test:package(11),yarn test:api(18, including the clip-count and weight limits),yarn test:embed(15) andyarn test:node(6) pass.