Model Viewer Loaded Event #4989
-
Model Viewer Loaded EventI want to know if exists a way to listen if the model is completely loaded at model viewer. I'm using it through CDN. I have an animation that is a sort like a preloader. And sometimes this animation happens before the model is fully loaded. So, we have a workaround to put a fixed delay time. It would be ideal that this animation occurs until loading is finished. I look up in the docs, but I've only discover that exists an attribute, "reveal". and then can be removed using the dismissPoster(), but doesn't fit for my use case. Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Maybe something like this? modelViewer.addEventListener("load", () => { |
Beta Was this translation helpful? Give feedback.
Maybe something like this?
modelViewer.addEventListener("load", () => {
do your thing here
});