使用新值刷新 dat.gui

2023-12-21

I would like to refresh the dat.gui menu with new values. I have loaded a model and display in folder the name of the objects inside a gui folder.
How can I display the new object name when I reload a other model ?
Or it's possible to reset/clear the gui. enter image description here


基本上,您必须在添加控制器时将它们设置为“监听”输入,例如,

gui = new dat.GUI();
var guiX = gui.add( parameters, 'x' ).min(0).max(200).listen();

有关文档,请参阅:

http://workshop.chromeexperiments.com/examples/gui/#9--自动更新显示 http://workshop.chromeexperiments.com/examples/gui/#9--Updating-the-Display-Automatically

有关 Three.js 中的示例,请参阅:

http://stemkoski.github.io/Three.js/GUI-Controller.html http://stemkoski.github.io/Three.js/GUI-Controller.html

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用新值刷新 dat.gui 的相关文章