Updated docs - they now actually list the new body methods :)

This commit is contained in:
photonstorm
2014-02-21 15:37:26 +00:00
parent 7ee0c20bb3
commit e9e5bf9436
192 changed files with 51286 additions and 4396 deletions
+121 -7
View File
@@ -166,6 +166,10 @@
<a href="Phaser.Game.html">Game</a>
</li>
<li>
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
</li>
<li>
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
@@ -254,6 +258,38 @@
<a href="Phaser.Physics.Arcade.html">Arcade</a>
</li>
<li>
<a href="Phaser.Physics.Body.html">Body</a>
</li>
<li>
<a href="Phaser.Physics.CollisionGroup.html">CollisionGroup</a>
</li>
<li>
<a href="Phaser.Physics.ContactMaterial.html">ContactMaterial</a>
</li>
<li>
<a href="Phaser.Physics.InversePointProxy.html">InversePointProxy</a>
</li>
<li>
<a href="Phaser.Physics.Material.html">Material</a>
</li>
<li>
<a href="Phaser.Physics.PointProxy.html">PointProxy</a>
</li>
<li>
<a href="Phaser.Physics.Spring.html">Spring</a>
</li>
<li>
<a href="Phaser.Physics.World.html">World</a>
</li>
<li>
<a href="Phaser.Plugin.html">Plugin</a>
</li>
@@ -563,7 +599,7 @@ Phaser.BitmapData = function (game, key, width, height) {
Phaser.BitmapData.prototype = {
/**
* Updates the given objects so that they use this BitmapData as their texture.
* Updates the given objects so that they use this BitmapData as their texture. This will replace any texture they will currently have set.
*
* @method Phaser.BitmapData#add
* @param {Phaser.Sprite|Phaser.Sprite[]|Phaser.Image|Phaser.Image[]} object - Either a single Sprite/Image or an Array of Sprites/Images.
@@ -672,6 +708,7 @@ Phaser.BitmapData.prototype = {
/**
* Sets the color of the given pixel to the specified red, green and blue values.
*
* @method Phaser.BitmapData#setPixel
* @param {number} x - The X coordinate of the pixel to be set.
* @param {number} y - The Y coordinate of the pixel to be set.
@@ -686,7 +723,8 @@ Phaser.BitmapData.prototype = {
},
/**
* Get a color of a specific pixel.
* Get the color of a specific pixel.
*
* @param {number} x - The X coordinate of the pixel to get.
* @param {number} y - The Y coordinate of the pixel to get.
* @return {number} A native color value integer (format: 0xRRGGBB)
@@ -701,7 +739,8 @@ Phaser.BitmapData.prototype = {
},
/**
* Get a color of a specific pixel (including alpha value).
* Get the color of a specific pixel including its alpha value.
*
* @param {number} x - The X coordinate of the pixel to get.
* @param {number} y - The Y coordinate of the pixel to get.
* @return {number} A native color value integer (format: 0xAARRGGBB)
@@ -716,8 +755,9 @@ Phaser.BitmapData.prototype = {
},
/**
* Get pixels in array in a specific Rectangle.
* @param rect {Rectangle} The specific Rectangle.
* Gets all the pixels from the region specified by the given Rectangle object.
*
* @param {Phaser.Rectangle} rect - The Rectangle region to get.
* @return {array} CanvasPixelArray.
*/
getPixels: function (rect) {
@@ -726,15 +766,89 @@ Phaser.BitmapData.prototype = {
},
/**
* Copies the pixels from the source image to this BitmapData based on the given area and destination.
*
* @param {HTMLImage|string} source - The Image to draw. If you give a key it will try and find the Image in the Game.Cache.
* @param {Phaser.Rectangle} area - The Rectangle region to copy from the source image.
* @param {number} destX - The destination x coordinate to copy the image to.
* @param {number} destY - The destination y coordinate to copy the image to.
*/
copyPixels: function (source, area, destX, destY) {
this.context.drawImage(source, area.x, area.y, area.width, area.height, destX, destY, area.width, area.height);
if (typeof source === 'string')
{
source = this.game.cache.getImage(source);
}
if (source)
{
this.context.drawImage(source, area.x, area.y, area.width, area.height, destX, destY, area.width, area.height);
}
},
/**
* Draws the given image to this BitmapData at the coordinates specified. If you need to only draw a part of the image use BitmapData.copyPixels instead.
*
* @param {HTMLImage|string} source - The Image to draw. If you give a key it will try and find the Image in the Game.Cache.
* @param {number} destX - The destination x coordinate to draw the image to.
* @param {number} destY - The destination y coordinate to draw the image to.
*/
draw: function (source, destX, destY) {
if (typeof source === 'string')
{
source = this.game.cache.getImage(source);
}
if (source)
{
this.context.drawImage(source, 0, 0, source.width, source.height, destX, destY, source.width, source.height);
}
},
/**
* Draws the given image onto this BitmapData using an image as an alpha mask.
*
* @param {HTMLImage|string} source - The Image to draw. If you give a key it will try and find the Image in the Game.Cache.
* @param {HTMLImage|string} mask - The Image to use as the alpha mask. If you give a key it will try and find the Image in the Game.Cache.
*/
alphaMask: function (source, mask) {
var temp = this.context.globalCompositeOperation;
if (typeof mask === 'string')
{
mask = this.game.cache.getImage(mask);
}
if (mask)
{
this.context.drawImage(mask, 0, 0);
}
this.context.globalCompositeOperation = 'source-atop';
if (typeof source === 'string')
{
source = this.game.cache.getImage(source);
}
if (source)
{
this.context.drawImage(source, 0, 0);
}
this.context.globalCompositeOperation = temp;
},
/**
* If the game is running in WebGL this will push the texture up to the GPU if it's dirty.
* This is called automatically if the BitmapData is being used by a Sprite, otherwise you need to remember to call it in your render function.
*
* @method Phaser.BitmapData#render
*/
render: function () {
@@ -776,7 +890,7 @@ Phaser.BitmapData.prototype.constructor = Phaser.BitmapData;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Wed Feb 19 2014 05:26:20 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Fri Feb 21 2014 15:36:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>