Phaser Inspector Plugin

[UPDATE] Phaser Inspector Plugin would be redesign and restructure soon to reborn as a better plugin.

[UPDATE] Phaser Inspector Plugin now support RenderTexture on WebGL.

Phaser Inspector Plugin allows you to inspect your (or someone else) Phaser game.

Floating, resizable and minimizableIntelligent Inspector with object tree, search and edit, state control and bounds drawing

The plugin is written using Angular.js and ES6, compiled with Babel and Browserify, tested on Phaser 2.1.3 and Phaser 2.4.3 running on Google Chrome Version 45.0.2454.85 (64-bit) on OSX Yosemite.

Working features:

Upcoming features:

Feel free to follow me on twitter @netcell and check out my blog!

Demo

Check the example folder (please run bower install before that, and serve the folder on a server/localhost) or try that example rightaway on this codepen.

Download

The source is available for download from latest release or by cloning the repository or download the files in build folder. Alternatively, you can install via:

Usage

NOTE: I have only tested this plugin on Google Chrome so I am not sure how this would perform on other browsers. Also since this plugin is for debugging your game, you should not expect to use it on your mobile devices, meaning remove it (or conditionally not loading it) when deploying to mobile devices.

Simply download the phaser-inspector.js or phaser-inspector.min.js script from latest release and include it on your page after including Phaser:

<script src="phaser.js"></script>
<script src="phaser-inspector.js"></script>

In the create method in your boot state:

game.plugins.add(Phaser.Plugin.Inspector);

Alternatively, when running a game in the browser, you can inject the plugin in the developer console as follow:

var script = document.createElement('script'); script.src = "http://netcell.github.io/phaser-inspector/build/phaser-inspector.js"; document.getElementsByTagName('head')[0].appendChild(script); function phaserInspectorInject(){ if (Phaser.Plugin.Inspector) Phaser.GAMES[0].plugins.add(Phaser.Plugin.Inspector); else setTimeout(phaserInspectorInject); } setTimeout(phaserInspectorInject);

Check the example in example folder to see it in action :)

License

This content is released under the (http://opensource.org/licenses/MIT) MIT License.