feat: add wireframe density controls for flat and curved surfaces - #98
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Wireframe mode has been fundamentally reworked. Previously, toggling Wireframe rendered every triangle edge from the mesh tessellation (
THREE.WireframeGeometry) as opaque black lines on an opaque solid — an unreadable dense tangle, unrelated to the model's actual geometric edges.Final architecture:
SHOW_WIREFRAME_DENSITY_CONTROLS = false, not deleted — a one-line flip re-exposes them later if needed)Why
This went through many iterations before landing here, worth summarizing for future reference:
depthTest/polygonOffsetchanges to solve back-face bleed-through — these caused GPU-specific regressions (worked in headless testing, failed on real hardware) and were revertedEdgesGeometryalone) was tried at multiple thresholds — always failed one of two ways: too high a threshold destroyed genuine curve detail on small features (holes rendering as bare rings), too low a threshold removed 100% of flat-face diagonals by mathematical necessity, leaving only parallel/circumferential linesSimplifyModifier(mesh simplification) produced good curved-surface results but was too slow for live interaction and gave uncoordinated results on flat areasValidation
npm run buildnpm run lintnpm run typecheckNotes