本文へ移動

Fuda Cards札

画像やライブ3Dを入れるコレクション用のカード枠です。本物の厚み、縁、箔、山、傷み、バインダーを、2つのWebコンポーネントで使えます。

「札(ふだ)」は、カードや札を指す日本語です。 名前について(英語)

目次

リファレンス · 設定、素材、山、傷み

CardOptions型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

Every setting of <fuda-card> as an object. cardAttributes(options) turns it into the element's attributes, so the same object works in a framework, a script and a test.

インポート

import type { CardOptions } from "@johnmorrisdotca/fuda-cards";

定義

interface CardOptions {
    title?: string;
    category?: string;
    subtitle?: string;
    description?: string;
    number?: string;
    rarity?: string;
    variant?: CardVariant;
    finish?: CardFinish;
    thickness?: number;
    material?: string;
    stack?: number;
    stackMessiness?: number;
    stackSeed?: number;
    stackDepth?: number;
    wear?: string | number;
    wearSeed?: number;
    wearCorners?: number;
    wearEdges?: number;
    wearSurface?: number;
    wearCreases?: number;
    flipped?: boolean;
    motion?: "still" | "pan";
    playing?: boolean;
    autoplay?: "focus";
    panDirection?: "down" | "up";
    panLoop?: "alternate" | "restart";
    cardSpin?: "center" | "corner";
    cardSpinDirection?: "normal" | "reverse";
    cardSpinPaused?: boolean;
    cardView?: boolean;
    fan?: "open";
    takenOff?: number;
    deckLand?: "face-up" | "face-down";
    animate?: "on" | "off";
    speed?: "slow" | "normal" | "quick";
    pileControls?: boolean;
}

メンバー

名前型説明
title (省略可)string | undefined
category (省略可)string | undefined
subtitle (省略可)string | undefined
description (省略可)string | undefined
number (省略可)string | undefined
rarity (省略可)string | undefined
variant (省略可)CardVariant | undefined
finish (省略可)CardFinish | undefined
thickness (省略可)number | undefined

Card thickness in millimetres at the 63 mm wide card size; overrides the material's. Default 0.325, 0 for a flat card.

material (省略可)string | undefined

A material's id (see cardMaterials): its sourced thickness and edge colour.

stack (省略可)number | undefined

How many cards the stack holds (1 to 1000); the stack is that many times the card's thickness high. Default 1, one card.

stackMessiness (省略可)number | undefined

From 0 (squared up) to 1 (very messy) for the cards under the top one. Default 0.3.

stackSeed (省略可)number | undefined

The stack's seed: the same seed lays the same stack the same way. Default 1.

stackDepth (省略可)number | undefined

How many cards under the top one are laid out nudged and turned, at most 52. Default 10.

wear (省略可)string | number | undefined

A card that is not perfect: a preset's id (mint, near-mint, lightly-played, moderately-played, heavily-played, damaged) or a number from 0 to 1. Default: perfect, nothing drawn.

wearSeed (省略可)number | undefined

The wear's seed: the same seed draws the same marks the same way. Default 1.

wearCorners (省略可)number | undefined

One level of the wear on its own, from 0 to 1, over the preset's.

wearEdges (省略可)number | undefined
wearSurface (省略可)number | undefined
wearCreases (省略可)number | undefined
flipped (省略可)boolean | undefined

The card shows its back.

motion (省略可)"still" | "pan" | undefined
playing (省略可)boolean | undefined

The picture is moving now (needs motion: "pan").

autoplay (省略可)"focus" | undefined

focus: the card in focus animates its art (needs motion: 'pan'); never with reduced motion.

panDirection (省略可)"down" | "up" | undefined
panLoop (省略可)"alternate" | "restart" | undefined
cardSpin (省略可)"center" | "corner" | undefined
cardSpinDirection (省略可)"normal" | "reverse" | undefined
cardSpinPaused (省略可)boolean | undefined
cardView (省略可)boolean | undefined

The page turns the card with --fuda-yaw and --fuda-tilt instead of the built-in spin.

fan (省略可)"open" | undefined

open: a stack of more than one card fans open.

takenOff (省略可)number | undefined

How many cards are on the pile beside the stack.

deckLand (省略可)"face-up" | "face-down" | undefined

How a card taken off lands: face-up or turned over (face-down).

animate (省略可)"off" | "on" | undefined

off ends every move at once.

speed (省略可)"normal" | "slow" | "quick" | undefined

How long a move takes: slow, normal or quick.

pileControls (省略可)boolean | undefined

The three buttons under a stack: Fan, Take a card off and Put it back.

例

import { type CardOptions, cardAttributes } from "@johnmorrisdotca/fuda-cards";

const options: CardOptions = { title: "Explorer One", variant: "sport", stack: 10, wear: "near-mint" };
console.log(cardAttributes(options).variant); // sport
sport

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/fuda-cards 0.11.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。