Need ways to destroy the three.js instance

I have been using three js in a ember webapp and I want to destroy the instance before ember component gets destroyed. Anyone have idea about this?

Instance of the renderer?

Try:

renderer = null
1 Like

I don’t know when/how EmberJS gives you callbacks when an instance is destroyed… that seems like a question for EmberJS forums or Stack Overflow, or the documentation.

But once you’ve done that you probably want to call .dispose() on everything, see How to completely clean up a Three.js scene from a web app once the scene is no longer needed

1 Like