Ram M Posted November 12, 2018 Share Posted November 12, 2018 Hi How can i remove the phaser canvas including stage. Link to comment Share on other sites More sharing options...
talamask Posted November 12, 2018 Share Posted November 12, 2018 by this.textures.remove(<name>)? Link to comment Share on other sites More sharing options...
Telinc1 Posted November 12, 2018 Share Posted November 12, 2018 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. Link to comment Share on other sites More sharing options...
samme Posted November 12, 2018 Share Posted November 12, 2018 http://labs.phaser.io/edit.html?src=src/game config/game destroy.js Link to comment Share on other sites More sharing options...
Ram M Posted November 13, 2018 Author Share Posted November 13, 2018 12 hours ago, samme said: http://labs.phaser.io/edit.html?src=src/game config/game destroy.js Thanks i works fine in my project Link to comment Share on other sites More sharing options...
Recommended Posts