Esacode

Docs / Blocks / Visualizers

Controls

Buttons, sliders, switches, text boxes and boards of cells that send commands to the blocks of a running run.

A view in the browser (JavaScript) Visualizers Version 1.1 Code you can open and adapt

How it works

List the controls, one per line: button Your move · slider speed 0 200 100 · switch pen · text say · select mode slow,fast · grid cell 3x3 board.matrix 1=X -1=O (a board of cells showing the matrix of the newest board item of the connected data; a click on a free cell sends cell = its number, 1 at the top left) · show say.text (the newest value of a channel, large).

Buttons next to each other share a row; the values chosen come back when the view is shown again. While a run goes on, each use sends a message on the channel named below with {"control": name, "value": value}; a block reads it in Python with for m in ctx.messages("control"): m["data"]["control"], m["data"]["value"]. Messages reach the blocks within about a second.

A worker block's live telemetry can be connected to show its answers under the controls.

Inputs

InputTakesWhat it is
Answers
data
StreamOptional: the newest item of each channel is shown under the controls Optional. Takes several connections.

Settings

SettingDefaultWhat it does
Controls
controls
button Start · button Stop · slider speed 0 200 100 · switch pen · text say One per line: button LABEL · slider NAME MIN MAX START · switch NAME · text NAME · select NAME a,b,c · grid NAME 3x3 CHANNEL.FIELD 1=X -1=O · show CHANNEL.FIELD
Channel
channel
control
Only to the block
to
empty A block's id on the grid; empty = every running block

Where it runs

In the browser, on the flow's View page and in the run's results, in a sandbox without network access. It needs no worker.

More in Visualizers