Skip to the content

Taisen Brackets対戦

Knockout brackets as SVG, from a list of ties.

Taisen (対戦, たいせん) is Japanese for a matchup: two sides facing each other. About the name

Contents

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

NameTypeDescription
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 BACKGROUND_PRESETS.

optionsshared.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 true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/taisen-brackets 0.20.0.