UNPKG

484 BJavaScriptView Raw
1import { PolygonDrawerBase } from "./PolygonDrawerBase";
2export class TriangleDrawer extends PolygonDrawerBase {
3 getSidesCount() {
4 return 3;
5 }
6 getSidesData(particle, radius) {
7 return {
8 count: {
9 denominator: 2,
10 numerator: 3,
11 },
12 length: radius * 2,
13 };
14 }
15 getCenter(particle, radius) {
16 return {
17 x: -radius,
18 y: radius / 1.66,
19 };
20 }
21}