Renderer · interface

ScatterHandle

An instanced batch on the device, held by a consumer and handed back.

Explained in Hello world.

interface ScatterHandle
import type { ScatterHandle } from '@driftengine/core';

In depth

The second nominal type this surface hit, and for the same reason as MeshHandle. InstancedMesh holds WebGLBuffers in private fields, which makes it nominal: no WebGPU object can ever satisfy it however identical its shape. The privacy is right — it is what keeps a VAO out of a consumer's reach — so the surface describes the handle instead.

A consumer gets one from createScatter and passes it to drawScatter and uploadScatter. Passing one backend's handle to the other is a caller error.