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

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

NameTypeDescription
levelsWearLevels

How much of each kind of wear (see wearLevels).

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))); // true
true

What it prints (run when this page was built)

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