Your drawings can move! π¬
Until today, a VeeLang drawing was a picture. It stayed still.
Now it can move. Add in 2 seconds to a change, and VeeLang does it slowly, so you can watch:
Canvas paper having width 400, length 250, fill "lightskyblue"
draw circle sun at 60, 200 having radius 30, fill "gold"
move sun to 340, 60 in 3 seconds
sun.fill = "orange" in 3 seconds
The picture is drawn first. Then, one line after another, the sun rises and turns orange.
Move, turn and grow π
move goes somewhere, turn spins, and grow and shrink change the size. Each one can go to a place or a size, or by an amount:
Canvas paper having width 400, length 250
draw square box at 60, 80 having size 60, fill "tomato"
move box by 220, 0 in 2 seconds
turn box by 90 in 1 second
grow box by 2 in 1 second
You can change anything slowly: a colour, a size, even the words in a text.
Again and again βΎοΈ
forever repeats its lines for ever, and wait waits a little:
Canvas paper having width 400, length 250
draw square fan at 200, 125 having size 80, fill "tomato"
forever {
turn fan by 90 in 1 second
wait 0.5 seconds
}
Two things at once π€Ή
Lines happen one after another. Put them in together, and they happen at the same time:
Canvas paper having width 400, length 250, fill "midnightblue"
draw circle moon at 60, 60 having radius 25, fill "lightyellow"
draw text words at 200, 200 having content "Good night!", size 30, color "white"
hide words
together {
move moon to 340, 60 in 3 seconds
show words in 3 seconds
}
hide and show make a shape disappear and come back, slowly if you give them a time.
Try it! π―
- π Make the sun set again after it rises.
- π Make the fan spin faster.
- π Make a ball that moves across the page and back, for ever.
Learn more in Making Things Move and the animation reference. Have fun! β¨