How thatopen/engine_components works
Project Type and Purpose
• This is an open-source, monorepo tool library for building browser-based 3D BIM applications.
• It delivers two npm packages:
• @thatopen/components (core BIM components, platform-agnostic)
• @thatopen/components-front (browser-only extensions)
• It integrates heavily with Three.js, web-ifc (IFC parser), and the fragments 3D engine.
High-Level Architecture
• External Dependencies
• Three.js
• web-ifc (engine_web-ifc)
• fragments engine (engine_fragment)
• NPM Registry
• Monorepo Packages
• Core Package (@thatopen/components)
• Front Package (@thatopen/components-front)
• Examples & Demos
• examples/* HTML + JS assets folder
• index.html entry point
• Dev & CI/CD
• GitHub Actions workflows (publish, release)
• Yarn v3/Webpack/Vite build pipeline
• Jest tests
Core Package Breakdown
• core (renderers, scene, camera, world, components manager)
• fragments (fragment-level BIM tools: BoundingBoxer, Hider, Exploder, etc.)
• ifc (IFC utilities: IfcLoader, IfcFinder, IfcPropertiesManager, IfcRelationsIndexer, IfcJsonExporter)
• measurement (MeasurementUtils)
• openbim (BCFTopics, IDSSpecifications)
• utils (bbox, geometry, materials, uuid, event management)
Front Package Breakdown
• civil (CivilNavigator family)
• core (ClipEdges, Marker, PostproductionRenderer, ShadowDropper)
• fragments (Highlighter, IfcStreamer, Outliner, Plans, Sections)
• measurement (Angle/Area/Edge/Face/Length/VolumeMeasurement)
• utils (graphic-vertex-picker, typeless-libraries-handler)
Examples & Demos
• Assets folder holding pre-built bundles, streaming IFC resources.
Dev & CI/CD Layer
• Workflows: publish-npm, release-please.
• Tooling: Yarn v3 (workspaces), Vite build (vite.config.ts), Jest (jest.config.ts).
Architectural Patterns & Principles
• Monorepo with Yarn Workspaces (shared dev dependencies, atomic commits).
• Modular design: each feature lives in its own folder with index.ts + example.
• Separation of concerns: Core is environment-agnostic; Front extends Core for browser.
• Plugin-like components: Components manager dynamically registers modules.
• Use of builder/provider pattern: ConfigManager for centralized configuration.