How tanmay7264/twin-nagar works
Twin Nagar is a browser-based isometric city and glucose digital twin. The user explores Asha’s day, changes meals or activities in the Twin Lab, compares whole-day glucose outcomes, and can replay the plan with alerts and guard actions. The graph preserves the city, interiors, scenario configuration, simulation, forecasting, and risk-detection capabilities described in the README. Source excerpts show the main module calls; unsampled details are represented only where documented.
Main entry points: city.js Asha and HUD · world.js World engine · interiors.js Building interiors · cityscape.js City fabric
Components 10
City experience
- World engine
world.js - Asha and HUD
city.js - Twin Lab
city.js - Day scenarios
world.config.js
Glucose twin
- Glucose model
twin.js - Alerts and guard
twin.js
City rendering
- City fabric
cityscape.js - Building interiors
interiors.js - People and poses
figures.js
Other components
- Player
Connections 14
- Player → World engine: explores
README.md - World engine → Asha and HUD: starts
world.js - World engine → City fabric: builds
world.js - World engine → Day scenarios: reads settings
world.js - Asha and HUD → Day scenarios: reads scenarios
city.js - Asha and HUD → Glucose model: simulates days
city.js - Asha and HUD → Alerts and guard: checks risk
city.js - Player → Twin Lab: changes plan
README.md - Twin Lab → Glucose model: compares plans
city.js - Twin Lab → Alerts and guard: reports incidents
README.md - Asha and HUD → Building interiors: builds interiors
city.js - City fabric → People and poses: creates figures
cityscape.js - Building interiors → People and poses: poses figures
interiors.js - Building interiors → City fabric: reads floor height
interiors.js