-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
34 lines (30 loc) · 1.16 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"use strict";
// let lightsabersound = new Audio('https://s3-us-west-2.amazonaws.com/s.cdpn.io/18515/Lightsaber_sound_effect_-_medium_(mp3cut.net).mp3');
// let saberOn = new Audio("http://www.jarrodyellets.com/sounds/saberOn.mp3");
// let saberOff = new Audio("http://www.jarrodyellets.com/sounds/saberOff.mp3");
// lightsabersound.loop = true;
// lightsabersound.volume = 0.25;
// saberOn.volume = 0.25;
// saberOff.volume = 0.25;
// let activeLightsaber = true;
document.documentElement.style.setProperty('--blade-color', 353);
// document.getElementById("lightsaberhand").addEventListener('click', () => {
// if(activeLightsaber == true) {
// setTimeout(function(){
// saberOff.pause();
// saberOff.currentTime = 0;
// saberOn.play();
// }, 1);
// setTimeout(function() {
// lightsabersound.play();
// }, 300);
// }
// else if(activeLightsaber == false) {
// lightsabersound.pause();
// saberOn.pause();
// saberOn.currentTime = 0;
// lightsabersound.currentTime = 0;
// saberOff.play();
// }
// activeLightsaber = !activeLightsaber;
// })