photonstorm/phaser — pull request #905 by davyboyhayes (2014-06-13 14:13:27+00:00)
Title: Support asset revving at the Loader level

http://www.html5gamedevs.com/topic/7128-phaser-and-asset-revving/ - Adding the ability to specify an asset revving mapping to phaser, so that the content is automatically mapped to revved versions of the assets if supplied, and if it isn't supplied, then to fall back to existing behaviour. If a mapping is provided, but the mapping for the given url cannot be found, then fall back to existing behaviour.

Assets are loaded like:
```javascript
myGame.load.audio('default-background-music', 'audio/music/Default.mp3');
myGame.load.atlasJSONArray('texts', 'img/' + resolution +'/dialogues/texts.png', 'img/' + resolution + '/dialogues/texts.json');
myGame.load.atlasJSONArray('hint', 'img/' + resolution +'/animations/hints/tile-hint.png', 'img/' + resolution +'/animations/hints/tile-hint.json');
```
And supporting revving would be to take a mapping of files, and set the loader's revvingMapping to this mapping:
```javascript
myGame.load.revvingMapping = JSON.parse('{"audio/music/Default.mp3":"revved/audio/music/Default.abc123ef.mp3","img/sd/dialogues/texts.png":"revved/img/sd/dialogues/texts.fed456ba.png","img/sd/dialogues/texts.json":"revved/img/sd/dialogues/texts.123bdc59.json"}');
myGame.load.audio('default-background-music', 'audio/music/Default.mp3');
myGame.load.atlasJSONArray('texts', 'img/' + resolution +'/dialogues/texts.png', 'img/' + resolution + '/dialogues/texts.json');
myGame.load.atlasJSONArray('hint', 'img/' + resolution +'/animations/hints/tile-hint.png', 'img/' + resolution +'/animations/hints/tile-hint.json');
```
Or alternatively, the revving mapping could have been provided by the distributor, through an API, and this is used here instead.
```javascript
myGame.load.revvingMapping = myDistributorLibrary.getRevvingMapping();
myGame.load.audio('default-background-music', 'audio/music/Default.mp3');
myGame.load.atlasJSONArray('texts', 'img/' + resolution +'/dialogues/texts.png', 'img/' + resolution + '/dialogues/texts.json');
myGame.load.atlasJSONArray('hint', 'img/' + resolution +'/animations/hints/tile-hint.png', 'img/' + resolution +'/animations/hints/tile-hint.json');
```