fix(editor): harden editor interactions and WebGPU rendering

Fix editor bug sweep regressions, WebGPU CSG/material crashes, Shift snap bypass behavior, arrow handle drag projection, and the wall preview null guard covered by the Sentry follow-up PRs.
This commit is contained in:
Aymeric Rabot
2026-06-11 13:03:34 -04:00
committed by GitHub
parent 2d2dba5dba
commit aab48e053f
111 changed files with 2211 additions and 955 deletions
+4 -4
View File
@@ -22,10 +22,10 @@ const ROTATE_RING_OFFSET = 0.06
// Whole-item rotation handle — the two-headed curved arrow. `arc-resize`
// does the angular drag math (raycasts a horizontal plane at the gizmo's
// Y, measures cursor bearing around the item's local origin, returns the
// delta). Holding Shift snaps to 15° increments (handled generically in
// node-arrow-handles for any `shape: 'rotate'`), matching the R/T rotate
// step for placed items. Item rotation is stored as `[x, y, z]`; only the
// Y component turns.
// delta). Rotation snaps to 15° increments by default; holding Shift
// bypasses that snap (handled generically in node-arrow-handles for any
// `shape: 'rotate'`), matching the R/T rotate step for placed items. Item
// rotation is stored as `[x, y, z]`; only the Y component turns.
function itemRotateHandle(): HandleDescriptor<ItemNodeType> {
return {
kind: 'arc-resize',
+12 -11
View File
@@ -211,16 +211,17 @@ function buildWallItemSession(
// Figma-style along-wall alignment (edge-to-edge with other openings /
// wall items / wall ends), winning over the 0.5m grid snap; falls back
// to grid when nothing aligns. Alt bypasses; Shift drops the grid snap.
const neighborX = modifiers.altKey
? null
: snapLocalXToNeighbors({
wall: hit.wall,
localX: hit.localX,
width,
selfId: node.id as AnyNodeId,
nodes,
})
// to grid when nothing aligns. Alt bypasses alignment; Shift bypasses all snap.
const neighborX =
modifiers.altKey || modifiers.shiftKey
? null
: snapLocalXToNeighbors({
wall: hit.wall,
localX: hit.localX,
width,
selfId: node.id as AnyNodeId,
nodes,
})
const step = useEditor.getState().gridSnapStep
const snappedLocalX =
neighborX ?? (modifiers.shiftKey ? hit.localX : Math.round(hit.localX / step) * step)
@@ -286,7 +287,7 @@ function buildFloorItemSession(
rotationY,
),
candidates,
{ bypass: modifiers.altKey },
{ bypass: modifiers.altKey || modifiers.shiftKey },
)
const sourceY = node.position[1]