JSCAD User Group

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

    Mar 14, 2016

    Archives (Google+)
    1
    1
    890
    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.
    • z3dev
      z3dev last edited by

      Jeff Gay
      Viewer Configuration

      This is a new thread about enhancing the viewer, and allow further options for the camera, grid, axis, etc. All suggestions welcome as well as assistance.

      Here are some settings in the viewer that should be configurable:

      • Camera position (x/y/z), angle (x/y/z), field of view angle

      • Grid viewable, size, minor/major spacing, and colors

      • Zoom min and max

      • Axis viewable, colors

      • Render smoothing, default color
        4 comments
        4
        4 plus ones
        4
        no shares
        Shared publicly•View activity

        Jeff Gay
        I've made some changes to the Viewer, moving all settings for camera, grid, axis, zoom, etc to properties withing the object. Everything is now configurable.

        I was able to create a very nice view of the OpenJSCAD.org logo from 500 mm above the axis, showing a grid that is 1000mm by 1000mm.

        https://plus.google.com/112547487000950207437/posts/Y6DeTunEK4P

      Mar 15, 2016
      Jeff Gay
      I just added a pull request for changes to both Processor and Viewer. These changes should allow users of OpenJSCAD.org to change the Viewer settings for:

      • controlling the display of solids
      • controlling the display of the plate (grid lines)
      • controlling the display of the XYZ axis
      • controlling the initial camera position
        The Processor also has some improvements for:
      • setting the path to JS libraries
      • adding libraries for processing
      • callbacks when the current object changes or when download occurs

      One nice new feature is that the Viewer can be reset to the original perspective; CTRL-RETURN

      Mar 19, 2016
      Jeff Gay
      Both objects (Processor and Viewer) are provided via one source file; openjscad.js. In the new version, all the "settings" have been moved to "options" which can be changed.

      1. By changing the source code
      2. By providing options during construction
      3. During run time by calling appropriate functions, e.g. setCameraOptions(options).
        Hopefully, this provides enough flexibility for those needing a slightly different view, etc.

      Please try the DEV branch if this functionality is of interest.

      Mar 23, 2016
      Jeff Gay
      Nope. You will have to see the code.

      FYI The source code is organized quite differently now.

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