Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix animations without end keyframe going wacky #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SuperLlama88888
Copy link

@SuperLlama88888 SuperLlama88888 commented Jan 17, 2025

Animations using keyframes where the animation length is longer than the last keyframe will cause unexpected behaviour - notably, a continuation of the animation, whereas in-game, the animation simply halts at the last keyframe.

This PR fixes it by stopping on the last keyframe after reaching it, instead of trying to interpolate to the first keyframe.

Without fix

Notice how each anvil continues growing, past its last keyframe. (The structure block is the only correctly-scaled block at the end, since its last keyframe is the same as the animation length.)

animation.bug.webm

In-game animation

Notice how the animation stops after reaching the last keyframe.

as_intended.webm

Proof of the fix

proof.webm

Animations using keyframes where the animation length is longer than the last keyframe will cause unexpected behaviour - notably, a continuation of the animation, whereas in-game, the animation simply halts at the last keyframe.

This PR fixes it by stopping on the last keyframe after reaching it, instead of trying to interpolate to the first keyframe.
Copy link

stackblitz bot commented Jan 17, 2025

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

SuperLlama88888 added a commit to SuperLlama88888/holoprint that referenced this pull request Jan 17, 2025
Actually an issue with @bridge-core/model-viewer regarding keyframes. I've submitted a PR already: bridge-core/model-viewer#10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant