# eomtaejun/window_seat architecture

> Architecture diagram of the GitHub repository eomtaejun/window_seat, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eomtaejun/window_seat
- Repository: https://github.com/eomtaejun/window_seat

## Overview

창가 한 자리는 Three.js 기반의 휴식형 기차 여행 웹게임입니다. 사용자는 여행을 시작하고 객실을 걷고 연결문을 지나 창가에 앉아 풍경을 감상하며, 날씨·시간·풍경·음량을 바꿔 시각·음향 환경을 조정합니다. 구현의 중심은 `src/main.js`로, 객실과 입력 상호작용을 관리하고 풍경 생성 및 절차적 오디오에 위임합니다. README에 적힌 기능 중 발췌로 구체 연결이 보이지 않는 조작·착석 관계는 문서 근거로만 표시했습니다.

Main entry points: [`src/main.js`](https://github.com/eomtaejun/window_seat/blob/main/src/main.js) (게임 런타임), [`index.html`](https://github.com/eomtaejun/window_seat/blob/main/index.html) (여행 설정 UI), [`src/world.js`](https://github.com/eomtaejun/window_seat/blob/main/src/world.js) (반복 풍경), [`public/models`](https://github.com/eomtaejun/window_seat/tree/main/public/models) (GLB 모델)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["게임 경험"]
  node_game["게임 런타임<br/>[main.js]"]
  node_travel_ui["여행 설정 UI<br/>[index.html]"]
  node_room_walk["객실 이동<br/>[main.js]"]
  node_seat_view["창가 착석<br/>[main.js]"]
  node_settings_store[("설정 저장<br/>[main.js]")]
end

subgraph group_scene["3D 장면"]
  node_carriages["객실 구성<br/>[main.js]"]
  node_scenery["반복 풍경<br/>[world.js]"]
  node_renderer["Three.js 렌더링<br/>[main.js]"]
end

subgraph group_ambience["여행 분위기"]
  node_environment["환경 조명<br/>[main.js]"]
  node_weather["날씨 효과<br/>[main.js]"]
  node_sound["절차적 오디오<br/>[audio.js]"]
end

subgraph group_assets["포함 에셋"]
  node_models["GLB 모델"]
end

node_traveler(("여행자"))

node_traveler -->|"시작"| node_game
node_traveler -->|"설정 선택"| node_travel_ui
node_traveler -->|"객실 이동"| node_room_walk
node_traveler -->|"착석 조작"| node_seat_view
node_travel_ui -->|"설정 반영"| node_game
node_game -->|"설정 읽기·쓰기"| node_settings_store
node_game -->|"객실 구성"| node_carriages
node_game -->|"생성 위임"| node_scenery
node_game -->|"오디오 설정"| node_sound
node_game -->|"모델 로드"| node_models
node_scenery -->|"소품 사용"| node_models
node_game -->|"환경 갱신"| node_environment
node_game -->|"날씨 반영"| node_weather
node_game -->|"장면 표시"| node_renderer

click node_game "https://github.com/eomtaejun/window_seat/blob/main/src/main.js"
click node_travel_ui "https://github.com/eomtaejun/window_seat/blob/main/index.html"
click node_room_walk "https://github.com/eomtaejun/window_seat/blob/main/src/main.js"
click node_seat_view "https://github.com/eomtaejun/window_seat/blob/main/src/main.js"
click node_carriages "https://github.com/eomtaejun/window_seat/blob/main/src/main.js"
click node_scenery "https://github.com/eomtaejun/window_seat/blob/main/src/world.js"
click node_environment "https://github.com/eomtaejun/window_seat/blob/main/src/main.js"
click node_weather "https://github.com/eomtaejun/window_seat/blob/main/src/main.js"
click node_sound "https://github.com/eomtaejun/window_seat/blob/main/src/audio.js"
click node_settings_store "https://github.com/eomtaejun/window_seat/blob/main/src/main.js"
click node_models "https://github.com/eomtaejun/window_seat/tree/main/public/models"
click node_renderer "https://github.com/eomtaejun/window_seat/blob/main/src/main.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_game,node_travel_ui,node_room_walk,node_seat_view,node_settings_store toneBlue
class node_carriages,node_scenery,node_renderer toneAmber
class node_environment,node_weather,node_sound toneMint
class node_models toneRose
class node_traveler toneIndigo
```

## Components

### 게임 경험

- [게임 런타임](https://github.com/eomtaejun/window_seat/blob/main/src/main.js): `src/main.js`
- [여행 설정 UI](https://github.com/eomtaejun/window_seat/blob/main/index.html): `index.html`
- [객실 이동](https://github.com/eomtaejun/window_seat/blob/main/src/main.js): `src/main.js`
- [창가 착석](https://github.com/eomtaejun/window_seat/blob/main/src/main.js): `src/main.js`
- [설정 저장](https://github.com/eomtaejun/window_seat/blob/main/src/main.js): `src/main.js`

### 3D 장면

- [객실 구성](https://github.com/eomtaejun/window_seat/blob/main/src/main.js): `src/main.js`
- [반복 풍경](https://github.com/eomtaejun/window_seat/blob/main/src/world.js): `src/world.js`
- [Three.js 렌더링](https://github.com/eomtaejun/window_seat/blob/main/src/main.js): `src/main.js`

### 여행 분위기

- [환경 조명](https://github.com/eomtaejun/window_seat/blob/main/src/main.js): `src/main.js`
- [날씨 효과](https://github.com/eomtaejun/window_seat/blob/main/src/main.js): `src/main.js`
- [절차적 오디오](https://github.com/eomtaejun/window_seat/blob/main/src/audio.js): `src/audio.js`

### 포함 에셋

- [GLB 모델](https://github.com/eomtaejun/window_seat/tree/main/public/models): `public/models`

### Other components

- **여행자**

## Connections

- 여행자 → 게임 런타임: 시작 (evidence: `README.md`)
- 여행자 → 여행 설정 UI: 설정 선택 (evidence: `README.md`)
- 여행자 → 객실 이동: 객실 이동 (evidence: `README.md`)
- 여행자 → 창가 착석: 착석 조작 (evidence: `README.md`)
- 여행 설정 UI → 게임 런타임: 설정 반영 (evidence: `README.md`)
- 게임 런타임 → 설정 저장: 설정 읽기·쓰기 (evidence: `src/main.js`)
- 게임 런타임 → 객실 구성: 객실 구성 (evidence: `src/main.js`)
- 게임 런타임 → 반복 풍경: 생성 위임 (evidence: `src/main.js`)
- 게임 런타임 → 절차적 오디오: 오디오 설정 (evidence: `src/main.js`)
- 게임 런타임 → GLB 모델: 모델 로드 (evidence: `src/main.js`)
- 반복 풍경 → GLB 모델: 소품 사용 (evidence: `src/world.js`)
- 게임 런타임 → 환경 조명: 환경 갱신 (evidence: `README.md`)
- 게임 런타임 → 날씨 효과: 날씨 반영 (evidence: `README.md`)
- 게임 런타임 → Three.js 렌더링: 장면 표시 (evidence: `src/main.js`)
