josephg / Chipmunk-js

Port of slembcke/Chipmunk-Physics to Javascript
http://dl.dropbox.com/u/2494815/demo/Joints.html
537 stars 59 forks source link

fix Body.getVelAtPoint etc and (hopefully) Body.eachConstraint #9

Closed ghost closed 12 years ago

ghost commented 12 years ago

BTW, I don't have any code to test .eachConstraint... in the C version I see func(body, constraint, data); but in your port it's func(constraint); -- should that be this.call(constraint) ? Gahhh, OO strikes again...

nornagon commented 12 years ago

Nope, just func(constraint). The rest of the information will be available in the closure of func, because JavaScript is awesome and has closures.

nornagon commented 12 years ago

PS thanks!