PIXI.BatchSystem

class BatchSystem implements PIXI.ISystem

System plugin to the renderer to manage batching.

Constructor


new PIXI.BatchSystem(renderer: PIXI.Renderer) → {}
Parameters:
Name Type Description
renderer PIXI.Renderer

The renderer this System works for.

Summary


Properties from BatchSystem

PIXI.ObjectRenderer
currentRenderer

The currently active ObjectRenderer.

PIXI.ObjectRenderer
emptyRenderer

An empty renderer.

Methods from BatchSystem

void
boundArray(texArray: PIXI.BatchTextureArray, boundTextures: Array<PIXI.BaseTexture>, batchId: number, maxTextures: number)
void
copyBoundTextures(arr: PIXI.BaseTexture[], maxTextures: number)
void
flush()
void
reset()

Reset the system to an empty renderer

void
setObjectRenderer(objectRenderer: PIXI.ObjectRenderer)

Public Properties


currentRenderer BatchSystem.ts:17
currentRenderer: PIXI.ObjectRenderer

The currently active ObjectRenderer.

emptyRenderer BatchSystem.ts:14
emptyRenderer: PIXI.ObjectRenderer

An empty renderer.

Public Methods


boundArray BatchSystem.ts:83
boundArray(texArray: PIXI.BatchTextureArray, boundTextures: Array<PIXI.BaseTexture>, batchId: number, maxTextures: number) → {void}

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.

Parameters:
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

Returns:
Type Description
void
copyBoundTextures BatchSystem.ts:63
copyBoundTextures(arr: PIXI.BaseTexture[], maxTextures: number) → {void}

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

Parameters:
Name Type Description
arr PIXI.BaseTexture[]

arr copy destination

maxTextures number

number of copied elements

Returns:
Type Description
void
flush BatchSystem.ts:48
flush() → {void}

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

Returns:
Type Description
void
reset BatchSystem.ts:57
reset() → {void}

Reset the system to an empty renderer

Returns:
Type Description
void
setObjectRenderer BatchSystem.ts:31
setObjectRenderer(objectRenderer: PIXI.ObjectRenderer) → {void}

Changes the current renderer to the one given in parameter

Parameters:
Name Type Description
objectRenderer PIXI.ObjectRenderer

The object renderer to use.

Returns:
Type Description
void

Powered by webdoc!