Added check for isDev
This commit is contained in:
parent
599bf0b1d0
commit
752ecf63b0
|
@ -38,9 +38,10 @@ export default class Light {
|
|||
this.directionalLight.shadow.mapSize.height = Config.shadow.mapHeight;
|
||||
|
||||
// Shadow camera helper
|
||||
this.directionalLightHelper = new THREE.CameraHelper(this.directionalLight.shadow.camera);
|
||||
this.directionalLightHelper.visible = Config.shadow.helperEnabled;
|
||||
|
||||
if(Config.isDev) {
|
||||
this.directionalLightHelper = new THREE.CameraHelper(this.directionalLight.shadow.camera);
|
||||
this.directionalLightHelper.visible = Config.shadow.helperEnabled;
|
||||
}
|
||||
// Hemisphere light
|
||||
this.hemiLight = new THREE.HemisphereLight(Config.hemiLight.color, Config.hemiLight.groundColor, Config.hemiLight.intensity);
|
||||
this.hemiLight.position.set(Config.hemiLight.x, Config.hemiLight.y, Config.hemiLight.z);
|
||||
|
@ -55,7 +56,9 @@ export default class Light {
|
|||
|
||||
case 'directional':
|
||||
this.scene.add(this.directionalLight);
|
||||
this.scene.add(this.directionalLightHelper);
|
||||
if(Config.isDev) {
|
||||
this.scene.add(this.directionalLightHelper);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'point':
|
||||
|
|
Loading…
Reference in New Issue