Hacking the Browser: mouse move&add rect in p5 sketch

This week, I made a mini library that can allows people to move and add rectangles in their p5 sketches. Here's my code on github.

Here's a video shows how it works.

For next steps, I will make shapes resizable, and find a way to turn this library into a chrome extension that requires less effort for users to use it.