Skip to content

Commit

Permalink
Explicitly paused Timer continues if you un-focus and focus the brows…
Browse files Browse the repository at this point in the history
…er window (thanks georgiee)

Added TimerEvent.pendingDelete and checks in Timer.update, so that removing an event in a callback no longer throws an exception (thanks georgiee)
Fixed TypeScript defs on lines 1741-1748 (thanks wombatbuddy)
Added SAT.js to TypeScript definition. Now compiles properly.
Added missing Line.js to the Grunt file.
Tilemap#paste diffX and diffY equations changed, fixed issue phaserjs#393 (thanks brejep)
Added missing return value in Body.hitLeft and hitRight, fixes issue phaserjs#398 (thanks ram64).
Fixed easing tween example case. Issue phaserjs#379 (thanks wesleywerner)
Removed SAT.js UMD wrapped, fixes issue phaserjs#361 (thanks luizbills)
Removed inContact check from Body.separate.
Fixed Tilemap docs (wrongly pointed to Tileset methods)
  • Loading branch information
photonstorm committed Feb 12, 2014
1 parent d9323de commit 0641170
Show file tree
Hide file tree
Showing 175 changed files with 6,106 additions and 5,070 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Bug Fixes:
* Fixed easing tween example case. Issue #379 (thanks wesleywerner)
* Removed SAT.js UMD wrapped, fixes issue #361 (thanks luizbills)
* Removed inContact check from Body.separate.
* Fixed Tilemap docs (wrongly pointed to Tileset methods)


See the full Change Log for all the 1.1.4 updates and API changes (as there were a lot of them!)
Expand Down
90 changes: 64 additions & 26 deletions build/phaser.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* Phaser - http://www.phaser.io
*
* v1.1.5 - Built at: Wed Feb 12 2014 15:20:51
* v1.1.5 - Built at: Wed Feb 12 2014 15:32:36
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
Expand Down Expand Up @@ -43097,14 +43097,49 @@ Phaser.Tilemap = function (game, key) {
return;
}

/**
* @property {number} width - The width of the map (in tiles).
*/
this.width = data.width;

/**
* @property {number} height - The height of the map (in tiles).
*/
this.height = data.height;

/**
* @property {number} tileWidth - The base width of the tiles in the map (in pixels).
*/
this.tileWidth = data.tileWidth;

/**
* @property {number} tileHeight - The base height of the tiles in the map (in pixels).
*/
this.tileHeight = data.tileHeight;

/**
* @property {string} orientation - The orientation of the map data (as specified in Tiled), usually 'orthogonal'.
*/
this.orientation = data.orientation;

/**
* @property {number} version - The version of the map data (as specified in Tiled, usually 1).
*/
this.version = data.version;

/**
* @property {object} properties - Map specific properties as specified in Tiled.
*/
this.properties = data.properties;

/**
* @property {number} widthInPixels - The width of the map in pixels based on width * tileWidth.
*/
this.widthInPixels = data.widthInPixels;

/**
* @property {number} heightInPixels - The height of the map in pixels based on height * tileHeight.
*/
this.heightInPixels = data.heightInPixels;

/**
Expand Down Expand Up @@ -43149,13 +43184,13 @@ Phaser.Tilemap = function (game, key) {
this._results = [];

/**
* @property {number} _tempA - Internal var.
* @property {number} _tempA - Internal cache var.
* @private
*/
this._tempA = 0;

/**
* @property {number} _tempB - Internal var.
* @property {number} _tempB - Internal cache var.
* @private
*/
this._tempB = 0;
Expand Down Expand Up @@ -43210,7 +43245,7 @@ Phaser.Tilemap.prototype = {
format: Phaser.Tilemap.CSV,
data: data,
indexes: [],
dirty: true
dirty: true

});

Expand Down Expand Up @@ -43256,20 +43291,21 @@ Phaser.Tilemap.prototype = {

},

// Region? Remove tile from map data?
/*
createFromTiles: function (layer, tileIndex, key, frame, group) {

if (typeof group === 'undefined') { group = this.game.world; }

},
*/

