josephg / Chipmunk-js

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

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

Closed ghost closed 11 years ago

ghost commented 11 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 11 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 11 years ago

PS thanks!