# achrefelouafi/linearabiltycastingthreejs architecture

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

- Interactive diagram: https://gitdiagram.com/achrefelouafi/linearabiltycastingthreejs
- Repository: https://github.com/achrefelouafi/linearabiltycastingthreejs

## Overview

Elemental Sandbox is a browser-based Three.js skillshot VFX sandbox. The player selects and aims one of six abilities, confirms a cast, and watches its procedural effect play on the stage; the HUD reports status while the editor changes live settings, including during pause. The graph preserves the six ability implementations and the major aiming, particle, world, and editing subsystems. Some application wiring is only partially excerpted, so uncertain connections are omitted rather than inferred.

Main entry points: [`src/core/App.js`](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/core/App.js) (App Orchestrator), [`src/abilities/AbilityManager.js`](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/AbilityManager.js) (Ability Manager), [`src/abilities/Ability.js`](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/Ability.js) (Ability Lifecycle), [`src/abilities/GlacierAbility.js`](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/GlacierAbility.js) (Glacial Crown)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime and Stage"]
  node_entry["Application Entry<br/>[main.js]"]
  node_app["App Orchestrator<br/>[App.js]"]
  node_renderer["Renderer<br/>[Renderer.js]"]
  node_environment["Environment<br/>[Environment.js]"]
  node_ground["Ground<br/>[Ground.js]"]
  node_assets["Asset Loader<br/>[AssetLoader.js]"]
  node_character["Character Animation"]
end

subgraph group_casting["Targeting and Abilities"]
  node_input["Input Manager<br/>[InputManager.js]"]
  node_aim["Aim Controller<br/>[AimController.js]"]
  node_abilitymgr["Ability Manager<br/>[AbilityManager.js]"]
  node_abilitybase["Ability Lifecycle<br/>[Ability.js]"]
  node_ice["Frost Lance<br/>[IceAbility.js]"]
  node_storm["Storm Lance<br/>[ThunderAbility.js]"]
  node_meteor["Cinder Fall<br/>[MeteorAbility.js]"]
  node_beam["Nova Beam<br/>[BeamAbility.js]"]
  node_snare["Voltaic Snare<br/>[SnareAbility.js]"]
  node_glacier["Glacial Crown<br/>[GlacierAbility.js]"]
end

subgraph group_vfx["Procedural Effects"]
  node_particles["Particle Engine<br/>[ParticleEngine.js]"]
  node_particle_system["Particle Systems<br/>[ParticleSystem.js]"]
  node_decals["Ground Decals<br/>[GroundDecals.js]"]
  node_bursts["Burst Effects<br/>[BurstSphere.js]"]
  node_fissures["Ground Fissures<br/>[GroundFissures.js]"]
  node_zone["Zone Indicator<br/>[ZoneIndicator.js]"]
end

subgraph group_controls["HUD and Tuning"]
  node_settings["Live Settings<br/>[settings.js]"]
  node_hud["HUD<br/>[HUD.js]"]
  node_editor["VFX Editor<br/>[Editor.js]"]
  node_presets["Preset Manager<br/>[PresetManager.js]"]
end

node_player(("Player"))

node_player -->|"starts app"| node_entry
node_entry -->|"creates"| node_app
node_app -->|"creates"| node_renderer
node_app -->|"creates"| node_environment
node_app -->|"loads stage"| node_ground
node_app -->|"loads assets"| node_assets
node_app -->|"loads character"| node_character
node_app -->|"casts through"| node_abilitymgr
node_app -->|"updates"| node_hud
node_app -.->|"coordinates input"| node_input
node_input -.->|"forwards aim"| node_aim
node_aim -->|"updates indicator"| node_zone
node_aim -.->|"aims cast"| node_player
node_abilitymgr -->|"creates and pools"| node_ice
node_abilitymgr -->|"creates and pools"| node_storm
node_abilitymgr -->|"creates and pools"| node_meteor
node_abilitymgr -->|"creates and pools"| node_beam
node_abilitymgr -->|"creates and pools"| node_snare
node_abilitymgr -->|"creates and pools"| node_glacier
node_ice -.->|"extends lifecycle"| node_abilitybase
node_storm -.->|"extends lifecycle"| node_abilitybase
node_meteor -.->|"extends lifecycle"| node_abilitybase
node_beam -.->|"extends lifecycle"| node_abilitybase
node_snare -.->|"extends lifecycle"| node_abilitybase
node_glacier -->|"extends lifecycle"| node_abilitybase
node_abilitybase -->|"reads parameters"| node_settings
node_glacier -->|"spawns particles"| node_particles
node_glacier -->|"creates decals"| node_decals
node_glacier -->|"creates bursts"| node_bursts
node_particles -->|"creates systems"| node_particle_system
node_app -.->|"updates effects"| node_particles
node_editor -->|"edits values"| node_settings
node_editor -->|"uses presets"| node_presets
node_hud -->|"reads ability data"| node_settings

