Reference · Backgrounds for a bracket
BackgroundSvgtype
A drawn background: the defs and the body to put in an SVG, and the ink that reads over it.
Import it
import type { BackgroundSvg } from "@johnmorrisdotca/taisen-brackets/backgrounds";
Also exported from: @johnmorrisdotca/taisen-brackets
Definition
type BackgroundSvg = shared.BackgroundSvg;
Members
| Name | Type | Description |
|---|---|---|
defs | string | |
body | string | |
ink | shared.BackgroundInk |
Examples
import { backgroundSvg, type BackgroundSvg } from "@johnmorrisdotca/taisen-brackets/backgrounds";
const picture: BackgroundSvg = backgroundSvg("pitch", { width: 400, height: 300 });
console.log(typeof picture.defs, picture.body.startsWith("<"));string trueWhat it prints (run when this page was built)