#

API Docs for: 1.6.0
Show: Inherited Protected Private Deprecated

# AjaxRequest Class

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

A wrapper for ajax requests to be handled cross browser

## Constructor

### `AjaxRequest`

()

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

- Index
- Methods

## Item Index

### Methods

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

## Methods

### `bind`

()

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

A polyfill for Function.prototype.bind

### `cancelAnimationFrame`

()

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

A polyfill for cancelAnimationFrame

### `canUseNewCanvasBlendModes`

() Boolean

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

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:179`

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:51`

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:61`

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

#### Parameters:

- `rgb` Array