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

    how to run demo in V2/web?

    Scheduled Pinned Locked Moved Development Discussions
    4 Posts 4 Posters 2.2k Views 1 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.
    • LinGuanfuL Offline
      LinGuanfu
      last edited by

      I raise an issue #462 about creating multiple instances of JSCAD per page and be informed that V2 has the ability to do it. So I clone the V2 repository, start a server on ./web and open the demo.html, but I find no viewers or designs on it(maybe already work?) or what it should look like if it is working properly.

      0_1568012765200_01.png

      I also find that the demo.js creates two instances of JSCAD using makeJscad(), which is exactly what I want. But I insert some lines of demo.js into demo.html, there are also no viewers or designs. Are there any docs about how to use makeJscad() properly?
      0_1568012926333_02.png

      1 Reply Last reply Reply Quote 0
      • kaosat-devK Offline
        kaosat-dev
        last edited by

        Hi @LinGuanfu !
        Visually that seeems correct: if you click on help/question mark do you have a menu with a list of examples ?
        also looking at the console output it seems the two instances are created correctly.
        Please try opening a design in both panels (or drag & droping a jscad file/folder).
        The css is not finished and could use some tweaking (or might not be a perfect fit for all use cases, but should be easy to change 🙂

        1 Reply Last reply Reply Quote 0
        • T Offline
          tektio
          last edited by

          Hello!
          I am trying to achieve the same - create multiple instances of jscad.
          The commented lines in demo.js seem to work at first, but if you interact only the first instance gets effected. So something ist not properly decoupled.
          Is there any quick advice to get on track?

          z3devZ 1 Reply Last reply Reply Quote 0
          • z3devZ Offline
            z3dev @tektio
            last edited by

            @tektio V2 JSCAD is very different then V1 JSCAD.

            The old examples are no longer usable with V2 JSCAD.

            Probably the best way to enabled two viewers would be through the use of the VUE components, but you'll have to write some HTML / JavaScript.

            https://github.com/z3dev/vue-components

            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