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

Commit

Permalink
added my art (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
savday authored Jun 6, 2022
1 parent 3e1eb37 commit b279ac1
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 0 deletions.
Binary file added src/art/savday/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions src/art/savday/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!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>Canvas Animation</title>
</head>
<body>

<canvas id="myCanvas" width="500" height="500"></canvas>

<script src="script.js"></script>
</body>
</html>
5 changes: 5 additions & 0 deletions src/art/savday/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"art_name": "Purple Rain",
"author_name": "savday",
"author_github_url": "https://github.com/savday/"
}
20 changes: 20 additions & 0 deletions src/art/savday/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");

// Create gradient
var grd = ctx.createLinearGradient(0, 0, 400, 0);
grd.addColorStop(0, "blue");
grd.addColorStop(1, "white");

// Fill with gradient
ctx.fillStyle = grd;
ctx.fillRect(0, 0, 500, 500);

//Create circle
ctx.fillStyle = 'black';
ctx.beginPath();
ctx.arc(250, 250, 100, 0, 2 * Math.PI);
ctx.stroke();
ctx.fill()
ctx.arc(250, 250, 150, 0, 2 * Math.PI);
ctx.stroke();
13 changes: 13 additions & 0 deletions src/art/savday/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
body {
width: 100vw;
height: 100vh;
margin: 0 auto;
background-color: #202020;
display: flex;
justify-content: center;
align-items: center;
}

canvas {
border: 2px solid #fff;
}

0 comments on commit b279ac1

Please sign in to comment.