Skip to content

Commit 566c781

Browse files
committed
Merge remote-tracking branch 'refs/remotes/photonstorm/dev' into display-object-container-dimensions-fix
2 parents c56bc76 + 9654a4b commit 566c781

67 files changed

Lines changed: 13561 additions & 114655 deletions

Some content is hidden

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

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ module.exports = function (grunt) {
425425

426426
});
427427

428-
grunt.registerTask('build', 'Compile all Phaser versions just to the dist folder', function() {
428+
grunt.registerTask('build', 'Compile all Phaser versions just to the temporary dist folder', function() {
429429

430430
grunt.option('exclude', 'ninja,creature');
431431
grunt.option('filename', 'phaser');

README.md

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Grab the source and join in the fun!
4040

4141
> In Development
4242
43-
This is the development branch, where we are building Phaser 2.6.2.
43+
This is the development branch, where we are building Phaser 2.7.0.
4444

4545
Check the [Change Log](#change-log) to see what we've done so far. Or switch to the master branch for the current stable release.
4646

@@ -107,15 +107,15 @@ Using Browserify? Please [read this](#browserify).
107107

108108
[jsDelivr](http://www.jsdelivr.com/#!phaser) is a "super-fast CDN for developers". Include the following in your html:
109109

110-
`<script src="//cdn.jsdelivr.net/phaser/2.6.2/phaser.js"></script>`
110+
`<script src="//cdn.jsdelivr.net/phaser/2.7.0/phaser.js"></script>`
111111

112112
or the minified version:
113113

114-
`<script src="//cdn.jsdelivr.net/phaser/2.6.2/phaser.min.js"></script>`
114+
`<script src="//cdn.jsdelivr.net/phaser/2.7.0/phaser.min.js"></script>`
115115

116116
[cdnjs.com](https://cdnjs.com/libraries/phaser) also offers a free CDN service. They have all versions of Phaser and even the custom builds:
117117

118-
`<script src="https://cdnjs.cloudflare.com/ajax/libs/phaser/2.6.2/phaser.js"></script>`
118+
`<script src="https://cdnjs.cloudflare.com/ajax/libs/phaser/2.7.0/phaser.js"></script>`
119119

120120
### Phaser Sandbox
121121

@@ -305,35 +305,59 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
305305
![Change Log](http://phaser.io/images/github/div-change-log.png "Change Log")
306306
<a name="change-log"></a>
307307

308-
## Version 2.6.2 - "Kore Springs" - In Development
308+
## Version 2.7.0 - "Kore Springs" - In Development
309309

310310
### New Features
311311

312+
* The brand new WebGL Tilemap Renderer is available in this release of Phaser. Using custom developed shaders, map parsing and index batching, it finally makes tilemap rendering as fast as it possibly can be in WebGL.
312313
* Group.getRandomExists will return a random child from the Group that has exists set to true.
313314
* Group.getAll will return all children in the Group, or a section of the Group, with the optional ability to test if the child has a property matching the given value or not.
314315
* Group.iterate has a new `returnType`: `RETURN_ALL`. This allows you to return all children that pass the iteration test in an array.
316+
* The property `checkCollision.none` in the ArcadePhysics.Body class was available, but never used internally. It is now used and checked by the `separate` method. By setting `checkCollision.none = true` you can disable all collision and overlap checks on a Body, but still retain its motion updates (thanks @samme #2661)
317+
* Math.rotateToAngle takes two angles (in radians), and an interpolation value, and returns a new angle, based on the shortest rotational distance between the two.
315318

316319
### Updates
317320

318-
* TypeScript definitions fixes and updates (thanks )
319-
* Docs typo fixes (thanks @rroylance @Owumaro)
321+
* TypeScript definitions fixes and updates (thanks @calvindavis)
322+
* Docs typo fixes (thanks @rroylance @Owumaro @boniatillo-com)
320323
* The InputHandler.flagged property has been removed. It was never used internally, or exposed via the API, so was just overhead.
321324
* The src/system folder has been removed and all files relocated to the src/utils folder. This doesn't change anything from an API point of view, but did change the grunt build scripts slightly.
322325
* BitmapData.shadow and BitmapData.text now both `return this` keeping them in-line with the docs (thanks @greeny #2634)
326+
* Group.align has had its arguments changed so that it's now `(width, height, ...)` instead of `(rows, columns, ...)` (thanks @deargle #2643)
327+
* Group.align now returns `true` if the Group was aligned, or `false` if not.
328+
* The Loader.headers object has a new property `requestedWith`. By default this is set to `false`, but it can be used to set the `X-Requested-With` header to `XMLHttpRequest` (or any other value you need). To enable this do `this.load.headers.requestedWith = 'XMLHttpRequest'` before adding anything to the Loader.
329+
* ScaleManager.hasPhaserSetFullScreen is a new boolean that identifies if the browser is in full screen mode or not, and if Phaser was the one that requested it. As it's possible to enter full screen mode outside of Phaser, and it then gets confused about what bounding parent to use.
330+
* Phaser.Tileset has a new property `lastgid` which is populated automatically by the TilemapParser when importing Tiled map data, or can be set manually if building your own tileset.
331+
* Stage will now check if `document.hidden` is available first, and if it is then never even check for the prefixed versions. This stops warnings like "mozHidden and mozVisibilityState are deprecated" in newer versions of browsers and retain backward compatibility (thanks @leopoldobrines7 #2656)
332+
* As a result of changes in #2573 Graphics objects were calling `updateLocalBounds` on any shape change, which could cause dramatic performances drops in Graphics heavy situations (#2618). Graphics objects now have a new flag `_boundsDirty` which is used to detect if the bounds have been invalidated, i.e. by a Graphics being cleared or drawn to. If this is set to true then `updateLocalBounds` is called once in the `postUpdate` method (thanks @pengchuan #2618)
333+
323334

324335
### Bug Fixes
325336

326337
* A Group with `inputEnableChildren` set would re-start the Input Handler on a Sprite, even if that handler had been disabled previously.
327-
*
328-
*
338+
* Weapon.autofire wouldn't fire after the first bullet, or until `fire` was called, neither of which are requirements. If you now set this boolean the Weapon will fire continuously until you toggle it back to false (thanks @alverLopez #2647)
339+
* ArcadePhysics.World.angleBetweenCenters now uses `centerX` and `centerY` properties to check for the angle between, instead of `center.x/y` as that property no longer exists (thanks @leopoldobrines7 #2654)
340+
* The Emitter.makeParticles `collide` argument didn't work, as a result of #2661, but is now properly respected thanks to that change (thanks @samme #2662)
329341

330342
### Pixi Updates
331343

332344
Please note that Phaser uses a custom build of Pixi and always has done. The following changes have been made to our custom build, not to Pixi in general.
333345

334-
*
335-
*
336-
*
346+
* This version contains significant fixes for `DisplayObject.getBounds` and `DisplayObjectContainer.getBounds`. The methods can now accept an optional argument `targetCoordinateSpace` which makes it much more flexible, allowing you to check the bounds against any target, not just local and global ones. If the `targetCoordinateSpace` is a valid DisplayObject:
347+
348+
- If it's a parent of the caller at some level it will return the bounds
349+
relative to it.
350+
- if it's not parenting the caller at all, it will get the global bounds of
351+
it, and the caller and will calculate the x and y bounds of the caller
352+
relative to the targetCoordinateSpace DisplayObject.
353+
354+
As a result this also fixes how empty Groups are treated when they have no other
355+
children except Groups. So now calculations are correct.
356+
* DisplayObjectContainer.contains(child) is a new method which determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself. This method is
357+
used in the new getBounds function.
358+
* Corrected DisplayObjects default `_bounds` rect from (0, 0, 1, 1) to (0, 0, 0, 0).
359+
* Thanks to @fmflame for his hard work on the above (#2639 #2627)
360+
* The methods `setStageReference` and `removeStageReference` have been removed from all Pixi classes. Objects no longer have `stage` properties, or references to the Stage object. This is because no reference to the Stage is required for any calculations, and Phaser can only have 1 Stage, so adding and removing references to it were superfluous actions.
337361

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

@@ -368,10 +392,10 @@ All rights reserved.
368392

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

371-
[get-js]: https://github.com/photonstorm/phaser/releases/download/v2.6.2/phaser.js
372-
[get-minjs]: https://github.com/photonstorm/phaser/releases/download/v2.6.2/phaser.min.js
373-
[get-zip]: https://github.com/photonstorm/phaser/archive/v2.6.2.zip
374-
[get-tgz]: https://github.com/photonstorm/phaser/archive/v2.6.2.tar.gz
395+
[get-js]: https://github.com/photonstorm/phaser/releases/download/v2.7.0/phaser.js
396+
[get-minjs]: https://github.com/photonstorm/phaser/releases/download/v2.7.0/phaser.min.js
397+
[get-zip]: https://github.com/photonstorm/phaser/archive/v2.7.0.zip
398+
[get-tgz]: https://github.com/photonstorm/phaser/archive/v2.7.0.tar.gz
375399
[clone-http]: https://github.com/photonstorm/phaser.git
376400
[clone-ssh]: git@github.com:photonstorm/phaser.git
377401
[clone-svn]: https://github.com/photonstorm/phaser

build/config.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,10 +409,13 @@
409409
if ($modules['tilemap'])
410410
{
411411
echo <<<EOL
412+
<script src="$path/src/pixi/extras/Tilemap.js"></script>
413+
<script src="$path/src/pixi/renderers/webgl/shaders/TilemapShader.js"></script>
412414
<script src="$path/src/tilemap/ImageCollection.js"></script>
413415
<script src="$path/src/tilemap/Tile.js"></script>
414416
<script src="$path/src/tilemap/Tilemap.js"></script>
415417
<script src="$path/src/tilemap/TilemapLayer.js"></script>
418+
<script src="$path/src/tilemap/TilemapLayerGL.js"></script>
416419
<script src="$path/src/tilemap/TilemapParser.js"></script>
417420
<script src="$path/src/tilemap/Tileset.js"></script>
418421

0 commit comments

Comments
 (0)