Animation Practice
Practice writing big-bang code and identifying common errors.
Progress bar 1
Make a solid purple bar that starts in the middle of the left side of the screen and grows to the right at a constant rate.
-
Model
-
Draw handler
-
Tick handler
Add in a feature so that the bar shrinks when you wiggle the mouse.
Errors #1
What is wrong?
The variable indoors is an indoor picture.
(define indoors ...)
(define model (overlay pic:stick-figure
(empty-scene 300 200)))
(define (tick-h img)
(overlay img indoors))
Errors #2
What is wrong?
(define start pic:stick-figure)
(define tick-h (beside (square 10 "solid" "white") start))
(big-bang start
(on-draw show-it)
(on-tick tick-h)