Jump to content

What file types does Phaser support? (for a Gulp script)


Recommended Posts

There's not that many file types because (I might be wrong here) there's not that much types of assets you would normally use in a project.


According to this documentation page http://phaser.io/docs/2.4.4/Phaser.Loader.html you can load the following asset types:


Atlast(JSONArray, JSONHash, XML), Audio, AudioSprite(Sound, JSON), BitmapFont, Image, JSON, Pack(List of files to be loaded in JSON), Physics, Script, Shader, Spritesheet, Text, Tilemap, Video and XML.


Now this is ALOT and i'm fairly certain you're not going to use every possible file extension in your project. However i can see where you're coming from.

I am guessing you want to manage your asset loading by detecting and loading every asset in your folder.


I do think this is possible using gulp but i think it would be a better approach(IMO) to use the Pack(List of files to be loaded in JSON) method and deliver this JSON using php's glob function. The same method is described in this topic:




I hope this helps you to solve your assetloading problem :)

Link to comment
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.

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.


  • Recently Browsing   0 members

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