本文へ移動

Suido水道

管を回してポンプと排水口をつなぎます。収録された問題やシード付きの問題で遊べます。

「水道」は、水を届ける設備を表す言葉です。 名前について(英語)

目次

リファレンス · SVGの盤

DrawOptions型

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

What to draw with.

インポート

import type { DrawOptions } from "@johnmorrisdotca/suido/draw";

定義

type DrawOptions = {
    masks?: readonly number[];
    quarters?: readonly number[];
    label?: string;
    style?: boolean;
    step?: number;
    water?: boolean;
};

メンバー

名前型説明
masks (省略可)readonly number[] | undefined

How every piece faces now; the board's own, if left out.

quarters (省略可)readonly number[] | undefined

How far each piece has been turned in all, so a drawing can keep turning the way it was tapped; found from masks if left out.

label (省略可)string | undefined

A description for screen readers.

style (省略可)boolean | undefined

Put SUIDO_STYLE inside the drawing, so it stands alone as an image. A page with the style in already leaves this off.

step (省略可)number | undefined

How long the water takes to go through one cell, in milliseconds. Default: fast enough that the whole board fills in about two seconds.

water (省略可)boolean | undefined

Whether to draw the water. Default true.

例

import type { DrawOptions } from "@johnmorrisdotca/suido/draw";

const value: DrawOptions = {label:"Sample",water:true};
console.log(value);
{ label: 'Sample', water: true }

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

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

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