Browse Source

Replace monochromatic hemi light with ambient

Michael Bond 7 years ago
parent
commit
a3fbc731a3
1 changed files with 2 additions and 8 deletions
  1. 2 8
      loaders/src/glTF/2.0/Extensions/KHR_lights.ts

+ 2 - 8
loaders/src/glTF/2.0/Extensions/KHR_lights.ts

@@ -46,14 +46,8 @@ module BABYLON.GLTF2.Extensions {
                         return;
                     }
 
-                    // Use monochromatic hemispheric light to simulate ambient light.
-                    const direction = new Vector3(0, 1, 0);
-                    extension.babylonLight = new BABYLON.HemisphericLight("light", direction, loader._babylonScene);
-
-                    this.applyCommonProperties(extension.babylonLight, lightInfo);
-
-                    const groundColor = lightInfo.color ? lightInfo.color : [1, 1, 1];
-                    (extension.babylonLight as HemisphericLight).groundColor.copyFromFloats(groundColor[0], groundColor[1], groundColor[2]);
+                    const lightColor = lightInfo.color ? lightInfo.color : [1, 1, 1];
+                    loader._babylonScene.ambientColor.copyFromFloats(lightColor[0], lightColor[1], lightColor[2]);
                 }
                 
                 onComplete();