Docs

Embed on a web page (Beta)

Place an interactive model on a web page and understand the current limits.

For most articles and lessons, start with an exported SVG. It is lightweight, prints cleanly, and does not depend on JavaScript. Use an interactive embed only when the reader needs to play the animation.

Copy embed code from Studio

Choose “Copy embed code” from Studio’s Share menu. It produces an iframe:

<iframe
  src="https://physloom.com/en/embed/#phys=..."
  title="Interactive physics diagram"
  loading="lazy"
  width="100%"
  height="720"
  style="border:0"
></iframe>

Adjust height to fit the page. Do not edit the model data inside src.

How it works

The embed page reads and compiles the .phys source in the browser. The compressed source is stored in the URL; it is not uploaded to a PhysLoom account and has no separate cloud copy.

Anyone with the complete URL can read the model. Do not place personal information, secrets, or unpublished questions in the source.

Current limits

This feature is currently Beta:

  • The model is read-only. Return to Studio to make changes.
  • Complex models can exceed practical browser URL limits. Use an SVG or .phys file instead.
  • The host page must allow an iframe and JavaScript from physloom.com.
  • The host controls width, height, lazy loading, and small-screen layout.
  • The PhysLoom SDK has not been published. The current integration is an iframe, not an installable package.

Keep an SVG alongside important embeds as a cover image or fallback.