Created
September 26, 2020 22:17
-
-
Save Quantalabs/eb196b1cb802f69a4a123d751784f149 to your computer and use it in GitHub Desktop.
Creates random light looking patterns.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Design</title> | |
<style> | |
body{ | |
margin: 0px; | |
background-color: black; | |
overflow-y: hidden; | |
overflow-x: hidden; | |
} | |
</style> | |
</head> | |
<body> | |
<canvas id="c"> | |
<h1>Error 174</h1> | |
Your browser does not support canvas. I don't know the answer, Google it. <br> | |
Or visit my github profile and follow me at <a href="https://github.com/quantalabs">Quantalabs</a> | |
</canvas> | |
</body> | |
<script> | |
var cv = document.getElementById("c") | |
var c = cv.getContext("2d") | |
cv.width = window.innerWidth | |
cv.height = window.innerHeight | |
var a = Math.random()*cv.width | |
var b = Math.random()*cv.height | |
var move = function(){ | |
c.fillStyle = "rgb(0,0,0)" | |
c.fillRect(0,0,cv.width,cv.height) | |
c.fillStyle = "rgb(0,0,255)" | |
for(var i = 0; i<100;i++){ | |
c.fillStyle = "rgba(0,0,255,"+Math.random()+")" | |
var a = Math.random()*cv.width | |
var b = Math.random()*cv.height | |
c.beginPath() | |
c.arc(a,b,20,0*Math.PI,2*Math.PI) | |
c.fill() | |
} | |
} | |
move() | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment