PIXI.IInstancedRendererOptions
interface IInstancedRendererOptions
This options define how display-objects are rendered by the instanced renderer.
NOTE:
-
Make sure your instanceBuilder is in the order you want attributes to be packed in the same buffer. Also, make sure that floats are aligned at 4-byte boundaries and shorts are aligned at 2-byte boundaries.
-
PixiJS Bug: Make sure the first attribute is not instanced.
{
instanceBuilder: {
aVertexPosition: '_vertexData'
},
geometry: new PIXI.Geometry()
.addAttribute('aVertexPosition', null, 2, false, TYPES.FLOAT, 0, 0, false)
.addAttribute('aWorldTransform', null, 2, false, TYPES.FLOAT, 0, 0, true)
shader: new PIXI.Shader(<vertexShaderSrc>, <fragmentShaderSrc>, <uniformData>),
state: PIXI.State.for2d() // that's the default
}
Summary
Properties from IInstancedRendererOptions
Geometry |
|
Object<string, string> |
|
Shader |
|
State |
|
Public Properties
geometry: Geometry
the geometry style used to render the display-objects
instanceBuilder: Object<string, string>
an object mapping display-object properties holding "instance attributes" from their attribute name.