WearFeatures型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Every mark of a worn card: its corners, its centring, and the creases, scratches, specks and stain of each face.
インポート
import type { WearFeatures } from "@johnmorrisdotca/fuda-cards";
定義
interface WearFeatures {
levels: WearLevels;
corners: WearCorner[];
centering: {
x: number;
y: number;
};
front: WearFace;
back: WearFace;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
levels | WearLevels | |
corners | WearCorner[] | Top left, top right, bottom right, bottom left of the front. |
centering | { x: number; y: number; } | The print's shift off centre in pixels at 300 wide: x and y. |
front | WearFace | |
back | WearFace |
例
import { wearLayout, wearPreset, type WearFeatures } from "@johnmorrisdotca/fuda-cards";
const features: WearFeatures = wearLayout(wearPreset("moderately-played")!.levels, 2);
console.log(features.front.scratches.length > 0); // truetrue出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。