Skip to content

An integration of Rive into Godot 4 using GDExtension

Notifications You must be signed in to change notification settings

BettaSystems/godot-rive

 
 

Repository files navigation

Godot Rive

An integration of Rive into Godot 4.1+ using GDExtension

Warning

This extension is in alpha. That means:

  • You may encounter some bugs
  • It's untested on many platforms
  • Most features are implemented, but the API may change a little

This extensions adds Rive support to Godot 4.

It makes use of the following third-party libraries:

Table of Contents

  1. Features
  2. Building
  3. Installation
  4. Roadmap
  5. Contributing
  6. Screenshots

Features

  • Load .riv files (artboards, animations, and state machines)
  • Listen for input events
  • Change state machine properties in-editor and in code
  • Robust API for runtime interaction
  • Optimized for Godot

Building

Important

These instructions are only tested on M1 MacOS. You may have to modify build/build.py or build/SConstruct for your system.

The following must be installed:

Using brew:

brew install python git scons ninja cmake premake

To build, run the following commands (from the root directory):

cd build
python build.py

To see the available options, run:

python build.py --help

Installation

Important

You will have to compile it manually

  1. Copy demo/bin/, demo/icons/, and demo/rive.gdextension to your project folder
  2. Update the paths in rive.gdextension to match your project folder structure

Roadmap

  • Load .riv files
  • Run and play Rive animations
  • Raster image support
  • Input events (hover, pressed, etc.)
  • Alignment & size exported properties
  • Multiple scenes/artboards
  • Dynamic exported properties based on state machine
  • API for interaction during runtime
  • Add error handling
  • Add signals for event listeners (hover, pressed, etc)
  • Disable/enable event listeners (hover, pressed, etc) in API and editor
  • Optimization
  • Static editor preview
  • Animated editor preview
  • Add reset button
  • .riv ResourceLoader (thumbnails)
  • Other platform support
  • Any missing features

Contributing

Help would be MUCH appreciated testing and/or building for the following platforms:

  • Windows
  • Android
  • iOS
  • Linux
  • Web

Feel free to contribute bug fixes (see open issues), documentation, or features as well.

Screenshots

In-editor screenshot

About

An integration of Rive into Godot 4 using GDExtension

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 88.7%
  • Python 11.3%