Updated documentation.

This commit is contained in:
photonstorm
2013-11-28 15:57:09 +00:00
parent 8da9b67c18
commit f22159e257
193 changed files with 68905 additions and 93104 deletions
+77 -47
View File
@@ -54,6 +54,10 @@
<a href="Phaser.AnimationParser.html">AnimationParser</a>
</li>
<li>
<a href="Phaser.BitmapData.html">BitmapData</a>
</li>
<li>
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
@@ -138,6 +142,10 @@
<a href="Phaser.Events.html">Events</a>
</li>
<li>
<a href="Phaser.Filter.html">Filter</a>
</li>
<li>
<a href="Phaser.Frame.html">Frame</a>
</li>
@@ -302,6 +310,26 @@
<a href="Phaser.Text.html">Text</a>
</li>
<li>
<a href="Phaser.Tile.html">Tile</a>
</li>
<li>
<a href="Phaser.Tilemap.html">Tilemap</a>
</li>
<li>
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
</li>
<li>
<a href="Phaser.TilemapParser.html">TilemapParser</a>
</li>
<li>
<a href="Phaser.Tileset.html">Tileset</a>
</li>
<li>
<a href="Phaser.TileSprite.html">TileSprite</a>
</li>
@@ -310,6 +338,10 @@
<a href="Phaser.Time.html">Time</a>
</li>
<li>
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -356,6 +388,14 @@
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
</li>
@@ -394,20 +434,20 @@
* @constructor
* @param {number} x The horizontal position of this Point (default 0)
* @param {number} y The vertical position of this Point (default 0)
**/
*/
Phaser.Point = function (x, y) {
x = x || 0;
y = y || 0;
/**
* @property {number} x - The x coordinate of the point.
**/
* @property {number} x - The x coordinate of the point.
*/
this.x = x;
/**
* @property {number} y - The y coordinate of the point.
**/
* @property {number} y - The y coordinate of the point.
*/
this.y = y;
};
@@ -419,7 +459,7 @@ Phaser.Point.prototype = {
* @method Phaser.Point#copyFrom
* @param {any} source - The object to copy from.
* @return {Point} This Point object.
**/
*/
copyFrom: function (source) {
return this.setTo(source.x, source.y);
},
@@ -428,7 +468,7 @@ Phaser.Point.prototype = {
* Inverts the x and y values of this Point
* @method Phaser.Point#invert
* @return {Point} This Point object.
**/
*/
invert: function () {
return this.setTo(this.y, this.x);
},
@@ -439,7 +479,7 @@ Phaser.Point.prototype = {
* @param {number} x - The horizontal position of this point.
* @param {number} y - The vertical position of this point.
* @return {Point} This Point object. Useful for chaining method calls.
**/
*/
setTo: function (x, y) {
this.x = x;
@@ -454,7 +494,7 @@ Phaser.Point.prototype = {
* @param {number} x - The value to add to Point.x.
* @param {number} y - The value to add to Point.y.
* @return {Phaser.Point} This Point object. Useful for chaining method calls.
**/
*/
add: function (x, y) {
this.x += x;
@@ -469,7 +509,7 @@ Phaser.Point.prototype = {
* @param {number} x - The value to subtract from Point.x.
* @param {number} y - The value to subtract from Point.y.
* @return {Phaser.Point} This Point object. Useful for chaining method calls.
**/
*/
subtract: function (x, y) {
this.x -= x;
@@ -484,7 +524,7 @@ Phaser.Point.prototype = {
* @param {number} x - The value to multiply Point.x by.
* @param {number} y - The value to multiply Point.x by.
* @return {Phaser.Point} This Point object. Useful for chaining method calls.
**/
*/
multiply: function (x, y) {
this.x *= x;
@@ -499,7 +539,7 @@ Phaser.Point.prototype = {
* @param {number} x - The value to divide Point.x by.
* @param {number} y - The value to divide Point.x by.
* @return {Phaser.Point} This Point object. Useful for chaining method calls.
**/
*/
divide: function (x, y) {
this.x /= x;
@@ -559,32 +599,22 @@ Phaser.Point.prototype = {
*/
clone: function (output) {
if (typeof output === "undefined") { output = new Phaser.Point; }
if (typeof output === "undefined") { output = new Phaser.Point(); }
return output.setTo(this.x, this.y);
},
/**
* Copies the x and y properties from any given object to this Point.
* @method Phaser.Point#copyFrom
* @param {any} source - The object to copy from.
* @return {Point} This Point object.
**/
copyFrom: function (source) {
return this.setTo(source.x, source.y);
},
/**
* Copies the x and y properties from this Point to any given object.
* @method Phaser.Point#copyTo
* @param {any} dest - The object to copy to.
* @return {Object} The dest object.
**/
*/
copyTo: function(dest) {
dest[x] = this.x;
dest[y] = this.y;
dest.x = this.x;
dest.y = this.y;
return dest;
@@ -626,29 +656,29 @@ Phaser.Point.prototype = {
},
/**
* Calculates the length of the vector
* @method Phaser.Point#getMagnitude
* @return {number} the length of the vector
*/
* Calculates the length of the vector
* @method Phaser.Point#getMagnitude
* @return {number} the length of the vector
*/
getMagnitude: function() {
return Math.sqrt((this.x * this.x) + (this.y * this.y));
},
/**
* Alters the length of the vector without changing the direction
* @method Phaser.Point#getMagnitude
* @param {number} magnitude the desired magnitude of the resulting vector
* @return {Phaser.Point} the modified original vector
*/
* Alters the length of the vector without changing the direction
* @method Phaser.Point#getMagnitude
* @param {number} magnitude the desired magnitude of the resulting vector
* @return {Phaser.Point} the modified original vector
*/
setMagnitude: function(magnitude) {
return this.normalize().multiply(magnitude, magnitude);
},
/**
* Alters the vector so that its length is 1, but it retains the same direction
* @method Phaser.Point#normalize
* @return {Phaser.Point} the modified original vector
*/
* Alters the vector so that its length is 1, but it retains the same direction
* @method Phaser.Point#normalize
* @return {Phaser.Point} the modified original vector
*/
normalize: function() {
if(!this.isZero()) {
@@ -662,10 +692,10 @@ Phaser.Point.prototype = {
},
/**
* Determine if this point is at 0,0
* @method Phaser.Point#isZero
* @return {boolean} True if this Point is 0,0, otherwise false
*/
* Determine if this point is at 0,0
* @method Phaser.Point#isZero
* @return {boolean} True if this Point is 0,0, otherwise false
*/
isZero: function() {
return (this.x === 0 && this.y === 0);
},
@@ -674,7 +704,7 @@ Phaser.Point.prototype = {
* Returns a string representation of this object.
* @method Phaser.Point#toString
* @return {string} A string representation of the instance.
**/
*/
toString: function () {
return '[{Point (x=' + this.x + ' y=' + this.y + ')}]';
}
@@ -789,7 +819,7 @@ Phaser.Point.distance = function (a, b, round) {
return Phaser.Math.distance(a.x, a.y, b.x, b.y);
}
},
};
/**
* Rotates a Point around the x/y coordinates given to the desired angle.
@@ -809,7 +839,7 @@ Phaser.Point.rotate = function (a, x, y, angle, asDegrees, distance) {
if (asDegrees)
{
angle = Phaser.Math.radToDeg(angle);
angle = Phaser.Math.degToRad(angle);
}
// Get distance from origin (cx/cy) to this point
@@ -842,7 +872,7 @@ Phaser.Point.rotate = function (a, x, y, angle, asDegrees, distance) {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 07 2013 06:07:33 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>