JavaScript mapping classes and random generation algorithms
JavaScript mapping classes and random generation algorithms JavaScript mapping classes and random generation algorithms
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.
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();
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();