Reference · Draw a bracket, a table or a road to the final
ResolvedBackgroundtype
A background ready to put in a drawing: its definitions, its body and the ink that reads over it.
Import it
import type { ResolvedBackground } from "@johnmorrisdotca/taisen-brackets";
Definition
interface ResolvedBackground {
defs: string;
body: string;
inks: BackgroundInks;
auto: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
defs | string | For the drawing's |
body | string | Drawn over the plain |
inks | BackgroundInks | The colours to draw over it: one for a look that is light or dark, both for |
auto | boolean | Both pictures are in the drawing and the stylesheet shows the one that fits. |
Examples
import { resolveBackground } from "@johnmorrisdotca/taisen-brackets";
const picture = resolveBackground("midnight", "dark", 1200, 675, "tb");
console.log(picture?.auto, picture?.body.length);false 308What it prints (run when this page was built)