Writing a sketch

Your own control panel

lil-gui and dat.GUI, kept off the wall and put on the surface.

If your sketch already has a lil-gui or dat.GUI panel, Sialk knows what to do with it.

Off the wall, in every edition

The panel is kept out of the picture the audience sees. Always, in every edition, including the beta. Your development controls do not end up projected onto a building.

You do not have to do anything to get this. Leave the panel in.

On the surface, from v1

From v1, Sialk also reads the panel and puts every control it can drive onto the parameters list, under the panel's own name, with the labels and ranges you gave them.

Bind them, modulate them, save them with the show. Your onChange runs exactly as it does when somebody drags the knob, so a panel that rebuilds geometry on change keeps working without modification.

Sialk works out each slider's range by asking the panel rather than guessing, and puts the control back where it found it.

What is left alone

A control with no range - gui.add(state, 'x') with no min and max, is left alone. There is no sensible fader to make from it, and inventing one would put a control on the surface whose ends mean nothing.

Give it a range and it appears:

gui.add(state, 'x', 0, 10);

Tweakpane panels are recognised but not yet playable.

Panel or declare?

Both work. They are for different moments.

  • The panel is what you already have, and it costs you nothing. Good for a sketch you are still writing.
  • declare() is explicit about what is meant to be played, in the order and with the labels you choose. Good for a sketch you are handing to someone, or to yourself in six months at a venue.

A sketch can do both.