Finders_Keepers

How to open phaser examples in brackets/ chrome?

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.