Welcome to Rive Scripting
Rive is a powerful tool for creating interactive graphics that run anywhere. Traditionally, Rive animations are driven by Timelines and the State Machine, which are excellent for predefined motion and transitions.
However, complex interactivity, procedural generation, dynamic layouts, and game logic often require programmatic control.
What Scripting Enablesβ
Rive Scripting allows you to embed code directly within the Rive Editor, executing logic in real-time alongside your designs. This bridges the gap between design and development.
| Without Scripting | With Scripting |
|---|---|
| Predefined animations | Dynamic, data-driven motion |
| Fixed interactions | Complex game logic |
| Static layouts | Responsive, procedural layouts |
| Limited user Input | Full interactivity |
Choose Your Pathβ
This course is designed for different experience levels. Choose the path that fits you best:
Start here: Your First Rive Script
We'll teach you programming concepts from scratch - no prior experience needed. You'll learn what variables, functions, and types are before diving into Rive-specific concepts.
Start here: How Rive Scripts Work
If you know JavaScript, TypeScript, or After Effects expressions, this page maps Rive concepts to what you already know. Get up and running faster with side-by-side comparisons.
Both paths lead to the same place - you can always reference the other track if you want more detail or a different perspective!
Coming from After Effects?β
If you've used AE expressions, here's how Rive scripting compares:
| After Effects Expressions | Rive Scripts |
|---|---|
| Single-line or block of code | Structured with lifecycle functions |
value + [100, 0] just runs | Code runs inside init(), advance(), draw() |
Access props via thisComp, thisLayer | Access data via self parameter |
| Expressions recalculate each frame | Full control over when code runs |
| No drawing capabilities | Full procedural drawing API |
wiggle(), linear() built-in | Write your own utils (or use libraries) |
| Limited to property values | Can create new shapes, respond to events |
Key difference: AE expressions modify property values. Rive scripts can do that AND create entirely new graphics, handle multi-touch, manage game state, and more.
The Rive AI Coding Agentβ
Rive includes an AI Coding Agent built directly into the Editor. This assistant can help you:
- π€ Create new scripts from natural language descriptions
- βοΈ Edit and refactor existing code
- π‘ Explain unfamiliar script logic
- π Debug issues by analyzing your code
The AI agent has seamless integration with Rive's scripting engineβno API keys, external apps, or setup required. It understands the Rive API and can generate correctly-typed code that works with your Artboards and ViewModels.
Knowledge Checkβ
Next Stepsβ
Choose your path:
- π± Beginner: Your First Rive Script - Learn from scratch
- π» Experienced: How Rive Scripts Work - Fast-track with comparisons
- π€ Curious about Luau? Why Luau? - Learn why Rive chose this language
- π Need a reference? Quick Reference