Capítulo 172 de 859

Chapter 172: IESLoader

Core Idea

A loader for the IES format.

The loaded texture should be assigned to IESSpotLight#map.

Key Concepts

  • type : HalfFloatType | FloatType: The texture type.

Code Examples

const loader = new IESLoader();
const texture = await loader.loadAsync( 'ies/007cfb11e343e2f42e3b476be4ab684e.ies' );
const spotLight = new THREE.IESSpotLight( 0xff0000, 500 );
spotLight.iesMap = texture;
  • What it demonstrates: Typical usage of IESLoader.

Reference Tables

Constructor

Signature
new IESLoader( manager : LoadingManager )

Properties

PropertyDescription
`.type : HalfFloatTypeFloatType`

Methods

MethodDescription
.load( url : string, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback )Starts loading from the given URL and passes the loaded IES texture to the onLoad() callback.
.parse( text : string ) : DataTextureParses the given IES data.

Key Takeaways

  1. IESLoader extends: Loader
  2. Most relevant properties: type.
  3. Key methods: load, parse.

Connects To