OBJ and glTF loading with CPU skinning for Ruby graphics.
Features · Installation · Quick Start
Riggle turns common 3D asset files into small Ruby scene objects: meshes, primitives, nodes, materials, animation channels, and skinning data.
- 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.
Add Riggle to your Gemfile:
gem "riggle"Then run:
bundle installOr install the released gem:
gem install riggle- Ruby 3.1 or newer.
- RBGL is optional and only needed when using the RBGL adapter.
require "riggle"
scene = Riggle.load("model.obj", normals: :smooth)
primitive = scene.meshes.first.primitives.first
puts primitive.positions.lengthWhen RBGL is available, convert a primitive with:
vertex_buffer, index_buffer = primitive.to_rbglPass an RBGL::Engine::VertexLayout to select an explicit layout.
bundle install
bundle exec rake verifyBug reports and pull requests are welcome at rbgfx/riggle.