controlkit.js icon indicating copy to clipboard operation
controlkit.js copied to clipboard

controlKit.update() has no immediate effect

Open stixan opened this issue 8 years ago • 2 comments

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?

stixan avatar Nov 02 '16 10:11 stixan

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.

automat avatar Nov 02 '16 11:11 automat

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.

dyarbrough93 avatar Apr 22 '17 01:04 dyarbrough93