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.

http://1023.io/blog/wsfvq1qkgzprsuliucxpd75srsx9dh

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.