Class: SpriteBatch

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

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

Parameters:
Name Type Description
texture PIXI.Texture

-

Source - pixi/display/SpriteBatch.js, line 5
Phaser Copyright © 2012-2014 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-dev on Sat Nov 15 2014 19:55:23 GMT-0000 (GMT) using the DocStrap template.