Skip to content

Astatroth/php-hexgrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Axial hexagonal grid generator for PHP

Latest Version on Packagist Total Downloads

This package is a port of Axial hexagonal grid by Robert Brewitz, originally written in JS.

Installation

You can install the package via composer:

composer require astatroth/php-hexgrid

Usage

use Astatroth\HexGrid\Grid;

$grid = new Grid;
print_r($grid->hexagon(0, 0, 3, true));

The resulting array of coordinates can be user to draw a hexagonal grid itself. Visit the original github page if you want an example of how to draw the grid.

License

The MIT License (MIT). Please see License File for more information.

About

Axial hexagonal grid generator for PHP

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages