Skip to content

Instantly share code, notes, and snippets.

@beefchimi
Created October 22, 2017 22:20
Show Gist options
  • Save beefchimi/d0d0fccb20b114c5bf67c3add539d0b4 to your computer and use it in GitHub Desktop.
Save beefchimi/d0d0fccb20b114c5bf67c3add539d0b4 to your computer and use it in GitHub Desktop.
Example of using Loop.js in the Accessible section
import SoundFx from '../../SoundFx';
export default function AccessibleFeature() {
const target = document.getElementById('AccessibleFeature');
target.addEventListener('mouseenter', () => {
SoundFx.Accessible.play();
});
target.addEventListener('mouseleave', () => {
SoundFx.Accessible.pause();
});
target.addEventListener('mousedown', () => {
SoundFx.Accessible.unmute(1);
});
target.addEventListener('mouseup', () => {
SoundFx.Accessible.mute(1);
});
return target;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment