Reference · Cards, hands and piles
CardPlacetype
One card's place: across and down in card widths from where the first lies, and its turn in degrees.
Import it
import type { CardPlace } from "@johnmorrisdotca/toranpu/element";
Also exported from: @johnmorrisdotca/toranpu/element/define
Definition
type CardPlace = {
x: number;
y: number;
rotate: number;
};
Members
| Name | Type | Description |
|---|---|---|
x | number | |
y | number | |
rotate | number |
Examples
import type { CardPlace } from "@johnmorrisdotca/toranpu/element";
import { handLayout } from "@johnmorrisdotca/toranpu/element";
const value: CardPlace = handLayout(1)[0]!;
console.log(value);{ x: 0, y: 0, rotate: 0 }What it prints (run when this page was built)