AR.js icon indicating copy to clipboard operation
AR.js copied to clipboard

Browser reloads with large gltf model

Open anuj9196 opened this issue 1 year ago • 1 comments

Do you want to request a feature or report a bug? Bug

What is the current behavior? I am trying to load a 3D entity of the zip size to be around 60-70 MB. On scanning the maker, the browser reloads automatically after few seconds. If the current behavior is a bug, please provide the steps to reproduce. Use this model in entity

https://tapxreality-media.s3.ap-south-1.amazonaws.com/media/uploads/422909c0-b46d-45e2-9692-8020b8324a58/2024/12/preview/3d/20241208_88611_free1975porsche911930turbo/extracted/scene.gltf

code

<a-scene
        vr-mode-ui='enabled: false;'
        renderer="logarithmicDepthBuffer: true; precision: medium;"
        embedded 
        gesture-detector 
        arjs='trackingMethod: best; sourceType: webcam; debugUIEnabled: false;'>

        <a-nft
            type='nft'
            url="{{ item.scan.data.file|marker_path }}"
            smooth='true'
            smoothCount='10'
            smoothTolerance='0.01'
            smoothThreshold='5' 
            markerhandler>
            <a-entity
                gltf-model="https://tapxreality-media.s3.ap-south-1.amazonaws.com/media/uploads/422909c0-b46d-45e2-9692-8020b8324a58/2024/12/preview/3d/20241208_88611_free1975porsche911930turbo/extracted/scene.gltf"
                scale="5 5 5"
                position="150 350 -250" rotation="-90 0 0" gesture-handler>
            </a-entity>
        </a-nft>
	<a-entity camera></a-entity>
    </a-scene>

Please mention other relevant information such as the browser version, Operating System and Device Name Safari + Chrome (iPhone 15) What is the expected behavior?

The zip file of gltf model is https://tapxreality-media.s3.ap-south-1.amazonaws.com/media/uploads/422909c0-b46d-45e2-9692-8020b8324a58/2024/12/preview/3d/20241208_88611_free1975porsche911930turbo.zip 3D models should load If this is a feature request, what is motivation or use case for changing the behavior?

anuj9196 avatar Dec 09 '24 05:12 anuj9196

Hi @anuj9196 have you tested on other platforms (Android, Desktop...) and maybe other browsers?

kalwalt avatar Jan 14 '25 13:01 kalwalt

I've seen this with large textures on iPhones. I have had this problem in 2D, with OpenLayers. There is a problem with the Safari WebGL framework where it has an upper limit on the size of textures and if your texture exceeds it, Safari crashes the tab with no error reported in Javascript. So, your app gets no warning ahead of time. I suppose they can put whatever limit they want on texture sizes, but the problem is the lack of javascript error so that you can recover and fall back to a lower resolution texture. These limits vary a bit by iOS / Safari version and iPhone GPU hardware.

garthhenning avatar Jul 23 '25 22:07 garthhenning