Best way to "turn off" a light

Just wondering, performance wise what is the best method for disabling (toggling really) a light?

I’ve seen this, but it’s old and see no mention of the “visible” property in the docs.

Will setting intensity to 0 work or should I remove the light from the scene when it’s “off”?

As an option, set light’s colour to black.

And this would yield the same render performance as removing the light from the scene?

I’m not sure about that.
Do yo have so many lights in your scene that it causes problems with performance?

I would do this:

light.visible = false;

For testing: Edit fiddle - JSFiddle - Code Playground

It’s a property of Object3D.

3 Likes

Awesome, thank you.