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

Bug in Node js #29

Open deniswhite8 opened 10 years ago

deniswhite8 commented 10 years ago

If space don't have static objects, in 2565 lines in cp.js file if(this.root) subtreeQuery(this.root, bb, func); this - global node js object, and it have root property. And the condition is true, although this don't cp.BBTree. Additional check on the this instanceof cp.BBTree solves the problem.

appcrash commented 8 years ago

https://github.com/josephg/Chipmunk-js/pull/34

Maybe this can help you.

c-zhuo commented 6 years ago

Thanks to appcrash that works fine with me