Generators, shapes & text
This content is for v0.4. Switch to the latest version for up-to-date documentation.
Generated from project.v1.schema.json at the documented engine version. The schema checks shape only; the engine’s validation also checks ranges, limits, references and keyframe order.
Dash
A dash pattern.
| Field | Type | Description |
|---|---|---|
offset | Animated_float | How far into the pattern the stroke starts. Default: |
patternrequired | Animated_float[] | Alternating dash and gap lengths, as fractions of the shorter side: one to |
FillRule
Which regions of a path are inside it.
"nonzero"Where the outline winds around a point at all."evenodd"Where it winds around a point an odd number of times.
Generator
The picture of a generated source.
A generated picture has the canvas's size and aspect, like a source that fills the frame at scale 1. Positions are in its normalized space, (0, 0) top-left to (1, 1) bottom-right; lengths (radii, stroke widths) are fractions of its shorter side, so the picture is the same at any render resolution. A fill or text does not change over time (a clip animates it with its transform, effects, and masks); shapes and layouts may.
One of:
type: "fill"
Paint over the whole picture.
| Field | Type | Description |
|---|---|---|
paintrequired | Paint | What covers the picture. |
type: "shapes"
Shapes drawn from an ordered content tree, as an After Effects shape layer or a Lottie shape layer draws them. Unlike the other generators, its picture changes over time: every value in the tree may be keyframed, in the picture's time.
type: "text"
Text on a transparent picture, laid out and placed by its style as a caption track's cues are: its size and wrapping width fractions of the canvas, its anchor at style.position. The engine draws it with the fonts its host registered.
| Field | Type | Description |
|---|---|---|
style | TextStyle | How it looks and where it lies. The font size is at most Default: |
textrequired | string | The text; |
type: "layout"
Boxes laid out by CSS flexbox around their text and shapes. Its picture changes over time when any value in the tree is keyframed, in the picture's time. The engine lays it out with the fonts it draws with. See LayoutNode.
| Field | Type | Description |
|---|---|---|
rootrequired | LayoutNode | The root box: the whole picture. |
GradientStop
One color of a gradient.
| Field | Type | Description |
|---|---|---|
colorrequired | Rgba | Color at that position. |
offsetrequired | number (float) | Position along the gradient, in |
LineCap
How an open stroke ends.
"butt"Flat at the end point."round"A half circle past the end point."square"A half square past the end point.
LineJoin
How stroke segments meet at a vertex.
"miter"Extended edges meeting at a point, up to the miter limit."round"A circular arc."bevel"A straight cut across the corner.
Paint
A color or gradient.
Gradients interpolate between stops premultiplied, in linear light: the engine's working space, so a gradient between two colors passes through the physical mix of them, and a stop fading to transparent does not darken its neighbour.
A color (hex or object) is read as a solid paint of it; a paint is written back tagged.
One of:
type: "linear_gradient"
Colors along the line from start to end, constant across it.
| Field | Type | Description |
|---|---|---|
endrequired | Vec2 | Where offset 1 lies. Distinct from |
spread | Spread | What lies beyond the first and last offsets. Default: |
startrequired | Vec2 | Where offset 0 lies. |
stopsrequired | GradientStop[] | Two to |
type: "radial_gradient"
Colors along the radius of a circle.
| Field | Type | Description |
|---|---|---|
centerrequired | Vec2 | Where offset 0 lies. |
radiusrequired | number (float) | The distance of offset 1 from the centre, as a fraction of the picture's shorter side. Positive. |
spread | Spread | What lies beyond the first and last offsets. Default: |
stopsrequired | GradientStop[] | Two to |
type: "conic_gradient"
Colors around a point: offsets 0 to 1 are one clockwise turn.
| Field | Type | Description |
|---|---|---|
angle_degrees | number (float) | Where offset 0 lies, in degrees clockwise from straight up. Default: |
centerrequired | Vec2 | The point the gradient turns around. |
stopsrequired | GradientStop[] | Two to |
<a href="/0.4/reference/project-schema/animation/#rgba">Rgba</a>
Path
One or more subpaths.
| Field | Type | Description |
|---|---|---|
subpathsrequired | Subpath[] | The subpaths, at most |
PathVertex
A path vertex and its tangents. The segment from vertex a to vertex b is the cubic Bezier through a.point, a.point + a.out_tangent, b.point + b.in_tangent, and b.point; zero tangents make it straight.
PolystarKind
What kind of figure a polystar is.
"star"Points joined by inner corners."polygon"Points joined by straight sides.
ShapeGeometry
A geometry alone, as a mask's outline is.
One of:
type: "rectangle"
A rectangle, optionally with rounded corners.
| Field | Type | Description |
|---|---|---|
centerrequired | AnimatedPoint | Centre. |
corner_radius | Animated_float | Corner radius, as a fraction of the shorter side. Non-negative; a radius past half the rectangle is capped. Default: |
rotation_degrees | Animated_float | Clockwise rotation about the centre, in degrees. Default: |
sizerequired | Animated_Vec2 | Full width and height, before rotation, per axis: x a fraction of the picture's width, y of its height. Non-negative. |
type: "ellipse"
An ellipse.
| Field | Type | Description |
|---|---|---|
centerrequired | AnimatedPoint | Centre. |
rotation_degrees | Animated_float | Clockwise rotation about the centre, in degrees. Default: |
sizerequired | Animated_Vec2 | Full width and height, before rotation, per axis: x a fraction of the picture's width, y of its height. Non-negative. |
type: "polystar"
A regular polygon or star.
| Field | Type | Description |
|---|---|---|
centerrequired | AnimatedPoint | Centre. |
inner_radius | Animated_float | A star's distance of its inner corners from the centre. Non-negative. Default: |
inner_roundness | Animated_float | How round a star's inner corners are, in Default: |
kindrequired | PolystarKind | A polygon or a star. |
outer_radiusrequired | Animated_float | Distance of the points from the centre, as a fraction of the shorter side. Non-negative. |
outer_roundness | Animated_float | How round the outer corners are: 0 sharp, 1 a smooth curve through them. In Default: |
pointsrequired | Animated_float | Number of points (corners of a polygon, tips of a star), from |
rotation_degrees | Animated_float | Clockwise rotation about the centre, in degrees. Default: |
ShapeItem
One entry of a shapes generator's content tree.
A group is read front to back. Geometry accumulates in its group; a fill or a stroke paints the geometry listed before it in the same group, nested groups before it included; a trim cuts that geometry and replaces it. A paint listed earlier is drawn on top of one listed later, as in After Effects and Lottie.
One of:
type: "group"
Items drawn together, through one transform and opacity. Their geometry also counts as the enclosing group's, for the paints and trims after the group.
| Field | Type | Description |
|---|---|---|
itemsrequired | ShapeItem[] | The group's items, front first. |
transform | ShapeTransform | Where the group lies, and how opaque it is. Default: |
type: "rectangle"
A rectangle, optionally with rounded corners.
| Field | Type | Description |
|---|---|---|
centerrequired | AnimatedPoint | Centre. |
corner_radius | Animated_float | Corner radius, as a fraction of the shorter side. Non-negative; a radius past half the rectangle is capped. Default: |
rotation_degrees | Animated_float | Clockwise rotation about the centre, in degrees. Default: |
sizerequired | Animated_Vec2 | Full width and height, before rotation, per axis: x a fraction of the picture's width, y of its height. Non-negative. |
type: "ellipse"
An ellipse.
| Field | Type | Description |
|---|---|---|
centerrequired | AnimatedPoint | Centre. |
rotation_degrees | Animated_float | Clockwise rotation about the centre, in degrees. Default: |
sizerequired | Animated_Vec2 | Full width and height, before rotation, per axis: x a fraction of the picture's width, y of its height. Non-negative. |
type: "polystar"
A regular polygon or star.
| Field | Type | Description |
|---|---|---|
centerrequired | AnimatedPoint | Centre. |
inner_radius | Animated_float | A star's distance of its inner corners from the centre. Non-negative. Default: |
inner_roundness | Animated_float | How round a star's inner corners are, in Default: |
kindrequired | PolystarKind | A polygon or a star. |
outer_radiusrequired | Animated_float | Distance of the points from the centre, as a fraction of the shorter side. Non-negative. |
outer_roundness | Animated_float | How round the outer corners are: 0 sharp, 1 a smooth curve through them. In Default: |
pointsrequired | Animated_float | Number of points (corners of a polygon, tips of a star), from |
rotation_degrees | Animated_float | Clockwise rotation about the centre, in degrees. Default: |
type: "fill"
Paints the inside of the geometry listed before it in its group, all of it as one compound path under rule. An open path is closed for it.
| Field | Type | Description |
|---|---|---|
opacity | Animated_float | Opacity in Default: |
paintrequired | Animated_Paint | What covers it. |
rule | FillRule | Which regions of the compound path are inside. Default: |
type: "stroke"
Strokes the geometry listed before it in its group.
| Field | Type | Description |
|---|---|---|
cap | LineCap | How open ends look. Default: |
dash | Dash | null | Dashes, or a solid stroke when absent. Default: |
join | LineJoin | How segments meet. Default: |
miter_limit | number (float) | Longest a miter join reaches, as a multiple of half the width, before it is beveled. At least 1. Default: |
opacity | Animated_float | Opacity in Default: |
paintrequired | Animated_Paint | What covers the stroke. |
widthrequired | Animated_float | Full width, as a fraction of the shorter side. Non-negative; zero draws nothing. |
type: "trim"
Keeps part of the geometry listed before it in its group, by length.
| Field | Type | Description |
|---|---|---|
endrequired | Animated_float | Where it ends, in |
mode | TrimMode | Whether the span is of all the geometry together or of each part. Default: |
offset | Animated_float | Turns the span is shifted by; it wraps around a closed path. Default: |
startrequired | Animated_float | Where the kept span starts, as a fraction of the length, in |
ShapeMask
A shape that limits where a clip is visible.
Geometry is in the clip's source space, before its transform, so the mask moves with the clip: (0, 0) is the source's top-left corner and (1, 1) its bottom-right. Distances (feather, a rectangle's corner_radius, a polystar's radii) are fractions of that space's shorter side, so a mask covers the same part of the picture at any render resolution.
| Field | Type | Description |
|---|---|---|
feather | Animated_float | How soft the edge is. Non-negative; zero is the outline's antialiased edge. The coverage is blurred by a Gaussian of standard deviation Default: |
fill_rule | FillRule | Which regions of the outline are inside it. Default: |
invert | boolean | Whether the mask keeps the outside of the shape instead of its inside. Default: |
mode | MaskMode | How this mask combines with the ones before it. Default: |
shaperequired | ShapeGeometry | The shape's outline, as a shapes generator's geometry. |
ShapeTransform
A group's placement: in pixel space, translate by position, rotate, scale, and translate by minus anchor, so anchor lands on position. The default leaves its items where they are.
| Field | Type | Description |
|---|---|---|
anchor | Animated_Vec2 | The point of the items that is placed at Default: |
opacity | Animated_float | Opacity of the group as a whole, in Default: |
position | AnimatedPoint | Where Default: |
rotation_degrees | Animated_float | Clockwise rotation, in degrees. Default: |
scale | Animated_Vec2 | Per-axis scale; 1 leaves the items unscaled. Stroke widths scale with it. Default: |
Spread
What a linear or radial gradient shows outside its first and last stops.
"pad"The end colors continue."repeat"The gradient starts again."reflect"The gradient runs back and forth.
Subpath
A run of vertices joined by cubic Bezier segments.
| Field | Type | Description |
|---|---|---|
closed | boolean | Whether a segment joins the last vertex back to the first. Default: |
verticesrequired | PathVertex[] | The vertices, in order. |
TextAlign
How lines of text align within it.
"start"Left."center"Centred."end"Right.
TextBackground
A box behind each line of text.
| Field | Type | Description |
|---|---|---|
colorrequired | Rgba | Box color. |
padding | number (float) | Space between the text and the box edge, as a fraction of the font size, in Default: |
TextOutline
A band around the glyphs, drawn behind them.
| Field | Type | Description |
|---|---|---|
colorrequired | Rgba | Band color. |
widthrequired | number (float) | Band width as a fraction of the font size, in |
TextStyle
How text looks and where it lies: a caption track's cues, or a text Generator.
Sizes are resolution-independent: the font size is a fraction of the canvas's shorter side, as every other length is, the wrapping width a fraction of the canvas width, and the outline and background padding fractions of the font size. The engine draws with the fonts its host registered: those of font_family first, then the rest in their fallback order.
| Field | Type | Description |
|---|---|---|
align | TextAlign | How lines align within the text. Default: |
anchor | Vec2 | The point of the text, background included, placed at Default: |
background | TextBackground | null | A box behind each line. Default: |
color | Rgba | Text color. Default: |
font_family | string | null | The family the text draws in, as the font's own name table gives it (typographic family, else family), matched without regard to ASCII case. Glyphs its fonts lack, and a family no registered font has, draw from the other fonts in fallback order. |
font_size | number (float) | Font size as a fraction of the canvas's shorter side: positive, at most Default: |
font_weight | integer (uint16) | The weight, in Default: |
letter_spacing | number (float) | Space after each character, as a fraction of the font size, in Default: |
line_height | number (float) | Baseline-to-baseline distance in font sizes, in Default: |
max_width | number (float) | Width text wraps at, as a fraction of the canvas width, in Default: |
outline | TextOutline | null | A band around the glyphs. Default: |
position | Vec2 | Where on the canvas the text's anchor lies, Default: |
TrimMode
What a trim measures.
"together"One span over the length of every subpath end to end, in order."individually"A span of each subpath alone.
