editor: add Blender-style custom mesh editing - #638
Open
sudhir9297 wants to merge 47 commits into
Open
Conversation
Items (e.g. solar panels) can now be placed on sloped roof surfaces. The placement system computes euler rotation from the roof surface normal so items sit flush on the slope instead of going inside. - Add roofStrategy to placement-strategies with enter/move/click/leave - Wire roof:enter/move/click/leave events in the placement coordinator - Add calculateRoofRotation in placement-math using surface normals - Support full 3D cursor rotation for sloped surfaces - Items on roofs are parented to the level with world-space rotation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… github.com:pascalorg/editor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 63c131e. Configure here.
| [faceId, host, liveTopology], | ||
| ) | ||
|
|
||
| if (!transform) return children |
There was a problem hiding this comment.
Deleted faces orphan hosted items
Medium Severity
Face delete/dissolve/merge can remove a face while items still reference it via customMeshFaceId. CustomMeshFaceHostFrame then fails to resolve a frame and renders those children without the face transform, so hosted items jump to incorrect local coordinates instead of being cleaned up or reparented.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 63c131e. Configure here.
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 does this PR do?
How to test
bun dev, open the editor, choose Custom Mesh from the build palette, and place it on the ground and on an elevated top surface; verify the preview follows the pointed surface and commits without an error overlay.bun run check,bun run check-types, andbun run build.Screenshots / screen recording
A short screen recording will be added before review. The interactive placement and helper UI were smoke-tested in the local collaborative preview.
Checklist
bun devbun checkto verify)mainbranchNote
High Risk
Large cross-cutting changes to spatial support election, placement commit paths, and scene schema; incorrect pinning or face hosting could misplace nodes or lift items after edits.
Overview
Introduces a
custom-meshscene node with validated topology (vertices, edges, face loops), default box primitive helpers, and event-bus wiring (custom-mesh:*plus genericnode:click). Items can host on planar mesh faces viacustomMeshFaceId, with a new placement surface type, face-aware preview/commit paths, oriented snap grid behavior, and selection suppressed whilemesh-editingscope is active. The floating action menu gains Edit mesh entry.Support and construction gain
pinSupport, preferred-slab resolution,resolveFrozenFloorPlacementPatch(freeze pointer-hit elevation without live-hosting arbitrary mesh tops), and shared wall/fence construction helpers moved into core. Pointer support now discovers registry-declaredsurfaces.topkinds (not a fixed wall/item/column list), andgetTopSurfaceHeightcan read the full node graph for context-aware hosts. Floor/item moves and fence commits thread pinned support through placement and the registry move tool.Build tab defers registry-driven palette expansion until client mount via
useSyncExternalStoreto avoid SSR/hydration mismatches. Minor refactors extract floating menu scale andRegistryToolContextfor registry tools.Reviewed by Cursor Bugbot for commit 63c131e. Bugbot is set up for automated code reviews on this repo. Configure here.