Interactive Visual Patterns

Reference for the three scroll-driven service sketches on dxn.is. Use these patterns as the starting point for any future interactive visuals on the site. Every design decision is documented so a future session can reproduce the aesthetic without guessing.

Core Principles

01

Scroll is the only interaction

Scroll at 50% shows the 50% visual state. Scroll backward and it reverses. When scrolling stops, nothing moves. No hover, no click, no time-based animation. The scroll IS the timeline. This is the Apple homepage pattern.

Implementation: each sketch receives progress (0 to 1) from window.__serviceScrollState. The draw() function computes all visual properties as pure functions of progress.

02

Smoothstep easing

Raw scroll progress is linear and feels mechanical. Apply smoothstep: t * t * (3 - 2 * t). This eases the start and end of the animation without adding complexity.

03

Theme-aware colors via dynamic functions

Colors are never hardcoded. They come from functions that check the current theme.

function gold() { return isDarkMode() ? [255, 233, 74] : [180, 145, 10]; }
function coral() { return isDarkMode() ? [232, 100, 100] : [200, 70, 70]; }
function teal() { return isDarkMode() ? [80, 160, 176] : [40, 110, 130]; }

Dark mode: bright saturated values designed to glow against #09090B. Light mode: darker, richer values that pop against warm cream backgrounds and pass WCAG AA.

04

Lifecycle management

Sketches create and destroy themselves based on visibility. When a panel scrolls out of view, the p5 instance is removed. When it scrolls back in, a fresh instance is created. Every visit starts from the beginning.

05

Responsive sizing

All positions and sizes use relative values (p.min(w, h) * 0.32 for radius). On windowResized, canvases resize and positions recompute.

06

p5.js instance mode

All sketches use new p5(function(p) { ... }, container) so multiple canvases coexist without interfering with each other or the hero particles.

Sketch 1: Alignment Network

Strategic Planning & Facilitation

Visual metaphor: diverse perspectives aligning into a coherent whole.

Start (progress = 0)

14 gold nodes scattered randomly. Faint dashed teal connections between nearby nodes (80px threshold). Nodes at 80 alpha, 1x size. No center node.

End (progress = 1)

14 nodes in a precise circle (32% radius). Solid teal connections (260px threshold, 2.2px weight). Nodes at 255 alpha, 1.6x size with glow halos. Center facilitator at 22px.

Key transitions

Colors

Gold: nodes, center, halos
Teal: connections

Sketch 2: Radial Pulse

Workshops & Speaking

Visual metaphor: a catalyst at the center energizing concentric rings of participants.

Start (progress = 0)

Coral center at 10px (120 alpha). All participant nodes invisible, collapsed to center. No connections.

End (progress = 1)

Center at 20px (240 alpha) with 2.5x glow. Inner ring (6 nodes) and outer ring (10 nodes) at full radius and brightness. Connections between nearby nodes visible.

Staged reveal

Colors

Coral: center catalyst, ring guides, pulse waves
Gold: participant nodes, connections

Sketch 3: Gravitational Pair

Coaching & Advisory

Visual metaphor: two entities in relationship, drawn closer through the coaching engagement.

Start (progress = 0)

Two teal nodes in a wide orbit (28% radius). Dim (120 alpha, 12px). Faint connection (30 alpha, 0.5px). Orbit path barely visible.

End (progress = 1)

Tight orbit (8% radius). Bright (255 alpha, 22px) with glow halos. Strong connection (200 alpha, 2.8px). Trail and orbit path visible. Three full rotations completed.

Key mechanics

Colors

Teal: everything (single-color palette for intimacy)

Visual Vocabulary

Maintain these conventions across all interactive elements on dxn.is:

How to Reuse

  1. Define start state (progress = 0) and end state (progress = 1)
  2. Every visual property = a function of progress (use lerp, map, constrain)
  3. Apply smoothstep easing to raw progress
  4. Use the theme-aware color functions
  5. Wrap in manageVisibility() for lifecycle management
  6. Use p5.js instance mode
  7. Test by scrubbing the scroll slowly and fast in both directions

Source file: ~/dev/dxnis/js/service-visuals.js