web library


BaseModal<T extends InputBase>
Panel with a rendered border, which can be of several types (see PanelBorder).
Base class for a renderer that draws on an HTML5 html.CanvasElement
A RenderableTerminal that uses an HTML5 html.CanvasElement to render the underlying Terminal using an implementation of CanvasRenderer.
Immutable character intended to be written to a Terminal
A Terminal representing a subset of a parent Terminal. Will always be fully-enclosed by the parent terminal. Useful for drawing UI elements without needing to keep track of offsets.
Basic set of colors and color utilities
Renders characters to a CanvasTerminal using normal fonts and text drawing. Can draw any character supported by the supplied font. This renderer works best if you keep the scale at 1 and instead adjust the pixel size of the supplied font string based on the device pixel density.
Special type of Panel using a PanelBorder.frame border that renders a title near the top-right corner.
Renders characters to a CanvasTerminal using bitmap glyphs. The renderer must be supplied with a mapping between supported characters and the glyphs. This renderer works best when supplied with an appropriate pixel density scale.
KeyBindings<T extends InputBase>
Set of key bindings that map a particular keyboard input (including modifiers) to some logical input.
Set of recognized key codes from browser KeyboardEvents
Layer<T extends InputBase>
Each Layer in the UserInterface can manage different aspects of the overall game. For instance, one layer for the game map, one layer for an information side panel, another layer for each different pop-up, etc. Layers can be opaque or transparent to control how far down the UserInterface's stack of Layers the game gets rendered.
Base panel class, with no border and optional padding and background
RenderableTerminal<T extends Renderer>
A virtual terminal screen that can have character data written onto it
UserInterface<T extends InputBase>
Modal user interface that maintains a stack of UI Layers and writes them to a Terminal. The UI manages the main game loop and renders as efficiently as possible based on the state of the Layer stack.


defaultUnicodeMap → const Map<int, int>
Mapping of Unicode codepoints to the built-in codepage 437 glyph index.
{CharCode.whiteSmilingFace : 1, CharCode.blackSmilingFace : 2, CharCode.blackHeartSuit : 3, CharCode.blackDiamondSuit : 4, CharCode.blackClubSuit : 5, CharCode.blackSpadeSuit : 6, CharCode.bullet : 7,…


Panel border types