# aqro/gooey-hover-codrops architecture

> Architecture diagram of the GitHub repository aqro/gooey-hover-codrops, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aqro/gooey-hover-codrops
- Repository: https://github.com/aqro/gooey-hover-codrops

## Overview

##### Project type and purpose
- This is a front-end, interactive demo (a single-page application) showcasing “gooey” hover effects on images using Three.js shaders, GSAP animations, and smooth scrolling. There is no server-side component; everything runs in the browser.

##### File structure
- Top-level assets and config:
- index.html
- webpack.config.js, package.json, .babelrc, ESLint/Stylelint configs
- Source code under src/:
- src/js/ – JavaScript modules: core classes (Stage, Scene, Tile, Layout, Detail), utilities, and third-party GSAP plugins
- src/img/ – Image assets (tile images grouped in subfolders)
- src/sass/ – SCSS styles (global and block styles for tiles, slideshow, typography, etc.)

##### README for additional insights
- Confirms use of Three.js, GSAP, Smooth Scrollbar, glslify, glsl-noise
- Build commands: npm run build, npm run watch (webpack dev server)
- No backend or external API calls; it’s a static demo

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Build/Dev Layer
    subgraph "Build/Dev"
        WP["webpack.config.js"]:::build
        BABEL[".babelrc"]:::build
        PKG["package.json"]:::build
    end
    WP --> BABEL
    WP --> PKG

    %% Static Server
    HTML["index.html"]:::assets

    WP --> HTML

    %% Browser Runtime Core
    HTML -->|"loads"| BROWSER["Browser (Runtime)"]:::core

    %% Initialization
    subgraph "Runtime Core"
        ENTRY["src/js/index.js"]:::core
        ENTRY --> STAGE["Stage (Canvas & Renderer)"]:::core
        ENTRY --> SCENE["Scene Setup"]:::core
    end

    %% Asset Manager & Utilities
    AM["src/js/utils/utils.js"]:::core
    ENTRY --> AM

    %% UI Components
    TILE["src/js/Tile.js"]:::core
    LAYOUT["src/js/Layout.js"]:::core
    DETAIL["src/js/Detail.js"]:::core
    AM --> TILE
    ENTRY --> TILE
    ENTRY --> LAYOUT
    ENTRY --> DETAIL

    %% Three.js Renderer Pipeline
    SCENE --> STAGE
    SCENE -->|"renders with shaders"| SHADERS

    %% Shader Modules
    subgraph "Shaders"
        GOOEY["src/glsl/gooeyShader.glsl"]:::core
        REVEAL["src/glsl/revealShader.glsl"]:::core
        SHAPE["src/glsl/shapeShader.glsl"]:::core
        TRIPPY["src/glsl/trippyShader.glsl"]:::core
        VERT["src/glsl/vertexShader.glsl"]:::core
        WAVE["src/glsl/waveShader.glsl"]:::core
    end
    TILE --> GOOEY
    TILE --> REVEAL
    TILE --> SHAPE
    TILE --> TRIPPY
    TILE --> VERT
    TILE --> WAVE

    %% Animation & UX Layer
    subgraph "Animation & UX"
        GSAP["GSAP Core & Plugins"]:::anim
        HSP["HorizontalScrollPlugin"]:::anim
        SMOOTH["Smooth Scrollbar"]:::anim
    end
    GSAP -->|"animates uniforms"| GOOEY
    GSAP -->|"animates uniforms"| REVEAL
    GSAP -->|"animates uniforms"| SHAPE
    GSAP -->|"animates uniforms"| TRIPPY
    GSAP -->|"animates uniforms"| WAVE
    HSP --> SCENE
    SMOOTH --> SCENE

    %% Styling & Assets
    subgraph "SASS Styles" 
        SASS_BASE["_base.scss/_reset.scss/_typography.scss/_utils.scss"]:::assets
        SASS_COMP["_tile.scss/_slideshow.scss/_detailview.scss"]:::assets
        SASS_MAIN["styles.scss"]:::assets
    end
    HTML --> SASS_MAIN

    subgraph "Image Assets"
        CATS["src/img/tiles/{cities,deserts,rocks,snow,woods}"]:::assets
        DISP["src/img/displacement"]:::assets
    end
    AM --> CATS
    AM --> DISP

    %% Click Events
    click WP "https://github.com/aqro/gooey-hover-codrops/blob/master/webpack.config.js"
    click BABEL "https://github.com/aqro/gooey-hover-codrops/blob/master/.babelrc"
    click PKG "https://github.com/aqro/gooey-hover-codrops/blob/master/package.json"
    click HTML "https://github.com/aqro/gooey-hover-codrops/blob/master/index.html"
    click ENTRY "https://github.com/aqro/gooey-hover-codrops/blob/master/src/js/index.js"
    click STAGE "https://github.com/aqro/gooey-hover-codrops/blob/master/src/js/Stage.js"
    click SCENE "https://github.com/aqro/gooey-hover-codrops/blob/master/src/js/Scene.js"
    click TILE "https://github.com/aqro/gooey-hover-codrops/blob/master/src/js/Tile.js"
    click LAYOUT "https://github.com/aqro/gooey-hover-codrops/blob/master/src/js/Layout.js"
    click DETAIL "https://github.com/aqro/gooey-hover-codrops/blob/master/src/js/Detail.js"
    click GOOEY "https://github.com/aqro/gooey-hover-codrops/blob/master/src/glsl/gooeyShader.glsl"
    click REVEAL "https://github.com/aqro/gooey-hover-codrops/blob/master/src/glsl/revealShader.glsl"
    click SHAPE "https://github.com/aqro/gooey-hover-codrops/blob/master/src/glsl/shapeShader.glsl"
    click TRIPPY "https://github.com/aqro/gooey-hover-codrops/blob/master/src/glsl/trippyShader.glsl"
    click VERT "https://github.com/aqro/gooey-hover-codrops/blob/master/src/glsl/vertexShader.glsl"
    click WAVE "https://github.com/aqro/gooey-hover-codrops/blob/master/src/glsl/waveShader.glsl"
    click AM "https://github.com/aqro/gooey-hover-codrops/blob/master/src/js/utils/utils.js"
    click HSP "https://github.com/aqro/gooey-hover-codrops/blob/master/src/js/utils/HorizontalScrollPlugin.js"

    %% Styles
    classDef build fill:#cccccc,stroke:#333,stroke-width:1px;
    classDef core fill:#a0c4ff,stroke:#333,stroke-width:1px;
    classDef anim fill:#caffbf,stroke:#333,stroke-width:1px;
    classDef assets fill:#ffd6a5,stroke:#333,stroke-width:1px;
```
