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

Collections and piles: pure helpers

import { … } from "@johnmorrisdotca/fuda-cards/collection";

Exports

NameKindWhat it is
CollectionCardtypeOne item of a collection: an id, a name, the front's picture, optionally the back's, its kind and its metadata.
CollectionKindtypeWhat an item is.
collectionKindsconstantThe two kinds of item, card and object.
CollectionMetadatatypeWhat a collector writes about a card: its set, year, number, edition, condition, grade, quantity and notes.
CollectionViewtypeThe name of a display of <fuda-collection>: the view attribute's values.
collectionViewAliasesconstantDisplay names that earlier versions accepted and that now open another display, so a page that sets them keeps working.
collectionViewsconstantThe ten displays, in the order the buttons show them, each with the label on its button.
DeckLandingtypeHow a card taken off a pile lands on the pile at its side: still facing up, or turned over sideways (as a person turns a card, like a page) to show its back.
deckLandingsconstantThe two ways a card can land, with the label on each button: face-up (still facing up) and face-down (turned over sideways on the way).
fanLayoutfunctionWhere the cards of a fan lie: each card turns eleven degrees more than the one before, up to 110 degrees from the first to the last, centred on the pile.
FanPlacetypeWhere one card of a fan lies, first card on the left when open and on top when closed.
isCardfunctionWhether an item is a card: anything that does not say it is an object.
movePagefunctionThe first card of the page that is delta pages away, wrapping round at either end.
normalizeLandingfunctionThe landing a value means: face-down (also upside-down and turned-over) is turned over; anything else is still facing up.
parseCollectionfunctionCheck a collection and make it the shape the element draws: an array of cards, or an object with a cards array.
randomDrawIndexfunctionChoose a card whose name contains the filter, avoiding the current card when another match exists.

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