wearLayout関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Where every mark of a card lies. A pure function of the levels and the seed: no DOM, nothing at random, so the same seed lays the same marks every time.
インポート
import { wearLayout } from "@johnmorrisdotca/fuda-cards";
定義
function wearLayout(levels: WearLevels, seed?: number): WearFeatures
引数
| 名前 | 型 | 説明 |
|---|---|---|
levels | WearLevels | How much of each kind of wear (see |
seed (省略可) | number | The seed that lays the marks out. Unless said, 1. |
戻り値
WearFeatures
The corners, centring and marks of both faces.
例
import { wearLayout, wearPreset } from "@johnmorrisdotca/fuda-cards";
const levels = wearPreset("heavily-played")!.levels;
console.log(JSON.stringify(wearLayout(levels, 5)) === JSON.stringify(wearLayout(levels, 5))); // truetrue出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。