DriftTexture · const

CHANNEL_SEMANTICS

Every semantic, in the order a file stores them by.

Explained in DriftTexture.

const CHANNEL_SEMANTICS: readonly ChannelSemantic[]
import { CHANNEL_SEMANTICS } from '@driftengine/texture';

In depth

A name crosses a package boundary as a number, because @driftengine/drft is the container and knows nothing about what a channel means — a DTEX chunk stores (semanticIndex << 4) | component and would have to carry strings otherwise. The index is therefore part of the format: a semantic may be appended and none may be reordered or removed, or every file written before the change decodes its channels as something else. semantics.test.ts holds the order.