Quellcode durchsuchen

Examples: Fix colors in webgpu_custom_fog (#33057)

Nathan Bierema vor 14 Stunden
Ursprung
Commit
2b5ba4f99f
1 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen
  1. 6 3
      examples/webgpu_custom_fog.html

+ 6 - 3
examples/webgpu_custom_fog.html

@@ -53,8 +53,11 @@
 
 				// custom fog
 
-				const skyColor = color( 0xf0f5f5 );
-				const groundColor = color( 0xd0dee7 );
+				const skyColorValue = 0xf0f5f5;
+				const groundColorValue = 0xd0dee7;
+
+				const skyColor = color( skyColorValue );
+				const groundColor = color( groundColorValue );
 
 				const fogNoiseDistance = positionView.z.negate().smoothstep( 0, camera.far - 300 );
 
@@ -112,7 +115,7 @@
 
 				// lights
 
-				scene.add( new THREE.HemisphereLight( skyColor.value, groundColor.value, 0.5 ) );
+				scene.add( new THREE.HemisphereLight( skyColorValue, groundColorValue, 0.5 ) );
 
 				// geometry
 

粤ICP备19079148号