Skip to content

fix: Improve item surface placement, floorplan resizing, and placement preview stability#296

Merged
wass08 merged 5 commits intopascalorg:mainfrom
sudhir9297:wed-6-may-bug-fix
May 7, 2026
Merged

fix: Improve item surface placement, floorplan resizing, and placement preview stability#296
wass08 merged 5 commits intopascalorg:mainfrom
sudhir9297:wed-6-may-bug-fix

Conversation

@sudhir9297
Copy link
Copy Markdown
Contributor

What does this PR do?

This PR improves placement behavior, floorplan editing workflows, and preview stability across item placement, slabs, ceilings, and spawn handling.

It enables:

  • Placement on valid upward-facing GLB surfaces
  • Better handling of rugs/mats and other low-profile surfaces
  • Accurate preview bounds and dimension feedback
  • Edge resizing for slabs, ceilings, and holes in floorplan
  • Full spawn/player interaction support in 2D floorplan
  • More stable placement previews and overlay rendering

Item Surface Placement

  • Added support for placing items on valid upward-facing GLB surfaces:
    • No longer limited to assets with explicit asset.surface
  • Added low-profile surface handling:
    • Rugs/mats can visually receive placement
    • Do not become parent surfaces
    • Do not block normal floor placement
  • Improved upward-surface detection using world normals.

Placement Preview & Stability

  • Fixed placement preview bounds and dimension labels:
    • Now use actual GLB mesh bounds instead of fallback dimensions
  • Fixed floor placement cursor height after switching away from:
    • Ceiling placement
    • Item-surface placement
  • Fixed detach behavior:
    • Returning to floor resets preview/draft item to y = 0
  • Reworked placement bounding boxes and guide-line geometry:
    • Prevents WebGPU vertex-buffer errors during drag/collision
  • Removed selected-item height annotation line beside placed GLB items.

Floorplan Polygon Editing

  • Added edge-resize handles for:
    • Slabs
    • Ceilings
    • Polygon holes
  • Added shared polygon edge-drag support.
  • Updated slab and ceiling editors to support edge movement.

Spawn / Player Support (Floorplan)

  • Added spawn/player support in floorplan:
    • Render
    • Select
    • Focus
    • Move
    • Delete
    • Live transform preview
    • Action-menu anchoring

Floorplan Overlay & Interaction Fixes

  • Fixed action menu positioning under rotated floorplan/building views.
  • Updated SVG coordinate handling and rotated view-box projection:
    • Cursor overlays align correctly
    • Action menus align correctly

Core Changes

  • Added:
    • isLowProfileItemSurface
    • LOW_PROFILE_ITEM_SURFACE_MAX_HEIGHT
  • Updated spatial grid validation:
    • Ignores low-profile surfaces during floor checks

Editor Improvements

  • Updated placement coordinator:
    • Better preview geometry
    • Better dimension labels
    • Improved transitions between floor, ceiling, and surface placement
  • Expanded floorplan interaction system for:
    • Spawn nodes
    • Polygon edge resizing

@wass08 wass08 merged commit e348ccd into pascalorg:main May 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants