Page 1 of 1

Bullet JavaScript API

Posted: Thu Jan 26, 2012 10:44 am
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

Re: Bullet JavaScript API

Posted: Sun Jan 29, 2012 7:11 pm
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?

Re: Bullet JavaScript API

Posted: Sat Jun 16, 2012 8:52 pm
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.