Hi, I think I found a bug at parsing rectAreaLight and a temp solution.
Env:
Babylon.js-9.11.0
Bug behaviour:
- create a rectAreaLight by
const light = new RectAreaLight() - serialize the light by
const data = light.serialize() - deserialize the light by
Light.Parse(data, scene) - the bug is when after parsing, the rectAreaLight don’t work(can’t see the light)
Solution:
When I console the light object, I found the light._photometricScale=0,and I set to 1 can fix the bug.
diving in the source code, I found it did’t handle the Light.LIGHTTYPEID_RECT_AREALIGHT case in _getPhotometricScale() function, so the light._photometricScale is the initial value 0.
I simply add one line to handle the rectAreaLight case can fix the bug in source code, but I think you know how to fix the bug better, so I write this topic to report this bug.
