Rect area light - direction property

@srzerbetto

Firstly, thank you for the amazing work. I believe this light type is revolutionary for lighting within BabylonJS. :laughing:

I noticed that in our current implementation, the rectAreaLight doesn’t have a direction property. According to the documentation (Babylon.js docs):

Even though the RectAreaLight class itself does not have a direction component, it can be attached to a transform node to be rotated and moved around.

I’m curious to know if this is a permanent design decision or if there are plans to add a direction property to rectAreaLight, similar to other light types?

I’m asking because it seems it would make more sense to have consistent control methods across all light types.

Many thanks again.
Tawibox

For area lights direction would not be enough to fully describe its orientation in the world, you would need a 3 axis system with a forward and up vector. Because of that we considered that by adding those would just be re-implementing what we already have in TransformNode. So we decided to have just the width and height information in the AreaLight and if the users whant to move it around they can just assign it to a TransformNode.

4 Likes