diff --git a/src/script.js b/src/script.js index d83d9fb..49cd249 100644 --- a/src/script.js +++ b/src/script.js @@ -114,7 +114,7 @@ async function init() { gl.bindBuffer(gl.ARRAY_BUFFER, null); // set clear colour - gl.clearColor(0.1, 0.1, 0.1, 1.0); + gl.clearColor(...hexToRgb("181825"), 1.0); // start drawing requestAnimationFrame(draw); @@ -171,7 +171,7 @@ async function draw() { requestAnimationFrame(draw); } -function hexColorToFloatArray(hex) { +function hexToRgb(hex) { let r = parseInt(hex.substring(0, 2), 16) / 255; let g = parseInt(hex.substring(2, 4), 16) / 255; let b = parseInt(hex.substring(4, 6), 16) / 255;