Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmount usage in React #353

Open
nickmcmillan opened this issue Feb 4, 2020 · 0 comments
Open

Unmount usage in React #353

nickmcmillan opened this issue Feb 4, 2020 · 0 comments

Comments

@nickmcmillan
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant