Last active
November 21, 2016 19:15
-
-
Save notepadwebdev/2ebd1ae9b7c2daea8344dd53409b4873 to your computer and use it in GitHub Desktop.
Set the low pass filter based on pageY position
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
// Set the low pass filter based on pageY position | |
// freq value will be between 0 and 10,000 | |
setLPF(e) { | |
let freq = 10000 - ((this.getEvent(e).pageY / $(window).height()) * 10000); | |
this.LPF.frequency = freq; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment