#

API Docs for: 1.6.0
Show: Inherited Protected Private Deprecated

# SpriteBatch Class

Defined in: `src/pixi/display/SpriteBatch.js:5`
Module: PIXI

The SpriteBatch class is a really fast version of the DisplayObjectContainer built solely for speed, so use when you need a lot of sprites or particles. And it's extremely easy to use :

var container = new PIXI.SpriteBatch();

stage.addChild(container);

for(var i = 0; i < 100; i++) { var sprite = new PIXI.Sprite.fromImage("myImage.png"); container.addChild(sprite); } And here you have a hundred sprites that will be renderer at the speed of light

## Constructor

### `SpriteBatch`

(

- `texture`

)

Defined in `src/pixi/display/SpriteBatch.js:5`

#### Parameters:

- `texture` Texture

- Index
- Methods

## Item Index

### Methods

- _renderCanvas
- _renderWebGL

## Methods

### `_renderCanvas`

(

- `renderSession`

)
private

Defined in `src/pixi/display/SpriteBatch.js:88`

Renders the object using the Canvas renderer

#### Parameters:

- `renderSession` RenderSession

### `_renderWebGL`

(

- `renderSession`

)
private

Defined in `src/pixi/display/SpriteBatch.js:64`

Renders the object using the WebGL renderer

#### Parameters:

- `renderSession` RenderSession