fix: only animate properties defined by keyframes#58
Merged
Conversation
Animations that don't define scale keyframes (e.g. fadeIn/fadeOut) no longer override the frame's existing scale. Scale is now applied relative to the frame's originalScale. Translate and scale are conditional based on keyframe introspection; alpha remains always animated for backward compatibility.
Xerrion
pushed a commit
that referenced
this pull request
Mar 7, 2026
🤖 I have created a release *beep* *boop* --- ## [3.5.7](3.5.6...3.5.7) (2026-03-07) ### Bug Fixes * only animate properties defined by keyframes ([#58](#58)) ([20ab83a](20ab83a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Summary
Animations that don't define scale or translate keyframes (e.g.
fadeIn/fadeOut) no longer override the frame's existing scale or position. This fixes visible "jumping" when frames have a user-configured scale other than 1.0.Problem
ApplyToFrameunconditionally calledSetScale(sc),ClearAllPoints()+SetPoint(), andSetAlpha(al)every animation tick. For animations without scale keyframes,scdefaulted to 1.0 viaPROPERTY_DEFAULTS, forcing the frame to scale 1.0 regardless of its configured scale. On animation completion,onFinishedcallbacks would restore the correct scale - causing a visible snap.Same issue with translate: alpha-only animations unnecessarily repositioned the frame every tick.
Changes
Animate()now scans keyframes to determine which properties the animation defines (hasScale,hasTranslate)ApplyToFrameonly sets translate/scale when the animation defines those propertiessc * originalScaleinstead of absolutesc. A keyframescale=0.3means "30% of original",scale=1.0means "back to original"Stop()only restores properties that were animatedBackward Compatibility
No breaking changes for existing consumers.