This commit is contained in:
biglyderv 2025-03-05 01:10:20 -05:00
parent 659274b087
commit a455575a64
Signed by: biglyderv
GPG key ID: 0E2EB0B4CD7397B5
4 changed files with 11 additions and 8 deletions

View file

@ -50,13 +50,15 @@
<script src="/js/twgl.min.js"></script>
<script src="/js/idle.js" defer></script>
<script src="/js/index.js" defer></script>
<script src="/js/upgrade.js" defer></script>
<link rel="stylesheet" href="main.css">
</head>
<body>
<canvas id="c" width="640" height="480"></canvas>
<div class='hud'>
hud
<div class='main-hud'>hud</div>
<button class='buy'>test</button>
</div>
</body>

View file

@ -67,9 +67,3 @@ window.addEventListener('click', async (e) => {
nGain = oldNGain;
clicking = false;
})
setInterval(function() {
cubePos.push([Math.random() * 1000 - 500, Math.random() * 1000 - 500, Math.random() * 30 - 200,
Math.random() * 2 - 1, Math.random() * 2 - 1, Math.random() * 2 - 1
])
},100)

View file

@ -142,7 +142,7 @@ function renderThing() {
requestAnimationFrame(renderThing);
}
let hud = document.querySelector('.hud');
let hud = document.querySelector('.main-hud');
main();
requestAnimationFrame(renderThing)

7
docs/js/upgrade.js Normal file
View file

@ -0,0 +1,7 @@
document.querySelector('.buy').addEventListener('click', () => {
if (nothingness < 10) return;
nothingness -= 10;
cubePos.push([Math.random() * 1000 - 500, Math.random() * 1000 - 500, Math.random() * 30 - 200,
Math.random() * 2 - 1, Math.random() * 2 - 1, Math.random() * 2 - 1
])
})