How prestonwanttorevenge/tower-3d works
This is a Da Nang-themed tower-stacking arcade game with event-booth features: players build a tower, trigger game events and landmark unlocks, and can view rankings or claim a prize ticket. The browser app coordinates play and its UI; supporting services provide booth identity, attempt rules, run submission, and leaderboard/admin operations, backed by a server store. Landmark and mascot rendering and sound are distinct presentation capabilities. The empty README and partial excerpts limit confidence about some UI and client/server wiring; unverified links are dashed.
Main entry points: App.tsx Game app · DaNangLandmarkModel.tsx Landmark cutouts · boothApi.ts Booth API client · boothRules.ts Booth rules
Components 28
Game and content
- Game app
src/App.tsx - Tower gameplay
src/components/TowerCanvas.tsx - Game events
src/data/gameEvents.ts - Game state types
src/types/game.ts - Landmark catalog
src/data/landmarks.ts
Player experience
- Landmark artwork
src/canvas/landmarkArt.ts - Landmark cutouts
src/components/DaNangLandmarkModel.tsx - 3D landmark viewer
src/components/DaNangLandmark3DViewer.tsx - Landmark atlas
src/components/LandmarkAtlasModal.tsx - Landmark details
src/components/LandmarkDetailModal.tsx - Mascot viewer
src/components/DragonMascot3DViewer.tsx - Mascot 3D rig
src/three/DragonMascot3D.ts - Mascot renderer
src/three/DragonMascotRenderer.ts - WebGL detection
src/three/webglDetect.ts - Sound effects
src/audio/soundFx.ts - Music lab
src/components/MusicLabPanel.tsx - Organizer branding
src/components/OrganizerLogos.tsx
Booth services
- Booth API client
src/services/boothApi.ts - Booth rules
src/services/boothRules.ts - Device identity
src/services/deviceIdentity.ts - Ticket claim
src/components/ClaimTicketCard.tsx - Leaderboard views
src/components/LeaderboardModal.tsx - Public leaderboard
src/components/LeaderboardDisplayPage.tsx - Event administration
src/components/AdminPanel.tsx
Event backend
- HTTP event service
server/src/index.ts - Server validation
server/src/rules.ts - Event data store
server/src/store.ts
Other components
- Player
Connections 45
- Player → Game app: plays
src/App.tsx - Game app → Tower gameplay: renders
src/App.tsx - Tower gameplay → Game events: uses rules
src/components/TowerCanvas.tsx - Game app → Game events: uses events
src/App.tsx - Game app → Game state types: uses state
src/App.tsx - Tower gameplay → Landmark catalog: uses catalog
src/components/TowerCanvas.tsx - Tower gameplay → Landmark artwork: draws
src/components/TowerCanvas.tsx - Landmark artwork → Landmark catalog: reads catalog
src/canvas/landmarkArt.ts - Game app → Landmark cutouts: loads cutouts
src/App.tsx - Landmark cutouts → Landmark catalog: reads catalog
src/components/DaNangLandmarkModel.tsx - Game app → Landmark atlas: opens
src/App.tsx - Game app → Landmark details: opens
src/App.tsx - Landmark details → 3D landmark viewer: renders
src/components/LandmarkDetailModal.tsx - Landmark details → Landmark cutouts: renders
src/components/LandmarkDetailModal.tsx - Landmark atlas → Landmark cutouts: renders
src/components/LandmarkAtlasModal.tsx - 3D landmark viewer → WebGL detection: checks GPU
src/components/DaNangLandmark3DViewer.tsx - 3D landmark viewer → Landmark cutouts: uses model
src/components/DaNangLandmark3DViewer.tsx - Landmark cutouts → Mascot renderer: uses renderer
src/components/DaNangLandmarkModel.tsx - Game app → Mascot viewer: opens
src/App.tsx - Mascot viewer → Mascot 3D rig: creates rig
src/components/DragonMascot3DViewer.tsx - Mascot viewer → WebGL detection: checks GPU
src/components/DragonMascot3DViewer.tsx - Mascot renderer → Mascot 3D rig: creates rig
src/three/DragonMascotRenderer.ts - Mascot renderer → WebGL detection: checks GPU
src/three/DragonMascotRenderer.ts - Game app → Sound effects: plays effects
src/App.tsx - Game app → Music lab: opens
src/App.tsx - Game app → Device identity: gets device ID
src/App.tsx - Game app → Booth API client: requests session
src/App.tsx - Game app → Booth rules: uses config
src/App.tsx - Ticket claim → Booth rules: checks eligibility
src/components/ClaimTicketCard.tsx - Game app → Ticket claim: shows claim
src/App.tsx - Game app → Leaderboard views: opens
src/App.tsx - Leaderboard views → Booth API client: fetches rankings
src/components/LeaderboardModal.tsx - Leaderboard views → Booth rules: formats ranks
src/components/LeaderboardModal.tsx - Public leaderboard → Booth API client: fetches rankings
src/components/LeaderboardDisplayPage.tsx - Public leaderboard → Booth rules: formats ranks
src/components/LeaderboardDisplayPage.tsx - Game app → Event administration: opens
src/App.tsx - Event administration → Booth API client: manages event
src/components/AdminPanel.tsx - Event administration → Booth rules: uses rules
src/components/AdminPanel.tsx - Event administration → Organizer branding: renders
src/components/AdminPanel.tsx - Public leaderboard → Organizer branding: renders
src/components/LeaderboardDisplayPage.tsx - Mascot viewer → Sound effects: plays effects
src/components/DragonMascot3DViewer.tsx - Booth API client → HTTP event service: calls HTTP API
- HTTP event service → Server validation: validates
server/src/index.ts - HTTP event service → Event data store: reads and writes
server/src/index.ts - Event data store → Server validation: uses rules
server/src/store.ts