bitbybit.dev v1.0.0-rc.1
    Preparing search index...

    Class HexGridScaledToFitDto

    Index

    Constructors

    • Parameters

      • Optionalwdith: number
      • Optionalheight: number
      • OptionalnrHexagonsU: number
      • OptionalnrHexagonsV: number
      • OptionalcenterGrid: boolean
      • OptionalpointsOnGround: boolean

      Returns HexGridScaledToFitDto

    Properties

    width?: number

    Total desired width for the grid area. The hexagon size will be derived from this and nrHexagonsU.

    10
    

    0

    Infinity

    0.1

    height?: number

    Total desired height for the grid area. Note: due to hexagon geometry, the actual grid height might differ slightly if maintaining regular hexagons based on width.

    10
    

    0

    Infinity

    0.1

    nrHexagonsInWidth?: number

    Number of hexagons desired in width.

    10
    

    0

    Infinity

    1

    nrHexagonsInHeight?: number

    Number of hexagons desired in height.

    10
    

    0

    Infinity

    1

    flatTop?: boolean

    If true, the hexagons will be oriented with their flat sides facing up and down.

    false
    
    extendTop?: boolean

    If true, shift the entire grid up by half hex height.

    false
    
    extendBottom?: boolean

    If true, shift the entire grid down by half hex height.

    false
    
    extendLeft?: boolean

    If true, shift the entire grid left by half hex width.

    false
    
    extendRight?: boolean

    If true, shift the entire grid right by half hex width.

    false
    
    centerGrid?: boolean

    If true, the grid center (based on totalWidth/totalHeight) will be at [0,0,0].

    false
    
    pointsOnGround?: boolean

    If true, swaps Y and Z coordinates and sets Y to 0, placing points on the XZ ground plane.

    false