You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using p2 in a React component. I want to ensure that when the component unmounts that the p2 instance is no longer running.
Aside from removing event listeners and cancelling the requestAnimationFrame loop, is there anything specific that needs to be called to tell p2 that it's done? Something like a destroy() method?
I've noticed p2 has a method called "clear" - is this what I'm after?
The text was updated successfully, but these errors were encountered:
I'm using p2 in a React component. I want to ensure that when the component unmounts that the p2 instance is no longer running.
Aside from removing event listeners and cancelling the requestAnimationFrame loop, is there anything specific that needs to be called to tell p2 that it's done? Something like a destroy() method?
I've noticed p2 has a method called "clear" - is this what I'm after?
The text was updated successfully, but these errors were encountered: