Change Color not working on every element
In the V2 branch the model loads great, all the colors are correct.
But, after using setColor() on some of the elements, even though the object.material.diffuse property is defined correctly, the color does not change (the alpha works as expected).
In the attached IFC example, the elements with the problem are the green beams. examp.zip
I came across the exact same problem. I worked around it by adding:
material.emissive = [color[0], color[1], color[2]];
after the line
material.diffuse = [color[0], color[1], color[2]];
in _setObjectColor in src/xeoViewer/xeoViewer.js
I guess that the proper way to to it would be to modify either the diffuse or the emissive property depending on the object type. I am not sure what is the criteria though.
Thanks for the help, changing the material.emissive property worked on a few of the conflictive elements.
Since the geometry also has colors i understood that the elements were "painted" at least 3 times.
- at geometry creation
- at object's material creation
- at
material.diffuseredefinition (setColor())
the solution that worked for me was commenting the definition of the geometry color
Not sure if i should close the issue. If i understood correctly, the problem now would be a conflict between the material's color and colored geometries.
Hello, I would like to ask how to separate each window to display a different color, like this:

Thank you!
@raintao Hi. I am also trying to find same kind of solution with small difference. I want to override selected element color with default color on some event. can you help me here ?