Skip to content

Instantly share code, notes, and snippets.

@nbriz
Created July 25, 2022 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nbriz/6089bcc28c0bb0f3132406f69c46b3a9 to your computer and use it in GitHub Desktop.
Save nbriz/6089bcc28c0bb0f3132406f69c46b3a9 to your computer and use it in GitHub Desktop.
example-sketch.html
<style>
body {
margin: 0;
}
</style>
<script src="https://cdn.jsdelivr.net/npm/p5@1.4.2/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