Closed feature request

3D viewer: hover tooltips on mesh parts (show part dimensions)

barrett-land · 8d ago ·closed by Colby Knox

Request: add hover tooltips to the component 3D viewer (adom-3d-viewer-babylon9) so hovering a mesh part shows a short floating label (e.g. a dimension) near the cursor.

Use case — the Machine Pin / Machine Contact pages:

  • hover a solder ballØ0.30 mm (300 µm)
  • hover the plated hole / annular ring → e.g. Hole Ø0.78 mm · Ring Ø1.30 mm (per-part values)

Current state: I read the shipped bundle (/static/vendor/adom-3d-viewer-babylon9/…). The only tooltip UI is the nav cube's .vcube-tooltip; the viewer never reads a picked mesh's name or glTF extras to display anything on hover (the pickedMesh.* calls are all Babylon internals). So this can't be driven from the GLB/page today — it needs a small viewer feature.

Proposed implementation: on pointer-move, pick the mesh under the cursor; if it carries a tooltip string, render it in a small floating label near the cursor (same look as the vcube tooltip), hidden when nothing is hovered. Source of the string, whichever is easiest:

  • glTF extras.tooltip on the mesh/node (Babylon imports these to mesh.metadata.gltf.extras), or
  • the mesh name (our parts are already named: solder_top, barrel, fr4_board, pad_top, silk, plus the contact/pin mesh).

I'll bake extras.tooltip (or rename meshes) into the component GLBs to match whatever convention you choose — the machine pin + contact GLBs are generated by a script on our side, so it's a one-line change once the convention is set.

Affects: adom/machinecontactlarge, adom/machinecontactmedium, and the four machine pin pages (machinepin{large,medium}{short,standard}). Requested by Barrett.

3 Replies

Colby Knox · 4d ago

Convention decision so you can start re-baking, Barrett: glTF extras.tooltip on the mesh/node, with the mesh name as fallback (exactly your proposal). Babylon lands extras at mesh.metadata.gltf.extras.tooltip; if that key is absent the viewer will humanize the mesh name (solder_top -> "Solder (top)") only when a layer-name mapping exists, otherwise show the raw name. Multi-line tooltips: use \n in the string. The tooltip UI will match the ViewCube's .vcube-tooltip styling and follow the cursor.

This is going into the bundle (not page JS) as part of the current viewer pass, alongside a naming-convention doc in adom-inc/adom-3d-viewer-babylon9 that also covers the layer-group names for the #48 layers toolbar, so bake with those names (fr4_board, pad_top, solder_top, silk, barrel, ...) and your GLBs get the toolbar for free when it lands.

Colby Knox · 4d ago

Live on prod (bundle 20260717a). Hover any mesh on a component page: extras.tooltip wins (multi-line via \n), meaningful mesh names fall back through the layer-label table (solder_top shows Solder (top), etc.), and auto-generated junk names (mesh_*, node_*, *_primitiveN) show nothing so generic models stay label-free. The lookup also walks up to 5 ancestor nodes, so extras on a group cover all its child meshes.

Bake away. The full convention (including the layer names that will drive the #48 layers toolbar) is written up in docs/CONTENT-CONVENTIONS.md in adom-inc/adom-3d-viewer-babylon9.

Colby Knox · 4d ago

Closing: shipped in bundle 20260717a and live on prod. extras.tooltip with mesh-name fallback, multi-line support, junk-name suppression (tightened in 20260717d so exporter artifacts like =>[0:1:1:40] never show). Bake extras into the machine-pin GLBs whenever convenient; the viewer side is complete.

Log in to reply.