A Base canvas
Let's first build an empty canvas, then you can add the below objects into it. Paste the code below in your shot config -
{
"duration": 1000,
"objects": [
{
"type": "shape",
"kind": "rectangle",
"color": "#F2E880",
"comment": "base canvas",
"opacity": 1,
"position": {
"x": 0,
"y": 0
},
"size": {
"h": "700",
"w": "700"
}
}
A Circle
Let's start with a very basic shape - a simple filled circle with an outline.
{
"comment": "circles",
"kind": "circle",
"stroke": {
"color": "white",
"width": 10
},
"fill": {
"value": "#FC5185",
"transform": [["alpha", 0.5]]
},
"shadow": ["white", 30, 3, 5],
"position": {
"y": 250,
"x": 350
},
"type": "shape",
"size": 70
}


Field | Description |
---|---|
type | shape |
kind | circle |
stroke - color, width | to set the color and width in pixels. |
fill - value, transform | hexcode, alpha with value |
shadow | has the following format [color value, blur, xOffset, yOffset] |
position | position of this object |
size | radius of this object (circle) |
A Polygon
{
"comment": "polygon-shape",
"type": "shape",
"kind": "polygon",
"stroke": {
"color": "#7C74D4",
"width": 10
},
"fill": "transparent",
"shadow": ["#9388E3",2, 1, 10],
"points": [
{
"y": 400,
"x": 400
},
{
"x": 450,
"y": 450
},
{
"x": 300,
"y": 500
},
{
"x": 350,
"y": 550
}
]
}


Field | Description |
---|---|
type | shape |
kind | polygon |
points (array) | Defines the points of the polygon |
Custom Rectangles
A simple rectangle
{
"comment": "blue rectangle",
"type": "shape",
"kind": "rectangle",
"color": "#3FC1C9",
"opacity": 1,
"position": {
"x": 520,
"y": 580
},
"size": {
"h": 50,
"w": 100
}
}


Field | Description |
---|---|
type | type of object, here - shape. |
kind | define kind of shape here |
color | define a CSS color or a hex-value (black/ #000000) |
opacity | level of transparency of the object |
position | The coordinated of where the rectangle object starts |
size (object) | height and width of the object respectively |
Rounded rectangle (uniform)
{
"comment": "rounded rectangle",
"type": "shape",
"kind": "rectangle",
"position": {
"y": 420,
"x": 520
},
"stroke": {
"color": "#5DADEC",
"width": 10,
"join": "bevel"
},
"fill": "#87CEFA",
"borderRadius": 30,
"size": {
"h": 100,
"w": 100
}
}


A variation to rounded rectangle
The borderRadius property also takes in array type, this can help make uneven rounded rectangular polygons. See borderRadius property below:
{
"comment": "uneven rounded rectangle",
"kind": "rectangle",
"stroke": {
"color": "#223B7D",
"width": 10,
"join": "bevel"
},
"fill": "#1D9ED9",
"position": {
"y": 280,
"x": 520
},
"borderRadius": [10, 40, 60, 40],
"type": "shape",
"size": {
"h": 100,
"w": 100
}
}


Field | Description |
---|---|
borderRadius | property that help round the corners of the rectangle.
|
Updated 8 months ago
What's Next
Color Gradients |