Skip to content

Commit cc43980

Browse files
authored
Merge pull request #555 from photonstorm/release/v2.11.0
Phaser CE v2.11.0
2 parents 04204f5 + abe8990 commit cc43980

File tree

226 files changed

+20339
-12414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+20339
-12414
lines changed

CHANGELOG.md

+77
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,83 @@
44

55
See [README: Change Log: Unreleased](README.md#unreleased).
66

7+
## Version 2.11.0 - 26 June 2018
8+
9+
If you're starting or stopping input handlers manually, you'll have to make some simple changes to your code.
10+
11+
### API Changes / New Features
12+
13+
* Phaser now starts the [Pointer Events handler](https://photonstorm.github.io/phaser-ce/Phaser.MSPointer.html) (with capture off) or the [Mouse handler](https://photonstorm.github.io/phaser-ce/Phaser.Mouse.html) (with capture off), but not both. This makes input behavior more consistent and avoids some rare conflicts between the two when running simultaneously.
14+
15+
If you want to disable the Pointer Events handler, pass `{ mspointer: false }` in your game config. The Mouse handler will be used instead.
16+
17+
If you want to run both handlers together, you can start the Mouse handler manually. You should also turn on capture for the Pointer Events handler to avoid duplicate events:
18+
19+
```javascript
20+
game.input.mouse.start();
21+
game.input.mspointer.capture = true;
22+
```
23+
24+
* [Mouse wheel input](https://photonstorm.github.io/phaser-ce/Phaser.MouseWheel.html) was moved to `input.mouseWheel`. The changed properties are
25+
26+
- `input.mouse.wheelDelta``input.mouseWheel.delta`
27+
- `input.mouse.mouseWheelCallback``input.mouseWheel.callback`
28+
29+
The old properties will keep working for now.
30+
31+
* [Pointer lock input](https://photonstorm.github.io/phaser-ce/Phaser.PointerLock.html) was moved to `input.pointerLock`. The changed properties are
32+
33+
- `input.mouse.pointerLock``input.pointerLock.onChange`
34+
- `input.mouse.requestPointerLock()``input.pointerLock.request()`
35+
- `input.mouse.locked``input.pointerLock.locked`
36+
- `input.mouse.releasePointerLock()``input.pointerLock.exit()`
37+
38+
The old properties will keep working for now.
39+
40+
There is a new Signal, `input.pointerLock.onError`, dispatched when a request fails.
41+
42+
Beware that [Chrome < 68 doesn't pass movement values when using Pointer Events with pointer lock](https://bugs.chromium.org/p/chromium/issues/detail?id=836995), so you should use the Mouse handler instead for that.
43+
44+
* `game.debug.inputInfo()` now shows which input handlers and pointers are active.
45+
46+
* All the input handlers have an `active` property that shows whether they've been started. Their `start` methods return true if they've been started or false otherwise.
47+
48+
* The `skipFrames` argument in [AnimationParser#spriteSheet](https://photonstorm.github.io/phaser-ce/Phaser.AnimationParser.html#_spriteSheet) now works as an offset (#514). When positive, it's an offset from the start of the parsed frame list; when negative, it's an offset from the end. Negative `frameWidth` and `frameHeight` arguments are no longer allowed.
49+
50+
* preRender() and postRender() hooks are no longer called for the HEADLESS renderer.
51+
52+
* `game.make.group()` no longer assigns a default parent. This is more consistent with the rest of the [game.make](https://photonstorm.github.io/phaser-ce/Phaser.GameObjectCreator.html) methods (#525). Use `game.add.group()` instead to add the Group to the game world.
53+
54+
* [Point.parse()](https://photonstorm.github.io/phaser-ce/Phaser.Point.html#_parse) no longer converts coordinates to integers (#502). Use the new method [Point.trunc()](https://photonstorm.github.io/phaser-ce/Phaser.Point.html#_trunc) as well if you want the previous behavior.
55+
56+
* The default [Debug#font](https://photonstorm.github.io/phaser-ce/Phaser.Utils.Debug.html#font) is now '14px monospace'.
57+
58+
* The unused and deprecated property MSPointer#button was removed.
59+
60+
### New Features
61+
62+
* States have a new [postUpdate](https://photonstorm.github.io/phaser-ce/Phaser.State.html#postUpdate) method hook. It's called after game objects have received all their own updates (including physics), but before the Stage has calculated the final transformations.
63+
* [Debug#spriteInfo](https://photonstorm.github.io/phaser-ce/Phaser.Utils.Debug.html#spriteInfo) shows the sprite's parent, if any.
64+
* When a sprite is being dragged you can read its change in position (as `deltaX`, `deltaY`) in the [onDragUpdate](https://photonstorm.github.io/phaser-ce/Phaser.Events.html#onDragUpdate) handler.
65+
* [Phaser.Math.trunc()](https://photonstorm.github.io/phaser-ce/Phaser.Math.html#trunc) truncates a number.
66+
* Phaser.EmptyRectangle replaces PIXI.EmptyRectangle.
67+
* [Debug#device](https://photonstorm.github.io/phaser-ce/Phaser.Utils.Debug.html#device) shows device graphics, audio, and input support. It may be helpful on devices where you can't see `console` output easily.
68+
* [Debug#pointer](https://photonstorm.github.io/phaser-ce/Phaser.Utils.Debug.html#pointer) shows the pointer's movementX/movementY values and button states (for mouse pointers).
69+
* `maxPointers` can be passed in the [game config](https://photonstorm.github.io/phaser-ce/global.html#GameConfig), setting [Input#maxPointers](https://photonstorm.github.io/phaser-ce/Phaser.Input.html#maxPointers).
70+
71+
### Updates
72+
73+
* Removed the unnecessary 'Audio source already exists' warning.
74+
75+
### Bug Fixes
76+
77+
* Masks are no longer disabled by getBounds() and are excluded from bounds calculations (#334).
78+
* Sprites' [bringToTop()](https://photonstorm.github.io/phaser-ce/Phaser.Sprite.html#bringToTop) and [sendToBack()](https://photonstorm.github.io/phaser-ce/Phaser.Sprite.html#sendToBack) methods now work as expected for all parent types, not just Groups (#549).
79+
80+
### Thanks
81+
82+
@giniwren, @griever989, @mindcity, @omretterry, @photonstorm, @samme, @Siri0n, @tobspr
83+
784
## Version 2.10.6 - 1st June 2018
885

986
* Fixed audio playback when restarting a paused sound (#538).

DOCS.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ Ninja Physics is not bundled in Phaser by default. Please see the README custom
249249
| [Key](./Phaser.Key.html) | - | A Key object is responsible for listening to a specific Key. Created by the Keyboard class. |
250250
| [KeyCode](./Phaser.KeyCode.html) | - | The KeyCode constants are used when creating new Key objects. |
251251
| [Mouse](./Phaser.Mouse.html) | `input.mouse` | A Mouse event handler. Listens for device related events and passes them on to the active Pointer. |
252-
| [MouseLock](./Phaser.MouseWheel.html) | `input.mouseWheel` | A Mouse Wheel event handler. |
252+
| [MouseWheel](./Phaser.MouseWheel.html) | `input.mouseWheel` | A Mouse Wheel event handler. |
253253
| [MSPointer](./Phaser.MSPointer.html) | `input.mspointer` | An event handler for the Pointer Events API. Listens for device related events and passes them on to the active Pointer. |
254-
| [MouseLock](./Phaser.PointerLock.html) | `input.pointerLock` | An event handler for the Pointer Lock API. |
254+
| [PointerLock](./Phaser.PointerLock.html) | `input.pointerLock` | An event handler for the Pointer Lock API. |
255255
| [Touch](./Phaser.Touch.html) | `input.touch` | A Touch event handler. Listens for device related events and passes them on to the active Pointer. |
256256

257257
<a name="gamepads"></a>

README.md

+9-18
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Thousands of developers worldwide use Phaser. From indies and multi-national dig
88

99
Phaser v2 was built and maintained by [Photon Storm](http://www.photonstorm.com) and turned over to the community (as Phaser CE) in November 2016. [Phaser v3](http://phaser.io/phaser3) is in active development.
1010

11-
The [current Phaser CE release is 2.10.6](https://github.com/photonstorm/phaser-ce/releases/tag/v2.10.6).
11+
The [current Phaser CE release is 2.11.0](https://github.com/photonstorm/phaser-ce/releases/tag/v2.11.0).
1212

1313
- **Visit:** The [Phaser website](http://phaser.io) and follow on [Twitter](https://twitter.com/photonstorm) (#[phaserjs](https://twitter.com/hashtag/phaserjs))
1414
- **Learn:** [API Docs](https://photonstorm.github.io/phaser-ce/), [Support Forum][forum] and [StackOverflow](https://stackoverflow.com/questions/tagged/phaser-framework)
@@ -128,16 +128,16 @@ Please see additional steps for [Browserify/CommonJS](#browserify) and [Webpack]
128128
[Phaser CE is on jsDelivr](http://www.jsdelivr.com/projects/phaser-ce), a "super-fast CDN for developers". Include the following in your html:
129129

130130
```html
131-
<script src="//cdn.jsdelivr.net/npm/phaser-ce@2.10.6/build/phaser.js"></script>
131+
<script src="//cdn.jsdelivr.net/npm/phaser-ce@2.11.0/build/phaser.js"></script>
132132
```
133133

134134
or the minified version:
135135

136136
```html
137-
<script src="//cdn.jsdelivr.net/npm/phaser-ce@2.10.6"></script>
137+
<script src="//cdn.jsdelivr.net/npm/phaser-ce@2.11.0"></script>
138138
```
139139

140-
[Custom builds](https://cdn.jsdelivr.net/npm/phaser-ce@2.10.6/build/custom/) are available too.
140+
[Custom builds](https://cdn.jsdelivr.net/npm/phaser-ce@2.11.0/build/custom/) are available too.
141141

142142
<a name="getting-started"></a>
143143

@@ -328,7 +328,7 @@ Written something cool in Phaser? Please tell us about it in the [forum][forum],
328328

329329
# Change Log
330330

331-
## Version 2.11.0 (in development)
331+
## Version 2.11.0 - 26 June 2018
332332

333333
If you're starting or stopping input handlers manually, you'll have to make some simple changes to your code.
334334

@@ -405,15 +405,6 @@ If you're starting or stopping input handlers manually, you'll have to make some
405405

406406
@giniwren, @griever989, @mindcity, @omretterry, @photonstorm, @samme, @Siri0n, @tobspr
407407

408-
## Version 2.10.6 - 1st June 2018
409-
410-
* Fixed audio playback when restarting a paused sound (#538).
411-
* TypeScript and documentation fixes (#537, #540, #544, #545).
412-
413-
### Thanks
414-
415-
@bseiller, @GrindheadGames, @josalmi, @photonstorm, @qdrj, @samme, @Siri0n, @zhanghuanchong
416-
417408
For changes in previous releases please see the extensive [Change Log](https://github.com/photonstorm/phaser-ce/blob/master/CHANGELOG.md).
418409

419410
# License
@@ -436,10 +427,10 @@ All rights reserved.
436427

437428
[![Analytics](https://ga-beacon.appspot.com/UA-44006568-2/phaser/index)](https://github.com/igrigorik/ga-beacon)
438429

439-
[get-js]: https://github.com/photonstorm/phaser-ce/releases/download/v2.10.6/phaser.js
440-
[get-minjs]: https://github.com/photonstorm/phaser-ce/releases/download/v2.10.6/phaser.min.js
441-
[get-zip]: https://github.com/photonstorm/phaser-ce/archive/v2.10.6.zip
442-
[get-tgz]: https://github.com/photonstorm/phaser-ce/archive/v2.10.6.tar.gz
430+
[get-js]: https://github.com/photonstorm/phaser-ce/releases/download/v2.11.0/phaser.js
431+
[get-minjs]: https://github.com/photonstorm/phaser-ce/releases/download/v2.11.0/phaser.min.js
432+
[get-zip]: https://github.com/photonstorm/phaser-ce/archive/v2.11.0.zip
433+
[get-tgz]: https://github.com/photonstorm/phaser-ce/archive/v2.11.0.tar.gz
443434
[clone-http]: https://github.com/photonstorm/phaser.git
444435
[clone-ssh]: ssh://git@github.com:photonstorm/phaser.git
445436
[clone-svn]: https://github.com/photonstorm/phaser

build/custom/creature.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/p2.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)