From 752ecf63b08e4a317dfae4297a5fedac7806f931 Mon Sep 17 00:00:00 2001 From: Paul Graffam Date: Wed, 24 Mar 2021 19:12:41 -0400 Subject: [PATCH] Added check for isDev --- src/js/app/components/light.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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':