Created
October 22, 2017 22:25
-
-
Save beefchimi/8c487f8055c23fd2b7fceb85f051592d to your computer and use it in GitHub Desktop.
Example of using Loop.js in the Extensible section
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
import SoundFx from '../../SoundFx'; | |
export default function ExtensibleFeature() { | |
const target = document.getElementById('ExtensibleFeature'); | |
target.addEventListener('mouseenter', () => { | |
SoundFx.Extensible.play(); | |
}); | |
target.addEventListener('mouseleave', () => { | |
SoundFx.Extensible.pause(); | |
}); | |
target.addEventListener('mousedown', () => { | |
SoundFx.Extensible.speed(1.5); | |
}); | |
target.addEventListener('mouseup', () => { | |
SoundFx.Extensible.speed(1); | |
}); | |
return target; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment