@gongfuio/hexgrid

‹Hexgrid› implementation from Red Blob Games (https://www.redblobgames.com/grids/hexagons/implementation.html) packaged as an ES module

Usage no npm install needed!

<script type="module">
  import gongfuioHexgrid from 'https://cdn.skypack.dev/@gongfuio/hexgrid';
</script>

README

@gongfuio/hexgrid package

‹Hexgrid› implementation from Red Blob Games, packaged as an ES module.

Build

$ cd packages/hexgrid
$ npm install
$ npm run build

Usage

Install in your project:

$ cd webapp
$ npm install --save @gongfuio/hexgrid

Use from a module:

import { Layout } from '@gongfuio/hexgrid';

const layout = Layout.pointy;