TsunagiView型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 type { TsunagiView } from "@johnmorrisdotca/tsunagi/play";
定義
type TsunagiView = {
zoom: number;
x: number;
y: number;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
zoom | number | |
x | number | |
y | number |
例
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 }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。