Bullet JavaScript API

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
Post Reply
schteppe
Posts: 4
Joined: Thu Jan 13, 2011 9:26 am

Bullet JavaScript API

Post by schteppe »

Hi all,

I am very happy that Bullet have set its foot inside the browser via the NativeClient. There are already a few examples on how to use it that way.

However, it makes me sad that it cannot be used together with WebGL. For that, a fast JavaScript API is needed. Of course, there is ammo.js (the JavaScript port of Bullet), but it is very heavy for the browser and it scales very badly.

I just discovered FireBreath, a framework for producing browser plugins. FireBreath is a layer on top of the NPAPI and it is supported in almost all browsers. I have succeeded in compiling Bullet into a FireBreath plugin. By generating bindings to Bullet (which I haven't done), a full and browser-native JavaScript Bullet API can be made. Just like IndexedDB, WebCL and other HTML5 javascript extensions.

The current WebGL game developers are looking for javascript physics engines, but the existing ones are far from satisfying.

Wouldn't a Bullet browser plugin be a good idea?

Stefan
granular.cs.umu.se/browserphysics
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Bullet JavaScript API

Post by Erwin Coumans »

Yes, that is a good idea but we lack people to work in it all.

Are you interested in sharing some Javascript bindings?
pp19dd
Posts: 1
Joined: Sat Jun 16, 2012 8:47 pm

Re: Bullet JavaScript API

Post by pp19dd »

Have you seen this bulletjs port? https://github.com/adambom/bullet.js/

It appears to function well, albeit I'd prefer more documentation. About 125kb minified, 220 kb uncompressed. Having only run into it yesterday, I'm trying to put it to use in the coming days.
Post Reply