Skip to content

Latest commit

Β 

History

81 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏒 Web BIM Twin β€” 4D/5D IFC Digital Twin & Engineering Platform

TypeScript Three.js That Open Company Vite License: MIT

An enterprise-grade, high-performance Web BIM (Building Information Modeling) Viewer, 4D Construction Simulation engine, and 5D Cost Estimating Digital Twin suite. Built natively with Vanilla TypeScript, @thatopen/components (Fragments API), and Three.js, with zero heavy frontend framework overhead.


πŸ“‘ Table of Contents

  1. Architecture & System Design
  2. Key Capabilities & Feature Matrix
  3. Directory & Module Structure
  4. Design System & 9 Architectural Themes
  5. Getting Started
  6. Keyboard Shortcuts & Command Palette
  7. API & Module Reference
  8. Production Deployment

πŸ— Architecture & System Design

The application follows a clean, decoupled modular architecture with clear separation of concerns across core 3D systems, domain feature modules, tactical UI/HUD layers, and reactive theme controllers:

graph TD
    A[index.html / Entry Point] --> B[src/main.ts - Orchestrator]
    
    subgraph Core Engine [src/core/]
        B --> C[BimEngine - OpenBIM Singleton]
        B --> D[SceneManager - Sun / Shadows / Shaders]
        B --> E[ViewportController - Camera & Navigation]
        B --> F[ModelManager - WebAssembly Loader & IndexedDB]
        B --> G[ViewpointManager - Camera State Serializer]
        B --> H[KeyboardController - Global Shortcuts]
    end

    subgraph Feature Modules [src/modules/]
        B --> M1[Timeline4DModule & ScheduleManager - 4D Sequencing]
        B --> M2[Boq5DModule & BoqGenerator - 5D Estimating & CSV]
        B --> M3[AnnotationModule - 3D Pinned Notes & Tour]
        B --> M4[BcfManager - BCF 2.1/3.0 Topics & Viewpoints]
        B --> M5[IdsModule & IdsChecker - IDS Compliance Audits]
        B --> M6[ClippingModule - Real-Time Section Cuts]
        B --> M7[ExplosionModule - 3D Model Explosion]
        B --> M8[FederationModule - Multi-Model Federation]
        B --> M9[QueryModule - Spatial Tree & Isolation]
    end

    subgraph UI & HUD Layer [src/ui/]
        B --> U1[MinimapHUD - Tactical Polar Radar & Cone]
        B --> U2[CommandPalette - Ctrl+K Quick Action Runner]
        B --> U3[BimViewCube - 3D Orientation Gizmo]
        B --> U4[PropertyEditor - IFC Pset Inspector & Editor]
        B --> U5[CostChartComponent - 5D Budget & S-Curve]
        B --> U6[UIManager - Sidebar Tabs & Modals]
    end

    subgraph Theme Engine [src/theme/]
        B --> T1[ThemePalette - 9 Architectural Color Palettes]
    end
Loading

🌟 Key Capabilities & Feature Matrix

