Skip to content

Commit 5bcf84f

Browse files
committed
Added offsetX and offsetY arguments to Bounds.alignTo.
1 parent 966a9f8 commit 5bcf84f

3 files changed

Lines changed: 80 additions & 67 deletions

File tree

README.md

Lines changed: 36 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Phaser - HTML5 Game Framework
22

3-
<img src="http://gametest.mobi/github/cab1231.png" align="right">
3+
<img src="http://phaser.io/images/github/arcade-cab.png" align="right">
44

55
Phaser is a fast, free, and fun open source HTML5 game framework. It uses a custom build of [Pixi.js](https://github.com/GoodBoyDigital/pixi.js/) for WebGL and Canvas rendering, and supports desktop and mobile web browsers. Games can be compiled to iOS, Android and native desktop apps via 3rd party tools. You can use JavaScript or TypeScript for development.
66

@@ -34,7 +34,7 @@ Grab the source and join in the fun!
3434
- [Contributing](#contributing)
3535

3636
<a name="whats-new"></a>
37-
![What's New](http://gametest.mobi/github/div-whats-new.png "What's New")
37+
![What's New](http://phaser.io/images/github/div-whats-new.png "What's New")
3838

3939
<div align="center"><img src="http://phaser.io/images/github/news.jpg"></div>
4040

@@ -55,7 +55,7 @@ Rich - [@photonstorm](https://twitter.com/photonstorm)
5555
![boogie](http://www.phaser.io/images/spacedancer.gif)
5656

5757
<a name="support"></a>
58-
![Support Phaser](http://gametest.mobi/github/div-support-phaser.png "Support Phaser")
58+
![Support Phaser](http://phaser.io/images/github/div-support-phaser.png "Support Phaser")
5959

6060
Developing Phaser takes a lot of time, effort, and money. There are monthly running costs; such as the forum and site, which we maintain 100% ad-free. As well as countless hours of development time, community support, and assistance resolving issues. We do this out of our love for Phaser of course, but at the end of the day there are real tangible costs involved.
6161

@@ -82,16 +82,16 @@ Zenva Academy: [Online courses on Phaser, HTML5 and native app development](http
8282

8383
If you would like to sponsor Phaser then please [get in touch](mailto:support@phaser.io). We have sponsorship options available on our GitHub repo, web site, and newsletter. All of which receive tens of thousands of eyeballs per day.
8484

85-
![Weekly Newsletter](http://gametest.mobi/github/div-newsletter.png "Weekly Newsletter")
85+
![Weekly Newsletter](http://phaser.io/images/github/div-newsletter.png "Weekly Newsletter")
8686
<a name="newsletter"></a>
8787

8888
<div align="center"><img src="http://phaser.io/images/github/phaser-world.png"></div>
8989

9090
Every Friday we publish the [Phaser World](http://phaser.io/community/newsletter) newsletter. It's packed full of the latest Phaser games, tutorials, videos, meet-ups, talks, and more. It also contains our weekly Development Progress updates.
9191

92-
Previous issues can found on our [Back Issues](http://phaser.io/community/backissues) page.
92+
Previous editions can found on our [Back Issues](http://phaser.io/community/backissues) page.
9393

94-
![Download Phaser](http://gametest.mobi/github/div-download.png "Download Phaser")
94+
![Download Phaser](http://phaser.io/images/github/div-download.png "Download Phaser")
9595
<a name="download"></a>
9696

9797
Phaser is [hosted on Github][phaser]. There are a number of ways to download it:
@@ -129,30 +129,30 @@ or the minified version:
129129

130130
### Phaser Sandbox
131131

132-
If you'd like to try coding in Phaser right now, with nothing more than your web browser, then you can head over to the [Phaser Sandbox](http://phaser.io/sandbox). You'll find Quick Start templates and a user-friendly editor filled with handy code-completion features.
132+
If you'd like to try coding in Phaser right now, with nothing more than your web browser, then head over to the [Phaser Sandbox](http://phaser.io/sandbox). You'll find Quick Start templates, and a user-friendly editor filled with handy code-completion features.
133133

134134
### License
135135

136136
Phaser is released under the [MIT License](http://opensource.org/licenses/MIT).
137137

138-
![Getting Started](http://gametest.mobi/github/div-getting-started.png "Getting Started")
138+
![Getting Started](http://phaser.io/images/github/div-getting-started.png "Getting Started")
139139
<a name="getting-started"></a>
140140

141141
<img src="http://phaser.io/images/github/learn.jpg" align="right">
142142

143-
Our [Getting Started Guide](http://phaser.io/tutorials/getting-started) will get you up to speed quickly. From setting up a web server, to picking an IDE. After which read our [Making your first Game](http://phaser.io/tutorials/making-your-first-phaser-game) tutorial. Please work through this, no matter what your developer experience, to learn how Phaser approaches things.
143+
Our [Getting Started Guide](http://phaser.io/tutorials/getting-started) will get you up to speed quickly. From setting up a web server, to picking an IDE. After which read our [Making your first Game](http://phaser.io/tutorials/making-your-first-phaser-game) tutorial. Please work through this, no matter what your development experience, to learn how Phaser approaches things.
144144

145-
The single biggest Phaser resource is the [Phaser web site](http://phaser.io/news). You'll find hundreds of tutorials, with new ones added every week. Subscribe to the [Phaser World](http://phaser.io/community/newsletter) newsletter and we'll send you links to all new content, once a week.
145+
The single biggest Phaser resource is the [Phaser web site](http://phaser.io/news). You'll find hundreds of tutorials, with new ones added every week. Subscribe to the [Phaser World](http://phaser.io/community/newsletter) newsletter for a weekly links round-up.
146146

147-
Using Phaser with **TypeScript**? [Game From Scratch](http://www.gamefromscratch.com/page/Adventures-in-Phaser-with-TypeScript-tutorial-series.aspx) has a great series of tutorials covering that.
147+
Using **TypeScript**? [Game From Scratch](http://www.gamefromscratch.com/page/Adventures-in-Phaser-with-TypeScript-tutorial-series.aspx) has a great series of tutorials covering that.
148148

149-
Prefer **videos**? Zenva have an excellent [Phaser video course](https://academy.zenva.com/product/the-complete-mobile-game-development-course-platinum-edition/?a=13), packed full of hours of great content.
149+
Prefer **videos**? Zenva have an excellent [Phaser video course](https://academy.zenva.com/product/the-complete-mobile-game-development-course-platinum-edition/?a=13), with hours of great material.
150150

151151
### Source Code Examples
152152

153153
Ever since we started Phaser we've been growing and expanding our extensive set of examples. Currently there are over 700 of them, with the full source code and assets available.
154154

155-
Browse the [Phaser Examples](http://phaser.io/examples) or clone the [examples repo][examples] and eat your heart out!
155+
Browse the [Phaser Examples](http://phaser.io/examples), or clone the [examples repo][examples], and eat your heart out!
156156

157157
### Interphase
158158

@@ -162,9 +162,7 @@ Browse the [Phaser Examples](http://phaser.io/examples) or clone the [examples r
162162

163163
With 400 pages of content you'll find detailed articles, game development "Making Of" guides and tutorials. All were written using the latest version of Phaser, so you won't be learning any out-dated tricks.
164164

165-
As well as the book you get all the source code, graphics and assets to go with it, and lots of extras too.
166-
167-
[Read More](http://phaser.io/interphase)
165+
As well as the [book](http://phaser.io/interphase) you get all the source code, graphics and assets to go with it, and lots of extras too.
168166

169167
### Phaser Editor - A complete Phaser Editor
170168

@@ -178,14 +176,14 @@ The [Game Mechanic Explorer](http://gamemechanicexplorer.com) is a great interac
178176

179177
[MightyEditor](http://mightyfingers.com/) is a browser-based visual Phaser game editor. Create your maps with ease, position objects and share them in seconds. It also exports to native Phaser code. Excellent for quickly setting-up levels and scenes.
180178

181-
![Building Phaser](http://gametest.mobi/github/div-building-phaser.png "Building Phaser")
179+
![Building Phaser](http://phaser.io/images/github/div-building-phaser.png "Building Phaser")
182180
<a name="building-phaser"></a>
183181

184-
Phaser is provided ready compiled in the `build` folder of the repository. There are both plain and minified versions. The plain version is for use during development and the minified version for production.
182+
Phaser is provided ready compiled in the `build` folder of the repository. There are both plain and minified versions. The plain version is for use during development, and the minified version for production. You can also create your own builds.
185183

186184
### Custom Builds
187185

188-
Phaser includes a grunt based build system which allows you to strip out lots of additional features you may not require, saving hundreds of KB in the process. Don't use any Sound in your game? Then you can now exclude the entire sound system. Don't need Keyboard support? That can be stripped out too.
186+
Phaser includes a grunt based build system, which allows you to strip out features you may not require, saving hundreds of KB in the process. Don't use any Sound in your game? Then exclude the entire sound system. Don't need Keyboard support? That can be excluded too.
189187

190188
As a result of this work the minimum build size of Phaser is now just 80KB minified and gzipped.
191189

@@ -202,9 +200,9 @@ window.p2 = require('phaser/build/custom/p2')
202200
window.Phaser = require('phaser/build/custom/phaser-split')
203201
```
204202

205-
If you build a custom version of Phaser (see above) it will split the 3 core libs out into their own files, allowing you to require them as above.
203+
If you build a custom version of Phaser it will split the 3 core libs out into their own files, allowing you to require them as above.
206204

207-
We appreciate this is just a band-aid and not a proper use of modules, but please understand it was never built to be used this way. You're trying to fit a square peg in a round browserify-shaped hole, so compromises have to be made. Please don't open GitHub issues about it. We've no intention of changing Phaser at this stage of its life. Full module based development is being undertaken in Lazer.
205+
We appreciate this is just a band-aid, and not a proper use of modules, but please understand it was never built to be used this way. You're trying to fit a square peg in a round browserify-shaped hole, so compromises have to be made. Please don't open GitHub issues about it as we've no intention of changing Phaser at this stage of its life. Full module based development is being undertaken in Lazer, the next iteration of the Phaser framework.
208206

209207
### Webpack
210208

@@ -255,10 +253,10 @@ Should you wish to build Phaser from source you can take advantage of the provid
255253

256254
Run `grunt` to perform a default build to the `dist` folder.
257255

258-
![Made With Phaser](http://gametest.mobi/github/div-made-with.png "Made With Phaser")
256+
![Made With Phaser](http://phaser.io/images/github/div-made-with.png "Made With Phaser")
259257
<a name="games"></a>
260258

261-
Thousands of games have been made in Phaser. From game jam entries, to titles by some of the largest entertainment brands in the world. Here is a tiny sample:
259+
Thousands of [games](http://phaser.io/news/category/game) have been made in Phaser. From game jam entries, to titles by some of the largest entertainment brands in the world. Here is a tiny sample. You can find hundreds more on our web site.
262260

263261
[![Game](http://phaser.io/images/github/241/bubble-academy.png)][game10]
264262
[![Game](http://phaser.io/images/github/241/woodventure.png)][game11]
@@ -283,39 +281,38 @@ Artwork copyright their respective owners.
283281

284282
We add [new games](http://phaser.io/news/category/game) to the Phaser site weekly, so be sure to send us yours when it's finished!
285283

286-
![Requirements](http://gametest.mobi/github/div-requirements.png "Requirements")
284+
![Requirements](http://phaser.io/images/github/div-requirements.png "Requirements")
287285
<a name="requirements"></a>
288286

289287
Phaser requires a web browser that supports the [canvas tag](http://caniuse.com/#feat=canvas). This includes Internet Explorer 9+, Firefox, Chrome, Safari and Opera on desktop. iOS Safari, Android Browser and Chrome for Android are supported on mobile.
290288

291-
While Phaser does its best to ensure a consistent cross-platform experience, always be aware of browser and device limitations. This is especially important with regard to memory and GPU limitations on mobile, and legacy browser HTML5 compatibility.
289+
While Phaser does its best to ensure a consistent cross-platform experience, always be aware of browser and device limitations. This is especially important with memory and GPU limitations on mobile, and legacy browser HTML5 compatibility.
292290

293291
### IE9
294292

295-
If you need to support IE9 / Android 2.x **and** use P2 physics then you must use the polyfill in the `resources/IE9 Polyfill` folder. If you don't use P2 (or don't care about IE9!) you can skip this.
293+
If you need to support IE9 / Android 2.x _and_ use P2 physics, then you must use the polyfill in the `resources/IE9 Polyfill` folder. If you don't use P2 (or don't care about IE9!) you can skip this.
296294

297295
### JavaScript and TypeScript
298296

299-
Phaser is developed in JavaScript. We've made no assumptions about how you like to code and were careful not to impose a strict structure upon you. You won't find Phaser split into modules, requiring a build step, or making you use a class / inheritance OOP approach. That doesn't mean you can't do so, it just means we don't *force* you to. It's your choice.
297+
Phaser is developed in ES5 JavaScript. We've made no assumptions about how you like to code, and were careful not to impose a strict structure upon you. You won't find Phaser split into modules, requiring a build step, or making you use a class / inheritance OOP approach. That doesn't mean you can't do so, it just means we don't _force_ you to. It's your choice.
300298

301299
If you code with [TypeScript](http://www.typescriptlang.org/) there are comprehensive definition files in the `typescript` folder. They are for TypeScript 1.4+.
302300

303-
![Road Map](http://gametest.mobi/github/div-roadmap.png "Road Map")
301+
![Road Map](http://phaser.io/images/github/div-roadmap.png "Road Map")
304302
<a name="road-map"></a>
305-
## Road Map
306303

307-
The majority of Phaser development is now taking place on the [Lazer](https://github.com/photonstorm/lazer) (Phaser 3) project. The Phaser 2 branch will still be supported and issues fixed, but roadmap features have been migrated over.
304+
The majority of Phaser development is now taking place within the [Lazer](https://github.com/photonstorm/lazer) project. Lazer is the name for Phaser version 3. The Phaser 2 branch will still be supported, and issues fixed, but most roadmap features have been migrated over.
308305

309306
<a name="lazer"></a>
310307
## Lazer
311308

312309
[Lazer](https://github.com/photonstorm/lazer) is the next generation of the Phaser game framework, and was previously called Phaser 3. Using a completely ES6 base it is renderer agnostic, allowing for DOM, SVG, Canvas and WebGL rendering, across desktop and mobile web browsers.
313310

314-
**Lazer is in active development but is not yet ready for production use.**
311+
**Lazer is in active development, but is not yet ready for production use.**
315312

316-
You can read all about the philosophy behind Lazer [here](http://phaser.io/news/2016/01/phaser-in-2015-and-beyond) or join the Google Group [mailing list](https://groups.google.com/d/forum/phaser3-dev) where progress reports are posted. You can also follow progress in the Phaser World newsletter.
313+
You can read all about the philosophy behind Lazer [here](http://phaser.io/news/2016/01/phaser-in-2015-and-beyond) or join the Google Group [mailing list](https://groups.google.com/d/forum/phaser3-dev) where progress reports are posted. You can also follow progress in the [Phaser World](#newsletter) newsletter.
317314

318-
![Change Log](http://gametest.mobi/github/div-change-log.png "Change Log")
315+
![Change Log](http://phaser.io/images/github/div-change-log.png "Change Log")
319316
<a name="change-log"></a>
320317

321318
## Version 2.4.9 - "Four Kings" - 16th June 2016
@@ -399,29 +396,27 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
399396

400397
For changes in previous releases please see the extensive [Version History](https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md).
401398

402-
![Contributing](http://gametest.mobi/github/div-contributing.png "Contributing")
399+
![Contributing](http://phaser.io/images/github/div-contributing.png "Contributing")
403400
<a name="contributing"></a>
404401

405-
Please read the [Contributors Guide][contribute] for full details on helping with Phaser, but the main points are:
402+
The [Contributors Guide][contribute] contains full details on how to help with Phaser development. The main points are:
406403

407404
- Found a bug? Report it on [GitHub Issues][issues] and include a code sample.
408405

409406
- Pull Requests should only be made against the `dev` branch. *Never* against `master`.
410407

411408
- Before submitting a Pull Request run your code through [JSHint](http://www.jshint.com/) using our [config](https://github.com/photonstorm/phaser/blob/master/.jshintrc).
412409

413-
- Before contributing please read the [code of conduct](https://github.com/photonstorm/phaser/blob/master/CODE_OF_CONDUCT.md).
410+
- Before contributing read the [code of conduct](https://github.com/photonstorm/phaser/blob/master/CODE_OF_CONDUCT.md).
414411

415-
Written something cool that shows Phaser in use? Please tell us about it in our [forum][forum] or email: support@phaser.io
412+
Written something cool in Phaser? Please tell us about it in the [forum][forum], or email support@phaser.io
416413

417-
[![Build Status](https://travis-ci.org/photonstorm/phaser.png?branch=dev)](https://travis-ci.org/photonstorm/phaser)
414+
![Created by](http://phaser.io/images/github/div-created-by.png "Created by")
418415

419-
![Created by](http://gametest.mobi/github/div-created-by.png "Created by")
416+
Phaser is a [Photon Storm](http://www.photonstorm.com) production.
420417

421418
![storm](http://www.phaser.io/images/github/photonstorm-x2.png)
422419

423-
Phaser is a [Photon Storm](http://www.photonstorm.com) production.
424-
425420
Created by [Richard Davey](mailto:rich@photonstorm.com). Powered by coffee, anime, pixels and love.
426421

427422
The Phaser logo and characters are &copy; 2016 Photon Storm Limited.

0 commit comments

Comments
 (0)