سؤال

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