本文へ移動

Jarajaraジャラジャラ

麻雀牌を描き、手牌や積み重ねた盤を配置し、シード付きの「合わせ」をひとりでも対戦卓でも遊べます。

「ジャラジャラ」は麻雀牌が触れ合う音を表す言葉です。 名前について(英語)

目次

リファレンス · SVGの図柄と見た目

TileSvgOptions型

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

How a tile on its own is drawn.

インポート

import type { TileSvgOptions } from "@johnmorrisdotca/jarajara/faces";

定義

type TileSvgOptions = {
    design?: TileDesign;
    red?: boolean;
    title?: string;
    flat?: boolean;
    bare?: boolean;
    mirror?: TileMirror;
};

メンバー

名前型説明
design (省略可)TileDesign | undefined

A design's drawing instead of Jarajara's own.

red (省略可)boolean | undefined

The red five of a design that has one, for a five.

title (省略可)string | undefined

What a screen reader says. Unless said, the tile's name in English. An empty string makes the picture decoration.

flat (省略可)boolean | undefined

The old look: the face with a sliver of its side, in the 32 by 42 box. Unless said, the tile is drawn solid.

bare (省略可)boolean | undefined

Only the face, no thickness, in a box of exactly 30 by 40: for a page that gives the tile its thickness itself, as the turning elements do.

mirror (省略可)"none" | "horizontal" | "vertical" | "both" | undefined

Which way the thickness shows. Unless said, below and to the left.

例

import type { TileSvgOptions } from "@johnmorrisdotca/jarajara/faces";

const value: TileSvgOptions = {title:"One of characters",mirror:"horizontal"};
console.log(value);
{ title: 'One of characters', mirror: 'horizontal' }

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

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

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