lepoly

Editor, viewer & Embedding

Embedding the viewer on your website

How to embed an interactive 3D model viewer from lepoly into any website.

Getting the embed code

  1. Open your model in lepoly.
  1. Click the Share button.
  1. Select the Embed tab.
  1. Copy the <iframe> code.

Basic embed

<iframe 
  src="https://lepoly.com/viewer/your-model-id" 
  width="100%" 
  height="600px" 
  frameborder="0"
  allowfullscreen>
</iframe>

Customizing the embed

You can customize the embed via URL parameters or the embed settings panel:

  • autoplay — start rotating automatically
  • ui — show or hide viewer UI controls
  • background — set background color (hex code)
  • camera — set initial camera position

Responsive embedding

For a fully responsive embed that adapts to any screen size:

<div style="position:relative;padding-bottom:56.25%;height:0;">
  <iframe 
    src="https://lepoly.com/viewer/your-model-id"
    style="position:absolute;top:0;left:0;width:100%;height:100%;"
    frameborder="0" allowfullscreen>
  </iframe>
</div>

Performance tips

  • Use the compressed version of your model for faster loading.
  • Set a poster image so visitors see a preview while the model loads.