Ninjas Practicing Multidimensionality

    @ion-cloud/compass

    1.9.3 • Public • Published

    compass

    JavaScript mapping classes and random generation algorithms JavaScript mapping classes and random generation algorithms

    main example

    Table of Contents

    Setup

    Getting started is as easy as npm i @ion-cloud/compass --save and then importing the required modules into your app with import {Map,Sector,maps} from '@ion-cloud/compass'.

    Please see code example here.

    Usage

    WebGL Canvas

    import {EaselWebGL} from '@ion-cloud/easel';
    import {Map,maps,BasicWebGLDisplay} from '@ion-cloud/compass';
    
    const easel = new EaselWebGL(),
          map = new Map({width:100,height:100}),
          display = new BasicWebGLDisplay({easel,map}),
          {generator} = maps.find(map=> map.name==='template - basic');
    
    generator({map});
    easel.onDraw = function(){ display.draw(); };
    easel.redraw();
    

    2d Canvas

    import {Easel} from '@ion-cloud/core';
    import {Map,maps,BasicDisplay} from '@ion-cloud/compass';
    
    const easel = new Easel(),
          map = new Map({width:100,height:100}),
          display = new BasicDisplay({easel,map}),
          {generator} = maps.find(map=> map.name==='template - basic');
    
    generator({map});
    easel.onDraw = function(){ display.draw(); };
    easel.redraw();
    

    Examples

    Basic

    Clustered Rooms - Default

    Clustered Rooms

    Clustered Rooms - Small

    Clustered Rooms

    Clustered Rooms - Large

    Clustered Rooms

    Clustered Rooms - Long Hallways

    Clustered Rooms

    Organized Rooms

    Organized Rooms

    Patterned Rooms

    Patterned Rooms

    Templates

    Template - Ancient Crypt

    Template Ancient Crypt

    Template - Basic

    Template Basic

    Template - Caverns

    Template Caverns

    Template - Crypt Catacombs

    Template Crypt Catacombs

    Template - Marsh

    Template Marsh

    Template - Passages

    Template Passages

    Template - Standard Crypt

    Template Standard Crypt

    Template - Tunnels

    Template Tunnels

    Landforms

    Alluvial Fan

    Alluvial Fan

    Arroyo

    Arroyo

    Bornhardt

    Bornhardt

    Braided Channel

    Braided Channel

    Butte

    Butte

    Caldera

    Caldera

    Caverns

    Caverns

    Chine

    Chine

    Cliffs

    Cliffs

    Couloir

    Couloir

    Cuesta

    Cuesta

    Draw

    Draw

    Hogback

    Hogback

    Esker

    Esker

    Exhumed River Channel

    Exhumed River Channel

    Fjord

    Fjord

    Floodplain

    Floodplain

    Glen

    Glen

    Gulch

    Gulch

    Gully

    Gully

    Marsh

    Marsh

    Mogote

    Mogote

    Ravine

    Ravine

    Strath

    Strath

    Tepui

    Tepui

    Turlough

    Turlough

    Uvala

    Uvala

    Wadi

    Wadi

    Install

    npm i @ion-cloud/compass

    DownloadsWeekly Downloads

    79

    Version

    1.9.3

    License

    MIT

    Unpacked Size

    305 kB

    Total Files

    83

    Last publish

    Collaborators

    • avatar