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 | nullimport { dtexTileBytes } from '@driftengine/assets';Parameters
| Parameter | Type | Description |
|---|---|---|
material | DtexMaterial | |
tx | number | |
ty | number |
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.