Skip to main content

Module shapes

Module shapes 

Source
Expand description

Parametric shapes as Bezier paths in pixel space, with the start points and directions After Effects and Lottie give them, so a trim cuts them where it cuts there.

Structs§

Polystar
A star or polygon, as a Lottie polystar draws it.
Vertex
One vertex of a Bezier subpath, in pixels: a point and its tangents relative to it.

Constants§

KAPPA
The four-cubic circle constant: a quarter circle’s control points lie this fraction of the radius along its end tangents.

Functions§

append_subpath
Appends a subpath through vertices to path: a cubic between each pair, a line where both tangents are zero, and, when closed, back to the first. A single vertex is a degenerate subpath of no length.
ellipse
The ellipse inscribed in a full size about center, turned degrees clockwise: four cubics from its top, clockwise.
polystar
A polystar’s outline: its first point straight up from the centre before rotation, the rest clockwise. Each corner’s tangents run along the circle through it, as long as the roundness times a quarter (polygon) or half (star) of the circle’s arc per corner, as Lottie rounds them.
rectangle
A rectangle of full size about center, corners rounded by radius (capped at half the shorter side), turned degrees clockwise. It starts at its top-right corner (below the corner’s arc when rounded) and runs clockwise.