Feature Domain Capabilities
πŸš€ 3D Viewport & Rendering β€’ High-speed WASM-backed IFC fragment parsing
β€’ Local IndexedDB model caching for instant reloads
β€’ Orbit, 2D Floor Plan, and First-Person Walkthrough (WASD) modes
β€’ Real-time sun shadow simulation synchronized with time & solar azimuth
β€’ Tactical Ground Reference Grid and ViewCube gizmo
⏱️ 4D Construction Simulation β€’ Automatic trade sequencing (IFCSITE $\rightarrow$ IFCFOOTING $\rightarrow$ IFCSLAB $\rightarrow$ IFCWALL $\rightarrow$ IFCROOF $\rightarrow$ MEP)
β€’ Interactive timeline playback (1x, 2x, 5x, 10x)
β€’ Visual element states (Planned = Hidden, In Progress = Pulse, Completed = Solid)
β€’ 4D schedule CSV export and template import
πŸ’° 5D Cost Estimating & BOQ β€’ Automatic Qto_* extraction (NetVolume, NetArea, Length, Count)
β€’ Visual stacked Trade Budget distribution bar (Concrete, Steel, MEP, Finishes)
β€’ Real-time S-Curve cashflow projections and category breakdown charts
β€’ 1-Click Bills of Quantities export (.csv)
πŸ“Œ 3D Pin Annotations & BCF β€’ Surface raycasting pin drops with category badges (Inspection, Defect, Safety, RFI, Sign-off)
β€’ Viewpoint snapshot serialization and element metadata tagging
β€’ Guided multi-pin camera tour with smooth animations
β€’ BCF 2.1 & 3.0 issue manager with .bcfzip export
πŸ›‘οΈ IDS Compliance Audit β€’ Automated validation against Information Delivery Specifications (OBC.IDSSpecifications)
β€’ Pass/Fail breakdown for missing required property sets (Qto_WallBaseQuantities, etc.)
🧭 Tactical Radar Minimap HUD β€’ Polar radar grid with range rings ($r=20, 38, 56$), dashed crosshairs, and North indicator
β€’ Rotating radar sweep ray with dynamic gradient illumination
β€’ Real-time player camera orientation heading cone and elevation indicator (ELV: +X.Xm)
β€’ 2D building footprint bounding box projection
⚑ Command Palette & UX β€’ Ctrl+K searchable fuzzy command launcher with 15+ instant actions
β€’ Floating hierarchical viewport breadcrumbs with storey isolation
β€’ Adaptive viewport cursors (Orbit, Pan, Crosshair, Scissors)
β€’ Shift-Click multi-element selection with batch isolate / X-Ray

πŸ“ Directory & Module Structure

TOC/
β”œβ”€β”€ index.html                     # Application UI shell & HUD containers
β”œβ”€β”€ package.json                   # Dependencies & build scripts
β”œβ”€β”€ tsconfig.json                  # TypeScript compiler configuration
β”œβ”€β”€ vite.config.ts                 # Vite bundler & dev server config
β”œβ”€β”€ README.md                      # Comprehensive project documentation
β”œβ”€β”€ docs/                          # Developer & Engine Documentation
β”‚   β”œβ”€β”€ ONBOARDING.md              # Detailed developer onboarding guide
β”‚   └── that-open-engine-complete-verified.md # Offline That Open Engine documentation
└── src/
    β”œβ”€β”€ main.ts                    # Entry point & module bootstrapping
    β”œβ”€β”€ style.css                  # Dual-mode CSS tokens, 9 themes, Neo-Brutalist HUDs
    β”‚
    β”œβ”€β”€ core/                      # Core 3D Engine Systems
    β”‚   β”œβ”€β”€ BimEngine.ts           # Central OpenBIM singleton
    β”‚   β”œβ”€β”€ SceneManager.ts        # Sun angle, shadows, post-processing
    β”‚   β”œβ”€β”€ ViewportController.ts  # Camera transitions & projection modes
    β”‚   β”œβ”€β”€ KeyboardController.ts  # Global shortcut listeners
    β”‚   β”œβ”€β”€ ModelManager.ts        # IFC/frag loading & cache orchestration
    β”‚   └── ViewpointManager.ts    # Camera state serialization & bookmarks
    β”‚
    β”œβ”€β”€ modules/                   # Domain Feature Modules
    β”‚   β”œβ”€β”€ AnnotationModule.ts    # 3D Pin annotations & guided tours
    β”‚   β”œβ”€β”€ Timeline4DModule.ts    # 4D schedule simulation controller
    β”‚   β”œβ”€β”€ ScheduleManager.ts     # 4D task scheduling data model
    β”‚   β”œβ”€β”€ Boq5DModule.ts         # 5D quantity takeoff & CSV export
    β”‚   β”œβ”€β”€ BoqGenerator.ts        # BOQ extraction engine & line-item aggregator
    β”‚   β”œβ”€β”€ BcfManager.ts          # BCF 2.1/3.0 issue tracker & export
    β”‚   β”œβ”€β”€ IdsModule.ts           # IDS compliance UI coordinator
    β”‚   β”œβ”€β”€ IdsChecker.ts          # IDS schema validator engine
    β”‚   β”œβ”€β”€ ClippingModule.ts      # Section planes & dynamic cutting
    β”‚   β”œβ”€β”€ ExplosionModule.ts     # 3D model explosion along axes
    β”‚   β”œβ”€β”€ FederationModule.ts    # Multi-model alignment & federation
    β”‚   └── QueryModule.ts         # Spatial hierarchy filtering & isolation
    β”‚
    β”œβ”€β”€ ui/                        # UI Components & HUD Overlays
    β”‚   β”œβ”€β”€ CommandPalette.ts      # Ctrl+K quick action command runner
    β”‚   β”œβ”€β”€ MinimapHUD.ts          # Tactical radar minimap & vision cone
    β”‚   β”œβ”€β”€ BimViewCube.ts         # Interactive 3D orientation ViewCube
    β”‚   β”œβ”€β”€ PropertyEditor.ts      # IFC Property Set inspector & editor
    β”‚   β”œβ”€β”€ CostChartComponent.ts  # 5D budget chart & S-Curve visualizer
    β”‚   └── UIManager.ts           # Sidebar tabs, drawers & modals
    β”‚
    β”œβ”€β”€ theme/                     # Design Tokens & Theming
    β”‚   └── ThemePalette.ts        # 9 theme definitions & 22 IFC category color maps
    β”‚
    └── utils/                     # Utilities & Helpers
        β”œβ”€β”€ formatters.ts          # Currency, count, and date formatting
        └── storageCache.ts        # IndexedDB caching layer for models

