JavaScript ActionScript Haxe
Switch branches/tags
Clone or download
saharan 1.2.0 update
* fixed `Mat4.ortho`
* modified macros
* moved demo sources from /src to /demo/src/
* fixed collision filtering bug
* added `RigidBody.isSleeping`
Latest commit a4f307b Jan 22, 2018
Permalink
Failed to load latest commit information.
bin/js 1.2.0 update Jan 22, 2018
demos/src/demo 1.2.0 update Jan 22, 2018
docs 1.2.0 update Jan 22, 2018
old Issue #4 Nov 4, 2016
src/oimo 1.2.0 update Jan 22, 2018
LICENSE Create LICENSE Jan 10, 2018
README.md interface bug fixed Jan 12, 2018

README.md

OimoPhysics

A lightweight 3D physics engine.

API Documentation

Demos

  • Press E or Q to change demos
  • Click or tap text to control

Features

  • Written in Haxe
  • Exported as JavaScript (see bin/js/)
    • Public classes and methods will be exposed through windwow.OIMO.
    • e.g. new OIMO.Vec3(1, 2, 3) to create an instance of Vec3 class.
  • Rigid body motion types
    • Dynamic
    • Static
    • Kinematic
  • Fast collision detection with bounding volume hierarchy (BVH)
  • Contacts with friction and restitution
  • Collision geometries
    • Sphere
    • Box
    • Cylinder
    • Cone
    • Capsule
    • Convex hull
  • Joints with springs, limits and motors
    • Spherical (a.k.a. ball and socket, point to point)
    • Revolute (a.k.a. hinge)
    • Cylindrical
    • Prismatic (a.k.a. slider)
    • Universal
    • Ragdoll (a.k.a. cone twist, character)
  • Breakable joints
  • Constraint solvers
    • Direct block MLCP solver
    • Projected Gauss-Seidel solver
  • Sleepings with island splittings
  • Rotation limits
  • Collision event callbacks
  • Collision filterings
  • Collision queries
    • AABB query
    • ray casting
    • convex casting

Compile JavaScript demos in Haxe

  • Use Haxe 4.0.0 or later
  • main class: demo.js.DemoJS
  • Try enabling compiler options if fails
    • -D analyzer
    • -D eval-stack

License

The MIT License


Old Version

  • Written in ActionScript 3.0
  • Supports spheres and boxes as collision shapes
  • Supports various joints (ball and socket, distance, hinge, prismatic, etc...)
  • Fast and stable collision solver
  • Available in old/ directory