Draws a triangle.
A triangle is a three-sided shape defined by three points. The first two parameters specify the triangle's first point (x1, y1). The middle two parameters specify its second point (x2, y2). And the last two parameters specify its third point (x3, y3).
Examples
Syntax
triangle(x1, y1, x2, y2, x3, y3)
Parameters
x1
Number:
x-coordinate of the first point.
y1
Number:
y-coordinate of the first point.
x2
Number:
x-coordinate of the second point.
y2
Number:
y-coordinate of the second point.
x3
Number:
x-coordinate of the third point.
y3
Number:
y-coordinate of the third point.
This page is generated from the comments in src/core/shape/2d_primitives.js . Please feel free to edit it and submit a pull request!