Capítulo 158 de 859

Chapter 158: ColladaLoader

Core Idea

A loader for the Collada format.

The Collada format is very complex so this loader only supports a subset of what is defined in the official specification.

Assets with a Z-UP coordinate system are transformed it into Y-UP by a simple rotation. The vertex data are not converted.

Code Examples

const loader = new ColladaLoader();
const result = await loader.loadAsync( './models/collada/elf/elf.dae' );
scene.add( result.scene );
  • What it demonstrates: Typical usage of ColladaLoader.

Reference Tables

Constructor

Signature
new ColladaLoader()

Methods

MethodDescription
.load( url : string, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback )Starts loading from the given URL and passes the loaded Collada asset to the onLoad() callback.
.parse( text : string, path : string ) : ObjectParses the given Collada data and returns a result object holding the parsed scene, an array of animation clips and kinematics.

Key Takeaways

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

Connects To