Haven't looked too much at the API, but right off the bat I would suggest a more compelling suite of demos, with collision, stacking, etc...I may just be missing the links.
You're definitely targeting a gaping niche IMO though (same one I'm trying to fill through a side project). Using Box2D in JavaScript feels like programming in assembly sometimes.
It is! I'm the author of newton and didn't realize it was going to be published on hacker news. It's fast and simple but lacks some basic features I'm rounding out - plus it needs more examples and a test suite.
You really need to submit a single newton.js to GitHub so people can try it out more easily. (how I did it for my library[1]. Other than that, I've been using Chipmunk-JS lately and struggling a bit here and there so I very much look forward to using Newton.
Author of ChipmunkJS here. I did some benchmarks moving things to typed arrays about a year ago, and the change was a wash in my benchmark results. I think that might not be the case now considering all the optimizations the v8 team have been making to asmjs-like code.
I did some quick benchmarks using emscripten recently and performance absolutely blew away my hand-tweaked chipmunk code[3]. Hand optimized, ChipmunkJS takes 2.8x as long to run the tests. Emscripten compiled chipmunk is 1.4x, so twice as fast.
That said, the generated code is huge and awful, and the API is terrible. I've been playing around with porting my library to LLJS recently, but when I looked at LLJS it hadn't been updated in over a year. Its nice to see that there were some commits a few months ago, but LLJS needs a lot of work before its generally usable. I've been doing some stuff manually as a toy - still not sure where to go with all of this. Bridging from ASMJS to regular javascript makes your API really hard to use.
A primary goal of newton is to be accessible, simple, easily read JavaScript with a minimal build step, so I don't plan on moving to something like LLJS. However, I agree that GC friendliness should be a priority. I may implement object pooling (again), but, after a branch testing just that, I found no significant performance improvement over the existing mutable-by-default Vectors.
On the other hand, the vec2 class of glMatrix looks fantastic and this is something to consider. Thanks!
This would be perfect for my idea of a tool for teaching programming to kids: a small game framework that they can program with a DSL, then teach them to hack the DSL....
You're definitely targeting a gaping niche IMO though (same one I'm trying to fill through a side project). Using Box2D in JavaScript feels like programming in assembly sometimes.