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

squareUnderfunction

The square under a point on the screen.

Import it

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

Definition

function squareUnder(view: View, px: number, py: number): { row: number; col: number; }

Parameters

NameTypeDescription
viewView

The current tile size and pixel translation.

pxnumber

The horizontal pointer position in pixels.

pynumber

The vertical pointer position in pixels.

Returns

{ row: number; col: number; }

The square under a point on the screen.

Examples

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

const view = {tile:40,x:100,y:100};
console.log(squareUnder(view,100,100));
{ row: 0, col: 0 }

What it prints (run when this page was built)

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