Stop rendering cables.gl on event - ANSWERED

Hi there!
Is there any way to stop rendering cables.gl 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!
Emir

hi,

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!