Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/webcaetano/phaser-boilerplate
Phaser Boilerplate
https://github.com/webcaetano/phaser-boilerplate
phaser phaser-boilerplate
Last synced: about 2 months ago
JSON representation
Phaser Boilerplate
- Host: GitHub
- URL: https://github.com/webcaetano/phaser-boilerplate
- Owner: webcaetano
- License: mit
- Created: 2016-01-02T04:29:53.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-09T01:47:26.000Z (almost 8 years ago)
- Last Synced: 2024-05-17T12:33:28.963Z (8 months ago)
- Topics: phaser, phaser-boilerplate
- Language: JavaScript
- Homepage:
- Size: 55.7 KB
- Stars: 14
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Phaser.io Boilerplate in Gulp ES6 (babel)
## Features
- ES6
- [Craft.js](https://github.com/webcaetano/craft) - helper for create and extend phaser objects functions in a chainable way
- Utils.js - common gaming functions## Installation
```
git clone [email protected]:webcaetano/phaser-boilerplate.git
cd phaser-boilerplate
npm install && bower install
```## Usage
#### Start Developing server
```
gulp
```#### Create a distribution version
```
gulp build
```#### Deploy to gh-pages
```
gulp deploy
```* *Change `gulp/build.js` adress repo `[email protected]:webcaetano/phaser-boilerplate.git` for yours*
#### Deploy to [surge](http://surge.sh)
```
gulp surge
```* *Change `gulp/build.js` adress repo `domain: 'phaser-boilerplate.surge.sh'` for yours*
#### Release a patch version (it auto change package.json and bower.json)
```
gulp patch
// 1.0.0 -> 1.0.1
```#### Release a minor version
```
gulp minor
// 1.0.1 -> 1.1.0
```#### Release a major version
```
gulp major
// 1.1.0 -> 2.0.0
```#### Example of craft.js
```javascript
var group = craft.$g(); // create a group // .$g() is alias for .$group()var sprite = craft.$sprite('phaser') // create the sprite with key 'phaser'
.$set({
x:100,
y:100,
name:'foo'
}) // set atributes based on a object
.$mid() // same as sprite.anchor.setTo(0.5)
.$into(group) // insert into group
.$tint('#FF0000'); // tint accept '#' or ''var ball = craft.$circle({
fill:'#FF00FF',
size:40
}) // same as game.add.graphics(0,0).beginFill(0xFF00FF).drawCircle(0,0,40)
.$set({
x:200,
y:200,
}) // set position
.$into(group) // insert into group
```Result : http://phaser-boilerplate.surge.sh
#### See Also
- [**Craft**](https://github.com/webcaetano/craft)