Ruby runtime for Spine, the 2D skeletal animation framework.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ext
lib/tasks
spine
.gitignore
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
test.rb

README.md

spine-ruby

This is an attempt to build a MRI ruby wrapper for the Spine 2D skeletal amimation c runtime. If you're interested in helping out, please jump in, clone and have at it!

The main usecase that we'd like to achieve is capturing a point in time in an animation and generate a high quality static image. But I'm sure there are plenty of other use-cases for the ruby runtime...

Tools

To create the wrapper ruby-ffi along with ffi_gen gems were used to generate the included spine.rb file. ffi_gen requires LLVM. I'm working on a mac and installed LLVM via homebrew "brew install llvm"

Build / Installation

Make sure you have installed LLVM. On a Mac:

brew install llvm

Build the included c source:

rake build:source

Build the ffi wrapper:

rake build:wrapper

Testing

There is a basic testing harness that does very little but attempt to poke at the library. You can edit / run it with:

ruby test.rb

The atlas and json files are defined as constants at the top of the file, and currently point at the spineboy example.