jonobr1 / Physics

A requirified port of Traer Physics from Processing to JavaScript.
http://jonobr1.github.com/Physics
Other
195 stars 21 forks source link

would be more useful if it didn't assume a browser (e.g. window) #7

Open sandover opened 9 years ago

sandover commented 9 years ago

It would be great to be able to use this as a generic physics engine in any Javascript context, not just one where 'window' is defined. Currently I'm not aware of a way to do that.

jonobr1 commented 9 years ago

Thanks for posting! This commit should remove the window dependency. Though I don't know if this will work with something like browserify.

https://github.com/jonobr1/Physics/commit/f91d609eed3f9e11fcfe91265691a00bec01f71a