Jump to content

[Newbiew Question] To what extends I can keep using phaser.min.js?


notalentgeek
 Share

Recommended Posts

I have downloaded Phaser from github and I saw all the examples and tutorials there are using phaser.min.js or phaser-example.js. However I saw in the src folder there are a ton of js files.

 

My question are to what extend I can keep using phaser.min.js?

And when it is necessary to import those js files from src folder?

 

I am sorry if this obvious question. I am new to js and just moved from flixel. :) I would be grateful if someone would like to explain me. :D

Link to comment
Share on other sites

You should include phaser.min.js in your html when you deploy the final, finished version of your game.

 

Until that point you should use phaser.js (the non-minified version) as you'll get accurate debugging / line numbers from it should something die internally.

 

You only really need to use the src files if you are:

 

1) Hacking around the library (which I totally encourage btw!)

2) Trying to fix a Phaser bug or track-down a Phaser specific error

3) Wanting to understand how the code works better.

 

The reason the examples use the raw source files is because we use them as a form of unit test, and are constantly testing new features in the library, and it'd be a pain to have to rebuild the phaser.js file every single time just to do this. So usually we only do that when we release a new version.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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