Skip to content

Feat/improvement and fixes#286

Merged
wass08 merged 14 commits intopascalorg:mainfrom
sudhir9297:feat/improvement-and-fixes
May 4, 2026
Merged

Feat/improvement and fixes#286
wass08 merged 14 commits intopascalorg:mainfrom
sudhir9297:feat/improvement-and-fixes

Conversation

@sudhir9297
Copy link
Copy Markdown
Contributor

@sudhir9297 sudhir9297 commented Apr 30, 2026

What does this PR do?

This PR introduces a reference overlay workflow for the 2D floorplan editor, along with improvements to door rendering, dark-mode visuals, item symbols, and overall 2D geometry consistency, also drag-and-drop floor reordering in the floating level selector and significantly upgrades door and window systems across 2D, 3D, and first-person workflows.

It enables:

  • Local-first image overlays with scale calibration for tracing floorplans
  • Lower-floor reference overlays for multi-level alignment
  • Cleaner, more accurate 2D rendering for doors, slabs, stairs, and items
  • Improved dark-mode visibility and visual consistency
  • Better alignment between 2D visuals and actual 3D geometry
  • Manual floor reordering via drag-and-drop
  • More realistic door behavior (hinge-based rotation, interaction, collision)
  • Flexible door/window opening types (rect, rounded, arch)
  • Improved 2D symbols and visual clarity
  • Better first-person interaction and walk-through logic

Floor Reordering (Floating Level Selector)

  • Added drag-and-drop support for floor reordering.
  • Added six-dot drag handle for each floor item.
  • Kept normal floor selection separate from drag interaction.
  • Reordered floors using existing editor state flow.
  • Allows repositioning of duplicated or newly created floors.

Door System

  • Updated door rotation:
    • Uses hinge-based swing instead of center rotation
  • Added support for:
    • Door vs Opening modes
    • Opening types: Rect, Rounded, Arch
  • Added rounded opening controls:
    • All corners or individual top-corner radius
  • Enabled live radius updates during drag (commit on release)
  • Improved 2D door symbol:
    • Lighter styling
    • Swing wedge
    • Hinge and strike markers
    • Selected circular marker
    • Clearer opening representation
  • Changed 2D opening fill to white (instead of grey)
  • Made door openings walk-through in first-person
  • Updated open-door collider to match actual swinging leaf
  • Added first-person interaction:
    • Press E to open/close doors
  • Fixed collider merge issues by normalizing geometry
  • Improved 3D selection with deeper transparent hitbox
  • Removed visible door root hitbox material

Window System

  • Added support for:
    • Window vs Opening modes
    • Opening types: Rect, Rounded, Arch
  • Added rounded corner controls:
    • All corners or individual control
  • Enabled auto-fitting of rounded radii on size changes
  • Removed first-person collider (fully walk-through)
  • Rendered window openings as pure cutouts (no frame/glass/sill)
  • Added 2D floorplan opening symbol for windows

Interaction & Controls

  • Fixed width/height sliders:
    • No snapping or resetting on drag release
  • Improved consistency across door and window editing workflows

Image Overlay & Reference Scale

  • Implemented local-first image overlay workflow using guide nodes.
  • Added overlay-specific fields:
    • locked
    • showIn3d
    • scaleReference
  • Enabled local image upload via IndexedDB-backed asset system.
  • Added guide controls:
    • Replace / delete image
    • Show / hide
    • Lock / unlock
    • Opacity
    • Set / edit / clear scale
    • Reset image scale
  • Added reference scale calibration flow:
    • Click start and end points
    • Enter real-world length and units
    • Store calibrated scale
  • Rendered scale reference in 2D:
    • Dashed line
    • Endpoint markers
    • Label
    • Live preview
  • Applied calibration to image scaling (non-destructive to geometry).
  • Auto-locks overlay after calibration.
  • Added locked overlay behavior so drawing does not interfere with clicks.
  • Added guide selection via bottom dropdown.
  • Improved tracing visibility by reducing slab/ceiling fill strength.
  • Updated selected wall styling (white fill + blue hatch).
  • Added optional 3D visibility toggle for overlays.

Reference Floor Overlay

  • Added lower-floor reference overlay in 2D floorplan.
  • Persisted state:
    • Visibility
    • Selected level offset
    • Opacity
  • Added Reference Floor control with level selection dropdown.
  • Displayed level names with fallback labels.
  • Rendered lower level as locked, non-interactive underlay.
  • Included:
    • Walls, slabs, ceilings, fences
    • Openings and item footprints
  • Limited overlay to floors below active level.

Door Rendering (2D)

  • Adjusted door leaf length to align with swing radius.
  • Replaced curve with true circular SVG arc.
  • Unified stroke styling across door elements.
  • Reduced wall-aligned background depth for cleaner visuals.
  • Switched to theme-aware stroke colors.
  • Removed unused geometry variables.

Dark Mode & Item Visuals

  • Improved dark-mode contrast across:
    • Walls, slabs, ceilings, stairs, roofs, measurements
  • Updated renderers to use theme-aware colors.
  • Added custom 2D SVGs:
    • Office chair
    • Sofa
  • Applied SVG overrides to existing items.
  • Removed extra footprint borders for self-outlined SVG items.
  • Refined hover/selection highlight thickness.
  • Improved sofa SVG details and consistency.

Geometry & Rendering Fixes (2D)

  • Fixed rotation issues:
    • Vegetation/item footprints
    • Spiral/curved stairs
  • Improved spiral stair rendering alignment and boundaries.
  • Synced slab 2D rendering with actual 3D geometry.
  • Hid grid under slabs while preserving cutouts.
  • Updated slab styling:
    • Light fill
    • Neutral border
    • Consistent stroke width
  • Added selection styling:
    • Blue highlight
    • Diagonal hatch lines (thinner)
  • Increased slab label font size.
  • Fixed slab edit handles to align with visible boundaries.
  • Exported shared slab polygon logic for reuse.

@wass08 wass08 merged commit fa38b4a into pascalorg:main May 4, 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