Model loading · function

encodeEtc2Chain

rgba at width by height, and each level below it to 1x1, as format blocks.

Explained in Importing models.

function encodeEtc2Chain(format: Etc2Format, rgba: Uint8Array, width: number, height: number, srgb: boolean): Uint8Array[]
import { encodeEtc2Chain } from '@driftengine/assets';

Parameters

ParameterTypeDescription
formatEtc2Format
rgbaUint8Array
widthnumber
heightnumber
srgbboolean