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.
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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment