Documentation / @ripl/3d / triangulateFacesFlat
Function: triangulateFacesFlat() ​
triangulateFacesFlat(
faces,material):Float32Array
Defined in: 3d/src/core/shape.ts:1011
Flattens faces into the interleaved vertex buffer a GPU backend uploads.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
faces | Face3D[] | The mesh's faces. |
material | ResolvedMaterial | The resolved material supplying the base colour and shading mode. |
Returns ​
Float32Array
Interleaved position, normal, colour and UV data, VERTEX_FLOATS per vertex.