Model loading · function

dtexTileBytes

The bytes of one tile, by where it is rather than by its number.

Explained in Importing models.

function dtexTileBytes(material: DtexMaterial, tx: number, ty: number): Uint8Array | null
import { dtexTileBytes } from '@driftengine/assets';

Parameters

ParameterTypeDescription
materialDtexMaterial
txnumber
tynumber

In depth

The table is in the grid's order — across a row, then down — so this is an index and a subarray. It is here rather than left to a caller because the order is a format rule, and a caller working it out again is a second place for it to be wrong.