{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cursor-spotlight",
  "description": "A noise-wobbled glow that tracks your cursor across the dark — hover to move it.",
  "dependencies": [],
  "registryDependencies": [
    "https://www.pixel-perfect.space/r/shader-canvas.json"
  ],
  "files": [
    {
      "path": "registry/new-york/shaders/cursor-spotlight.tsx",
      "content": "\"use client\";\n\n/**\n * A noise-wobbled glow that tracks your cursor across the dark — hover to move it.\n */\n\nimport ShaderCanvas from \"./shader-canvas\";\n\nconst FRAGMENT_SHADER = /* glsl */ `\n      void main() {\n        vec2 uv = uv01();\n        float aspect = resolution.x / resolution.y;\n\n        // distance to the cursor, aspect-corrected so the glow is round\n        vec2 diff = uv - mouse;\n        diff.x *= aspect;\n        float d = length(diff);\n\n        // wobble the spotlight edge with animated noise (fbm is ~0..1, recenter)\n        float n = fbm(uv * 6.0 + time * 0.4);\n        d += (n - 0.5) * 0.1;\n\n        float glow = smoothstep(0.2, 0.0, d);\n        vec3 col = mix(vec3(0.0), vec3(1.0), glow);\n        gl_FragColor = vec4(col, 1.0);\n      }\n    `;\n\nexport default function CursorSpotlight({\n  className,\n  dpr,\n  controls,\n}: {\n  className?: string;\n  dpr?: number;\n  controls?: boolean;\n}) {\n  return (\n    <ShaderCanvas\n      fragmentShader={FRAGMENT_SHADER}\n      className={className}\n      dpr={dpr}\n      controls={controls}\n    />\n  );\n}\n",
      "type": "registry:component",
      "target": "components/pixel-perfect/cursor-spotlight.tsx"
    }
  ],
  "type": "registry:block"
}