Reference · SVG boards and notation
boardSizefunction
The width and height the board is drawn in, which is the other way about when it stands up.
Import it
import { boardSize } from "@johnmorrisdotca/sugoroku/draw";
Definition
function boardSize(options: Pick<BoardOptions, "cube" | "orientation">): { width: number; height: number; }
Parameters
| Name | Type | Description |
|---|---|---|
options | Pick<BoardOptions, "cube" | "orientation"> | Native drawing, geometry, mounting or computer choices specified by the signature. |
Returns
{ width: number; height: number; }
The width and height the board is drawn in, which is the other way about when it stands up.
Examples
import { boardSize } from "@johnmorrisdotca/sugoroku/draw";
console.log(boardSize({cube:true,orientation:"landscape"}));{ width: 976, height: 552 }What it prints (run when this page was built)