+var b2Vec2 = yf.argcd(
+ function (a) {
+ return b2Vec2.call(this, a[0] || a.x || 0.0, a[1] || a.y || 0.0);
+ },
+ Box2D.b2Vec2
+);
+
+
+yf.ipairs(function (k, v) { Box2D[k] = Box2D[v]; }, {
+ DYNAMIC_BODY: 'b2_dynamicBody'
+});
+
+function accessor (T, p) {
+ if (p[0].toLowerCase() === p[0])
+ return { get: T.prototype['get_' + p],
+ set: T.prototype['set_' + p] };
+ else
+ return { get: T.prototype['Get' + p],
+ set: T.prototype['Set' + p] };
+}
+
+yT.defineProperties(Box2D.b2Vec2.prototype, {
+ x: accessor(Box2D.b2Vec2, 'x'),
+ y: accessor(Box2D.b2Vec2, 'y'),
+ 0: { alias: 'x' },
+ 1: { alias: 'y' },
+});
+
+yT.defineProperties(Box2D.b2BodyDef.prototype, {
+ type: accessor(Box2D.b2BodyDef, 'type'),
+ position: accessor(Box2D.b2BodyDef, 'position'),
+});
+
+yT.defineProperties(Box2D.b2Body.prototype, {
+ position: accessor(Box2D.b2Body, 'Position'),
+ linearVelocity: accessor(Box2D.b2Body, 'LinearVelocity'),
+ angle: accessor(Box2D.b2Body, 'Angle'),
+});
+
+