How waifwu/kagetstream works
Kagetsu Tohya is a browser port of the original NScripter game: the player opens the page, which loads extracted scripts and assets, runs the selected story, and presents it through a canvas and interface. The runtime also adds saves, settings, galleries, a flowchart, and an optional walkthrough; a small Electron app wraps the same game and can update itself. Edges follow README statements and source-index imports. Some runtime wiring and the updater implementation were not excerpted, so those details are not inferred.
Main entry points: main.js Browser entry · ui.js Game UI · input.js Story input · engine.js Script interpreter
Components 19
Game runtime
- Browser entry
js/main.js - Script interpreter
js/engine.js - Canvas graphics
js/gfx.js - Story text
js/text.js - Game audio
js/audio.js - Story input
js/input.js - Key bindings
js/keys.js - Saves and settings
js/storage.js
Reader interface
- Menus and pages
js/shell.js - Game UI
js/ui.js - Menu redraws
js/skins.js - Interface translations
js/i18n.js - Story flowchart
js/flowchart-model.js - Optional walkthrough
js/guide.js
Game data
- Scripts and assets
data
Desktop app
- Electron wrapper
desktop/main.js - Desktop updater
desktop/updater.js
Other components
- Player
- Release service
Connections 25
- Player → Browser entry: opens game
README.md - Browser entry → Script interpreter: starts runtime
js/main.js - Browser entry → Canvas graphics: creates renderer
js/main.js - Browser entry → Story text: creates text layer
js/main.js - Browser entry → Game audio: creates audio
js/main.js - Browser entry → Story input: loads input
js/main.js - Browser entry → Saves and settings: loads storage
js/main.js - Browser entry → Game UI: loads UI
js/main.js - Browser entry → Menus and pages: loads shell
js/main.js - Browser entry → Menu redraws: loads skins
js/main.js - Browser entry → Optional walkthrough: creates guide
js/main.js - Browser entry → Interface translations: loads translations
js/main.js - Browser entry → Key bindings: loads key bindings
js/main.js - Scripts and assets → Script interpreter: provides game script
README.md - Scripts and assets → Canvas graphics: provides assets
README.md - Story input → Key bindings: uses bindings
js/input.js - Story input → Canvas graphics: uses renderer
js/input.js - Game UI → Script interpreter: reads story state
js/ui.js - Game UI → Story text: cleans labels
js/ui.js - Game UI → Story flowchart: builds flowchart
js/ui.js - Game UI → Optional walkthrough: uses similarity
js/ui.js - Menus and pages → Story flowchart: parses conditions
js/shell.js - Electron wrapper → Browser entry: serves same game
README.md - Electron wrapper → Desktop updater: loads updater
desktop/main.js - Desktop updater → Release service: checks releases
README.md