Model loading · function

usdzToMeshes

Read a .usdz: a zip holding a .usda or a .usdc, plus whatever images it names.

Explained in Importing models.

function usdzToMeshes(buffer: ArrayBuffer): UsdResult
import { usdzToMeshes } from '@driftengine/assets';

Parameters

ParameterTypeDescription
bufferArrayBuffer

In depth

No inflate is passed, and that is a property of the format rather than an omission — a .usdz must store its entries uncompressed so they can be memory mapped, so an archive that deflates them is not a conforming .usdz and zip.ts says so by number.

A .usdc inside is refused rather than attempted. The binary crate format is specified and is a separate reader; half-reading it would be exactly the partial import tier 1 forbids.