AjaxRequest Class
A wrapper for ajax requests to be handled cross browser
Constructor
AjaxRequest
()
Item Index
Methods
bind
()
A polyfill for Function.prototype.bind
cancelAnimationFrame
()
A polyfill for cancelAnimationFrame
canUseNewCanvasBlendModes
()
Boolean
Checks whether the Canvas BlendModes are supported by the current browser
Returns:
Boolean:
whether they are supported
getNextPowerOfTwo
(
Number
-
number
Given a number, this function returns the closest number that is a power of two this function is taken from Starling Framework as its pretty neat ;)
Parameters:
-
number
Number
Returns:
Number:
the closest number that is a power of two
hex2rgb
(
-
hex
Converts a hex color number to an [R, G, B] array
Parameters:
-
hex
Number
requestAnimationFrame
()
A polyfill for requestAnimationFrame You can actually use both requestAnimationFrame and requestAnimFrame, you will still benefit from the polyfill
rgb2hex
(
-
rgb
Converts a color as an [R, G, B] array to a hex number
Parameters:
-
rgb
Array