本文へ移動

Meikyuu迷宮

シード付きの迷路と矢印パズルを作り、番号付きの問題を進め、平面や立体表面で遊べます。

「迷宮」は迷路のように入り組んだ場所を表す言葉です。 名前について(英語)

目次

リファレンス

SVGの盤

import { … } from "@johnmorrisdotca/meikyuu/draw";

最小化と gzip 圧縮をしたサイズは 8.7 kB(読み込むものをすべて含み、esbuild で計測)

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

Meikyuu's drawing: a maze or an arrow board as SVG text, with its boards, its line colours, the style that gives the drawing its look, and the words it says in English and Japanese. A separate entry (@johnmorrisdotca/meikyuu/draw), so a server that only builds mazes never loads any of it.

エクスポート

名前種類概要
arrowColour関数The colour of arrow number id.
arrowMarkup関数The arrow's picture: its stem, its head, and a padlock if it is locked.
boardLookOf関数The look a board name or board object means.
doorPlace関数Where a door is: the middle of its gap in the wall, and the way out through it as a unit vector.
drawArrows関数Render the native arrow board, locked/present arrows and optional hint as SVG text.
DrawArrowsOptions型AN ARROW BOARD AS SVG TEXT: a faint dot on every cell of the picture, and each arrow on it as a line through its cells with a head at the end it points from.
drawMaze関数The maze as SVG text.
DrawMazeOptions型Native maze appearance, current trail, collected keys, stones, hints, label and SVG presentation choices.
fixed関数A number as short text: two decimals at most, so a drawing is small.
framed関数The rectangle to look at to see the whole of a shape with a margin of pad cells.
linePath関数A line through the middles of the cells, in order.
lookAttributes関数The attributes (as text) that make an element a Meikyuu drawing: its class, its look, and its custom properties.
lookStyle関数The inline custom properties a look needs: none for plain paper with the default line, which the style gives.
marksOf関数The marks on a maze: the start, the goal or exit, the doors and the keys, as SVG.
MazeLook型What a maze looks like: every option that does not depend on where the line is.
MEIKYUU_ARROW_COLOURS定数The colours of each arrow on an arrow board, in turn.
MEIKYUU_BOARD_NAMES定数The supported named native maze board appearances.
MEIKYUU_BOARDS定数The paper, wall, frame and default trail colours of every named maze board.
MEIKYUU_STRINGS定数Native English and Japanese labels, announcements and interpolation templates.
MEIKYUU_STYLE定数The scoped native SVG styles for mazes and arrow boards.
MEIKYUU_TRAIL_NAMES定数The supported named native trail colours.
MEIKYUU_TRAILS定数The light and dark colours of every named trail.
MeikyuuBoardLook型A board's colours: the paper, the walls, the frame, whether it is a dark board, and the line that shows on it when none is chosen.
MeikyuuBoardName型A supported named maze board appearance.
MeikyuuLanguage型THE WORDS MEIKYUU SAYS, in English and Japanese: what a screen reader hears of a drawing, what the buttons and the lines under a playable board say, and the names of the shapes and the ways to play.
meikyuuLanguageOf関数The language a lang attribute asks for: Japanese for any ja, English for everything else.
meikyuuSay関数A line in a language, with its {name} values filled in, and its One form when n is 1.
MeikyuuTrailName型A supported named trail palette.
standingWalls関数Every wall of the maze that is standing: between cells that are not joined, and round the outside, except the doors.
stonesOf関数The stones laid on a maze, as SVG: each a marble (mk-stone) with a small gleam (mk-gleam) on the cell, one unit across being a cell.
wallPath関数The path data for a wall: a line, or an arc round the middle of a circle maze.

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

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