fix: Remove duplicate RABBIT declaration and move toggleDebug function

This commit is contained in:
Kacper Kostka (aider) 2025-04-05 16:26:18 +02:00
parent bdab2974c6
commit bcd61b7433
2 changed files with 6 additions and 5 deletions

View File

@ -4,7 +4,7 @@ let isDragging = false;
let lastMouseX, lastMouseY;
let currentMouseX, currentMouseY;
let currentTool = SAND;
const RABBIT = 'RABBIT'; // Add rabbit as a tool
// RABBIT is already defined in constants.js as 15
function setTool(tool) {
currentTool = tool;
@ -200,10 +200,6 @@ function handleTouchMove(e) {
}
}
function toggleDebug() {
debugMode = !debugMode;
document.getElementById('debug-btn').classList.toggle('active');
}
// Set up event listeners
window.addEventListener('load', function() {

View File

@ -68,6 +68,11 @@ function resizeCanvas() {
canvas.height = window.innerHeight - document.querySelector('.controls').offsetHeight;
}
function toggleDebug() {
debugMode = !debugMode;
document.getElementById('debug-btn').classList.toggle('active');
}
function simulationLoop(timestamp) {
// Calculate FPS
const deltaTime = timestamp - lastFrameTime;