Embed a viewer

Put an Any3D viewer on your own page. The frame loads a model from an https address, with a button that opens the full viewer.

  1. 1

    Add the frame

    Paste an iframe that points at Any3D and put your model address in the src query. The frame shows only the canvas, with a button in the bottom-right corner that opens the full viewer. A sample frame is below.

    <iframe
      src="https://any3d.cc/en-US/embed?src=https%3A%2F%2Fcdn.example.com%2Fmodel.glb"
      title="3D model"
      style="width:100%;height:480px;border:0"
      loading="lazy"
      allow="fullscreen"
      allowfullscreen
      referrerpolicy="strict-origin-when-cross-origin"
    ></iframe>
    Tip: You can copy the prompt below and paste it into an AI assistant (such as Cursor, Claude, or ChatGPT) to quickly generate embed code.
    AI Integration Prompt (click to expand/collapse)
    Please generate an <iframe> snippet to embed the Any3D 3D viewer on a web page. If updating an existing page or component, place the <iframe> where the 3D model should appear. Embed base URL: https://any3d.cc/en-US/embed URL & Parameter Rules: - Required parameter: `src` must be the model's HTTPS URL, percent-encoded (encodeURIComponent), and passed as its own query parameter (e.g. https://any3d.cc/en-US/embed?src=...). Never append the raw model URL directly to the path. For 3D Tiles, use the tileset.json URL. - Optional parameters (omit any that are not needed): - `autorotate=1`: spins the model automatically. Omit to keep it stationary. - `theme=light`, `theme=dark`, or `theme=system`: sets the viewer theme. - `bg=transparent`: uses a transparent background. - `controls`: chooses the mouse layout. Leave empty or set to `auto` to automatically match the file type; or set to `standard`, `cad`, `solidworks`, `blender`, `splat`, or `custom`. Mouse Layouts: - auto: CAD files use CAD controls, Gaussian splats use Smooth Orbit, and other files use Orbit. - standard: Orbit. Left-drag rotates, right-drag pans, wheel zooms. - cad: AutoCAD-style. Middle-drag pans, Shift+middle-drag orbits, wheel zooms toward cursor, no inertia. Left-drag also orbits, right-drag pans. - solidworks: SolidWorks-style. Middle-drag orbits, Ctrl or Command with middle-drag pans, Shift+middle-drag zooms. Wheel forward zooms out at cursor, no inertia. - blender: Blender-style. Middle-drag orbits, Shift+middle-drag pans, Ctrl or Command with middle-drag zooms. Wheel zooms to view center, no inertia. - splat: Smooth orbit for large Gaussian splats. Drag to orbit smoothly, double-click to set the focus point. - custom: matches standard. iframe Requirements & Notes: - Dimensions & styling: include loading="lazy" and style="width:100%;height:480px;border:0" (adjust responsive sizing as needed). - Permissions: must include allow="fullscreen", allowfullscreen, and referrerpolicy="strict-origin-when-cross-origin". - Sandbox: if the parent page sandboxes the iframe, include allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox so the button in the bottom-right corner can open the full viewer in a new tab. - Hosting & CORS: the model host must allow https://any3d.cc via CORS. The viewer downloads a single file (such as GLB, STL, OBJ, FBX, or PLY); textures in separate files are missing unless packed into the model (as in GLB). Reference Example: <iframe src="https://any3d.cc/en-US/embed?src=https%3A%2F%2Fcdn.example.com%2Fmodel.glb" title="3D model" style="width:100%;height:480px;border:0" loading="lazy" allow="fullscreen" allowfullscreen referrerpolicy="strict-origin-when-cross-origin" ></iframe> Note: The model URL in the example is a placeholder. Replace src with the real, percent-encoded HTTPS address. Leave controls unset when the mouse layout should follow the file automatically.
  2. 2

    Where the model lives

    The address must be https, and the host must allow https://any3d.cc to fetch the file. The visitor's browser downloads that one file, such as GLB, STL, OBJ, FBX or PLY. For 3D Tiles, use the tileset.json address. Any3D does not keep a copy. Textures and data in separate files are missing unless they are packed inside the model, as they are in a GLB.

  3. 3

    Page options

    The queries below are optional. The button that opens the full viewer stays visible.

    QueryValueEffect
    autorotate1Spins the model. Leave it out to keep the model still.
    themelight | dark | systemSets the page theme.
    bgtransparentClears the page background.
    controlsauto | standard | cad | solidworks | blender | splat | customMouse layout. Leave it empty for auto, which follows the file.
    https://any3d.cc/en-US/embed
      ?src=https%3A%2F%2Fcdn.example.com%2Fmodel.glb
      &autorotate=1
      &theme=dark
      &bg=transparent
  4. 4

    Open the full viewer

    The button opens the matching Any3D viewer in a new tab and passes the same model address. Gaussian splats, 3D Tiles, and DWG or DXF drawings use their own viewers. Other files use the 3D model viewer. If the parent page sandboxes the iframe, it needs allow-popups and allow-popups-to-escape-sandbox so the button can open a tab.