From 36cfd8c67dcfa3f2a041e7866ba6a0af7df3ee9f Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Tue, 6 Oct 2026 17:28:49 +0200 Subject: [PATCH] Render shadow per tile in sorted order --- assets/index.html | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/index.html b/assets/index.html index 7a1ab1c..53246dd 100644 --- a/assets/index.html +++ b/assets/index.html @@ -186,11 +186,6 @@ drawTile(wx, wy, level, true, hRight, hBack, false); } - } - - for (var i = 0; i < tiles.length; i++) { - var t = tiles[i]; - var wx = t.x, wy = t.y, h = t.h; for (var level = 1; level <= h; level++) { var sunX = wx + TILE; @@ -203,7 +198,7 @@ var top3 = project(wx + TILE - GAP/2, wy + GAP/2, level * HEIGHT_UNIT); var top4 = project(wx + GAP/2, wy + GAP/2, level * HEIGHT_UNIT); - ctx.fillStyle = 'rgba(0, 0, 0, 0.5)'; + ctx.fillStyle = 'rgba(0, 0, 0, 0.4)'; ctx.beginPath(); ctx.moveTo(top1[0], top1[1]); ctx.lineTo(top2[0], top2[1]);