Created
February 21, 2021 03:41
-
-
Save joehonton/f7766a07037481bebf52afbf23fb3687 to your computer and use it in GitHub Desktop.
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
class Gestures { | |
constructor(canvas) { | |
this.canvas = canvas; | |
this.fingerPointers = []; | |
} | |
// finger pointers appearing and disappearing | |
addFinger(event) { ... } | |
updateFinger(event) { ... } | |
removeFinger(event) { ... } | |
cancelFingers(event) { ... } | |
// determining which gesture message to broadcast | |
sendInitialGesture() { ... } | |
sendIntermediateGesture() { ... } | |
sendFinalGesture() { ... } | |
// helpers to identify stationary versus travelers | |
fingerCount() { ... } | |
stationaryCount() { ... } | |
travelerCount() { ... } | |
getStationary() { ... } | |
getSecondStationary() { ... } | |
getTraveler() { ... } | |
getSecondTraveler() { ... } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment