Type Alias: RegenerateAR()
Function
Attempts to recreate an AR model when initial generation fails.
This action tries again to create an AR-compatible version of a product when the first attempt was unsuccessful. It uses existing AR data to ensure consistency and returns a shortcode for accessing the AR experience if successful.
Business value:
- Improves AR reliability by providing automatic recovery from generation failures
- Enhances customer experience by reducing error messages during AR experiences
- Maximizes AR availability for products with complex configurations
- Supports continuous operation of AR features in busy retail environments
Parameters
arData
Previously generated AR data containing model information
Returns
Promise resolving to an AR shortcode string, or null if regeneration fails
Example
// Implement automatic retry when AR generation fails
window.mimeeqApp.actions.generateAR().then(shortcode => {
if (!shortcode && arData) {
// First attempt failed, try again
return window.mimeeqApp.actions.regenerateAR(arData);
}
return shortcode;
}).then(finalShortcode => {
if (finalShortcode) {
window.location.href = `/ar-viewer?code=${finalShortcode}`;
} else {
showErrorMessage("AR currently unavailable for this product");
}
});