Capability
Live project UI
A script can declare live controls that appear in the browser UI view. This turns a physical prototype into something you can tune, trigger, and observe without rewriting code for every test.
Minimal Pattern
Rebuild the UI when the browser says hello again, so a refreshed page or shared UI link knows which controls exist.
var brightness = 80;
function buildUi() {
uiBegin();
uiSlider("brightness", "Brightness", 0, 255, brightness);
uiButton("flash", "Flash");
}
function setup() {
buildUi();
}
function loop() {
uiPoll();
if (uiEventIs("hello")) buildUi();
if (uiChanged("brightness")) brightness = uiGet("brightness");
if (uiEventIs("press", "flash")) println("flash");
delay(20);
}