{
  "registryVersion": 1,
  "id": "backgrounds/cad-viewport-background",
  "slug": "cad-viewport-background",
  "category": "backgrounds",
  "title": "CAD Viewport Background",
  "description": "Four CAD viewports (top, front, right, perspective) frame your content while a wireframe model spins, snaps to the next shape, and orbits with the pointer.",
  "tags": [
    "3d",
    "neon",
    "cursor",
    "background",
    "outline"
  ],
  "useCases": [
    "Hero background for a 3D design, CAD, or engineering software launch",
    "Backdrop for an AI 3D-generation tool where the headline sits in the middle of the workspace",
    "Feature section for a modeling course or maker community that shows one object from every side"
  ],
  "placement": [
    "background",
    "hero"
  ],
  "style": [
    "techy",
    "dark",
    "minimal"
  ],
  "intensity": "subtle",
  "stack": {
    "framework": "react",
    "styling": "tailwindcss"
  },
  "dependencies": {
    "npm": {
      "gsap": "^3.13.0",
      "@gsap/react": "^2.1.0"
    },
    "gsapPlugins": []
  },
  "variants": [],
  "version": "1.1.0",
  "updatedAt": "2026-10-13",
  "design": {
    "motion": "smooth",
    "pace": "moderate",
    "radius": "soft",
    "scheme": "both",
    "palette": "multicolor",
    "hues": [
      "blue",
      "cyan",
      "sky",
      "red",
      "emerald"
    ],
    "triggers": [
      "load",
      "click",
      "loop"
    ]
  },
  "adapt": {
    "colors": [
      {
        "hue": "blue",
        "classes": 0,
        "literals": 34
      },
      {
        "hue": "cyan",
        "classes": 0,
        "literals": 13
      },
      {
        "hue": "sky",
        "classes": 0,
        "literals": 5
      },
      {
        "hue": "red",
        "classes": 0,
        "literals": 1
      },
      {
        "hue": "emerald",
        "classes": 0,
        "literals": 1
      }
    ],
    "radiusClasses": [
      "rounded-3xl",
      "rounded-full",
      "rounded-lg",
      "rounded-md",
      "rounded-sm"
    ],
    "eases": [
      "back",
      "power1",
      "power2",
      "power3"
    ],
    "durations": [
      0.16,
      0.7
    ]
  },
  "photoSlots": [],
  "sprinkles": [
    {
      "id": "sprinkle/shapes/wire-torus@v2",
      "file": "sprinkles/v2/shapes/wire-torus.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/wire-torus.webp",
      "description": "Wireframe torus, violet (neon wireframe)."
    },
    {
      "id": "sprinkle/shapes/wire-globe@v2",
      "file": "sprinkles/v2/shapes/wire-globe.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/wire-globe.webp",
      "description": "Wireframe globe with latitude and longitude lines, electric blue (neon wireframe)."
    },
    {
      "id": "sprinkle/shapes/wire-octahedron@v2",
      "file": "sprinkles/v2/shapes/wire-octahedron.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/wire-octahedron.webp",
      "description": "Wireframe octahedron, violet (neon wireframe)."
    },
    {
      "id": "sprinkle/shapes/wire-helix@v2",
      "file": "sprinkles/v2/shapes/wire-helix.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/wire-helix.webp",
      "description": "Wireframe double helix, cyan (neon wireframe)."
    },
    {
      "id": "sprinkle/shapes/wire-mobius@v2",
      "file": "sprinkles/v2/shapes/wire-mobius.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/wire-mobius.webp",
      "description": "Wireframe Möbius strip, magenta (neon wireframe)."
    }
  ],
  "page": "/snippets/backgrounds/cad-viewport-background",
  "preview": "/preview/backgrounds/cad-viewport-background",
  "registryPath": "/registry/snippets/backgrounds/cad-viewport-background.json",
  "install": "npm i gsap @gsap/react",
  "codeLines": 407,
  "readme": "# CAD Viewport Background\r\n\r\n`backgrounds/cad-viewport-background`\r\n\r\nA modeling workspace in four viewports, one per corner: top, front, right, and perspective. Each shows the same neon wireframe model through its own camera, with a selection box, an axis gizmo, a vertex counter, and camera coordinates that roll as the view turns. The model spins on a turntable and every few seconds snaps to the next shape (torus, globe, octahedron, helix, Möbius strip) in all four views at once. The middle stays clear for your headline.\r\n\r\n## When to use\r\n\r\n- Hero background for a 3D design, CAD, or engineering software launch.\r\n- Backdrop for an AI 3D-generation tool where the headline sits in the middle of the workspace.\r\n- Feature section for a modeling course or maker community that shows one object from every side.\r\n\r\n## Install\r\n\r\n1. `npm i gsap @gsap/react`\r\n2. Copy the code with the **Copy** button on the snippet page and save it as a React component.\r\n3. Use it and put your own content inside:\r\n\r\n```tsx\r\n<CADViewportBackground className=\"h-[560px] max-w-none rounded-none\">\r\n  <YourHero />\r\n</CADViewportBackground>\r\n```\r\n\r\n## Props\r\n\r\n| Prop | Type | Default | Description |\r\n| --- | --- | --- | --- |\r\n| `autoPlay` | `boolean` | `false` | Idle demo for previews: a ghost hand orbits the camera until the visitor interacts. |\r\n| `children` | `ReactNode` | sample hero | Your content, centered in the clear middle band. |\r\n| `className` | `string` | `\"\"` | Extra classes for the wrapper (size, corners). |\r\n\r\n## Interaction\r\n\r\n- Move the pointer over the panel: the camera orbits in all four viewports and the coordinates follow.\r\n- Click a viewport (or focus it and press Enter / Space): it grows from its corner for a moment and the camera dollies in.\r\n- With `prefers-reduced-motion`, the model and cameras stay still.\r\n- Drawing pauses while the panel is off-screen.\r\n\r\n## Photos\r\n\r\nNo photos. Every image is a sprinkle you can use directly from its public URL:\r\n\r\n- `sprinkle/shapes/wire-torus@v2`\r\n- `sprinkle/shapes/wire-globe@v2`\r\n- `sprinkle/shapes/wire-octahedron@v2`\r\n- `sprinkle/shapes/wire-helix@v2`\r\n- `sprinkle/shapes/wire-mobius@v2`\r\n\r\n## Customization\r\n\r\n- `MODELS` sets the shapes, their order, and the vertex count each one shows; `SNAPS` and `CYCLE` set when they switch.\r\n- `VIEWS` holds the four viewports: label, corner, and the base camera angles used for the axis gizmo.\r\n- Light mode draws the wireframes like ink on drafting paper (`mix-blend-multiply`); dark mode keeps their neon glow (`mix-blend-screen`).\r\n- Viewport size is `h-[23%] w-[44%]` on narrow panels and `@lg:h-[27%] @lg:w-[31%]` from 512 px; keep your content short enough for the middle band.\r\n",
  "sourceDir": "snippets/backgrounds/cad-viewport-background",
  "thumbnail": "/registry/thumbnails/backgrounds/cad-viewport-background.webp",
  "thumbnailDark": "/registry/thumbnails/backgrounds/cad-viewport-background.dark.webp",
  "codeAccess": "The code is not in this file. Get it with the MCP tool get_snippet and an InWebAsset API key (header Authorization: Bearer aw_...; sign in at /agents to create one), or with the Copy button on the snippet page after signing in. Free accounts can take snippet code 5 times per day (every fetch counts, also of a snippet fetched before); Pro accounts have no limit."
}