/**
* Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is
* given it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way to
* configure Sprite properties from within the map editor. For example giving an object a property if alpha: 0.5 in the map editor will duplicate that when the
* Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically.
*
* @method Phaser.Tileset#createFromObjects
* @method Phaser.Tilemap#createFromObjects
* @param {string} name - The name of the Object Group to create Sprites from.
* @param {number} gid - The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents.
* @param {string} key - The Game.cache key of the image that this Sprite will use.
Expand Down Expand Up @@ -43314,8 +43350,10 @@ Phaser.Tilemap.prototype = {

/**
* Creates a new TilemapLayer object. By default TilemapLayers are fixed to the camera.
* The `layer` parameter is important. If you've created your map in Tiled then you can get this by looking in Tiled and looking at the Layer name.
* Or you can open the JSON file it exports and look at the layers[].name value. Either way it must match.
*
* @method Phaser.Tileset#createLayer
* @method Phaser.Tilemap#createLayer
* @param {number|string} layer - The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents.
* @param {number} [width] - The rendered width of the layer, should never be wider than Game.width. If not given it will be set to Game.width.
* @param {number} [height] - The rendered height of the layer, should never be wider than Game.height. If not given it will be set to Game.height.
Expand Down Expand Up @@ -43350,7 +43388,7 @@ Phaser.Tilemap.prototype = {
/**
* Gets the layer index based on the layers name.
*
* @method Phaser.Tileset#getIndex
* @method Phaser.Tilemap#getIndex
* @protected
* @param {array} location - The local array to search.
* @param {string} name - The name of the array element to get.
Expand All @@ -43373,7 +43411,7 @@ Phaser.Tilemap.prototype = {
/**
* Gets the layer index based on its name.
*
* @method Phaser.Tileset#getLayerIndex
* @method Phaser.Tilemap#getLayerIndex
* @param {string} name - The name of the layer to get.
* @return {number} The index of the layer in this tilemap, or null if not found.
*/
Expand All @@ -43386,7 +43424,7 @@ Phaser.Tilemap.prototype = {
/**
* Gets the tileset index based on its name.
*
* @method Phaser.Tileset#getTilesetIndex
* @method Phaser.Tilemap#getTilesetIndex
* @param {string} name - The name of the tileset to get.
* @return {number} The index of the tileset in this tilemap, or null if not found.
*/
Expand All @@ -43399,7 +43437,7 @@ Phaser.Tilemap.prototype = {
/**
* Gets the image index based on its name.
*
* @method Phaser.Tileset#getImageIndex
* @method Phaser.Tilemap#getImageIndex
* @param {string} name - The name of the image to get.
* @return {number} The index of the image in this tilemap, or null if not found.
*/
Expand All @@ -43412,7 +43450,7 @@ Phaser.Tilemap.prototype = {
/**
* Gets the object index based on its name.
*
* @method Phaser.Tileset#getObjectIndex
* @method Phaser.Tilemap#getObjectIndex
* @param {string} name - The name of the object to get.
* @return {number} The index of the object in this tilemap, or null if not found.
*/
Expand All @@ -43427,7 +43465,7 @@ Phaser.Tilemap.prototype = {
* If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it.
* If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.
*
* @method Phaser.Tileset#setTileIndexCallback
* @method Phaser.Tilemap#setTileIndexCallback
* @param {number|array} indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for.
* @param {function} callback - The callback that will be invoked when the tile is collided with.
* @param {object} callbackContext - The context under which the callback is called.
Expand Down Expand Up @@ -43458,7 +43496,7 @@ Phaser.Tilemap.prototype = {
* If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it.
* If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.
*
* @method Phaser.Tileset#setTileLocationCallback
* @method Phaser.Tilemap#setTileLocationCallback
* @param {number} x - X position of the top left of the area to copy (given in tiles, not pixels)
* @param {number} y - Y position of the top left of the area to copy (given in tiles, not pixels)
* @param {number} width - The width of the area to copy (given in tiles, not pixels)
Expand Down Expand Up @@ -43489,7 +43527,7 @@ Phaser.Tilemap.prototype = {
* Sets collision the given tile or tiles. You can pass in either a single numeric index or an array of indexes: [ 2, 3, 15, 20].
* The `collides` parameter controls if collision will be enabled (true) or disabled (false).
*
* @method Phaser.Tileset#setCollision
* @method Phaser.Tilemap#setCollision
* @param {number|array} indexes - Either a single tile index, or an array of tile IDs to be checked for collision.
* @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.
* @param {number|string|Phaser.TilemapLayer} [layer] - The layer to operate on. If not given will default to this.currentLayer.
Expand Down Expand Up @@ -43523,7 +43561,7 @@ Phaser.Tilemap.prototype = {
* Calling this with a start value of 10 and a stop value of 14 would set collision for tiles 10, 11, 12, 13 and 14.
* The `collides` parameter controls if collision will be enabled (true) or disabled (false).
*
* @method Phaser.Tileset#setCollisionBetween
* @method Phaser.Tilemap#setCollisionBetween
* @param {number} start - The first index of the tile to be set for collision.
* @param {number} stop - The last index of the tile to be set for collision.
* @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.
Expand Down Expand Up @@ -43554,7 +43592,7 @@ Phaser.Tilemap.prototype = {
* Sets collision on all tiles in the given layer, except for the IDs of those in the given array.
* The `collides` parameter controls if collision will be enabled (true) or disabled (false).
*
* @method Phaser.Tileset#setCollisionByExclusion
* @method Phaser.Tilemap#setCollisionByExclusion
* @param {array} indexes - An array of the tile IDs to not be counted for collision.
* @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.
* @param {number|string|Phaser.TilemapLayer} [layer] - The layer to operate on. If not given will default to this.currentLayer.
Expand Down Expand Up @@ -43583,7 +43621,7 @@ Phaser.Tilemap.prototype = {
* Sets collision values on a tile in the set.
* You shouldn't usually call this method directly, instead use setCollision, setCollisionBetween or setCollisionByExclusion.
*
* @method Phaser.Tileset#setCollisionByIndex
* @method Phaser.Tilemap#setCollisionByIndex
* @protected
* @param {number} index - The index of the tile on the layer.
* @param {boolean} [collides=true] - If true it will enable collision on the tile. If false it will clear collision values from the tile.
Expand Down Expand Up @@ -43626,7 +43664,7 @@ Phaser.Tilemap.prototype = {
/**
* Gets the TilemapLayer index as used in the setCollision calls.
*
* @method Phaser.Tileset#getLayer
* @method Phaser.Tilemap#getLayer
* @protected
* @param {number|string|Phaser.TilemapLayer} layer - The layer to operate on. If not given will default to this.currentLayer.
* @return {number} The TilemapLayer index.
Expand Down Expand Up @@ -43657,7 +43695,7 @@ Phaser.Tilemap.prototype = {
/**
* Internal function.
*
* @method Phaser.Tileset#calculateFaces
* @method Phaser.Tilemap#calculateFaces
* @protected
* @param {number} layer - The index of the TilemapLayer to operate on.
*/
Expand Down Expand Up @@ -43714,7 +43752,7 @@ Phaser.Tilemap.prototype = {
* Gets the tile above the tile coordinates given.
* Mostly used as an internal function by calculateFaces.
*
* @method Phaser.Tileset#getTileAbove
* @method Phaser.Tilemap#getTileAbove
* @param {number} layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer().
* @param {number} x - The x coordinate to get the tile from. In tiles, not pixels.
* @param {number} y - The y coordinate to get the tile from. In tiles, not pixels.
Expand All @@ -43734,7 +43772,7 @@ Phaser.Tilemap.prototype = {
* Gets the tile below the tile coordinates given.
* Mostly used as an internal function by calculateFaces.
*
* @method Phaser.Tileset#getTileBelow
* @method Phaser.Tilemap#getTileBelow
* @param {number} layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer().
* @param {number} x - The x coordinate to get the tile from. In tiles, not pixels.
* @param {number} y - The y coordinate to get the tile from. In tiles, not pixels.
Expand All @@ -43754,7 +43792,7 @@ Phaser.Tilemap.prototype = {
* Gets the tile to the left of the tile coordinates given.
* Mostly used as an internal function by calculateFaces.
*
* @method Phaser.Tileset#getTileLeft
* @method Phaser.Tilemap#getTileLeft
* @param {number} layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer().
* @param {number} x - The x coordinate to get the tile from. In tiles, not pixels.
* @param {number} y - The y coordinate to get the tile from. In tiles, not pixels.
Expand All @@ -43774,7 +43812,7 @@ Phaser.Tilemap.prototype = {
* Gets the tile to the right of the tile coordinates given.
* Mostly used as an internal function by calculateFaces.
*
* @method Phaser.Tileset#getTileRight
* @method Phaser.Tilemap#getTileRight
* @param {number} layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer().
* @param {number} x - The x coordinate to get the tile from. In tiles, not pixels.
* @param {number} y - The y coordinate to get the tile from. In tiles, not pixels.
Expand Down Expand Up @@ -43831,7 +43869,7 @@ Phaser.Tilemap.prototype = {
this.layers[layer].data[y][x].index = tile;
}

this.layers[layer].dirty = true;
this.layers[layer].dirty = true;
this.calculateFaces(layer);
}

Expand Down Expand Up @@ -43991,7 +44029,7 @@ Phaser.Tilemap.prototype = {
this.layers[layer].data[ diffY + tileblock[i].y ][ diffX + tileblock[i].x ].copy(tileblock[i]);
}

this.layers[layer].dirty = true;
this.layers[layer].dirty = true;
this.calculateFaces(layer);

},
Expand Down
2 changes: 1 addition & 1 deletion build/phaser.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Animation.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ <h1 class="page-title">Source: animation/Animation.js</h1>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/AnimationManager.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ <h1 class="page-title">Source: animation/AnimationManager.js</h1>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/AnimationParser.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ <h1 class="page-title">Source: animation/AnimationParser.js</h1>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/ArcadePhysics.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -1881,7 +1881,7 @@ <h1 class="page-title">Source: physics/arcade/ArcadePhysics.js</h1>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/BitmapData.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,7 @@ <h1 class="page-title">Source: gameobjects/BitmapData.js</h1>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/BitmapText.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ <h1 class="page-title">Source: gameobjects/BitmapText.js</h1>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/Body.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,7 @@ <h1 class="page-title">Source: physics/arcade/Body.js</h1>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/Button.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ <h1 class="page-title">Source: gameobjects/Button.js</h1>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/Cache.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,7 @@ <h1 class="page-title">Source: loader/Cache.js</h1>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/Camera.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ <h1 class="page-title">Source: core/Camera.js</h1>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/Canvas.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ <h1 class="page-title">Source: system/Canvas.js</h1>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
Loading

0 comments on commit 0641170

Please sign in to comment.