Model: Marker Holder by theorbtwo, public domain, http://www.thingiverse.com/thing:5570
View Source<!-- NOTE: The following source code may contain generated content. You can also use your browser's 'View Source' feature.--> <html><head><meta name="viewport" content="user-scalable=no,initial-scale=1,maximum-scale=1"> <meta charset="utf-8"> <style> body { margin: 0px; } canvas { width:100%; height:100%; overflow: hidden; } </style> <script type="text/javascript" src="../h3du_min.js"></script> <script type="text/javascript" src="../extras/stl.js"></script> <script type="text/javascript" src="../extras/camera.js"></script> <script type="text/javascript" src="demoutil.js"></script><script src="../extras/meshjson.js"></script> <script type="text/javascript" src="../extras/meshjson.js"></script> </head> <body> <canvas id="canvas"></canvas> <p style="position:absolute;left:0;top:1em"> Model: Marker Holder by theorbtwo, public domain, http://www.thingiverse.com/thing:5570 </p> <script id="demo"> /* global H3DU */ // <!-- /* Any copyright to this file is released to the Public Domain. In case this is not possible, this work is also licensed under the Unlicense: https://unlicense.org/ */ // Create the 3D scene; find the HTML canvas and pass it // to Scene3D. var scene = new H3DU.Scene3D(document.getElementById("canvas")); scene.setClearColor("white"); var input = new H3DU.InputTracker(scene.getCanvas()); var sub = new H3DU.Batch3D(); var camera = new H3DU.Camera(sub, 45, 1, 1000).setDistance(80); H3DU.loadStlFromUrl("holder.stl").then(function(mesh) { "use strict"; sub.addShape(new H3DU.Shape(mesh).setColor("red")); }); H3DU.renderLoop(function() { "use strict"; camera.update(input.update()); sub.getLights().setDirectionalLight(0, camera.getPosition()); scene.render(sub); }); // --> </script> </body></html>