Create a WebGLTerminalCanvas. Default parameters:
{
canvas: REQUIRED,
background: '#FFF',
font: { image: `${builtin}`, charSize: [8, 8], gridSize: [...] },
bufferSize: [80, 25],
zoom: 1,
}
Set a cell of the terminal canvas to a given character, foreground color, and background color.
For WebGLTerminalCanvas, this immediately renders the character to the canvas.
The logical X coordinate of the character cell to render to. 0 is the leftmost column.
The logical Y coordinate of the character cell to render to. 0 is the topmost row.
The character to render to the cell. Technically, you could pass a whole string here, but it will be centered within and clipped to the cell boundaries.
A foreground style string such as '#FFF' to render the character with.
A background style string such as '#000' to fill the background of the cell with. This is expected to be an opaque color.
Render to the underlying canvas. May fail (and return false) if the font hasn't been loaded yet.
You can simply retry on another frame if this occurs. Will return true on success.
Generated using TypeDoc
A write-only terminal canvas that uses the 2d canvas text rendering APIs to display text.