-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinfoScript.js
More file actions
43 lines (36 loc) · 1.35 KB
/
infoScript.js
File metadata and controls
43 lines (36 loc) · 1.35 KB
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
35
36
37
38
39
40
41
42
43
// let counterDisplayElem = document.getElementById("counter-display");
let counterMinusElem = document.getElementById("counter-minus");
let counterPlusElem = document.getElementById("counter-plus");
let count = -1;
// updateDisplay();
console.log(count);
counterPlusElem.addEventListener("click", () => {
count++;
var colors = [
'url("img-buttons/Group45.png")',
'url("img-buttons/Group46.png")',
'url("img-buttons/Group47.png")',
'url("img-buttons/Frame1.png")',
];
document.getElementById("buuble").style.backgroundImage = colors[count];
if (count > 2) {
counterPlusElem.style.backgroundImage = 'url("img-buttons/Play.png")';
document.getElementById("counter-plus").onclick = function () {
document.getElementById("playHerf").href = "./game.html";
};
document.getElementById("buuble").style.width = "995px";
document.getElementById("buuble").style.height = "437px";
document.getElementById("buuble").style.left = "242px";
document.getElementById("character").style.display = "none";
document.getElementById("counter-minus").style.display = "none";
}
});
window.addEventListener("deviceorientation", handleOrientation);
function handleOrientation(event) {
const alpha = event.alpha;
const beta = event.beta;
const gamma = event.gamma;
console.log(alpha);
console.log(beta);
console.log(gamma);
}