Dynamic animation name #2418
Replies: 4 comments 9 replies
-
https://modelviewer.dev/docs/#entrydocs-animation-properties-availableAnimations |
Beta Was this translation helpful? Give feedback.
-
Hi, you can get the animation list with the property "availableAnimations" as described in the docs https://modelviewer.dev/docs/#entrydocs-animation-properties-availableAnimations But the main thing is that to get dynamic animations you have to attach a event listener with the model-viewer element after the source is loaded else you will get nothing when you will use "availableAnimations".
Same goes for other properties to get information. |
Beta Was this translation helpful? Give feedback.
-
Hi, I have created a web application where for particular gltf file one can play all available animations for the same one after another. I have provided a next button which on click will change animation name. The problem I am facing is when next animation starts to play , previous animation also gets played. How can I resolve this issue? Below I have attached screen recording FYI https://supreeth2564798.hippovideo.io/video/play/tWpWJI3OI7mQ3INpau5OyGjEoSQZbeMDvsYbjSaAd9g |
Beta Was this translation helpful? Give feedback.
-
If you want to just stop the animation after the animation time then you can set interval only there not to load model again and do messy stuffs again
|
Beta Was this translation helpful? Give feedback.
-
Hi ,
I have a model with 7+ animation steps with unique names, is there a way to get list of all animation name in model-viewer. so I can set animation-name attribute dynamically?
thanks
Beta Was this translation helpful? Give feedback.
All reactions