Reference · Backgrounds for a bracket
BackgroundSvgOptionstype
What a background is drawn for: its width and height, the theme, colours, angle, intensity and seed.
Import it
import type { BackgroundSvgOptions } from "@johnmorrisdotca/taisen-brackets/backgrounds";
Also exported from: @johnmorrisdotca/taisen-brackets
Definition
type BackgroundSvgOptions = shared.BackgroundSvgOptions;
Members
| Name | Type | Description |
|---|---|---|
width | number | |
height | number | |
theme (optional) | "light" | "dark" | undefined |
|
colors (optional) | readonly string[] | undefined | Your own colours, as hex ( |
angle (optional) | number | undefined | The angle of the ground's gradient and of the pattern over it, in degrees as CSS has it (180 is top to bottom). The preset's own by default; a playing surface keeps its lines straight. |
intensity (optional) | number | undefined | How strong the pattern and glow are, 0 to 1. Default 0.6. |
seed (optional) | number | undefined | Moves the scattered parts (confetti, stars, scratches, contours). Default 1. |
id (optional) | string | undefined | The prefix of the ids the background writes. Default: a hash of its options. Only letters, digits, |
Examples
import { backgroundSvg, type BackgroundSvgOptions } from "@johnmorrisdotca/taisen-brackets/backgrounds";
const options: BackgroundSvgOptions = { width: 1200, height: 675, theme: "dark", seed: 3 };
console.log(backgroundSvg("aurora", options).ink.dark);trueWhat it prints (run when this page was built)