proper economy, particle fixes
This commit is contained in:
parent
a455575a64
commit
e02b63f13f
5 changed files with 63 additions and 26 deletions
|
@ -113,7 +113,7 @@ function renderThing() {
|
|||
|
||||
gl.uniformMatrix4fv(matBuffer, false, new Float32Array(MDN.perspectiveMatrix(Math.PI * 100 / 180, ratio, 0.01, 1000)));
|
||||
|
||||
hud.textContent = `${Math.floor(nothingness * 100) / 100} nothings; ${Math.floor((nGain + getBonus) * 60 * 100) / 100} nil/sec`
|
||||
hud.textContent = `${Math.floor(nothingness * 100) / 100} nil; ${Math.floor((nGain + getBonus) * 60 * 100) / 100} nil/sec`
|
||||
|
||||
gl.uniform1f(sizeBuffer, -Math.log(nothingness));
|
||||
gl.uniform1f(distBuffer, 0.1 + 3 * nGain / (nGain + nothingness));
|
||||
|
@ -124,7 +124,9 @@ function renderThing() {
|
|||
var count = 6;
|
||||
gl.drawArrays(primitiveType, offset, count);
|
||||
|
||||
let sizes = 1000 / (cubePos.length+30);
|
||||
let sizes = (nGain + 1) / (nothingness + 1) * 1000000 / (cubePos.length+30);
|
||||
sizes = Math.pow(sizes,0.3);
|
||||
if (sizes > 10) sizes = 10;
|
||||
|
||||
positions = MDN.createCubeData(sizes, sizes, sizes);
|
||||
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(positions), gl.STATIC_DRAW);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue