1.9 KiB
1.9 KiB
Code Map
Use this map to open the smallest relevant file first.
Simulation
js/sim_core.js: shared simulation helpers, personality definitions,Effect,SpatialGrid, and small drawing helpers used by simulation classes.js/items.js:Itemlifecycle, item save/load restore, grass and zunchi behavior, and item drawing.js/tarinai.js:Tarinaistate, AI, movement, eating, fighting, panic, reproduction-adjacent behavior, and drawing.js/world.js:Worldstate, save/load, spawning, family registry normalization, spatial queries, tools, weather, and update loop coordination.js/sim.js: compatibility export forwindow.TarinaiSim.
UI And Rendering
js/render.js: canvas scene rendering, lighting, weather visuals, HUD, and selected-card overlay.js/ui.js: DOM references, selected/log panels, labels, save/load buttons, tool controls, canvas input, and UI event binding.js/ui_charts.js: colony history aggregation and chart rendering.js/ui_family.js: family tree components, layout, archive rendering, and validation helper.js/ui_exports.js: compatibility export forwindow.TarinaiUI.
Common Tasks
- Change hunger, sleep, fighting, panic, eating, or movement: start with
js/tarinai.js. - Change item growth, zunchi lifecycle, grass spread, or item visuals: start with
js/items.js. - Change save/load, population, spawning, weather, tools, or family data correctness: start with
js/world.js. - Change family tree display only: start with
js/ui_family.js. - Change colony charts: start with
js/ui_charts.js. - Change buttons, selected info, logs, or input handling: start with
js/ui.js. - Change the garden canvas visuals: start with
js/render.js.
Loading Order
index.html loads plain browser scripts in dependency order. Do not convert to ES modules or add a build step unless the project intentionally adopts one later.