Renderer · interface
MeshHandle
Geometry on the device, as something a consumer holds and hands back.
Explained in Hello world.
interface MeshHandleimport type { MeshHandle } from '@driftengine/core';In depth
Opaque on purpose, and the opacity is forced rather than chosen. Mesh has private
fields, which makes it nominal in TypeScript: no other type can ever satisfy it, however
identical its shape, so a WebGPU mesh cannot be a Mesh and the shared surface cannot
name one. That is not a flaw in Mesh — the privacy is what keeps WebGLBuffers out of
reach — it just means the surface has to describe the handle rather than the object.
A consumer receives one from createMesh and passes it to drawMesh. There is nothing to
read on it, which is the point: the backend that made it is the only thing that can.
Properties
| Name | Type | Description |
|---|---|---|
boundsreadonly | Bounds | |
completereadonly | boolean | Whether all of this mesh's geometry has reached the device.MoreTrue for every mesh Named here for the reason |