Strange behaviour on adding a physics library(box2d js)

I am making project which earlier dont use much physics. But not i want to include box2dweb library in it. Without box2d library everthing works fine. But when i add box2d library rendering do not works properly.
fiddle without box2d library
fiddle with box2d library

It seems box2d overwrites the native Object.defineProperty() which is used at various placed in three.js. The overwrite makes it impossible to properly use the function. For example, it’s not possible anymore to assign ids to geometries (which actually breaks your code).

Without a fix in box2D, it’s not possible to combine both libraries.

Related issue:

2 Likes

it’s a late response…
If you remove following code from box2d.js, it will work again.