FEATURE 2 — Mesh selection outline
As a user viewing a generated mesh, I want a visible outline around the
mesh when I click it, so I get clear feedback that it's selected before acting
on it (transform, delete, export).
The selection state already exists in Viewer3D.tsx (selected,
onSelect, onPointerMissed, click on the <primitive>), but there is no
visual indication. This ticket adds only the outline rendering.
Scope
- Clicking the mesh draws a highlight outline around it.
- Clicking empty space (
onPointerMissed) removes the outline.
- Outline follows the mesh across all view modes (solid / wireframe / normals
/ matcap / uv) and auto-rotate.
- Subtle, on-brand color (e.g. violet
#8b5cf6, matching the app accent).
Implementation
src/areas/generate/components/Viewer3D.tsx:
- Wrap the scene contents in
<Selection> and add <EffectComposer> with
<Outline> (both from @react-three/postprocessing, already a dependency).
- Wrap the mesh
<primitive> in <Select enabled={selected}> so the outline
is driven by the existing selected state — no new selection logic needed.
- Tune
<Outline> props: edgeStrength, visibleEdgeColor,
hiddenEdgeColor, blur.
- No backend, store, or API changes.
Acceptance criteria
Estimate: S
FEATURE 2 — Mesh selection outline
As a user viewing a generated mesh, I want a visible outline around the
mesh when I click it, so I get clear feedback that it's selected before acting
on it (transform, delete, export).
The selection state already exists in
Viewer3D.tsx(selected,onSelect,onPointerMissed, click on the<primitive>), but there is novisual indication. This ticket adds only the outline rendering.
Scope
onPointerMissed) removes the outline./ matcap / uv) and auto-rotate.
#8b5cf6, matching the app accent).Implementation
src/areas/generate/components/Viewer3D.tsx:<Selection>and add<EffectComposer>with<Outline>(both from@react-three/postprocessing, already a dependency).<primitive>in<Select enabled={selected}>so the outlineis driven by the existing
selectedstate — no new selection logic needed.<Outline>props:edgeStrength,visibleEdgeColor,hiddenEdgeColor,blur.Acceptance criteria
Estimate: S