How aalavandhaann/blueprint-js works
Main Components Overview
a) Core Application Layer
• Main Blueprint.js controller
• To Model, 2D Viewer, and 3D Viewer components
b) Model Layer (Left Side)
• Core data models: Floorplan, Room, Wall, Corner
• Relationship to Items management
• To data persistence/serialization
c) View Layers (Right Side)
Split into two main sections:
• 2D Viewer (Pixi.js based)
• 3D Viewer (Three.js based)
Component Relationships
a) Data Flow
• Model → 2D Viewer (Floor plan rendering)
• Model → 3D Viewer (3D scene rendering)
• User Input → Controllers → Model (bidirectional)
b) Asset Management
• Texture management system
• Model loading pipeline (GLTF/OBJ)
• Material system
Specific Implementation Details
• 🟦 Blue: Core components
• 🟩 Green: View components
• 🟨 Yellow: Model components
• 🟥 Red: External dependencies
Technical Stack Indicators
Technology badges:
• Three.js for 3D rendering
• Pixi.js for 2D rendering
• GSAP for animations
• Parcel for bundling
Architectural Patterns
MVC pattern implementation:
• Models: /src/scripts/model/
• Views: /src/scripts/viewer2d/ and /src/scripts/viewer3d/
• Controllers: Various helper classes
Key Features to Highlight
Create subsystems for:
• Parametric object generation
• Material management
• Room planning
• Item placement
• VR export capability
External Integrations
Connections to:
• Texture loading system
• 3D model import/export
• VR visualization
• Environment mapping
The event-driven architecture using Three.js event dispatcher
This will provide a clear understanding of how the application's components interact while maintaining the appropriate level of abstraction for a principal software engineer to understand the system's architecture.