Skip to content

feat(scene): add selected mesh outline#168

Open
DrHepa wants to merge 1 commit into
lightningpixel:devfrom
DrHepa:feat/mesh-selection-outline
Open

feat(scene): add selected mesh outline#168
DrHepa wants to merge 1 commit into
lightningpixel:devfrom
DrHepa:feat/mesh-selection-outline

Conversation

@DrHepa
Copy link
Copy Markdown
Contributor

@DrHepa DrHepa commented Jun 5, 2026

Closes #162

Summary

  • Adds a violet outline around the selected mesh in the Generate viewer.
  • Keeps the existing Viewer3D.tsx selection state as the source of truth.
  • Uses @react-three/postprocessing Selection, Select, EffectComposer, and Outline.
  • Keeps the composer bounded with multisampling={0}, resolutionScale={0.5}, and xRay={false} to avoid conflicts with the viewer gizmo/HUD.

Changes

File Change
src/areas/generate/components/Viewer3D.tsx Adds selected mesh outline rendering using existing selection state and postprocessing components.

Validation

Manual validation completed:

  • Clicking the mesh shows the violet outline.
  • Clicking empty space clears the outline.
  • Gizmo/XYZ axes remain visible.
  • Viewer remains responsive.
  • Outline works while orbiting/auto-rotating.
  • No backend/store/API changes.

Validation media:

  • outline-modly2.mp4

Notes

The composer is tuned to avoid conflict with Drei GizmoHelper/HUD:

  • multisampling={0}
  • resolutionScale={0.5}
  • xRay={false}
  • GizmoHelper renderPriority={2}

No package/dependency changes were required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant