fix: sync stair elevations with floor slabs (#216)

Mark stair nodes as dirty when slabs change so stairs properly stack on
top of floor slabs. StairSystem now computes slab-driven elevation by
sampling segment centers against the spatial grid.

Changes:
- spatial-grid-sync: mark stair nodes dirty on slab changes (same level)
- stair-system: syncStairGroupElevation + getStairSlabElevation compute
  Y offset from slab data; rotateXZ helper for world-space transforms
- stair-renderer: use position-x/position-z so the system controls Y
This commit is contained in:
Pascal
2026-04-06 12:02:57 -04:00
committed by GitHub
parent ed6ed3f018
commit d9965f487c
3 changed files with 74 additions and 2 deletions
@@ -24,7 +24,8 @@ export const StairRenderer = ({ node }: { node: StairNode }) => {
return (
<group
position={node.position}
position-x={node.position[0]}
position-z={node.position[2]}
ref={ref}
rotation-y={node.rotation}
visible={node.visible}