Renderer · function
createMeshInstances
Allocate both arrays at capacity, empty.
Explained in Hello world.
function createMeshInstances(capacity: number): MeshInstancesimport { createMeshInstances } from '@driftengine/core';Parameters
| Parameter | Type | Description |
|---|---|---|
capacity | number |
In depth
Allocated once and rewritten in place, never per frame — the arrays are the caller's to fill and the count is the caller's to set, which is what keeps a frame that redraws a batch allocation-free.