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): numberimport { internTile } from '@driftengine/texture';Parameters
| Parameter | Type | Description |
|---|---|---|
index | TileIndex | |
hash | string | |
bytes | Uint8Array |
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.