wearOutline関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The outline of a face as an SVG path in the 250 by 350 box, corners as worn.
インポート
import { wearOutline } from "@johnmorrisdotca/fuda-cards";
定義
function wearOutline(features: WearFeatures, face?: "front" | "back"): string
引数
| 名前 | 型 | 説明 |
|---|---|---|
features | WearFeatures | The marks of the card (see |
face (省略可) | "back" | "front" | Which face; the back's corners are the front's seen from behind. Unless said, the front. |
戻り値
string
The path's d attribute.
例
import { wearLayout, wearOutline, wearPreset } from "@johnmorrisdotca/fuda-cards";
const features = wearLayout(wearPreset("damaged")!.levels, 1);
console.log(wearOutline(features).startsWith("M"), wearOutline(features, "back") !== wearOutline(features)); // true truetrue true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。