p5js / creative coding
Been following (lagging behind) along the london creative coding book club - not had the chance to join an event yet but it’s on my list!
Here’s a brief script I’ve built as part of an excercise from Nature of code’s ch0 - Randomness
very cool so far.
1<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.1/p5.js"></script>
2
3<script>
4function setup() {
5 createCanvas(windowWidth/3, windowHeight/2);
6 background(8,38,59)
7}
8
9function draw() {
10 if (mouseIsPressed === true) {
11 fill(random(255/2,255));
12 } else {
13 fill(random(0,255/2))
14 }
15
16 circle(mouseX,mouseY,100)
17}
18</script>