{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hud-orbit-backdrop",
  "type": "registry:component",
  "title": "HUD Orbit Backdrop",
  "description": "A decorative backdrop of dotted orbits seen in perspective over a faint grid, with small nodes travelling along the rings. Pure CSS.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "hud",
    "background",
    "orbit",
    "hud",
    "grid",
    "perspective",
    "decorative"
  ],
  "docs": "https://hyperblur.dev/effects/hud-orbit-backdrop",
  "files": [
    {
      "path": "registry/hyperblur/hud-orbit-backdrop.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/hud-orbit-backdrop.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface HudOrbitBackdropProps extends React.HTMLAttributes<HTMLDivElement> {\n  rings?: number;\n  nodes?: number;\n  tilt?: number;\n  speed?: number;\n  grid?: boolean;\n  accent?: string;\n  minHeight?: number;\n  children?: React.ReactNode;\n}\n\nconst css = `\n.hb-ua9 {\n  --hb-ua9-accent: #ff4d4d;\n  position: relative;\n  box-sizing: border-box;\n  display: grid;\n  place-items: center;\n  width: 100%;\n  overflow: hidden;\n  isolation: isolate;\n  container-type: inline-size;\n  background: radial-gradient(70% 60% at 50% 55%, #121212 0%, #0a0a0a 70%);\n  color: #ededed;\n  font-family: inherit;\n}\n.hb-ua9 *, .hb-ua9 *::before, .hb-ua9 *::after { box-sizing: border-box; }\n.hb-ua9-grid {\n  position: absolute;\n  inset: 0;\n  z-index: -2;\n  background-image:\n    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),\n    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);\n  background-size: 28px 28px;\n  background-position: center center;\n  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 20%, transparent 80%);\n  mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 20%, transparent 80%);\n  animation: hb-ua9-pan calc(40s / var(--hb-ua9-speed)) linear infinite;\n}\n.hb-ua9-scene {\n  position: absolute;\n  inset: 0;\n  z-index: -1;\n  perspective: 900px;\n  perspective-origin: 50% 40%;\n  pointer-events: none;\n}\n.hb-ua9-plane {\n  position: absolute;\n  left: 50%;\n  top: 54%;\n  width: max(110cqw, 320px);\n  aspect-ratio: 1;\n  transform: translate(-50%, -50%) rotateX(var(--hb-ua9-tilt));\n  transform-style: preserve-3d;\n}\n.hb-ua9-spin {\n  position: absolute;\n  inset: 0;\n  animation: hb-ua9-spin calc(140s / var(--hb-ua9-speed)) linear infinite;\n}\n.hb-ua9-ring {\n  position: absolute;\n  border-radius: 50%;\n  border: 1px dotted rgba(255,255,255,.28);\n}\n.hb-ua9-ring[data-alt=\"true\"] { border-style: dashed; border-color: rgba(255,255,255,.1); }\n.hb-ua9-ring[data-hot=\"true\"] { border-color: color-mix(in srgb, var(--hb-ua9-accent) 45%, transparent); }\n.hb-ua9-track {\n  position: absolute;\n  border-radius: 50%;\n  animation: hb-ua9-spin var(--hb-ua9-d) linear infinite;\n  animation-delay: var(--hb-ua9-delay);\n}\n.hb-ua9-track[data-rev=\"true\"] { animation-direction: reverse; }\n.hb-ua9-node {\n  position: absolute;\n  left: 50%;\n  top: 0;\n  width: 5px;\n  height: 5px;\n  margin: -2.5px 0 0 -2.5px;\n  border-radius: 50%;\n  background: #ededed;\n  box-shadow: 0 0 6px rgba(255,255,255,.7);\n}\n.hb-ua9-node[data-hot=\"true\"] { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: var(--hb-ua9-accent); box-shadow: 0 0 10px var(--hb-ua9-accent), 0 0 22px color-mix(in srgb, var(--hb-ua9-accent) 50%, transparent); }\n.hb-ua9-core {\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  width: 14%;\n  aspect-ratio: 1;\n  transform: translate(-50%, -50%);\n  border-radius: 50%;\n  background: radial-gradient(circle, color-mix(in srgb, var(--hb-ua9-accent) 35%, transparent), transparent 70%);\n  animation: hb-ua9-breathe calc(6s / var(--hb-ua9-speed)) ease-in-out infinite;\n}\n.hb-ua9-cross {\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  width: 22px;\n  height: 22px;\n  transform: translate(-50%, -50%);\n  background:\n    linear-gradient(var(--hb-ua9-accent), var(--hb-ua9-accent)) center / 1px 100% no-repeat,\n    linear-gradient(var(--hb-ua9-accent), var(--hb-ua9-accent)) center / 100% 1px no-repeat;\n  opacity: .8;\n}\n.hb-ua9-content { position: relative; z-index: 1; width: 100%; }\n@keyframes hb-ua9-spin { to { transform: rotate(360deg); } }\n@keyframes hb-ua9-pan { to { background-position: 28px 28px; } }\n@keyframes hb-ua9-breathe { 50% { transform: translate(-50%, -50%) scale(1.35); opacity: .6; } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-ua9-grid, .hb-ua9-spin, .hb-ua9-track, .hb-ua9-core { animation: none; }\n}\n`;\n\nfunction hash(n: number) {\n  let x = (n + 7) * 2654435761;\n  x = (x ^ (x >>> 16)) >>> 0;\n  x = Math.imul(x, 2246822519) >>> 0;\n  return (x ^ (x >>> 13)) >>> 0;\n}\n\nexport function HudOrbitBackdrop({\n  rings = 5,\n  nodes = 6,\n  tilt = 68,\n  speed = 1,\n  grid = true,\n  accent = \"#ff4d4d\",\n  minHeight = 280,\n  children,\n  className,\n  style,\n  ...rest\n}: HudOrbitBackdropProps) {\n  const count = Math.max(1, Math.min(12, Math.round(rings)));\n  const step = 44 / count;\n  const ringInset = (i: number) => `${(i * step).toFixed(2)}%`;\n\n  return (\n    <div\n      className={[\"hb-ua9\", className].filter(Boolean).join(\" \")}\n      style={{\n        [\"--hb-ua9-accent\" as string]: accent,\n        [\"--hb-ua9-tilt\" as string]: `${tilt.toFixed(1)}deg`,\n        [\"--hb-ua9-speed\" as string]: Math.max(0.05, speed).toFixed(3),\n        minHeight,\n        ...style,\n      }}\n      {...rest}\n    >\n      <style href=\"hb-hud-orbit-backdrop\" precedence=\"default\">{css}</style>\n      {grid ? <span className=\"hb-ua9-grid\" aria-hidden=\"true\" /> : null}\n      <div className=\"hb-ua9-scene\" aria-hidden=\"true\">\n        <div className=\"hb-ua9-plane\">\n          <div className=\"hb-ua9-spin\">\n            {Array.from({ length: count }, (_, i) => (\n              <span\n                key={`r${i}`}\n                className=\"hb-ua9-ring\"\n                data-alt={i % 2 === 1 ? \"true\" : \"false\"}\n                data-hot={i === count - 2 ? \"true\" : \"false\"}\n                style={{ inset: ringInset(i) }}\n              />\n            ))}\n            <span className=\"hb-ua9-core\" />\n            <span className=\"hb-ua9-cross\" />\n          </div>\n          {Array.from({ length: Math.max(0, Math.round(nodes)) }, (_, i) => {\n            const h = hash(i);\n            const ring = h % count;\n            const dur = (22 + (h % 31)) / Math.max(0.05, speed);\n            return (\n              <span\n                key={`n${i}`}\n                className=\"hb-ua9-track\"\n                data-rev={(h >>> 5) % 3 === 0 ? \"true\" : \"false\"}\n                style={{\n                  inset: ringInset(ring),\n                  [\"--hb-ua9-d\" as string]: `${dur.toFixed(2)}s`,\n                  [\"--hb-ua9-delay\" as string]: `-${(((h >>> 8) % 1000) / 1000 * dur).toFixed(2)}s`,\n                }}\n              >\n                <span className=\"hb-ua9-node\" data-hot={i % 3 === 0 ? \"true\" : \"false\"} />\n              </span>\n            );\n          })}\n        </div>\n      </div>\n      <div className=\"hb-ua9-content\">{children}</div>\n    </div>\n  );\n}\n\nexport default HudOrbitBackdrop;\n"
    }
  ]
}