Adding docs.

This commit is contained in:
Richard Davey
2013-10-01 15:01:46 +01:00
parent fa15f8015d
commit 305b12d76b
64 changed files with 6268 additions and 2682 deletions
+23 -17
View File
@@ -1,7 +1,7 @@
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
* @module Phaser.Utils
*/
@@ -13,15 +13,15 @@
Phaser.Utils = {
/**
* Javascript string pad
* http://www.webtoolkit.info/
* pad = the string to pad it out with (defaults to a space)
* Javascript string pad ({@link http://www.webtoolkit.info/})
* pad = the string to pad it out with (defaults to a space)<br>
* dir = 1 (left), 2 (right), 3 (both)
* @method pad
* @param {string} str the target string
* @param {number} pad the string to pad it out with (defaults to a space)
* @param {number} len
* @param {number} [dir=3] the direction dir = 1 (left), 2 (right), 3 (both)
* @param {string} str - The target string.
* @param {number} len - Description.
* @param {number} pad - the string to pad it out with (defaults to a space).
* @param {number} [dir=3] the direction dir = 1 (left), 2 (right), 3 (both).
* @return {string}
**/
pad: function (str, len, pad, dir) {
@@ -53,10 +53,11 @@ Phaser.Utils = {
},
/**
* This is a slightly modified version of jQuery.isPlainObject
/**
* This is a slightly modified version of jQuery.isPlainObject.
* @method isPlainObject
* @param {object} obj
* @param {object} obj - Description.
* @return {bool} - Description.
*/
isPlainObject: function (obj) {
@@ -87,12 +88,17 @@ Phaser.Utils = {
return true;
},
/**
* This is a slightly modified version of jQuery.extend (http://api.jquery.com/jQuery.extend/)
// deep, target, objects to copy to the target object
// This is a slightly modified version of {@link http://api.jquery.com/jQuery.extend/|jQuery.extend}
// deep (boolean)
// target (object to add to)
// objects ... (objects to recurse and copy from)
/**
* This is a slightly modified version of {@link http://api.jquery.com/jQuery.extend/|jQuery.extend}
* @method extend
* @param {bool} [deep] If true, the merge becomes recursive (aka. deep copy).
* @param {object} target The object to add to
* @param {object} objets Objects to recurse and copy from
* @return {Description} Description.
*/
extend: function () {
@@ -173,7 +179,7 @@ Phaser.Utils = {
* Converts a hex color number to an [R, G, B] array
*
* @method HEXtoRGB
* @param {Number} hex
* @param {number} hex
* @return {array}
*/
function HEXtoRGB(hex) {