Hello,
I have an issue that I should change color of a mesh to be have color or no color (the default mesh color )
Is there something like :
material.diffuseColor = null
or unset color
Thanks
Gijs
September 12, 2019, 10:22am
2
Hi, the default color is white:
* The color of the material lit by the environmental background lighting.
* @see http://doc.babylonjs.com/babylon101/materials#ambient-color-example
*/
@serializeAsColor3("ambient")
public ambientColor = new Color3(0, 0, 0);
/**
* The basic color of the material as viewed under a light.
*/
@serializeAsColor3("diffuse")
public diffuseColor = new Color3(1, 1, 1);
/**
* Define how the color and intensity of the highlight given by the light in the material.
*/
@serializeAsColor3("specular")
public specularColor = new Color3(1, 1, 1);
/**
* Define the color of the material as if self lit.
* This will be mixed in the final result even in the absence of light.
2 Likes