Whenever I upload my STL files onto the platform known as Thingiverse.com, it automatically generates a preview of my 3D design files. My curiosity lies in discovering which specific libraries this website employs for this purpose. For example, when I examine a particular page like , and delve into its source code, I observe that it utilizes the following scripts:
<script src="/thingiview/js/three.min.js?v=2"></script>
<script src="/thingiview/js/Thingiview.js?v=2"></script>
<script src="/thingiview/js/NormalControls.js?v=2"></script>
<script src="/thingiview/js/Detector.js?v=2"></script>
<script>
var target_dom_element = $('.thingiview').get(0);
// parse opts
var argv = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
argv[key] = value;
});
var thingiview = new Thingiview( target_dom_element, 628, 472 );
if ( parseInt(argv['width']) && parseInt(argv['height']) )
thingiview.resize( parseInt(argv['width']), parseInt(argv['height']) );
var animate = function() {
requestAnimationFrame( animate );
thingiview.render();
}
animate();
// handle resizes
window.addEventListener('resize', function() {
if ( thingiview.fullscreen )
thingiview.resize(window.innerWidth, 608);
});
</script>
Yet, upon clicking on the Thingview feature, I notice a change in the visual perspective of the image along with the disappearance of shadows and lighting effects within the scene. I am specifically intrigued by identifying the script responsible for generating these shadows and lights in the displayed STL file. Is there a method to uncover how Thingiverse produces previews of various design files? I intend to capture snapshots of my designs from identical angles and with matching effects.