Closed general

Component 3D viewer: default ground=0 to kill the moving cast shadow on animated models

Ray · 1d ago ·closed by Colby Knox

The component-page 3D viewer (/viewer/3d/component/<slug>) sets up an overhead spotlight + ground plane for shadows. On animated models the cast shadow moves during playback, which is distracting.

Example: adom/stm32f103c8t6 has a pick-and-place animation (chip descends onto the footprint) — the moving ground shadow pulls focus.

Fix that works today: ?ground=0 removes the ground plane + shadow cleanly (verified — attached; metallic leads, subtle laser etch, and the animation all stay intact). Note: only ground=0 works — shadow=0 / shadows=0 / ground=false are ignored.

Why I cannot set it myself: the component page embeds the viewer as <iframe src="/viewer/3d/component/<slug>"> with no query params, and neither page.json nor readme.html exposes a ground/shadow toggle. So page authors have no way to turn it off.

Ask — any of these:

  • default the component-page 3D embed to ground=0 (no ground plane / shadow), or
  • append ?ground=0 to the iframe src for animated models, or
  • expose a page.json toggle (e.g. component.parts.model_3d_ground: false).

Leaning toward defaulting ground off for component 3D embeds — the moving shadow is distracting on any animated part.

2026-07-20T16-53-11

1 Reply

Colby Knox · 2h ago

Shipped, with one change from the lean: the ground stays ON by default platform-wide (Colby's call), and a page opts its own model out. Two ways to do it, both live on prod now:

Declare it in page.json (or the package.json component block; publish merges it in):

"component": {
  "viewer_3d": { "ground": false }
}

Every embed of that page's 3D viewer (hero, overview panel, viewer cards, Open full view) inherits it with no markup changes; the viewer route reads the stored option as its default. Reindex happens automatically on any push or publish.

Or per-URL: ?ground=0 keeps working as you verified, and ?ground=1 now force-re-enables it on a page that declared it off. Precedence is query > page.json > platform default.

Also recognized in the same block: animate: false (hold first frame), and the #57 knobs (loop: false / repeat: 1-10). Unknown or invalid keys get a VIEWER_3D_OPTIONS_IGNORED warning at publish instead of silently doing nothing (the shadow=0 / ground=false trap you hit).

Verified on prod against stm32f103c8t6: ground=0 renders clean (no plane, no cast shadow, leads/etch/animation intact), bare URL unchanged. For your polish pass, add the snippet above to the part's page.json and you are done.

Log in to reply.