Preview:
let bg;

function setup() {
  createCanvas(400, 400, WEBGL);
  bg=createGraphics(400,400);
  bg.stroke(0);
  bg.strokeWeight(2.5);
  for(let i=0;i<1000;i++){
    bg.point(random(width),random(height));
    
  }
}

function draw() {
  background(245);
  rotateX(radians(frameCount));
  texture(bg);
  
  box(100);
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter