From 40fcea0548eeb9b1d629ca14d6e82a97e381b871 Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Wed, 7 Oct 2026 20:37:58 +0200 Subject: [PATCH] Fix clouds3d: JS line comments inside FRAG_SRC array broke parsing When I added the ground-texture code I left the comment as multiple JS-line-comments ('// Horizon...') between strings. Those are NOT inside any string, so JS sees: '// Horizon: ... satellite <- opens string, never closes // ground texture ... <- JS thinks these are line comments ... The string stays open until the next ',, then the next string line parses as a continuation of an unterminated string and the whole file is rejected. Wrap the comment into one quoted string. --- vendor/clouds3d.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/vendor/clouds3d.js b/vendor/clouds3d.js index 21d7fde..2ab8768 100644 --- a/vendor/clouds3d.js +++ b/vendor/clouds3d.js @@ -195,11 +195,7 @@ var FRAG_SRC = [ // remain visible against a deep but not void-black sky. 'float skyDarkness = nightFactor * 0.55;', 'col = mix(col, col * (1.0 - skyDarkness), 1.0 - cloud);', - '// Horizon: when looking down (rd.y < 0), sample the satellite - // ground texture based on ray direction. Use the horizontal - // component as a UV — the further off-axis, the more the - // texture scrolls. Adds parallax-like feel even though the - // ground is a flat image. + '// Horizon: when looking down (rd.y < 0), sample the satellite ground texture based on ray direction. Use the horizontal component as a UV \u2014 the further off-axis, the more the texture scrolls. Adds parallax-like feel even though the ground is a flat image.', 'float gmask = smoothstep(-0.02, -0.20, rd.y);', 'vec2 gUv = vec2(rd.x * 0.5 + 0.5, -rd.y * 0.5 + 0.3);', 'vec3 groundCol = texture2D(uGround, gUv).rgb;',