Skip to content

Commit

Permalink
2.4.2 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
photonstorm committed Jul 29, 2015
1 parent 9620661 commit 4b22f48
Show file tree
Hide file tree
Showing 392 changed files with 1,292 additions and 942 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Change Log

## Version 2.4.2 - "Altara" - 29th July 2015

### Updates

* TypeScript definitions fixes and updates (thanks @clark-stevenson @shivinsky)
* JSDoc typo fixes (thanks @DrkSephy)
* TilemapLayer - Fixed unmatched `context.save` and `context.restore` calls (thanks @MortimerGoro #1934)
* Cache.getFrame has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameCount has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameData has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.hasFrameData has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameByIndex has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameByName has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Device.canPlayVideo now checks for `ogv` as a valid file extension for OGG video files (thanks @JB-Tellez #1928)
* Phaser.Sound will now automatically check the Cache to see if the audio file it is using is still there or not. If not then it will automatically called `Sound.destroy` on itself. If you do not desire this result then you should ensure that you undertake all house-keeping yourself, and properly destroy Sound objects _before_ calling `Cache.removeSound` (#1946)

### Bug Fixes

* DeviceButton would try to set `altKey`, `shiftKey` and `ctrlKey` even for Joypads (thanks @zatch #1939)
* Pointer.move would accidentally reset the `isDown` status of the Pointer on touch devices, which broke things like Sprite input events when built to native apps or run locally (#1932 #1943)
* Pointer.onDown (and input enabled items like Buttons) would fail on FireFox / Linux and CocoonJS (#1944 #1945)

## Version 2.4.1 - "Ionin Spring" - 24th July 2015

This is a small point release that updates the Creature runtimes and fixes a couple of small cache issues.
Expand Down
191 changes: 150 additions & 41 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ module.exports = function (grunt) {
docs_dir: 'docs',
sourcemap: false,
filename: 'phaser',
pixiFilename: 'pixi.js',
p2Filename: 'p2.js',
creatureFilename: 'creature.js',
filelist: [],
banner: require('fs').readFileSync(__dirname + '/tasks/banner.txt', 'utf8')
}
Expand Down Expand Up @@ -85,9 +88,13 @@ module.exports = function (grunt) {
}
}

grunt.log.writeln("\nFor example: --exclude p2,tilemap,retrofont");
grunt.log.writeln("Optional flags: --filename yourfilename and --sourcemap true");
grunt.log.writeln("Note that some modules have dependencies on others.\n");
grunt.log.writeln("\nFor example: --exclude p2,tilemaps,retrofont\n");
grunt.log.writeln("Optional flags:\n");
grunt.log.writeln("--filename yourfilename (builds to your own custom file name)");
grunt.log.writeln("--sourcemap true (creates a source map)");
grunt.log.writeln("--split true (splits Phaser, PIXI, p2 and Creature into separate files)");
grunt.log.writeln("--uglify true (runs Uglify on the output files)");
grunt.log.writeln("\nNote that some modules have dependencies on others.\n");

grunt.fail.fatal("No build options were specified.");
}
Expand All @@ -96,8 +103,11 @@ module.exports = function (grunt) {
// Defaults
grunt.config.set('sourcemap', false);
grunt.config.set('filename', 'phaser');
grunt.config.set('split', false);
grunt.config.set('target_dir', '<%= release_dir %>');

var split = false;

// Overrides
if (grunt.option('filename'))
{
Expand All @@ -109,6 +119,12 @@ module.exports = function (grunt) {
grunt.config.set('sourcemap', grunt.option('sourcemap'));
}

if (grunt.option('split'))
{
grunt.config.set('split', grunt.option('split'));
split = grunt.option('split');
}

grunt.log.writeln("Excluding modules:\n");

var excludedKeys = [];
Expand Down Expand Up @@ -151,60 +167,140 @@ module.exports = function (grunt) {
}
}

// Ok we know the excludes array is fine, let's get this show started

grunt.log.writeln("\nPackaging Globals ...\n");
/////////////////////////////////////////////////////////////////////////
// Ok we know the excludes array is fine, let's get this show started //
/////////////////////////////////////////////////////////////////////////

var filelist = [];
var pixiFilelist = [];

// Clean the working folder
var tasks = [ 'clean:build' ];

// Prepare the globals first, the libs that live outside of Phaser
if (split)
{

// 1) Creature
////////////////////////////////////////
// Split build (for Browserify, etc) //
////////////////////////////////////////

if (!excludedKeys['creature'])
{
grunt.log.writeln("-> Creature");
tasks.push('concat:creatureGlobal');
filelist.push('<%= modules_dir %>/creature-global.js');
}
grunt.log.writeln("\nSplitting Globals ...\n");

// 2) P2
// 1) Creature

if (!excludedKeys['p2'])
{
grunt.log.writeln("-> P2.js");
tasks.push('concat:p2Global');
filelist.push('<%= modules_dir %>/p2-global.js');
}
if (!excludedKeys['creature'])
{
grunt.log.writeln("-> Creature");
tasks.push('concat:creatureGlobalSplit');

// 3) PIXI
if (grunt.option('uglify'))
{
tasks.push('uglify:creature');
}
}

grunt.log.writeln("-> PIXI");
tasks.push('concat:pixiIntro');
filelist.push('<%= modules_dir %>/pixi-intro.js');
// 2) P2

// Optional Rope
if (!excludedKeys['rope'])
{
grunt.log.writeln("-> PIXI.Rope");
tasks.push('concat:pixiRope');
filelist.push('<%= modules_dir %>/pixi-rope.js');
}
if (!excludedKeys['p2'])
{
grunt.log.writeln("-> P2.js");
tasks.push('concat:p2GlobalSplit');

// Optional Tilesprite
if (!excludedKeys['tilesprite'])
{
grunt.log.writeln("-> PIXI.TileSprite");
tasks.push('concat:pixiTileSprite');
filelist.push('<%= modules_dir %>/pixi-tilesprite.js');
if (grunt.option('uglify'))
{
tasks.push('uglify:p2');
}
}

// 3) PIXI

grunt.log.writeln("-> PIXI");
tasks.push('concat:pixiIntro');
pixiFilelist.push('<%= modules_dir %>/pixi-intro.js');

// Optional Rope
if (!excludedKeys['rope'])
{
grunt.log.writeln("-> PIXI.Rope");
tasks.push('concat:pixiRope');
pixiFilelist.push('<%= modules_dir %>/pixi-rope.js');
}

// Optional Tilesprite
if (!excludedKeys['tilesprite'])
{
grunt.log.writeln("-> PIXI.TileSprite");
tasks.push('concat:pixiTileSprite');
pixiFilelist.push('<%= modules_dir %>/pixi-tilesprite.js');
}

// PIXI Outro
tasks.push('concat:pixiOutro');
pixiFilelist.push('<%= modules_dir %>/pixi-outro.js');

grunt.config.set('pixiFilelist', pixiFilelist);

tasks.push('concat:pixi');

if (grunt.option('uglify'))
{
tasks.push('uglify:pixi');
}
}
else
{
///////////////////
// Single build //
///////////////////

grunt.log.writeln("\nPackaging Globals ...\n");

// Prepare the globals first, the libs that live outside of Phaser

// 1) Creature

if (!excludedKeys['creature'])
{
grunt.log.writeln("-> Creature");
tasks.push('concat:creatureGlobal');
filelist.push('<%= modules_dir %>/creature-global.js');
}

// PIXI Outro
tasks.push('concat:pixiOutro');
filelist.push('<%= modules_dir %>/pixi-outro.js');
// 2) P2

if (!excludedKeys['p2'])
{
grunt.log.writeln("-> P2.js");
tasks.push('concat:p2Global');
filelist.push('<%= modules_dir %>/p2-global.js');
}

// 3) PIXI

grunt.log.writeln("-> PIXI");
tasks.push('concat:pixiIntro');
filelist.push('<%= modules_dir %>/pixi-intro.js');

// Optional Rope
if (!excludedKeys['rope'])
{
grunt.log.writeln("-> PIXI.Rope");
tasks.push('concat:pixiRope');
filelist.push('<%= modules_dir %>/pixi-rope.js');
}

// Optional Tilesprite
if (!excludedKeys['tilesprite'])
{
grunt.log.writeln("-> PIXI.TileSprite");
tasks.push('concat:pixiTileSprite');
filelist.push('<%= modules_dir %>/pixi-tilesprite.js');
}

// PIXI Outro
tasks.push('concat:pixiOutro');
filelist.push('<%= modules_dir %>/pixi-outro.js');
}

// And now for Phaser

Expand Down Expand Up @@ -320,6 +416,19 @@ module.exports = function (grunt) {

});

grunt.registerTask('split', 'Compile Phaser to dist folder and splits the globals into single files', function() {

grunt.option('exclude', 'ninja,creature');
grunt.option('filename', 'phaser');
grunt.option('sourcemap', true);
grunt.option('copy', false);
grunt.option('uglify', true);
grunt.option('split', true);

grunt.task.run('custom');

});

grunt.registerTask('test', 'Phaser Test Build (all libs)', function() {

grunt.option('exclude', 'ninja,creature');
Expand Down
32 changes: 15 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ Thousands of developers worldwide use it. From indies and multi-national digital
* **Read:** Subscribe to the [Newsletter](https://confirmsubscription.com/h/r/369DE48E3E86AF1E) and grab our [Phaser Books](http://phaser.io/shop)
* **Chat:** [#phaserio IRC channel](http://www.html5gamedevs.com/topic/4470-official-phaserio-irc-channel-phaserio-on-freenode/) on freenode
* **Extend:** With [Phaser Plugins](https://github.com/photonstorm/phaser-plugins)
* **Be awesome:** Support our work by buying our [books](http://phaser.io/shop/books) and [plugins](http://phaser.io/shop/plugins)
* **Be awesome:** Support the future of Phaser on [Patreon](https://www.patreon.com/photonstorm) or by buying our [books](http://phaser.io/shop/books) and [plugins](http://phaser.io/shop/plugins)

![div](http://www.phaser.io/images/github/div.png)

## Index

- [What's New?](#whats-new)
- [Support Phaser](#patreon)
- [Download Phaser](#download)
- [Getting Started](#getting-started)
- [Using Phaser](#using-phaser)
Expand All @@ -39,21 +40,17 @@ Thousands of developers worldwide use it. From indies and multi-national digital

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

> 24th July 2015
> 29th July 2015
Phaser 2.4 is another huge update. We had to bump the version number from 2.3 directly to 2.4 because of some API adjustments, all of which are fully detailed in the [Change Log](#change-log). While it's true we could have released it over a few smaller point releases, that just isn't how the cookie crumbled this time. _Be sure to pay attention to the previous deprecated API calls that have been removed in 2.4._

So although you had to wait for it a couple months more than usual, Phaser 2.4 is quite simply an **epic release** - there is no two ways about it! Brand new video component? Check. Support for fully boned Creature animations? Check. Brand new Cache and Loader updates? Check. Dynamic sprite and gradient generator? Check. Literally hundreds of updates, enhancements and fixes across the entire codebase? Yup, those too! The Change Log seems to scroll on forever, yet the overall package size continues to come down as we optimise and streamline our code too (this release actually builds smaller than 2.3 did, just 80KB min + gz)

A few people on the forum have asked how Phaser is funded: Phaser is a fully open-source project and as such we have no _direct_ income from it at all. All development is funded by the client work that [my company](http://www.photonstorm.com) takes on. And of course the contributions from the incredible community (who also volunteer their skills for free).

Sometimes this work directly impacts on Phaser. For example we recently built [5 games](http://www.insideouthq.com) for the new Pixar film Inside Out. Being Pixar they of course had high video requirements, so we literally coded from scratch the way videos were handled and added in video stream support in the process. Very often though our work simply uses Phaser but doesn't enhance it. Which is why if you buy any of the books or plugins we have on sale it really does make a difference! It buys us time to work on Phaser un-interrupted, which in turn benefits everyone. Some have asked if we could add a 'donate' button to the site, but instead I'd rather you get value from your money - so if we release a new plugin, book or magazine you like the look of, please do consider it a donation towards the continued work we all put in.

Money stuff aside please enjoy this brand new release. We'll carry on supporting Phaser 2 for the rest of 2015 _at least_, while development of the Phaser 3 renderer proceeds at a rapid pace too.

Make sure you check out the Phaser web site. We are going to be adding in stacks of new examples and features in the coming weeks.

But that's all for now. I hope you enjoy Phaser 2.4. Happy coding everyone! See you on the forums.
Also we'd be extremely grateful if you could get involved with our [Patreon campaign](https://www.patreon.com/photonstorm). We've got some really ambitious plans for how we'd like to see Phaser evolve in the future. Hopefully together we can reach that goal faster.

But that's all for now. I hope you enjoy Phaser 2.4.

Happy coding everyone! See you on the forums.

Expand All @@ -65,6 +62,13 @@ Rich - [@photonstorm](https://twitter.com/photonstorm)

![div](http://www.phaser.io/images/github/div.png)

<a name="patreon"></a>
## Support Phaser on Patreon

![patreon](http://www.phaser.io/images/patreon.png)

Please help support the future development of Phaser through our [Patreon campaign](https://www.patreon.com/photonstorm). We've some exciting plans and there's so much we'd like to do - let's see if we can all work together to make this possible.

<a name="download"></a>
## Download Phaser

Expand Down Expand Up @@ -242,9 +246,7 @@ If you are an exceptional JavaScript developer and would like to join the Phaser
<a name="change-log"></a>
## Change Log

## Version 2.4.2 - "Altara" - in dev

### New Features
## Version 2.4.2 - "Altara" - 29th July 2015

### Updates

Expand All @@ -260,15 +262,11 @@ If you are an exceptional JavaScript developer and would like to join the Phaser
* Device.canPlayVideo now checks for `ogv` as a valid file extension for OGG video files (thanks @JB-Tellez #1928)
* Phaser.Sound will now automatically check the Cache to see if the audio file it is using is still there or not. If not then it will automatically called `Sound.destroy` on itself. If you do not desire this result then you should ensure that you undertake all house-keeping yourself, and properly destroy Sound objects _before_ calling `Cache.removeSound` (#1946)


### Bug Fixes

* DeviceButton would try to set `altKey`, `shiftKey` and `ctrlKey` even for Joypads (thanks @zatch #1939)
* Pointer.move would accidentally reset the `isDown` status of the Pointer on touch devices, which broke things like Sprite input events when built to native apps or run locally (#1932 #1943)




* Pointer.onDown (and input enabled items like Buttons) would fail on FireFox / Linux and CocoonJS (#1944 #1945)

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

Expand Down
8 changes: 5 additions & 3 deletions build/custom/phaser-arcade-physics.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* Phaser - http://phaser.io
*
* v2.4.2 "Altara" - Built: Tue Jul 28 2015 14:17:06
* v2.4.2 "Altara" - Built: Wed Jul 29 2015 14:59:28
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
Expand Down Expand Up @@ -77,7 +77,7 @@ PIXI.CANVAS_RENDERER = 1;
*/
PIXI.VERSION = "v2.2.8";

// used to create uids for various pixi objects..
// used to create uids for various pixi objects.
PIXI._UID = 0;

if (typeof(Float32Array) != 'undefined')
Expand Down Expand Up @@ -10383,7 +10383,7 @@ var Phaser = Phaser || {
* @constant
* @type {string}
*/
VERSION: '2.4.2-dev',
VERSION: '2.4.2',

/**
* An array of Phaser game instances.
Expand Down Expand Up @@ -43876,6 +43876,8 @@ Phaser.Text.fontPropertiesContext = Phaser.Text.fontPropertiesCanvas.getContext(
* For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of
* converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson
*
* If you were using an older version of Phaser (< 2.4) and using the DOMish parser hack, please remove this. It isn't required any longer.
*
* @class Phaser.BitmapText
* @constructor
* @extends PIXI.DisplayObjectContainer
Expand Down
2 changes: 1 addition & 1 deletion build/custom/phaser-arcade-physics.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/custom/phaser-arcade-physics.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 4b22f48

Please sign in to comment.