10/14/2024 Edit: PhSim is no longer updated.
I have been working on a JavaScript library called phsim that allows one to make 2d simulations of objects and make them do all sorts of interesting things. I have released the first alpha version (v0.1.0-alpha) of the phsim library and an editor that helps someone make these simulations.
You can get the phsim library from GitHub or you can download it from npm by downloading the phsim package.
As for the editor, you can try it by clicking this link: https://mjduniverse.com/phsim-editor-app/
Note that these are both in the alpha stage of development. This means that they might have bugs, so be careful when using these! If you see a bug for the GitHub library, please make a bug report. Likewise, if you see a bug in the PhSim editor, please email me or contact me on social media.
Enjoy!