Dead Simple Example of P5.js + Matter.js
Stripped to Bare Essentials
I have recently (April, 2024) started using the Matter.js physics library. I plunged right into my bike jump project, so the code has lots of extraneous stuff. This example is intended to remind me of the minimal stuff you need to bring Matter into a P5-based script. Click anywhere in the Canvas to create new falling boxes.