How do you turn Object Blending off by default in Scene Viewer?

Viewed 442

Object blending is ON by default and you have to tap the button to turn off.

Most of the people using my AR will be first time users and won't know how to turn it off.

Is there a way to turn this off by default? I am not seeing a solution in the documentation.

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Avacados</title>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="https://ar.marketscale.com/test/test.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    </head> 
    <body>
        <a style="display:none" id="ar-link" href="intent://arvr.google.com/scene-viewer/1.0?file=https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Avocado/glTF/Avocado.gltf&mode=ar_only&link=https://www.google.com&sourceid=chrome&ie=UTF-8&title=Acocados#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;S.browser_fallback_url=https://developers.google.com/ar;end;">Avovados</a>
        <footer>
            <script type="text/javascript">

                var isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
                if (isMobile) {
                    $(document).ready(function(){
                        setTimeout(function(){
                        // $('#ar-link').trigger('click');
                            $('#ar-link').click(function() {
                                this.click();
                            }).click();
                        },1000);
                    });
                } else {
                    window.location.href = "https://ar.marketscale.com/test/testfallback.css"
                }
            </script>
        </footer>
        <!--  Include both scripts below to support all browsers! -->
        <!-- Loads <model-viewer> for modern browsers: -->
        <script type="module"
            src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js">
        </script>

        <!-- Loads <model-viewer> for old browsers like IE11: -->
        <script nomodule
            src="https://unpkg.com/@google/model-viewer/dist/model-viewer-legacy.js">
        </script>
    </body>
</html>

2 Answers

I commented-out all the dialogs prompting for this and tested it on a phone that does not support it, because their code just automatically turns it off anyway. Same goes for that instant placement stuff which I think is just future-proofing by them for when the lidar devices (like Apple's) come out...

Here is the solution - add "&disable_occlusion=true" in the intent, e.g.:

<a href="intent://arvr.google.com/scene-viewer/1.0?file=https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Avocado/glTF/Avocado.gltf&disable_occlusion=true&mode=ar_only#Intent;scheme=https;package=com.google.ar.core;action=android.intent.action.VIEW;S.browser_fallback_url=https://developers.google.com/ar;end;">Avocado</a>;
Related