You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of manually calling `game.load.image`, `game.load.audio`, etc for every asset in your game (and then dealing with caching issues), phaser-webpack-loader lets you define all assets in a simple manifest file and handles the rest for you.
5
+
# Phaser 3 Webpack Loader
6
+
Instead of manually calling `scene.load.image`, `scene.load.audio`, etc for every asset in your game (and then dealing with caching issues), phaser-webpack-loader lets you define all assets in a simple manifest file and handles the rest for you.
7
7
8
-
View sample usage in this [Phaser ES6 Boilerplate](https://github.com/goldfire/phaser-boilerplate).
8
+
**NOTE:** This plugin now only supports Phaser 3 and later. If you need support for Phaser 2, [use v1.1.0](https://github.com/goldfire/phaser-webpack-loader/tree/d3c9683e6a5ba9541ec0b0cd11c89fb824ff45b6).
9
9
10
10
## Features
11
11
@@ -14,8 +14,7 @@ View sample usage in this [Phaser ES6 Boilerplate](https://github.com/goldfire/p
14
14
* Integrated with Webpack for automatic cache-busting.
15
15
* Supports all filetypes.
16
16
* Supports asset postfix for retina support ('@2x', '@3x', etc).
17
-
* Supports automatic loading of compressed textures (PVRTC, S3TC, ETC1).
18
-
* Optional callback to track each file load (including fonts).
17
+
* Custom event to track each file load (including fonts).
19
18
20
19
## Install
21
20
@@ -71,37 +70,32 @@ In your preload state, add the plugin. It uses promises, which makes it flexible
@@ -112,16 +106,6 @@ The font loader uses [Web Font Loader](https://github.com/typekit/webfontloader)
112
106
113
107
All sprite/atlas files are loaded as JSON hashes (which can be output using [TexturePacker](https://www.codeandweb.com/texturepacker), [Shoebox](http://renderhjs.net/shoebox/) and others). All you have to specify in the manifest is the image filename, but you'll also need to include the JSON hash file alongside it, which will automatically get loaded and used.
114
108
115
-
## Loading Compressed Textures (Phaser-CE 2.7.7+)
116
-
117
-
[Compressed textures](https://phaser.io/tutorials/advanced-rendering-tutorial/part6) can be great to lower memory usage, especially on mobile devices; however, it isn't necessarily straight-forward how to load these (especially for atlas files). This loader makes it as simple as putting the files in your directory, so long as they match the naming conventions:
Simply include any or all of these files alongside the `PNG` equivalent and if one of them is compatible with the current browser/hardware it will be loaded and used (falling back to the `PNG` file).
124
-
125
109
## Directory Structure
126
110
127
111
Specify the base directory in your Webpack config:
0 commit comments