Last active
November 19, 2018 10:47
-
-
Save 1c7/db5f5f0dfb4a5aa3b01d0a9692895259 to your computer and use it in GitHub Desktop.
Show number of finger touch screen in Real time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#camera-controller").on("touchstart", (e) => { | |
var fingerOnScreen = e.originalEvent.targetTouches.length; | |
$('#finger_count').text(fingerOnScreen); | |
}); | |
$("#camera-controller").on("touchend", (e) => { | |
var fingerOnScreen = e.originalEvent.targetTouches.length; | |
$('#finger_count').text(fingerOnScreen); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Longer version