function animate() { /** * @summary - Animate function for Point Cloud */ if (!ref.cloud?.el) return const cloud = ref.cloud let id if (ref.cloud.pause) return requestAnimationFrame(animate) else id = requestAnimationFrame(animate) cloud.controls.update() cloud.renderer.render(cloud.scene, cloud.camera) return id }
How do I stop requestAnimationFrame
I need to remove a canvas and build a new one. I'm having a problem where I don't know how to stop/interrupt the Three.js or webGL update process. I can stop it if I force a javascript error (but t...
https://stackoverflow.com/questions/14465495/how-do-i-stop-requestanimationframe

Seonglae Cho