change turtle.js starter code
This commit is contained in:
parent
06c47c9e01
commit
4fb8e5cbbc
33
turtle.js
33
turtle.js
|
@ -1,21 +1,22 @@
|
||||||
function turtle(){
|
function turtle(){
|
||||||
|
|
||||||
penColor('blue')
|
bg('blue')
|
||||||
for (let i = 0; i < 100; i++){
|
|
||||||
penSize(randint())
|
penColor('pink')
|
||||||
right(randint());
|
penSize(12)
|
||||||
forward(randint());
|
|
||||||
penColor(color(randint(),randint(),randint()))
|
forward(randint())
|
||||||
|
|
||||||
|
for (let i = 0; i < 13; i++){
|
||||||
|
forward(170)
|
||||||
|
left(120)
|
||||||
|
|
||||||
|
forward(180)
|
||||||
|
|
||||||
|
right(10)
|
||||||
|
|
||||||
|
back(18)
|
||||||
}
|
}
|
||||||
|
|
||||||
penColor(color(100,0,100,50));
|
|
||||||
penSize(20);
|
|
||||||
forward(100);
|
|
||||||
|
|
||||||
penColor(color(100,0,100,150));
|
|
||||||
forward(100);
|
|
||||||
|
|
||||||
penColor(color(100,0,100,250));
|
|
||||||
forward(100);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user