Capítulo 154 de 859

Chapter 154: AMFLoader

Core Idea

A loader for the AMF format.

The loader supports materials, color and ZIP compressed files. No constellation support (yet).

Code Examples

const loader = new AMFLoader();
const object = await loader.loadAsync( './models/amf/rook.amf' );
scene.add( object );
  • What it demonstrates: Typical usage of AMFLoader.

Reference Tables

Constructor

Signature
new AMFLoader( manager : LoadingManager )

Methods

MethodDescription
.load( url : string, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback )Starts loading from the given URL and passes the loaded AMF asset to the onLoad() callback.
.parse( data : ArrayBuffer ) : GroupParses the given AMF data and returns the resulting group.

Key Takeaways

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

Connects To