Skip to content

    Browse components

    Model Studio

    Three.js studio viewer for a procedural model: physical clearcoat material, soft shadows, drag to orbit, auto-rotate and clamped zoom.

    Open
    Customize
    torus-knot
    blob
    rounded-box
    torus

    Installation

    npx shadcn@latest add @glint-ui/model-studio

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/model-studio.json

    Usage

    import { ModelStudio } from "@/components/ui/model-studio";
    
    <div className="h-96">
      <ModelStudio shape="torus-knot" color="#c4b5fd" />
    </div>

    Props

    PropTypeDefaultDescription
    shape"torus-knot" | "blob" | "rounded-box" | "torus""torus-knot"Procedural model to show.
    colorstring"#c4b5fd"Base material color.
    metalnessnumber0.650 = dielectric, 1 = metal.
    roughnessnumber0.18Surface roughness.
    iridescencenumber0.6Thin-film rainbow sheen.
    autoRotatebooleantrueSpin slowly when idle.
    autoRotateSpeednumber1.5Auto-rotate speed (2 = 30s per turn).
    minDistancenumber3Closest camera distance.
    maxDistancenumber9Farthest camera distance.
    shadowbooleantrueSoft contact shadow under the model.
    classNamestring—Extra classes for the root element.