How barredewe/snowfall works
Snowfall is a macOS menubar app that displays interactive, GPU-rendered snow across connected displays. The main workflow creates a transparent overlay per screen, uses a Metal view controller to manage rendering and lifecycle, and has a renderer update particles before submitting frames to Metal. Users adjust presets and effects in the menubar settings, which persist locally. The README documents window collisions, mouse and wind effects, multi-monitor support, and adaptive rendering; profiling support is also represented. Some subsystem links rely on README statements or the source index because not all implementation files were sampled.
Main entry points: SnowRenderer.swift Frame Renderer · MetalSnowViewController.swift Overlay Controller · MenuBarSettings.swift Menubar Controls · SnowfallApp.swift App Lifecycle
Components 13
App and Settings
- App Lifecycle
SnowfallApp/Sources/SnowfallApp.swift - Menubar Controls
SnowfallApp/Sources/Views/MenuBarSettings.swift - Preferences
SnowfallApp/Sources/Common/Settings.swift
Desktop Overlay
- Overlay Controller
SnowfallApp/Sources/Views/MetalSnowViewController.swift - Render Policy
SnowfallApp/Sources/Common/SnowRenderPolicy.swift
Snow Simulation
- Particle Simulation
SnowfallApp/Sources/Common/SnowSimulation.swift - Particle Data
SnowfallApp/Sources/Common/Snowflake.swift - Window Detection
SnowfallApp/Sources/Common/WindowInfo.swift
Metal Rendering
- Frame Renderer
SnowfallApp/Sources/Common/SnowRenderer.swift - Metal Shaders
SnowfallApp/Sources/Common/SnowShader.metal - Performance Trace
SnowfallApp/Sources/Common/SnowPerformanceTrace.swift
Other components
- User
- macOS Window APIs
Connections 13
- User → Menubar Controls: adjusts settings
README.md - App Lifecycle → Menubar Controls: presents menu
SnowfallApp/Sources/SnowfallApp.swift - Menubar Controls → Preferences: updates and saves
SnowfallApp/Sources/Views/MenuBarSettings.swift - App Lifecycle → Overlay Controller: creates per screen
SnowfallApp/Sources/SnowfallApp.swift - Overlay Controller → Frame Renderer: delegates frames
SnowfallApp/Sources/Views/MetalSnowViewController.swift - Overlay Controller → Render Policy: sets display policy
SnowfallApp/Sources/Views/MetalSnowViewController.swift - Frame Renderer → Preferences: reads preferences
SnowfallApp/Sources/Common/SnowRenderer.swift - Frame Renderer → Particle Simulation: updates particles
SnowfallApp/Sources/Common/SnowRenderer.swift - Particle Simulation → Particle Data: initializes particles
SnowfallApp/Sources/Common/SnowSimulation.swift - Frame Renderer → Window Detection: queries window bounds
SnowfallApp/Sources/Common/SnowRenderer.swift - Window Detection → macOS Window APIs: queries window list
SnowfallApp/Sources/Common/WindowInfo.swift - Frame Renderer → Metal Shaders: uses Metal kernels
README.md - Frame Renderer → Performance Trace: records GPU frames
SnowfallApp/Sources/Common/SnowRenderer.swift