Add AnimationKeyMode and open-frame shorthand; update parsing, sampling, optimization, and static emission - #7
Merged
TiernanDeFranco merged 4 commits intoMay 8, 2026
Conversation
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.
Motivation
.panimto express open frames with a compact shorthand ([FrameN?]).Description
AnimationKeyModeenum withOpenandClosedvariants and added amodefield toAnimationObjectKeywithClosedas the default and adjustedDefaultimplementations accordingly.(frame, key_mode)fromparse_frame_headerwhen a frame header ends with?, and threadedkey_modethroughparse_frame_block,parse_object_block,parse_object_field_action, andFrameAction::Field.modeinTrackKeyand settingkey.modefor keys that originate from frame headers; insertion defaults keys toClosedwhere appropriate.optimize_animation_track_keysskips tracks that contain any non-Closedkeys, andsample_track_value_from_keysreturnsNonefor frames that fall after anOpenkey segment start (except at the exact open key frame).emit_static_animation_const) to include key mode in generatedAnimationObjectKeyconstants and addedemit_key_modehelper.modefield and added new tests:optimize_track_keys_does_not_optimize_tracks_with_open_keys,sample_track_value_returns_none_after_open_key_segment_start, andparses_open_frame_header_shorthand.Testing
cargo testfor the modified crates, including parser and animation unit tests (perro_animationand pipeline tests); all automated tests passed.Codex Task