genie

Genie Developer Hub

Welcome to the genie developer hub. You'll find comprehensive guides and documentation to help you start working with genie as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    API Reference

Composition - Cupcakes

Learn how to stitch together different components & make customizations through code

Preparing the batter

📘

Note

every object can be treated like a layer, so the order in which components are put matters in case of overlapping objects.

Setting up the canvas

{
  "duration": 1000,
  "objects": [ <<< add the following objects here >>> ],
  "size": {
    "h": 750,
    "w": 900
  }
  • The base canvas
{
      "type": "shape",
      "kind": "rectangle",
      "color": "#eeccbe",
      "comment": "Base canvas",
      "opacity": 1,
      "position": {
        "x": -2,
        "y": 0
      },
      "size": {
        "h": 750,
        "w": 900
      }
    }
  • Adding Image canvas + shadow effect.
    The shadow is just a displaced box of the same height (h) & width (w) but with offset position.
{
      "type": "shape",
      "kind": "rectangle",
      "color": "#A9A9A9",
      "comment": "image shador",
      "opacity": 1,
      "position": {
        "x": 300,
        "y": 155
      },
      "size": {
        "h": 450,
        "w": 550
      }
    },
    
    {
      "type": "shape",
      "kind": "rectangle",
      "color": "#ffffff",
      "comment": "image canvas",
      "opacity": 1,
      "position": {
        "x": 275,
        "y": 130
      },
      "size": {
        "h": 450,
        "w": 550
      }
    }
  • Adding an image
{
      "comment": "Food image",
      "opacity": 1,
      "url": "https://lh3.googleusercontent.com/yf_qrvQ8TrrEVRmQTEnNmkFDhegNfceTE6zlJW_KpIKauA1mrHJLNNvNQJ9kC_Hzx2y3ebTmn9VlKEUQhYd0aKI",
      "position": {
        "x": 275,
        "y": 130
      },
      "type": "image",
      "size": {
        "h": 450,
        "w": 550
      }
    }
  • Vertical & horizontal decorative 'line'
{
      "type": "shape",
      "kind": "rectangle",
      "color": "#422e28",
      "comment": "vertical decorative line",
      "opacity": 1,
      "position": {
        "x": 230,
        "y": 0
      },
      "size": {
        "h": 200,
        "w": 7
      }
    },
 {
      "type": "shape",
      "kind": "rectangle",
      "color": "#422e28",
      "comment": "horizontal decorative line",
      "opacity": 1,
      "position": {
        "x": 550,
        "y": 650
      },
      "size": {
        "h": 7,
        "w": 450
      }
    }
  • Main text
{
      "comment": "Main text",
      "opacity": 1,
      "color": "#422e28",
      "text": "Cuppie\ncakes",
      "fontFamily": {
        "name": "AbrilFatface-Regular",
        "url": "https://assets.kubric.io/6e426b61-111f-4223-b73e-4808ee321772.ttf"
      },
      "fontSize": "60",
      "position": {
        "x": 150,
        "y":300
      },
      "align": "center",
      "type": "text",
      "axis": 0
    }
  • Caption
{
      "comment": "Header text",
      "opacity": 1,
      "color": "#be9371",
      "text": "TODAY'S DESSERT",
      "align": "center",
      "fontFamily": {
        "name": "Eczar semibold",
        "url": "https://storage.googleapis.com/assetlib/db37ec98-482a-44bf-92c3-1c8a5e6e139c.ttf"
      },
      "fontSize": "30",
      "position": {
        "x": 700,
        "y": 100
      },
      "type": "text",
      "axis": 0
    }

Baking the dish

📘

Parameterize shot config parts of this design to have a customizable design

{
  "duration": 1000,
  "objects": [
    {
      "type": "shape",
      "kind": "rectangle",
      "color": "{{canvas-color}}",
      "comment": "base canvas",
      "opacity": 1,
      "position": {
        "x": -2,
        "y": 0
      },
      "size": {
        "h": "{{canvas-height}}",
        "w": "{{canvas-width}}"
      }
    },
    {
      "type": "shape",
      "kind": "rectangle",
      "color": "#A9A9A9",
      "comment": "image shadow",
      "opacity": 1,
      "position": {
        "x": "[[275+20]]",
        "y": "[[130+20]]"
      },
      "size": {
        "h": "{{img-canvas-height}}",
        "w": "{{img-canvas-width}}"
      }
    },
    {
      "type": "shape",
      "kind": "rectangle",
      "color": "#ffffff",
      "comment": "image canvas",
      "opacity": 1,
      "position": {
        "x": 275,
        "y": 130
      },
      "size": {
        "h": "{{img-canvas-height}}",
        "w": "{{img-canvas-width}}"
      }
    },
    {
      "comment": "Food image",
      "opacity": 1,
      "url": "{{image-url}}",
      "position": {
        "x": 300,
        "y": 150
      },
      "type": "image",
      "size": {
        "h": "{{img-canvas-height}}",
        "w": "{{img-canvas-width}}"
      }
    },
    {
      "comment": "Main text",
      "opacity": 1,
      "color": "#422e28",
      "text": "Cuppie\ncakes",
      "fontFamily": {
        "name": "AbrilFatface-Regular",
        "url": "https://assets.kubric.io/6e426b61-111f-4223-b73e-4808ee321772.ttf"
      },
      "fontSize": "60",
      "position": {
        "x": 150,
        "y": 300
      },
      "align": "center",
      "type": "text",
      "axis": 0
    },
    {
      "comment": "Header text",
      "opacity": 1,
      "color": "#be9371",
      "text": "TODAY'S DESSERT",
      "align": "center",
      "fontFamily": {
        "name": "Eczar semibold",
        "url": "https://storage.googleapis.com/assetlib/db37ec98-482a-44bf-92c3-1c8a5e6e139c.ttf"
      },
      "fontSize": "30",
      "position": {
        "x": 700,
        "y": 100
      },
      "type": "text",
      "axis": 0
    },
    {
      "type": "shape",
      "kind": "rectangle",
      "color": "#422e28",
      "comment": "vertical decoration line",
      "opacity": 1,
      "position": {
        "x": 230,
        "y": 0
      },
      "size": {
        "h": 200,
        "w": 7
      }
    },
    {
      "type": "shape",
      "kind": "rectangle",
      "color": "#422e28",
      "comment": "horizontal decoration line",
      "opacity": 1,
      "position": {
        "x": 550,
        "y": 650
      },
      "size": {
        "h": 7,
        "w": 450
      }
    }
  ],
  "size": {
    "h": 750,
    "w": 900
  }
}
{
  "canvas-color": {
    "default": "#EECBCE",
    "type": "text",
    "title": "Canvas color"
  },
  "canvas-width": {
    "default": 900,
    "type": "text",
    "title": "canvas width"
  },
  "canvas-height": {
    "default": 750,
    "type": "text",
    "title": "canvas height"
  },
  "rectangle-color": {
    "default": "#22B299",
    "type": "text",
    "title": "rectangle-color"
  },
  "image-url": {
    "default": "https://lh3.googleusercontent.com/zZN2-3_0IFl-3laJpaqZ48qeQbDbQm7NWAQvRDHqu3q037C8gNACn1Qh_-_eSF2iye1bPJqEtuxfsrhPa5GEwl69",
    "type": "text",
    "title": "image URL"
  },
  "img-canvas-height": {
    "default": 400,
    "type": "text",
    "title": "image canvas height"
  },
  "img-canvas-width": {
    "default": 500,
    "type": "text",
    "title": "image canvas height"
  }
}

Finally -

Updated 11 months ago


What's Next

Masking - Sunlit

Composition - Cupcakes


Learn how to stitch together different components & make customizations through code

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.