0

What is the best way to add touch input in java script?

I have made a simple snake game

29th Mar 2019, 1:59 AM
Aditya Mahakali
Aditya Mahakali - avatar
2 Answers
+ 2
eventlistener ("click", functionhere)
29th Mar 2019, 4:45 AM
Jason Kennedy
+ 1
By declaring the parameter named event of the callback function to the event listener. The viewport coordinates are properties of the mouseEvent object : event.clientX and event.clientY https://code.sololearn.com/WDymn82FAiHB/?ref=app
29th Mar 2019, 5:27 AM
Gordon
Gordon - avatar