Reference
SVG grids
import { … } from "@johnmorrisdotca/meikyuu/draw";
8.7 kB minified and gzipped, with everything it imports (measured with 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.
Exports
| Name | Kind | What it is |
|---|---|---|
arrowColour | function | The colour of arrow number id. |
arrowMarkup | function | The arrow's picture: its stem, its head, and a padlock if it is locked. |
boardLookOf | function | The look a board name or board object means. |
doorPlace | function | Where a door is: the middle of its gap in the wall, and the way out through it as a unit vector. |
drawArrows | function | Render the native arrow board, locked/present arrows and optional hint as SVG text. |
DrawArrowsOptions | type | 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 | function | The maze as SVG text. |
DrawMazeOptions | type | Native maze appearance, current trail, collected keys, stones, hints, label and SVG presentation choices. |
fixed | function | A number as short text: two decimals at most, so a drawing is small. |
framed | function | The rectangle to look at to see the whole of a shape with a margin of pad cells. |
linePath | function | A line through the middles of the cells, in order. |
lookAttributes | function | The attributes (as text) that make an element a Meikyuu drawing: its class, its look, and its custom properties. |
lookStyle | function | The inline custom properties a look needs: none for plain paper with the default line, which the style gives. |
marksOf | function | The marks on a maze: the start, the goal or exit, the doors and the keys, as SVG. |
MazeLook | type | What a maze looks like: every option that does not depend on where the line is. |
MEIKYUU_ARROW_COLOURS | constant | The colours of each arrow on an arrow board, in turn. |
MEIKYUU_BOARD_NAMES | constant | The supported named native maze board appearances. |
MEIKYUU_BOARDS | constant | The paper, wall, frame and default trail colours of every named maze board. |
MEIKYUU_STRINGS | constant | Native English and Japanese labels, announcements and interpolation templates. |
MEIKYUU_STYLE | constant | The scoped native SVG styles for mazes and arrow boards. |
MEIKYUU_TRAIL_NAMES | constant | The supported named native trail colours. |
MEIKYUU_TRAILS | constant | The light and dark colours of every named trail. |
MeikyuuBoardLook | type | 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 | type | A supported named maze board appearance. |
MeikyuuLanguage | type | 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 | function | The language a lang attribute asks for: Japanese for any ja, English for everything else. |
meikyuuSay | function | A line in a language, with its {name} values filled in, and its One form when n is 1. |
MeikyuuTrailName | type | A supported named trail palette. |
standingWalls | function | Every wall of the maze that is standing: between cells that are not joined, and round the outside, except the doors. |
stonesOf | function | 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 | function | The path data for a wall: a line, or an arc round the middle of a circle maze. |