@openusd-wasm/core
v0.0.9
Published
Community OpenUSD pxr WebAssembly core assets.
Readme
@openusd-wasm/core
Core WebAssembly assets for the community OpenUSD pxr bindings.
This package mirrors the role of @ffmpeg/core: it does not provide the
high-level API facade. It publishes the Emscripten JavaScript module and the
Wasm binary:
dist/openusd_pxr_wasm.js
dist/openusd_pxr_wasm.wasmBuild the assets from the workspace root with an official OpenUSD source checkout:
pnpm build:core -- --openusd-source-dir /path/to/OpenUSDConsumers normally use this package through @openusd-wasm/pxr.
import { PXR } from '@openusd-wasm/pxr'
const pxr = new PXR()
await pxr.load()@openusd-wasm/core/urls is safe to use from browser bundles, including
Next.js/Turbopack Client Components. When a bundler exposes emitted assets as
internal file:///_next/... URLs, this entry converts them back to URLs under
the current browser origin before @openusd-wasm/pxr loads the Emscripten
runtime.
The core runtime is built with WebAssembly pthreads. Browser hosts must serve pages and assets with cross-origin isolation headers:
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Resource-Policy: same-origin