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): numberimport { acquirePage } from '@driftengine/texture';Parameters
| Parameter | Type | Description |
|---|---|---|
cache | PageCache | |
hash | string |
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.