Model loading · function
drftToGlb
Write asset as a glTF 2.0 binary.
Explained in Importing models.
function drftToGlb(asset: DrftAsset, options?: GlbExportOptions): GlbExportimport { drftToGlb } from '@driftengine/assets';Parameters
| Parameter | Type | Description |
|---|---|---|
asset | DrftAsset | |
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.