Questions tagged [dat.gui]

Dat.gui is a small JavaScript library to render some GUI elements like sliders, color pickers, etc.

Repository: https://github.com/dataarts/dat.gui

Documentation: http://workshop.chromeexperiments.com/examples/gui/#1--Basic-Usage

182 questions
0
votes
1 answer

Dat.gui add slider for each element in array

So I have a javascript object that looks like this var parameters = {bgColor: 0x5886a0, ambientColor:0xffffff, opacityCS:[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], whiteThreshold:[160,160,160,160,160,160] }; I would like to add a slider for each…
lesolorzanov
  • 3,536
  • 8
  • 35
  • 53
0
votes
3 answers

How to use dat.gui to control the rotation speed of a model in three.js?

I wanna control rotation speed of my model,so I try to use dat.gui to accomplish it.And I write flollows in my render script: function render() { group.rotation.y -= controls.rotation; renderer.render(scene,…
Starain.X
  • 19
  • 2
  • 6
0
votes
0 answers

How to insert a label in front of a button in dat.gui?

I started working with dat.GUI a few weeks ago and I know how to make a simple button which will visually span across a whole row in the GUI. Now I need a 'Browse' button which will have a non-clickable label in front of it which will contain some…
a_kris
  • 1
  • 1
  • 4
0
votes
0 answers

Update geometry with values from sliders

How can I pass values dynamically generated from dat.gui sliders into the p and q properties of TorusKnotGeometry, like in this example? http://threejs.org/docs/#Reference/Extras.Geometries/TorusKnotGeometry I tried looking through the source code…
grace
  • 73
  • 7
0
votes
1 answer

Three.js simple custom animation does not continue changing with DAT.GUI .onChange function

Apologies if my mistake is obvious. Started learning code a few weeks ago. Have searched copiously for an answer. Attempting to control a variable of a graphical equation animated in three.js using Dat.Gui. By assigning the variable to nothing, I…
JDCoder
  • 1
  • 1
0
votes
1 answer

Hide THREE.Mesh with dat.gui

I am trying to create a simple 3D shapes of 3 buildings, assuming I start with the outlines (where I have the X and Y for each line start/end) and then extrude them. Google did not help me, so I kindly ask you to take a look if you can. I am…
alex747
  • 139
  • 2
  • 12
0
votes
0 answers

Updating three.js EdgesHelper geometry

I'm dynamically adjusting objects in three.js using dat.gui sliders, and I've got a question about the three.js EdgesHelper class. As the example below demonstrates, the geometry of the EdgesHelper object, box_edges, does not automatically update…
svenpables
  • 99
  • 1
  • 9
0
votes
1 answer

Using dat.gui sliders to rotate bones from Blender json / collada in three.js

I want to know how to manipulate the bones of a json / collada file exported from Blender. Been trying to do this for a while to no avail. I want to be able to use sliders (through dat.gui) to rotate each bone Can anyone point me in the right…
Matttampa
  • 1
  • 1
0
votes
0 answers

refresh dat.gui with current variable value

i'm using dat.gui, i have a global variable called variab (outside of the setupGui function showed here) that changes dinamically during the runtime, and i want to get showed the current value in a box rendered by dat.gui . At the purpose, i wrote…
karplus
  • 1
  • 3
0
votes
1 answer

Three.JS- STL Loader - Uncaught TypeError: Cannot read property 'scale' of undefined

I am loading five elements with STL Loader to create a table. I am trying to apply dat.gui to Tabletop.STL to adjust scale of it. Below is the code three.js webgl - STL
kiran
  • 641
  • 2
  • 12
  • 34
0
votes
0 answers

How to work with dat.gui or three.js for multiple images?

I am working on dat.gui/three.js apis currently. I am getting the examples for single image(https://workshop.chromeexperiments.com/examples/gui/#1--Basic-Usage) using the above apis, but how can I work with multiple images so that I can apply…
Dhana
  • 711
  • 3
  • 14
  • 40
0
votes
1 answer

How can I modify parameters of Objects in my scene loaded with OBJMTLLoader?

I have an scene with 3 cubes and a DAT.GUI menu, I just want to set any cube to wireframe when it is checked on the menu (separatedly). What I did works for 2 of my 3 cubes, but I don't know why, the first cube is not modified, you can se the…
soiber
  • 172
  • 3
  • 14
0
votes
2 answers

dat.gui not rendering properly in WebGL window

When i try to render my dat.gui with a button and a textbox on top of my WebGL window i get this: The "Close Controls" part of the dat.gui is showing, but for some reason my button and textbox is not. I use three.js to create the WebGL…
Steffan Pallesen
  • 140
  • 1
  • 15
0
votes
1 answer

Toggle between multiple 3d models in three.js using dat.gui

I'm trying to toggle between multiple 3d models (loaded with OBJMTLLoader.js) rendered in my three.js scene. I'm using dat.gui to create a dropdown list of model names and when one is chosen, the scene will add the respective obj model to the scene…
Mike L.
  • 1
  • 2
0
votes
1 answer

dat.GUI create multiple buttons with same name

I try to use dat.GUI to create multiple buttons all with same name "ShowCoord", is this possible? What I have currently is: for (i = 0; i < overlay.numElements; i ++) { var length = overlay.elementNumVertices[i]; var subObj =…