# yu-0312/mock-taiwan architecture

> Architecture diagram of the GitHub repository yu-0312/mock-taiwan, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yu-0312/mock-taiwan
- Repository: https://github.com/yu-0312/mock-taiwan

## Overview

This repository is a local static mirror of Taipei GTA, augmented with browser-side graphics, gameplay, character, and Taiwan-map extensions. The principal workflow is: a player opens the local game, the bundled runtime initializes the world and player, and the optional enhancement scripts attach presentation or gameplay features to its exposed interfaces. The graph also preserves documented character and regional expansions. The original game is minified build output; edges involving unsampled bundles or optional modules are limited to README statements or shown excerpts.

Main entry points: [`assets/game-Cw2XxbBX.js`](https://github.com/yu-0312/mock-taiwan/blob/master/assets/game-Cw2XxbBX.js) (Game Runtime), [`enhance/taipei-characters.js`](https://github.com/yu-0312/mock-taiwan/blob/master/enhance/taipei-characters.js) (Playable Characters), [`index.html`](https://github.com/yu-0312/mock-taiwan/blob/master/index.html) (Browser Entry), [`assets/engine-VjaWSjhW.js`](https://github.com/yu-0312/mock-taiwan/blob/master/assets/engine-VjaWSjhW.js) (Rendering Engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game Runtime"]
  node_entry["Browser Entry<br/>[index.html]"]
  node_game["Game Runtime<br/>[game-Cw2XxbBX.js]"]
  node_engine["Rendering Engine<br/>[engine-VjaWSjhW.js]"]
  node_worlddata["Taipei World<br/>[world-yFrf-opw.js]"]
  node_sites["Taipei Sites"]
end

subgraph group_visual["Visual Enhancements"]
  node_quality["Quality Injection<br/>[enhance.js]"]
  node_enhance["Visual And Gameplay Panel<br/>[taipei-enhance.js]"]
  node_plus["TG+ Enhancements<br/>[tgta-plus.js]"]
end

subgraph group_gameplay["Gameplay Extensions"]
  node_combat["Combat And Wanted"]
  node_tutorial["Tutorial Guidance"]
end

subgraph group_world["World And Characters"]
  node_characters["Playable Characters"]
  node_taiwan["Taiwan Expansion"]
  node_avatarfiles[("Avatar Models<br/>[manifest.json]")]
  node_basis["Basis Decoder"]
end

node_player(("Player"))

node_player -->|"opens"| node_entry
node_entry -->|"loads"| node_game
node_entry -->|"loads first"| node_quality
node_game -->|"renders with"| node_engine
node_game -.->|"builds world"| node_worlddata
node_game -.->|"loads sites"| node_sites
node_quality -->|"patches renderer"| node_engine
node_enhance -->|"uses debug API"| node_game
node_plus -->|"extends runtime"| node_game
node_combat -->|"uses game state"| node_game
node_tutorial -->|"observes mission events"| node_game
node_characters -->|"extends character selection"| node_game
node_characters -->|"loads models"| node_avatarfiles
node_characters -.->|"uses decoder"| node_basis
node_taiwan -->|"builds geometry with"| node_engine
node_taiwan -->|"extends map"| node_game

click node_entry "https://github.com/yu-0312/mock-taiwan/blob/master/index.html"
click node_game "https://github.com/yu-0312/mock-taiwan/blob/master/assets/game-Cw2XxbBX.js"
click node_engine "https://github.com/yu-0312/mock-taiwan/blob/master/assets/engine-VjaWSjhW.js"
click node_worlddata "https://github.com/yu-0312/mock-taiwan/blob/master/assets/world-yFrf-opw.js"
click node_quality "https://github.com/yu-0312/mock-taiwan/blob/master/assets/enhance.js"
click node_enhance "https://github.com/yu-0312/mock-taiwan/blob/master/enhance/taipei-enhance.js"
click node_plus "https://github.com/yu-0312/mock-taiwan/blob/master/enhance/tgta-plus.js"
click node_combat "https://github.com/yu-0312/mock-taiwan/blob/master/enhance/tgta-plus-combat.js"
click node_tutorial "https://github.com/yu-0312/mock-taiwan/blob/master/enhance/tgta-plus-tutorial.js"
click node_characters "https://github.com/yu-0312/mock-taiwan/blob/master/enhance/taipei-characters.js"
click node_taiwan "https://github.com/yu-0312/mock-taiwan/blob/master/enhance/tgta-plus-taiwan.js"
click node_avatarfiles "https://github.com/yu-0312/mock-taiwan/blob/master/avatars/manifest.json"
click node_basis "https://github.com/yu-0312/mock-taiwan/blob/master/avatars/basis/basis_transcoder.js"
click node_sites "https://github.com/yu-0312/mock-taiwan/blob/master/assets/sites-kit-D6-rZT0W.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_entry,node_game,node_engine,node_worlddata,node_sites toneBlue
class node_quality,node_enhance,node_plus toneAmber
class node_combat,node_tutorial toneMint
class node_characters,node_taiwan,node_avatarfiles,node_basis toneRose
class node_player toneIndigo
```

## Components

### Game Runtime

- [Browser Entry](https://github.com/yu-0312/mock-taiwan/blob/master/index.html): `index.html`
- [Game Runtime](https://github.com/yu-0312/mock-taiwan/blob/master/assets/game-Cw2XxbBX.js): `assets/game-Cw2XxbBX.js`
- [Rendering Engine](https://github.com/yu-0312/mock-taiwan/blob/master/assets/engine-VjaWSjhW.js): `assets/engine-VjaWSjhW.js`
- [Taipei World](https://github.com/yu-0312/mock-taiwan/blob/master/assets/world-yFrf-opw.js): `assets/world-yFrf-opw.js`
- [Taipei Sites](https://github.com/yu-0312/mock-taiwan/blob/master/assets/sites-kit-D6-rZT0W.js): `assets/sites-kit-D6-rZT0W.js`

### Visual Enhancements

- [Quality Injection](https://github.com/yu-0312/mock-taiwan/blob/master/assets/enhance.js): `assets/enhance.js`
- [Visual And Gameplay Panel](https://github.com/yu-0312/mock-taiwan/blob/master/enhance/taipei-enhance.js): `enhance/taipei-enhance.js`
- [TG+ Enhancements](https://github.com/yu-0312/mock-taiwan/blob/master/enhance/tgta-plus.js): `enhance/tgta-plus.js`

### Gameplay Extensions

- [Combat And Wanted](https://github.com/yu-0312/mock-taiwan/blob/master/enhance/tgta-plus-combat.js): `enhance/tgta-plus-combat.js`
- [Tutorial Guidance](https://github.com/yu-0312/mock-taiwan/blob/master/enhance/tgta-plus-tutorial.js): `enhance/tgta-plus-tutorial.js`

### World And Characters

- [Playable Characters](https://github.com/yu-0312/mock-taiwan/blob/master/enhance/taipei-characters.js): `enhance/taipei-characters.js`
- [Taiwan Expansion](https://github.com/yu-0312/mock-taiwan/blob/master/enhance/tgta-plus-taiwan.js): `enhance/tgta-plus-taiwan.js`
- [Avatar Models](https://github.com/yu-0312/mock-taiwan/blob/master/avatars/manifest.json): `avatars/manifest.json`
- [Basis Decoder](https://github.com/yu-0312/mock-taiwan/blob/master/avatars/basis/basis_transcoder.js): `avatars/basis/basis_transcoder.js`

### Other components

- **Player**

## Connections

- Player → Browser Entry: opens (evidence: `README.md`)
- Browser Entry → Game Runtime: loads (evidence: `README.md`)
- Browser Entry → Quality Injection: loads first (evidence: `README.md`)
- Game Runtime → Rendering Engine: renders with (evidence: `README.md`)
- Game Runtime → Taipei World: builds world
- Game Runtime → Taipei Sites: loads sites
- Quality Injection → Rendering Engine: patches renderer (evidence: `README.md`)
- Visual And Gameplay Panel → Game Runtime: uses debug API (evidence: `enhance/taipei-enhance.js`)
- TG+ Enhancements → Game Runtime: extends runtime (evidence: `enhance/tgta-plus.js`)
- Combat And Wanted → Game Runtime: uses game state (evidence: `enhance/tgta-plus-combat.js`)
- Tutorial Guidance → Game Runtime: observes mission events (evidence: `enhance/tgta-plus-tutorial.js`)
- Playable Characters → Game Runtime: extends character selection (evidence: `enhance/taipei-characters.js`)
- Playable Characters → Avatar Models: loads models (evidence: `enhance/taipei-characters.js`)
- Playable Characters → Basis Decoder: uses decoder
- Taiwan Expansion → Rendering Engine: builds geometry with (evidence: `enhance/tgta-plus-taiwan.js`)
- Taiwan Expansion → Game Runtime: extends map (evidence: `enhance/tgta-plus-taiwan.js`)
