Параметри вбудовування
Last updated: 2026-06-05
Adding ?embed=true to any /view/:shareId URL switches the viewer into chromeless embed mode — header, footer, and info panel are hidden, leaving only the 3D canvas (and optionally the toolbar). Additional query parameters let you control every meaningful aspect of the rendering without writing JavaScript.
URL form
https://stlviewer.online/view/{shareId}?embed=true¶m=value&...URL conventions
- Unknown parameters are silently ignored — future params will not break existing embeds.
- Invalid values fall back to defaults without throwing errors.
- Boolean parameters accept 1, 0, true, or false.
- Parameters survive React Router in-viewer navigation and browser back/forward.
Parameter reference
All parameters are optional. Defaults differ between standalone and embed mode.
| Parameter | Values | Standalone default | Embed default | Description |
|---|---|---|---|---|
| axis | z | y | z | z | Which world axis points up. Affects auto-rotation plane and camera orientation. |
| autoRotate | boolean | 1 | 1 | Whether the model spins continuously on load. |
| render | solid | wireframe | xray | solid | solid | Render mode. |
| grid | boolean | 1 | 0 | Floor grid beneath the model. |
| light | studio | neutral | studio | studio | Lighting environment preset. |
| material | preset ID | — | — | Named material preset. See preset ID list below. |
| ui | none | minimal | full | full | none | Chrome visibility. none = canvas only. minimal = toolbar shown. full = toolbar + side panels. |
| attribution | boolean | 1 | 1 | Show the 'Powered by STLViewer' badge. false hides badge but keeps favicon + tooltip. |
Material preset IDs
Use the preset ID as the value for the material parameter.
color
color-blueBluecolor-pastel-greenGreencolor-pastel-redRedcolor-pastel-yellowYellow
metal
metal-steelSteelmetal-copperCoppermetal-goldGoldmetal-aluminiumAluminiummetal-chromeChrome
wood
wood-oakOakwood-walnutWalnutwood-pinePine
stone
stone-marbleMarblestone-graniteGranitestone-concreteConcrete
plastic
plastic-whiteWhiteplastic-blackBlack
ceramic
ceramic-white-glossyPorcelain
Examples
Minimal embed (default settings):
<iframe src="https://stlviewer.online/view/{shareId}?embed=true"
title="My part" style="width:100%;height:600px;border:0;"
loading="lazy" allowfullscreen></iframe>Auto-rotating steel model:
<iframe src="https://stlviewer.online/view/{shareId}?embed=true&material=metal-steel&autoRotate=1"
title="My part" style="width:100%;height:600px;border:0;"
loading="lazy" allowfullscreen></iframe>Static chromeless (no toolbar, no attribution badge):
<iframe src="https://stlviewer.online/view/{shareId}?embed=true&autoRotate=0&attribution=0"
title="My part" style="width:100%;height:600px;border:0;"
loading="lazy" allowfullscreen></iframe>