kovacsv / Online3DViewer

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

Begin with a Default File #3

Closed vincent-lafargue closed 7 years ago

vincent-lafargue commented 7 years ago

Hi kovacsv,

Your work is very useful, but I've got a problem with a very specific case. I would like to know if there is a possibility to use the 3dviewer with a default file loaded with the page as your example of JSModeler demonstration with the cuboid? My file is stored on my server and have a specific href to direct access.

kovacsv commented 7 years ago

Hi,

You can define a default file as location hash, like this: http://3dviewer.net#https://cdn.rawgit.com/kovacsv/Online3DViewer/9e9ca71d/website/testfiles/cube.3ds

It also works with relative locations on the server. If you don't want to use location hash, you can call the ProcessFiles function of the ImporterApp instance with an array of file urls.

vincent-lafargue commented 7 years ago

Thank you for the hand! It was useful

kovacsv commented 7 years ago

You welcome :)