Phaser Shim
A shim to make Phaser HTML5 game engine from NPM work with Webpack, and build properly. (NOW WITH P2!!!!)
Installation
npm install phaser-shim-p2 --save
Usage
This version can be used in the same way as the original phaser-shim
. I also upgraded to the newest Phaser version
(currently ^2.6.2).
Module
// game.js ; var game = 800 600;
or ES6:
// Game.js ; Game { superwidth height; }
// game.js ; const game = 800 600;
or several per module:
;
or TypeScript:
/// declare
Webpack
// webpack.config.js module: // ... loaders: loader: 'script'// script-loader test: /.js/ // ...
Development
If you want to use other Phaser version (old or new) in yourself:
- Fork this repo and git clone to local.
npm install
with node v4.xnpm run build
to buildingdist/pixi
anddist/phaser
- now you can
require
orimport
yourphaser-shim
Contributors
- @AnimaMundi
- @thosakwe