JSCAD User Group

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Load jscad directory into web jscad

    General Discussions
    4
    7
    843
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Steve Howe
      Steve Howe last edited by

      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

      platypii 1 Reply Last reply Reply Quote 0
      • Steve Howe
        Steve Howe last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • gilboonet
          gilboonet last edited by gilboonet

          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.

          1 Reply Last reply Reply Quote 0
          • z3dev
            z3dev @Steve Howe last edited by

            @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.

            1 Reply Last reply Reply Quote 0
            • Steve Howe
              Steve Howe last edited by

              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.

              😕

              z3dev 1 Reply Last reply Reply Quote 0
              • z3dev
                z3dev last edited by

                @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

                1 Reply Last reply Reply Quote 0
                • platypii
                  platypii @Steve Howe last edited by

                  Try naming the main file inside the directory index.js

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Powered by NodeBB | Contributors