hex-world
    Preparing search index...

    Function serializeMapJSON

    • Serializes a HexMap to a JSON string with base64-encoded cell data. Suitable for clipboard, editor state, or human-readable export. Pair with deserializeMapJSON.

      Descriptor sets can be passed either as a single MapDescriptorSets object (which is the only way to include resource and faction sets) or, for backwards compatibility, positionally as scatter, terrain, and liquid arrays.

      Parameters

      Returns string

      serializeMapJSON(map, { name: 'Kelmar Basin' }, {
      terrainDescriptors, liquidDescriptors, resourceDescriptors, factions,
      });
    • Serializes a HexMap to a JSON string with base64-encoded cell data. Suitable for clipboard, editor state, or human-readable export. Pair with deserializeMapJSON.

      Descriptor sets can be passed either as a single MapDescriptorSets object (which is the only way to include resource and faction sets) or, for backwards compatibility, positionally as scatter, terrain, and liquid arrays.

      Parameters

      Returns string

      serializeMapJSON(map, { name: 'Kelmar Basin' }, {
      terrainDescriptors, liquidDescriptors, resourceDescriptors, factions,
      });