Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple Javascript Physics Engine

Is there a simple JavaScript physics engine available that can handle some simple 3D scenarios.

I'm aware of the Box2D implementation but I don't think that can do what I need. In essence I want to simulate the behavior of a ball as it interacts with a hole (like putting in golf). Where, depending on the speed, the ball can spin around the hole etc.

like image 217
ConfusedNoob Avatar asked Feb 26 '12 20:02

ConfusedNoob


People also ask

What is physics engine in JavaScript?

Physics engines come in two main forms: high-precision and real-time. High precision engines are used to simulate difficult or critical physics calculations; real-time engines are the types you see in video games.

What is PhysicsJS?

PhysicsJS - A modular, extendable, and easy-to-use physics engine for javascript.

What is ammo JS?

ammo. js is a direct port of the Bullet physics engine to JavaScript, using Emscripten. The source code is translated directly to JavaScript, without human rewriting, so functionality should be identical to the original Bullet.


2 Answers

There is a list of javascript physics libraries here: https://github.com/bebraw/jswiki/wiki/Physics-libraries

like image 157
Jasper Avatar answered Nov 04 '22 15:11

Jasper


https://gamedev.stackexchange.com/questions/5334/do-any-open-source-javascript-3d-physics-engines-exist - this is another post on a similar topic but in stack exchange.

There are also some libraries to be found here: https://github.com/bebraw/jswiki/wiki/Game-Engines

I don't know if any are 'directly' relevant, but perhaps there's something useful and you can update if you find anything?

like image 34
MyStream Avatar answered Nov 04 '22 17:11

MyStream