add unions
This commit is contained in:
parent
ce6c859e9c
commit
e832b8f630
3 changed files with 33 additions and 10 deletions
|
@ -132,12 +132,17 @@ function renderThing() {
|
|||
if (sizes > 10) sizes = 10;
|
||||
if (sizes < 3) sizes = 3;
|
||||
|
||||
positions = MDN.createCubeData(1,1,1);
|
||||
positions = MDN.createCubeData(1, 1, 1);
|
||||
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(positions), gl.STATIC_DRAW);
|
||||
|
||||
for (let cubie of cubePos) {
|
||||
for (let ii in cubePos) {
|
||||
let cubie = cubePos[ii];
|
||||
let vp = MDN.rotateYMatrix(Math.log(nothingness + 1) * cubie[2] / 10);
|
||||
vp = MDN.multiplyMatrices(MDN.scaleMatrix(sizes,sizes,sizes), vp)
|
||||
|
||||
let bonus = 1 + counts.doNothing / (ii + 2);
|
||||
bonus = bonus ** (1 / 2);
|
||||
|
||||
vp = MDN.multiplyMatrices(MDN.scaleMatrix(sizes * bonus, sizes * bonus, sizes * bonus), vp)
|
||||
vp = MDN.multiplyMatrices(MDN.translateMatrix(cubie[0], cubie[1], cubie[2]), vp)
|
||||
|
||||
gl.uniformMatrix4fv(vpBuffer, false, new Float32Array(vp));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue