new AjaxRequest()
A wrapper for ajax requests to be handled cross browser
- Source - pixi/utils/Utils.js, line 108
Methods
-
bind()
-
A polyfill for Function.prototype.bind
- Source - pixi/utils/Utils.js, line 74
-
cancelAnimationFrame()
-
A polyfill for cancelAnimationFrame
- Source - pixi/utils/Utils.js, line 20
-
canUseNewCanvasBlendModes() → {Boolean}
-
Checks whether the Canvas BlendModes are supported by the current browser
Returns:
Boolean -whether they are supported
- Source - pixi/utils/Utils.js, line 168
-
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:
Name Type Description number
Number -
Returns:
Number -the closest number that is a power of two
- Source - pixi/utils/Utils.js, line 189
-
hex2rgb(hex)
-
Converts a hex color number to an [R, G, B] array
Parameters:
Name Type Description hex
Number -
- Source - pixi/utils/Utils.js, line 54
-
isPowerOfTwo(width, height) → {Boolean}
-
checks if the given width and height make a power of two texture
Parameters:
Name Type Description width
Number -
height
Number -
Returns:
Boolean -- Source - pixi/utils/Utils.js, line 209
-
requestAnimationFrame()
-
A polyfill for requestAnimationFrame You can actually use both requestAnimationFrame and requestAnimFrame, you will still benefit from the polyfill
- Source - pixi/utils/Utils.js, line 12
-
rgb2hex(rgb)
-
Converts a color as an [R, G, B] array to a hex number
Parameters:
Name Type Description rgb
Array -
- Source - pixi/utils/Utils.js, line 64