const Engine = Matter.Engine,
const engine = Engine.create();
const render = Render.create({
engine.world.gravity.y = 0;
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 box = Bodies.rectangle(460, 120, 40, 40);
World.add(engine.world, [topWall, leftWall, rightWall, bottomWall, box]);
document.querySelector('#scale').addEventListener('click', function () {
Body.scale( box, 1.5, 1.2);
document.querySelector('#rotate').addEventListener('click', function () {
Body.rotate( box, Math.PI/6);
document.querySelector('#translate').addEventListener('click', function () {
Body.translate( box, {x: -10, y: 20});