Phase 5 Stage C: item floor plan — all 9 kinds now at Stage C
Item is the last Stage A-only kind to gain def.floorplan. Closes Stage C
across every registered kind.
Files added:
- nodes/src/item/floorplan.ts: buildItemFloorplan inlines a self-
contained parent-chain transform walker using `ctx.resolve`. Mirrors
the legacy `getItemFloorplanTransform` math from editor/lib/floorplan/
items.ts:
* Wall parent: rotate item.position by wall's angle, anchor at
wall.start, handle wall-side attachTo via wall.thickness offset.
* Item parent (nested): recurse for parent's transform.
* Level / slab / ceiling parent: item.position is level-local.
Returns a rotated width × depth rectangle. asset.floorPlanUrl image
overlay deferred for Phase 5 follow-up.
Files changed:
- nodes/src/item/definition.ts: wires `floorplan: buildItemFloorplan`.
- floorplan-panel.tsx: floorplanItemEntries useMemo short-circuits to
[] when nodeRegistry.has('item'). Phase 6 deletes the entire useMemo.
Stage C coverage (all 9 registered kinds):
shelf ✅ spawn ✅ fence ✅ slab ✅ ceiling ✅ wall ✅ door ✅ window ✅ item ✅
Next sessions: Stage B for door / window / wall (each large geometry
extraction), Stage D per kind (DragAction affordance ports), Stage E
(drop legacy panels), Phase 6 Stage F cleanup.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
9bcb25d0aa
commit
9aec943740
@@ -8843,6 +8843,11 @@ export function FloorplanPanel() {
|
||||
})
|
||||
}, [movingFloorplanNodeRevision, spawns])
|
||||
const floorplanItemEntries = useMemo(() => {
|
||||
// Item migrated to def.floorplan (Phase 5 Stage C). When registered,
|
||||
// FloorplanRegistryLayer renders the item rectangle via the
|
||||
// parent-chain transform walker; this legacy path short-circuits.
|
||||
// Removed entirely in Phase 6 cleanup.
|
||||
if (nodeRegistry.has('item')) return []
|
||||
const transformCache = new Map<string, SharedFloorplanNodeTransform | null>()
|
||||
|
||||
return floorplanItems.flatMap((item) => {
|
||||
|
||||
Reference in New Issue
Block a user