mirror of
https://github.com/wassname/phaser.git
synced 2026-07-27 11:25:30 +08:00
Updated doc files.
This commit is contained in:
@@ -75,18 +75,6 @@ Phaser.Utils = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns true if the object is an Array, otherwise false.
|
||||
* @method Phaser.Utils.isArray
|
||||
* @param {object} obj - The object to inspect.
|
||||
* @return {boolean} - true if the object is an array, otherwise false.
|
||||
*/
|
||||
isArray: function (obj) {
|
||||
|
||||
return toString.call(obj) === "[object Array]";
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* This is a slightly modified version of jQuery.isPlainObject. A plain object is an object whose internal class property is [object Object].
|
||||
* @method Phaser.Utils.isPlainObject
|
||||
@@ -209,22 +197,10 @@ Phaser.Utils = {
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts a hex color number to an [R, G, B] array
|
||||
*
|
||||
* @param {number} hex
|
||||
* @return {array}
|
||||
*/
|
||||
function HEXtoRGB(hex) {
|
||||
return [(hex >> 16 & 0xFF) / 255, ( hex >> 8 & 0xFF) / 255, (hex & 0xFF)/ 255];
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a hex color number to an [R, G, B] array
|
||||
*
|
||||
* @method hex2rgb
|
||||
* @param hex {Number}
|
||||
*/
|
||||
PIXI.hex2rgb = function hex2rgb(hex) {
|
||||
return [(hex >> 16 & 0xFF) / 255, ( hex >> 8 & 0xFF) / 255, (hex & 0xFF)/ 255];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user