Friday, 1 October 2021

Add Loader until stl image load PHP

I am using Stl Viewer Javascript Plugin to display 3D image in my Website. The size of STL image is around 50MB. So, it is taking much time to load. So is it feasible to add loader image until the stl image load.

I am using this plugin, https://www.viewstl.com/plugin/

Please check my code below,

<body style="margin:0px;">
        <div id="stl_cont" style="width:600px;height:600px;margin:0; background:#ebebeb; overflow: hidden;"></div>

        <script src="stl_viewer.min.js"></script>       
        <script>
            var stl_viewer=new StlViewer
            (
                document.getElementById("stl_cont"),
                {
                    models:
                    [
                        {filename:"/test/Sienna.stl"}
                    ]
                }
            );
        </script>
        
    </body>

Please check the screenshot of the front-end, enter image description here



from Add Loader until stl image load PHP

No comments:

Post a Comment