TsunagiViewtype
A BIG BOARD LOOKED AT THROUGH A BOX: from 10×10 up, a phone's cells are
smaller than a thumb, so the board is drawn up to three times the box's width
and looked at through it, zoomed and moved by a pad of buttons, the wheel
and (while a line is dragged) the box's edge, never by scrolling the page.
This is only the arithmetic of the view; mountTsunagi does the rest.
A view is a zoom (1 is the whole board fitted to the box) and where the board's top left sits in the box, which is never past the box's own edges.
Import it
import type { TsunagiView } from "@johnmorrisdotca/tsunagi/play";
Definition
type TsunagiView = {
zoom: number;
x: number;
y: number;
};
Members
| Name | Type | Description |
|---|---|---|
zoom | number | |
x | number | |
y | number |
Examples
import type { TsunagiView } from "@johnmorrisdotca/tsunagi/play";
const value: TsunagiView = {zoom:1,x:0,y:0};
console.log(value);{ zoom: 1, x: 0, y: 0 }What it prints (run when this page was built)