Files
cocos4/cocos/2d/physics/box2d-adapter.js
T
2018-08-30 23:10:27 +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;