MapGenerator allows to generate simple 2d map and render it on HTML5 canvas element. There is support for scrolling and zooming of the generated map. Several generation parameters can be adjusted.
Path calculation feature allows to find the fastest way between two points using A* search algorithm.
TypeScript (typed superset of JavaScript)
Webpack (module bundler)
Sass (css preprocessor)
prando (deterministic pseudo-random number generator)
fastpriorityqueue (fast, heap-based priority queue)
ts-jest (TypeScript preprocessor with sourcemap support for Jest)
jest (JavaScript testing framework)
Biome (linter & formatter for TypeScript/JavaScript)
GitHub Actions (continuous integration service)
Download and install nodejs (>= 24, see .nvmrc) with npm via https://nodejs.org/en/download/ or your system's specific package manager.
Download and install git via https://git-scm.com/downloads or package manager.
Clone this repository using:
git clone https://github.com/Sarratas/MapGeneratorMove to project catalog and run install through npm:
npm installTo run locally using webpack-dev-server with watch mode:
npm startTo run unit tests using jest:
npm testTo run linting and formatting checks through Biome:
npm run lintTo auto-fix lint issues and format the code:
npm run lint:fix