Capítulo 210 de 859

Chapter 210: USDLoader

Core Idea

A loader for the USD format (USD, USDA, USDC, USDZ).

Supports both ASCII (USDA) and binary (USDC) USD files, as well as USDZ archives containing either format.

Code Examples

const loader = new USDLoader();
const model = await loader.loadAsync( 'model.usdz' );
scene.add( model );
  • What it demonstrates: Typical usage of USDLoader.

Reference Tables

Constructor

Signature
new USDLoader( manager : LoadingManager )

Methods

MethodDescription
.load( url : string, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback )Starts loading from the given URL and passes the loaded USDZ asset to the onLoad() callback.
`.parse( buffer : ArrayBufferstring, path : string, onLoad : function, onError : onErrorCallback ) : Group`

Key Takeaways

  1. USDLoader extends: Loader
  2. Key methods: load, parse.

Connects To