diffuseColor
Represents the material's diffuse (or base) color, intelligently sourcing its value from the material's `.color`, `.map`, or `.vertexColors` properties.
Core Advantages
Its key advantage is polymorphism: it automatically adapts its data source (solid color, texture, or vertex color) based on the JavaScript material's properties, completely abstracting away complex uniform management and conditional logic.
Common Uses
Setting a solid base color for an object.
Applying a texture map for surface detail.
Using vertex colors for procedural geometry or particles.
As an upstream input for more complex effects like color mixing or filtering.
How to adjust
This node is configured by modifying the associated JavaScript `Material` properties. Set `material.color` for a solid color; set `material.map` to apply a texture (which overrides `.color`); and set `material.opacity` to control its transparency.
Code Examples
1// Mix between the material's base color and a 'burnt' color based on a noise factor
2const burnFactor = noise( uv() );
3const finalColor = mix( diffuseColor, color( 0x000000 ), burnFactor );