Learn VELATO with Real Code Examples
Updated Nov 26, 2025
Explain
Velato reads Lottie JSON files (exported from After Effects via Bodymovin) into a Rust data structure.
It converts Lottie animation data into a Vello scene that can be rendered by the Vello graphics engine.
Velato supports cross‑platform rendering (desktop via winit, and Web via wasm + WebGPU, where supported).
It enables developers to embed rich vector animations in Rust-based GUI or rendering applications.
Allows animation playback frame by frame using Rust’s rendering loop - useful for games, interactive apps or UI animations.
Core Features
Lottie JSON parsing (`Composition::from_str`)
Renderer that converts Lottie composition into Vello scene
Frame-based rendering: ability to render any frame at arbitrary time index
Support for basic shapes, fills, strokes as included in Vello rendering capabilities
Works with Rust 1.85+ and integrates with WebAssembly target for web builds. :contentReference[oaicite:6]{index=6}
Basic Concepts Overview
Composition - parsed Lottie animation data structure
Renderer - converts Composition to Vello scene per frame
Frame time - you supply a frame index or timestamp to render
Transform and alpha - apply transformations or opacity when rendering into scene
Scene graph - Vello scene containing shapes, fills, strokes for rendering
Project Structure
Cargo.toml - with velato dependency
src/ - Rust source code
assets/ - exported Lottie JSON files (and optionally other assets)
render_loop.rs - rendering logic for desktop or web
static/ or wasm glue - for web builds (if targeting wasm/web)
Building Workflow
Export animation from Adobe After Effects using Bodymovin -> JSON file
Add the JSON file to your Rust project (assets or compile‑time embed)
Parse it using `velato::Composition::from_str(...)`
Initialize Vello renderer in your app’s render loop
Each frame: call `renderer.render(...)` with current time/frame -> draw to screen
Difficulty Use Cases
Beginner: display a simple vector animation from Lottie in a Rust window
Intermediate: combine Lottie animation with custom Rust-drawn UI elements
Advanced: interactive animation with user input, integrating Lottie with event handling
Expert: build a full GUI or game UI using Lottie animations and Vello rendering
Architect: production-quality cross-platform app (desktop + web) using Velato for animations
Comparisons
Velato vs lottie‑web: Rust-native vs JS‑based - Velato for Rust apps, lottie‑web for web frontends
Velato vs custom vector animation in Rust: allows reuse of designer-made Lottie animations instead of handcrafted vector code
Velato vs using raster video/GIF: scalable, vector-quality, lower file size for many animations
Velato vs heavy game engines: lighter, simpler vector animations without full game engine overhead
Velato vs writing custom SVG/CSS animations: brings AE-level animation richness to Rust with GPU rendering
Versioning Timeline
2024 - Velato initial release (v0.1.0)
2024–2025 - Incremental updates improving Lottie compatibility (v0.3 -> v0.6) :contentReference[oaicite:12]{index=12}
2025 - Compatibility matched against Vello v0.5
2025 - Ongoing community contributions and bug fixes
Future - further Lottie feature support and performance refinements
Glossary
Lottie JSON - exported animation data from After Effects
Vello - Rust GPU-accelerated 2D graphics engine
Velato - crate to parse Lottie JSON and render via Vello
Composition - data structure holding animation data
Renderer - component that renders composition to a scene per frame