kovacsv / Online3DViewer

A solution to visualize and explore 3D models in your browser.
https://3dviewer.net
MIT License
2.48k stars 543 forks source link

show off file #25

Closed jiangyanjavawin closed 3 years ago

jiangyanjavawin commented 4 years ago

Hello sir,Thanks for your code,I study your code for several day,but i still don't know how to show stable off file,and not load off file.If you have any idea,please let me know,Thank you very much.

kovacsv commented 4 years ago

Hello! Please clarify a bit what you would like to achieve. For me off files works the same as other file formats: https://3dviewer.net/#testfiles/prism.off

Please note that only textual off files are supported, binary off doesn't work at the moment.

jiangyanjavawin commented 4 years ago

hello sir,the issue i faced is I want to change the canvas's sourcefile value by js,here is my js code,

    function Onchange(){
        var canvas = document.getElementById ('fullscreen');
        canvas.sourcefiles = "testfiles/prim.off";
    }

here is the canvas code.

when i run what i modity,the web show conversion failed,but i don't know why? when i run by this is work,<canvas id="fullscreen" class="3dviewer" sourcefiles=""testfiles/prim.off"" width="200" height="200"> but i want to get the sourcefile's value by js,Do you have any solution?Thank you very much.

kovacsv commented 3 years ago

In the rewritten version I don't think it's relevant anymore. Please see the developer documentation on how to use it now, and let me know if I can help you achieve your goal.