Capítulo 205 de 859

Chapter 205: TGALoader

Core Idea

A loader for the TGA texture format.

Code Examples

const loader = new TGALoader();
const texture = await loader.loadAsync( 'textures/crate_color8.tga' );
texture.colorSpace = THREE.SRGBColorSpace; // only for color textures
  • What it demonstrates: Typical usage of TGALoader.

Reference Tables

Constructor

Signature
new TGALoader( manager : LoadingManager )

Methods

MethodDescription
.parse( buffer : ArrayBuffer ) : DataTextureLoader~TexDataParses the given TGA texture data.

Key Takeaways

  1. TGALoader extends: Loader → DataTextureLoader
  2. Key methods: parse.

Connects To