Added check for isDev

This commit is contained in:
Paul Graffam 2021-03-24 19:12:41 -04:00
parent 599bf0b1d0
commit 752ecf63b0
1 changed files with 7 additions and 4 deletions

View File

@ -38,9 +38,10 @@ export default class Light {
this.directionalLight.shadow.mapSize.height = Config.shadow.mapHeight; this.directionalLight.shadow.mapSize.height = Config.shadow.mapHeight;
// Shadow camera helper // Shadow camera helper
if(Config.isDev) {
this.directionalLightHelper = new THREE.CameraHelper(this.directionalLight.shadow.camera); this.directionalLightHelper = new THREE.CameraHelper(this.directionalLight.shadow.camera);
this.directionalLightHelper.visible = Config.shadow.helperEnabled; this.directionalLightHelper.visible = Config.shadow.helperEnabled;
}
// Hemisphere light // Hemisphere light
this.hemiLight = new THREE.HemisphereLight(Config.hemiLight.color, Config.hemiLight.groundColor, Config.hemiLight.intensity); 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); this.hemiLight.position.set(Config.hemiLight.x, Config.hemiLight.y, Config.hemiLight.z);
@ -55,7 +56,9 @@ export default class Light {
case 'directional': case 'directional':
this.scene.add(this.directionalLight); this.scene.add(this.directionalLight);
if(Config.isDev) {
this.scene.add(this.directionalLightHelper); this.scene.add(this.directionalLightHelper);
}
break; break;
case 'point': case 'point':