xxxxxxxxxx
let body; // will refer to a physics body (a circle, with a mass, radius, position, velocity, etc)
function setup() {
createCanvas(windowWidth, windowHeight);
let engine = Matter.Engine.create(); //The physics engine!
Matter.Runner.run(engine);
body = Matter.Bodies.circle(width / 2, 0, 100); //x, y, radius
Matter.Composite.add(engine.world, body); //add our body to the world for simulation
}
function draw() {
background(60);
circle(body.position.x, body.position.y, 200); //x, y, diam
}