registry: generic FloorElevationSystem driven by a floorPlaced capability
Symptom: a shelf placed on a level with a raised slab underneath visually clipped through it — `ItemSystem` lifted items onto slabs, but shelves (and other floor-placed registry kinds) had no equivalent path. Fix: lift the slab-elevation logic out of `ItemSystem` into a generic `<FloorElevationSystem>` keyed off a new `capabilities.floorPlaced` config. Any kind that opts in declares a `footprint(node)` (dimensions + rotation used to query overlapping slabs) and an optional `applies` predicate (skips items whose `asset.attachTo` is wall / ceiling). The new system runs at frame priority 1 so its `mesh.position.y` override lands before `ItemSystem` / `GeometrySystem` (priority 2) clear the dirty mark. The spatial-grid sync's `markNodesOverlappingSlab` also dropped its hardcoded `item` branch in favour of an iteration over every registered kind that declares `floorPlaced` — so any new floor-placed kind picks up slab-driven re-elevation automatically. Tagged kinds: - `item` — `footprint = getScaledDimensions`, `applies = !asset.attachTo` - `shelf` — `footprint = (w, h, d)` - `column` — `footprint = (w, h, d)` - `spawn` — `footprint = (0.6, 1.8, 0.6)` (marker) `ItemSystem` retains only the wall-side z-offset block (`mesh.position.z = wallThickness / 2`). The elevation block + its `getScaledDimensions` / `resolveLevelId` / `spatialGridManager` imports moved to the generic system. 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
78e3ed13d8
commit
9a481f2511
@@ -59,6 +59,11 @@ export { ElevatorInteractionSystem } from './systems/elevator/elevator-interacti
|
||||
// registry-driven fence definition's `def.system`. Removed in Phase 6
|
||||
// alongside the legacy fence mount point.
|
||||
export { FenceSystem, generateFenceGeometry } from './systems/fence/fence-system'
|
||||
// Generic floor-elevation system. Lifts the rendered mesh of any kind
|
||||
// whose definition declares `capabilities.floorPlaced` by the slab
|
||||
// elevation under its footprint. Replaces the per-kind elevation block
|
||||
// that used to live inside `ItemSystem`.
|
||||
export { FloorElevationSystem } from './systems/floor-elevation/floor-elevation-system'
|
||||
export { GuideSystem } from './systems/guide/guide-system'
|
||||
export { InteractiveSystem } from './systems/interactive/interactive-system'
|
||||
// Item systems for the registry-driven item definition. ItemSystem
|
||||
|
||||
Reference in New Issue
Block a user