# stormrider31/storm-breakers architecture

> Architecture diagram of the GitHub repository stormrider31/storm-breakers, 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/stormrider31/storm-breakers
- Repository: https://github.com/stormrider31/storm-breakers

## Overview

Storm Breakers is a Unity ocean-simulation package. In a typical runtime, scene components configure the shared wave and wind state; boats and water-aware objects query that state for motion and buoyancy, while rendering and effect components present the water, breaking waves, splashes, and underwater view. The repository also includes camera and gameplay examples, reusable prefabs, and sample scenes. Edges are limited to relationships visible in excerpts, the source index, or README; unsampled feature modules are included without guessed connections.

Main entry points: [`3-Scripts/Ocean.cs`](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/Ocean.cs) (Wave State), [`3-Scripts/DetectWater.cs`](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/DetectWater.cs) (Water Detection), [`3-Scripts/WindController.cs`](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/WindController.cs) (Wind Control), [`3-Scripts/BoatController.cs`](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/BoatController.cs) (Boat Control)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ocean["Ocean Simulation"]
  node_ocean_state["Wave State<br/>[Ocean.cs]"]
  node_ocean_setup["Ocean Setup<br/>[OceanController.cs]"]
  node_wind["Wind Control<br/>[WindController.cs]"]
  node_bounds["Ocean Bounds"]
end

subgraph group_vessels["Vessels &amp; Buoyancy"]
  node_boat["Boat Control<br/>[BoatController.cs]"]
  node_foil["Foil Physics<br/>[Foil.cs]"]
  node_hull["Hull Generator<br/>[HullGenerator.cs]"]
  node_static_buoyancy["Static Buoyancy<br/>[StaticBuoyancy.cs]"]
  node_water_interaction["Water Interaction"]
  node_sphere_interaction["Sphere Interaction"]
end

subgraph group_effects["Water Effects &amp; Rendering"]
  node_water_detection["Water Detection<br/>[DetectWater.cs]"]
  node_water_effects["Water Effects<br/>[WaterEffects.cs]"]
  node_breakers_audio["Breaker Audio<br/>[BreakersAudio.cs]"]
  node_underwater["Underwater View"]
  node_ocean_shader["Ocean Rendering<br/>[ocean.shadergraph]"]
  node_ocean_vfx["Ocean Particles<br/>[oceanVFX.vfx]"]
end

subgraph group_scene["Scene &amp; Gameplay"]
  node_camera["Camera Control"]
  node_camera_anchor["Camera Anchor<br/>[CameraAnchor.cs]"]
  node_reflection["Reflection Probe"]
  node_travel["Camera Travel<br/>[CameraTravel.cs]"]
  node_mass["Mass Increase<br/>[MassIncrease.cs]"]
end

node_unity_user(("Unity User"))

node_ocean_setup -->|"initializes waves"| node_ocean_state
node_ocean_setup -->|"configures"| node_wind
node_boat -->|"queries waves"| node_ocean_state
node_water_detection -->|"queries height"| node_ocean_state
node_wind -->|"sets wind"| node_ocean_state
node_wind -->|"reads underwater state"| node_water_detection
node_water_effects -->|"queries waves"| node_ocean_state
node_underwater -->|"reads depth"| node_water_detection
node_underwater -->|"sets water state"| node_ocean_state
node_camera -->|"reads state"| node_water_detection
node_reflection -->|"reads surface intensity"| node_ocean_state
node_static_buoyancy -->|"queries waves"| node_ocean_state
node_travel -->|"controls pilot"| node_boat
node_travel -->|"moves anchor"| node_camera_anchor
node_mass -->|"disables controller"| node_boat

