Class: BatchSystem

PIXI.systems.BatchSystem

System plugin to the renderer to manage batching.

new PIXI.systems.BatchSystem (renderer)

Name Type Description
renderer PIXI.Renderer

The renderer this System works for.

Extends

Members

currentRenderer PIXI.ObjectRenderer

The currently active ObjectRenderer.

emptyRenderer PIXI.ObjectRenderer

An empty renderer.

The renderer this manager works for.

Methods

boundArray (texArray, boundTextures, batchId, maxTextures)

Assigns batch locations to textures in array based on boundTextures state. All textures in texArray should have _batchEnabled = _batchId, and their count should be less than maxTextures.

Name Type Description
texArray PIXI.BatchTextureArray

textures to bound

boundTextures Array.<PIXI.BaseTexture>

current state of bound textures

batchId number

marker for _batchEnabled param of textures in texArray

maxTextures number

number of texture locations to manipulate

copyBoundTextures (arr, maxTextures)

Handy function for batch renderers: copies bound textures in first maxTextures locations to array sets actual _batchLocation for them

Name Type Description
arr
maxTextures

destroy () inherited

Generic destroy methods to be overridden by the subclass

This should be called if you wish to do some custom rendering It will basically render anything that may be batched up such as sprites

Reset the system to an empty renderer

setObjectRenderer (objectRenderer)

Changes the current renderer to the one given in parameter

Name Type Description
objectRenderer PIXI.ObjectRenderer

The object renderer to use.