IBatchGeometryFactory

interface IBatchGeometryFactory

This interface defines the methods you need to implement to creating your own batch geometry factory.

The constructor of an implementation should take only one argument - the batch renderer.

Summary


Methods from IBatchGeometryFactory

append(displayObject: PIXI.DisplayObject, batch: object)

Adds the display-object to the batch geometry.

PIXI.Geometry
build()

This should wrap up the batch geometry in a PIXI.Geometry object.

init(verticesBatched: number, indiciesBatched: number)
release(geom: PIXI.Geometry)

Public Methods


append BatchGeometryFactory.ts:116
append(displayObject: PIXI.DisplayObject, batch: object) → {}

Adds the display-object to the batch geometry.

If the display-object's shader also uses textures (in uSamplers uniform), then it will be given a texture-ID to get the texture from the uSamplers array. If it uses multiple textures, then the texture-ID is an array of indices into uSamplers. The texture-attrib passed to the batch renderer sets the name of the texture-ID attribute (defualt is aTextureId).

Parameters:
Name Type Description
displayObject PIXI.DisplayObject
batch object

the batch

build BatchGeometryFactory.ts:130
build() → {PIXI.Geometry}

This should wrap up the batch geometry in a PIXI.Geometry object.

Returns:
Type Description
PIXI.Geometry

batch geometry

init BatchGeometryFactory.ts:106
init(verticesBatched: number, indiciesBatched: number) → {}

Called before the batch renderer starts feeding the display-objects. This can be used to pre-allocated space for the batch geometry.

Parameters:
Name Type Attributes Description
verticesBatched number
indiciesBatched number

<optional>

optional when display-object's don't use a index buffer

release BatchGeometryFactory.ts:138
release(geom: PIXI.Geometry) → {}

This is used to return a batch geometry so it can be pooled and reused in a future build() call.

Parameters:
Name Type Description
geom PIXI.Geometry

Powered by webdoc!