File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -404,9 +404,9 @@ export function GenerateWoodMaterial( params ) {
404
404
uniforms . cellSize = TSL . uniform ( params . cellSize ) ;
405
405
uniforms . darkGrainColor = TSL . uniform ( new THREE . Color ( params . darkGrainColor ) ) ;
406
406
uniforms . lightGrainColor = TSL . uniform ( new THREE . Color ( params . lightGrainColor ) ) ;
407
- uniforms . clearcoat = TSL . uniform ( clearcoat ) ;
408
- uniforms . clearcoatDarken = TSL . uniform ( clearcoatDarken ) ;
409
- uniforms . clearcoatRoughness = TSL . uniform ( TSL . clearcoatRoughness ) ;
407
+ uniforms . clearcoat = TSL . uniform ( params . clearcoat ) ;
408
+ uniforms . clearcoatDarken = TSL . uniform ( params . clearcoatDarken ) ;
409
+ uniforms . clearcoatRoughness = TSL . uniform ( params . clearcoatRoughness ) ;
410
410
411
411
// remember uniforms for real-time updates
412
412
material . uniforms = uniforms ;
Original file line number Diff line number Diff line change 120
120
function render ( ) {
121
121
controls . update ( ) ;
122
122
stats . update ( ) ;
123
- renderer . renderAsync ( scene , camera ) ;
123
+ return renderer . renderAsync ( scene , camera ) ;
124
124
}
125
125
126
126
window . addEventListener ( 'resize' , ( ) => {
173
173
const cube = new THREE . Mesh ( geometry , GenerateWoodMaterial ( GetWoodPreset ( WoodGenuses [ x ] , Finishes [ y ] ) ) ) ;
174
174
cube . position . set ( position . x , position . y , position . z ) ;
175
175
base . add ( cube ) ;
176
-
177
- // sleep
176
+
178
177
}
179
- await new Promise ( resolve => setTimeout ( resolve , 0 ) ) ;
178
+
179
+ await new Promise ( resolve => setTimeout ( resolve , 10 ) ) ;
180
+
180
181
}
181
182
</ script >
182
183
</ body >
You can’t perform that action at this time.
0 commit comments