-
Notifications
You must be signed in to change notification settings - Fork 5
/
main.js
43 lines (34 loc) · 864 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function setup(){
createCanvas(600,600);
frameRate(30); //changes the framerate
}
function draw(){ //draw by default is 60 fps
background(0); //set the background to rgb(200,200,200)
}
//rectMode(CENTER);
//rect(200,200,100,100);
//ellipse(400,200,100,100);
//circle(600,600,100);
//triangle(100,100,200,100,400,300);
//quad(100,200,100,500,200,500,200,400);
//beginShape();
//vertex(240,240);
//list of vertices
//endShape(CLOSE);
//FILL (color)
//STROKE (color and weight)
//rectMode(CENTER);
//fill("bisque");
//rect(300,300,100,100);
function keyPressed(){
if (key === "t"){
currentThickness +=1 ;
}
if(key === "r"){
currentThickness -= 1;
}
currentThickness = constrain(currentThickness,1,25);
if(key == "c"){
lines = [];
}
}