Capítulo 170 de 859
A loader for loading HDR cube textures.
const loader = new HDRCubeTextureLoader();
loader.setPath( 'textures/cube/pisaHDR/' );
const cubeTexture = await loader.loadAsync( [ 'px.hdr', 'nx.hdr', 'py.hdr', 'ny.hdr', 'pz.hdr', 'nz.hdr' ] );
scene.background = cubeTexture;
scene.environment = cubeTexture;
Constructor
| Signature |
|---|
new HDRCubeTextureLoader( manager : LoadingManager ) |
Properties
| Property | Description |
|---|---|
.hdrLoader : HDRLoader | The internal HDR loader that loads the individual textures for each cube face. |
| `.type : HalfFloatType | FloatType` |
Methods
| Method | Description |
|---|---|
.load( urls : Array.<string>, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback ) : CubeTexture | Starts loading from the given URLs and passes the loaded HDR cube texture to the onLoad() callback. |
| `.setDataType( value : HalfFloatType | FloatType ) : HDRCubeTextureLoader` |