...
This is the code to get the GLB file (using this option has no formatting for opening as a WebAR asset in the browser). It just shows the GLB in a model viewer.
Code Block | ||
---|---|---|
| ||
async function getGlbModel(sku) { try { const pregenerated = new MxtWebAR.MxtWebArPregenerated({apiKey:'myApiKey', clientId:'myClientId'}); const url = await pregenerated.getGlb(sku); return url; } catch(e) { console.error('Failed to get sku web ar asset', e); return false; } } |
...