Photo Analyzer Threekit AI Vision
Upload a building photo to detect window count, building type, style, and get AI recommendations. Results are stored in shared state for other widgets.
Window Configurator Interactive
Full window configurator with product selection, colors from real product data, muntins, glazing, and dimensions. Includes photo upload if no photo available.
AI Visualizer Threekit AI
Replaces windows in uploaded photos with configured products. Uses AI to maintain photorealism while applying exact color and muntin patterns.
Product Catalog Data-Driven
Display all window product families from products.json. Clicking a product opens the configurator with that product selected.
AI Chat Assistant Threekit AI
Floating or embedded chat widget. Answers questions about windows, helps with product selection, and has context of current configuration.
Lead Capture & PDF Generator
Capture leads when users request quotes or download PDFs. Session tracking runs automatically in background.
Click to open lead capture modals:
API Reference
Core methods and shared state for integrating widgets into your application.
MockfjardsService Methods
| Method | Description |
|---|---|
init(options) |
Initialize the service with configuration options |
getWidget(name) |
Get a widget instance by name (e.g., 'configurator', 'visualizer') |
setLanguage(lang) |
Switch language ('sv' or 'en') |
getState(key) |
Get shared state value (e.g., 'uploadedPhoto', 'photoAnalysis', 'configuration') |
setState(key, value) |
Set shared state value |
on(event, callback) |
Listen to events ('widgetReady', 'stateChange', 'languageChange') |
getProducts() |
Get loaded products data |
getColorPalette() |
Get color palette from products |
Initialization Options
| Option | Type | Description |
|---|---|---|
apiEndpoint |
string | Base URL for API calls (required for AI features) |
language |
'sv' | 'en' | Default language (default: 'sv') |
widgets |
string[] | Widgets to initialize (e.g., ['chat', 'configurator']) |
onPhotoAnalyzed |
function | Callback when photo is analyzed |
onConfigurationChange |
function | Callback when configuration changes |
onQuoteRequest |
function | Callback when user requests a quote |
onVisualizationGenerated |
function | Callback when AI visualization completes |
Shared State Keys
| Key | Description |
|---|---|
uploadedPhoto |
Base64 string of uploaded building photo |
photoAnalysis |
AI analysis result (buildingType, windowCount, style, etc.) |
configuration |
Current window configuration from configurator |
userPreferences |
User preferences from quiz/preferences widget |
visualization |
Base64 string of AI-generated visualization |
recommendation |
AI product recommendation |