Reference · Options, materials, stacks and wear
wearLayoutfunction
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 it
import { wearLayout } from "@johnmorrisdotca/fuda-cards";
Definition
function wearLayout(levels: WearLevels, seed?: number): WearFeatures
Parameters
| Name | Type | Description |
|---|---|---|
levels | WearLevels | How much of each kind of wear (see |
seed (optional) | number | The seed that lays the marks out. Unless said, 1. |
Returns
WearFeatures
The corners, centring and marks of both faces.
Examples
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))); // truetrueWhat it prints (run when this page was built)