Reference · Options, materials, stacks and wear
wearOutlinefunction
The outline of a face as an SVG path in the 250 by 350 box, corners as worn.
Import it
import { wearOutline } from "@johnmorrisdotca/fuda-cards";
Definition
function wearOutline(features: WearFeatures, face?: "front" | "back"): string
Parameters
| Name | Type | Description |
|---|---|---|
features | WearFeatures | The marks of the card (see |
face (optional) | "back" | "front" | Which face; the back's corners are the front's seen from behind. Unless said, the front. |
Returns
string
The path's d attribute.
Examples
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 trueWhat it prints (run when this page was built)