let angle =0;
let hue=0;


function setup() {
  createCanvas(innerWidth, innerHeight);
  strokeWeight(6);

}


function draw() {
  let hue = (int)(10*millis()/2000)%360;
  // console.log(hue); 
  stroke(getColor(hue));
  for(let i=0; i<innerWidth+200; i+=200){
    for(let j=0; j<innerHeight+200; j+=200){

      drawScrewdriver(i,j);
    }
  }

  angle +=sin(millis()/10000)/20;
}



  function drawScrewdriver(xOff, yOff){
    push();
    translate(xOff,yOff);
    scale(0.6);
    rotate(angle);
    beginShape();
    vertex(-10, +100);
    vertex( -10, +200);
    vertex( -20, +210);
    vertex( -10, +240);
    vertex( +10, +240);
    vertex( +20, +210);
    vertex( +10, +200);
    vertex( +10, +100);
    endShape();


    ellipse( 0, 0, 40,40);
    rect( -20, 0, 40, 100);
    line( -8,  +20 , -8,  + 80);
    line( +8,  +20 , +8,  + 80); 
    pop();
  }

  function getColor(hue){
    return color('hsla('+hue+', 100%, 50%, 1)');
  }
  

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/p5.min.js
  2. https://cdn.rawgit.com/spite/ccapture.js/0bb38d6f/build/CCapture.all.min.js