Jump to content

How to open phaser examples in brackets/ chrome?


Finders_Keepers
 Share

Recommended Posts

Hello everyone, 

I opened the Basic Phaser Template and wanted to play around with the example body debug.js from the repository. There is a code comment on the basic template index.html in the script tag which says:
We did it in a window.onload event, but you can do it anywhere (requireJS load, anonymous function, jQuery dom ready, - whatever floats your boat

I'm familiar with the window onload event done it many times and it works. Idk much about requireJS load, anonymous function, jQuery dom . And so
It all boils down to a stupid question.

I wanted to try opening the bodydebug.js from the basic template. I've changed the div container name from "Game Container" to "phaser-examples" as the bodydebug.js is referencing, i've substituted the path of an asset 'atari' to my local machine. And i pointed the script tag to read like <script type="text/javascript" src="bodydebug.js"></script>  (i have changed the body debug.js to bodydebug.js too.) I'm looking for a quick way to just run the code from the js file.. Unfortunately all i see is a white screen, like it doesn't load anything.

I can get the script to work if i use the modular approach. But i want to run the js file as is.. How do i do that?

Please have a look at my files and tell me what's wrong?

platform.png

bodydebug.js

index.html

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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