Usdz
Updated
Loads a USDZ model.
- Type
comp-usdz- Script class
USDZComponent- Per entity
- One
- Version
- 1.0.0
Read about it in Models and meshes: what it does, how to use it from a script, and examples.
Events
Section titled “Events”Sent to the entity’s Signal Emitter as { entityId, eventType, data }. Compare eventType with the EventType constants.
USDZ::readyUSDZ::error
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Load a USDZ modelA textured USDZ (.usdz) model, the format of AR Quick Look, on a turntable: the script centres it and scales it to 0.8 m once it loads.
The file is about 4 MB, so give it a moment, then watch it turn. Drag to orbit the camera, scroll to zoom.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(USDZComponent); if (component) log(component.props);}