Support Fluxion Engine
If you find this project useful, please consider supporting its development.
Support ProjectBefore You Begin
Before proceeding, install fluxion and make sure it is running properly by following the steps in the Installation guide.
Virtual Environment
If you installed fluxion using uv, make sure the virtual environment is activated, or prefix commands with uv run.
This quickstart guide will lead you through creating a sample project using Fluxion: an animation engine for precise programmatic animations.
Create a new project folder:
fluxion init project my-project --defaultOpen main.py:
from fluxion import *
class CreateCircle(Scene):
def construct(self):
circle = Circle()
circle.set_fill(PINK, opacity=0.5)
self.play(Create(circle))Run:
fluxion -pql main.py CreateCircleTIP
All animations must reside within the construct method of a Scene class.
class SquareToCircle(Scene):
def construct(self):
circle = Circle()
circle.set_fill(PINK, opacity=0.5)
square = Square()
square.rotate(PI / 4)
self.play(Create(square))
self.play(Transform(square, circle))
self.play(FadeOut(square))class SquareAndCircle(Scene):
def construct(self):
circle = Circle()
circle.set_fill(PINK, opacity=0.5)
square = Square()
square.set_fill(BLUE, opacity=0.5)
square.next_to(circle, RIGHT, buff=0.5)
self.play(Create(circle), Create(square))class AnimatedSquareToCircle(Scene):
def construct(self):
circle = Circle()
square = Square()
self.play(Create(square))
self.play(square.animate.rotate(PI / 4))
self.play(Transform(square, circle))
self.play(square.animate.set_fill(PINK, opacity=0.5))Continue to the Building Blocks tutorial to learn more, or explore the Examples gallery!
If you find this project useful, please consider supporting its development.
Support Project