mwg API
    Preparing search index...

    Function hexToPixel

    • The pixel position of a hex cell's centre.

      tileWidth/tileHeight are the tile as drawn, so a flat-top hex is 0.75 of its width between columns and its full height between rows; a pointy-top one is the transpose of that.

      Parameters

      • x: number
      • y: number
      • tileWidth: number
      • tileHeight: number
      • shape: HexShape = {}

      Returns { x: number; y: number }