Skip to content

Commit

Permalink
Further cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fromtheeast710 committed Aug 4, 2024
1 parent 9065959 commit f8ce087
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions src/lib/layout/3DFractal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
let oldPos = { x: 0, y: 0 };
const shaderPos = new Float32Array([
1, 0, -1/(Math.sqrt(2)),
-1, 0, -1/(Math.sqrt(2)),
0, 1, 1/(Math.sqrt(2)),
1, 0, -1/Math.sqrt(2),
-1, 0, -1/Math.sqrt(2),
0, 1, 1/Math.sqrt(2),
1, 0, -1/(Math.sqrt(2)),
-1, 0, -1/(Math.sqrt(2)),
0, -1, 1/(Math.sqrt(2)),
1, 0, -1/Math.sqrt(2),
-1, 0, -1/Math.sqrt(2),
0, -1, 1/Math.sqrt(2),
1, 0, -1/(Math.sqrt(2)),
0, 1, 1/(Math.sqrt(2)),
0, -1, 1/(Math.sqrt(2)),
1, 0, -1/Math.sqrt(2),
0, 1, 1/Math.sqrt(2),
0, -1, 1/Math.sqrt(2),
-1, 0, -1/(Math.sqrt(2)),
0, 1, 1/(Math.sqrt(2)),
0, -1, 1/(Math.sqrt(2)),
-1, 0, -1/Math.sqrt(2),
0, 1, 1/Math.sqrt(2),
0, -1, 1/Math.sqrt(2),
]);
const shaderCol = new Uint8Array([
255, 0, 0,
Expand All @@ -39,7 +39,6 @@
255, 0, 0,
0, 255, 0,
0, 0, 255,
]);
function compileShader(gl, type, src) {
Expand Down Expand Up @@ -176,7 +175,11 @@
const progGeoBfr = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, progGeoBfr);
gl.bufferData(gl.ARRAY_BUFFER, Float32Array.from(shaderPos, z => z * 1/1.22), gl.STATIC_DRAW);
gl.bufferData(
gl.ARRAY_BUFFER,
Float32Array.from(shaderPos, z => z * 1/1.22),
gl.STATIC_DRAW
);
const progColBfr = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, progColBfr);
gl.bufferData(gl.ARRAY_BUFFER, shaderCol, gl.STATIC_DRAW);
Expand Down

0 comments on commit f8ce087

Please sign in to comment.