An exporter for `USDZ`.
[link:https://graphics.pixar.com/usd/docs/index.html USDZ] (Universal Scene Description ZIP archive) is a
[link:https://openusd.org/release/index.html USD-based format] for 3D content optimized for sharing and viewing.
USDZ files are ZIP archives containing USD scene data and associated textures. The format supports meshes,
materials, textures, and cameras.
[name] is an add-on, and must be imported explicitly. See [link:#manual/introduction/Installation Installation / Addons].
import { USDZExporter } from 'three/addons/exporters/USDZExporter.js';
USDZExporter supports the following features:
// Instantiate a exporter
const exporter = new USDZExporter();
// Configure export options
const options = { maxTextureSize: 2048 };
try {
// Parse the input and generate the USDZ output
const arraybuffer = await exporter.parseAsync( scene, options );
downloadUSDZ( arraybuffer );
} catch ( error ) {
console.error( 'Export failed:', error );
}
[example:misc_exporter_usdz]
Creates a new [name].
[page:Object3D scene] — Scene or object to export.
[page:Function onCompleted] — Will be called when the export completes. The argument will be the generated USDZ ArrayBuffer.
[page:Function onError] — Will be called if there are any errors during the USDZ generation.
[page:Options options] — Export options
Generates a USDZ ArrayBuffer output from the input Object3D. Note that only MeshStandardMaterial is supported.
Generates a USDZ ArrayBuffer output from the input Object3D.
This is just like the [page:.parse]() method, but instead of accepting callbacks it returns a promise that resolves with the ArrayBuffer result, and otherwise accepts the same options.
Sets the texture utils for this exporter. Only relevant when compressed textures have to be exported. Depending on whether you use WebGLRenderer or WebGPURenderer, you must inject the corresponding texture utils WebGLTextureUtils or WebGPUTextureUtils.
[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/exporters/USDZExporter.js examples/jsm/exporters/USDZExporter.js]