|
Last change
on this file since a762898 was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Prototype 1.1
|
-
Property mode
set to
100644
|
|
File size:
273 bytes
|
| Line | |
|---|
| 1 | import {sqrt} from "../math.js";
|
|---|
| 2 |
|
|---|
| 3 | const sqrt3 = sqrt(3);
|
|---|
| 4 |
|
|---|
| 5 | export default {
|
|---|
| 6 | draw(context, size) {
|
|---|
| 7 | const y = -sqrt(size / (sqrt3 * 3));
|
|---|
| 8 | context.moveTo(0, y * 2);
|
|---|
| 9 | context.lineTo(-sqrt3 * y, -y);
|
|---|
| 10 | context.lineTo(sqrt3 * y, -y);
|
|---|
| 11 | context.closePath();
|
|---|
| 12 | }
|
|---|
| 13 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.