Skip to content

Function: depthOrder() ​

ts
function depthOrder(x, y, z, count, k, order, scratch?): Uint32Array;

Experimental

Write into order[0..count) the point indices sorted back to front (farthest first: ascending view depth, see viewDepthCoefficients). Points with a non-finite coordinate go first (they are not drawn). Stable: equal depths keep their data order.

Parameters ​

ParameterType
xArrayLike<number>
yArrayLike<number>
zArrayLike<number> | null
countnumber
kreadonly [number, number, number, number]
orderUint32Array
scratchDepthSortScratch

Returns ​

Uint32Array

Released under the MIT License.