Page 2 of 2

Re: Chipmunk.js - Javascript port

Posted: Fri Dec 09, 2011 7:43 am
by trevarthan
That's good to hear, because I suspect JavaScript will become (remain?) the language of choice for cross platform mobile applications in the future. I think platforms like PhoneGap are only going to become stronger. I look forward to using your library on iPhone and Kindle Fire. :)

Re: Chipmunk.js - Javascript port

Posted: Wed Dec 14, 2011 5:52 pm
by funkaster
For now I'm only focusing on getting it complete and stable, but I'll probably try that if the vector operations turn out to be performance hogs. I don't think they were the bottleneck when I profiled it a while ago, but that could easily change with time. (:
For my webgl engine, keeping a vector in the form {x: 0, y:0} vs a native array, say Float32Array(2) or even a plain array was a huge difference. The accessing time for named properties is much higher than plain index on an array. And keep in mind that I was only assigning and storing positions, doing math and more frequent access/write to those objects is going to give you a huge performance boost. If I have some time, I'll make a quick test on my fork to test that.
Anyway, keep up the good work!