Embed a model in any HTML page
Two tags: the script and the element. Works with static sites and every framework.
Snippet
<script async src="https://cdn.glboost.com/_/embed.js"></script>
<glboost-viewer asset="YOUR_ASSET_ID" ar poster="auto" style="height:480px"></glboost-viewer>Replace YOUR_ASSET_ID with the id from the asset page; the Embed tab generates the snippet with the id filled in and, for private assets, a signature.
Where it goes
- Add the script tag once, anywhere in the page (async is fine).
- Put a <glboost-viewer> element where the model should render and give it a height.
Notes
- The element fills its container, so size the parent (for example height: 480px or an aspect-ratio).
- Add the ar attribute to show the AR button on phones.
- Private assets need a signature or a share link; see Viewer and embeds.