From 80bb0edf032d6225059dae0cc6ed5ce5c66c5d0b Mon Sep 17 00:00:00 2001 From: HyperOnion <> Date: Sat, 24 Jun 2023 20:49:02 +0200 Subject: [PATCH] don't render box contents if they would be small enough to be invisible. --- js/graphics.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/graphics.mjs b/js/graphics.mjs index 6ede0e8..4913583 100644 --- a/js/graphics.mjs +++ b/js/graphics.mjs @@ -33,6 +33,8 @@ export function draw_floor (start_x, start_y, scale, invert = false) { } export function draw_world (box, start_x = 0, start_y = 0, scale = BASE_SCALE) { + if (scale < 1) return; + draw_floor(start_x, start_y, scale, !checkerboard(start_x, start_y)); iter_2d(range(0, world.BOX_SIZE - 1), (x, y) => {