Skip to content

Add procedural elevator system with floorplan, runtime, and first-person support#305

Open
sudhir9297 wants to merge 8 commits into
pascalorg:mainfrom
sudhir9297:feat/elevator-system
Open

Add procedural elevator system with floorplan, runtime, and first-person support#305
sudhir9297 wants to merge 8 commits into
pascalorg:mainfrom
sudhir9297:feat/elevator-system

Conversation

@sudhir9297
Copy link
Copy Markdown
Contributor

What does this PR do?

This PR introduces a complete procedural elevator system across core, editor, viewer, floorplan, and first-person workflows.

It enables:

  • Fully configurable procedural elevators
  • Physical 3D shaft/cab rendering with animated runtime behavior
  • Integrated floorplan rendering and editing
  • Automatic slab/ceiling cutout generation
  • Elevator dispatching, floor servicing, and queue handling
  • First-person elevator interaction and movement support
  • Improved editor architecture and live-preview editing workflows

Elevator Core System

  • Added new ElevatorNode schema with support for:
    • Cab size
    • Shaft size
    • Wall thickness
    • Shaft style
    • Door style
    • Door panel style
    • Service range
    • Disabled floors
    • Service-only floors
    • Elevator speed
    • Door timing
    • Dwell timing

Elevator Tools & Editor Integration

  • Added elevator creation and move tools.

  • Integrated elevators into:

    • Structure tools
    • Command palette
    • Contextual tools
    • Selection manager
    • Tree panel
    • Side panel
  • Added full elevator side panel controls:

    • Position / rotation
    • Cab dimensions
    • Shaft dimensions
    • Shaft style
    • Door styles
    • Door panel types
    • Door size
    • Service floors
    • Default floor
    • Disabled/service-only floors
    • Destinations
    • Speed
    • Door timing
    • Dwell timing

Live Editing & Performance

  • Added live preview editing:
    • Position
    • Rotation
    • Dimensions
  • Updates render immediately while editing.
  • Scene store commits only on final commit/release.
  • Added live transform/live override store support for improved editing performance.

Elevator Rendering

  • Added physical 3D elevator rendering:
    • Shaft
    • Cab
    • Solid/glass shaft styles
    • Cab walls
    • Landing door frames
    • Cab doors
    • Call panels
    • Physical mesh buttons
    • Floor indicators

Door Styles & Cab Controls

  • Added door opening styles:

    • Center-opening
    • Single-left
    • Single-right
  • Added door panel styles:

    • Glass-frame
    • Solid-panel
    • Segmented-panel
  • Added inside-cab controls:

    • Destination buttons
    • Door-open button
  • Added landing call buttons outside elevator doors.


Runtime & Dispatch System

  • Added elevator runtime state:

    • Current floor
    • Target floor
    • Queue
    • Car Y position
    • Door openness
    • Animation phase
  • Added elevator movement system:

    • Speed handling
    • Door timing
    • Dwell timing
    • Queued destinations
    • Arrival/open-close behavior
    • Active/queued button states
  • Added shared dispatch system for multiple elevators:

    • Chooses best eligible elevator for landing calls

Floor Restrictions & Indicators

  • Added support for:

    • Disabled floors
    • Service-only floors
  • Applied restrictions across:

    • Dispatch
    • Side panel
    • Cab buttons
    • Landing calls
    • Floorplan markers
  • Added floor indicators:

    • Above landing doors
    • Inside cab
    • Shows:
      • Current floor
      • Target floor
      • Travel direction
  • Fixed mirrored floor numbers and inverted direction arrows.


Slab & Ceiling Cutouts

  • Added automatic slab and ceiling cutouts for elevator shafts.

  • Cutouts generated from:

    • Shaft footprint
    • Elevator service range
  • Added:

    • Polygon union helpers
    • Shared surface hole merging
  • Allows multiple cutouts to merge cleanly.


First-Person Support

  • Added first-person elevator interaction:

    • Button targeting
    • Cab and landing colliders
    • Closed-door blocking
    • Door-open entry behavior
  • Added player locking:

    • Player remains attached to moving elevator cab

Floorplan Support

  • Added elevator rendering in floorplan:

    • Shaft footprint
    • Cab footprint
    • Door opening side
    • Call station marker
    • Current/target/queued markers
    • Selection/hover/delete states
    • Glass/solid shaft styling
  • Added floorplan interactions:

    • Drag support
    • Resize handles
    • Hit testing
    • Marquee selection
  • Added served-range visualization:

    • Ordered stop markers
    • Disabled/service-only floors
    • Current floor
    • Target floor
    • Queued floors

Architecture Improvements

  • Refactored elevator architecture:
    • Opening sync logic moved into core
    • Renderer kept presentation-only
    • Viewer interactions moved into dedicated system
    • Editor tools no longer import viewer state directly

Related Structural & Viewer Updates

  • Expanded procedural column support:

    • Support styles
    • Presets/defaults
    • Richer rendering
    • Better placement/hit testing
  • Updated related systems for:

    • Ceilings
    • Slabs
    • Fences
    • Ground occluder
    • Node renderer registration
    • Post-processing
  • Ensured compatibility with elevator cutouts and rendering behavior.


Commit Highlights

  • Add procedural support column variants
  • Add column hit testing and align column defaults
  • Optimize elevator editing performance with live previews
  • Add cab door-open control and align elevator buttons
  • Add elevator floorplan overlay
  • Improve elevator floorplan resize and drag controls
  • Refactor elevator systems across core, viewer, and editor
  • Fix mirrored elevator indicators and arrows

sudhir9297 added 8 commits May 9, 2026 19:09
# Conflicts:
#	packages/editor/src/components/tools/item/move-tool.tsx
#	packages/editor/src/components/tools/tool-manager.tsx
#	packages/editor/src/components/ui/panels/panel-manager.tsx
#	packages/editor/src/store/use-editor.tsx
#	packages/viewer/src/components/renderers/site/site-renderer.tsx
#	packages/viewer/src/components/viewer/ground-occluder.tsx
#	packages/viewer/src/components/viewer/index.tsx
#	packages/viewer/src/components/viewer/post-processing.tsx
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.

1 participant