zoomedAbout関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A view zoomed by factor about the point (px, py) of the box, which stays over the same spot of the board.
インポート
import { zoomedAbout } from "@johnmorrisdotca/tsunagi/play";
定義
function zoomedAbout(view: TsunagiView, factor: number, px: number, py: number, box: number): TsunagiView
引数
| 名前 | 型 | 説明 |
|---|---|---|
view | TsunagiView | The current zoom and pixel translation. |
factor | number | The positive zoom scale. |
px | number | The horizontal pointer position in pixels. |
py | number | The vertical pointer position in pixels. |
box | number | The available square view size or edge bounds. |
戻り値
TsunagiView
A view zoomed by factor about the point (px, py) of the box, which stays over the same spot of the board.
例
import { zoomedAbout } from "@johnmorrisdotca/tsunagi/play";
console.log(zoomedAbout({zoom:1,x:0,y:0},1.2,320,240,640));{ zoom: 1.2, x: -64, y: -48 }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。