Skip to content

Commit fdc290a

Browse files
committed
fix typos
1 parent dc8562d commit fdc290a

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

examples/jsm/materials/ProceduralWood.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,9 @@ export function GenerateWoodMaterial( params ) {
404404
uniforms.cellSize = TSL.uniform( params.cellSize );
405405
uniforms.darkGrainColor = TSL.uniform( new THREE.Color( params.darkGrainColor ) );
406406
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 );
410410

411411
// remember uniforms for real-time updates
412412
material.uniforms = uniforms;

examples/webgpu_tsl_wood.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
function render() {
121121
controls.update();
122122
stats.update();
123-
renderer.renderAsync(scene, camera);
123+
return renderer.renderAsync(scene, camera);
124124
}
125125

126126
window.addEventListener('resize', () => {
@@ -173,10 +173,11 @@
173173
const cube = new THREE.Mesh(geometry, GenerateWoodMaterial(GetWoodPreset(WoodGenuses[x], Finishes[y])));
174174
cube.position.set(position.x, position.y, position.z);
175175
base.add(cube);
176-
177-
// sleep
176+
178177
}
179-
await new Promise(resolve => setTimeout(resolve, 0));
178+
179+
await new Promise(resolve => setTimeout(resolve, 10));
180+
180181
}
181182
</script>
182183
</body>

0 commit comments

Comments
 (0)