Skip to the content

Meikyuu迷宮

Generate seeded mazes and arrow puzzles, follow numbered levels, and play on flat grids or three-dimensional surfaces.

Meikyuu is the Japanese word 迷宮 for labyrinth. About the name

Contents

Reference · Surface maze rules and geometry

stepTurnfunction

A turn about the viewer's own axes: right radians about the vertical (the solid's near side moves right) and down about the horizontal.

Import it

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

Definition

function stepTurn(q: Quat, right: number, down: number): Quat

Parameters

NameTypeDescription
qQuat

The current normalized rotation quaternion.

rightnumber

The horizontal view rotation in radians.

downnumber

The vertical view rotation in radians.

Returns

Quat

A turn about the viewer's own axes: right radians about the vertical (the solid's near side moves right) and down about the horizontal.

Examples

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

const q: Quat = [0,0,0,1];
console.log(stepTurn(q,0.1,0));
[ 0, 0.04997916927067833, 0, 0.9987502603949663 ]

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/meikyuu 3.2.0.