javascript3dmodel-viewer

Google Model Viewer AR


we are trying to make a custom 3D configurator with AR capabilities, but we found out that model-viewer from google is too limited for our needs, so we are doing it in three.js

To use the AR we analyzed the source code and found out that there is a redirect to this link when clicking the model-viewer button:

intent://googlewebcomponents.github.io/model-viewer/examples/assets/Astronaut.glb?link=https%3A%2F%2Fgooglewebcomponents.github.io%2Fmodel-viewer%2Fexamples%2Faugmented-reality.html&title=A%203D%20model%20of%20an%20astronaut

(taken from the Google's example page)

Out first tests made a warning in the console like "Inaccessible Navigation" silently failing. Do you have an idea on what are we doing wrong?


Solution

  • The link above was wrong. I inspected the source code and find out that the correct one is built like this:

    intent://${modelUrl}?link=${link}&title=${title}#Intent;scheme=${scheme};package=com.google.ar.core;action=android.intent.action.VIEW;S.browser_fallback_url=${fallbackUrl};end;
    

    Where:

    This link works only for android phones with AR hardware.