Commit Graph

10 Commits

Author SHA1 Message Date
hypercross 368d9942d2 refactor(onitama): centralize visual constants in config
Introduce `TEXT_POSITION` and `VISUAL` objects to the configuration
to manage magic numbers for positioning, radii, stroke widths, and
alphas. Update renderers and spawners to use these constants instead
of hardcoded values or direct calculations.
2026-04-20 16:04:29 +08:00
hypercross c25759d147 refactor(onitama): extract tweens into factory functions
Centralize Onitama animation logic by moving inline Phaser tweens
into a dedicated `tweens.ts` configuration file. This improves
reusability and cleans up spawners and renderers.

Also updated documentation to warn against adding interruptions to
looped tweens to prevent game logic hangs.
2026-04-19 12:45:05 +08:00
hypercross b28da1cad3 refactor(onitama): decouple rendering logic into dedicated renderers
Introduces a centralized configuration system and extracts visual
creation logic from spawners into specialized renderer classes:
- CardRenderer
- HighlightRenderer
- PawnRenderer
- SelectionRenderer

This refactor improves separation of concerns by moving Phaser-specific
drawing and animation code out of the spawner/container logic and into
reusable renderer components.
2026-04-19 11:55:18 +08:00
hyper 02d2f45da2 refactor: fix onitama sizing 2026-04-12 19:24:47 +08:00
hyper e5b53c6332 refactor: fix onitama api usage 2026-04-12 19:09:41 +08:00
hypercross 71ccb8732e refactor: some manual changes 2026-04-08 14:21:33 +08:00
hypercross 00fd395873 fix: more issues with ui 2026-04-08 11:06:34 +08:00
hypercross 2beff5c75c fix: fix ui bugs 2026-04-08 08:57:59 +08:00
hypercross d4819f7cc3 feat: more onitama goodness 2026-04-07 17:46:37 +08:00
hypercross 8bbf20f457 feat: onitama 2026-04-07 16:33:41 +08:00