{
  "fonts": [
    { "family": "Schibsted Grotesk", "path": "fonts/SchibstedGrotesk.ttf" },
    { "family": "JetBrains Mono", "path": "fonts/JetBrainsMono.ttf" }
  ],
  "compositions": [{
    "id": "donut", "description": "A donut chart from one repeated arc: cumulative start angles, one continuous sweep, and a legend from the same arrays",
    "width": 1280, "height": 720, "fps": 30, "duration": "4s",
    "background": "#f4f1ea",
    "props": { "pct": [42, 28, 18, 12], "start": [0, 42, 70, 88], "names": ["Rust", "JSON", "ffmpeg", "Coffee"] },
    "layers": [
      { "id": "track", "type": "arc", "width": 380, "x": 420, "y": 360, "stroke": "#e9e4d8", "strokeWidth": 54 },
      { "id": "slice", "type": "arc", "width": 380, "x": 420, "y": 360, "strokeWidth": 54, "lineCap": "butt", "repeat": 4,
        "startAngle": "=pick(i, {{start}}) * 3.6 + 1",
        "endAngle": "=max(pick(i, {{start}}) * 3.6 + 1, min((pick(i, {{start}}) + pick(i, {{pct}})) * 3.6 - 1, 360 * easeInOutCubic(clamp(t / 1.8, 0, 1))))",
        "stroke": "=pick(i, ['#c92a26', '#161412', '#8a857a', '#d8d1c1'])" },
      { "id": "center", "type": "text", "text": "${round(42 * easeOutCubic(clamp(t / 1.2, 0, 1)))}%", "font": "Schibsted Grotesk",
        "fontWeight": 860, "fontSize": 96, "letterSpacing": -4, "fill": "#161412", "x": 420, "y": 346 },
      { "id": "center-label", "type": "text", "text": "of the stack", "font": "JetBrains Mono", "fontSize": 14, "letterSpacing": 1.7,
        "uppercase": true, "fill": "#8a857a", "x": 420, "y": 416 },
      { "id": "legend", "type": "group", "width": 360, "height": 64, "anchor": "left", "x": 760, "y": 360,
        "repeat": { "count": 4, "layout": "column", "spacing": 76, "delay": "0.15s" }, "start": "0.6s", "enter": "fadeLeft",
        "children": [
          { "id": "swatch", "type": "ellipse", "width": 16, "x": 8, "y": 32,
            "fill": "=pick(i, ['#c92a26', '#161412', '#8a857a', '#d8d1c1'])" },
          { "id": "name", "type": "text", "text": "${pick(i, {{names}})}", "font": "Schibsted Grotesk", "fontWeight": 860,
            "fontSize": 38, "letterSpacing": -1.5, "fill": "#161412", "anchor": "left", "x": 36, "y": 30 },
          { "id": "pct", "type": "text", "text": "${pick(i, {{pct}})}%", "font": "JetBrains Mono", "fontSize": 20,
            "fill": "#8a857a", "anchor": "right", "x": 360, "y": 32 }
        ] }
    ]
  }]
}
