Model loading · function

drftToGlb

Write asset as a glTF 2.0 binary.

Explained in Importing models.

function drftToGlb(asset: DrftAsset, options?: GlbExportOptions): GlbExport
import { drftToGlb } from '@driftengine/assets';

Parameters

ParameterTypeDescription
assetDrftAsset
options?GlbExportOptions

In depth

Every MESH becomes one glTF mesh in the same order, so the ordinals that materials, morphs, instance groups and regions name survive. drft bake reads the result back to an equivalent .drft; docs/FORMAT.md §3.4 lists what is exact, what rounds, and what is not carried.