const Engine = Matter.Engine,
const engine = Engine.create();
const render = Render.create({
const topWall = Bodies.rectangle(400, 10, 800, 20, { isStatic: true });
const leftWall = Bodies.rectangle(10, 150, 20, 300, { isStatic: true });
const rightWall = Bodies.rectangle(790, 150, 20, 300, { isStatic: true });
const bottomWall = Bodies.rectangle(400, 290, 800, 20, { isStatic: true });
const ball = Bodies.circle(90, 280, 20);
World.add(engine.world, [topWall, leftWall, rightWall, bottomWall, ball]);
document.querySelector('#force').addEventListener('click', function () {
Body.applyForce( ball, {x: ball.position.x, y: ball.position.y}, {x: 0.05, y: 0});
document.querySelector('#vforce').addEventListener('click', function () {
Body.applyForce( ball, {x: ball.position.x, y: ball.position.y}, {x: 0, y: -0.05});