You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had the same problem but managed to resolved it by adding global decomp in webpack (the same as provided link). I also think it should be changed, back then I was very confused why my code does not work even after adding global decomp.
Since matter.js tries to evaluate windows.decomp directly when imported ...
... and all imports are done before any other code is run, this (as implied by this example) didn't work for me:
matter-js was still evaluated before
window.decomp = decomp
, and thusvar decomp
would still be undefined.This plugin should check for
window.decomp
first when it's needed (insideBodies.fromVertices
) or at least document this solution from @rykerrumsey.The text was updated successfully, but these errors were encountered: