InstancedRenderer
class InstancedRenderer extends PIXI.ObjectRenderer
InstancedRenderer
is an object-renderer for drawing meshes/shapes/display-objects
that have a common geometry and some "instanced" attributes.
Constructor
new InstancedRenderer(renderer: PIXI.Renderer, options: PIXI.IInstancedRendererOptions) → {}
Name | Type | Description |
---|---|---|
renderer | PIXI.Renderer |
the WebGL renderer to attach to |
options | PIXI.IInstancedRendererOptions |
the pipeline description |
Summary
Properties from InstancedRenderer
PIXI.Buffer |
The instance buffer holds all instanced attributes in an interleaved fashion. |
PIXI.Shader |
The shader used to draw all instances. |
PIXI.State |
The WebGL state required for using the shader. |
PIXI.Geometry |
The reference geometry specifying the "attribute style". |
Object<string, number> |
Object mapping (instanced) attribute IDs to their sizes in bytes. |
Object<string, string> |
|
Object<string, string> |
|
number |
The bytes used per instance/display-object. |
Array<PIXI.DisplayObject> |
Buffered display-objects |
number |
|
number |
Unique ID for this instance renderer. |
Methods from InstancedRenderer
void |
Flushes/draws all pending display-objects. |
void |
|
|
Properties inherited from ObjectRenderer
PIXI.Renderer |
The renderer this manager works for. |
Public Properties
_instanceBuffer: PIXI.Buffer
The instance buffer holds all instanced attributes in an interleaved fashion.
_state: PIXI.State = PIXI.State.for2d()
The WebGL state required for using the shader.
Protected Properties
protected _geometry: PIXI.Geometry
The reference geometry specifying the "attribute style".
protected _instanceAttribSizes: Object<string, number>
Object mapping (instanced) attribute IDs to their sizes in bytes.
protected _instanceAttribViews: Object<string, string>
Object mapping (instanced) attribute IDs to their data type views (i.e. uint32View
,
float32View
, uint8View
, etc. in PIXI.ViewableBuffer
).
protected _instanceBuilder: Object<string, string>
Maps display-object property names holding instanced attribute data to their attribute names.
protected _instanceSize: number
The bytes used per instance/display-object.
protected _objectBuffer: Array<PIXI.DisplayObject>
Buffered display-objects
protected _objectCount: number = 0
The number of display-objects buffered. This is different from the buffer's capacity
this._objectBuffer.length
.
protected instanceRendererID: number = undefined
Unique ID for this instance renderer.
Public Methods
flush() → {void}
Flushes/draws all pending display-objects.
Type | Description |
---|---|
void |
render(displayObject: PIXI.DisplayObject) → {void}
Name | Type | Description |
---|---|---|
displayObject | PIXI.DisplayObject |
Type | Description |
---|---|
void |
start() → {}