motion/open-source creative framework
Explainer Motion 60s // 1080×1920 30 FPS CFR Determinístico

State Machines

When motion explains logic.

A visual exploration of states, events, transitions, and validations, produced entirely with code.

Duration 60.00s // 1.800 frames
Format 9:16 Vertical (1080×1920)
Technologies HTML5 Canvas + JavaScript + Playwright + FFmpeg
Specialty explainer-motion
Real state machine diagram from State Machines
Frame composed from the production’s original diagrams.

master film 9:16

60 SECONDS // CFR

Audiovisual execution with conceptual rigor.

A story about how explicit states give events structure and make each transition visible.

Video in Portuguese, with no audio.

the narrative in 7 acts

07 CENAS
Act 01 — Boolean Soup 00:00 – 00:08
Ato 01 / 07

Boolean Soup

Independent flags can combine loading, error, and success in contradictory ways. The story begins in that confusion.

Diagnosis: 16 blind combinations ($2^4$)
Defect demonstrated: UI state collision
Act 02 — Finite States 00:08 – 00:16
Ato 02 / 07

Finite States

The 16 combinations become four exclusive states: `IDLE`, `FETCHING`, `RESOLVED`, and `ERROR`.

Complexity reduction: 16 states ➔ 4 finite states
Mathematical property: Guaranteed mutual exclusion
Act 03 — The Transition 00:16 – 00:25
Ato 03 / 07

The Transition

An explicit event moves the system from `IDLE` to `FETCHING`. A light pulse follows the transition.

Event: User-triggered FETCH
Mechanics: Vector propagation and causal impact
Act 04 — Logical Guards 00:25 – 00:34
Ato 04 / 07

Logical Guards

The transition only proceeds when `canFetch()` allows it. The composition makes that condition visible.

Condition: canFetch() === true
Safe Zone: Calibrated POI with guaranteed positive clearance
Act 05 — Illegal Event 00:34 – 00:43
Ato 05 / 07

Illegal Event

In `FETCHING`, another `FETCH` opens no new transition. The invalid event meets a barrier.

Rejected Event: Repeated FETCH while in FETCHING
Behavior: Deflection preserving system integrity
Act 06 — Full Cycle 00:43 – 00:52
Ato 06 / 07

Cycle in Action: Timeout & Retry

A timeout leads to `ERROR`; `RETRY` reopens the cycle, and `SUCCESS` ends at `RESOLVED`.

Flow: IDLE ➔ FETCHING ➔ ERROR ➔ RETRY ➔ RESOLVED
Engineering: Explicit causal recovery transition
Act 07 — FSM Synthesis 00:52 – 01:00
Ato 07 / 07

State Machines — Synthesis

The synthesis brings discrete states, explicit events, and transition rules together in one diagram.

Principles: 01 Discrete · 02 Explicit · 03 Modeling
Rigor: Replaced absolute claims with technical truth

behind the scenes // made with motion

07 STEPS
01

Agent-Driven Creative Direction

The `explainer-motion` specialty orchestrated editorial tone, technical briefing, and scene-by-scene script, balancing cognitive pauses with visual dynamics.

explainer-motion studio-director
02

Programmatic Motion Design

Animation built directly on HTML5 Canvas 2D with zero heavy runtime libraries. Cubic interpolation curves, geometric morphing, and mathematically generated particles.

HTML5 Canvas Math Easing
03

Decoupled 2D Virtual Camera

Strict separation between World Space (pan/zoom over diagrams) and Screen Space (fixed editorial titles with safe zones), preventing layout overlap.

World vs Screen Space Zero Collisions
04

Absolute Frame Rendering

Deterministic contract via `window.__onFrame__(n, 1800, 30)`. No wall clock or frame drop: frame N is mathematically identical across renders.

Deterministic Time 100% Reproducible
05

Headless Playwright Capture

Headless Chromium renders each frame at exact 1080×1920 viewport, capturing 1,800 PNG stills at high fidelity with zero jitter or tearing.

playwright-core Chromium 1248
06

FFmpeg CFR Video Assembly

All 1,800 frames are multiplexed at constant 30 FPS with libx264, High profile, yuv420p chroma, and faststart flag for instant progressive streaming.

FFmpeg H.264 CFR 30fps
07

Visual review and fixes

Frames and cuts were reviewed across the film. The team fixed the findings and checked the final version before publication.

Visual review Targeted fixes

The story in frames

PRODUCTION IMAGES
Contact sheet for State Machines production
A selection of diagrams and visual moments from across the film.
View larger ↗

Built with MOTION Studio.

Open-source agent-powered creative framework. Explore other studio capabilities, including interactive 3D experiences in TRAVESSIA and the open community skill catalog.