click node_ocean_state "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/Ocean.cs"
click node_ocean_setup "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/OceanController.cs"
click node_wind "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/WindController.cs"
click node_bounds "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/AjustOceanBounds.cs"
click node_boat "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/BoatController.cs"
click node_foil "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/Foil.cs"
click node_hull "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/HullGenerator.cs"
click node_static_buoyancy "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/StaticBuoyancy.cs"
click node_water_interaction "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/WaterInteraction.cs"
click node_sphere_interaction "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/SphereWaterInteraction.cs"
click node_water_detection "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/DetectWater.cs"
click node_water_effects "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/WaterEffects.cs"
click node_breakers_audio "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/BreakersAudio.cs"
click node_underwater "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/UnderwaterEffect.cs"
click node_ocean_shader "https://github.com/stormrider31/storm-breakers/blob/main/7-Shaders/ocean.shadergraph"
click node_ocean_vfx "https://github.com/stormrider31/storm-breakers/blob/main/8-VFX/oceanVFX.vfx"
click node_camera "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/CameraController.cs"
click node_camera_anchor "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/CameraAnchor.cs"
click node_reflection "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/ReflectionProbeController.cs"
click node_travel "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/Examples%20scripts/CameraTravel.cs"
click node_mass "https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/Examples%20scripts/MassIncrease.cs"

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_ocean_state,node_ocean_setup,node_wind,node_bounds,node_unity_user toneBlue
class node_boat,node_foil,node_hull,node_static_buoyancy,node_water_interaction,node_sphere_interaction toneAmber
class node_water_detection,node_water_effects,node_breakers_audio,node_underwater,node_ocean_shader,node_ocean_vfx toneMint
class node_camera,node_camera_anchor,node_reflection,node_travel,node_mass toneRose
```

## Components

### Ocean Simulation

- [Wave State](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/Ocean.cs): `3-Scripts/Ocean.cs`
- [Ocean Setup](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/OceanController.cs): `3-Scripts/OceanController.cs`
- [Wind Control](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/WindController.cs): `3-Scripts/WindController.cs`
- [Ocean Bounds](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/AjustOceanBounds.cs): `3-Scripts/AjustOceanBounds.cs`

### Vessels & Buoyancy

- [Boat Control](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/BoatController.cs): `3-Scripts/BoatController.cs`
- [Foil Physics](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/Foil.cs): `3-Scripts/Foil.cs`
- [Hull Generator](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/HullGenerator.cs): `3-Scripts/HullGenerator.cs`
- [Static Buoyancy](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/StaticBuoyancy.cs): `3-Scripts/StaticBuoyancy.cs`
- [Water Interaction](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/WaterInteraction.cs): `3-Scripts/WaterInteraction.cs`
- [Sphere Interaction](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/SphereWaterInteraction.cs): `3-Scripts/SphereWaterInteraction.cs`

### Water Effects & Rendering

- [Water Detection](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/DetectWater.cs): `3-Scripts/DetectWater.cs`
- [Water Effects](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/WaterEffects.cs): `3-Scripts/WaterEffects.cs`
- [Breaker Audio](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/BreakersAudio.cs): `3-Scripts/BreakersAudio.cs`
- [Underwater View](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/UnderwaterEffect.cs): `3-Scripts/UnderwaterEffect.cs`
- [Ocean Rendering](https://github.com/stormrider31/storm-breakers/blob/main/7-Shaders/ocean.shadergraph): `7-Shaders/ocean.shadergraph`
- [Ocean Particles](https://github.com/stormrider31/storm-breakers/blob/main/8-VFX/oceanVFX.vfx): `8-VFX/oceanVFX.vfx`

### Scene & Gameplay

- [Camera Control](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/CameraController.cs): `3-Scripts/CameraController.cs`
- [Camera Anchor](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/CameraAnchor.cs): `3-Scripts/CameraAnchor.cs`
- [Reflection Probe](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/ReflectionProbeController.cs): `3-Scripts/ReflectionProbeController.cs`
- [Camera Travel](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/Examples%20scripts/CameraTravel.cs): `3-Scripts/Examples scripts/CameraTravel.cs`
- [Mass Increase](https://github.com/stormrider31/storm-breakers/blob/main/3-Scripts/Examples%20scripts/MassIncrease.cs): `3-Scripts/Examples scripts/MassIncrease.cs`

### Other components

- **Unity User**

## Connections

- Ocean Setup → Wave State: initializes waves (evidence: `3-Scripts/OceanController.cs`)
- Ocean Setup → Wind Control: configures (evidence: `3-Scripts/OceanController.cs`)
- Boat Control → Wave State: queries waves (evidence: `3-Scripts/BoatController.cs`)
- Water Detection → Wave State: queries height (evidence: `3-Scripts/DetectWater.cs`)
- Wind Control → Wave State: sets wind (evidence: `3-Scripts/WindController.cs`)
- Wind Control → Water Detection: reads underwater state (evidence: `3-Scripts/WindController.cs`)
- Water Effects → Wave State: queries waves (evidence: `3-Scripts/WaterEffects.cs`)
- Underwater View → Water Detection: reads depth (evidence: `3-Scripts/UnderwaterEffect.cs`)
- Underwater View → Wave State: sets water state (evidence: `3-Scripts/UnderwaterEffect.cs`)
- Camera Control → Water Detection: reads state (evidence: `3-Scripts/CameraController.cs`)
- Reflection Probe → Wave State: reads surface intensity (evidence: `3-Scripts/ReflectionProbeController.cs`)
- Static Buoyancy → Wave State: queries waves (evidence: `3-Scripts/StaticBuoyancy.cs`)
- Camera Travel → Boat Control: controls pilot (evidence: `3-Scripts/Examples scripts/CameraTravel.cs`)
- Camera Travel → Camera Anchor: moves anchor (evidence: `3-Scripts/Examples scripts/CameraTravel.cs`)
- Mass Increase → Boat Control: disables controller (evidence: `3-Scripts/Examples scripts/MassIncrease.cs`)
