The .drft container · const

CODEC_PNG

How a TEXS payload is encoded.

Explained in The .drft container.

const CODEC_PNG = 1
import { CODEC_PNG } from '@driftengine/drft';

In depth

The compressed three are decoded by createImageBitmap, which every target browser has, so carrying them costs no dependency and no decoder of ours. RAW is uncompressed RGBA8 for generated data and tests. KTX2 is reserved rather than defined: it is the right long-term answer and it needs a transcoder of some 200 KB, so it becomes an additive minor version once a game needs it rather than a cost every asset pays now.