add turtle triangle icon to end of drawing
This commit is contained in:
parent
fe5f0c1c12
commit
4a9a70fc06
11
lib/plogo.js
11
lib/plogo.js
|
@ -3,6 +3,7 @@ function setup(){
|
|||
createCanvas(windowWidth,windowHeight); //canvas is size of window
|
||||
resetDefaults();
|
||||
turtle();
|
||||
displayTurtle();
|
||||
}
|
||||
|
||||
function resetDefaults(){
|
||||
|
@ -61,6 +62,16 @@ function randint(max=100){
|
|||
//default returns int between 0 and 100
|
||||
return int(random(max))
|
||||
}
|
||||
function displayTurtle(){
|
||||
stroke(0,255,0);
|
||||
strokeWeight(1);
|
||||
fill(0,255,0);
|
||||
push()
|
||||
translate(x,y)
|
||||
rotate(angle)
|
||||
triangle(-10,10,10,10,0,-10);
|
||||
pop()
|
||||
}
|
||||
function windowResized(){ //resizes canvas if window is resized
|
||||
resizeCanvas(windowWidth, windowHeight);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user