Skip to content
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.

Commit

Permalink
Default files added to project directory
Browse files Browse the repository at this point in the history
  • Loading branch information
auxfuse committed Oct 29, 2021
1 parent 1ba0ed0 commit f3f1ad6
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/art/auxfuse-points/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Auxfuse - Canvaz Points to Shape</title>
</head>
<body>
<canvas></canvas>

<script src="main.js"></script>
</body>
</html>
27 changes: 27 additions & 0 deletions src/art/auxfuse-points/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const c = document.querySelector('canvas');
const ctx = c.getContext('2d');

c.height = window.innerHeight;
c.width = window.innerWidth;

function sides(r, inset, n){
ctx.beginPath();
ctx.save();
ctx.translate(c.width/2, c.height/2);
ctx.moveTo(0, 0 - r);

for (let i = 0; i < n; i++) {
ctx.rotate(Math.PI / n);
ctx.lineTo(0, 0 - (r * inset));

ctx.rotate(Math.PI / n);
ctx.lineTo(0, 0 - r);
};

ctx.restore();
ctx.closePath();
ctx.stroke();
ctx.fill();
};

sides(100, 0.5, 6);
5 changes: 5 additions & 0 deletions src/art/auxfuse-points/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"art_name": "Shape Points",
"author_name": "Auxfuse",
"author_github_url": "https://github.com/auxfuse/"
}
15 changes: 15 additions & 0 deletions src/art/auxfuse-points/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
overflow: hidden;
}

canvas {
position: absolute;
top: 0;
left: 0;
}

0 comments on commit f3f1ad6

Please sign in to comment.