We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Loading time when Hosting on Website

Home Forums Programming Loading time when Hosting on Website

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #84212
    vergemo
    Participant

    Hi,

    I am currently hosting a Verge3D app (iframe) that I made on my Shopify website. The app is being hosted on AWS. Currently the way it works is that the app doesnt load untill the user scrolls down to it, which is not ideal because the wait time is between 5-10 seconds and no one will wait that long. So I am trying to find a solution where the app starts to load as soon as the webpage starts so that by the time the user scrolls down to the app it would be fully loaded and ready for use. I tried a few from ChatGPT such as setting loading=”eager” and a few others but none worked. Any solutions would be appreciated.

    Below is my current code to display the app:
    <!DOCTYPE html>
    <html>
    <head>
    <title>Shopify Website with Iframe</title>
    <style>
    .iframe-container {
    display: flex;
    justify-content: center;
    align-items: center;
    }

    .threedviewer {
    border-radius: 20px;
    overflow: hidden;
    width: 550px;
    height: 350px;
    }

    /* Mobile view */
    @media (max-width: 768px) {
    .iframe-container {
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
    }
    }

    /* PC view – customize width and height here */
    @media (min-width: 769px) {
    .threedviewer {
    width: 620px; /* Adjust as needed */
    height: 500px; /* Adjust as needed */
    }
    }
    </style>
    </head>
    <body>

    <iframe class=”threedviewer” src=”<!–Verge3D App is placed here–>” frameborder=”0″></iframe>

    </body>
    </html>

    #84215

    Hi,

    The iframe element should be loaded eagerly by default, so no need to add the loading=”eager” param. Perhaps your scene freezes after it has been loaded. It may happen in the following cases:

    1) There are some really heavy calculations in Puzzles (in the main tabs).
    2) You’re using fog puzzle which recompiles all shaders on the scene (which is quite long operation).
    3) You enabled some complex post processing effects.

    Please provide more info regarding your case (or maybe a link to the actual app).

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #84216
    vergemo
    Participant

    Hi Alex,

    below are the images of the puzzles and a quick video showing what is happening. I hovered for a while before scrolling down just to show that the app doesnt load unless i scroll down to it. is there a way to make it load in the background of the website such that its fully loaded when the user scrolls down to it?

    Thanks

    #84220

    Strange, the puzzles look pretty lightweight. In some cases the scenes with many materials / light probes can freeze a bit at 100% progress.

    If you wait longer before scrolling down will it demonstrate the same behavior? I mean is it the hidden iframe or maybe it’s just the scene that takes too much time to load?

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #84222
    vergemo
    Participant

    I have tested to wait for over 30 seconds and it still does the same thing. The video that you see was stuck at 100% but many times when i scroll to it after waiting it starts from 0% or from 60%. is there a custom code that maybe i can add to the webpage that would force load the app? i tried a few tricks but it still doesnt work.

    #84223

    Unfortunately, without seeing the actual app we won’t be able to say why its happening and hence propose possible solutions. BTW, what is the device you use? Can you reproduce this issue on other browsers/devices? Another suggestion, if you place some other Verge3D app inside the iframe (e.g. https://cdn.soft8soft.com/demo/blender/firstperson_camera/firstperson_camera.html), will it work properly?

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #84225
    vergemo
    Participant

    I have tried accross multiple devices (pc and mobile, different browesers) and all have the same issue. ok I tried replacing my app with the one you provided inside the iframe and its the same issue. i waited a long time then scrolled down to the app and its the same (tried multiple times), the loading screen stays for a few seconds then the app starts. is this because of Shopify maybe? do you have any experience with embedding verge in Shopify iframes?

    #84226

    Yep, it appears to be something specific to Shopify.

    I’ve tried to reproduce this, e.g. with iframed first person (it’s quite heavy app considering the amount of shader compilations) and had no luck. Please check this on your own device to see if it works fine:

    https://v3d.net/1b5h

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #84229
    vergemo
    Participant

    Yes, the link you provided works fine on my device. when I scroll to it, its fully loaded and ready to be used. Alright in that case I will look into it and see what can be done in the backend of my shopify site maybe. If I can come up with a solution ill be sure to update it here.

    Thanks

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.