UNPKG

planck

Version:

2D JavaScript/TypeScript physics engine for cross-platform HTML5 game development

20 lines (14 loc) 347 B
import planck, { World, Circle, Testbed } from '..'; const world = new World(); const body = world.createBody(); const shape = new Circle(3); body.createFixture({ shape, }); planck.testbed(function(testbed) { testbed.info("Info text"); return world; }); const testbed = Testbed.mount(); testbed.info("Info text"); testbed.start(world);