Fix clouds3d: temporal dead zone on 's' variable

loadImageTexture(s.gl, ...) referenced 's' before its 'var s =
canvas.__state' declaration later in the function. Used
canvas.__state.gl directly since __state was just assigned.
This commit is contained in:
Richard Zink committed 2026-10-07 20:38:49 +02:00
1 parent 40fcea0548
commit c9159a8876
1 file changed
+1 -1
+1 -1
View File
@@ -311,7 +311,7 @@ window.clouds3dRender = function(target) {
// frames render normally before it loads — the shader just // frames render normally before it loads — the shader just
// samples a black texture in the meantime. // samples a black texture in the meantime.
canvas.__groundReady = false; canvas.__groundReady = false;
loadImageTexture(s.gl, 'ground.jpg').then(function(tex) { loadImageTexture(canvas.__state.gl, 'ground.jpg').then(function(tex) {
canvas.__ground = tex; canvas.__ground = tex;
canvas.__groundReady = true; canvas.__groundReady = true;
}).catch(function(err) { }).catch(function(err) {