# mechaniac/lezoo_cosmology architecture

> Architecture diagram of the GitHub repository mechaniac/lezoo_cosmology, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mechaniac/lezoo_cosmology
- Repository: https://github.com/mechaniac/lezoo_cosmology

## Overview

##### Project type and purpose
- From the README (“three js implementation of lezoo cosmology”) and file structure, this is a front-end–only, static web application built with Three.js. Its sole role is to load and render a collection of GLTF 3D models (cosmology scenes) in the browser. There is no backend or API layer—just static hosting of HTML, JS, and asset files.

##### File structure
- Top-level files:
- index.html – the entry point
- main.js – the Three.js scene setup, loader, and render loop
- package.json / package-lock.json – for npm-based dependency management (likely pulling in Three.js)
- Directories:
- models/ – subfolders for each GLTF model set (cosmology_01, cosmology_frame_01, test_cube) containing .gltf and .bin pairs
- models/textures/ – any texture files referenced by the models
- images/ – UI or layout images (if used by index.html or CSS)
- No “src” or “backend” folders: this is purely a client-side bundle.

##### README for additional insights
- No further architecture notes; you must infer component roles from file names.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Static File Host"
        Host["Static File Host"]:::infra
        PackageJson["package.json"]:::infra
        PackageLock["package-lock.json"]:::infra
        subgraph "Asset Repositories"
            ModelsDir["models/"]:::assets
            subgraph "models/"
                Cosm01["cosmology_01/"]:::assets
                Frame01["cosmology_frame_01/"]:::assets
                TestCube["test_cube/"]:::assets
            end
            Textures["models/textures/"]:::assets
            Images["images/"]:::assets
        end
    end

    subgraph "Web Browser"
        HTML["index.html (HTML/CSS Layer)"]:::client
        JSApp["main.js (Three.js App)"]:::client
        subgraph "JS Modules"
            SceneInit["Scene Initialization"]:::client
            AssetLoader["Asset Loader (GLTFLoader)"]:::client
            RenderLoop["Render Loop"]:::client
            UserControls["User Controls (OrbitControls)"]:::client
        end
    end

    Host -->|"GET index.html"| HTML
    Host -->|"GET main.js"| JSApp
    Host -->|"GET package.json"| PackageJson
    Host -->|"GET package-lock.json"| PackageLock

    JSApp --> SceneInit
    JSApp --> AssetLoader
    JSApp --> RenderLoop
    JSApp --> UserControls

    AssetLoader -->|"GLTFLoader.load()"| ModelsDir
    ModelsDir --> Cosm01
    ModelsDir --> Frame01
    ModelsDir --> TestCube
    AssetLoader --> Textures
    AssetLoader --> Images

    SceneInit --> RenderLoop
    UserControls --> RenderLoop

    classDef infra fill:#cccccc,stroke:#333,stroke-width:1px
    classDef client fill:#87CEFA,stroke:#333,stroke-width:1px
    classDef assets fill:#98FB98,stroke:#333,stroke-width:1px

    click HTML "https://github.com/mechaniac/lezoo_cosmology/blob/main/index.html"
    click JSApp "https://github.com/mechaniac/lezoo_cosmology/blob/main/main.js"
    click SceneInit "https://github.com/mechaniac/lezoo_cosmology/blob/main/main.js"
    click AssetLoader "https://github.com/mechaniac/lezoo_cosmology/blob/main/main.js"
    click RenderLoop "https://github.com/mechaniac/lezoo_cosmology/blob/main/main.js"
    click UserControls "https://github.com/mechaniac/lezoo_cosmology/blob/main/main.js"
    click ModelsDir "https://github.com/mechaniac/lezoo_cosmology/tree/main/models/"
    click Cosm01 "https://github.com/mechaniac/lezoo_cosmology/tree/main/models/cosmology_01/"
    click Frame01 "https://github.com/mechaniac/lezoo_cosmology/tree/main/models/cosmology_frame_01/"
    click TestCube "https://github.com/mechaniac/lezoo_cosmology/tree/main/models/test_cube/"
    click Textures "https://github.com/mechaniac/lezoo_cosmology/tree/main/models/textures/"
    click Images "https://github.com/mechaniac/lezoo_cosmology/tree/main/images/"
    click PackageJson "https://github.com/mechaniac/lezoo_cosmology/blob/main/package.json"
    click PackageLock "https://github.com/mechaniac/lezoo_cosmology/blob/main/package-lock.json"
```
