DriftTexture · function

overlayTiles

The distinct content hashes of the written tiles, into out. Returns how many.

Explained in DriftTexture.

function overlayTiles(overlay: Overlay, out: string[]): number
import { overlayTiles } from '@driftengine/texture';

Parameters

ParameterTypeDescription
overlayOverlay
outstring[]

In depth

Distinct, because an identical mark in two places is one thing to store. The same blast scorch on twenty crates is twenty tiles in memory — each is written in place and they diverge the moment anything else touches one — and one page to upload, which is where the cost actually is. Hashed exactly as a base tile is, by hashTile, so the two live in one address space.