Files
cocos4/cocos2d/core/physics/box2d-adapter.js
T
yinkaile 204b112145 update to box2d.ts (#2964)
* update to box2d.ts

* update to box2d.ts

* update to box2d.ts

* fixed debug draw color

* update to box2d.ts

* fixed physics manager

* add license
2018-07-11 15:43:06 +08:00

18 lines
347 B
JavaScript

let box2d = require('../../../external/box2d/box2d');
window.b2 = {};
if (CC_QQPLAY) {
// can only define global variable in this way
b2 = window.b2;
}
for (var key in box2d) {
if (key.indexOf('b2_') !== -1) {
continue;
}
let newKey = key.replace('b2', '');
b2[newKey] = box2d[key];
}
b2.maxPolygonVertices = 8;