p5sketch

learning p5.js and webGL

sketches

coffee

inspired by a coffee shop

acknowledgements

so far, i haven’t done anything more than hack around on already-written code, specifically Adam Ferriss’ genuary repo and Justin Shrake’s vertex shader repo.

notes

lessons learned

resources

open questions

i really don’t get why i can’t just draw a vertex and have it show up somehow—feels like i shouldn’t need to draw a square or a triangle in order for something to show up:

// why do these need to be triangles? why can't i use a point?
  beginShape(TRIANGLES);
  for (let i = 0; i < numParticles; i++) {
    // triangle 1
    vertex(-0.01, -0.01);
    vertex(-0.01, 0.01);
    vertex(0.01, 0.01);
    // triangle 2
    vertex(-0.01, -0.01);
    vertex(0.01, 0.01);
    vertex(0.01, -0.01);
  }
  endShape();

  // beginShape(POINTS);
  // for (let i = 0; i < numParticles; i++) {
  //   vertex(0.01, 0.01);
  // }
  // endShape();
}