Hidden layer's light not active when re enabled

I have a scene with a ligh on an hidden layer, when i enable the layer the layer is not active, do i need to render the scene?

let wireLight = new THREE.DirectionalLight();
    wireLight.intensity = 10;
    wireLight.name = "wireLight";

this.sceneStore.threeScene.getObjectByName("wireLight") .layers.set(
        this.sceneStore.sceneLayers.find((e) => e.name === "wireLayer").mask
      ); // wireLayer


Yup, you need to call renderer.render continuously in order for any changes to show - render method creates just a single picture of the frame at a given moment.

1 Like

Well, the object are rendering properly, appart from the light not ON, additionnally i have added the lines below, still no luck:

      this.ss.renderer.render(this.ss.threeScene, this.ss.camera);

Light will not have effect unless you add it to the scene - scene.add(wireLight). Then, just call render once:

renderer.render(scene, camera);

Yes, it has been added, and i can even debug it (when i do it actually turns on from the dev tool extension), but for some reason, it never lit the scene. I think it is a layer related issue, that it is added to a hidden layer at first, but i cant figure out what it is)