DriftTexture · function

internTile

Give this tile a slot, reusing the one its content already has.

Explained in DriftTexture.

function internTile(index: TileIndex, hash: string, bytes: Uint8Array): number
import { internTile } from '@driftengine/texture';

Parameters

ParameterTypeDescription
indexTileIndex
hashstring
bytesUint8Array

In depth

Returns the slot. Two calls with identical content return the same slot and store one copy, which is the whole of the deduplication.