Comments (5)
Thanks a million for the feedback doob!
I think that'd be a good solution. But perhaps instead of having each controller responsible for instantiating its own interval that checks the value, we have a method like GUI.listen() that you call in your own loop that goes through and monitors for variable changes on EVERY controller?
Curious to hear your thoughts on this approach. It may be that your sketch doesn't have a loop, or that you don't want to waste resources checking every variable you've added to the GUI (but I'm not exactly sure how taxing that really is).
from dat.gui.
Well, the idea was that GUI would have an internal interval. By calling .listen()
the controller then would be added to the list of controllers to be checked in that loop. I don't think listening to all the controllers would be a good approach.
Maybe .startListening()
and .stopListening()
?
from dat.gui.
Right. I'm for the idea of individual controllers getting "listened" and I think there's something really elegant about putting .listen() at the end of the add call -- my only concern is: how do we give developers control over how frequently those values they choose to listen to are monitored? That's the only reason I was sort of into the idea of a GUI.listen() function that belongs in a user's own interval.
from dat.gui.
Here you have a patch :)
https://github.com/mrdoob/gui-dat/commit/d770dbb0c20e41a3ab38605d46ceff5e69696461
from dat.gui.
merged: https://github.com/jonobr1/gui-dat/commit/f736507fd460001e7b160324f9bc33b00515d2b2
from dat.gui.
Related Issues (20)
- Hide / disable "close controls" button HOT 1
- Resize not working when controls first shown
- dat.gui is present after leaving the page HOT 1
- Is there a way to set strings? HOT 3
- gui.removeFolder gives a Uncaught TypeError: folder.domElement is undefined error
- Unable to build using README instructions HOT 1
- How to change a button's value when clicked?
- When dragging over input box, number is changed as if dragging over slider.
- Add link to examples or screenshots on readme
- add types via `index.d.ts` HOT 1
- after use the dat.gui window is not defined in vue, nuxt project HOT 2
- When using NoLoop and redraw callback from onFinishChange(redraw) runs multiple times depending on value
- Duplicated GUI with vite + react + three.js HOT 3
- dat.gui scroll bar cannot scroll to the bottom, can not displaying all contents
- color
- Impossible to revert saved preset to default HOT 1
- [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event.
- Can you please clarify what you mean by "prest" in this context? HOT 4
- The link to the tutorial is broken
- Found a drop in replacement alternative to dat.gui and it's maintained - see links
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dat.gui.