How to include liquidfun physics engine with nodejs
问题 I have been making a game with box2dweb and node.js. Everything has been working fine until I decided to switch to Google's LiquidFun engine, which is also based on Box2d. In box2dweb I could export the modules I needed by adding the following to the bottom of the box2d.js file. module.exports = { b2Vec2: Box2D.Common.Math.b2Vec2, b2BodyDef: Box2D.Dynamics.b2BodyDef, b2Body: Box2D.Dynamics.b2Body }; LiquidFun doesn't use the same namespacing in its compiled file so I tried: module.exports = {