Skip to content

createRadixSort

createRadixSort(target): typeof radixSort

Creates a radix sort function specifically for sorting InstancedMesh2 instances. The sorting is based on the depth property of each InstancedRenderItem. This function dynamically adjusts for transparent materials by reversing the sort order if necessary.

Parameters

target: InstancedMesh2<object, BufferGeometry, any, Object3DEventMap>

The InstancedMesh2 instance that contains the instances to be sorted.

Returns

typeof radixSort

A radix sort function.

Defined in

utils/SortingUtils.ts:14