@squid-dev/cc-web-term
Version:
A ComputerCraft terminal for the internet
18 lines (17 loc) • 1.04 kB
TypeScript
import { type Palette, type TerminalData } from "./data";
export type Font = {
path: string;
image: HTMLImageElement;
promise?: Promise<Font>;
scale: number;
margin: number;
paletteCache: Record<string, HTMLCanvasElement>;
};
export declare const cellWidth = 6;
export declare const cellHeight = 9;
export declare const terminalMargin = 4;
export declare const loadFont: (path: string) => Font;
export declare const background: (ctx: CanvasRenderingContext2D, x: number, y: number, color: string, scale: number, width: number, height: number, palette: Palette) => void;
export declare const foreground: (ctx: CanvasRenderingContext2D, x: number, y: number, color: string, chr: string, palette: Palette, scale: number, font: Font) => void;
export declare const terminal: (ctx: CanvasRenderingContext2D, term: TerminalData, blink: boolean, scale: number, font: Font) => void;
export declare const bsod: (ctx: CanvasRenderingContext2D, width: number, height: number, text: string, scale: number, font: Font) => void;