Skip to content
rbgfxPublic

About

Load OBJ, glTF, and GLB assets into Ruby scenes with animation and CPU skinning.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Riggle

OBJ and glTF loading with CPU skinning for Ruby graphics.

Gem Version Downloads Ruby Version License

Features · Installation · Quick Start


Riggle turns common 3D asset files into small Ruby scene objects: meshes, primitives, nodes, materials, animation channels, and skinning data.

Features

  • OBJ loading with fan triangulation and negative indices.
  • glTF JSON and GLB loading, including data URI buffers and accessors.
  • Node transforms, materials, animation channels, and scene traversal.
  • Linear blend skinning (LBS) and dual quaternion skinning (DQS).
  • An optional RBGL adapter for vertex and index buffers.
  • Defaults for missing normals, UVs, and colors when adapting to RBGL.

Installation

Add Riggle to your Gemfile:

gem "riggle"

Then run:

bundle install

Or install the released gem:

gem install riggle

Requirements

  • Ruby 3.1 or newer.
  • RBGL is optional and only needed when using the RBGL adapter.

Quick Start

require "riggle"

scene = Riggle.load("model.obj", normals: :smooth)
primitive = scene.meshes.first.primitives.first
puts primitive.positions.length

When RBGL is available, convert a primitive with:

vertex_buffer, index_buffer = primitive.to_rbgl

Pass an RBGL::Engine::VertexLayout to select an explicit layout.

Development

bundle install
bundle exec rake verify

Contributing

Bug reports and pull requests are welcome at rbgfx/riggle.

License

MIT

About

Load OBJ, glTF, and GLB assets into Ruby scenes with animation and CPU skinning.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages