35 lines, no comments ยท 621 tokens, written in 0 seconds for $0.0003


 1  let cols, rows, scl = 20, zoff = 0;
 2  
 3  function setup() {
 4    createCanvas(600, 600);
 5    colorMode(HSB, 360, 100, 100, 100);
 6    cols = floor(width / scl);
 7    rows = floor(height / scl);
 8    background(0);
 9  }
10  
11  function draw() {
12    background(0, 0, 8, 25);
13    let xoff = 0;
14    for (let x = 0; x < cols; x++) {
15      let yoff = 0;
16      for (let y = 0; y < rows; y++) {
17        let cx = x * scl + scl / 2;
18        let cy = y * scl + scl / 2;
19        let mouseInfluence = map(dist(cx, cy, mouseX, mouseY), 0, 300, 1, 0, true);
20        let angle = noise(xoff, yoff, zoff) * TWO_PI * 2 + mouseInfluence * PI;
21        let len = scl * (0.5 + noise(xoff + 100, yoff + 100, zoff) * 0.8);
22        push();
23        translate(cx, cy);
24        rotate(angle);
25        stroke((frameCount * 0.5 + x * 4 + y * 2) % 360, 80, 100, 80);
26        strokeWeight(1.5 + mouseInfluence * 2);
27        line(-len / 2, 0, len / 2, 0);
28        pop();
29        yoff += 0.1;
30      }
31      xoff += 0.1;
32    }
33    zoff += 0.01;
34  }
35