Variant Docs
  • How Variant Works
  • 3D Content
    • Tags
    • Tagging Objects & Groups
    • Tagging Materials
    • Using Swatches
    • 3D Model Delivery Requirements
  • Variant V2 SDK
    • Embedding the SDK
    • Setting Mesh Options
    • Moving, Rotating & Scaling Objects
    • Setting Material Options
    • Setting Texture Options (Beta)
    • Setting Morph Options (Beta)
    • Launching an AR Quicklook
    • Embedding the 3D viewer on your webpage
    • Browser/Hardware Compatibility
  • Releases
    • Change Log
Powered by GitBook
On this page
  1. Variant V2 SDK

Launching an AR Quicklook

How to start an AR experience on mobile devices

PreviousSetting Morph Options (Beta)NextEmbedding the 3D viewer on your webpage

Last updated 2 years ago

To launch an AR quicklook, set the product variant options, and any presentation options you want, then pass that object to Variant.launchQuicklook().

This will open your product in either , or via WebXR in the users' browser on Android devices.

You can specify the product via the Product Code you previously set in the Variant CMS (under 'Edit Product'). Make sure your product is set to 'Published' to view it outside of the Variant CMS.

Due to content restrictions on mobile browsers, this function is only guaranteed to work if called via user input (click/tap).

var data = {
    productCode: 'SKU001'
    options: {    
        meshes : [
            {
                tag: 'CHAIR',
                enabled: true   
            },
            {
                tag: 'FOOTSTOOL',
                enabled: true
            }            
        ],
        materials : [
            {
                tag: 'LEATHER',
                meshTag : 'CHAIR'
            }
        ]
    }
};

Variant.launchQuicklook(data);

Showing products without variants

All uploaded products have a default preset that will show the product without any tagged meshes. If you upload a GLTF without any tagged meshes or materials, the default preset will show that model as-is.

var data = {
   productCode: 'SKU001'
   preset: 'default'
};

Variant.launchQuicklook(data);
iOS AR Quicklook