Skip to the content

Suido水道

Turn pipes to connect the pumps and drains, through fixed levels or seeded puzzles.

Suido means water supply in Japanese. About the name

Contents

Reference · SVG board

drawPiecefunction

One piece on its own, as SVG text: for a legend, an icon, or a page that shows how the pieces look. wet fills it with water.

Import it

import { drawPiece } from "@johnmorrisdotca/suido/draw";

Definition

function drawPiece(mask: number, options?: { wet?: boolean; label?: string; style?: boolean; }): string

Parameters

NameTypeDescription
masknumber

A pipe mask: north 1, east 2, south 4 and west 8.

options (optional){ wet?: boolean; label?: string; style?: boolean; }

Drawing, mounting or generator choices specified by the signature.

Returns

string

One piece on its own, as SVG text: for a legend, an icon, or a page that shows how the pieces look. wet fills it with water.

Examples

import { drawPiece } from "@johnmorrisdotca/suido/draw";

console.log(drawPiece(3,{label:"Elbow"}).startsWith("<svg"));
true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/suido 1.7.0.