From 2e9320f9ac342a246486f6fb009132a64cf8806e Mon Sep 17 00:00:00 2001 From: TechRunner Date: Wed, 29 Oct 2025 16:46:22 -0500 Subject: [PATCH] If Entity is shown draw it --- javascript/newsim.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/javascript/newsim.js b/javascript/newsim.js index 5eb3c16..57f317a 100644 --- a/javascript/newsim.js +++ b/javascript/newsim.js @@ -162,17 +162,18 @@ function drawBackground(refImage){ } function drawEntity(entity){ + if (entity.show){ push(); imageMode(CENTER); - translate(entity.x*(worldScale.value()/100), entity.y*(worldScale.value()/100), 0); + translate(entity.x, entity.y, 0); if (entity.type == entityTypes.COMET){ rotate((Math.atan2(entity.vx, entity.vy) - Math.atan2(-1,0)) * 180/Math.PI); - }else{ rotate(entity.rot); } image(images[entity.type], 0,0); pop(); + } } function preload(){