about summary refs log tree commit diff stats
path: root/html/rogue/js/camera.js
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2024-12-27 08:15:13 -0500
committerelioat <elioat@tilde.institute>2024-12-27 08:15:13 -0500
commit3a4c1117bfc0b902fdec41467bc6528d2f7a6f6d (patch)
tree0fb77b1dcec44380f3949c505b1d5b5da3c9e196 /html/rogue/js/camera.js
parenta7fea5f379187ea7e7ff643215b801832459ed67 (diff)
downloadtour-3a4c1117bfc0b902fdec41467bc6528d2f7a6f6d.tar.gz
*
Diffstat (limited to 'html/rogue/js/camera.js')
-rw-r--r--html/rogue/js/camera.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/html/rogue/js/camera.js b/html/rogue/js/camera.js
index c389b6e..aaeeea9 100644
--- a/html/rogue/js/camera.js
+++ b/html/rogue/js/camera.js
@@ -16,11 +16,11 @@ const Camera = {
         const centerX = state.canvas.width / 2;
         const centerY = state.canvas.height / 2;
         
-        // Calculate distance from center of screen
+        // Distance from center of the screen
         const deltaX = screenX - centerX;
         const deltaY = screenY - centerY;
         
-        // Only move camera if player is outside deadzone
+        // Only move the camera if the player is outside of the deadzone
         if (Math.abs(deltaX) > Config.camera.DEADZONE_X) {
             const adjustX = deltaX - (deltaX > 0 ? Config.camera.DEADZONE_X : -Config.camera.DEADZONE_X);
             this.x += adjustX * Config.camera.FOLLOW_SPEED;