Hello
The first scene: a square turned into a circle.
# Hello: a square drawn, turned into a circle, then moved. The bare form: no class.
# Run it: pymations run hello.py
# Share it: pymations build hello.py -o hello.html
from pymations import *
square = Square(color=YELLOW)
circle = Circle(color=BLUE, fill_opacity=0.5)
play(Create(square))
play(Transform(square, circle))
play(square.animate.shift(RIGHT * 2).scale(0.5))
wait()
Run it yourself
pip install pymations pymations run hello.py
Put it on your website
pymations build hello.py -o site/
Python runs in the visitor's browser, so any static host works. How · This file on GitHub
Hover over the animation for the scrubber: pause, replay, or drag to any moment.