Skip to the content

Tsunagi繋ぎ

Join each pair with a separate line and fill the board, through fixed levels or seeded puzzles.

Tsunagi means joining in Japanese. About the name

Contents

Reference · Playable board

zoomedAboutfunction

A view zoomed by factor about the point (px, py) of the box, which stays over the same spot of the board.

Import it

import { zoomedAbout } from "@johnmorrisdotca/tsunagi/play";

Definition

function zoomedAbout(view: TsunagiView, factor: number, px: number, py: number, box: number): TsunagiView

Parameters

NameTypeDescription
viewTsunagiView

The current zoom and pixel translation.

factornumber

The positive zoom scale.

pxnumber

The horizontal pointer position in pixels.

pynumber

The vertical pointer position in pixels.

boxnumber

The available square view size or edge bounds.

Returns

TsunagiView

A view zoomed by factor about the point (px, py) of the box, which stays over the same spot of the board.

Examples

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 }

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/tsunagi 1.7.0.