Renderer · function

fillSplatTiles

Every splat written into the list of each tile it touches, in the order the splats are given.

Explained in Hello world.

function fillSplatTiles(bins: ArrayLike<number>, count: number, width: number, height: number, offsets: Uint32Array, cursors: Uint32Array, lists: Uint32Array, pairs?:
import { fillSplatTiles } from '@driftengine/core';

Parameters

ParameterTypeDescription
binsArrayLike<number>
countnumber
widthnumber
heightnumber
offsetsUint32Array
cursorsUint32Array
listsUint32Array
pairs?{ readonly offsets: Uint32Array; readonly pairOf: Uint32Array; }

In depth

cursors is where each tile has got to and starts as a copy of offsets — it cannot be the offsets themselves, or the second splat of a tile overwrites the first's offset and every later tile's list starts in the wrong place.