Skip to content

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 ​

ParameterTypeDescription
facesFace3D[]The mesh's faces.
materialResolvedMaterialThe resolved material supplying the base colour and shading mode.

Returns ​

Float32Array

Interleaved position, normal, colour and UV data, VERTEX_FLOATS per vertex.