backgroundSvg関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Draws one of the poster backgrounds.
インポート
import { backgroundSvg } from "@johnmorrisdotca/taisen-brackets/backgrounds";
ほかのエクスポート元: @johnmorrisdotca/taisen-brackets
定義
function backgroundSvg(preset: BackgroundPresetName, options: BackgroundSvgOptions): BackgroundSvg
引数
| 名前 | 型 | 説明 |
|---|---|---|
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. |
戻り値
shared.BackgroundSvg
The picture's parts and the ink that reads over it.
例
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出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。