omrips / viewstl

Viewstl Javascript plugin - STL/OBJ 3D files Viewer by viewstl.com
MIT License
186 stars 46 forks source link

Cannot invoke if scripts in a sub-directory #1

Closed venkyr closed 4 years ago

venkyr commented 4 years ago

First, this is brilliant, and thank you for making it open source :)

A minor issue - if I place the scripts in a sub-directory, say scripts, the the script loader in stl_viewer still looks for the other scripts in the root directory. I've put in a fix but as the minified JS is a little confusing I figured you can do a better job!

Thanks again!

omrips commented 4 years ago

Thanks venkyr - You're right. You should use 'load_three_files' parameter in such case.

I should have been more clear about this - I'll update the instructions. (maybe I should make it to look at the same directory of stl_viewer.min.js ...)

What is your suggested fix?

venkyr commented 4 years ago

I used the second option (look in the same directory by default). https://github.com/venkyr/viewstl/commit/e7cae3783179724fa1d67c69e29dced4e2ea126f

omrips commented 4 years ago

Adopted your fix! thanks :)