From b793b83c961e0f92a2b9d67041ec214028a50649 Mon Sep 17 00:00:00 2001 From: forgebot Date: Wed, 26 Nov 2025 23:47:50 +0000 Subject: [PATCH 1/9] chore: update version to 1.0.0 [skip ci] --- VERSION | 2 +- portainer.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 8f0916f..3eefcb9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.0 +1.0.0 diff --git a/portainer.yml b/portainer.yml index 55f1f3c..dc71998 100644 --- a/portainer.yml +++ b/portainer.yml @@ -2,7 +2,7 @@ name: threejs-test services: app: - image: git.jusemon.com/jusemon/threejs-test:0.5.0 + image: git.jusemon.com/jusemon/threejs-test:1.0.0 restart: unless-stopped networks: From 80153461e79ddb8e0e8e4fb9cb23e332fe3c2f55 Mon Sep 17 00:00:00 2001 From: Juan Sebastian Montoya Date: Wed, 26 Nov 2025 19:18:09 -0500 Subject: [PATCH 2/9] Hotfix/No way to pause on mobile (#19) - Added pause button functionality to control game state (pause/resume). - Updated sound status button visibility and styling for improved user experience. - Adjusted button styles for better responsiveness and aesthetics on mobile devices. - Implemented logic to show/hide buttons based on game state transitions. This update improves gameplay interaction and visual feedback for users. Reviewed-on: https://git.jusemon.com/jusemon/threejs-test/pulls/19 Co-authored-by: Juan Sebastian Montoya Co-committed-by: Juan Sebastian Montoya --- index.html | 62 ++++++++++++++++++++++++++++++++++++++++++------ src/game/Game.js | 48 +++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 6af2d9b..0929da0 100644 --- a/index.html +++ b/index.html @@ -118,18 +118,57 @@ font-family: 'Courier New', monospace; } #soundStatus { + display: none; position: absolute; top: 20px; - right: 100px; - font-size: 20px; + right: 90px; + background: rgba(0,0,0,0.7); + border: 2px solid white; + color: white; + font-size: 24px; + padding: 10px 15px; + border-radius: 10px; cursor: pointer; z-index: 100; + font-family: Arial, sans-serif; + transition: all 0.2s; user-select: none; - opacity: 0.8; - transition: opacity 0.2s; } #soundStatus:hover { - opacity: 1; + background: rgba(0,0,0,0.9); + transform: scale(1.1); + } + #soundStatus:active { + transform: scale(0.95); + } + #pauseBtn { + display: none; + position: absolute; + top: 20px; + right: 20px; + background: rgba(0,0,0,0.7); + border: 2px solid white; + color: white; + font-size: 24px; + padding: 10px 15px; + border-radius: 10px; + cursor: pointer; + z-index: 100; + font-family: Arial, sans-serif; + transition: all 0.2s; + } + #pauseBtn:hover { + background: rgba(0,0,0,0.9); + transform: scale(1.1); + } + #pauseBtn:active { + transform: scale(0.95); + } + /* Show buttons when game is active */ + @media (max-width: 768px) { + #pauseBtn { + display: block; + } } #perfMonitor { position: absolute; @@ -162,8 +201,15 @@ } #soundStatus { top: 10px; - right: 60px; - font-size: 18px; + right: 80px; + font-size: 20px; + padding: 8px 12px; + } + #pauseBtn { + top: 10px; + right: 10px; + font-size: 20px; + padding: 8px 12px; } #perfMonitor { top: 40px; @@ -186,6 +232,8 @@
🔊
+ +
FPS: 60
Frame: 16.7ms
diff --git a/src/game/Game.js b/src/game/Game.js index 90fc214..a7b922b 100644 --- a/src/game/Game.js +++ b/src/game/Game.js @@ -411,6 +411,16 @@ export class Game { document.getElementById('instructions').style.display = 'block'; } + // Show pause and sound buttons when game starts + const pauseBtn = document.getElementById('pauseBtn'); + if (pauseBtn) { + pauseBtn.style.display = 'block'; + } + const soundStatus = document.getElementById('soundStatus'); + if (soundStatus) { + soundStatus.style.display = 'block'; + } + // Reset UI this.updateUI(); document.getElementById('combo').style.display = 'none'; @@ -436,6 +446,13 @@ export class Game { this.soundSystem.stopBackgroundMusic(); } + // Update pause button text + const pauseBtn = document.getElementById('pauseBtn'); + if (pauseBtn) { + pauseBtn.textContent = '▶️'; + pauseBtn.title = 'Resume Game'; + } + if (this.uiSystem) { this.uiSystem.setState('paused'); } else { @@ -458,6 +475,13 @@ export class Game { }); } + // Update pause button text + const pauseBtn = document.getElementById('pauseBtn'); + if (pauseBtn) { + pauseBtn.textContent = '⏸️'; + pauseBtn.title = 'Pause Game'; + } + if (this.uiSystem) { this.uiSystem.setState('playing'); } else { @@ -476,6 +500,16 @@ export class Game { this.isPaused = false; this.timeScale = 0; // Stop time in menu + // Hide pause and sound buttons when returning to menu + const pauseBtn = document.getElementById('pauseBtn'); + if (pauseBtn) { + pauseBtn.style.display = 'none'; + } + const soundStatus = document.getElementById('soundStatus'); + if (soundStatus) { + soundStatus.style.display = 'none'; + } + // Update UI state if (this.uiSystem) { this.uiSystem.setState('menu'); @@ -516,6 +550,20 @@ export class Game { pauseMenuBtn.addEventListener('click', () => this.returnToMenu()); } + // Pause button (for mobile) + const pauseBtn = document.getElementById('pauseBtn'); + if (pauseBtn) { + pauseBtn.addEventListener('click', () => { + if (this.gameActive && !this.inMenu) { + if (this.isPaused) { + this.resumeGame(); + } else { + this.pauseGame(); + } + } + }); + } + document.getElementById('restartBtn').addEventListener('click', () => this.restart()); // Toggle performance monitor with 'T' key From fe4c91e711f21bad88476a496ff6e61bc867d153 Mon Sep 17 00:00:00 2001 From: forgebot Date: Thu, 27 Nov 2025 00:18:18 +0000 Subject: [PATCH 3/9] chore: update version to 1.0.1 [skip ci] --- VERSION | 2 +- portainer.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 3eefcb9..7dea76e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.0 +1.0.1 diff --git a/portainer.yml b/portainer.yml index dc71998..b654641 100644 --- a/portainer.yml +++ b/portainer.yml @@ -2,7 +2,7 @@ name: threejs-test services: app: - image: git.jusemon.com/jusemon/threejs-test:1.0.0 + image: git.jusemon.com/jusemon/threejs-test:1.0.1 restart: unless-stopped networks: From c4466ae7e66cff2a4f1de69fc19293d0ebd71000 Mon Sep 17 00:00:00 2001 From: Juan Sebastian Montoya Date: Wed, 26 Nov 2025 19:24:25 -0500 Subject: [PATCH 4/9] Hotfix/Cache busting (#20) Reviewed-on: https://git.jusemon.com/jusemon/threejs-test/pulls/20 Co-authored-by: Juan Sebastian Montoya Co-committed-by: Juan Sebastian Montoya --- index.html | 565 +++++++++++++++++++++++++++++------------------------ 1 file changed, 311 insertions(+), 254 deletions(-) diff --git a/index.html b/index.html index 0929da0..d98142e 100644 --- a/index.html +++ b/index.html @@ -1,289 +1,346 @@ - - - + + + 3D Coin Collector Game - - -