color
Multiply col into vertex colors.
Parameters
- self:*Triangles
- *Triangles
- col:Color
- Color
Source
Implementation
pub fn color(self: *Triangles, col: Color) void {
if (col.r == 0xff and col.g == 0xff and col.b == 0xff and col.a == 0xff)
return;
const pma_col: Color.PMA = .fromColor(col);
for (self.vertexes) |*v| {
v.col = v.col.multiply(pma_col);
}
}