dat.gui

WebGL single frame “screenshot” of webGL

百般思念 提交于 2019-12-01 00:52:04
tried searching for something like this, but I've had no luck. I'm trying to open a new tab with a screenshot of the current state of my webgl image. Basically, it's a 3d model, with the ability to change which objects are displayed, the color of those objects, and the background color. Currently, I am using the following: var screenShot = window.open(renderer.domElement.toDataURL("image/png"), 'DNA_Screen'); This line succeeds in opening a new tab with a current image of my model, but does not display the current background color. It also does not properly display the tab name. Instead, the

WebGL single frame “screenshot” of webGL

烂漫一生 提交于 2019-11-30 19:43:27
问题 tried searching for something like this, but I've had no luck. I'm trying to open a new tab with a screenshot of the current state of my webgl image. Basically, it's a 3d model, with the ability to change which objects are displayed, the color of those objects, and the background color. Currently, I am using the following: var screenShot = window.open(renderer.domElement.toDataURL("image/png"), 'DNA_Screen'); This line succeeds in opening a new tab with a current image of my model, but does

Issue while using dat.GUI in a three.js example

痞子三分冷 提交于 2019-11-30 14:58:45
问题 I tried to use dat.GUI in the following three.js example. I just did the following code changes to add a GUI to adjust mesh opacity. var loader=new THREE.VTKLoader(); loader.load ("models/vtk/bunny.vtk", function(geom){ var mesh = new THREE.Mesh(geom, material ); mesh.doubleSided=true; mesh.position.setY(-0.09); scene.add( mesh ); var gui = new dat.GUI(); var view = this; view.Opacity = 0.2; var maingui = gui.addFolder('Main'); var opacity = maingui.add(view, 'Opacity', 0, 1); opacity

How do I change the location of the dat.gui dropdown?

纵饮孤独 提交于 2019-11-29 06:58:40
I am using dat.gui, and I would like to position it somewhere different than the top right, preferably at the top overlapping a three.js canvas, is this accomplished through commands, or is there some css that will do the trick? satori You need some JavaScript and CSS to do this. The GUI constructor can be passed a paramaters object. You can tell the control not to be autoplaced. You can also attach an element ID to make styling easier var gui = new dat.GUI( { autoPlace: false } ); gui.domElement.id = 'gui'; And then the CSS to place it can be something like this: #gui { position: absolute;

How do I change the location of the dat.gui dropdown?

谁说胖子不能爱 提交于 2019-11-28 00:31:48
问题 I am using dat.gui, and I would like to position it somewhere different than the top right, preferably at the top overlapping a three.js canvas, is this accomplished through commands, or is there some css that will do the trick? 回答1: You need some JavaScript and CSS to do this. The GUI constructor can be passed a paramaters object. You can tell the control not to be autoplaced. You can also attach an element ID to make styling easier var gui = new dat.GUI( { autoPlace: false } ); gui