# hsantosdias/minijogologica3d architecture

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

- Interactive diagram: https://gitdiagram.com/hsantosdias/minijogologica3d
- Repository: https://github.com/hsantosdias/minijogologica3d

## Overview

Mini Jogo de Lógica 3D is a browser-based reaction game served as a static site. The player starts a game, clicks the highlighted target before the round timer expires, and earns score and level progression; missed targets cost lives, and the game ends when lives run out. The runtime combines the Three.js scene and animation with round/game-state logic, HUD updates, visual and audio feedback, and a saved high score. The sampled source is partial, so unsampled event wiring and render-loop relationships are not expanded.

Main entry points: [`js/main.js`](https://github.com/hsantosdias/minijogologica3d/blob/main/js/main.js) (Game state), [`index.html`](https://github.com/hsantosdias/minijogologica3d/blob/main/index.html) (Game page), [`css/styles.css`](https://github.com/hsantosdias/minijogologica3d/blob/main/css/styles.css) (Interface styles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Static site"]
  node_page["Game page<br/>[index.html]"]
  node_styles["Interface styles<br/>[styles.css]"]
end

subgraph group_runtime["Game runtime"]
  node_game["Game state<br/>[main.js]"]
  node_scene["3D scene<br/>[main.js]"]
  node_rounds["Rounds and scoring<br/>[main.js]"]
  node_effects["Visual and audio effects<br/>[main.js]"]
end

subgraph group_platform["Browser platform"]
  node_three["Three.js"]
  node_browser["Browser APIs"]
end

node_player(("Player"))

node_player -->|"opens"| node_page
node_page -->|"uses styles"| node_styles
node_page -->|"runs game logic"| node_game
node_player -->|"clicks target; presses P"| node_game
node_game -->|"creates scene"| node_scene
node_game -->|"starts rounds; updates score"| node_rounds
node_rounds -->|"triggers feedback"| node_effects
node_scene -->|"builds 3D scene"| node_three
node_effects -->|"spawns particles"| node_three
node_rounds -->|"stores high score"| node_browser
node_effects -->|"plays tones"| node_browser

click node_page "https://github.com/hsantosdias/minijogologica3d/blob/main/index.html"
click node_styles "https://github.com/hsantosdias/minijogologica3d/blob/main/css/styles.css"
click node_game "https://github.com/hsantosdias/minijogologica3d/blob/main/js/main.js"
click node_scene "https://github.com/hsantosdias/minijogologica3d/blob/main/js/main.js"
click node_rounds "https://github.com/hsantosdias/minijogologica3d/blob/main/js/main.js"
click node_effects "https://github.com/hsantosdias/minijogologica3d/blob/main/js/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_page,node_styles toneBlue
class node_game,node_scene,node_rounds,node_effects toneAmber
class node_three,node_browser toneMint
class node_player toneIndigo
```

## Components

### Static site

- [Game page](https://github.com/hsantosdias/minijogologica3d/blob/main/index.html): `index.html`
- [Interface styles](https://github.com/hsantosdias/minijogologica3d/blob/main/css/styles.css): `css/styles.css`

### Game runtime

- [Game state](https://github.com/hsantosdias/minijogologica3d/blob/main/js/main.js): `js/main.js`
- [3D scene](https://github.com/hsantosdias/minijogologica3d/blob/main/js/main.js): `js/main.js`
- [Rounds and scoring](https://github.com/hsantosdias/minijogologica3d/blob/main/js/main.js): `js/main.js`
- [Visual and audio effects](https://github.com/hsantosdias/minijogologica3d/blob/main/js/main.js): `js/main.js`

### Browser platform

- **Three.js**
- **Browser APIs**

### Other components

- **Player**

## Connections

- Player → Game page: opens (evidence: `README.md`)
- Game page → Interface styles: uses styles (evidence: `README.md`)
- Game page → Game state: runs game logic (evidence: `README.md`)
- Player → Game state: clicks target; presses P (evidence: `README.md`)
- Game state → 3D scene: creates scene (evidence: `js/main.js`)
- Game state → Rounds and scoring: starts rounds; updates score (evidence: `js/main.js`)
- Rounds and scoring → Visual and audio effects: triggers feedback (evidence: `js/main.js`)
- 3D scene → Three.js: builds 3D scene (evidence: `js/main.js`)
- Visual and audio effects → Three.js: spawns particles (evidence: `js/main.js`)
- Rounds and scoring → Browser APIs: stores high score (evidence: `js/main.js`)
- Visual and audio effects → Browser APIs: plays tones (evidence: `js/main.js`)
