Reference · Backgrounds for a bracket
backgroundSvgfunction
Draws one of the poster backgrounds.
Import it
import { backgroundSvg } from "@johnmorrisdotca/taisen-brackets/backgrounds";
Also exported from: @johnmorrisdotca/taisen-brackets
Definition
function backgroundSvg(preset: BackgroundPresetName, options: BackgroundSvgOptions): BackgroundSvg
Parameters
| Name | Type | Description |
|---|---|---|
preset | "midnight" | "crimson" | "royal" | "emerald" | "pitch" | "ice" | "hardwood" | "infield" | "turf" | "ball-panels" | "swirl" | "waves" | "glow" | "floodlights" | "confetti" | "carbon" | "aurora" | "sunburst" | "chevrons" | "halftone" | "argyle" | "contour" | "stardust" | "mesh" | "spotlight" | The background's name, from |
options | shared.BackgroundSvgOptions | The size, the theme and the tuning. |
Returns
shared.BackgroundSvg
The picture's parts and the ink that reads over it.
Examples
import { backgroundSvg } from "@johnmorrisdotca/taisen-brackets/backgrounds";
const { body, ink } = backgroundSvg("midnight", { width: 1200, height: 675, theme: "dark" });
console.log(body.length > 0, ink.dark);true trueWhat it prints (run when this page was built)