Capítulo 187 de 859
A loader for the MD2 format.
The loader represents the animations of the MD2 asset as an array of animation clips and stores them in the animations property of the geometry.
const loader = new MD2Loader();
const geometry = await loader.loadAsync( './models/md2/ogro/ogro.md2' );
const animations = geometry.animations;
Constructor
| Signature |
|---|
new MD2Loader( manager : LoadingManager ) |
Methods
| Method | Description |
|---|---|
.load( url : string, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback ) | Starts loading from the given URL and passes the loaded MD2 asset to the onLoad() callback. |
.parse( buffer : ArrayBuffer ) : BufferGeometry | Parses the given MD2 data and returns a geometry. |