Slider step
Hi, A quick question. How can I set step value for the slider less that 1 for example 0.2?
I don't believe createSlider() has those arguments (http://p5js.org/reference/#p5/createSlider). You can work around this by doing some math. For example you want to count by 0.2 from 0 to 10. Create a slider that has values from 0 to 50 and then just divide slider.value() by 5.
@ynaoto there is no specific method in p5, but you can use .elt to access the underlying html element, and then call any of the methods on that.
http://www.w3schools.com/jsref/dom_obj_range.asp
so this would work:
function setup() {
s = createSlider(0, 50);
s.elt.step = 5;
}
I got it, thanks!