Created
July 25, 2022 20:05
-
-
Save nbriz/6089bcc28c0bb0f3132406f69c46b3a9 to your computer and use it in GitHub Desktop.
example-sketch.html
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
<style> | |
body { | |
margin: 0; | |
} | |
</style> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.js"></script> | |
<script> | |
const W = innerWidth | |
const H = innerHeight | |
function setup() { | |
createCanvas(W, H) | |
background(220) | |
for (let i = 0; i <100; i++) { | |
const x = Math.random() * W | |
const y = Math.random() * H | |
const s = Math.random() * 80 + 20 | |
ellipse(x, y, s) | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment