@@ -179,27 +179,17 @@ async function init() {
179179 spotLightHelpers = [ ] ;
180180 lights = [ ] ;
181181 spotLights = [ ] ;
182- const iesPromises = [ ] ;
182+ const iesPromises = iesProfileURLs . map ( url => {
183+
184+ return new IESLoader ( ) . loadAsync ( url ) ;
185+
186+ } ) ;
183187
184188 const decays = [ 0 , 1.5 , 0 , 0.25 , 0 ] ;
185189 for ( let i = 0 ; i < 1 ; ++ i ) {
186190
187191 const spotLight = new PhysicalSpotLight ( 0xffffff ) ;
188192
189- const iesIndex = - 1 + i ;
190- if ( iesIndex !== - 1 ) {
191-
192- const iesPromise = new IESLoader ( ) . loadAsync ( iesProfileURLs [ iesIndex ] ) . then ( tex => {
193-
194- spotLight . iesTexture = tex ;
195- return tex ;
196-
197- } ) ;
198-
199- iesPromises . push ( iesPromise ) ;
200-
201- }
202-
203193 spotLight . position . set ( i * 8 , 7.0 , 0.005 ) ;
204194 spotLight . angle = Math . PI / 4.5 ;
205195 spotLight . penumbra = 1.0 ;
@@ -326,26 +316,6 @@ async function init() {
326316 } ) ;
327317 envFolder . add ( params , 'showTransformControls' ) ;
328318
329- const cameraFolder = gui . addFolder ( 'Camera' ) ;
330- cameraFolder . add ( perspectiveCamera , 'focusDistance' , 1 , 100 ) . onChange ( reset ) ;
331- cameraFolder . add ( perspectiveCamera , 'apertureBlades' , 0 , 10 , 1 ) . onChange ( function ( v ) {
332-
333- perspectiveCamera . apertureBlades = v === 0 ? 0 : Math . max ( v , 3 ) ;
334- this . updateDisplay ( ) ;
335- reset ( ) ;
336-
337- } ) ;
338- cameraFolder . add ( perspectiveCamera , 'apertureRotation' , 0 , 12.5 ) . onChange ( reset ) ;
339- cameraFolder . add ( perspectiveCamera , 'anamorphicRatio' , 0.1 , 10.0 ) . onChange ( reset ) ;
340- cameraFolder . add ( perspectiveCamera , 'bokehSize' , 0 , 50 ) . onChange ( reset ) . listen ( ) ;
341- cameraFolder . add ( perspectiveCamera , 'fStop' , 0.3 , 20 ) . onChange ( reset ) . listen ( ) ;
342- cameraFolder . add ( perspectiveCamera , 'fov' , 25 , 100 ) . onChange ( ( ) => {
343-
344- perspectiveCamera . updateProjectionMatrix ( ) ;
345- reset ( ) ;
346-
347- } ) . listen ( ) ;
348-
349319 const matFolder1 = gui . addFolder ( 'Floor Material' ) ;
350320 matFolder1 . addColor ( params . floorMaterial , 'color' ) . onChange ( reset ) ;
351321 matFolder1 . add ( params . floorMaterial , 'roughness' , 0 , 1 ) . onChange ( reset ) ;
0 commit comments