Reference · Options, materials, stacks and wear
wearOverlaySvgfunction
The SVG laid over one face: whitening, folds, creases, scratches, specks, stain and toning. Markup only, no script.
Import it
import { wearOverlaySvg } from "@johnmorrisdotca/fuda-cards";
Definition
function wearOverlaySvg(features: WearFeatures, face?: "front" | "back"): string
Parameters
| Name | Type | Description |
|---|---|---|
features | WearFeatures | The marks of the card (see |
face (optional) | "back" | "front" | Which face. Unless said, the front. |
Returns
string
The <svg> markup, in the 250 by 350 box.
Examples
import { wearLayout, wearOverlaySvg, wearPreset } from "@johnmorrisdotca/fuda-cards";
const svg = wearOverlaySvg(wearLayout(wearPreset("near-mint")!.levels));
console.log(svg.startsWith("<svg"), /<script|onload/i.test(svg)); // true falsetrue falseWhat it prints (run when this page was built)