Stop rendering on event - ANSWERED

Hi there!
Is there any way to stop rendering on any event? For example on modal opened. I mean i need to temporarily stop rendering webgl on my website from outside function when i open modal.

Thanks a lot!


mainloop has an active input. if this is false or 0 it will pause rendering.
you can set this via a variable for example.

you can also use patch.pause(); to pause executing the whole patch.

hope that helps!