ENGLISH_PATTERN定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The English pattern, every card and two jokers, drawn in a box 360 by 540. About 700 kB, so it is its own entry point and is loaded only by a page that uses it.
インポート
import { ENGLISH_PATTERN } from "@johnmorrisdotca/toranpu/card-faces/english";
定義
const ENGLISH_PATTERN: CardDesign
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
name | string | The design's name, as |
box | readonly [number, number] | The width and height each card is drawn in. |
art | Readonly<Record<string, string>> | Each card's drawing, by its id. |
fallback (省略可) | CardDesign | undefined | Where the set has no drawing for a card, the set that draws it instead; then plain. |
draw (省略可) | ((card: string, context: { language: "en" | "ja"; }) => string | null) | undefined | Cards drawn by a function rather than from |
label (省略可) | ((card: string, language: "en" | "ja") => string | null | undefined) | undefined | What a screen reader says for a card of the set, in the language asked for; null or nothing for a card the set leaves to its usual name (a standard card), or to its id (any other). |
frame (省略可) | "paper" | "none" | undefined | How the card is framed. |
例
import { ENGLISH_PATTERN } from "@johnmorrisdotca/toranpu/card-faces/english";
console.log(ENGLISH_PATTERN.name);english出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。