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

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

NameTypeDescription
defsstring
bodystring
inkshared.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 true

What it prints (run when this page was built)

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