Round at draw stage

This commit is contained in:
zenoamaro committed 2019-06-30 02:04:58 +02:00
1 parent 926e41096b
commit 4ba6851165
4 files changed
+28 -17

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@ const TERRAIN_TYPES = {
const ty = clamp(0, cy + dy, height);
const wy = clamp(70, ty, height-70);
cy = wy + (ty-wy) * 0.5;
drawRect(ctx, x, Math.round(cy), 1, Math.round(height-cy), ctx.color);
drawRect(ctx, x, cy, 1, height-cy, ctx.color);
}
cacheImageData(ctx);