movinglinguini/pixijs-grid

Grid height

Opened this issue · 0 comments

To bad there is no option to pass a grid height.
That way you could draw different shape grids.

Also there is a bug in _correctWidth().
When 'useCorrectedWidth' parameter is set to false '_correctedWidth' will be overritten.
You should add a return.

_correctWidth() {
    if (!this._useCorrectedWidth) {
        return this._correctedWidth = this._gridWidth;
    }

   return this._correctedWidth = Math.ceil(Math.sqrt(this._gridWidth)) ** 2;
}