Skip to content

Instantly share code, notes, and snippets.

@notepadwebdev
Last active November 21, 2016 19:15
Show Gist options
  • Save notepadwebdev/2ebd1ae9b7c2daea8344dd53409b4873 to your computer and use it in GitHub Desktop.
Save notepadwebdev/2ebd1ae9b7c2daea8344dd53409b4873 to your computer and use it in GitHub Desktop.
Set the low pass filter based on pageY position
// 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