From edc9bca0bcd1a566ddd3b0c0c6b66c5a16569207 Mon Sep 17 00:00:00 2001 From: Rezmason Date: Fri, 22 Oct 2021 22:57:22 -0700 Subject: [PATCH] Removing accidental junk function from utils --- js/utils.js | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/js/utils.js b/js/utils.js index 573233a..545097e 100644 --- a/js/utils.js +++ b/js/utils.js @@ -63,34 +63,6 @@ const loadImage = (regl, url) => { }; }; -const loadShader = (regl, url) => { - let texture = regl.texture([[0]]); - let loaded = false; - return { - texture: () => { - if (!loaded) { - console.warn(`texture still loading: ${url}`); - } - return texture; - }, - loaded: (async () => { - if (url != null) { - const data = new Image(); - data.crossOrigin = "anonymous"; - data.src = url; - await data.decode(); - loaded = true; - texture = regl.texture({ - data, - mag: "linear", - min: "linear", - flipY: true, - }); - } - })(), - }; -}; - const loadText = (url) => { let text = ""; let loaded = false;