Code Monkey home page Code Monkey logo

Comments (5)

georgealways avatar georgealways commented on September 25, 2024

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.

mrdoob avatar mrdoob commented on September 25, 2024

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.

georgealways avatar georgealways commented on September 25, 2024

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.

mrdoob avatar mrdoob commented on September 25, 2024

Here you have a patch :)
https://github.com/mrdoob/gui-dat/commit/d770dbb0c20e41a3ab38605d46ceff5e69696461

from dat.gui.

jonobr1 avatar jonobr1 commented on September 25, 2024

merged: https://github.com/jonobr1/gui-dat/commit/f736507fd460001e7b160324f9bc33b00515d2b2

from dat.gui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.