mirror of
https://github.com/tiennm99/gsd-framework.git
synced 2026-06-06 02:14:06 +00:00
feat(06-03): trigger ripple effect on touch/click input
- Add renderer.addRipple(x, y) call in handleInput method - Ripple appears at touch/click coordinates before tile selection - Provides visual feedback for all input interactions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -259,6 +259,9 @@ export class Game {
|
||||
const x = (clientX - rect.left) * (this.canvas.width / rect.width / dpr);
|
||||
const y = (clientY - rect.top) * (this.canvas.height / rect.height / dpr);
|
||||
|
||||
// Add ripple effect at touch/click point
|
||||
this.renderer.addRipple(x, y);
|
||||
|
||||
// Find tile at coordinates
|
||||
const { size, gap } = CONFIG.tile;
|
||||
const col = Math.floor((x - gap) / (size + gap));
|
||||
|
||||
Reference in New Issue
Block a user