feat: Add mouse-based world navigation with drag and touch support

This commit is contained in:
Kacper Kostka (aider)
2025-04-04 11:07:30 +02:00
parent dbcf3a0e61
commit eb9900478d
3 changed files with 89 additions and 26 deletions

View File

@@ -6,7 +6,7 @@
<title>Pixel Sand Simulation</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<body oncontextmenu="return false;">
<div class="container">
<div class="controls">
<div class="tools">
@@ -23,6 +23,7 @@
<div class="info">
<span id="coords">Chunk: 0,0</span>
<span id="fps">FPS: 0</span>
<span class="help-text">Hold Shift/Ctrl or right-click to drag the world</span>
</div>
</div>
<canvas id="simulation-canvas"></canvas>