🎨 Design System & 9 Architectural Themes

The application includes 9 bespoke architectural themes synchronized across Three.js materials, post-processing passes, and UI tokens (currentColor flat vector line icons):

  1. Zen Infrastructure (Default): Deep charcoal slate with Kintsugi Liquid Gold outlines (#D4AF37) and cyan accents.
  2. Pencil & Paper: Crisp light architectural blueprint with graphite lines and cross-hatch sketch passes.
  3. Bluepen Draft: Deep blueprint navy with cobalt drafting ink and structural coordinate grid.
  4. Cozy Warm: Warm timber and clay hues with terracotta accents.
  5. Cyberpunk Neon: High-contrast OLED dark with neon magenta outlines and CRT scanline shader pass.
  6. Retro Amber: Industrial monochrome amber CRT terminal aesthetic.
  7. Matrix Emerald: Phosphor matrix terminal green with digital grid background.
  8. Royal Indigo: Deep space navy with high-tech indigo line art.
  9. Ice Light: Ultra-clean clinical light mode with sky-blue highlights and high-contrast typography.

πŸš€ Getting Started

Prerequisites

  • Node.js (version 18.0 or higher)
  • npm (Node Package Manager)

Installation

git clone https://github.com/lalithebinezer/TOC.git
cd TOC
npm install

Running Locally

npm run dev

Navigate to http://localhost:3000/TOC/ or http://localhost:5173/ in your browser.

Building for Production

npm run build

Generates the optimized production bundle in the dist/ directory.


⌨️ Keyboard Shortcuts & Command Palette

Shortcut Action Description
Ctrl + K / Cmd + K Command Palette Open searchable fuzzy command runner
F Fit View Zoom to fit entire model in viewport
T Top View Switch to 2D Orthographic floor plan
I Isometric View Reset to 3D Isometric perspective
C Section Plane Create dynamic section cut at cursor
X Clear Sections Remove all active clipping planes
P Drop 3D Pin Toggle 3D annotation placement mode
Space 4D Simulation Play / Pause 4D construction playback
Shift + Click Multi-Select Add / remove elements from batch selection
Escape Deselect / Close Clear active selection, close open modals
? Help & Guide Toggle interactive user guide modal

πŸ“¦ Tech Stack


πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages