Put a pain map inside your own page

The embed is the same 3D head and the same legend as the app, with the editor removed. Use it to show a reader what a migraine looks like next to a sinus infection, to let them turn the skin translucent and see how deep a pain sits, or to publish a map somebody made of their own pain. Configure it below and copy the snippet. Nothing is uploaded: everything the embed shows travels in the URL you paste.

What should it show?
How should it look?

Live preview

Paste this into your page

Driving it from your own page

The embed answers postMessage, so your page's own buttons can steer it: step a reader through a pattern paragraph by paragraph, or turn on x-ray exactly when the text starts talking about depth. Press these to drive the preview above.



      
The whole contract

URL settings

mapA share-link payload: the part after #m= in a HeadPain link.
presetA pattern from the library, for example preset=cluster-headache.
demoA demo map, for example demo=demo-combo.
xray1 starts with the skin translucent.
isolateShow one pain alone, by name or by number starting at 0.
legendcompact (default), full, or off.
controlsview (default) or none.
rotateauto turns the head until the visitor touches it. Ignored when the visitor's system asks for reduced motion.
spinSeconds per revolution when rotating. Default 24.
cameratheta,phi,distance, for example camera=2.4,1.4,4.2.
titleCaption text, or off to hide the caption bar.
bgSix-digit hex background, to blend with your page.

Messages you can send

headpain:xray{ on: true }
headpain:isolate{ pain: "Migraine" }, a number, or null for all
headpain:camera{ camera: [theta, phi, distance] }
headpain:resetback to the front view
headpain:stateask it to report what it is showing

Messages it sends back

Every message carries source: "headpain". Types are ready, state, pain (the visitor picked one), zone (the visitor hovered an area of the head) and error.

What it will not do

An embed never reads the visitor's saved diary. A HeadPain widget on your page can only show what you put in its URL, so it cannot expose a reader's own private maps.