diff --git a/src/js/app/components/light.js b/src/js/app/components/light.js index 237b65a..19f9526 100644 --- a/src/js/app/components/light.js +++ b/src/js/app/components/light.js @@ -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':