🔣 Inputs
11 Dec 2016Do Now
Click this link to join repl. You should see a Do Now.
Create a row of emoji using a for loop.
If you get that to work, try to fill your screen with emoji:
createInput()
In our setup() function, we can create HTML elements, including input fields and sliders:
input = createInput("✨");
// variable name = createInput("default value")
input.position(0, windowHeight);
createSlider()
slider = createSlider(32, width, 32);
// variable name = createSlider(min, max, starting value)
slider.position(0, windowHeight+20)
Once we have inputs, we want to pass those values into our draw() loop:
var emoji = input.value();
var number = slider.value();
If I’m using the same variables in setup() and draw(), where should I be declaring those variables?
Create
Create a sketch using input, slider, and for or while loops.