@openusd-wasm/utils
v0.0.9
Published
Shared OpenUSD WebAssembly utilities for asset resolution and USDZ packaging workflows.
Readme
@openusd-wasm/utils
Shared utilities for browser and worker OpenUSD workflows backed by
@openusd-wasm/pxr.
import { toLayerRelativeAssetPath } from '@openusd-wasm/utils'
refs.AddReference(toLayerRelativeAssetPath('assets/gearbox.usdz'), '')Asset References
When generating USDA files that reference assets written next to the layer,
author explicit layer-relative asset paths. OpenUSD treats
@assets/model.usdz@ as a search-path asset, while @./assets/model.usdz@
is anchored to the current layer directory and packages without transient
0/model.usdz remap warnings.
Asset Resolution
autoResolveAssetFiles and autoResolveTextureFiles scan USD references and
metadata, fetch same-origin relative assets, and return virtual filesystem
entries that can be written next to the root layer before opening or packaging
with OpenUSD.
extractPackageEntries, findPackageRootLayer, createPackageTextureResolver,
and createTextureResolverFromEntries help inspect USDZ packages already
written to the pxr virtual filesystem via pxr.Sdf.ZipFile, then map packaged
image entries to object URLs.
