Skip to content

Commit 3c0d7b3

Browse files
author
gamedevgrunt
committed
Add fog to builder
1 parent b096d34 commit 3c0d7b3

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/scene/scenes/builder.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ function createSkydome(scene) {
111111
skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
112112
skybox.material = skyboxMaterial;
113113

114+
scene.fogMode = BABYLON.Scene.FOGMODE_LINEAR;
115+
scene.fogStart = 600.0; // Where the fog starts
116+
scene.fogEnd = 6000.0; // Where the fog completely obscures everything
117+
scene.fogColor = new BABYLON.Color3(0.769, 0.86, 1); // Light grey fog
118+
114119
return skybox;
115120
}
116121

0 commit comments

Comments
 (0)