Skip to content

Instantly share code, notes, and snippets.

@lpmtsf
Created November 24, 2019 17:54
Show Gist options
  • Select an option

  • Save lpmtsf/67e2fbbd4f07168e2f2c828fa92f135a to your computer and use it in GitHub Desktop.

Select an option

Save lpmtsf/67e2fbbd4f07168e2f2c828fa92f135a to your computer and use it in GitHub Desktop.

Revisions

  1. lpmtsf created this gist Nov 24, 2019.
    8 changes: 8 additions & 0 deletions P5 starter kit
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    function setup() {
    createCanvas(400, 400); // canvas
    angleMode(DEGREES); // lets use degrees instead of radians
    rectMode(CENTER); // lets our rectangles starts from center
    ctx = drawingContext; // this one is for using native Js canvas features
    x = width / 2; // x coordinate of center of canvas
    y = height / 2; // y coordinate of center of canvas
    }