Open LUK3D opened 1 year ago
I'm learning troisjs now and can't find the HDRI image API so far. I'm using the JS function to create the HDR env for the scene.
` function createHDRenvMap(scene, renderer, hdrFile) { const pmremGenerator = new PMREMGenerator(renderer) pmremGenerator.compileEquirectangularShader()
const rgbeLoader = new RGBELoader() rgbeLoader.load(hdrFile, (texture) => { const envMap = pmremGenerator.fromEquirectangular(texture).texture pmremGenerator.dispose() scene.environment = envMap }) // return envMap
}
`
scene and renderer is the parameters, hdrFile is the entire path and file name.
I'm learning troisjs now and can't find the HDRI image API so far. I'm using the JS function to create the HDR env for the scene.
` function createHDRenvMap(scene, renderer, hdrFile) { const pmremGenerator = new PMREMGenerator(renderer) pmremGenerator.compileEquirectangularShader()
}
`
scene and renderer is the parameters, hdrFile is the entire path and file name.