DriftTexture · function

usableAt

What level this many received bytes supports.

Explained in DriftTexture.

function usableAt(bytesReceived: number, tileBytes: number, tileCount: number):
import { usableAt } from '@driftengine/texture';

Parameters

ParameterTypeDescription
bytesReceivednumber
tileBytesnumber
tileCountnumber

In depth

Levels rise monotonically with bytes, which is what lets a loader show something immediately and refine without ever going backwards.