add layer counter, graphics stuff
This commit is contained in:
parent
f718e8d41f
commit
aa9674718f
4 changed files with 15 additions and 7 deletions
|
@ -1,5 +1,6 @@
|
|||
let hud = document.querySelector('.main-hud');
|
||||
var nothingness = (window.localStorage.getItem('nothings') || 1) * 1, nGain = 0.003;
|
||||
var layers = 1;
|
||||
var getBonus = 0;
|
||||
|
||||
var mx = 0, my = 0;
|
||||
|
@ -40,14 +41,16 @@ document.querySelector('canvas').addEventListener('click', (e) => {
|
|||
|
||||
setInterval(function () {
|
||||
nothingness += nGain + getBonus;
|
||||
layers = Math.log(nothingness + 1) / Math.log(2);
|
||||
nGain = 0.003 + 0.003 * cubePos.length;
|
||||
getBonus *= 0.93;
|
||||
|
||||
hud.textContent = `${numify(nothingness)} nil; ${numify((nGain + getBonus) * 60)} nil/sec`
|
||||
hud.textContent = `${numify(nothingness)} nil; ${numify((nGain + getBonus) * 60)} nil/sec\n`
|
||||
+ `${numify(layers)} layers; ${numify((Math.log(nothingness + nGain + getBonus + 1) / Math.log(2) - layers) * 60)} layers/sec`;
|
||||
|
||||
for (let ab in cubePos) {
|
||||
let a = cubePos[ab];
|
||||
let bonus = 1 + counts.doNothing / (ab* .02 + 2);
|
||||
let bonus = 1 + counts.doNothing / (ab * .02 + 2);
|
||||
bonus = (bonus) ** 0.05;
|
||||
|
||||
let f = (nGain + getBonus * bonus * 10000 + 10) / (nothingness + 10);
|
||||
|
@ -66,6 +69,8 @@ setInterval(function () {
|
|||
|
||||
a[4] += -Math.sin(f * 0.1) * a[0];
|
||||
}
|
||||
|
||||
frames++;
|
||||
}, 1000 / 60)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue