()
| 42 | let heavy: Body | null = null; |
| 43 | |
| 44 | function toggleHeavy() { |
| 45 | if (heavy) { |
| 46 | world.destroyBody(heavy); |
| 47 | heavy = null; |
| 48 | } else { |
| 49 | heavy = world.createBody({ |
| 50 | type: "dynamic", |
| 51 | position: { x: 0.0, y: 9.0 }, |
| 52 | }); |
| 53 | heavy.createFixture({ |
| 54 | shape: new Circle(5.0), |
| 55 | density: 10.0, |
| 56 | }); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | testbed.keydown = function (code, char) { |
| 61 | switch (char) { |
no test coverage detected