-
Hello everyone ! I've been trying to change the emissive factor in my script but I can't find a way to do it... The code so far :
modelViewer.model.materials[2] refers to the correct texture (I can change the base color without problem for example). Does anyone know how to change this? Thanks a lot ! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
I used the setter function to apply the new value. In your case it should be something like this: |
Beta Was this translation helpful? Give feedback.
-
Does the emissive lights the other pieces of the object? I mean, if I have the model-viewer exposure set up to 0, and a glb with a black box and a sphere inside of the box, if my sphere has an emissive material, should the sphere light the box ? |
Beta Was this translation helpful? Give feedback.
I used the setter function to apply the new value.
In your case it should be something like this:
modelViewer.model.materials[2].setEmissiveFactor(emissive);