Skip to main content

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 ScriptingWith Scripting
Predefined animationsDynamic, data-driven motion
Fixed interactionsComplex game logic
Static layoutsResponsive, procedural layouts
Limited user InputFull interactivity

Choose Your Path​

This course is designed for different experience levels. Choose the path that fits you best:

🌱 New to Programming?

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.

πŸ’» Have Programming Experience?

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 ExpressionsRive Scripts
Single-line or block of codeStructured with lifecycle functions
value + [100, 0] just runsCode runs inside init(), advance(), draw()
Access props via thisComp, thisLayerAccess data via self parameter
Expressions recalculate each frameFull control over when code runs
No drawing capabilitiesFull procedural drawing API
wiggle(), linear() built-inWrite your own utils (or use libraries)
Limited to property valuesCan 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​

Q:What does Rive scripting enable that State Machines alone cannot?
Q:What tool is built into the Rive Editor to help with scripting?

Next Steps​

Choose your path: