Reference · Rules, tiles and records
fittedMostfunction
The largest a fitted tile is drawn in a table this big. tileMost in any
table up to growsFrom across its shorter side, which is every phone's and
the Regular desk table; past that, in proportion, so a table the player asked
to be Large or Full (BoardScale) draws bigger squares rather than only more
of them — never past what a hand may zoom to.
Import it
import { fittedMost } from "@johnmorrisdotca/kumimoji";
Definition
function fittedMost(width: number, height: number): number
Parameters
| Name | Type | Description |
|---|---|---|
width | number | The available viewport width in pixels. |
height | number | The available viewport height in pixels. |
Returns
number
The largest a fitted tile is drawn in a table this big. tileMost in any table up to growsFrom across its shorter side, which is every phone's and the Regular desk table; past that, in proportion, so a table the player asked to be Large or Full (BoardScale) draws bigger squares rather than only more of them — never past what a hand may zoom to.
Examples
import { fittedMost } from "@johnmorrisdotca/kumimoji";
console.log(fittedMost(640,480));56What it prints (run when this page was built)