{
  "$schema": "../../schema.json",
  "id": "halftone-clay",
  "type": "background",
  "title": "Halftone Dots · clay on sand",
  "summary": "A halftone-dot image filter featuring customizable grids, color palettes, and dot styles, in clay on sand.",
  "tags": [
    "background",
    "halftone-dots",
    "still",
    "light",
    "image",
    "clay"
  ],
  "version": "1.0.0",
  "license": "MIT",
  "params": [
    {
      "name": "contrast",
      "type": "number",
      "default": 0.5,
      "description": "contrast",
      "min": 0,
      "max": 1,
      "step": 0.005,
      "group": "main"
    },
    {
      "name": "originalColors",
      "type": "boolean",
      "default": false,
      "description": "Use sampled image's original colors instead of colorFront",
      "group": "advanced"
    },
    {
      "name": "inverted",
      "type": "boolean",
      "default": false,
      "description": "Inverts the image luminance, doesn't affect the color scheme, needs contrast > 0",
      "group": "advanced"
    },
    {
      "name": "grid",
      "type": "enum",
      "default": "hex",
      "options": [
        "square",
        "hex"
      ],
      "description": "Grid type (0 = square, 1 = hex)",
      "group": "advanced"
    },
    {
      "name": "radius",
      "type": "number",
      "default": 1.25,
      "description": "radius",
      "min": 0,
      "max": 2,
      "step": 0.01,
      "group": "main"
    },
    {
      "name": "size",
      "type": "number",
      "default": 0.5,
      "description": "dot or pattern size",
      "min": 0,
      "max": 1,
      "step": 0.005,
      "group": "main"
    },
    {
      "name": "scale",
      "type": "number",
      "default": 1,
      "description": "zoom of the pattern",
      "min": 0.1,
      "max": 4,
      "step": 0.01,
      "group": "main"
    },
    {
      "name": "grainMixer",
      "type": "number",
      "default": 0.2,
      "description": "grain mixed into the colors",
      "min": 0,
      "max": 1,
      "step": 0.005,
      "group": "advanced"
    },
    {
      "name": "grainOverlay",
      "type": "number",
      "default": 0.2,
      "description": "grain laid over the image",
      "min": 0,
      "max": 1,
      "step": 0.005,
      "group": "advanced"
    },
    {
      "name": "grainSize",
      "type": "number",
      "default": 0.5,
      "description": "grain size",
      "min": 0,
      "max": 1,
      "step": 0.005,
      "group": "advanced"
    },
    {
      "name": "type",
      "type": "enum",
      "default": "classic",
      "options": [
        "classic",
        "gooey",
        "holes",
        "soft"
      ],
      "description": "variant",
      "group": "advanced"
    },
    {
      "name": "fit",
      "type": "string",
      "default": "cover",
      "description": "How to fit the rendered shader into the canvas dimensions (0 = none, 1 = contain, 2 = cover)",
      "group": "advanced"
    },
    {
      "name": "colorFront",
      "type": "color",
      "default": "#8A4F3D",
      "description": "foreground color",
      "group": "main"
    },
    {
      "name": "colorBack",
      "type": "color",
      "default": "#00000000",
      "description": "background color behind the effect",
      "group": "main"
    }
  ],
  "install": {
    "kind": "shader-set",
    "entry": {
      "shader": "HalftoneDots",
      "props": {
        "contrast": 0.5,
        "originalColors": false,
        "inverted": false,
        "grid": "hex",
        "radius": 1.25,
        "size": 0.5,
        "scale": 1,
        "grainMixer": 0.2,
        "grainOverlay": 0.2,
        "grainSize": 0.5,
        "type": "classic",
        "fit": "cover",
        "colorFront": "#8A4F3D",
        "colorBack": "#00000000"
      },
      "background": "#EADBC8",
      "image": "assets/materials/material-b.jpg"
    }
  },
  "files": [
    {
      "path": "brand/assets/materials/material-b.jpg",
      "url": "https://paper-motion.vercel.app/files/material-b.jpg",
      "from": "registry/_assets/materials/material-b.jpg"
    }
  ],
  "requires": {
    "engine": ">=0.2.0"
  },
  "usage": "import { loadBrand } from 'paper-motion/brand';\n\nconst B = await loadBrand();\n// a full-frame element <div id=\"bg\"></div> behind everything:\nB.shader(s, '#bg', 'halftone-clay');",
  "notes": [
    "Paper shader `HalftoneDots` (still). Tuned by hand in Paper.",
    "Its image is a remote URL; swap `image` for your own picture."
  ],
  "preview": {
    "poster": "previews/halftone-clay.jpg"
  },
  "colors": [
    "#eadbc8",
    "#8a4f3d"
  ],
  "mode": "light",
  "motion": "still",
  "mood": [
    "editorial",
    "raw",
    "playful"
  ],
  "when": [
    "a quiet ground behind type",
    "a light editorial piece",
    "you have a photo or a logo to run through it"
  ]
}