Jump to content

Phaser Editor


Recommended Posts

  • 3 weeks later...



A Phaser Editor project contains all the "website" content inside the WebContent folder. If you look inside it, it is a common website. I think the real question here is how to import a Phaser game into your website. To do this, you only need say Phaser the name of the DIV where to render the game.


For example, place a "my-game" div somewhere in your site, and the create the phaser instance like this:


window.onload = function() {
	var game = new Phaser.Game(320, 240, Phaser.AUTO, "my-game");

	// Add the States your game has.
	game.state.add("Boot", Boot);
	game.state.add("Preloader", Preloader);


Also, remember to load the Phaser lib and your game scripts.

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...