Multiply the already-composited canvas alpha by an edge mask. Default
(arg0 == 0): horizontal, w is the fade width at both side edges.
arg0 == 1: a vertical band — alpha ramps in over w px from y and,
when h > 0, ramps out over w px approaching y + h, hiding content
scrolled toward the top or bottom. Fixed overlays emitted after this
command remain unaffected.
One infinite 2D grid evaluated by the renderer. x/y are the projected
world origin, w is screen-space spacing, h is line thickness, color
is the minor grid color, arg0 is the major-axis color, and arg1 is the
horizontal edge-fade width as f32::to_bits().
A finite, dense canvas field evaluated in O(pixels), not O(items). x/y
are the projected origin, w/h are projected item spacing, arg0 packs
columns/rows as two u16s, and arg1 is a deterministic visual seed.
Individual high-detail items can be layered above this persistent field.
A dot-matrix ring gauge evaluated in O(pixels), like the grid and tile
field. x/y are the center, w the ring radius, h the dot radius,
color the base dot color, arg0 the accent color, and arg1 the fill
fraction in [0, 1] as f32::to_bits() — accent dots sweep clockwise from
12 o’clock up to the fraction.
Dot-matrix text: the built-in 5x7 font rendered as round dots on a
lattice (flip-dot/LED style), with faint “off” dots filling each glyph
cell. x/y are the top-left, w the dot pitch in pixels, h the dot
radius, color the lit dot color; arg0/arg1 address UTF-8 bytes in
the scene text buffer exactly like TEXT. Advance is 6 dots per glyph.
Wall-clock anchor, sent once at startup in interactive mode: x is the
host’s local seconds since midnight when the surface started, y is
reserved. A clock guest shows (x + time_ms / 1000) % 86400. Headless
runs never send it, so renders stay deterministic; guests keep a fixed
demo time as the fallback.
Activate one named layer from host chrome: x is the layer index from the
guest’s surface_layers_ptr list. The guest decides how activation changes
its application state or view.
Submit the host-collected input string as a new list entry. The host’s
terminal-cell input field owns all editing; on Enter it writes the final
UTF-8 string through surface_input_ptr/surface_input_set and sends
this event with x = byte length. Hosts never deliver per-keystroke
composer state.
Toggle one row of the guest’s cell list (host-rendered terminal-cell
rows over the surface): x is the row index from surface_list_ptr,
y packs the toggled control’s logical-pixel center as (x << 16) | y
so the guest can anchor pixel effects (sparkles) to the cell the user
clicked. Input UI is cells; the surface below draws only effects.
Native renderer capabilities, sent once before the first frame. x is a
bitset of RENDER_CAPABILITY_* values and y is reserved. Guests must
retain a portable fallback because older hosts do not send this event.
The terminal’s color scheme, sent after the host queries the real
background (OSC 11) at startup. x is 1 for a light background and 0
for dark; y packs the background as 0xRRGGBB. Guests that ignore it
keep their dark-scheme defaults.
Jump the canvas zoom to an absolute level, anchored at the viewport
center. x is the percent (100 = 1:1); x <= 0 requests fit-all. Hosts
send it from chrome such as the terminal-cell zoom dropdown; guests that
expose surface_zoom_percent should handle it.
Host-lowered antialiased text run. Guests must never emit this directly;
they emit TEXT, and the host lowers it against its glyph atlas before
upload. arg0 is the first glyph-entry index, arg1 the entry count, and
x/y/w/h become the run’s culling bounds in pixels.
Host-lowered cached RGBA content. Guests must never emit this directly;
a native host lowers its own payload commands into these draws and
uploads the backing pixels via the renderer’s upload_pixel_atlas.
arg0 is a byte offset in that host-owned atlas and arg1 packs the
source dimensions. It intentionally shares IMAGE_RGBA’s sampling contract.
Guest-owned RGBA pixels revealed through a deterministic animated noise
mask. Payload and destination geometry are identical to IMAGE_RGBA.
color packs effect state as reveal:u8 | frame:u8 | seed:u16 from most
to least significant bits. Hosts evaluate the mask while sampling, so a
guest can keep one stable image buffer instead of rebuilding dithered
pixels every frame.
Composite one host-owned mesh resource into a 3D viewport. arg0 is an
opaque handle granted by the host; model bytes never enter guest memory.
The command rectangle is the destination viewport and arg1 is reserved.
A bounded native-rendered 3D scene packet. arg0 is the guest byte
pointer and arg1 is its byte length. The command rectangle is the
viewport. Ordinary 2D commands emitted before it show through transparent
scene pixels; commands emitted afterward layer above it.
Declare a portable, renderer-owned view gesture for the current scene.
This command draws no pixels. arg0 is one of the VIEW_GESTURE_*
modes. A connected presenter may preview that gesture against its retained
scene locally, then send one endpoint-equivalent commit to the
authoritative app when the pointer is released.