# aicnev04/cse-160 architecture

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

- Interactive diagram: https://gitdiagram.com/aicnev04/cse-160
- Repository: https://github.com/aicnev04/cse-160
- Video tour (about a minute): https://gitdiagram.com/aicnev04/cse-160/video

## Overview

This repository is a sequence of CSE160 graphics assignments, progressing from 2D vector operations and shape drawing to animated WebGL scenes and a Three.js concert-hall scene. Users interact through canvas gestures and HTML controls; the assignment code handles input, updates scene state, and renders the result. The graph highlights those distinct experiences and the sampled rendering/model/texture layers. Some source is unsampled and the README is empty, so relationships without direct excerpt evidence are omitted.

Main entry points: [`asgn5/src/asg5.js`](https://github.com/aicnev04/cse-160/blob/main/asgn5/src/asg5.js) (Concert hall scene), [`asgn1/src/asg1.js`](https://github.com/aicnev04/cse-160/blob/main/asgn1/src/asg1.js) (Shape drawing), [`asgn4/src/asg4.js`](https://github.com/aicnev04/cse-160/blob/main/asgn4/src/asg4.js) (Lighting and blocks), [`asgn0/src/asg0.js`](https://github.com/aicnev04/cse-160/blob/main/asgn0/src/asg0.js) (Vector operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundations["Graphics foundations"]
  node_vector_demo["Vector operations<br/>[asg0.js]"]
  node_matrix0["Vector and matrix math"]
end

subgraph group_webgl["WebGL assignments"]
  node_shape_draw["Shape drawing<br/>[asg1.js]"]
  node_shape_primitives["Drawing primitives"]
  node_matrix2["Matrix math"]
  node_character["Animated character<br/>[asg2.js]"]
  node_character_primitives["Character primitives"]
  node_webgl["WebGL renderer<br/>[asg1.js]"]
end

subgraph group_world["3D world assignments"]
  node_camera_world["Camera and world<br/>[asg3.js]"]
  node_world_camera["Camera controls<br/>[Camera.js]"]
  node_world_shapes["World geometry"]
  node_world_textures["World textures<br/>[textureHandler.js]"]
  node_block_world["Lighting and blocks<br/>[asg4.js]"]
  node_model_loader["OBJ model<br/>[Model.js]"]
  node_advanced_textures["Texture handling<br/>[textureHandler.js]"]
end

subgraph group_three["Three.js scene"]
  node_three_scene["Concert hall scene<br/>[asg5.js]"]
  node_three_controls["Orbit controls"]
  node_three_loaders["3D asset loaders"]
  node_three_audio["Audio visualizer<br/>[asg5.js]"]
  node_three_gui["Scene controls<br/>[asg5.js]"]
end

node_user(("User"))

node_user -->|"enters vectors"| node_vector_demo
node_vector_demo -->|"uses vector math"| node_matrix0
node_user -->|"draws shapes"| node_shape_draw
node_shape_draw -->|"creates shapes"| node_shape_primitives
node_shape_draw -->|"initializes rendering"| node_webgl
node_user -->|"controls animation"| node_character
node_character -->|"renders character"| node_character_primitives
node_user -->|"navigates world"| node_camera_world
node_user -->|"edits world"| node_block_world
node_block_world -.->|"loads model"| node_model_loader
node_block_world -.->|"loads textures"| node_advanced_textures
node_user -->|"views scene"| node_three_scene
node_three_scene -->|"configures camera"| node_three_controls
node_three_scene -->|"loads assets"| node_three_loaders
node_three_scene -->|"configures controls"| node_three_gui
node_three_scene -->|"detects audio"| node_three_audio

click node_vector_demo "https://github.com/aicnev04/cse-160/blob/main/asgn0/src/asg0.js"
click node_matrix0 "https://github.com/aicnev04/cse-160/blob/main/asgn0/lib/cuon-matrix-cse160.js"
click node_shape_draw "https://github.com/aicnev04/cse-160/blob/main/asgn1/src/asg1.js"
click node_shape_primitives "https://github.com/aicnev04/cse-160/tree/main/asgn1/lib"
click node_matrix2 "https://github.com/aicnev04/cse-160/blob/main/asgn2/lib/cuon-matrix-cse160.js"
click node_character "https://github.com/aicnev04/cse-160/blob/main/asgn2/src/asg2.js"
click node_character_primitives "https://github.com/aicnev04/cse-160/tree/main/asgn2/lib"
click node_camera_world "https://github.com/aicnev04/cse-160/blob/main/asgn3/src/asg3.js"
click node_world_camera "https://github.com/aicnev04/cse-160/blob/main/asgn3/lib/Camera.js"
click node_world_shapes "https://github.com/aicnev04/cse-160/tree/main/asgn3/lib"
click node_world_textures "https://github.com/aicnev04/cse-160/blob/main/asgn3/lib/textureHandler.js"
click node_block_world "https://github.com/aicnev04/cse-160/blob/main/asgn4/src/asg4.js"
click node_model_loader "https://github.com/aicnev04/cse-160/blob/main/asgn4/lib/Model.js"
click node_advanced_textures "https://github.com/aicnev04/cse-160/blob/main/asgn4/lib/textureHandler.js"
click node_three_scene "https://github.com/aicnev04/cse-160/blob/main/asgn5/src/asg5.js"
click node_three_audio "https://github.com/aicnev04/cse-160/blob/main/asgn5/src/asg5.js"
click node_three_gui "https://github.com/aicnev04/cse-160/blob/main/asgn5/src/asg5.js"
click node_webgl "https://github.com/aicnev04/cse-160/blob/main/asgn1/src/asg1.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_vector_demo,node_matrix0,node_user toneBlue
class node_shape_draw,node_shape_primitives,node_matrix2,node_character,node_character_primitives,node_webgl toneAmber
class node_camera_world,node_world_camera,node_world_shapes,node_world_textures,node_block_world,node_model_loader,node_advanced_textures toneMint
class node_three_scene,node_three_controls,node_three_loaders,node_three_audio,node_three_gui toneRose
```

## Components

### Graphics foundations

- [Vector operations](https://github.com/aicnev04/cse-160/blob/main/asgn0/src/asg0.js): `asgn0/src/asg0.js`
- [Vector and matrix math](https://github.com/aicnev04/cse-160/blob/main/asgn0/lib/cuon-matrix-cse160.js): `asgn0/lib/cuon-matrix-cse160.js`

### WebGL assignments

- [Shape drawing](https://github.com/aicnev04/cse-160/blob/main/asgn1/src/asg1.js): `asgn1/src/asg1.js`
- [Drawing primitives](https://github.com/aicnev04/cse-160/tree/main/asgn1/lib): `asgn1/lib`
- [Matrix math](https://github.com/aicnev04/cse-160/blob/main/asgn2/lib/cuon-matrix-cse160.js): `asgn2/lib/cuon-matrix-cse160.js`
- [Animated character](https://github.com/aicnev04/cse-160/blob/main/asgn2/src/asg2.js): `asgn2/src/asg2.js`
- [Character primitives](https://github.com/aicnev04/cse-160/tree/main/asgn2/lib): `asgn2/lib`
- [WebGL renderer](https://github.com/aicnev04/cse-160/blob/main/asgn1/src/asg1.js): `asgn1/src/asg1.js`

### 3D world assignments

- [Camera and world](https://github.com/aicnev04/cse-160/blob/main/asgn3/src/asg3.js): `asgn3/src/asg3.js`
- [Camera controls](https://github.com/aicnev04/cse-160/blob/main/asgn3/lib/Camera.js): `asgn3/lib/Camera.js`
- [World geometry](https://github.com/aicnev04/cse-160/tree/main/asgn3/lib): `asgn3/lib`
- [World textures](https://github.com/aicnev04/cse-160/blob/main/asgn3/lib/textureHandler.js): `asgn3/lib/textureHandler.js`
- [Lighting and blocks](https://github.com/aicnev04/cse-160/blob/main/asgn4/src/asg4.js): `asgn4/src/asg4.js`
- [OBJ model](https://github.com/aicnev04/cse-160/blob/main/asgn4/lib/Model.js): `asgn4/lib/Model.js`
- [Texture handling](https://github.com/aicnev04/cse-160/blob/main/asgn4/lib/textureHandler.js): `asgn4/lib/textureHandler.js`

### Three.js scene

- [Concert hall scene](https://github.com/aicnev04/cse-160/blob/main/asgn5/src/asg5.js): `asgn5/src/asg5.js`
- **Orbit controls**
- **3D asset loaders**
- [Audio visualizer](https://github.com/aicnev04/cse-160/blob/main/asgn5/src/asg5.js): `asgn5/src/asg5.js`
- [Scene controls](https://github.com/aicnev04/cse-160/blob/main/asgn5/src/asg5.js): `asgn5/src/asg5.js`

### Other components

- **User**

## Connections

- User → Vector operations: enters vectors (evidence: `asgn0/src/asg0.js`)
- Vector operations → Vector and matrix math: uses vector math (evidence: `asgn0/src/asg0.js`)
- User → Shape drawing: draws shapes (evidence: `asgn1/src/asg1.js`)
- Shape drawing → Drawing primitives: creates shapes (evidence: `asgn1/src/asg1.js`)
- Shape drawing → WebGL renderer: initializes rendering (evidence: `asgn1/src/asg1.js`)
- User → Animated character: controls animation (evidence: `asgn2/src/asg2.js`)
- Animated character → Character primitives: renders character (evidence: `asgn2/src/asg2.js`)
- User → Camera and world: navigates world (evidence: `asgn3/src/asg3.js`)
- User → Lighting and blocks: edits world (evidence: `asgn4/src/asg4.js`)
- Lighting and blocks → OBJ model: loads model
- Lighting and blocks → Texture handling: loads textures
- User → Concert hall scene: views scene (evidence: `asgn5/src/asg5.js`)
- Concert hall scene → Orbit controls: configures camera (evidence: `asgn5/src/asg5.js`)
- Concert hall scene → 3D asset loaders: loads assets (evidence: `asgn5/src/asg5.js`)
- Concert hall scene → Scene controls: configures controls (evidence: `asgn5/src/asg5.js`)
- Concert hall scene → Audio visualizer: detects audio (evidence: `asgn5/src/asg5.js`)
