planck.js
planck.js copied to clipboard
Testbed usage in webpack environment
Hi, I'm trying to use the testbed method within a webpack environment without luck.
I'm getting a main.ts?bc82:8 Uncaught TypeError: Object(...) is not a function I'm importing it like so: import { testbed, World, Vec2, Chain, Box, RevoluteJoint, Circle } from 'planck-js'
Any suggestion?
testbed
is not part of the main export, you can import it from testbed folder however:
import { testbed, World, Vec2, Chain, Box, RevoluteJoint, Circle } from 'planck-js/testbed';
There is now a separate build file for testbed which could be used.