mirror of
https://github.com/wassname/phaser.git
synced 2026-07-17 01:30:32 +08:00
Adding docs.
This commit is contained in:
+23
-17
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user