Renderer · function
buildSheets
Cover each sheet in cells no coarser than cellM.
Explained in Hello world.
function buildSheets<T extendsimport { buildSheets } from '@driftengine/core';Parameters
| Parameter | Type | Description |
|---|---|---|
sheets | readonly T[] | |
cellM | number | |
params | (sheet: T, out: Float32Array) => void |
In depth
Vertices are duplicated at cell boundaries rather than shared. That is safe here in a way it would not be in general: every displacement applied to this mesh is a pure function of the resting position, so two vertices at the same place move to the same place and the seam cannot open.
params is called once per sheet at build time — never per frame — and writes
the two floats each of that sheet's vertices carries.