import { InstancedMesh } from '@driftengine/core';
Constructor
constructor(gl: WebGL2RenderingContext, base: MeshData, capacity: number)
| Parameter | Type | Description |
gl | WebGL2RenderingContext | |
base | MeshData | |
capacity | number | |
Methods
upload(gl: WebGL2RenderingContext, data: InstanceData): void
Upload placement. Called at load; scatter does not move once placed.
| Parameter | Type | Description |
gl | WebGL2RenderingContext | |
data | InstanceData | |
draw(gl: WebGL2RenderingContext, count: number): void
| Parameter | Type | Description |
gl | WebGL2RenderingContext | |
count | number | |
dispose(gl: WebGL2RenderingContext): void
| Parameter | Type | Description |
gl | WebGL2RenderingContext | |