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
|
Adds the display-object to the batch geometry. |
|
| PIXI.Geometry |
This should wrap up the batch geometry in a |
|
|
|
|
|
Public Methods
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).
| Name | Type | Description |
|---|---|---|
| displayObject | PIXI.DisplayObject | |
| batch | object |
the batch |
build() → {PIXI.Geometry}
This should wrap up the batch geometry in a PIXI.Geometry object.
| Type | Description |
|---|---|
| PIXI.Geometry |
batch geometry |
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.
| Name | Type | Attributes | Description |
|---|---|---|---|
| verticesBatched | number | ||
| indiciesBatched | number |
<optional> |
optional when display-object's don't use a index buffer |
release(geom: PIXI.Geometry) → {}
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 |