Class: BatchRenderer


Renderer dedicated to drawing and batching sprites.

new PIXI.BatchRenderer (renderer) protected

Name Type Description
renderer PIXI.Renderer

The renderer this sprite batch works for.



geometryClass object

The class we use to create geometries. Please override it in constructor

Default Value:
  • PIXI.BatchGeometry

onlySprites Uint16Array

Holds the defualt indices of the geometry (quads) to draw

The renderer this manager works for.

shader PIXI.Shader

The default shaders that is used if a sprite doesn't have a more specific one. there is a shader for each number of textures that can be rendered. These shaders will also be generated on the fly as required.

shaderGenerator PIXI.BatchShaderGenerator

MultiTexture shader generator.

size number

The number of images in the SpriteRenderer before it flushes.


contextChange () overrides

Sets up the renderer context and necessary buffers.

Destroys the SpriteRenderer.

Renders the content and empties the current batch.

onPrerender ()

Called before the renderer starts rendering.

Renders the sprite object.

Name Type Description
sprite PIXI.Sprite

the sprite to render when using this spritebatch

Starts a new sprite batch.

Stops and flushes the current batch.