pencil.js
Version:
Nice modular interactive 2D drawing library.
26 lines (16 loc) • 536 B
Markdown
Regular triangle shape, if you want to draw a random shape with 3 points, use [Polygon](../polygon) instead.

```js
import { Triangle } from "pencil.js";
const position = [100, 200];
const radius = 99;
const options = {
fill: "blue"
};
const triangle = new Triangle(position, radius, options);
```
Inherit from [RegularPolygonOptions](../regular-polygon/readme.md
Triangle have no specific options.