How to stop animation

Hi there,

Can you teach how to stop the animation as follows? After the full ratio has completed, the animation loop still continues. Thanks.

renderer.setAnimationLoop((_) => {
let t = clock.getElapsedTime();
uniforms.ratio.value = t;
controls.update();
renderer.render(scene, camera);
});

Try
uniforms.ratio.value = THREE.MathUtils.clamp(t, 0, 1);

Thanks, pro.