loadCardDesign関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A design by its name, loaded when it is first asked for: "english" fetches
the English pattern (about 700 kB, 200 kB compressed) only then. "plain"
and "four-colour" are drawn here and need no loading; they give null. A
design the page registered under the name is given as it is.
インポート
import { loadCardDesign } from "@johnmorrisdotca/toranpu/card-faces";
定義
function loadCardDesign(name: CardDesignName | string): Promise<CardDesign | null>
引数
| 名前 | 型 | 説明 |
|---|---|---|
name | string | The registered card design or card-back name. |
戻り値
Promise<CardDesign | null>
A design by its name, loaded when it is first asked for: "english" fetches the English pattern (about 700 kB, 200 kB compressed) only then. "plain" and "four-colour" are drawn here and need no loading; they give null. A design the page registered under the name is given as it is.
例
import { loadCardDesign } from "@johnmorrisdotca/toranpu/card-faces";
console.log((await loadCardDesign("english"))?.name);english出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。