{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://paramlet.com/tools/lithophane/schema.json",
 "title": "Lithophane Maker — parameters",
 "description": "Turn a photo into a lithophane panel, curved print, night light, lamp shade or Christmas ball. Free, in your browser; the photo never leaves your device. 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": "lithophane",
 "x-toolVersion": "1.0.0",
 "x-specVersion": "1.0",
 "x-apiVersion": "1",
 "x-groups": [
  {
   "id": "photo",
   "title": "Photo"
  },
  {
   "id": "shape",
   "title": "Shape and size"
  },
  {
   "id": "thickness",
   "title": "Thickness and frame"
  },
  {
   "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": "photo-panel",
    "title": "Photo lithophane panel with stand",
    "description": "Classic 100 × 150 mm portrait panel on a foot, printed upright. A gift for a window sill or a desk lamp.",
    "values": {
     "shape": "flat",
     "width": 100,
     "cropAspect": "2:3",
     "stand": true,
     "color": "#b91c1c"
    }
   },
   {
    "id": "curved-desk",
    "title": "Curved desk lithophane 120°",
    "description": "A 140 mm wide landscape photo bent 120° so it stands on its own in front of a light.",
    "values": {
     "shape": "curved",
     "width": 140,
     "curveAngle": 120,
     "cropAspect": "4:3",
     "color": "#15803d"
    }
   },
   {
    "id": "tea-light-night-light",
    "title": "Night light over an LED tea light",
    "description": "A photo cylinder that slips over a Ø38 mm LED tea light (inside Ø42 mm). The photo wraps all the way round.",
    "values": {
     "shape": "cylinder",
     "innerDiameter": 42,
     "wrapAngle": 360,
     "cropAspect": "2:1",
     "frameWidth": 3,
     "color": "#d4a017"
    }
   },
   {
    "id": "christmas-ball",
    "title": "Christmas ball lithophane Ø80 mm",
    "description": "Photo ornament with a hanging loop and a Ø40 mm opening for an LED tea light. Prints in two halves without supports.",
    "values": {
     "shape": "ball",
     "ballDiameter": 80,
     "holeDiameter": 40,
     "wrapAngle": 180,
     "cropAspect": "2:1",
     "hanger": true,
     "color": "#1d4ed8"
    }
   },
   {
    "id": "puck-light-lamp-shade",
    "title": "Lamp shade for an LED puck light",
    "description": "Panorama shade with Ø72 mm inside for a 70 mm puck light, with a notch for the cable.",
    "values": {
     "shape": "cylinder",
     "innerDiameter": 72,
     "wrapAngle": 360,
     "cropAspect": "3:1",
     "cableNotch": true,
     "frameWidth": 4,
     "resolution": 700,
     "color": "#7e22ce"
    }
   },
   {
    "id": "heart-lithophane",
    "title": "Heart photo lithophane",
    "description": "A 100 mm heart with a frame and a stand, for Valentine's Day, weddings and anniversaries.",
    "values": {
     "shape": "heart",
     "width": 100,
     "cropAspect": "1:1",
     "frameWidth": 5,
     "stand": true,
     "color": "#0f766e"
    }
   }
  ]
 },
 "x-coreParams": {
  "exportFormat": {
   "type": "string",
   "title": "File format",
   "description": "3mf = 3MF (mm); stl = STL files in a zip (mm)",
   "x-group": "download",
   "x-role": "core.exportFormat",
   "x-unit": "none",
   "x-agentSafe": true,
   "enum": [
    "3mf",
    "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": {
  "image": {
   "type": [
    "object",
    "null"
   ],
   "x-maxBytes": 1000000,
   "title": "Photo",
   "description": "Your photo as grey levels. It is prepared and kept in this browser only; it is not uploaded and not included in share links or downloads.",
   "x-group": "photo",
   "x-agentSafe": false,
   "x-label-lv": "Fotoattēls",
   "default": null
  },
  "cropAspect": {
   "type": "string",
   "enum": [
    "original",
    "1:1",
    "4:3",
    "3:4",
    "3:2",
    "2:3",
    "16:9",
    "9:16",
    "2:1",
    "3:1"
   ],
   "x-enumTitles": {
    "original": "Whole photo",
    "1:1": "Square 1:1",
    "4:3": "Landscape 4:3",
    "3:4": "Portrait 3:4",
    "3:2": "Landscape 3:2",
    "2:3": "Portrait 2:3",
    "16:9": "Wide 16:9",
    "9:16": "Tall 9:16",
    "2:1": "Panorama 2:1",
    "3:1": "Panorama 3:1"
   },
   "title": "Crop",
   "description": "Shape of the part of the photo that is printed. The print height follows from the width and this ratio.",
   "x-group": "photo",
   "x-agentSafe": true,
   "x-label-lv": "Apgriešana",
   "default": "original",
   "x-resetOnPreset": true
  },
  "zoom": {
   "type": "number",
   "minimum": 100,
   "maximum": 400,
   "multipleOf": 5,
   "title": "Zoom",
   "description": "Enlarges the photo inside the crop.",
   "x-group": "photo",
   "x-unit": "pct",
   "x-agentSafe": true,
   "x-label-lv": "Tālummaiņa",
   "default": 100
  },
  "cropX": {
   "type": "number",
   "minimum": 0,
   "maximum": 100,
   "multipleOf": 1,
   "title": "Crop position left–right",
   "description": "Moves the crop window across the photo when the crop or zoom cuts off the sides.",
   "x-group": "photo",
   "x-unit": "pct",
   "x-agentSafe": true,
   "x-label-lv": "Apgriezuma novietojums pa kreisi–pa labi",
   "default": 50
  },
  "cropY": {
   "type": "number",
   "minimum": 0,
   "maximum": 100,
   "multipleOf": 1,
   "title": "Crop position top–bottom",
   "description": "Moves the crop window up or down.",
   "x-group": "photo",
   "x-unit": "pct",
   "x-agentSafe": true,
   "x-label-lv": "Apgriezuma novietojums augšā–apakšā",
   "default": 50
  },
  "brightness": {
   "type": "number",
   "minimum": -50,
   "maximum": 50,
   "multipleOf": 1,
   "title": "Brightness",
   "description": "Brighter makes the whole print thinner and lets more light through.",
   "x-group": "photo",
   "x-unit": "pct",
   "x-agentSafe": true,
   "x-label-lv": "Spilgtums",
   "default": 0
  },
  "contrast": {
   "type": "number",
   "minimum": 50,
   "maximum": 200,
   "multipleOf": 5,
   "title": "Contrast",
   "description": "More contrast gives deeper shadows and brighter highlights when lit.",
   "x-group": "photo",
   "x-unit": "pct",
   "x-agentSafe": true,
   "x-label-lv": "Kontrasts",
   "default": 100
  },
  "invert": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Negative (invert)",
   "description": "Swaps light and dark. Leave off for a normal lithophane.",
   "x-group": "photo",
   "x-agentSafe": true,
   "x-label-lv": "Negatīvs (invertēt)",
   "default": 0
  },
  "toneCurve": {
   "type": "string",
   "enum": [
    "natural",
    "linear"
   ],
   "x-enumTitles": {
    "natural": "Natural (matches the lit photo)",
    "linear": "Linear thickness"
   },
   "title": "Tone curve",
   "description": "Natural sets the thickness so the backlit brightness follows the photo; linear maps grey straight to thickness (darker mid-tones).",
   "x-group": "photo",
   "x-advanced": true,
   "x-agentSafe": true,
   "x-label-lv": "Toņu līkne",
   "default": "natural"
  },
  "shape": {
   "type": "string",
   "enum": [
    "flat",
    "heart",
    "curved",
    "cylinder",
    "ball"
   ],
   "x-enumTitles": {
    "flat": "Flat panel",
    "heart": "Heart",
    "curved": "Curved panel",
    "cylinder": "Cylinder (night light, lamp shade)",
    "ball": "Christmas ball"
   },
   "title": "Shape",
   "description": "Flat and curved panels stand on a desk, the cylinder goes over a tea light or puck light, the ball hangs on the tree.",
   "x-group": "shape",
   "x-agentSafe": true,
   "x-label-lv": "Forma",
   "default": "flat",
   "x-resetOnPreset": true
  },
  "width": {
   "type": "number",
   "minimum": 40,
   "maximum": 250,
   "multipleOf": 1,
   "title": "Photo width",
   "description": "Width of the photo area without the frame (along the curve for a curved panel).",
   "x-group": "shape",
   "x-unit": "mm",
   "x-visibleIf": {
    "shape": [
     "flat",
     "heart",
     "curved"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Foto platums",
   "default": 120,
   "x-resetOnPreset": true
  },
  "curveAngle": {
   "type": "number",
   "minimum": 60,
   "maximum": 200,
   "multipleOf": 5,
   "title": "Curve angle",
   "description": "How far the panel bends around. 90° and more stands safely on its own.",
   "x-group": "shape",
   "x-unit": "deg",
   "x-visibleIf": {
    "shape": "curved"
   },
   "x-agentSafe": true,
   "x-label-lv": "Izliekuma leņķis",
   "default": 120,
   "x-resetOnPreset": true
  },
  "stand": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Stand (print upright)",
   "description": "Adds a foot so the panel stands and prints upright, which gives the sharpest picture. Off: the panel prints lying flat, for frames or hanging.",
   "x-group": "shape",
   "x-visibleIf": {
    "shape": [
     "flat",
     "heart"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Statīvs (drukāt stāvus)",
   "default": 1,
   "x-resetOnPreset": true
  },
  "innerDiameter": {
   "type": "number",
   "minimum": 30,
   "maximum": 200,
   "x-step": 0.5,
   "title": "Inside diameter",
   "description": "Make it at least 2 mm larger than the light it goes over (an LED tea light is 38 mm).",
   "x-group": "shape",
   "x-unit": "mm",
   "x-visibleIf": {
    "shape": "cylinder"
   },
   "x-agentSafe": true,
   "x-label-lv": "Iekšējais diametrs",
   "default": 70,
   "x-resetOnPreset": true
  },
  "ballDiameter": {
   "type": "number",
   "minimum": 50,
   "maximum": 150,
   "multipleOf": 1,
   "title": "Ball diameter",
   "description": "Outside diameter of the ornament.",
   "x-group": "shape",
   "x-unit": "mm",
   "x-visibleIf": {
    "shape": "ball"
   },
   "x-agentSafe": true,
   "x-label-lv": "Bumbas diametrs",
   "default": 80,
   "x-resetOnPreset": true
  },
  "holeDiameter": {
   "type": "number",
   "minimum": 20,
   "maximum": 80,
   "x-step": 0.5,
   "title": "LED opening",
   "description": "Opening at the bottom for the light. 40 mm fits an LED tea light (38 mm); 25 mm fits a fairy-light bulb.",
   "x-group": "shape",
   "x-unit": "mm",
   "x-visibleIf": {
    "shape": "ball"
   },
   "x-agentSafe": true,
   "x-label-lv": "LED atvere",
   "default": 40,
   "x-resetOnPreset": true
  },
  "wrapAngle": {
   "type": "number",
   "minimum": 90,
   "maximum": 360,
   "multipleOf": 5,
   "title": "Photo wraps around",
   "description": "How much of the circle the photo covers; the rest is solid. 360° wraps the whole way round (use a panorama crop).",
   "x-group": "shape",
   "x-unit": "deg",
   "x-visibleIf": {
    "shape": [
     "cylinder",
     "ball"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Foto aptver",
   "default": 180,
   "x-resetOnPreset": true
  },
  "hanger": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Hanging loop",
   "description": "Loop on top for a ribbon or ornament hook.",
   "x-group": "shape",
   "x-visibleIf": {
    "shape": "ball"
   },
   "x-agentSafe": true,
   "x-label-lv": "Pakaramā cilpa",
   "default": 1,
   "x-resetOnPreset": true
  },
  "cableNotch": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Cable notch",
   "description": "Notch at the back of the bottom edge for the cable of a puck or USB light.",
   "x-group": "shape",
   "x-visibleIf": {
    "shape": "cylinder"
   },
   "x-agentSafe": true,
   "x-label-lv": "Kabeļa izgriezums",
   "default": 0,
   "x-resetOnPreset": true
  },
  "minThickness": {
   "type": "number",
   "minimum": 0.6,
   "maximum": 1,
   "x-step": 0.1,
   "title": "Thinnest (white)",
   "description": "Wall where the photo is white. Thinner is brighter but more fragile.",
   "x-group": "thickness",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Plānākais (balts)",
   "default": 0.8,
   "x-resetOnPreset": true
  },
  "maxThickness": {
   "type": "number",
   "minimum": 2.4,
   "maximum": 4,
   "x-step": 0.1,
   "title": "Thickest (black)",
   "description": "Wall where the photo is black. Thicker gives deeper blacks with a bright light.",
   "x-group": "thickness",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Biezākais (melns)",
   "default": 3,
   "x-resetOnPreset": true
  },
  "frameWidth": {
   "type": "number",
   "minimum": 0,
   "maximum": 15,
   "x-step": 0.5,
   "title": "Frame width",
   "description": "Solid border around the photo. It makes thin panels stiff and gives a clean edge.",
   "x-group": "thickness",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Rāmja platums",
   "default": 4,
   "x-resetOnPreset": true
  },
  "frameThickness": {
   "type": "number",
   "minimum": 2,
   "maximum": 8,
   "x-step": 0.1,
   "title": "Frame thickness",
   "description": "Thickness of the border and of the solid parts. Never thinner than the thickest photo wall.",
   "x-group": "thickness",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Rāmja biezums",
   "default": 4,
   "x-resetOnPreset": true
  },
  "resolution": {
   "type": "integer",
   "minimum": 100,
   "maximum": 1000,
   "multipleOf": 10,
   "title": "Detail (points across the photo)",
   "description": "More points give a sharper picture and a bigger file. About 3 points per mm is the most a 0.4 mm nozzle can print.",
   "x-group": "print",
   "x-unit": "count",
   "x-role": "core.resolution",
   "x-advanced": true,
   "x-agentSafe": true,
   "x-label-lv": "Detalizācija (punkti pa foto platumu)",
   "default": 400,
   "x-resetOnPreset": true
  },
  "printMaterial": {
   "type": "string",
   "enum": [
    "pla",
    "petg"
   ],
   "x-enumTitles": {
    "pla": "White PLA",
    "petg": "White PETG"
   },
   "title": "Print material",
   "description": "Use pure white filament; colours and \"silk\" filaments hide the picture.",
   "x-group": "print",
   "x-role": "core.printMaterial",
   "x-agentSafe": true,
   "x-label-lv": "Drukas materiāls",
   "default": "pla"
  },
  "color": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Preview colour",
   "description": "Changes the preview and the 3MF colour.",
   "x-group": "print",
   "x-role": "core.previewColor",
   "x-agentSafe": true,
   "x-label-lv": "Priekšskata krāsa",
   "default": "#f4f1ea"
  }
 },
 "additionalProperties": false,
 "recommended_materials": [
  {
   "id": "led-tealight-candles",
   "title": "Flameless Warm-White LED Tealight Candles with Timer (24 pack)",
   "why": "Safe 38 mm flameless LED tealights sized for 3D-printed lanterns and trees.",
   "url": "https://paramlet.com/go/led-tealight-candles?src=agent",
   "relation": "material",
   "disclosure": "Affiliate link (Amazon Associates, tag paramlet-21)"
  },
  {
   "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)"
  }
 ]
}