Oh, I see. I use raw javascript so I can see where the confusion occurred on my side.
Many thanks.
A solution to prevent degredation that would be to enable touch controls when touch is being used. Otherwise you can just keep it turned off. Another way to detect mobile devices is to look at the browser useragent and look for Android or IOS in navigator.userAgent.platform on the start-up of the game and enable touch and disable the mouse functionality.
You could also use Worker Threads and SharedArrayBuffers but that could take time to add.
Thanks.