Reference · Tile and table elements
SpinOptionstype
How a tile is spun.
Import it
import type { SpinOptions } from "@johnmorrisdotca/jarajara/element";
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/jarajara/element";
const value: SpinOptions = {direction:"clockwise",turns:1,ms:300};
console.log(value);{ direction: 'clockwise', turns: 1, ms: 300 }What it prints (run when this page was built)