Search Docs
Loading...
Skip to content

Interface: TerminalCanvasOptions

Properties#

Property Type Description
output? TerminalOutput Where frames are written. Defaults to process.stdout.
input? TerminalInput Where input wakeups are read from. Defaults to process.stdin.
maxFps? number Idle cadence ceiling in frames per second, not a target. Defaults to 30.
compress? boolean zlib-compress the payload (kitty o=z); a flat canvas compresses roughly tenfold. Defaults to true.
compressLevel? number zlib level 1-9, default 1. The encode shares the thread with update(), so the level is a frame-rate ceiling.
originRow? number The 1-based row the image starts on, so a host can paint chrome above it. Defaults to 1.
viewport? CellRect (() => CellRect)
originCol? number The 1-based column the image starts on. Defaults to 1.
imageId? number Kitty image id to own. Defaults to 1.
pixelRatio? number Device pixel ratio to render at. Defaults to 1.
size? object Fixed surface size in pixels, skipping terminal measurement.
size.width number -
size.height number -
cellSize? object Pixel size of one terminal cell. Defaults to CELL_W/CELL_H, then to 8x16.
cellSize.width number -
cellSize.height number -
maxPixels? number Pixels rendered per frame, default 480_000. Every frame goes over the wire whole, so this is bandwidth, not layout.
fit? (width, height) => void Fit the scene once the surface has a size: the camera is 1x1 until the first requestFrame.
forwardInput? boolean Forward mouse and keyboard into the engine. Needs raw mode, which the host owns. Defaults to true.
claimKeys? readonly string[] (() => Iterable<string>)
onWheel? (event) => void Handle a wheel turn in the host instead of the engine. Without it, the engine pans, and zooms while Ctrl is held.
fullscreen? boolean Use the alternate screen buffer and hide the cursor. Defaults to true.