{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"wind-rose-dial","type":"registry:component","title":"Wind Rose Dial","description":"A compass rose that sets a page-wide wind: drag the knob round to turn it and out to blow harder, with grains streaming behind it the way the wind blows.","dependencies":[],"registryDependencies":[],"files":[{"path":"components/viberdy/wind-rose-dial.tsx","content":"\"use client\";\n\nimport { useEffect, useRef } from \"react\";\nimport type { CSSProperties, KeyboardEvent as ReactKeyboardEvent } from \"react\";\n\n/**\n * WIND ROSE DIAL.\n * A compass rose that sets a page-wide wind: drag the knob round to turn it\n * and out to blow harder, with grains streaming behind it the way the wind\n * blows.\n *\n * FONTS. Archivo with its width axis for display, Instrument Serif italic for\n * the accent word, Geist Mono for labels. In Next: Archivo({ subsets:\n * [\"latin\"], axes: [\"wdth\"], variable: \"--font-ae\" }), Instrument_Serif({\n * subsets: [\"latin\"], weight: \"400\", style: \"italic\", variable:\n * \"--font-ae-serif\" }) and Geist_Mono({ subsets: [\"latin\"], variable:\n * \"--font-ae-mono\" }) on <html>. Without them it falls back to system fonts.\n *\n * CLIENT. The file starts with \"use client\". onChange is a function, so render\n * it from a client component (a server page.tsx cannot pass functions).\n *\n * WIND. Every Aeolian entry reads one page-wide wind (aeWind on globalThis),\n * so separately pasted entries still turn together.\n */\n\n/** The deepest ground: dusk, the footer. */\nconst AE_NIGHT = \"#150E0A\";\n\n/** Ink on the light grounds. */\nconst AE_UMBER = \"#2B1B12\";\n\n/** Lit sand: marks on the night ground. */\nconst AE_SAND = \"#DDAA72\";\n\n/** The pale ground, and the colour a sandstorm turns everything. */\nconst AE_HAZE = \"#EFE2CD\";\n\n/** The one filled accent: the low sun. */\nconst AE_EMBER = \"#E0602C\";\n\n/** Labels and readouts. */\nconst AE_MONO = 'var(--font-ae-mono, var(--font-geist-mono, \"Geist Mono\")), \"Geist Mono\", ui-monospace, \"SFMono-Regular\", Menlo, monospace';\n\nconst aeClamp = (v: number, a = 0, b = 1) => (v < a ? a : v > b ? b : v);\n\nconst aeReducedSnap = () => typeof window !== \"undefined\" && typeof window.matchMedia === \"function\" && window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n\n/**\n * The page's wind. `angle` is the way it blows TOWARD, in degrees on the\n * ground: 0 = to the right (east), 90 = away from you (north), 180 = left,\n * 270 = toward you. `speed` is in km/h. The dune stage, the grains, the dust\n * of every dissolve, the nav's vane and the footer all read this one store,\n * so turning the rose in the hero turns every grain on the page. It lives on\n * globalThis, so entries pasted as separate files still share one wind.\n */\nconst aeWind: { angle: number; speed: number; subs: Set<() => void> } = ((globalThis as unknown as { __aeolianWind?: { angle: number; speed: number; subs: Set<() => void> } }).__aeolianWind ??= { angle: 55, speed: 30, subs: new Set() });\n\n/** Set the wind (any part may be omitted) and tell every listener. */\nfunction aeSetWind(next: { angle?: number; speed?: number }) {\n  if (next.angle !== undefined) aeWind.angle = ((next.angle % 360) + 360) % 360;\n  if (next.speed !== undefined) aeWind.speed = aeClamp(next.speed, 0, 60);\n  aeWind.subs.forEach((f) => f());\n}\n\n/** Hear every wind change; returns an unsubscribe. Listeners write to the DOM, not to React state. */\nfunction aeOnWind(fn: () => void): () => void {\n  aeWind.subs.add(fn);\n  return () => {\n    aeWind.subs.delete(fn);\n  };\n}\n\n/**\n * The wind as a direction on a flat screen: x right, y down. Wind blowing\n * away from you reads as rising, toward you as falling, a little flattened\n * (the ground is seen at a low angle). Unit length.\n */\nfunction aeWindScreen(angle = aeWind.angle): [number, number] {\n  const a = (angle * Math.PI) / 180;\n  const x = Math.cos(a);\n  const y = -Math.sin(a) * 0.55;\n  const l = Math.hypot(x, y) || 1;\n  return [x / l, y / l];\n}\n\nconst AE_POINTS = [\"N\", \"NNE\", \"NE\", \"ENE\", \"E\", \"ESE\", \"SE\", \"SSE\", \"S\", \"SSW\", \"SW\", \"WSW\", \"W\", \"WNW\", \"NW\", \"NNW\"];\n\n/** Where the wind comes FROM, as a compass point (north is away from you): blowing to the right is a westerly. */\nfunction aeWindFrom(angle = aeWind.angle): string {\n  const toward = (((90 - angle) % 360) + 360) % 360;\n  const from = (toward + 180) % 360;\n  return AE_POINTS[Math.round(from / 22.5) % 16] ?? \"N\";\n}\n\n/** \"From WSW · 26 km/h\". */\nfunction aeWindText(angle = aeWind.angle, speed = aeWind.speed): string {\n  return \"From \" + aeWindFrom(angle) + \" · \" + Math.round(speed) + \" km/h\";\n}\n\nconst WR_CSS =\n  \".ae-wr{width:var(--wr-size,132px);touch-action:none;cursor:grab;-webkit-tap-highlight-color:transparent}.ae-wr:active{cursor:grabbing}\" +\n  \".ae-wr:focus-visible{border-radius:9999px}\" +\n  \".ae-wr [data-wr-knob]{transition:r 200ms}.ae-wr:hover [data-wr-knob]{r:7.5}\" +\n  \"@container (max-width: 699px){.ae-wr{width:var(--wr-size,104px)}}\";\n\nexport interface WindRoseDialProps {\n  /** Diameter in px; by default 132 (104 under a 700px container). */\n  size?: number;\n  /** The ground it sits on. */\n  tone?: \"night\" | \"haze\";\n  /** Set the page's wind once, when the dial mounts. */\n  angle?: number;\n  speed?: number;\n  /** Grains streaming behind the rose in the wind's direction. */\n  streams?: boolean;\n  /** The wind in words under the rose (\"From ENE · 26 km/h\"). */\n  caption?: boolean;\n  /** Called after the wind changes (with the new angle and speed). */\n  onChange?: (wind: { angle: number; speed: number }) => void;\n  label?: string;\n  className?: string;\n  style?: CSSProperties;\n}\n\n/**\n * WindRoseDial — a compass rose that sets the page's wind. Drag the knob\n * round to turn it (it sits where the wind comes FROM, like the caption says;\n * the arrow across the rose points where it blows), out to blow harder;\n * arrows turn it by 15°, up and down change the speed. Every Aeolian engine on\n * the page follows.\n */\nexport function WindRoseDial({ size, tone = \"night\", angle, speed, streams = true, caption = true, onChange, label = \"Wind\", className = \"\", style }: WindRoseDialProps) {\n  const ref = useRef<HTMLDivElement>(null);\n  const svgRef = useRef<SVGSVGElement>(null);\n  const canvasRef = useRef<HTMLCanvasElement>(null);\n  const onChangeRef = useRef(onChange);\n  useEffect(() => {\n    onChangeRef.current = onChange;\n  });\n  const ink = tone === \"night\" ? AE_HAZE : AE_UMBER;\n  const R0 = 13;\n  const R1 = 40;\n\n  useEffect(() => {\n    if (angle !== undefined || speed !== undefined) aeSetWind({ angle, speed });\n    // Only the first values: after that the dial (and anything else on the page) owns the wind.\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, []);\n\n  // Draw the rose from the store whenever the wind changes (no React render).\n  useEffect(() => {\n    const el = ref.current;\n    const svg = svgRef.current;\n    if (!el || !svg) return;\n    const draw = () => {\n      const a = (aeWind.angle * Math.PI) / 180;\n      const r = R0 + (aeWind.speed / 60) * (R1 - R0);\n      // The knob sits upwind: you place the wind's source and it blows through the rose.\n      const kx = 50 - Math.cos(a) * r;\n      const ky = 50 + Math.sin(a) * r;\n      svg.querySelector(\"[data-wr-needle]\")?.setAttribute(\"transform\", \"rotate(\" + (-aeWind.angle).toFixed(2) + \" 50 50)\");\n      const knob = svg.querySelector(\"[data-wr-knob]\");\n      knob?.setAttribute(\"cx\", kx.toFixed(2));\n      knob?.setAttribute(\"cy\", ky.toFixed(2));\n      svg.querySelector(\"[data-wr-reach]\")?.setAttribute(\"r\", r.toFixed(2));\n      const cap = el.parentElement?.querySelector(\"[data-wr-caption]\");\n      if (cap) cap.textContent = aeWindText();\n      el.setAttribute(\"aria-valuenow\", String(Math.round(aeWind.angle)));\n      el.setAttribute(\"aria-valuetext\", \"Blowing from \" + aeWindFrom() + \", \" + Math.round(aeWind.speed) + \" km/h\");\n    };\n    draw();\n    return aeOnWind(draw);\n  }, []);\n\n  // Pointer: the wind comes from where you hold it (so it blows the other way), speed from the distance.\n  useEffect(() => {\n    const el = ref.current;\n    if (!el) return;\n    let drag = false;\n    const set = (e: PointerEvent) => {\n      const r = el.getBoundingClientRect();\n      const x = ((e.clientX - r.left) / r.width) * 100 - 50;\n      const y = ((e.clientY - r.top) / r.height) * 100 - 50;\n      const d = Math.hypot(x, y);\n      if (d < 3) return;\n      aeSetWind({ angle: (Math.atan2(-y, x) * 180) / Math.PI + 180, speed: aeClamp((d - R0) / (R1 - R0)) * 60 });\n      onChangeRef.current?.({ angle: aeWind.angle, speed: aeWind.speed });\n    };\n    const down = (e: PointerEvent) => {\n      drag = true;\n      el.setPointerCapture(e.pointerId);\n      set(e);\n      e.preventDefault();\n    };\n    const move = (e: PointerEvent) => {\n      if (drag) set(e);\n    };\n    const up = () => {\n      drag = false;\n    };\n    el.addEventListener(\"pointerdown\", down);\n    el.addEventListener(\"pointermove\", move);\n    el.addEventListener(\"pointerup\", up);\n    el.addEventListener(\"pointercancel\", up);\n    return () => {\n      el.removeEventListener(\"pointerdown\", down);\n      el.removeEventListener(\"pointermove\", move);\n      el.removeEventListener(\"pointerup\", up);\n      el.removeEventListener(\"pointercancel\", up);\n    };\n  }, []);\n\n  // Grains streaming through the rose, the way the wind blows.\n  useEffect(() => {\n    const canvas = canvasRef.current;\n    if (!canvas || !streams) return;\n    const c2 = canvas.getContext(\"2d\");\n    if (!c2) return;\n    const ctx = c2;\n    const N = 240;\n    const g = Array.from({ length: N }, (_, i) => ({ x: ((i * 0.618034) % 1) * 2 - 1, y: ((i * 0.381966 + 0.3) % 1) * 2 - 1, s: 0.5 + ((i * 0.7548) % 1), w: (i * 0.2649) % 1 }));\n    let raf = 0;\n    let last = 0;\n    let on = false;\n    const still = aeReducedSnap();\n    const draw = (now: number) => {\n      raf = 0;\n      const w = canvas.clientWidth;\n      if (!w) return;\n      const dpr = Math.min(2, window.devicePixelRatio || 1);\n      if (canvas.width !== Math.round(w * dpr)) {\n        canvas.width = Math.round(w * dpr);\n        canvas.height = Math.round(w * dpr);\n      }\n      const dt = last ? Math.min(0.05, (now - last) / 1000) : 0;\n      last = now;\n      const [dx, dy] = aeWindScreen();\n      const v = aeWind.speed / 60;\n      ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n      ctx.clearRect(0, 0, w, w);\n      const h = w / 2;\n      for (const p of g) {\n        const k = (0.35 + 0.9 * v) * p.s;\n        p.x += dx * k * dt * 1.1;\n        p.y += dy * k * dt * 1.1 + Math.sin(now / 700 + p.w * 9) * 0.0016 * v;\n        if (p.x > 1) p.x -= 2;\n        if (p.x < -1) p.x += 2;\n        if (p.y > 1) p.y -= 2;\n        if (p.y < -1) p.y += 2;\n        const d = Math.hypot(p.x, p.y);\n        const a = aeClamp(1.15 - d) * (0.42 + 0.5 * p.w);\n        if (a <= 0.01) continue;\n        const len = 3 + 26 * v * p.s;\n        ctx.strokeStyle = tone === \"night\" ? \"rgba(221,170,114,\" + a.toFixed(3) + \")\" : \"rgba(184,116,63,\" + a.toFixed(3) + \")\";\n        ctx.lineWidth = 0.6 + p.w * 0.9;\n        ctx.beginPath();\n        ctx.moveTo(h + p.x * h, h + p.y * h);\n        ctx.lineTo(h + p.x * h - dx * len, h + p.y * h - dy * len);\n        ctx.stroke();\n      }\n      if (on && !still) raf = requestAnimationFrame(draw);\n    };\n    const io = new IntersectionObserver((es) => {\n      on = !!es[es.length - 1]?.isIntersecting;\n      if (on && !raf) raf = requestAnimationFrame(draw);\n    });\n    io.observe(canvas);\n    const off = aeOnWind(() => {\n      if (!raf) raf = requestAnimationFrame(draw);\n    });\n    return () => {\n      io.disconnect();\n      off();\n      if (raf) cancelAnimationFrame(raf);\n    };\n  }, [streams, tone]);\n\n  const step = (e: ReactKeyboardEvent<HTMLDivElement>) => {\n    const k = e.key;\n    let a = aeWind.angle;\n    let s = aeWind.speed;\n    if (k === \"ArrowLeft\") a += 15;\n    else if (k === \"ArrowRight\") a -= 15;\n    else if (k === \"ArrowUp\") s += 2;\n    else if (k === \"ArrowDown\") s -= 2;\n    else if (k === \"PageUp\") s += 10;\n    else if (k === \"PageDown\") s -= 10;\n    else if (k === \"Home\") s = 0;\n    else if (k === \"End\") s = 60;\n    else return;\n    e.preventDefault();\n    aeSetWind({ angle: a, speed: s });\n    onChangeRef.current?.({ angle: aeWind.angle, speed: aeWind.speed });\n  };\n\n  const ticks = Array.from({ length: 32 }, (_, i) => i);\n  return (\n    <div className={\"ae-scope inline-block \" + className} style={{ ...(size ? ({ \"--wr-size\": size + \"px\" } as CSSProperties) : null), ...style }}>\n      <style>{WR_CSS}</style>\n      <div\n        ref={ref}\n        role=\"slider\"\n        tabIndex={0}\n        aria-label={label + \" direction and speed\"}\n        aria-valuemin={0}\n        aria-valuemax={359}\n        aria-valuenow={18}\n        onKeyDown={step}\n        className=\"ae-wr relative aspect-square select-none\"\n        style={{ color: ink }}\n      >\n        {streams ? <canvas ref={canvasRef} aria-hidden className=\"pointer-events-none absolute inset-[-18%] h-[136%] w-[136%] rounded-full\" /> : null}\n        <div aria-hidden className=\"absolute inset-0 rounded-full\" style={{ background: tone === \"night\" ? \"radial-gradient(circle at 50% 40%, rgba(43,27,18,.55), rgba(21,14,10,.72))\" : \"radial-gradient(circle at 50% 40%, rgba(255,250,242,.7), rgba(239,226,205,.85))\", backdropFilter: \"blur(6px)\", WebkitBackdropFilter: \"blur(6px)\", border: \"1px solid \" + (tone === \"night\" ? \"rgba(239,226,205,.2)\" : \"rgba(43,27,18,.16)\") }} />\n        <svg ref={svgRef} viewBox=\"0 0 100 100\" aria-hidden className=\"absolute inset-0 h-full w-full\">\n          {ticks.map((i) => {\n            const a = (i / 32) * Math.PI * 2;\n            const long = i % 8 === 0;\n            const r0 = long ? 41.5 : 44;\n            return <line key={i} x1={(50 + Math.cos(a) * r0).toFixed(2)} y1={(50 + Math.sin(a) * r0).toFixed(2)} x2={(50 + Math.cos(a) * 46.5).toFixed(2)} y2={(50 + Math.sin(a) * 46.5).toFixed(2)} stroke=\"currentColor\" strokeWidth={long ? 1.1 : 0.6} opacity={long ? 0.75 : 0.35} />;\n          })}\n          {(\n            [\n              [\"N\", 50, 13.5],\n              [\"E\", 87, 51.8],\n              [\"S\", 50, 90],\n              [\"W\", 13, 51.8],\n            ] as const\n          ).map(([t, x, y]) => (\n            <text key={t} x={x} y={y} textAnchor=\"middle\" fontSize=\"6.2\" fill=\"currentColor\" opacity=\"0.7\" style={{ fontFamily: AE_MONO, letterSpacing: \"0.08em\" }}>\n              {t}\n            </text>\n          ))}\n          <circle data-wr-reach=\"\" cx=\"50\" cy=\"50\" r=\"24\" fill=\"none\" stroke={AE_SAND} strokeWidth=\"0.5\" strokeDasharray=\"1 2.2\" opacity=\"0.7\" />\n          <g data-wr-needle=\"\" transform=\"rotate(-18 50 50)\">\n            <path d=\"M14 50 Q 32 47.6 50 50 Q 68 52.4 82 50\" fill=\"none\" stroke={AE_SAND} strokeWidth=\"1.1\" strokeLinecap=\"round\" opacity=\"0.55\" />\n            <path d=\"M84.5 50 L76.5 46.2 Q 78.6 50 76.5 53.8 Z\" fill={AE_SAND} />\n          </g>\n          <circle cx=\"50\" cy=\"50\" r=\"1.6\" fill=\"currentColor\" opacity=\"0.8\" />\n          <circle data-wr-knob=\"\" cx=\"73\" cy=\"42\" r=\"6\" fill={AE_EMBER} stroke={tone === \"night\" ? AE_NIGHT : \"#FFF8EE\"} strokeWidth=\"1.6\" />\n        </svg>\n      </div>\n      {caption ? (\n        <p data-wr-caption=\"\" className=\"ae-num mt-3 text-center text-[10.5px] uppercase tracking-[0.16em]\" style={{ fontFamily: AE_MONO, color: ink, opacity: 0.75 }}>\n          {aeWindText()}\n        </p>\n      ) : null}\n    </div>\n  );\n}\n","type":"registry:component","target":"components/viberdy/wind-rose-dial.tsx"}],"meta":{"tier":"free","tags":["dial","knob","slider","input","compass","wind","canvas","particles","control"],"href":"https://viberdy.dev/library/wind-rose-dial","aiPrompt":"Build WindRoseDial, a compass rose that sets a page-wide wind: drag the knob round to turn it and out to blow harder, with grains streaming behind it the way the wind blows. Style: Aeolian (wind-blown sand as a material, warm, cinematic, low sun). Fixed palette, no theming: night #150E0A (deepest ground, dusk, footer), umber #2B1B12 (ink on light grounds), dune #B8743F (mid sand, marks on haze), sand #DDAA72 (lit sand, marks on night), haze #EFE2CD (the pale ground, and the colour a sandstorm turns everything), ember #E0602C (the one filled accent: CTA, knob, active; its label ink is #1A0E07). Umber on haze is 12.9:1, haze on night 15.6:1. Type: Archivo variable loaded with its wdth axis (next/font: Archivo({ subsets: [\"latin\"], axes: [\"wdth\"], variable: \"--font-ae\" })) and read as var(--font-ae, var(--font-display, \"Archivo\")); display is wide and light: weight 300-360 (320 section headings, 330 hero), font-stretch 112.5% (125% for big numerals, the brand and the footer wordmark), set with the font-stretch property (never font-variation-settings, so the canvas rasterizer can paint the same instance), tracking -0.02em to -0.04em, line-height 1-1.02 (hero 0.98); body copy 14.5-16.5px at stretch 100%. Accent: Instrument Serif italic (var(--font-ae-serif, var(--font-instrument-serif, \"Instrument Serif\")), weight 400, stretch 100%, tracking -0.01em), one word per line at most, sand on night and dune on haze. Labels and readouts: Geist Mono (var(--font-ae-mono, var(--font-geist-mono, \"Geist Mono\"))), 10-12px, uppercase, tracking 0.14-0.16em. Buttons are full pills (48px high, 14.5px, weight 500); cards are radius 22-28px. Every section root carries data-ae-ground=\"night\" | \"haze\" (a nav reads it). One focus ring through a .ae-scope root: 2px solid, offset 3px, !important so site rules cannot beat it, sand on night and umber on haze. Tabular figures on numbers; a press scales to 0.97 in 180ms; arrows slide 3px on hover; anything a frame loop writes carries data-ae-live and has transitions off. Scroll-told parts are driven by one number p (0..1) from the hook useAeDrive(ref, { mode: \"scroll\" | \"auto\", progress, still, period, measure }, render): in scroll mode a document-level capture-phase scroll listener (plus resize and a ResizeObserver, at most once per frame) measures the section and the value chases it, v += (target - v) * 0.14 per frame, snapping when within 0.0004; the nearest ancestor that really scrolls (overflow-y auto/scroll/overlay and scrollHeight > clientHeight) is found every frame, otherwise the window, so the same section works on a page and inside a scrolling box. measure is aePin (a tall pinned block: (view.top - rect.top) / (rect.height - view.height)) or aePass (a block crossing the view: (view.top + view.height - rect.top) / (rect.height + view.height)). Mode \"auto\" (previews, embeds) plays a slow loop once the section has been seen (IntersectionObserver, 200px margin): u = ((now - t0) % period) / period, p = u < 0.55 ? smoothstep(u / 0.55) : u < 0.7 ? 1 : u < 0.95 ? 1 - smoothstep((u - 0.7) / 0.25) : 0 (period default 16000 ms); the progress prop holds one moment; reduced motion renders the settled value still. render writes straight to the DOM; nothing re-renders React per frame. Pinned runs are height calc(var(--ae-vh, 100svh) * N) holding a sticky top-0 box of var(--ae-vh, 100svh), and only when mode is scroll, progress is unset and motion is not reduced; otherwise the section is height ?? var(--ae-vh, 100svh) (one screen) and its box fills it. Each file exports its component, its props interface and the AeGround / AeDriveMode types. Reduced motion (live, via useSyncExternalStore on prefers-reduced-motion) shows each section's settled state and turns every dissolve into a 220ms fade. Same-page links go through a safe-href helper (https, http, mailto, tel, same-site paths and anchors only; tabs and newlines stripped; backslashes and // refused, anything else becomes #) and glide (auto under reduced motion) to the [data-ae-anchor] target inside the nearest [data-ae-site]. React 19, Tailwind v4 with container queries (@container on the root, @3xl = 768px for the desktop layout; JS phone checks use a container width under 700px). No three.js, no images, no assets: everything is hand-written WebGL2 or 2D canvas, WebGL canvases are aria-hidden, and every WebGL part falls back to a painted gradient.\n\nThe wind (shared module store, not React state): aeWind = { angle: 205, speed: 26, subs }. angle is the way it blows TOWARD, in degrees on the ground (0 = right/east, 90 = away from you/north, 180 = left, 270 = toward you), normalised to 0..360; speed is km/h clamped 0..60. aeSetWind({ angle?, speed? }) writes and calls every subscriber; aeOnWind(fn) subscribes and returns an unsubscribe; listeners write to the DOM, never to React state. aeWindScreen(angle) is the wind as a unit vector on the screen: x = cos a, y = -sin a * 0.55 (away from you reads as rising, flattened because the ground is seen low), normalised. aeWindFrom(angle): toward = (90 - angle) mod 360, from = (toward + 180) mod 360, index round(from / 22.5) mod 16 into N NNE NE ENE E ESE SE SSE S SSW SW WSW W WNW NW NNW. aeWindText = \"From ENE · 26 km/h\" (the default 205 reads ENE). The store lives on globalThis.__aeolianWind (created once with ??=, so parts pasted as separate files still share one wind). Every engine on the page reads this one store.\n\nSize: 132px square (CSS variable --wr-size; 104px when the container is under 700px, i.e. an @container ancestor with max-width 699px; the size prop overrides), touch-action none, cursor grab/grabbing, wrapper inline-block. The disc: a full circle plate with a radial-gradient (night: rgba(43,27,18,.55) to rgba(21,14,10,.72); haze: rgba(255,250,242,.7) to rgba(239,226,205,.85), centre at 50% 40%), backdrop blur 6px and a 1px border (haze at 20% / umber at 16%). The ink is haze on night, umber on haze.\nSVG viewBox 0 0 100 100 over it: 32 ticks at i / 32 of a turn, every eighth (N, E, S, W) long (radius 41.5 to 46.5, stroke 1.1, opacity 0.75), the rest short (44 to 46.5, stroke 0.6, opacity 0.35); the letters N (50, 13.5), E (87, 51.8), S (50, 90), W (13, 51.8) in the mono face at 6.2 units, opacity 0.7; a dashed circle (sand, stroke 0.5, dash \"1 2.2\", opacity 0.7) centred at 50,50 whose radius is the speed ring r = 13 + speed / 60 * (40 - 13); the needle group rotated by -angle about the centre: a curved shaft (M14 50 Q 32 47.6 50 50 Q 68 52.4 82 50, sand, 1.1, round, opacity 0.55) and an arrowhead (M84.5 50 L76.5 46.2 Q 78.6 50 76.5 53.8 Z) in sand; a 1.6 centre dot; the knob, an ember circle r 6 (r 7.5 on hover, 200 ms) with a 1.6 stroke (night on the dark plate, #FFF8EE on the pale), at (50 - cos a * r, 50 + sin a * r): the knob sits UPWIND, where the wind comes from (you place the wind's source and it blows through the rose, along the needle). The store's angle is the way the wind blows to, with north away from you; the distance from the centre is the speed, 0 to 60 km/h. All of it is redrawn from the store on every change by writing attributes (no React render).\nPointer: pointerdown captures the pointer and sets; while dragging every pointermove sets: x, y = pointer in the 100-unit box relative to the centre, d = hypot; ignore d < 3; angle = atan2(-y, x) in degrees + 180 (the wind comes from where you hold the knob and blows the other way), speed = clamp((d - 13) / (40 - 13)) * 60; then aeSetWind and onChange({ angle, speed }). Keyboard (role slider, tabIndex 0, aria-label \"<label> direction and speed\", valuemin 0, valuemax 359, valuenow = round(angle), valuetext \"Blowing from ENE, 26 km/h\"): ArrowLeft +15 degrees, ArrowRight -15, ArrowUp +2 km/h, ArrowDown -2, PageUp +10, PageDown -10, Home 0 (calm), End 60 (full). The focus ring is the kit ring with a full radius.\nStreams: a 2D canvas inset -18% (136% of the dial), circular-clipped, 240 grains with golden-ratio seeds in the unit square -1..1 (wrapping), each moving along aeWindScreen() by k = (0.35 + 0.9 v) * s * dt * 1.1 (v = speed / 60, s = 0.5-1.5 per grain) with a slight sine wobble; alpha = clamp(1.15 - distance from centre) * (0.42 + 0.5 w); each drawn as a streak of length 3 + 26 v s and width 0.6 + 0.9 w in rgba(221,170,114) on night or rgba(184,116,63) on haze; DPR up to 2; the loop runs only while on screen and re-kicks on wind changes; reduced motion draws one still frame. Caption (optional) is a 10.5px mono line at 75% opacity under the rose: \"From ENE · 26 km/h\". Every Aeolian engine on the page follows this store. Props: size, tone (\"night\" | \"haze\"), angle and speed (applied to the store once, when the dial mounts), streams (true), caption (true), onChange({ angle, speed }), label (\"Wind\"), className, style.","license":"https://viberdy.dev/license"}}