문제

I have a problem about lighting with three.js

In my scene, I have a mesh named A (with a MeshLambertMaterial) which receive 3 lights correctly : one DirectionalLight and two PointLight. However, the mesh A don't receive anymore PointLight while the PointLights are correctly setup. Indeed other meshes receive the light from the other PointLights.

I have searched property in renderer or materials but I haven't found anything to resolve my problem.

Why the mesh A don't receive anymore lights ?

도움이 되었습니까?

해결책

After a lot of investigation, I've found the problem.

Each time I add a light, I need to put the material needsUpdate flag to true :

material.needsUpdate = true;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top