Basic glTF loader class.

Allow to load an HDR file from an URI and returns a HDRImageData object containing the Float32Array data alongside width, height and other useful information.

Example

const hdrLoader = new HDRLoader()
const hdr = await hdrLoader.loadFromUrl('path/to/environment.hdr')

// assuming `renderer` is a valid Renderer
const envTexture = new Texture(renderer, {
label: 'Environment texture',
name: 'envTexture',
visibility: ['fragment'],
format: 'rgba16float',
generateMips: true,
fixedSize: {
width: hdr.width,
height: hdr.height,
},
})

envTexture.uploadData({
data: hdr.data,
})

Constructors

Methods

Constructors

Methods