Skip to content

Generators, shapes & text

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.

FieldTypeDescription
offsetAnimated_float

How far into the pattern the stroke starts.

Default: {"mode":"constant","value":0}

patternrequiredAnimated_float[]

Alternating dash and gap lengths, as fractions of the shorter side: one to MAX_DASH_ENTRIES non-negative entries, not all zero. An odd count repeats once more to pair up.

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. Positions are normalized, (0, 0) top-left to (1, 1) bottom-right, and lengths are fractions of the shorter side, so the picture is the same at any render resolution. A fill never changes over time; text changes only through its style's animators; shapes and layouts may change.

One of:

type: "fill"

Paint over the whole picture.

FieldTypeDescription
paintrequiredPaint

What covers the picture.

type: "shapes"

Shapes drawn from an ordered content tree, as an After Effects or Lottie shape layer draws them. Every value in the tree may be keyframed in picture time.

FieldTypeDescription
itemsrequiredShapeItem[]

The content tree, front first. See ShapeItem.

type: "text"

Text on a transparent picture, laid out and placed by its style as caption cues are, and drawn with the host's registered fonts.

FieldTypeDescription
styleTextStyle

How it looks and where it lies. The font size is at most MAX_TEXT_GENERATOR_FONT_SIZE.

Default: {"align":"center","anchor":{"x":0.5,"y":1},"background":n…

textrequiredTextContent

The text, a string or runs; \n starts a line. Non-empty, at most MAX_TEXT_CONTENT_BYTES bytes. Run times are picture time.

type: "layout"

Boxes laid out by CSS flexbox around their text and shapes, with the engine's fonts. Any value in the tree may be keyframed in picture time. See LayoutNode.

FieldTypeDescription
rootrequiredLayoutNode

The root box: the whole picture.

GradientStop

One color of a gradient.

FieldTypeDescription
colorrequiredRgba

Color at that position.

offsetrequirednumber (float)

Position along the gradient, in 0..=1, not before the previous stop.

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 premultiplied stops in linear light, so a gradient between two colors passes through their physical mix and a stop fading to transparent does not darken its neighbour. A bare color is read as a solid paint; paints are written back tagged.

One of:

type: "solid"

One color.

FieldTypeDescription
colorrequiredRgba

The color.

type: "linear_gradient"

Colors along the line from start to end, constant across it.

FieldTypeDescription
endrequiredVec2

Where offset 1 lies. Distinct from start.

spreadSpread

What lies beyond the first and last offsets.

Default: "pad"

startrequiredVec2

Where offset 0 lies.

stopsrequiredGradientStop[]

Two to MAX_GRADIENT_STOPS stops.

type: "radial_gradient"

Colors along the radius of a circle.

FieldTypeDescription
centerrequiredVec2

Where offset 0 lies.

radiusrequirednumber (float)

The distance of offset 1 from the centre, as a fraction of the picture's shorter side. Positive.

spreadSpread

What lies beyond the first and last offsets.

Default: "pad"

stopsrequiredGradientStop[]

Two to MAX_GRADIENT_STOPS stops.

type: "conic_gradient"

Colors around a point: offsets 0 to 1 are one clockwise turn.

FieldTypeDescription
angle_degreesnumber (float)

Where offset 0 lies, in degrees clockwise from straight up.

Default: 0

centerrequiredVec2

The point the gradient turns around.

stopsrequiredGradientStop[]

Two to MAX_GRADIENT_STOPS stops.

<a href="/reference/project-schema/animation/#rgba">Rgba</a>

Path

One or more subpaths.

FieldTypeDescription
subpathsrequiredSubpath[]

The subpaths, at most MAX_PATH_SUBPATHS, with at most MAX_PATH_VERTICES vertices in total.

PathVertex

A path vertex and its tangents. The segment from a to 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.

FieldTypeDescription
in_tangentVec2

The control point of the segment ending here, relative to point.

Default: {"x":0,"y":0}

out_tangentVec2

The control point of the segment starting here, relative to point.

Default: {"x":0,"y":0}

pointrequiredVec2

Where the vertex lies.

PolystarKind

What kind of figure a polystar is.

  • "star" Points joined by inner corners.
  • "polygon" Points joined by straight sides.

RangeShape

How selection rises and falls across a Range selector's range.

  • "square" Fully selected inside the range, partly at fractional ends.
  • "ramp_up" Rising from the start to the end.
  • "ramp_down" Falling from the start to the end.
  • "triangle" Rising to the middle, falling after it.
  • "round" A half circle over the range.
  • "smooth" The triangle eased by smoothstep.

RangeUnits

What a Range selector's start, end and offset count in.

  • "percent" Percents of the units.
  • "index" Unit indices.

RunState

Which runs a Timing selector selects.

  • "upcoming" Runs whose time has not started.
  • "active" Runs whose time holds the current time.
  • "spoken" Runs whose time has ended.

RunTime

A run's time span.

FieldTypeDescription
endrequiredMediaTime

When it ends; after start.

startrequiredMediaTime

When it starts.

ShapeGeometry

A geometry alone, as a mask's outline is.

One of:

type: "rectangle"

A rectangle, optionally with rounded corners.

FieldTypeDescription
centerrequiredAnimatedPoint

Centre.

corner_radiusAnimated_float

Corner radius, as a fraction of the shorter side. Non-negative; capped at half the rectangle.

Default: {"mode":"constant","value":0}

rotation_degreesAnimated_float

Clockwise rotation about the centre, in degrees.

Default: {"mode":"constant","value":0}

sizerequiredAnimated_Vec2

Full width and height before rotation: x a fraction of the picture's width, y of its height. Non-negative.

type: "ellipse"

An ellipse.

FieldTypeDescription
centerrequiredAnimatedPoint

Centre.

rotation_degreesAnimated_float

Clockwise rotation about the centre, in degrees.

Default: {"mode":"constant","value":0}

sizerequiredAnimated_Vec2

Full width and height before rotation: x a fraction of the picture's width, y of its height. Non-negative.

type: "polystar"

A regular polygon or star.

FieldTypeDescription
centerrequiredAnimatedPoint

Centre.

inner_radiusAnimated_float

A star's distance of its inner corners from the centre. Non-negative.

Default: {"mode":"constant","value":0}

inner_roundnessAnimated_float

How round a star's inner corners are, in 0..=1.

Default: {"mode":"constant","value":0}

kindrequiredPolystarKind

A polygon or a star.

outer_radiusrequiredAnimated_float

Distance of the points from the centre, as a fraction of the shorter side. Non-negative.

outer_roundnessAnimated_float

How round the outer corners are, in 0..=1: 0 sharp, 1 a smooth curve through them.

Default: {"mode":"constant","value":0}

pointsrequiredAnimated_float

Number of points (polygon corners or star tips), from MIN_POLYSTAR_POINTS to MAX_POLYSTAR_POINTS. A fraction is dropped when drawn, as Lottie does, so an animated count changes one whole point at a time.

rotation_degreesAnimated_float

Clockwise rotation about the centre, in degrees.

Default: {"mode":"constant","value":0}

type: "path"

A Bezier path.

FieldTypeDescription
pathrequiredAnimated_Path

The path.

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 stroke paints the geometry listed before it in the same group (nested groups included), and a trim cuts and replaces that geometry. Earlier paints draw on top of later ones, 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 paints and trims after the group.

FieldTypeDescription
itemsrequiredShapeItem[]

The group's items, front first.

transformShapeTransform

Where the group lies, and how opaque it is.

Default: {"anchor":{"mode":"constant","value":{"x":0,"y":0}},"opac…

type: "rectangle"

A rectangle, optionally with rounded corners.

FieldTypeDescription
centerrequiredAnimatedPoint

Centre.

corner_radiusAnimated_float

Corner radius, as a fraction of the shorter side. Non-negative; capped at half the rectangle.

Default: {"mode":"constant","value":0}

rotation_degreesAnimated_float

Clockwise rotation about the centre, in degrees.

Default: {"mode":"constant","value":0}

sizerequiredAnimated_Vec2

Full width and height before rotation: x a fraction of the picture's width, y of its height. Non-negative.

type: "ellipse"

An ellipse.

FieldTypeDescription
centerrequiredAnimatedPoint

Centre.

rotation_degreesAnimated_float

Clockwise rotation about the centre, in degrees.

Default: {"mode":"constant","value":0}

sizerequiredAnimated_Vec2

Full width and height before rotation: x a fraction of the picture's width, y of its height. Non-negative.

type: "polystar"

A regular polygon or star.

FieldTypeDescription
centerrequiredAnimatedPoint

Centre.

inner_radiusAnimated_float

A star's distance of its inner corners from the centre. Non-negative.

Default: {"mode":"constant","value":0}

inner_roundnessAnimated_float

How round a star's inner corners are, in 0..=1.

Default: {"mode":"constant","value":0}

kindrequiredPolystarKind

A polygon or a star.

outer_radiusrequiredAnimated_float

Distance of the points from the centre, as a fraction of the shorter side. Non-negative.

outer_roundnessAnimated_float

How round the outer corners are, in 0..=1: 0 sharp, 1 a smooth curve through them.

Default: {"mode":"constant","value":0}

pointsrequiredAnimated_float

Number of points (polygon corners or star tips), from MIN_POLYSTAR_POINTS to MAX_POLYSTAR_POINTS. A fraction is dropped when drawn, as Lottie does, so an animated count changes one whole point at a time.

rotation_degreesAnimated_float

Clockwise rotation about the centre, in degrees.

Default: {"mode":"constant","value":0}

type: "path"

A Bezier path.

FieldTypeDescription
pathrequiredAnimated_Path

The path.

type: "fill"

Paints the inside of the geometry listed before it in its group, as one compound path under rule. Open paths are closed for it.

FieldTypeDescription
opacityAnimated_float

Opacity in 0..=1.

Default: {"mode":"constant","value":1}

paintrequiredAnimated_Paint

What covers it.

ruleFillRule

Which regions of the compound path are inside.

Default: "nonzero"

type: "stroke"

Strokes the geometry listed before it in its group.

FieldTypeDescription
capLineCap

How open ends look.

Default: "butt"

dashDash | null

Dashes, or a solid stroke when absent.

Default: null

joinLineJoin

How segments meet.

Default: "miter"

miter_limitnumber (float)

Longest a miter join reaches, as a multiple of half the width, before it is beveled. At least 1.

Default: 4

opacityAnimated_float

Opacity in 0..=1.

Default: {"mode":"constant","value":1}

paintrequiredAnimated_Paint

What covers the stroke.

widthrequiredAnimated_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.

FieldTypeDescription
endrequiredAnimated_float

Where it ends, in 0..=1. Nothing is kept unless it is after start.

modeTrimMode

Whether the span is of all the geometry together or of each part.

Default: "together"

offsetAnimated_float

Turns the span is shifted by; it wraps around a closed path.

Default: {"mode":"constant","value":0}

startrequiredAnimated_float

Where the kept span starts, as a fraction of the length, in 0..=1.

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, (1, 1) its bottom-right. Distances (feather, corner_radius, polystar radii) are fractions of that space's shorter side.

FieldTypeDescription
featherAnimated_float

Edge softness, non-negative; zero is the outline's antialiased edge. Coverage is blurred by a Gaussian with standard deviation 0.3125 * feather, a 10-90% ramp of 0.8 * feather.

Default: {"mode":"constant","value":0}

fill_ruleFillRule

Which regions of the outline are inside it.

Default: "nonzero"

invertboolean

Whether the mask keeps the outside of the shape instead of its inside.

Default: false

modeMaskMode

How this mask combines with the ones before it.

Default: "add"

shaperequiredShapeGeometry

The shape's outline, as a shapes generator's geometry.

ShapeTransform

A group's placement. In pixel space: translate by position, rotate, scale, then translate by minus anchor, so anchor lands on position. The default is identity.

FieldTypeDescription
anchorAnimated_Vec2

The point of the items that is placed at position.

Default: {"mode":"constant","value":{"x":0,"y":0}}

opacityAnimated_float

Opacity of the group as a whole, in 0..=1; overlapping items are composited first and faded together.

Default: {"mode":"constant","value":1}

positionAnimatedPoint

Where anchor is placed.

Default: {"mode":"constant","value":{"x":0,"y":0}}

rotation_degreesAnimated_float

Clockwise rotation, in degrees.

Default: {"mode":"constant","value":0}

scaleAnimated_Vec2

Per-axis scale; 1 leaves the items unscaled. Stroke widths scale with it.

Default: {"mode":"constant","value":{"x":1,"y":1}}

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.

FieldTypeDescription
closedboolean

Whether a segment joins the last vertex back to the first.

Default: false

verticesrequiredPathVertex[]

The vertices, in order.

TextAlign

How lines of text align within it.

  • "start" Left.
  • "center" Centred.
  • "end" Right.

TextAnimator

One animator: what it selects, and what it does to what it selects.

FieldTypeDescription
propertiesTextAnimatorProperties

Applied to each character in proportion to its selection.

Default: {}

selectorrequiredTextSelector

Gives each character its selection, in [0, 1].

TextAnimatorProperties

What an animator does to each character, in proportion to its selection. A property left out does nothing.

FieldTypeDescription
fillAnimated_Rgba | null

The fill color a fully selected character takes; a gradient fill is mixed toward it.

offsetAnimated_Vec2 | null

Moves the character, in font sizes, +y down.

opacityAnimated_float | null

The opacity a fully selected character takes, in [0, 1].

rotation_degreesAnimated_float | null

Turns the character about its centre, clockwise degrees.

scaleAnimated_Vec2 | null

Scales the character about its centre; 1 is none. Each axis in [0, 10].

strokeAnimated_Rgba | null

The color every stroke of a fully selected character takes.

trackingAnimated_float | null

Space added after the character, in font sizes, in [-0.5, 1], as letter spacing adds it. Lines are not re-broken.

TextBackground

A box behind each line of text.

FieldTypeDescription
colorrequiredRgba

Box color.

paddingnumber (float)

Space between the text and the box edge, as a fraction of the font size, in [0, 2].

Default: 0

TextContent

A text: one string, or runs whose texts joined are the text.

Written as "Hello" or [{ "text": "Hel" }, { "text": "lo", "class": ["key"] }].

One of:

string

One string; \n starts a line.

<a href="#textrun">TextRun</a>[]

Runs in order; their texts joined are the text.

TextRun

A piece of a text that animators' Class and Timing selectors can pick.

FieldTypeDescription
classstring[]

Names Class selectors match, each 1 to 64 bytes of A-Z, a-z, 0-9, _ and -; at most MAX_RUN_CLASSES.

textrequiredstring

Non-empty; \n starts a line. A grapheme cluster spanning two runs belongs to the run holding its first byte.

timeRunTime | null

When the run is said, from the holder's start (a caption cue's start, or a text generator's picture time zero).

TextSelector

How an animator selects characters.

One of:

type: "range"

A range over the text's units, shaped at its ends, like After Effects' range selector.

FieldTypeDescription
amountAnimated_float

The selection's scale, in [0, 1]. Default 1.

Default: {"mode":"constant","value":1}

based_onTextUnit

What the range counts: characters (the default), non-space characters, words, or lines.

Default: "characters"

endAnimated_float

Where it ends, in the same range. Default 100.

Default: {"mode":"constant","value":100}

offsetAnimated_float

Added to start and end, in the same range. Default 0.

Default: {"mode":"constant","value":0}

shapeRangeShape

How selection rises and falls across the range.

Default: "square"

startAnimated_float

Where the range starts: [-100, 200] percent, or [-N, 2N] units for N of MAX_RANGE_INDEX. Default 0.

Default: {"mode":"constant","value":0}

unitsRangeUnits

Whether start, end and offset are percents of the units (the default) or unit indices.

Default: "percent"

type: "timing"

Characters of timed runs, by the run's time against the current time.

FieldTypeDescription
rampMediaTime

How long the state takes to fade in and out; zero switches.

Default: 0

staterequiredRunState

Which runs it selects: those not yet said, being said, or said.

sweepboolean

Splits each run's span over its characters in order, sweeping the run character by character.

Default: false

type: "class"

Characters of runs that carry a class.

FieldTypeDescription
classrequiredstring

The class name.

TextShadow

A shadow of a text's glyphs and strokes, behind them.

FieldTypeDescription
blurnumber (float)

Blur radius in font sizes, as CSS text-shadow takes it (the Gaussian's standard deviation is half of it). In [0, 1] (MAX_TEXT_SHADOW_BLUR).

Default: 0

colorrequiredRgba

Shadow color.

offsetVec2

Offset in font sizes, +x right, +y down; each component in [-1, 1] (MAX_TEXT_SHADOW_OFFSET).

Default: {"x":0,"y":0}

TextStroke

A band around the glyphs and the strokes listed before it, drawn behind them.

FieldTypeDescription
colorrequiredRgba

Band color.

widthrequirednumber (float)

Band width as a fraction of the font size, positive; a text's strokes sum to at most MAX_TEXT_STROKE_EXTENT.

TextStyle

How text looks and where it lies, for caption cues or a text Generator.

The font size is a fraction of the canvas's shorter side, the wrapping width a fraction of the canvas width, and strokes, shadows and padding fractions of the font size. The engine draws with its host's registered fonts, font_family first, then the rest in fallback order.

Painting is bottom to top as in CSS: background boxes, shadows (last listed lowest), strokes (outermost lowest), fill, then color glyphs.

FieldTypeDescription
alignTextAlign

How lines align within the text.

Default: "center"

anchorVec2

The point of the text, background included, placed at position; (0.5, 1) is its bottom centre.

Default: {"x":0.5,"y":1}

animatorsTextAnimator[]

Per-character motion and color, applied in order, at most MAX_TEXT_ANIMATORS. Keyframes are in the holder's time (since a caption cue's start, or a text generator's picture time). They never change line layout.

backgroundTextBackground | null

A box behind each line.

Default: null

fillPaint

What paints the glyphs; a color reads as a solid paint. Gradient positions are in the text's layout box, (0, 0) top-left to (1, 1) bottom-right, and a radial radius is a fraction of the box's shorter side. Default solid white.

Default: {"color":{"alpha":1,"blue":1,"green":1,"red":1},"type":"s…

font_familystring | null

The family, as the font's name table gives it (typographic family, else family), matched ASCII case-insensitively. Missing glyphs and unknown families fall back to the other fonts in order; None uses the fallback order alone. Non-empty, at most MAX_FONT_FAMILY_BYTES bytes.

font_sizenumber (float)

Font size as a fraction of the canvas's shorter side: positive, at most MAX_CAPTION_FONT_SIZE on a caption track and MAX_TEXT_GENERATOR_FONT_SIZE in a text generator.

Default: 0.05

font_weightinteger (uint16)

The weight in [1, 1000] used to match a family's faces, as CSS Fonts 4 matches font-weight. Variable faces draw at it, clamped to their wght axis; no face is synthetically emboldened.

Default: 400

letter_spacingnumber (float)

Space after each character, as a fraction of the font size, in [-0.5, 1], added as CSS letter-spacing does: none after a line's last character or within cursive scripts such as Arabic. A non-zero value turns optional ligatures off.

Default: 0

line_heightnumber (float)

Baseline-to-baseline distance in font sizes, in [0.5, 3]. Each line's em box (0.8 font sizes above the baseline, 0.2 below) is centred in a taller line.

Default: 1.2

max_widthnumber (float)

Width text wraps at, as a fraction of the canvas width, in (0, 1].

Default: 0.9

positionVec2

Where on the canvas the text's anchor lies, (0, 0) top-left to (1, 1) bottom-right.

Default: {"x":0.5,"y":0.92}

shadowsTextShadow[]

Shadows of the glyphs and strokes, the first on top, as CSS text-shadow lists them. At most MAX_TEXT_SHADOWS.

strokesTextStroke[]

Bands around the glyphs, innermost first, each outside the one before. At most MAX_TEXT_STROKES, widths summing to at most MAX_TEXT_STROKE_EXTENT.

TextStylePatch

Changes to a TextStyle. Each field set replaces the base's whole value (lists are not merged); a field left out keeps the base's.

FieldTypeDescription
alignTextAlign | null

See align.

anchorVec2 | null

See anchor.

animatorsarray | null

See animators.

backgroundTextBackground | null

The box behind each line; null removes the base's.

fillPaint | null

See fill.

font_familystring | null

The family; null draws from the fallback order alone.

font_sizenumber | null

See font_size.

font_weightinteger | null

See font_weight.

letter_spacingnumber | null

See letter_spacing.

line_heightnumber | null

See line_height.

max_widthnumber | null

See max_width.

positionVec2 | null

See position.

shadowsarray | null

See shadows.

strokesarray | null

See strokes.

TextUnit

The units a Range selector counts.

  • "characters" Grapheme clusters, spaces included.
  • "characters_excluding_spaces" Grapheme clusters that are not white space.
  • "words" UAX #29 words that hold a letter or digit; a CJK ideograph is a word.
  • "lines" Laid-out lines.

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.