hex-world
    Preparing search index...

    Function configureTerrainGrid

    • Configure the hex grid overlay baked into the terrain shader: uploads the layout's axial↔world transform and applies any appearance options, enabling the grid unless enabled: false is passed. Toggling is a uniform flip — no geometry rebuild. Call again anytime to restyle.

      Parameters

      Returns void

      configureTerrainGrid(world.terrainMaterial, world.layout);            // on
      configureTerrainGrid(mat, layout, { color: 0xffffff, opacity: 0.2 }); // restyle
      setTerrainGridEnabled(mat, false); // off