
Base class for sprite-based rendering, ie vertices with textures.
Kind: global class
BooleanNumberNumberBooleanCreate the sprites batch.
| Param | Type | Description |
|---|---|---|
| [batchSpritesCount] | Number |
Internal buffers size, in sprites count (sprite = 4 vertices). Bigger value = faster rendering but more RAM. |
| [enableVertexColor] | Boolean |
If true (default) will support vertex color. |
| [enableNormals] | Boolean |
If true (not default) will support vertex normals. |
| [enableBinormals] | Boolean |
If true (not default) will support vertex binormals. |
| [enableTangents] | Boolean |
If true (not default) will support vertex tangents. |
Kind: instance property of SpriteBatchBase
BooleanGet if this sprite batch support vertex color.
Kind: instance property of SpriteBatchBase
Returns: Boolean - True if support vertex color.
Kind: instance property of SpriteBatchBase
NumberGet how many quads are currently in batch.
Kind: instance property of SpriteBatchBase
Returns: Number - Quads in batch count.
NumberGet how many quads this sprite batch can contain.
Kind: instance property of SpriteBatchBase
Returns: Number - Max quads count.
BooleanCheck if this batch is full.
Kind: instance property of SpriteBatchBase
Returns: Boolean - True if batch is full.
Kind: instance method of SpriteBatchBase
Kind: instance method of SpriteBatchBase
Add sprite or sprites to batch.
Kind: instance method of SpriteBatchBase
| Param | Type | Description |
|---|---|---|
| sprites | Sprite | Array.<Sprite> |
Sprite or multiple sprites to draw. |
| [transform] | Matrix |
Optional transformations to apply on sprite vertices. Won’t apply on static sprites. |
| [cullOutOfScreen] | Boolean |
If true, will cull sprites that are not visible in currently set rendering region. |