Reference · Options, materials, stacks and wear
StackPlacetype
Where one card of a stack lies, as the stack's layout says: how far it is nudged across and down, in card widths, and how far it is turned.
Import it
import type { StackPlace } from "@johnmorrisdotca/fuda-cards";
Definition
interface StackPlace {
x: number;
y: number;
rotate: number;
}
Members
| Name | Type | Description |
|---|---|---|
x | number | Across, in card widths from where a square card lies. |
y | number | Down, in card widths. |
rotate | number | Turn in degrees. |
Examples
import { stackLayout, type StackPlace } from "@johnmorrisdotca/fuda-cards";
const place: StackPlace = stackLayout(5, { seed: 3 })[0];
console.log(Object.keys(place)); // [ 'x', 'y', 'rotate' ][ 'x', 'y', 'rotate' ]What it prints (run when this page was built)