Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

controlKit.update() has no immediate effect #29

Open
stixan opened this issue Nov 2, 2016 · 2 comments
Open

controlKit.update() has no immediate effect #29

stixan opened this issue Nov 2, 2016 · 2 comments
Labels

Comments

@stixan
Copy link

stixan commented Nov 2, 2016

I'm changing several values programmatically and I need to sync these values to ControlKit.

Using controlKit.update() in my update loop (standard p5.js draw loop) has no immediate effect. It takes a manual manipulation of any of the controllers to get the remaining values to update.

I might be doing something wrong here. Shouldn't calling controlKit.update() be sufficient? Looking at the provided ValuePlotter example, controlKit.update() is followed by requestAnimationFrame(update,null). Why is this necessary?

@automat
Copy link
Owner

automat commented Nov 2, 2016

The requestAnimationFrame is just for demonstration purposes (continuous external update within the example). controlkit.update is currently only applied to plotters and outputs, so external update is not possible with the old version. The api is currently updated to allow syncing every component with its connected value (eg. https://github.com/automat/controlkit.js/blob/rewrite/src/component/Number.js#L228). ControlKit v0.2 is nearly done and will be released within the next weeks.

@dyarbrough93
Copy link

dyarbrough93 commented Apr 22, 2017

Any update on this? I don't see anything about it in the documentation and controlKit.update() still does nothing. I really like the framework, but if I can't do this it will be a deal breaker. I'm trying to update a color if that matters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants