{"size": 921, "ext": "js", "max_stars_repo_path": "src/2021/21-X73/sketch.js", "max_stars_repo_name": "AmriArshad/p5js-sketches", "max_stars_repo_stars_event_min_datetime": "2022-01-08T22:01:06.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-12T21:18:22.000Z", "max_issues_repo_path": "src/2021/21-X73/sketch.js", "max_issues_repo_name": "AmriArshad/Holocryptic", "max_issues_repo_issues_event_min_datetime": "2021-12-24T08:05:16.000Z", "max_issues_repo_issues_event_max_datetime": "2021-12-24T08:05:16.000Z", "max_forks_repo_path": "src/2021/21-X73/sketch.js", "max_forks_repo_name": "AmriArshad/Project-Polygon", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 17.3773584906, "max_line_length": 62, "alphanum_fraction": 0.5005428882}
// Invasion
// 12/9/21

let yoff = 0;
let particles = [];

function setup() {
  createCanvas(1080, 1080);
  for (let i = 0; i < width / 30; i++) {
    particles.push(new Particle());
  }
}

function draw() {
  background(0);

  // ships
  for (let i = 0; i < particles.length; i++) {
    particles[i].update();
    particles[i].draw();
  }

  // portal
  push();
  fill(0);
  stroke(255, 100);
  translate(-200, height / 2);
  for (let i = 0; i < 5; i++) {
    push();
    beginShape();
    let xoff = 1;
    for (var a = 0; a < TWO_PI; a += 0.01) {
      let offset = map(noise(xoff, yoff / 10), 0, 1, 25, 100);
      let r = 500 + offset;
      let x = r * cos(a + offset);
      let y = r * sin(a + offset);
      vertex(x, y);
      xoff += 0.01;
    }
    endShape();
    pop();
  }
  pop();

  // placeholder ellipse
  push();
  fill(0);
  noStroke();
  ellipse(-200, height / 2, 1000);
  pop();

  yoff += 0.005;
}