p5js/sketch-template.js

20 lines
385 B
JavaScript
Raw Normal View History

2022-12-11 13:52:13 +00:00
function setup() {
createCanvas(600, 600);
2022-12-11 14:04:43 +00:00
angleMode(DEGREES);
cursor(CROSS);
frameRate(60);
2022-12-11 13:52:13 +00:00
}
function draw() {
background(64);
}
function drawGrid() {
push();
stroke(0, 64);
strokeWeight(1);
for (let x = 0; x < width; x += 10) line(x, 0, x, height);
for (let y = 0; y < height; y += 10) line(0, y, width, y);
pop();
}