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.
Methods
-
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 theuSamplers
array. If it uses multiple textures, then the texture-ID is an array of indices intouSamplers
. The texture-attrib passed to the batch renderer sets the name of the texture-ID attribute (defualt isaTextureId
).Name Type Description displayObject
PIXI.DisplayObject batch
object the batch
-
This should wrap up the batch geometry in a
PIXI.Geometry
object.Returns:
Type Description PIXI.Geometry batch geometry -
Called before the batch renderer starts feeding the display-objects. This can be used to pre-allocated space for the batch geometry.
Name Type Description verticesBatched
number indiciesBatched
number optional optional when display-object's don't use a index buffer
-
This is used to return a batch geometry so it can be pooled and reused in a future
build()
call.Name Type Description geom
PIXI.Geometry