Socket
Book a DemoInstallSign in
Socket

mittsu

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mittsu

0.5.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

Mittsu

Gem Version Test Coverage Maintainability Build Status

3D Graphics Library for Ruby

Mittsu is a 3D Graphics Library for Ruby, based heavily on Three.js

GIFs!

Normal-mapped Earth Point Light Tank Demo

(You can find the source for the Tank Demo here)

Installation

Add this line to your application's Gemfile:

gem 'mittsu'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mittsu

Usage

Create a basic scene with a perspective camera and a green box:

require 'mittsu'

scene = Mittsu::Scene.new

camera = Mittsu::PerspectiveCamera.new(75.0, 1.0, 0.1, 1000.0)
camera.position.z = 5.0

box = Mittsu::Mesh.new(
  Mittsu::BoxGeometry.new(1.0, 1.0, 1.0),
  Mittsu::MeshBasicMaterial.new(color: 0x00ff00)
)

scene.add(box)

More Resources

Mittsu follows a similar structure to THREE.js, so you can generally use the same documentation for a description of the various classes and how they work.

If you want to actually render scenes, you'll need a renderer. There is a reference OpenGL renderer here.

See also

Where is Mittsu used?

  • Manyfold - A self-hosted digital asset manager for 3d print files.

Where you can help

  • Testing!

    Currently the only unit tests are for most of the maths library.

  • Refactoring!

    The code is unfortunately still a mess. Mittsu started out as a direct port of THREE.js, and JavaScript to Ruby is not an exact science.

  • Find Bugs!

    Mittsu is still very young, and there are plenty of small bugs and glitches that need to be ironed out. If you find a bug, create an issue so we can track it and squash it.

  • Add all the features!

    Some of the things I'd like to see ported from THREE.js include:

    • Picking (clicking on 3D objects in a scene)
    • Bone structure/animation (e.g. for character movements)
    • Lens Flares! (for JJ Abrams)
    • All the Extras and Helpers (who doesn't need extra help?)
  • Write documentation!

    You can use the same docs as THREE.js for now, but I would like to provide Mittsu-specific documentation so devs don't have to keep replacing new THREE.Thing() with Mittsu::Thing.new.

Contributing

  • Fork it ( https://github.com/danini-the-panini/mittsu/fork )
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create a new Pull Request

Thank you for helping me help you help us all. ;)

FAQs

Package last updated on 17 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.