Last active
November 21, 2016 19:15
-
-
Save notepadwebdev/07b69cc1f7a21802ea93fd9e9e00efbb to your computer and use it in GitHub Desktop.
Event handlers for speaker interaction
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
// Event handlers | |
onTouchStart(e) { | |
e.preventDefault(); | |
this.drumloop.play(); | |
this.isPlaying = true; | |
} | |
onTouchEnd(e) { | |
this.drumloop.stop(); | |
this.isPlaying = false; | |
} | |
onTouchMove(e){ | |
if (!this.isPlaying) { | |
return; | |
} | |
this.setLPF(e); | |
this.setPan(e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment