from random import random
import icons

listIcons = [icons.Plane, icons.Train, icons.Car]
colors = ('red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet')
sizes = (70, 60, 50, 40, 30, 20, 10)

for i in listIcons :
    # clear the previous screen with a white box
    Rectangle(width=100, height=100, color='white')
    
    # zip size and color
    for s, c in zip(sizes, colors) :

        # speed of animation fade
        with animation(duration=0.001) :
            i(x=100*random(), y=100*random(), width=s, height=s, color=c, transparency=50)

        # hold the frame before animating again
        with animation(duration=0.1) :
            pass

planes trains and automobiles

by abear

Created 5 years, 11 months ago.