UNPKG

malwoden

Version:

![alt text](./coverage/badge-lines.svg) ![alt text](./coverage/badge-statements.svg) ![alt text](./coverage/badge-functions.svg) ![alt text](./coverage/badge-branches.svg)

30 lines (29 loc) 963 B
import { TerminalConfig, BaseTerminal } from "./terminal"; import { Glyph } from "./glyph"; import { Vector2 } from "../struct/vector"; interface RetroTerminalConfig extends TerminalConfig { charWidth: number; charHeight: number; imageURL: string; mountNode?: HTMLElement; } export declare class RetroTerminal extends BaseTerminal { private readonly _display; private readonly _canvas; private readonly _context; private readonly _font; private readonly _fontColorCache; private readonly _scale; private _imageLoaded; private readonly _charWidth; private readonly _charHeight; constructor(config: RetroTerminalConfig); drawGlyph(pos: Vector2, glyph: Glyph): void; private getWidthInTiles; render(): void; windowToTilePoint(pixel: Vector2): Vector2; private getColorFont; /** Deletes the terminal, removing the canvas. */ delete(): void; } export {};