Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #311 from mollyollyoxenfree/purplerain
Browse files Browse the repository at this point in the history
adding my canvas art
  • Loading branch information
sophiabrandt authored Aug 5, 2023
2 parents 0050695 + c58a135 commit 25a38d2
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 0 deletions.
Binary file added src/art/MollySmith/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions src/art/MollySmith/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en-US">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Purple Rain</title>
<link rel="stylesheet" href="style.css">
</head>

<body>
<canvas id="canvas1"></canvas>
<h1 id="title1"><img
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMsAAAD5CAMAAAC+lzGnAAAAjVBMVEX///8AAAD8/PwFBQX5+fnf39+8vLwICAj29vbz8/NLS0vi4uIMDAzx8fGoqKjMzMyioqLn5+eRkZFwcHDT09NeXl6xsbE6OjpERES5ubnY2Nh5eXlRUVHFxcWlpaWamppoaGiEhIQyMjIpKSmMjIw9PT1PT08dHR12dnYXFxeCgoItLS1sbGwiIiJZWVm6snAPAAAQUUlEQVR4nO1dCXuqOhNOQhRQUHHBrdal9mg3///P+2YCCJKwKQjej/e599RahbxkklkymRDSokWLFi1atGjRokWLGsA8wM+6W/IwBAvkQuBF3Y35/4YnUvjCnrrj9dv87/T1d7hMxoOhzfFt8jI9xAk34EfHXX9SCfOJ24ePcP4abBjnpL/1eGga/uPzCH4utg7hdbcyJ4zlwmu6hv9pAQUqXmo6vnzrNrxfUHAYcbaWLFoxAKfDu0mY0diJmgEX+2j5kpXKBT9xWBLDbCwXwgZeQ7O56Chri04zJzSUlukiMsKz2IgPjjn0Zt1NlwDyNcpLJICu088+MetuugRmzn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j7APnGR3D/LTH4GzjnKXd2W1BsDQuhsGNJh34Fke8ZenrL691YHK1a0nPRculmWi5NBMtl2ai5dJMtFyaiZZLM9FyaSZaLs1Ey6WZeG0utymZqXGYJh1UrwS/2XqZwkWUR2w2OO+S7Hiy98mnBWDvBCejcxjnTB0vw6KnXj0bjHH6MyX+HqDEOL9pmMf6zkPNCSb2ZI8yuBhYcLfgBvzngxnM+KD04m3JTJQxzCPoN30eQ4jD7bq4Kq3ggh22wpWq37KOCKkSzPzB7N+1zbiyX9hIrIc+sAX1ecAqxLhSexgqZGxJ+m8io/TXKOu4kyoBU9mXt+y87Us5vUM8IQkzOKavsWLB2cBPn59LVUOD5IG0BKEGAddV/7BDNEwViedd+AlCw1foFCLqN/spQlIhYt1/599LCJgHO16OJcpHFLF+gUksgHRYX5RLRWWcKwLniZUWcTbYPLbN+bnA/VMJVZxhVug9uJX+uQBP6yuhnjoM/oKnw9UM8JRdqi5AXuQ4tEYAzWXV0ekCrxS/8OEqBz4edPU64z6AodAxyGX5ely4dNCmN4nNeSnbtp8K8JZP0rysiXNDX65fQJLk09M1+vd6RES/gFUW46LT97rbdQ9wV7JCx7yQwr8Fvy0kChJX/vkzzwJb3lCh1CpyVGezwNnPLZnxKxmVt+BkGW6ch4H/Zb+S43ILzthHOC9r4pyXVwVoeDdaQ/nR8hZ1AvecLUIdM35V+QqwvBaZo84r94vA4TpakgtsvQYYux5v7bycfRwDmGUf3q6m75edjgOAWYZTmVZKnbmaAVOZ/Yl+zK7uljwOrPPTRS6PlhtqCEDH0PMLepMqoLm8UhekejkwctqR/wgXcDCHJR3IXjteL4iUjKSjCF4RzU8Va9GiRYsWLVq0aPE4/gfCoqtBUykGrAAAAABJRU5ErkJggg=="
alt="Prince" /></h1>

<script src="script.js"></script>
</body>

</html>
5 changes: 5 additions & 0 deletions src/art/MollySmith/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"art_name": "PurpleRain",
"author_name": "Molly",
"author_github_url": "https://github.com/mollyollyoxenfree"
}
46 changes: 46 additions & 0 deletions src/art/MollySmith/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
const canvas = document.getElementById("canvas1");
const ctx = canvas.getContext("2d");
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;

class Particle {
constructor(x, y) {
this.x = x;
this.y = y;
this.size = 2;
this.weight = 2;
this.directionX = -2;
}
update() {
if (this.y > canvas.height) {
this.y = 0 - this.size;
this.weight = 2;
this.x = Math.random() * canvas.width * 1.4;
}
this.weight += 0.06;
this.y += this.weight;
this.x += this.directionX;
}
draw() {
ctx.fillStyle = "purple";
ctx.beginPath();
ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
ctx.closePath();
ctx.fill();
}
}

const particle1 = new Particle(400, 800);
const particle2 = new Particle(200, 400);

function animateRain() {
ctx.fillStyle = 'rgba(255, 255, 255, 0.01)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
particle1.update();
particle1.draw();
particle2.update();
particle2.draw();
requestAnimationFrame(animateRain);
}

animateRain();
31 changes: 31 additions & 0 deletions src/art/MollySmith/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

#canvas1 {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

#title1 {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
line-height: 110px;
white-space: nowrap;
}

#title1::before {
content: "Purple Rain";
position: absolute;
bottom: -70px;
font-size: 40px;
text-align: center;
width: 100%;
}

0 comments on commit 25a38d2

Please sign in to comment.