change default example script
This commit is contained in:
parent
08463c49b1
commit
dac2df0c75
27
turtle.js
27
turtle.js
|
@ -1,18 +1,21 @@
|
|||
function turtle(){
|
||||
|
||||
penSize(3);
|
||||
penColor('purple');
|
||||
penColor('blue')
|
||||
for (let i = 0; i < 100; i++){
|
||||
penSize(randint())
|
||||
right(randint());
|
||||
forward(randint());
|
||||
penColor(color(randint(),randint(),randint()))
|
||||
}
|
||||
|
||||
right(randint(100));
|
||||
forward(randint(200));
|
||||
penColor(color(100,0,100,50));
|
||||
penSize(20);
|
||||
forward(100);
|
||||
|
||||
penup();
|
||||
right(randint());
|
||||
forward(randint());
|
||||
penColor(color(100,0,100,150));
|
||||
forward(100);
|
||||
|
||||
penColor(color(100,0,100,250));
|
||||
forward(100);
|
||||
|
||||
penSize(12);
|
||||
penColor('#00ff8f');
|
||||
pendown();
|
||||
right(randint(45));
|
||||
forward(randint(300));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue