Three js Cancel Animation

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2020 Jul 8 0:33
Editor
Edited
Edited
2024 Mar 1 14:13
Refs
Refs
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...
How do I stop requestAnimationFrame
 
 

Recommendations