How to implement touch events(iPad) to the following JavaScript functionality?

Hi everyone I have found this JavaScript script on codepen Code Pen Link it’s a HTML canvas element with this nice sort of animation of this blob like circle elements. Anyways you can click and drag it around the page and also use the arrow keys to also control it on desktop. Just wondering how I would go about adding touch events to this so you can tap and drag it around on iPad iPhone etc.

I have tried a lot of different things from searching on the internet from event-listeners touch-events etc but I just can’t get it to work/figure it out. I’m not the best a JavaScript. So I would really appreciate the help if anyone knows how to get this working thanks

Hi everyone, does anyone have any ideas on my original post, I’m struggling with it still, and don’t seem to be getting any replies :frowning: thanks