0.1.2 • Published 5 years ago

depthmaze v0.1.2

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago

MAZE

Features

  • a maze generator where all tiles are reachable
  • an interactive depth indicator inside maze with color
  • a Pixi.js background

Installation

First install depthmaze as a depency:

npm install depthmaze --save

Then you can import and use flowlines in your project:

import Maze from 'depthmaze';

const maze = new Maze();
maze.create();

Destroy maze:

maze.destroy();

Options

Initially maze creates it's own fullscreen div, but you can define the div yourself in th first parameter:

<div id="custom-scene"><div>
const maze = new Maze("custom-scene");

Currently if you want to include options, you need to define the div yourself:

const options = {
  blockSize: 30,
  tilesInBlock: 1,
  wallColor: 0x010101,
  colorAmp: 10
}
const maze = new Maze("pixi-scene", options);

There is also few presets available, with special options:

new Maze("pixi-scene", {preset: "Basic"});
new Maze("pixi-scene", {preset: "Medium"});
new Maze("pixi-scene", {preset: "Big"});
new Maze("pixi-scene", {preset: "Grey"});
new Maze("pixi-scene", {preset: "GreyInvert"});

If you need some more options, please make pull requests.

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago