{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "wireframe-orb",
  "title": "Wireframe Orb",
  "author": "VenusUI",
  "description": "A WebGL wireframe sphere with glowing vertices that turns and leans toward the pointer.",
  "dependencies": [
    "three",
    "@react-three/fiber"
  ],
  "devDependencies": [
    "@types/three"
  ],
  "registryDependencies": [
    "https://venusui.com/r/use-scene-state.json"
  ],
  "files": [
    {
      "path": "registry/default/ui/wireframe-orb.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Canvas, useFrame } from \"@react-three/fiber\"\nimport type { Group } from \"three\"\n\nimport { cn } from \"@/lib/utils\"\nimport { useSceneState } from \"@/registry/default/hooks/use-scene-state\"\n\ninterface WireframeOrbProps {\n  /** Geometry detail. 0 is a plain icosahedron; 3 is nearly round. */\n  detail?: number\n  /** How strongly the orb leans toward the pointer. */\n  follow?: number\n  /** Accessible description of the graphic. */\n  label?: string\n  className?: string\n}\n\nfunction Orb({ detail, follow, color }: { detail: number; follow: number; color: string }) {\n  const group = React.useRef<Group>(null)\n\n  useFrame(({ pointer }, delta) => {\n    const g = group.current\n    if (!g) return\n    g.rotation.y += delta * 0.2\n    // Ease toward the pointer for a subtle parallax tilt.\n    g.rotation.x += (pointer.y * follow - g.rotation.x) * 0.05\n    g.position.x += (pointer.x * follow * 0.3 - g.position.x) * 0.05\n  })\n\n  return (\n    <group ref={group}>\n      <mesh>\n        <icosahedronGeometry args={[1.25, detail]} />\n        <meshBasicMaterial color={color} wireframe transparent opacity={0.35} />\n      </mesh>\n      <points>\n        <icosahedronGeometry args={[1.25, detail]} />\n        <pointsMaterial color={color} size={3} sizeAttenuation={false} />\n      </points>\n    </group>\n  )\n}\n\n/**\n * A slowly turning wireframe sphere with glowing vertices that leans toward\n * the pointer. Uses the CSS text color; pauses off screen and with reduced\n * motion.\n */\nfunction WireframeOrb({ detail = 2, follow = 0.5, label = \"Rotating wireframe sphere\", className }: WireframeOrbProps) {\n  const ref = React.useRef<HTMLDivElement>(null)\n  const { color, active } = useSceneState(ref)\n\n  return (\n    <div ref={ref} role=\"img\" aria-label={label} data-slot=\"wireframe-orb\" className={cn(\"relative aspect-square w-full max-w-sm text-foreground\", className)}>\n      <Canvas\n        camera={{ position: [0, 0, 3.6], fov: 45 }}\n        dpr={[1, 2]}\n        frameloop={active ? \"always\" : \"demand\"}\n        fallback={<p className=\"p-4 text-sm text-muted-foreground\">3D graphics are not available in this browser.</p>}\n      >\n        <Orb detail={detail} follow={follow} color={color} />\n      </Canvas>\n    </div>\n  )\n}\n\nexport { WireframeOrb, type WireframeOrbProps }\n",
      "type": "registry:ui"
    }
  ],
  "meta": {
    "version": "0.1.0"
  },
  "categories": [
    "3d",
    "interactive",
    "animations"
  ],
  "type": "registry:ui"
}