JSCAD User Group
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Load jscad directory into web jscad

    Scheduled Pinned Locked Moved General Discussions
    7 Posts 4 Posters 2.1k Views 2 Watching
    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 HoweS Offline
      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

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

        Try naming the main file inside the directory index.js

        1 Reply Last reply Reply Quote 0
        • z3devZ Offline
          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
          • Steve HoweS Offline
            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.

            😕

            z3devZ 1 Reply Last reply Reply Quote 0
            • z3devZ Offline
              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
              • gilboonetG Offline
                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
                • Steve HoweS Offline
                  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

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • First post
                    Last post
                  Powered by NodeBB | Contributors