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

[Bug]: m-model animation fails to start playing immediately once switchin anim-enabled to true. #169

Open
TheCodeTherapy opened this issue May 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@TheCodeTherapy
Copy link
Contributor

Describe the bug

Setting a valid anim attribute for an m-model with the attribute anim-enabled to false, to later on set anim-enabled to true, and anim-start-time to the current document time, doesn't work to start playing the animation immediately. Instead, the animation only plays when the page is refreshed.

m-model-anim.mp4

Expected behavior

Presumably the animation should start playing as soon the anim-enabled attribute is set to true and the anim-start-time attribute is set to the current document time.

How to reproduce the bug

  1. Create an m-model with a proper asset and URL for the anim attribute, but set anim-enabled to false, and then append it to the document;
  2. Based on user action, set the m-model anim-enabled attribute to true, anim-loop to true, anim-start-time to document.timeline.currentTime, and remove the attribute anim-pause-time.

The animation should start based on the animation clips present in the asset passed as a URL to the anim attribute. Instead, it doesn't. However, if the user refresh the page, the animation will be playing.

Link to the code that reproduces this bug

https://github.com/TheCodeTherapy/3d-web-experience/blob/382e4e9e546b13fe0d36d3cd8d2a04a17b16460c/example/multi-user-3d-web-experience/server/mml-documents/example-cars.html

Packages

mml-web

Package versions

0.14.0

Extra details

No response

@TheCodeTherapy TheCodeTherapy added the bug Something isn't working label May 9, 2024
@MarcusLongmuir MarcusLongmuir moved this to 📋 Backlog in MML Project Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant