Sign in to follow this  
Ram M

Phaser Canvas Destroy

Recommended Posts

You can remove the entire game and everything in it by calling the `destroy` method on the game instance. If you want to remove the canvas element itself from the DOM, you can get a reference to it with the `canvas` property on the game instance, though I'm not sure if anything will break if you mess with it.

If you haven't stored your game instance in a global variable (which is not the best practice, by the way), you can get it from the `game` on a Scene or its Systems object.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.