Interface: Actions
Provides methods for manipulating the configurator state and controlling product configurations.
The Actions interface gives you direct control over the product configurator, allowing you to programmatically change options, control the camera, manage the scene, export content, and perform various operations that would normally require user interaction.
Example
// Select a product option
const option = { /* option data */ };
window.mimeeqApp.actions.markOption(option, 'block123', 'colorPicker');
// Zoom out to see the entire product
window.mimeeqApp.actions.zoomOut();
AugmentedReality
generateAR
generateAR:
GenerateAR
Function
Creates an Augmented Reality (AR) version of the current product configuration.
This action processes the current product with all its customizations and generates an AR-ready model that can be viewed on compatible devices. It returns a unique shortcode that can be used to access the AR experience.
Business value:
- Allows customers to visualize products in their actual environment before purchase
- Reduces returns by setting accurate expectations of product size and appearance
- Creates engaging marketing experiences that drive conversion
- Provides sales teams with powerful visualization tools for client meetings
Example
// Add a "View in your space" AR button to your product page
document.getElementById('view-in-ar').addEventListener('click', () => {
window.mimeeqApp.actions.generateAR().then(shortcode => {
if (shortcode) {
window.location.href = `/ar-viewer?code=${shortcode}`;
}
});
});