From 447ff824af7d8076c7536835c97775846e04cda3 Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Wed, 7 Oct 2026 20:50:54 +0200 Subject: [PATCH] Fix initGroundSystem: WebGL constants must use groundGl, not gl Last commit fixed gl calls inside the .then() but missed the calls in the body of initGroundSystem itself. Replaced every gl.X reference with groundGl.X in the new code. --- vendor/clouds3d.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vendor/clouds3d.js b/vendor/clouds3d.js index c9a82a3..bede41d 100644 --- a/vendor/clouds3d.js +++ b/vendor/clouds3d.js @@ -368,13 +368,13 @@ function initGroundSystem(glCtx) { groundCtx.fillStyle = '#7c9aa1'; groundCtx.fillRect(0, 0, groundCanvas.width, groundCanvas.height); groundTexture = groundGl.createTexture(); - groundGl.bindTexture(gl.TEXTURE_2D, groundTexture); - groundGl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true); - groundGl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, groundCanvas); - groundGl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); - groundGl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); - groundGl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); - groundGl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); + groundGl.bindTexture(groundGl.TEXTURE_2D, groundTexture); + groundGl.pixelStorei(groundGl.UNPACK_FLIP_Y_WEBGL, true); + groundGl.texImage2D(groundGl.TEXTURE_2D, 0, groundGl.RGBA, groundGl.RGBA, groundGl.UNSIGNED_BYTE, groundCanvas); + groundGl.texParameteri(groundGl.TEXTURE_2D, groundGl.TEXTURE_WRAP_S, groundGl.CLAMP_TO_EDGE); + groundGl.texParameteri(groundGl.TEXTURE_2D, groundGl.TEXTURE_WRAP_T, groundGl.CLAMP_TO_EDGE); + groundGl.texParameteri(groundGl.TEXTURE_2D, groundGl.TEXTURE_MIN_FILTER, groundGl.LINEAR); + groundGl.texParameteri(groundGl.TEXTURE_2D, groundGl.TEXTURE_MAG_FILTER, groundGl.LINEAR); // Kick off initial fetch rebuildGroundMosaic(GROUND_BASE_X, GROUND_BASE_Y); }