{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://paramlet.com/tools/wifi-qr-city/schema.json",
 "title": "WiFi QR code city — parameters",
 "description": "Turn your WiFi password or a link into a 3D printed city: from the side a skyline of towers, from above a QR code guests scan to join. All lengths are millimetres. Unknown keys are rejected; out-of-range values are rejected by the URL and API and clamped when a project file is opened.",
 "x-tool": "wifi-qr-city",
 "x-toolVersion": "1.0.0",
 "x-specVersion": "1.0",
 "x-apiVersion": "1",
 "x-groups": [
  {
   "id": "code",
   "title": "QR content"
  },
  {
   "id": "size",
   "title": "Size"
  },
  {
   "id": "skyline",
   "title": "Skyline"
  },
  {
   "id": "colour",
   "title": "Colours"
  },
  {
   "id": "print",
   "title": "Printing"
  }
 ],
 "x-presets": {
  "note": "Choosing a preset resets every key marked x-resetOnPreset to its default and then applies the preset values.",
  "items": [
   {
    "id": "home-wifi",
    "title": "Home WiFi city",
    "description": "100 mm plate, downtown skyline up to 12 mm, two colours. Scans well from 30 cm.",
    "values": {
     "lightColor": "#f3efe6",
     "darkColor": "#1f2329"
    }
   },
   {
    "id": "guest-wifi-small",
    "title": "Small guest WiFi sign",
    "description": "70 mm plate with low towers (up to 7 mm) for a shelf or a desk.",
    "values": {
     "plateSize": 70,
     "maxHeight": 7,
     "minHeight": 1.6,
     "rimHeight": 2,
     "rimWidth": 2.5,
     "lightColor": "#f8fafc",
     "darkColor": "#14365d"
    }
   },
   {
    "id": "big-skyline",
    "title": "Big random skyline",
    "description": "150 mm plate, random towers up to 18 mm: a display piece for the wall.",
    "values": {
     "plateSize": 150,
     "maxHeight": 18,
     "minHeight": 3,
     "skyline": "random",
     "rimHeight": 4,
     "rimWidth": 4,
     "lightColor": "#ede4d3",
     "darkColor": "#3b2618"
    }
   },
   {
    "id": "flat-sign",
    "title": "Flat QR sign (easiest to scan)",
    "description": "All towers 1.2 mm high: a flat two-colour QR plate that scans from any angle.",
    "values": {
     "skyline": "even",
     "minHeight": 1.2,
     "maxHeight": 1.2,
     "rimHeight": 1,
     "rimWidth": 2,
     "lightColor": "#ffffff",
     "darkColor": "#164234"
    }
   },
   {
    "id": "open-guest-network",
    "title": "Open guest network",
    "description": "A network without a password, e.g. a café or a guest network.",
    "values": {
     "ssid": "Guest",
     "security": "nopass",
     "lightColor": "#f5ebd8",
     "darkColor": "#7c2d12"
    }
   },
   {
    "id": "website-link",
    "title": "Website link city",
    "description": "A link instead of WiFi: a shop, a menu or a portfolio.",
    "values": {
     "qrMode": "url",
     "content": "https://paramlet.com",
     "lightColor": "#eef2f6",
     "darkColor": "#2a266e"
    }
   },
   {
    "id": "single-extruder",
    "title": "Single extruder, one filament change",
    "description": "No rim, so a single filament change at the top of the plate makes every tower dark.",
    "values": {
     "colorMode": "swap",
     "rimHeight": 0,
     "lightColor": "#e9f0ea",
     "darkColor": "#1e293b"
    }
   }
  ]
 },
 "x-coreParams": {
  "exportFormat": {
   "type": "string",
   "title": "File format",
   "description": "3mf = 3MF (mm); 3mf_prusa = 3MF for PrusaSlicer (mm, colour parts as volumes); stl = STL files in a zip (mm)",
   "x-group": "download",
   "x-role": "core.exportFormat",
   "x-unit": "none",
   "x-agentSafe": true,
   "enum": [
    "3mf",
    "3mf_prusa",
    "stl"
   ],
   "default": "3mf"
  },
  "exportTol": {
   "type": "number",
   "title": "Mesh precision",
   "description": "Simplification tolerance in mm (0 = original mesh).",
   "x-group": "download",
   "x-role": "core.exportTolerance",
   "x-unit": "mm",
   "x-agentSafe": true,
   "enum": [
    0,
    0.01,
    0.02
   ],
   "default": 0.02
  },
  "units": {
   "type": "string",
   "title": "Units shown",
   "description": "Display only: mm or inches (1 in = 25.4 mm). Stored values, the API and exports are always mm.",
   "x-group": "view",
   "x-role": "core.displayUnits",
   "x-unit": "none",
   "x-agentSafe": true,
   "enum": [
    "mm",
    "in"
   ],
   "x-enumTitles": {
    "mm": "Millimetres",
    "in": "Inches"
   },
   "default": "mm"
  }
 },
 "type": "object",
 "properties": {
  "qrMode": {
   "type": "string",
   "enum": [
    "wifi",
    "url",
    "text"
   ],
   "x-enumTitles": {
    "wifi": "WiFi network",
    "url": "Web link",
    "text": "Plain text"
   },
   "title": "What the code opens",
   "description": "A WiFi code joins the network straight from the phone camera.",
   "x-group": "code",
   "x-agentSafe": true,
   "x-label-lv": "Ko kods atver",
   "default": "wifi"
  },
  "ssid": {
   "type": "string",
   "maxLength": 32,
   "title": "Network name (SSID)",
   "description": "Exactly as your router shows it, including capitals.",
   "x-group": "code",
   "x-visibleIf": {
    "qrMode": "wifi"
   },
   "x-agentSafe": true,
   "x-label-lv": "Tīkla nosaukums (SSID)",
   "default": "MyHomeWiFi"
  },
  "password": {
   "type": "string",
   "maxLength": 63,
   "title": "Password",
   "description": "Stays on this device: it is left out of share links and parameters.json.",
   "x-group": "code",
   "x-visibleIf": {
    "all": [
     {
      "qrMode": "wifi"
     },
     {
      "security": {
       "ne": "nopass"
      }
     }
    ]
   },
   "x-agentSafe": false,
   "x-label-lv": "Parole",
   "default": "change-me-please"
  },
  "security": {
   "type": "string",
   "enum": [
    "WPA",
    "WEP",
    "nopass"
   ],
   "x-enumTitles": {
    "WPA": "WPA / WPA2 / WPA3",
    "WEP": "WEP (old)",
    "nopass": "Open network, no password"
   },
   "title": "Security",
   "description": "Almost every home router uses WPA.",
   "x-group": "code",
   "x-visibleIf": {
    "qrMode": "wifi"
   },
   "x-agentSafe": true,
   "x-label-lv": "Drošība",
   "default": "WPA"
  },
  "hiddenNetwork": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Hidden network",
   "description": "Tick it if the network name is not broadcast.",
   "x-group": "code",
   "x-visibleIf": {
    "qrMode": "wifi"
   },
   "x-agentSafe": true,
   "x-label-lv": "Slēpts tīkls",
   "default": 0
  },
  "content": {
   "type": "string",
   "maxLength": 200,
   "title": "Link or text",
   "description": "Shorter content gives a smaller code with bigger towers.",
   "x-group": "code",
   "x-visibleIf": {
    "qrMode": [
     "url",
     "text"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Saite vai teksts",
   "default": "https://paramlet.com"
  },
  "ecLevel": {
   "type": "string",
   "enum": [
    "L",
    "M",
    "Q",
    "H"
   ],
   "x-enumTitles": {
    "L": "L — 7 % (biggest towers)",
    "M": "M — 15 % (recommended)",
    "Q": "Q — 25 %",
    "H": "H — 30 % (most robust)"
   },
   "title": "Error correction",
   "description": "More correction tolerates shadows and print flaws but needs more, smaller towers.",
   "x-group": "code",
   "x-advanced": true,
   "x-agentSafe": true,
   "x-label-lv": "Kļūdu labošana",
   "default": "M"
  },
  "plateSize": {
   "type": "number",
   "minimum": 50,
   "maximum": 200,
   "multipleOf": 1,
   "title": "Plate size",
   "description": "Width of the square plate including the rim.",
   "x-group": "size",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Plāksnes izmērs",
   "default": 100
  },
  "quietZone": {
   "type": "integer",
   "minimum": 1,
   "maximum": 4,
   "multipleOf": 1,
   "title": "Light border (modules)",
   "description": "Empty light border round the code, in modules. Phones need at least 1–2.",
   "x-group": "size",
   "x-unit": "count",
   "x-advanced": true,
   "x-agentSafe": true,
   "x-label-lv": "Gaišā mala (moduļi)",
   "default": 2
  },
  "baseThickness": {
   "type": "number",
   "minimum": 1.2,
   "maximum": 4,
   "x-step": 0.2,
   "title": "Base thickness",
   "description": "Thickness of the light plate under the towers.",
   "x-group": "size",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Pamatnes biezums",
   "default": 2
  },
  "rimHeight": {
   "type": "number",
   "minimum": 0,
   "maximum": 8,
   "x-step": 0.5,
   "title": "Rim height",
   "description": "Raised light rim round the city; 0 = no rim.",
   "x-group": "size",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Malas augstums",
   "default": 3
  },
  "rimWidth": {
   "type": "number",
   "minimum": 2,
   "maximum": 8,
   "x-step": 0.5,
   "title": "Rim width",
   "description": "Width of the raised rim.",
   "x-group": "size",
   "x-unit": "mm",
   "x-visibleIf": {
    "rimHeight": {
     "gt": 0
    }
   },
   "x-agentSafe": true,
   "x-label-lv": "Malas platums",
   "default": 3
  },
  "minHeight": {
   "type": "number",
   "minimum": 0.6,
   "maximum": 20,
   "x-step": 0.2,
   "title": "Lowest tower",
   "description": "Height of the lowest towers above the plate.",
   "x-group": "skyline",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Zemākais tornis",
   "default": 2
  },
  "maxHeight": {
   "type": "number",
   "minimum": 1,
   "maximum": 40,
   "x-step": 0.5,
   "title": "Tallest tower",
   "description": "Height of the tallest towers above the plate. Under 4 × the tower width scans best.",
   "x-group": "skyline",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Augstākais tornis",
   "default": 12
  },
  "skyline": {
   "type": "string",
   "enum": [
    "downtown",
    "random",
    "even"
   ],
   "x-enumTitles": {
    "downtown": "Downtown (tall in the middle)",
    "random": "Random",
    "even": "Flat (all lowest)"
   },
   "title": "Skyline",
   "description": "How tower heights are spread over the plate.",
   "x-group": "skyline",
   "x-agentSafe": true,
   "x-label-lv": "Siluets",
   "default": "downtown"
  },
  "buildings": {
   "type": "string",
   "enum": [
    "mixed",
    "single"
   ],
   "x-enumTitles": {
    "mixed": "Mixed blocks",
    "single": "One tower per module"
   },
   "title": "Buildings",
   "description": "Mixed joins some neighbouring dark modules into wider buildings of one height.",
   "x-group": "skyline",
   "x-agentSafe": true,
   "x-label-lv": "Ēkas",
   "default": "mixed"
  },
  "citySeed": {
   "type": "integer",
   "minimum": 1,
   "maximum": 999,
   "multipleOf": 1,
   "title": "City layout",
   "description": "Change it to shuffle the tower heights; the code stays the same.",
   "x-group": "skyline",
   "x-unit": "count",
   "x-agentSafe": true,
   "x-label-lv": "Pilsētas variants",
   "default": 7
  },
  "colorMode": {
   "type": "string",
   "enum": [
    "multi",
    "swap",
    "single"
   ],
   "x-enumTitles": {
    "multi": "Two colours (AMS / multi-material)",
    "swap": "One filament change (single extruder)",
    "single": "One colour (paint the roofs)"
   },
   "title": "Colour mode",
   "description": "The code only scans when the towers are darker than the plate.",
   "x-group": "colour",
   "x-agentSafe": true,
   "x-label-lv": "Krāsu režīms",
   "default": "multi"
  },
  "lightColor": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Plate colour (light)",
   "description": "Use white or a very light colour.",
   "x-group": "colour",
   "x-role": "core.previewColor",
   "x-agentSafe": true,
   "x-label-lv": "Plāksnes krāsa (gaiša)",
   "default": "#f1eee6"
  },
  "darkColor": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Tower colour (dark)",
   "description": "Black or a very dark colour for a strong contrast.",
   "x-group": "colour",
   "x-visibleIf": {
    "colorMode": [
     "multi",
     "swap"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Torņu krāsa (tumša)",
   "default": "#23252b"
  },
  "printMaterial": {
   "type": "string",
   "enum": [
    "pla",
    "petg"
   ],
   "x-enumTitles": {
    "pla": "PLA",
    "petg": "PETG"
   },
   "title": "Print material",
   "description": "Matte PLA reflects less light and scans best.",
   "x-group": "print",
   "x-role": "core.printMaterial",
   "x-agentSafe": true,
   "x-label-lv": "Drukas materiāls",
   "default": "pla"
  }
 },
 "additionalProperties": false,
 "recommended_materials": [
  {
   "id": "pla-matte-filament",
   "title": "Matte PLA Filament 1.75 mm (1 kg) — smooth surface finish",
   "why": "Clean matte finish for decorative vases, ornaments and candle holders.",
   "url": "https://paramlet.com/go/pla-matte-filament?src=agent",
   "relation": "material",
   "disclosure": "Affiliate link (Amazon Associates, tag paramlet-21)"
  },
  {
   "id": "petg-filament-1kg",
   "title": "PETG Filament 1.75 mm (1 kg) — heat-resistant & durable",
   "why": "Stronger and more heat-resistant than PLA for molds, jigs and outdoor parts.",
   "url": "https://paramlet.com/go/petg-filament-1kg?src=agent",
   "relation": "material",
   "disclosure": "Affiliate link (Amazon Associates, tag paramlet-21)"
  }
 ]
}