Load jscad directory into web jscad
-
I've created a directory containing a main.js file and a package.json that I can drag and drop onto the web site openjscad.xyz. It works fine.
I can drop just the .js file on the webpage and it works also, but not quite the way I want it to.
I can also run the webpage by passing in the .js file on the URL line, and while it works, the title on the page is a cryptic number. I seem to be unable to pass in just the directory as I can when I drag and drop. Is this possible?
How would I run with mutliple .js or .jscad files in one directory by passing them on the URL line?Is this possible? If not, how can I get the name of the .js file to appear on the webpage instead of number that appears?
Thanks,
Steve -
Yes, this becomes quite limiting if one has to have users download, unzip, and drag & drop. Kind of defeats the purpose of projects. Also you'd have to deal with updates.
Very cumbersome for non-tech users.
It would be nice if you could include directories or even zip files in the URL. -
I'm not sure that a jscad project can be fired from an URL. It would be great because for the moment lots of users don't use the projects that I share because it seems too complex for them to 1°) upload it (as a .zip) 2°) unzip it into a directory 3°) open JSCAD, click "load jscad project" and choose this directory 4°) And put the files they want to use into the directory then reload the project. So I mostly only share .jscad directly but for my kind of designs that relay on 3d files, it's too complex for non dev users.
-
@steve-howe Sorry. A project can be loaded via the LOAD button, or drag-n-drop. The best is via drag and drop due to differences in browser functionality.
-
Nope. Even renaming to index.js doesn't help.
It just doesn't like loading a directory from the URL line.
Drag and Drop works, but I can't load it by using # or ?URI=I just get Error: fetch error: 500 Internal Server Error.
It doesn't seem to work with a directory. -
@steve-howe there's a small section about projects in the User Guide. This might help.
https://openjscad.xyz/dokuwiki/doku.php?id=en:design_guide_projects
-
Try naming the main file inside the directory
index.js