Skip to content

Commit edf2f3f

Browse files
authored
Replace RGBELoader with HDRLoader to fix deprecation warning (#5139)
1 parent 8d26acf commit edf2f3f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/model-viewer/src/three-components/TextureUtils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import {GainMapDecoderMaterial, HDRJPGLoader, QuadRenderer} from '@monogrid/gainmap-js';
1717
import {BackSide, BoxGeometry, CubeCamera, CubeTexture, DataTexture, EquirectangularReflectionMapping, HalfFloatType, LinearSRGBColorSpace, Loader, Mesh, NoBlending, NoToneMapping, RGBAFormat, Scene, ShaderMaterial, SRGBColorSpace, Texture, TextureLoader, Vector3, WebGLCubeRenderTarget, WebGLRenderer} from 'three';
18-
import {RGBELoader} from 'three/examples/jsm/loaders/RGBELoader.js';
18+
import {HDRLoader} from 'three/examples/jsm/loaders/HDRLoader.js';
1919

2020
import {deserializeUrl, timePasses} from '../utilities.js';
2121

@@ -38,7 +38,7 @@ export default class TextureUtils {
3838

3939
private _ldrLoader: TextureLoader|null = null;
4040
private _imageLoader: HDRJPGLoader|null = null;
41-
private _hdrLoader: RGBELoader|null = null;
41+
private _hdrLoader: HDRLoader|null = null;
4242
private _lottieLoader: Loader|null = null;
4343

4444
private generatedEnvironmentMap: Promise<CubeTexture>|null = null;
@@ -68,9 +68,9 @@ export default class TextureUtils {
6868
return this._imageLoader;
6969
}
7070

71-
private hdrLoader(withCredentials: boolean): RGBELoader {
71+
private hdrLoader(withCredentials: boolean): HDRLoader {
7272
if (this._hdrLoader == null) {
73-
this._hdrLoader = new RGBELoader();
73+
this._hdrLoader = new HDRLoader();
7474
this._hdrLoader.setDataType(HalfFloatType);
7575
}
7676
this._hdrLoader.setWithCredentials(withCredentials);

0 commit comments

Comments
 (0)