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.
Full-rectangle fragment shader with configurable uniforms. Shader files are loaded from media/assets/.
Configuration
| Field | Description |
|---|---|
type | shader |
file | Fragment shader filename |
pos, size | Render rectangle |
uniforms | Object of initial float/int/bool/vector values |
time_uniform | Uniform automatically updated from runtime seconds |
audio_amplitude_uniform | Uniform fed from global audio amplitude |
audio_progress_uniform | Uniform fed from audio progress 0..1 |
audio_active_uniform | Integer uniform indicating active audio |
Copy-and-paste JSON
{
"type": "shader",
"id": "starfield",
"file": "stars.fs",
"pos": [0, 0],
"size": [1920, 1080],
"uniforms": {
"speed": 1.5,
"star_density": 0.5,
"brightness": 0.8
},
"layer": 0
}MQTT
ergs/rpi01/update/starfield {"speed":2.0,"brightness":1.0}
ergs/rpi01/cmd/starfield/uniform/speed 2.0
ergs/rpi01/cmd/shader/uniform/speed 2.0
ergs/rpi01/cmd/__shader__/uniform/speed 2.0