LIVE WEB PLAYER
Loading WebAssembly…See it respond.
The same raylib runtime, compiled to WebAssembly. Load this example, inject MQTT messages and watch its published events.
MQTT I/O
Waiting for runtime…
The browser requires a user action before the scene is loaded. Click Load demo scene first. MQTT is emulated and never leaves this page. Shaders are disabled in the web build; GPIO is hardware-only.
Mouse/touch button. Publishes press/release states, can execute actions, and can be used directly in interactive_dialog.choice_input_ids.
Configuration
| Field | Description |
|---|---|
type | button |
text | Label |
texture, pressed_texture | Optional normal/pressed image assets |
font, font_size | TTF asset and pixel size |
text_color, pressed_text_color | Label colours |
bg_color, pressed_bg_color | Fill colours |
border_color, pressed_border_color | Border colours |
border_thickness | Border width |
on_press, on_release | Action chains |
Copy-and-paste JSON
{
"type": "button",
"id": "choice_a",
"pos": [120, 700],
"size": [760, 80],
"text": "A. Ask about the alibi",
"font": "Technology.ttf",
"font_size": 30,
"text_color": "#FFFFFFFF",
"bg_color": "#203050FF",
"pressed_bg_color": "#406090FF",
"border_color": "#58A6FFFF",
"pressed_border_color": "#FFFFFFFF",
"border_thickness": 2,
"on_press": "status_text.set('A selected')",
"layer": 3
}MQTT
Published topic: ergs/rpi01/status/choice_a/click
Press payload: ON
Release payload: OFF
ergs/rpi01/visible/choice_a OFF