click node_entry "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/main.js"
click node_app "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/core/App.js"
click node_renderer "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/core/Renderer.js"
click node_environment "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/world/Environment.js"
click node_ground "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/world/Ground.js"
click node_assets "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/loaders/AssetLoader.js"
click node_character "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/animation/CharacterController.js"
click node_input "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/input/InputManager.js"
click node_aim "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/input/AimController.js"
click node_abilitymgr "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/AbilityManager.js"
click node_abilitybase "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/Ability.js"
click node_ice "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/IceAbility.js"
click node_storm "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/ThunderAbility.js"
click node_meteor "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/MeteorAbility.js"
click node_beam "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/BeamAbility.js"
click node_snare "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/SnareAbility.js"
click node_glacier "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/GlacierAbility.js"
click node_particles "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/particles/ParticleEngine.js"
click node_particle_system "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/particles/ParticleSystem.js"
click node_decals "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/effects/GroundDecals.js"
click node_bursts "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/effects/BurstSphere.js"
click node_fissures "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/effects/GroundFissures.js"
click node_zone "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/effects/ZoneIndicator.js"
click node_settings "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/config/settings.js"
click node_hud "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/ui/HUD.js"
click node_editor "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/ui/Editor.js"
click node_presets "https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/ui/PresetManager.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_app,node_renderer,node_environment,node_ground,node_assets,node_character toneBlue
class node_input,node_aim,node_abilitymgr,node_abilitybase,node_ice,node_storm,node_meteor,node_beam,node_snare,node_glacier toneAmber
class node_particles,node_particle_system,node_decals,node_bursts,node_fissures,node_zone toneMint
class node_settings,node_hud,node_editor,node_presets toneRose
class node_player toneIndigo
```

## Components

### Runtime and Stage

- [Application Entry](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/main.js): `src/main.js`
- [App Orchestrator](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/core/App.js): `src/core/App.js`
- [Renderer](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/core/Renderer.js): `src/core/Renderer.js`
- [Environment](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/world/Environment.js): `src/world/Environment.js`
- [Ground](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/world/Ground.js): `src/world/Ground.js`
- [Asset Loader](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/loaders/AssetLoader.js): `src/loaders/AssetLoader.js`
- [Character Animation](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/animation/CharacterController.js): `src/animation/CharacterController.js`

### Targeting and Abilities

- [Input Manager](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/input/InputManager.js): `src/input/InputManager.js`
- [Aim Controller](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/input/AimController.js): `src/input/AimController.js`
- [Ability Manager](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/AbilityManager.js): `src/abilities/AbilityManager.js`
- [Ability Lifecycle](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/Ability.js): `src/abilities/Ability.js`
- [Frost Lance](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/IceAbility.js): `src/abilities/IceAbility.js`
- [Storm Lance](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/ThunderAbility.js): `src/abilities/ThunderAbility.js`
- [Cinder Fall](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/MeteorAbility.js): `src/abilities/MeteorAbility.js`
- [Nova Beam](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/BeamAbility.js): `src/abilities/BeamAbility.js`
- [Voltaic Snare](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/SnareAbility.js): `src/abilities/SnareAbility.js`
- [Glacial Crown](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/abilities/GlacierAbility.js): `src/abilities/GlacierAbility.js`

### Procedural Effects

- [Particle Engine](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/particles/ParticleEngine.js): `src/particles/ParticleEngine.js`
- [Particle Systems](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/particles/ParticleSystem.js): `src/particles/ParticleSystem.js`
- [Ground Decals](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/effects/GroundDecals.js): `src/effects/GroundDecals.js`
- [Burst Effects](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/effects/BurstSphere.js): `src/effects/BurstSphere.js`
- [Ground Fissures](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/effects/GroundFissures.js): `src/effects/GroundFissures.js`
- [Zone Indicator](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/effects/ZoneIndicator.js): `src/effects/ZoneIndicator.js`

### HUD and Tuning

- [Live Settings](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/config/settings.js): `src/config/settings.js`
- [HUD](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/ui/HUD.js): `src/ui/HUD.js`
- [VFX Editor](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/ui/Editor.js): `src/ui/Editor.js`
- [Preset Manager](https://github.com/achrefelouafi/linearabiltycastingthreejs/blob/main/src/ui/PresetManager.js): `src/ui/PresetManager.js`

### Other components

- **Player**

## Connections

- Player → Application Entry: starts app (evidence: `README.md`)
- Application Entry → App Orchestrator: creates (evidence: `src/main.js`)
- App Orchestrator → Renderer: creates (evidence: `src/core/App.js`)
- App Orchestrator → Environment: creates (evidence: `src/core/App.js`)
- App Orchestrator → Ground: loads stage (evidence: `src/core/App.js`)
- App Orchestrator → Asset Loader: loads assets (evidence: `src/core/App.js`)
- App Orchestrator → Character Animation: loads character (evidence: `src/core/App.js`)
- App Orchestrator → Ability Manager: casts through (evidence: `src/core/App.js`)
- App Orchestrator → HUD: updates (evidence: `src/core/App.js`)
- App Orchestrator → Input Manager: coordinates input (evidence: `src/core/App.js`)
- Input Manager → Aim Controller: forwards aim
- Aim Controller → Zone Indicator: updates indicator (evidence: `src/input/AimController.js`)
- Aim Controller → Player: aims cast
- Ability Manager → Frost Lance: creates and pools (evidence: `src/abilities/AbilityManager.js`)
- Ability Manager → Storm Lance: creates and pools (evidence: `src/abilities/AbilityManager.js`)
- Ability Manager → Cinder Fall: creates and pools (evidence: `src/abilities/AbilityManager.js`)
- Ability Manager → Nova Beam: creates and pools (evidence: `src/abilities/AbilityManager.js`)
- Ability Manager → Voltaic Snare: creates and pools (evidence: `src/abilities/AbilityManager.js`)
- Ability Manager → Glacial Crown: creates and pools (evidence: `src/abilities/AbilityManager.js`)
- Frost Lance → Ability Lifecycle: extends lifecycle
- Storm Lance → Ability Lifecycle: extends lifecycle
- Cinder Fall → Ability Lifecycle: extends lifecycle
- Nova Beam → Ability Lifecycle: extends lifecycle
- Voltaic Snare → Ability Lifecycle: extends lifecycle
- Glacial Crown → Ability Lifecycle: extends lifecycle (evidence: `src/abilities/GlacierAbility.js`)
- Ability Lifecycle → Live Settings: reads parameters (evidence: `src/abilities/Ability.js`)
- Glacial Crown → Particle Engine: spawns particles (evidence: `src/abilities/GlacierAbility.js`)
- Glacial Crown → Ground Decals: creates decals (evidence: `src/abilities/GlacierAbility.js`)
- Glacial Crown → Burst Effects: creates bursts (evidence: `src/abilities/GlacierAbility.js`)
- Particle Engine → Particle Systems: creates systems (evidence: `src/particles/ParticleEngine.js`)
- App Orchestrator → Particle Engine: updates effects (evidence: `src/core/App.js`)
- VFX Editor → Live Settings: edits values (evidence: `src/ui/Editor.js`)
- VFX Editor → Preset Manager: uses presets (evidence: `src/ui/Editor.js`)
- HUD → Live Settings: reads ability data (evidence: `src/ui/HUD.js`)
