Render shadow per tile in sorted order
This commit is contained in:
1 parent
78b39eab9d
commit
36cfd8c67d
1 file changed
+1
-6
+1
-6
@@ -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]);
|
||||
|
||||
Reference in new issue
Block a user