feat: Add rabbit entity with dynamic movement and sprite rendering

This commit is contained in:
Kacper Kostka (aider)
2025-04-05 17:20:54 +02:00
parent f9cb363b37
commit f1a18f9168
6 changed files with 307 additions and 0 deletions

View File

@@ -66,6 +66,11 @@ function render() {
// Render physics objects
renderPhysicsObjects(ctx, worldOffsetX, worldOffsetY);
// Render entities
if (typeof renderEntities === 'function') {
renderEntities(ctx, worldOffsetX, worldOffsetY);
}
// Draw cursor position and update debug info
if (currentMouseX !== undefined && currentMouseY !== undefined) {
const worldX = Math.floor(currentMouseX / PIXEL_SIZE) + worldOffsetX;