You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a little control panel for each sketch is tedious and repetitive. You're likely to just want a slider, a text box, etc to tweak the values in your model. I'm imagining a derive macro that would generate this for you.
The usage of the macro would look something like this:
#[derive(Debug, splatter::ControlPanel)]pubstructModel{/// Would generate a slider with range [0.0, 1.0] and label "foo"#[control(type = "slider", max = 1.0, min = 0.0)]foo:f32,/// Would generate a text box with label "bar" and a "Set" button#[control(type = "box")]bar:usize/// A field that we don't want to appear in the control panel
baz:SomeType}
Then in update and view you would do something like:
We also need to think about how you could use the derive macro and also add other controls like "start", "stop", "reset", etc without needing to do the entire control panel manually.
The text was updated successfully, but these errors were encountered:
Creating a little control panel for each sketch is tedious and repetitive. You're likely to just want a slider, a text box, etc to tweak the values in your model. I'm imagining a derive macro that would generate this for you.
The usage of the macro would look something like this:
Then in
update
andview
you would do something like:We also need to think about how you could use the derive macro and also add other controls like "start", "stop", "reset", etc without needing to do the entire control panel manually.
The text was updated successfully, but these errors were encountered: