Capítulo 203 de 859

Chapter 203: TDSLoader

Core Idea

A loader for the 3DS format, based on lib3ds.

Loads geometry with uv and materials basic properties with texture support.

Key Concepts

  • debug : boolean: Whether debug mode should be enabled or not.

Code Examples

const loader = new TDSLoader();
loader.setResourcePath( 'models/3ds/portalgun/textures/' );
const object = await loader.loadAsync( 'models/3ds/portalgun/portalgun.3ds' );
scene.add( object );
  • What it demonstrates: Typical usage of TDSLoader.

Reference Tables

Constructor

Signature
new TDSLoader( manager : LoadingManager )

Properties

PropertyDescription
.debug : booleanWhether debug mode should be enabled or not.

Methods

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

Key Takeaways

  1. TDSLoader extends: Loader
  2. Most relevant properties: debug.
  3. Key methods: load, parse.

Connects To