The .drft container · function

writeDrft

Bake a .drft into one ArrayBuffer.

Explained in The .drft container.

function writeDrft(source: DrftSource): ArrayBuffer
import { writeDrft } from '@driftengine/drft';

Parameters

ParameterTypeDescription
sourceDrftSource

In depth

Every payload lands 4-byte aligned, which is what lets the reader view the vertex data in place rather than copying it out.