Expand description
3D model-viewer embed synthesizer.
Receives a TitleParams (Stage 2 dispatcher already parsed it), the
source URL, and an AssetSnapshot. Emits final <model-viewer> HTML —
preserving the shape moss-core’s ModelViewerRenderer used to emit
before Phase 0’s Stage 1 migration.
Source byte shape (pre-Phase-0, see commit 689d975e9^,
crates/moss-core/src/resolve/embed_renderer.rs:723):
<model-viewer class="moss-embed" data-type="3d"{data-width} src="{src}"
camera-controls auto-rotate touch-action="pan-y" loading="lazy"{style}>
</model-viewer>{data-width} is data-width="VALUE" (with leading space) when the
wrapper width is set (body | wide | page | screen), empty otherwise.
{style} is style="width:W" or style="width:W;height:H" when
sizing params are present, empty otherwise.
Stage 2 reads the boolean flags (camera-controls, auto-rotate, ar)
from TitleParams — when the wikilink grammar surfaces them as
param=true they appear as bare attributes on the element.
Functions§
- synthesize_
model_ html - Synthesize 3D model-viewer embed HTML for
Tag::Linkwithmoss:kind=3dtitle.