BackgroundSvgOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What a background is drawn for: its width and height, the theme, colours, angle, intensity and seed.
インポート
import type { BackgroundSvgOptions } from "@johnmorrisdotca/taisen-brackets/backgrounds";
ほかのエクスポート元: @johnmorrisdotca/taisen-brackets
定義
type BackgroundSvgOptions = shared.BackgroundSvgOptions;
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
width | number | |
height | number | |
theme (省略可) | "light" | "dark" | undefined |
|
colors (省略可) | readonly string[] | undefined | Your own colours, as hex ( |
angle (省略可) | 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 (省略可) | number | undefined | How strong the pattern and glow are, 0 to 1. Default 0.6. |
seed (省略可) | number | undefined | Moves the scattered parts (confetti, stars, scratches, contours). Default 1. |
id (省略可) | string | undefined | The prefix of the ids the background writes. Default: a hash of its options. Only letters, digits, |
例
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);true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。