renderer.triangle
Draws a filled triangle on the screen. The points need to be specified in clockwise order.
renderer.triangle(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, r: number, g: number, b: number, a: number)
Arguments
Name | Description | Type |
---|---|---|
x1 | Screen coordinate X for point A | number |
y1 | Screen coordinate Y for point A | number |
x2 | Screen coordinate X for point B | number |
y2 | Screen coordinate Y for point B | number |
x3 | Screen coordinate X for point C | number |
y3 | Screen coordinate Y for point C | number |
r | Red color component (0 to 255) | number |
g | Green color component (0 to 255) | number |
b | Blue color component (0 to 255) | number |
a | Alpha (opacity) component (0 to 255) | number |