editor: add Blender-style custom mesh editing - #638
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
| : Array.from(nodeRegistry.entries()) | ||
| .filter(([, definition]) => definition.capabilities.surfaces?.top !== undefined) | ||
| .map(([kind]) => kind) | ||
| if (nodeTopSurfaceKinds.some((kind) => (sceneRegistry.byType[kind]?.size ?? 0) > 0)) { |
There was a problem hiding this comment.
Ceilings intercept floor placement
High Severity
resolvePointerSupportSurface now treats every registry surfaces.top as a walkable surface by default, including ceilings. A downward camera ray hits the ceiling top before the floor, so floor placement, moves, stairs, columns, and fences can freeze onto ceiling height whenever a ceiling exists on the active level.
Reviewed by Cursor Bugbot for commit 78935c1. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 32dc57c. Configure here.
| emitter.on('ceiling:click', commitFloorOnSurfaceClick as never) | ||
| emitter.on('roof:click', commitFloorOnSurfaceClick as never) | ||
| emitter.on('shelf:click', commitFloorOnSurfaceClick as never) | ||
| emitter.on('node:click', commitFloorOnSurfaceClick as never) |
There was a problem hiding this comment.
Item floor commit can double-place
Medium Severity
Floor item placement now commits from generic node:click without a one-shot guard or follow-up click swallow. node:click is synthesized on pointer-up and grid:click still fires from the canvas click, so one physical click can run onGridClick twice. Move and shared floor-placement helpers already defend against that; in repeat mode this can create two items when dropping on a custom mesh or other newly covered surface.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 32dc57c. Configure here.


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
Changes core spatial support election, wall/fence commit paths, and global selection/pointer behavior; incorrect pinning or surface resolution could misplace structure or break plugin surfaces.
Overview
Introduces a
custom-meshscene node (validated topology, materials, floor placement withsupportSlabId) and wires it through the event bus, schema union, and site tree.Placement and support gain
pinSupport,resolveFrozenFloorPlacementPatch, and consolidated wall/fence construction helpers so items, stairs, columns, fences, and moves can commit at an exact elevation on slabs, ground, or registry-declared top surfaces without being re-lifted when overlapping slabs appear later.getTopSurfaceHeightnow receives the full node map for context-aware surface heights.Editor interaction: a
mesh-editingscope blocks scene selection and click routing while editing; undo/redo stays in edit mode. Placement/move/stair tools use genericnode:click/node:move,RegistryToolProvider, and optional Edit mesh on the floating action menu. Pointer raycasting discovers top surfaces fromnodeRegistrycapabilities (not a fixed kind list). Alt force-place is shown only whenfloorPlaced.collidesis true. The build tab defers registry-driven palette entries until client mount viauseSyncExternalStore.Reviewed by Cursor Bugbot for commit 3a33729. Bugbot is set up for automated code reviews on this repo. Configure here.