本文へ移動

Fuda Cards札

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

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

目次

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

StackLayoutOptions型

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

How a stack is laid out: how messy, from which seed and how many cards deep.

インポート

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

定義

interface StackLayoutOptions {
    messiness?: number;
    seed?: number;
    depth?: number;
}

メンバー

名前型説明
messiness (省略可)number | undefined

From 0 (squared up) to 1 (very messy). Unless said, 0.3.

seed (省略可)number | undefined

The stack's own seed: the same seed lays the same stack the same way. Unless said, 1.

depth (省略可)number | undefined

How many cards under the top one are laid out at most, so a stack of 52 costs no more than one of 11. Unless said, 10.

例

import { stackLayout, type StackLayoutOptions } from "@johnmorrisdotca/fuda-cards";

const messy: StackLayoutOptions = { messiness: 0.8, seed: 7, depth: 5 };
console.log(stackLayout(52, messy).length); // 5
5

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

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

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