Reference · Cards, hands and piles
SpinOptionstype
How a card is spun.
Import it
import type { SpinOptions } from "@johnmorrisdotca/toranpu/element";
Also exported from: @johnmorrisdotca/toranpu/element/define
Definition
type SpinOptions = {
direction?: "clockwise" | "anticlockwise";
turns?: number;
ms?: number;
};
Members
| Name | Type | Description |
|---|---|---|
direction (optional) | "clockwise" | "anticlockwise" | undefined | Which way it spins. Unless said, clockwise. |
turns (optional) | number | undefined | How many whole turns before it comes to rest where it lay. Unless said, 3; at most 20. |
ms (optional) | number | undefined | How long the spin takes, in milliseconds. Unless said, 700 and 420 a turn. |
Examples
import type { SpinOptions } from "@johnmorrisdotca/toranpu/element";
const value: SpinOptions = { direction: "clockwise", turns: 1, ms: 300 };
console.log(value.turns);1What it prints (run when this page was built)