DriftTexture · function

acquirePage

The slot holding this tile's page, acquiring one if it is not held. -1 where none can be given.

Explained in DriftTexture.

function acquirePage(cache: PageCache, hash: string): number
import { acquirePage } from '@driftengine/texture';

Parameters

ParameterTypeDescription
cachePageCache
hashstring

In depth

Acquiring a hash that is already here returns the same slot and takes no page from anybody: the commonest call by far, and the one that must not evict.