Reference · Options, materials, stacks and wear
WearFeaturestype
Every mark of a worn card: its corners, its centring, and the creases, scratches, specks and stain of each face.
Import it
import type { WearFeatures } from "@johnmorrisdotca/fuda-cards";
Definition
interface WearFeatures {
levels: WearLevels;
corners: WearCorner[];
centering: {
x: number;
y: number;
};
front: WearFace;
back: WearFace;
}
Members
| Name | Type | Description |
|---|---|---|
levels | WearLevels | |
corners | WearCorner[] | Top left, top right, bottom right, bottom left of the front. |
centering | { x: number; y: number; } | The print's shift off centre in pixels at 300 wide: x and y. |
front | WearFace | |
back | WearFace |
Examples
import { wearLayout, wearPreset, type WearFeatures } from "@johnmorrisdotca/fuda-cards";
const features: WearFeatures = wearLayout(wearPreset("moderately-played")!.levels, 2);
console.log(features.front.scratches.length > 0); // truetrueWhat it prints (run when this page was built)