How to change dynamically added light intensity manually

I added directional lights to my scene dynamically…lights are working…I have dat.gui also…made color choice option for my model…when I swap model color gui updating intensity and position values but light intensity not updating…

when I swap to a color returning error : Uncaught TypeError: Cannot create property ‘intensity’ on string ‘Lamba0’

Lamba0 is one of my lights…

how can I change light intensity? How to reach dynamically added light properties?

You’re trying to access a property of your lights name. Can you please share the faulty code / codepen / jsfiddle? It may be hard to help without seeing it.

If you click fifth color option in tray…intensity must 0.5…in gui showing 0.5 but in realtime it is 0.3…because 0.3 is first white color configuration light intensity for Lamba1

Hey mjurczyk! If you will not answer I will delete this post. Are you checking now?

  1. Uhm, relax? If you need priority support, personally I’d post in #jobs.
  2. Once again, please share the code (or at least the important part of it.) It’s hard to tell what’s wrong just by looking at the behaviour of an app - it could just as well be a syntax error.
1 Like