STL side show --- a search for lightweight Visual Gui_ees

In a search to find a Visual STL Viewer Gui the best/easiest to use so far I could come up with is using some JavaScript. Its significantly faster compared to the OpenGL versions I have tested so far (hmmm).

The reason for exploring this type of Visual display Gui will "path" a way to more intuitive user friendly control panels.

<!DOCTYPE HTML>
<HTML>
 <HEAD>
  <TITLE> InMoov Hand</TITLE>
   </HEAD>

 <BODY>
    <div style="width:490px; margin:auto; position:relative; font-size: 9pt; color: #777777;">
        <canvas id="cv" style="border: 1px solid;" width="490" height="368" ></canvas>
        <div id="tip" style="display:block; color:#ffffff; padding:5px; position:absolute; left:10px; top:315px; background-color:#000000; height:32px; width:250px; border-radius:5px; border:1px solid #777777; font-family:Arial,sans-serif; opacity:0.5; pointer-events:none;">
            Drag mouse to rotate <br> Drag mouse with shift pressed to zoom
        </div>
        
    </div>
    <script type="text/javascript" src="../jsc3d.js"></script>
    <script type="text/javascript" src="../jsc3d.webgl.js"></script>
    <script type="text/javascript" src="../jsc3d.touch.js"></script>
    <script type="text/javascript">
    var canvas = document.getElementById('cv');
    var viewer = new JSC3D.Viewer(canvas);
    viewer.setParameter('SceneUrl', 'InMoov/inmoov_Hand_javascript_000.stl');
    viewer.setParameter('InitRotationX', 0);
    viewer.setParameter('InitRotationY', 0);
    viewer.setParameter('InitRotationZ', 0);
    viewer.setParameter('ModelColor', '#CAA618');
    viewer.setParameter('BackgroundColor1', '#E5D7BA');
    viewer.setParameter('BackgroundColor2', '#383840');
    viewer.setParameter('RenderMode', 'textureflat');
    viewer.setParameter('MipMapping', 'on');
    viewer.setParameter('Renderer', 'webgl');
    viewer.init();
    viewer.update();
  </script>
 </BODY>
</HTML>
 

The above presentation give you mouse control over the Rotation and Zoom of the STL object which I have highlighted.

I am using Binary STL files (there is also ASCII STL files formats which I have not tested)


Just for comparison here is a Python OpenGL type I experimented with.... I am a bit confused by the output visuals....seems to be not back culling!!! the unseen parts (its a case of too many variables and not knowing what is needed etcetcetc).


And here is the Blender Python version so far :- see attachments

 


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
GroG's picture

I believe the browser

I believe the browser manufactures have tried to put some work in quick and effecient 3d display.  This is definately the route we want to go for future MRL gueees.

I wasn't familiar with your Javascript library...  I have tinkered around with this one http://threejs.org/ and what Mr. Doob and others have done with it is very impressive too.

For example this is a full 3d game/simulator with physics - http://cjcliffe.github.io/CubicVR.js/cubicvr/samples/vehicle_physics_demo/stunt_track1.html