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.
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-modelanim-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.
Describe the bug
Setting a valid
anim
attribute for anm-model
with the attributeanim-enabled
tofalse
, to later on setanim-enabled
totrue
, andanim-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.https://github.com/mml-io/mml/assets/33723163/e7590cdb-71e6-4216-a1e6-7e473cb1e13b
Expected behavior
Presumably the animation should start playing as soon the
anim-enabled
attribute is set totrue
and theanim-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 theanim
attribute, but setanim-enabled
tofalse
, and then append it to the document; 2) Based on user action, set them-model
anim-enabled
attribute totrue
,anim-loop
totrue
,anim-start-time
todocument.timeline.currentTime
, and remove the attributeanim-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