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
geometry
Object<string, string>
instanceBuilder
Shader
shader
State
state

Public Properties


geometry InstancedRenderer.ts:342
geometry: Geometry

the geometry style used to render the display-objects

instanceBuilder InstancedRenderer.ts:342
instanceBuilder: Object<string, string>

an object mapping display-object properties holding "instance attributes" from their attribute name.

shader InstancedRenderer.ts:342
shader: Shader

the shader used to render display-objects

state InstancedRenderer.ts:342
state: State

the WebGL state used to run the shader


Powered by webdoc!