While working on a small 3D App with three.js, I found myself constantly adding and changing variables like Model Size and camera Distance in my script. However, it was quite cumbersome to adjust these parameters, save the changes, and then reload the window just to see how the initial pose of the model looked. This led me to wonder if there was a way to update the JavaScript parameters in real time within my browser, or perhaps output the current variables (such as position) using a Firefox addon or something similar for other browsers in production mode.
I experimented with Firebug but was unable to see real-time results after manipulating the parameters.
Additional information: I am using orbital movements to navigate around the model.
The code snippet I am using for the output variables is:
<script>
callback=function(){options={"width":"440","height":"300","background":"ffffff","opacity":"0","modelPosition":[0,0,0],"modelScale":[50,50,50],"ambient":4210752,"directionalPosition":[99,99,99],"directionalColor":16777215,"cssClass":"3d","cssStyle":"float: right","id":"gnet_viewer","fps":"20","camera":[50,50,30],"fov":"70","material":"https:\/\/wow.gnetwork.eu\/assets\/uploads\/2016\/05\/test1.mtl"};wp3d=new WP3D('https://wow.gnetwork.eu/assets/uploads/2016/05/test1-1.obj',options);wp3d.render();}
if(window.addEventListener){window.addEventListener('load',callback,false);}else{window.attachEvent('onload',callback);}
</script>