Reference · Cards, hands and piles
HandLayoutOptionstype
How a hand is laid out.
Import it
import type { HandLayoutOptions } from "@johnmorrisdotca/toranpu/element";
Also exported from: @johnmorrisdotca/toranpu/element/define
Definition
type HandLayoutOptions = {
open?: number;
step?: number;
turn?: number;
peek?: number;
};
Members
| Name | Type | Description |
|---|---|---|
open (optional) | number | undefined | How far open, from 0 (squared up: only the top card shows) to 1 (a clear fan). Unless said, 1. |
step (optional) | number | undefined | How far apart neighbours lie when the hand is open, in card widths. Unless said, 0.42. |
turn (optional) | number | undefined | How far the cards turn across the whole fan when it is open, in degrees. Unless said, 4 a card, at most 40. |
peek (optional) | number | undefined | How much of each card under the top one still shows when the hand is squared up, in card widths. Unless said, 0.04. |
Examples
import type { HandLayoutOptions } from "@johnmorrisdotca/toranpu/element";
const value: HandLayoutOptions = { open: 1, step: 30 };
console.log(value.open);1What it prints (run when this page was built)