Skip to the content

Fuda Cards札

Collectible card frames for images and live 3D: a true thickness, an edge, foil, stacks, wear and a binder, as two web components.

Fuda is the Japanese word 札 for a card or a tag. About the name

Contents

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

NameTypeDescription
featuresWearFeatures

The marks of the card (see wearLayout).

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 false
true false

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/fuda-cards 0.11.0.