Skip to content
HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
sounds
.travis.yml
README.md
index.html
style.css

README.md

Drums

Link to application

Play sound function:

function playSound(e) {
            const audio = document.querySelector(`audio[data-key="${e.keyCode}"]`);
            const key = document.querySelector(`.key[data-key="${e.keyCode}"]`);
            if (!audio) return;
            audio.currentTime = 0;
            audio.play();
            key.classList.add('playing');
        }

Remove transition from key:

function removeTransition(e) {
            if (e.propertyName !== 'transform') return;
            this.classList.remove('playing');
        }

License

Drums application is available under the MIT license.

You can’t perform that action at this time.