-
Notifications
You must be signed in to change notification settings - Fork 2
Parameters
Parameter controls (like sliders and numeric inputs) are created automatically in the Controls panel when they are defined in the Parameters editor. Parameters can then be used as variables anywhere in the drawFunction (using the same exact name you defined in the Parameters editor) and they take on the value of the control allowing you to easily manipulate your algorithms! Take note of the syntax used for the parameters in the example. Be careful and exact with the syntax. Also notice that you can create headers to help organize your control panel.
section1: {class:"text", type:"H2", value:"Geometry"}
section1a: {class:"text", type:"H3", value:"Size & Shape"}
type can be "H1", "H2", "H3", "H4", "H5", or "P" (paragraph).
width: {class:"slider", default:0.5, min:0.1, max:1.0, step:0.01}
seed:{class:"number", default:1, min:1, max:1000, step:1}
hue: {class:"slider-hue"}
A slider that ranges from 0-359 in steps of 1.
sat: {class:"slider-sat"}
A slider that ranges from 0-100 in steps of 1.
lit: {class:"slider-lit"}
A slider that ranges from 0-100 in steps of 1.
alpha: {class:"slider-alpha"}
A slider that ranges from 0-255 in steps of 1.
fillMode:{class:"switch"}
A short slider input that ranges from 0-1 in steps of 1. Convenient for binary values like fillMode or on-off type values.
seed:{class:"seed"}
A numeric input that ranges from 1-9999 in steps of 1. Useful for parameterizing seed values for random number functions.
Please feel free to DM me on @genartlayers on Instagram at any time if you have questions, you spot a bug, you have a feature request, etc. I am here to help!
-Brian