Media & Export Events
Media and export events track PDF generation, image export, 3D model export, and AR (Augmented Reality) code generation. These events are useful for showing loading states during export operations, tracking which export formats users prefer, and integrating export actions with external systems.
PDF Export Flow
User clicks Generate PDF (or action.showExportPDF() called)
│
▼
mimeeq-show-export-pdf-modal ← modal opens, user selects content
│
▼
User clicks Generate
│
▼
mimeeq-pdf-generate-start ← generation begins
│
▼
(PDF rendered server-side)
│
▼
mimeeq-pdf-generate-done ← PDF ready, download initiated
3D Model Export Flow
All 3D model exports (GLB, OBJ, STL, USDZ) follow the same event pattern. The format-specific logic is handled internally — the events are format-agnostic.
User clicks export (or actions.exportGlb() / exportObj() / exportStl() / exportUsdz())
│
▼
mimeeq-3d-before-export-scene ← export starts, scene is being processed
│
▼
(model exported and packaged)
│
▼
mimeeq-3d-after-export-scene ← file ready, download initiated
Image Export Flow
User clicks save image (or actions.saveImage() / actions.showExportImageModal())
│
▼
mimeeq-3d-before-export-image ← screenshot capture begins
│
▼
(image rendered from current camera angle)
│
▼
mimeeq-3d-after-export-image ← image ready, download initiated
Events
PDF
mimeeq-show-export-pdf-modal
The PDF export modal was opened. The user can select which tabs/content to include in the generated PDF. This fires whether the modal was opened by the user clicking the PDF button or by calling mimeeqApp.actions.showExportPDF() programmatically.
Payload: none
mimeeq-pdf-generate-start
PDF generation has started. The configurator is collecting content (screenshots, option data, pricing) and sending it to the server for rendering. Use this to show a loading indicator — PDF generation can take several seconds depending on content complexity.
Payload: none
mimeeq-pdf-generate-done
PDF generation is complete and the download has been initiated. Use this to hide any loading state and optionally track the export for analytics.
Payload: none
// Show a loading overlay during PDF generation
document.addEventListener('mimeeq-pdf-generate-start', () => {
document.getElementById('pdf-loader').style.display = 'flex';
});
document.addEventListener('mimeeq-pdf-generate-done', () => {
document.getElementById('pdf-loader').style.display = 'none';
analytics.track('pdf_exported');
});
3D Model Export
These events fire for all 3D model exports: GLB (with optional compression), OBJ, STL, and USDZ. They wrap the entire export process — from scene serialization through file packaging to download. The events do not indicate which format was exported; if you need to track that, wrap the programmatic actions.exportGlb() / exportObj() / exportStl() / exportUsdz() calls with your own tracking.
mimeeq-3d-before-export-scene
A 3D model export has started. The scene is being serialized and packaged into the target format. This can take several seconds for complex scenes.
Payload: none
mimeeq-3d-after-export-scene
The 3D model export is complete and the file download has been initiated.
Payload: none
// Track 3D model exports
document.addEventListener('mimeeq-3d-before-export-scene', () => {
document.getElementById('export-loader').style.display = 'flex';
});
document.addEventListener('mimeeq-3d-after-export-scene', () => {
document.getElementById('export-loader').style.display = 'none';
analytics.track('3d_model_exported');
});
Image Export
These events fire when the user saves a product image via the image export modal or when mimeeqApp.actions.saveImage() is called programmatically. The image is rendered from the current camera angle at the requested resolution.
mimeeq-3d-before-export-image
Image capture has started. A screenshot is being taken from the current 3D viewport.
Payload: none
mimeeq-3d-after-export-image
The image has been captured and the download has been initiated.
Payload: none
// Custom image export with loading state
document.getElementById('save-image-btn').addEventListener('click', async () => {
const loader = document.getElementById('image-loader');
loader.style.display = 'flex';
// The after-export event fires when the download starts
document.addEventListener('mimeeq-3d-after-export-image', () => {
loader.style.display = 'none';
}, { once: true });
await window.mimeeqApp.actions.saveImage('png', 2048);
});
AR (Augmented Reality)
mimeeq-generate-ar-short-code
An AR short code was generated for the current configuration. This fires when the user requests an AR experience — the short code is used to load the configured product in AR on a mobile device.
Payload: GenerateArShortCodeEventPayload
| Field | Type | Description |
|---|---|---|
shortCode | string | Short code for the AR experience |
allowScaling | boolean | Whether the AR model can be scaled by the user |
document.addEventListener('mimeeq-generate-ar-short-code', (event) => {
const { shortCode, allowScaling } = event.detail;
// Build a QR code linking to the AR experience
const arUrl = `https://ar.mimeeq.com/${shortCode}`;
generateQRCode(arUrl, document.getElementById('ar-qr'));
analytics.track('ar_code_generated', { shortCode, allowScaling });
});
mimeeq-ar-get-back-to-configuration
The user clicked the "Edit" button on the AR landing page to return to the configurator. The payload contains the configuration context from the AR session, which can be used to verify the correct product state is restored.
Payload: ArGoBackEventPayload
| Field | Type | Description |
|---|---|---|
action | string | Action identifier, always 'arGoBack' |
variantCode | string | Variant code of the product that was being viewed in AR |
shortCode | string | Short code of the configuration that was in AR |
isModular | boolean | Whether the product is modular |
document.addEventListener('mimeeq-ar-get-back-to-configuration', (event) => {
const { variantCode, shortCode, isModular } = event.detail;
// Restore configurator UI if it was hidden during AR
document.getElementById('configurator-wrapper').style.display = 'block';
document.getElementById('ar-overlay').style.display = 'none';
analytics.track('ar_exit_to_configurator', { variantCode, shortCode, isModular });
});
Related
- Actions — Exporters — programmatic export methods (
exportGlb,exportObj,exportStl,exportUsdz,saveImage,showExportPDF) - Icons Customization — Export & Document Operations — customizing export-related icons