Closed Fatima-Aslam closed 11 months ago
Would an additional setTimeout in the last line work?
Where to add setTimeout()?
On Sun, Oct 29, 2023, 11:39 PM Dirk Krause @.***> wrote:
Would an additional setTimeout in the last line work?
— Reply to this email directly, view it on GitHub https://github.com/c-frame/aframe-extras/issues/431#issuecomment-1784192913, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUW4H5XWWQYHIMXCIVSOKDLYB2IENAVCNFSM6AAAAAA6U77RC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBUGE4TEOJRGM . You are receiving this because you authored the thread.Message ID: @.***>
player.addEventListener("animation-finished", () => {
setTimeout(() => {
player.setAttribute("visible", "false");
}, "1000");
});
I want to remove the 3D model as its animation completes/finishes. I try to use the "animation-finished" event but it removes the 3D model before the animation completes. Is there any parameter that calls the animation-finished event after a specific time? Please help me to fix this issue.... I use this code:
And in HTML