本文へ移動

Meikyuu迷宮

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

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

目次

リファレンス · 立体表面の規則と形

DrawSolidOptions型

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

A MAZE OVER A SOLID AS SVG TEXT, a still picture of it from one side: the near side's cells shaded by how squarely they face the viewer, the walls that stand, and, if asked, the line, the stones and the way through. Pure text with no page needed, so a server can make a picture, and the colours are the drawing's custom properties (--mk-paper, --mk-wall, ...), so a board, a line colour and the page's light or dark change it as they change a flat maze. The shade of a cell is a mix of the paper's colour and black (color-mix), so it follows the paper.

インポート

import type { DrawSolidOptions } from "@johnmorrisdotca/meikyuu/3d";

定義

type DrawSolidOptions = MazeLook & {
    turn?: Quat;
    size?: number;
    path?: readonly number[];
    stones?: readonly number[];
    solution?: boolean;
    language?: MeikyuuLanguage;
    label?: string;
    standalone?: boolean;
};

メンバー

名前型説明
board (省略可)MeikyuuBoardLook | "paper" | "wood" | "green" | "blue" | "red" | "black" | undefined

A board by name, or its colours.

trail (省略可)"green" | "blue" | "red" | "violet" | "orange" | (string & {}) | undefined

The line's colour: one of the named ones, or any CSS colour.

wall (省略可)number | undefined

The thickness of a wall, in cells. Default 0.12.

line (省略可)number | undefined

The thickness of the line, in cells. Default 0.34.

turn (省略可)Quat | undefined

How the solid is turned, as a quaternion [x, y, z, w]. Default: the start facing you, tipped a little.

size (省略可)number | undefined

The picture's width and height in pixels. Default 320.

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

The line drawn so far, as cells from the start.

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

The cells with a stone on them.

solution (省略可)boolean | undefined

Draw the one way from the start to the goal.

language (省略可)MeikyuuLanguage | undefined
label (省略可)string | undefined

The drawing's own words for a screen reader.

standalone (省略可)boolean | undefined

Put the style in the drawing, so it is a picture on its own.

例

import type { DrawSolidOptions } from "@johnmorrisdotca/meikyuu/3d";

const value: DrawSolidOptions = {label:"Cube maze",size:300};
console.log(value);
{ label: 'Cube maze', size: 300 }

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

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

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