The original dat.GUI had an optional "listen" function that tells the control to update the value it's displaying in case the app changes the value somewhere else.
For example, in the torus sample, we should turn listen "on" for the many of the controls so that when you press "reset", all the sliders, buttons and drop downs update to reflect their new values.
dat.GUI does it by creating an array of controls that are actively "listening". If there is more than one controller in the array, it runs an internal requestAnimationFrame loop, checking for changes every frame.
The original dat.GUI had an optional "listen" function that tells the control to update the value it's displaying in case the app changes the value somewhere else.
listen() example from dat.GUI
For example, in the torus sample, we should turn listen "on" for the many of the controls so that when you press "reset", all the sliders, buttons and drop downs update to reflect their new values.
dat.GUI does it by creating an array of controls that are actively "listening". If there is more than one controller in the array, it runs an internal requestAnimationFrame loop, checking for changes every frame.