fix(editor): outline polygon edit handles, fix vertex grab + console error#365
Merged
Conversation
…error Bundles three fixes to the shared PolygonEditor (slab/ceiling boundary & hole editing): - Console error: defer the cross-store onPolygonPreview(null) write into a useEffect so committing a drag no longer updates another component (NodeArrowHandles) during PolygonEditor's render. - Vertex grab: make the edge bar visual-only (raycast disabled) so it can no longer steal clicks from the vertex/midpoint handles overlapping it; edge dragging runs through the chevron arrow outside the polygon edge. - Outlines: render each handle as a single SCENE_LAYER mesh with a node material (MeshBasicNodeMaterial / useArrowMaterial) and pointer handlers attached directly, matching the registry arrow gizmos. This puts the handles in the ink-edge post-pass so vertex/midpoint cylinders, the chevron arrows, and the move sphere read as outlined 3D plates while staying grabbable. No paired hit mesh needed — the R3F event raycaster picks SCENE_LAYER too. Known follow-up (tracked, out of scope): SCENE_LAYER handles can appear in user-driven capture-mode snapshots, same as the existing arrow gizmos; to be hidden uniformly later via the thumbnail:before-capture toggle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
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.
Summary
Three bundled fixes to the shared
PolygonEditor(slab/ceiling boundary and hole editing) inpackages/editor/src/components/tools/shared/polygon-editor.tsx.NodeArrowHandles) while rendering a different component (PolygonEditor)". The cross-storeonPolygonPreview(null)write is now deferred into auseEffect(local setState stays in render), so no other component is updated during render.raycastdisabled); edge dragging runs through the chevron arrow that sits outside the polygon edge.SCENE_LAYERmesh with a node material (MeshBasicNodeMaterial/useArrowMaterial) and pointer handlers attached directly, matching the registry arrow gizmos innode-arrow-handles.tsx. This puts the handles in the ink-edge post-pass so vertex/midpoint cylinders, chevron arrows, and the move sphere read as outlined 3D plates — while staying grabbable (the R3F event raycaster picksSCENE_LAYERtoo, so no paired hit mesh is needed).Verification
cd packages/editor && bunx tsc --noEmit— cleanbunx biome checkon the file — cleanSCENE_LAYER(so no WebGPU "Vertex buffer slot 1" error), console-fix intact, edge bar non-interactive, per-instance material/geometry lifecycle correct.mcp-ci.ymlonly coverspackages/mcp+apps/editor/libscene files; this change touches neither.Known follow-up (tracked, out of scope)
SCENE_LAYERhandles can appear in user-driven capture-mode snapshots — a pre-existing property of the existing arrow gizmos that this change extends to polygon handles (outlines requireSCENE_LAYER). To be hidden uniformly later via the existingthumbnail:before-capturevisibility toggle.🤖 Generated with Claude Code