#

API Docs for: 2.0.0
Show: Inherited Protected Private Deprecated

# AjaxRequest Class

Defined in: `src/pixi/utils/Utils.js:108`
Module: PIXI

A wrapper for ajax requests to be handled cross browser

## Constructor

### `AjaxRequest`

()

Defined in `src/pixi/utils/Utils.js:108`

- Index
- Methods

## Item Index

### Methods

- bind
- cancelAnimationFrame
- canUseNewCanvasBlendModes
- getNextPowerOfTwo
- hex2rgb
- requestAnimationFrame
- rgb2hex

## Methods

### `bind`

()

Defined in `src/pixi/utils/Utils.js:74`

A polyfill for Function.prototype.bind

### `cancelAnimationFrame`

()

Defined in `src/pixi/utils/Utils.js:20`

A polyfill for cancelAnimationFrame

### `canUseNewCanvasBlendModes`

() Boolean

Defined in `src/pixi/utils/Utils.js:168`

Checks whether the Canvas BlendModes are supported by the current browser

#### Returns:

Boolean:

whether they are supported

### `getNextPowerOfTwo`

(

- `number`

)
Number

Defined in `src/pixi/utils/Utils.js:189`

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`

)

Defined in `src/pixi/utils/Utils.js:54`

Converts a hex color number to an [R, G, B] array

#### Parameters:

- `hex` Number

### `requestAnimationFrame`

()

Defined in `src/pixi/utils/Utils.js:12`

A polyfill for requestAnimationFrame You can actually use both requestAnimationFrame and requestAnimFrame, you will still benefit from the polyfill

### `rgb2hex`

(

- `rgb`

)

Defined in `src/pixi/utils/Utils.js:64`

Converts a color as an [R, G, B] array to a hex number

#### Parameters:

- `rgb` Array