本文へ移動

Kumimoji組み文字

シードから配った英字やかなのタイルで、ひとりでも複数人の卓でも、単語を組み合わせて遊べます。

「組み文字」は文字を組み合わせることを表す言葉です。 名前について(英語)

目次

リファレンス · ルール・タイル・記録

turnView関数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

A view the player zoomed or panned, turned a quarter clockwise with the table about the middle of its box: the same zoom, and the spot of the table that was in the middle stays there. (A fitted view simply fits again.)

On the screen a square's corner is x + col * tile; the turn takes a point (row v, col u) of the table to (row u, col 1 - v), which is a quarter turn about the middle of square (0, 0) — the same turn as turnPlace.

インポート

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

定義

function turnView(view: View, width: number, height: number): View

引数

名前型説明
viewView

The current tile size and pixel translation.

widthnumber

The available viewport width in pixels.

heightnumber

The available viewport height in pixels.

戻り値

View

A view the player zoomed or panned, turned a quarter clockwise with the table about the middle of its box: the same zoom, and the spot of the table that was in the middle stays there. (A fitted view simply fits again.)

例

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

const view = {tile:40,x:100,y:100};
console.log(turnView(view,640,480));
{ tile: 40, x: 420, y: 20 }

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/kumimoji 1.6.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。