Skip to the content

Kumimoji組み文字

Build crosswords from seeded English or Japanese tile bags, alone or at a shared table.

Kumimoji means assembled characters in Japanese. About the name

Contents

Reference · Rules, tiles and records

zoomViewfunction

Zoomed by factor about the point (px, py) on the screen, which stays over the same spot of the table.

Import it

import { zoomView } from "@johnmorrisdotca/kumimoji";

Definition

function zoomView(view: View, factor: number, px: number, py: number): View

Parameters

NameTypeDescription
viewView

The current tile size and pixel translation.

factornumber

The positive scale factor for zooming.

pxnumber

The horizontal pointer position in pixels.

pynumber

The vertical pointer position in pixels.

Returns

View

Zoomed by factor about the point (px, py) on the screen, which stays over the same spot of the table.

Examples

import { zoomView } from "@johnmorrisdotca/kumimoji";

const view = {tile:40,x:100,y:100};
console.log(zoomView(view,1.2,320,240));
{ tile: 48, x: 56, y: 72 }

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kumimoji 1.6.0.