diff --git a/examples/js/loaders/EquiangularToCubeGenerator.js b/examples/js/loaders/EquiangularToCubeGenerator.js index 375faab3d5b73a47833a90d22ad52a35868c5605..4978fa6c56ec5b676f8da33f41c19267ad78c534 100644 --- a/examples/js/loaders/EquiangularToCubeGenerator.js +++ b/examples/js/loaders/EquiangularToCubeGenerator.js @@ -2,10 +2,10 @@ * @author Richard M. / https://github.com/richardmonette */ -THREE.EquiangularToCubeGenerator = function ( sourceTexture, resolution, type, format ) { +THREE.EquiangularToCubeGenerator = function ( sourceTexture, options ) { this.sourceTexture = sourceTexture; - this.resolution = resolution; + this.resolution = options.resolution || 512; this.views = [ { t: [ 1, 0, 0 ], u: [ 0, - 1, 0 ] }, @@ -23,10 +23,10 @@ THREE.EquiangularToCubeGenerator = function ( sourceTexture, resolution, type, f this.scene.add( this.boxMesh ); var params = { - format: format ? format : this.sourceTexture.format, + format: options.format || this.sourceTexture.format, magFilter: this.sourceTexture.magFilter, minFilter: this.sourceTexture.minFilter, - type: type ? type : this.sourceTexture.type, + type: options.type || this.sourceTexture.type, generateMipmaps: this.sourceTexture.generateMipmaps, anisotropy: this.sourceTexture.anisotropy, encoding: this.sourceTexture.encoding diff --git a/examples/webgl_materials_envmaps_exr.html b/examples/webgl_materials_envmaps_exr.html index ab49dfc6c601357a3694b8662ddd01269713c3fc..cb12647cd342e91befd12fa105aa104f19a8500c 100644 --- a/examples/webgl_materials_envmaps_exr.html +++ b/examples/webgl_materials_envmaps_exr.html @@ -106,7 +106,7 @@ texture.magFilter = THREE.NearestFilter; texture.encoding = THREE.LinearEncoding; - var cubemapGenerator = new THREE.EquiangularToCubeGenerator( texture, 512, THREE.HalfFloatType ); + var cubemapGenerator = new THREE.EquiangularToCubeGenerator( texture, { resolution: 512, type: THREE.HalfFloatType } ); var cubeMapTexture = cubemapGenerator.update( renderer ); var pmremGenerator = new THREE.PMREMGenerator( cubeMapTexture );