Import
USDZExporter is an addon, and must be imported explicitly, see Installation#Addons.
import { USDZExporter } from 'three/addons/exporters/USDZExporter.js';
Properties
.textureUtils : WebGLTextureUtils | WebGPUTextureUtils
A reference to a texture utils module.
Default is null.
Methods
.parse( scene : Object3D, onDone : USDZExporter~OnDone, onError : USDZExporter~OnError, options : USDZExporter~Options )
Parse the given 3D object and generates the USDZ output.
| scene |
The 3D object to export. |
| onDone |
A callback function that is executed when the export has finished. |
| onError |
A callback function that is executed when an error happens. |
| options |
The export options. |
.parseAsync( scene : Object3D, options : USDZExporter~Options ) : Promise.<ArrayBuffer> (async)
Async version of USDZExporter#parse.
| scene |
The 3D object to export. |
| options |
The export options. |
- Returns: A Promise that resolved with the exported USDZ data.
.setTextureUtils( utils : WebGLTextureUtils | WebGPUTextureUtils )
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.
| utils |
The texture utils. |
Type Definitions
.OnDone( result : ArrayBuffer )
onDone callback of USDZExporter.
| result |
The generated USDZ. |
.OnError( error : Error )
onError callback of USDZExporter.
| error |
The error object. |
.Options
Export options of USDZExporter.
|
maxTextureSize
number |
The maximum texture size that is going to be exported. Default is |
|
includeAnchoringProperties
boolean |
Whether to include anchoring properties or not. Default is |
|
onlyVisible
boolean |
Export only visible 3D objects. Default is |
|
ar
Object |
If |
|
quickLookCompatible
boolean |
Whether to make the exported USDZ compatible to QuickLook which means the asset is modified to accommodate the bugs FB10036297 and FB11442287 (Apple Feedback). Default is |