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

add clampWhenFinished to freeze animation on last frame #600

Merged
merged 5 commits into from
Apr 30, 2024
Merged

Conversation

hanbollar
Copy link
Contributor

@hanbollar hanbollar commented Apr 30, 2024

Linking

related to https://discord.com/channels/1137890872688660500/1219366027545149462/1234958188302962739
related to #599

Problem

looping is nice and all, but want to freeze at end of animation instead of reverting back to start

Solution

add as part of animation setup (longer css feature will be different and more robust to mimic https://developer.mozilla.org/en-US/docs/Web/CSS/animation-fill-mode, but this pr is more to match the threejs paradigm, opening a separate issue for the css part: #601

Breaking Change

adding small feature

Notes

...


Required to Merge

  • PASS - all necessary actions must pass (excluding the auto-skipped ones)
  • TEST IN HEADSET - main dev-testing-example and any of the other examples still work as expected
  • VIDEO - if this pr changes something visually - post a video here of it in headset-MR and/or on desktop (depending on what it affects) for the reviewer to reference.
    picture of final state:
Screenshot 2024-04-30 at 2 51 01 PM
  • TITLE - make sure the pr's title is updated appropriately as it will be used to name the commit on merge
  • BREAKING CHANGE
    • DOCUMENTATION: This includes any changes to html tags and their components
    • SAMPLES/INDEX.HTML: This includes any changes (html tags or otherwise) that must be done to our landing page submodule as an effect of this pr's updates
      • make a pr in the mrjs landing page repo that updates the landing page to match the breaking change
      • link the pr of the landing page repo here: #pr
      • that pr must be approved by @hanbollar

Signed-off-by: hanbollar <github@hannahbollar.com>
Copy link

render bot commented Apr 30, 2024

Signed-off-by: hanbollar <github@hannahbollar.com>
Signed-off-by: hanbollar <github@hannahbollar.com>
Signed-off-by: hanbollar <github@hannahbollar.com>
@hanbollar hanbollar changed the title add ability to freeze animation on last frame add clampWhenFinished to freeze animation on last frame Apr 30, 2024
Signed-off-by: hanbollar <github@hannahbollar.com>
@hanbollar
Copy link
Contributor Author

merging in since it's a very small change - just looks like a lot because code was indented when moved into a loop - commit body on main will reflect the following:

add 'clampWhenFinished' to freeze animation on last frame

- includes moving the setAnimation function calls into a loop over all available animations instead of just the only available one.
- includes addition of more examples in models.html to demo the freeze vs not

@hanbollar hanbollar merged commit 04e83a7 into main Apr 30, 2024
6 checks passed
@hanbollar hanbollar deleted the hb-freeze branch April 30, 2024 22:02
Copy link
Member

@michaelthatsit michaelthatsit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

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.

2 participants