These archived docs are for Phaser 2.4.6 Phaser 3 docs can be found on
Phaser CE docs can be found on the Phaser CE Documentation site.


PIXI. SpriteBatch

new SpriteBatch(texture)

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();


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

Name Type Description
texture PIXI.Texture


Source code: pixi/display/SpriteBatch.js (Line 5)