Function: sortTrianglesByDepth()
ts
function sortTrianglesByDepth(centroids, modelView, order?): Uint32Array;Experimental
Triangle draw order, farthest first. centroids holds 3 floats per triangle in the mesh's local space (NaN: invalid, drawn first); modelView is the column-major model-view matrix (only its third row, the view-space z, is read). Returns order (triangle indices).
Parameters
| Parameter | Type |
|---|---|
centroids | Float32Array |
modelView | ArrayLike<number> |
order | Uint32Array |
Returns
Uint32Array