alpha2 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,6 +34,10 @@ export declare const MAX_COMPOSITION_DEPTH = 64;
34
34
  export declare const MAX_COMPOSITION_NODES = 256;
35
35
  /** Mirrors `alpha2_model::MAX_COMPRESSOR_RATIO`. */
36
36
  export declare const MAX_COMPRESSOR_RATIO = 100;
37
+ /** Mirrors `alpha2_model::MAX_DASH_ENTRIES`. */
38
+ export declare const MAX_DASH_ENTRIES = 16;
39
+ /** Mirrors `alpha2_model::MAX_EFFECT_INPUTS`. */
40
+ export declare const MAX_EFFECT_INPUTS = 8;
37
41
  /** Mirrors `alpha2_model::MAX_ENVELOPE_MS`. */
38
42
  export declare const MAX_ENVELOPE_MS = 10000;
39
43
  /** Mirrors `alpha2_model::MAX_EQ_BANDS`. */
@@ -66,6 +70,12 @@ export declare const MAX_LOOKAHEAD_MS = 100;
66
70
  export declare const MAX_LOTTIE_DOCUMENT_BYTES = 16777216;
67
71
  /** Mirrors `alpha2_model::MAX_MERGE_LAYERS`. */
68
72
  export declare const MAX_MERGE_LAYERS = 32;
73
+ /** Mirrors `alpha2_model::MAX_PATH_SUBPATHS`. */
74
+ export declare const MAX_PATH_SUBPATHS = 256;
75
+ /** Mirrors `alpha2_model::MAX_PATH_VERTICES`. */
76
+ export declare const MAX_PATH_VERTICES = 4096;
77
+ /** Mirrors `alpha2_model::MAX_POLYSTAR_POINTS`. */
78
+ export declare const MAX_POLYSTAR_POINTS = 100;
69
79
  /** Mirrors `alpha2_model::MAX_PROJECT_JSON_BYTES`. */
70
80
  export declare const MAX_PROJECT_JSON_BYTES = 67108864;
71
81
  /** Mirrors `alpha2_model::MAX_PROVIDER_DOCUMENT_BYTES`. */
@@ -74,6 +84,10 @@ export declare const MAX_PROVIDER_DOCUMENT_BYTES = 268435456;
74
84
  export declare const MAX_SAMPLE_RATE = 96000;
75
85
  /** Mirrors `alpha2_model::MAX_SEQUENCE_FRAMES`. */
76
86
  export declare const MAX_SEQUENCE_FRAMES = 100000;
87
+ /** Mirrors `alpha2_model::MAX_SHAPE_DEPTH`. */
88
+ export declare const MAX_SHAPE_DEPTH = 32;
89
+ /** Mirrors `alpha2_model::MAX_SHAPE_ITEMS`. */
90
+ export declare const MAX_SHAPE_ITEMS = 1024;
77
91
  /** Mirrors `alpha2_model::MAX_SVG_DOCUMENT_BYTES`. */
78
92
  export declare const MAX_SVG_DOCUMENT_BYTES = 33554432;
79
93
  /** Mirrors `alpha2_model::MAX_TEXT_CONTENT_BYTES`. */
@@ -98,6 +112,8 @@ export declare const MIN_HDR_PEAK_NITS = 100;
98
112
  export declare const MIN_LEVEL_DB = -96;
99
113
  /** Mirrors `alpha2_model::MIN_LINE_HEIGHT`. */
100
114
  export declare const MIN_LINE_HEIGHT = 0.5;
115
+ /** Mirrors `alpha2_model::MIN_POLYSTAR_POINTS`. */
116
+ export declare const MIN_POLYSTAR_POINTS = 3;
101
117
  /** Mirrors `alpha2_model::MIN_SAMPLE_RATE`. */
102
118
  export declare const MIN_SAMPLE_RATE = 8000;
103
119
  /** Mirrors `alpha2_model::REVERB_DELAY_MS`. */
@@ -124,8 +140,14 @@ export declare const EFFECT_RESOURCE_KIND_VALUES: readonly EffectResourceKind[];
124
140
  export declare const EQ_BAND_KIND_VALUES: readonly EqBandKind[];
125
141
  /** Every {@link FadeShape}, in the model's order. */
126
142
  export declare const FADE_SHAPE_VALUES: readonly FadeShape[];
143
+ /** Every {@link FillRule}, in the model's order. */
144
+ export declare const FILL_RULE_VALUES: readonly FillRule[];
127
145
  /** Every {@link HdrSources}, in the model's order. */
128
146
  export declare const HDR_SOURCES_VALUES: readonly HdrSources[];
147
+ /** Every {@link LineCap}, in the model's order. */
148
+ export declare const LINE_CAP_VALUES: readonly LineCap[];
149
+ /** Every {@link LineJoin}, in the model's order. */
150
+ export declare const LINE_JOIN_VALUES: readonly LineJoin[];
129
151
  /** Every {@link LinearPrimaries}, in the model's order. */
130
152
  export declare const LINEAR_PRIMARIES_VALUES: readonly LinearPrimaries[];
131
153
  /** Every {@link LoopMode}, in the model's order. */
@@ -138,6 +160,8 @@ export declare const MATTE_MODE_VALUES: readonly MatteMode[];
138
160
  export declare const MEDIA_KIND_VALUES: readonly MediaKind[];
139
161
  /** Every {@link MissingFrames}, in the model's order. */
140
162
  export declare const MISSING_FRAMES_VALUES: readonly MissingFrames[];
163
+ /** Every {@link PolystarKind}, in the model's order. */
164
+ export declare const POLYSTAR_KIND_VALUES: readonly PolystarKind[];
141
165
  /** Every {@link Spread}, in the model's order. */
142
166
  export declare const SPREAD_VALUES: readonly Spread[];
143
167
  /** Every {@link TextAlign}, in the model's order. */
@@ -146,6 +170,8 @@ export declare const TEXT_ALIGN_VALUES: readonly TextAlign[];
146
170
  export declare const TRACK_KIND_VALUES: readonly TrackKind[];
147
171
  /** Every {@link TransferFunction}, in the model's order. */
148
172
  export declare const TRANSFER_FUNCTION_VALUES: readonly TransferFunction[];
173
+ /** Every {@link TrimMode}, in the model's order. */
174
+ export declare const TRIM_MODE_VALUES: readonly TrimMode[];
149
175
  /**
150
176
  * The deserialized shape of a `Project`, before its invariants are checked.
151
177
  *
@@ -218,6 +244,35 @@ export type Animated<T> = {
218
244
  */
219
245
  readonly mode: "keyframes";
220
246
  };
247
+ /**
248
+ * A position that can move along curves between its keyframes.
249
+ *
250
+ * Its JSON is that of an `Animated<Vec2>`, plus optional spatial tangents on
251
+ * each keyframe: with them, the value travels along the cubic Bezier from
252
+ * one keyframe's value through its `out_tangent` and the next keyframe's
253
+ * `in_tangent`, at the speed its timing curve sets along the curve's
254
+ * length. Without them it moves in a straight line, as an `Animated<Vec2>`
255
+ * does.
256
+ */
257
+ export type AnimatedPoint = {
258
+ /**
259
+ * A value without animation.
260
+ */
261
+ readonly mode: "constant";
262
+ /**
263
+ * Value used at every timestamp.
264
+ */
265
+ readonly value: Vec2;
266
+ } | {
267
+ /**
268
+ * Strictly ascending keyframes. The evaluator clamps outside the sequence.
269
+ */
270
+ readonly keyframes: readonly PointKeyframe[];
271
+ /**
272
+ * Values evaluated from their keyframe sequence.
273
+ */
274
+ readonly mode: "keyframes";
275
+ };
221
276
  /**
222
277
  * A serializable single-input audio effect applied to a clip or track bus.
223
278
  *
@@ -690,6 +745,23 @@ export interface CompositionNode {
690
745
  */
691
746
  readonly op: NodeOp;
692
747
  }
748
+ /**
749
+ * A dash pattern.
750
+ */
751
+ export interface Dash {
752
+ /**
753
+ * How far into the pattern the stroke starts.
754
+ *
755
+ * @defaultValue `{"mode":"constant","value":0}`
756
+ */
757
+ readonly offset?: Animated<number>;
758
+ /**
759
+ * Alternating dash and gap lengths, as fractions of the shorter side:
760
+ * one to `MAX_DASH_ENTRIES` non-negative entries, not all zero. An
761
+ * odd count repeats once more to pair up.
762
+ */
763
+ readonly pattern: readonly Animated<number>[];
764
+ }
693
765
  /**
694
766
  * Sidechain ducking authored on the track that is attenuated.
695
767
  */
@@ -852,6 +924,10 @@ export type EqBandKind = "peaking" | "low_pass" | "high_pass";
852
924
  * Curve applied by a clip's fade in and fade out.
853
925
  */
854
926
  export type FadeShape = "linear" | "equal_power";
927
+ /**
928
+ * Which regions of a path are inside it.
929
+ */
930
+ export type FillRule = "nonzero" | "evenodd";
855
931
  /**
856
932
  * A positive rational frame rate in reduced form, at most one frame per tick
857
933
  * (120 000 frames per second).
@@ -866,27 +942,6 @@ export interface FrameRate {
866
942
  */
867
943
  readonly num: number;
868
944
  }
869
- /**
870
- * The outline of a `Generator::Shape`.
871
- */
872
- export type GeneratedShape = {
873
- /**
874
- * Corner radius, as a fraction of the picture's shorter side.
875
- * Non-negative; a radius past half the rectangle is capped.
876
- *
877
- * @defaultValue `0`
878
- */
879
- readonly corner_radius?: number;
880
- /**
881
- * A rectangle, optionally with rounded corners.
882
- */
883
- readonly type: "rectangle";
884
- } | {
885
- /**
886
- * The ellipse inscribed in the size.
887
- */
888
- readonly type: "ellipse";
889
- };
890
945
  /**
891
946
  * The picture of a generated source.
892
947
  *
@@ -894,8 +949,8 @@ export type GeneratedShape = {
894
949
  * fills the frame at scale 1. Positions are in its normalized space, `(0, 0)`
895
950
  * top-left to `(1, 1)` bottom-right; lengths (radii, stroke widths) are
896
951
  * fractions of its shorter side, so the picture is the same at any render
897
- * resolution. It does not change over time: a clip animates it with its
898
- * transform, effects, and masks.
952
+ * resolution. A fill or text does not change over time (a clip animates it
953
+ * with its transform, effects, and masks); shapes may.
899
954
  */
900
955
  export type Generator = {
901
956
  /**
@@ -908,39 +963,16 @@ export type Generator = {
908
963
  readonly type: "fill";
909
964
  } | {
910
965
  /**
911
- * Centre of the shape.
966
+ * The content tree, front first. See `ShapeItem`.
912
967
  */
913
- readonly center: Vec2;
968
+ readonly items: readonly ShapeItem[];
914
969
  /**
915
- * Paint inside the outline.
916
- *
917
- * @defaultValue `null`
918
- */
919
- readonly fill?: Paint | null;
920
- /**
921
- * Clockwise rotation about the centre, in degrees.
922
- *
923
- * @defaultValue `0`
924
- */
925
- readonly rotation_degrees?: number;
926
- /**
927
- * The shape's outline.
970
+ * Shapes drawn from an ordered content tree, as an After Effects shape
971
+ * layer or a Lottie shape layer draws them. Unlike the other
972
+ * generators, its picture changes over time: every value in the tree
973
+ * may be keyframed, in the picture's time.
928
974
  */
929
- readonly shape: GeneratedShape;
930
- /**
931
- * Full width and height of the shape, before rotation. Non-negative.
932
- */
933
- readonly size: Vec2;
934
- /**
935
- * Paint along the outline, drawn over the fill.
936
- *
937
- * @defaultValue `null`
938
- */
939
- readonly stroke?: Stroke | null;
940
- /**
941
- * One shape on a transparent picture, filled, stroked, or both.
942
- */
943
- readonly type: "shape";
975
+ readonly type: "shapes";
944
976
  } | {
945
977
  /**
946
978
  * How it looks and where it lies. The font size is at most
@@ -1047,6 +1079,14 @@ export interface Limiter {
1047
1079
  */
1048
1080
  readonly threshold: number;
1049
1081
  }
1082
+ /**
1083
+ * How an open stroke ends.
1084
+ */
1085
+ export type LineCap = "butt" | "round" | "square";
1086
+ /**
1087
+ * How stroke segments meet at a vertex.
1088
+ */
1089
+ export type LineJoin = "miter" | "round" | "bevel";
1050
1090
  /**
1051
1091
  * Named RGB primaries linear-light media may be in, each with its own white
1052
1092
  * point.
@@ -1063,27 +1103,6 @@ export type LoopMode = "repeat" | "ping_pong";
1063
1103
  * clip whose only mask subtracts is visible outside the shape.
1064
1104
  */
1065
1105
  export type MaskMode = "add" | "subtract" | "intersect";
1066
- /**
1067
- * The outline of a `ShapeMask`.
1068
- */
1069
- export type MaskShape = {
1070
- /**
1071
- * Corner radius, as a fraction of the shorter side of source
1072
- * space. Non-negative; a radius past half the rectangle is capped.
1073
- *
1074
- * @defaultValue `{"mode":"constant","value":0}`
1075
- */
1076
- readonly corner_radius?: Animated<number>;
1077
- /**
1078
- * A rectangle, optionally with rounded corners.
1079
- */
1080
- readonly type: "rectangle";
1081
- } | {
1082
- /**
1083
- * The ellipse inscribed in the size.
1084
- */
1085
- readonly type: "ellipse";
1086
- };
1087
1106
  /**
1088
1107
  * Project-wide master bus settings.
1089
1108
  */
@@ -1317,13 +1336,22 @@ export type NodeOp = {
1317
1336
  */
1318
1337
  readonly effect: ClipEffect;
1319
1338
  /**
1320
- * The image the effect processes.
1339
+ * The image the effect processes; a bypassed node passes it through.
1321
1340
  *
1322
1341
  * @defaultValue `null`
1323
1342
  */
1324
1343
  readonly input?: NodeId | null;
1325
1344
  /**
1326
- * A registered one-input effect.
1345
+ * The images the effect samples besides its input, by the names its
1346
+ * definition declares (`sample_<name>` in its shader); at most
1347
+ * `MAX_EFFECT_INPUTS`. A name the definition does not declare, or
1348
+ * one it declares and this leaves out, fails the frames that draw
1349
+ * the node.
1350
+ */
1351
+ readonly inputs?: Readonly<Record<string, NodeId | null>>;
1352
+ /**
1353
+ * A registered effect: its input and the named images it samples
1354
+ * besides.
1327
1355
  */
1328
1356
  readonly type: "effect";
1329
1357
  } | {
@@ -1531,6 +1559,71 @@ export type Paint = {
1531
1559
  */
1532
1560
  readonly type: "conic_gradient";
1533
1561
  };
1562
+ /**
1563
+ * One or more subpaths.
1564
+ */
1565
+ export interface Path {
1566
+ /**
1567
+ * The subpaths, at most `MAX_PATH_SUBPATHS`, with at most
1568
+ * `MAX_PATH_VERTICES` vertices among them.
1569
+ */
1570
+ readonly subpaths: readonly Subpath[];
1571
+ }
1572
+ /**
1573
+ * A path vertex and its tangents. The segment from vertex `a` to vertex
1574
+ * `b` is the cubic Bezier through `a.point`, `a.point + a.out_tangent`,
1575
+ * `b.point + b.in_tangent`, and `b.point`; zero tangents make it straight.
1576
+ */
1577
+ export interface PathVertex {
1578
+ /**
1579
+ * The control point of the segment ending here, relative to `point`.
1580
+ *
1581
+ * @defaultValue `{"x":0,"y":0}`
1582
+ */
1583
+ readonly in_tangent?: Vec2;
1584
+ /**
1585
+ * The control point of the segment starting here, relative to `point`.
1586
+ *
1587
+ * @defaultValue `{"x":0,"y":0}`
1588
+ */
1589
+ readonly out_tangent?: Vec2;
1590
+ /**
1591
+ * Where the vertex lies.
1592
+ */
1593
+ readonly point: Vec2;
1594
+ }
1595
+ /**
1596
+ * One keyframe of an `AnimatedPoint`.
1597
+ */
1598
+ export interface PointKeyframe {
1599
+ /**
1600
+ * The end of the way here from the previous keyframe's value, relative
1601
+ * to this value: that curve's second control point.
1602
+ */
1603
+ readonly in_tangent?: Vec2;
1604
+ /**
1605
+ * Interpolation from this keyframe to its successor: how fast the value
1606
+ * travels along the way there.
1607
+ */
1608
+ readonly interpolation: Interpolation;
1609
+ /**
1610
+ * The start of the way to the next keyframe's value, relative to this
1611
+ * value: the curve's first control point.
1612
+ */
1613
+ readonly out_tangent?: Vec2;
1614
+ /**
1615
+ * Timestamp of this value, as a `Keyframe`'s.
1616
+ */
1617
+ readonly time: MediaTime;
1618
+ /**
1619
+ * Value at `time`.
1620
+ */
1621
+ readonly value: Vec2;
1622
+ }
1623
+ /**
1624
+ * What kind of figure a polystar is.
1625
+ */
1626
+ export type PolystarKind = "star" | "polygon";
1534
1627
  /**
1535
1628
  * A stable project identifier.
1536
1629
  */
@@ -1697,27 +1790,362 @@ export interface Rgba {
1697
1790
  */
1698
1791
  readonly red: number;
1699
1792
  }
1793
+ /**
1794
+ * A geometry alone, as a mask's outline is.
1795
+ */
1796
+ export type ShapeGeometry = {
1797
+ /**
1798
+ * Centre.
1799
+ */
1800
+ readonly center: AnimatedPoint;
1801
+ /**
1802
+ * Corner radius, as a fraction of the shorter side. Non-negative; a
1803
+ * radius past half the rectangle is capped.
1804
+ *
1805
+ * @defaultValue `{"mode":"constant","value":0}`
1806
+ */
1807
+ readonly corner_radius?: Animated<number>;
1808
+ /**
1809
+ * Clockwise rotation about the centre, in degrees.
1810
+ *
1811
+ * @defaultValue `{"mode":"constant","value":0}`
1812
+ */
1813
+ readonly rotation_degrees?: Animated<number>;
1814
+ /**
1815
+ * Full width and height, before rotation. Non-negative.
1816
+ */
1817
+ readonly size: Animated<Vec2>;
1818
+ /**
1819
+ * A rectangle, optionally with rounded corners.
1820
+ */
1821
+ readonly type: "rectangle";
1822
+ } | {
1823
+ /**
1824
+ * Centre.
1825
+ */
1826
+ readonly center: AnimatedPoint;
1827
+ /**
1828
+ * Clockwise rotation about the centre, in degrees.
1829
+ *
1830
+ * @defaultValue `{"mode":"constant","value":0}`
1831
+ */
1832
+ readonly rotation_degrees?: Animated<number>;
1833
+ /**
1834
+ * Full width and height, before rotation. Non-negative.
1835
+ */
1836
+ readonly size: Animated<Vec2>;
1837
+ /**
1838
+ * An ellipse.
1839
+ */
1840
+ readonly type: "ellipse";
1841
+ } | {
1842
+ /**
1843
+ * Centre.
1844
+ */
1845
+ readonly center: AnimatedPoint;
1846
+ /**
1847
+ * A star's distance of its inner corners from the centre. Non-negative.
1848
+ *
1849
+ * @defaultValue `{"mode":"constant","value":0}`
1850
+ */
1851
+ readonly inner_radius?: Animated<number>;
1852
+ /**
1853
+ * How round a star's inner corners are, in `0..=1`.
1854
+ *
1855
+ * @defaultValue `{"mode":"constant","value":0}`
1856
+ */
1857
+ readonly inner_roundness?: Animated<number>;
1858
+ /**
1859
+ * A polygon or a star.
1860
+ */
1861
+ readonly kind: PolystarKind;
1862
+ /**
1863
+ * Distance of the points from the centre, as a fraction of the shorter
1864
+ * side. Non-negative.
1865
+ */
1866
+ readonly outer_radius: Animated<number>;
1867
+ /**
1868
+ * How round the outer corners are: 0 sharp, 1 a smooth curve through
1869
+ * them. In `0..=1`.
1870
+ *
1871
+ * @defaultValue `{"mode":"constant","value":0}`
1872
+ */
1873
+ readonly outer_roundness?: Animated<number>;
1874
+ /**
1875
+ * Number of points (corners of a polygon, tips of a star), from
1876
+ * `MIN_POLYSTAR_POINTS` to `MAX_POLYSTAR_POINTS`. A fraction is
1877
+ * dropped when drawn, as Lottie drops it, so an animated count changes
1878
+ * the figure one whole point at a time.
1879
+ */
1880
+ readonly points: Animated<number>;
1881
+ /**
1882
+ * Clockwise rotation about the centre, in degrees.
1883
+ *
1884
+ * @defaultValue `{"mode":"constant","value":0}`
1885
+ */
1886
+ readonly rotation_degrees?: Animated<number>;
1887
+ /**
1888
+ * A regular polygon or star.
1889
+ */
1890
+ readonly type: "polystar";
1891
+ } | {
1892
+ /**
1893
+ * The path.
1894
+ */
1895
+ readonly path: Animated<Path>;
1896
+ /**
1897
+ * A Bezier path.
1898
+ */
1899
+ readonly type: "path";
1900
+ };
1901
+ /**
1902
+ * One entry of a shapes generator's content tree.
1903
+ *
1904
+ * A group is read front to back. Geometry accumulates in its group; a fill
1905
+ * or a stroke paints the geometry listed before it in the same group,
1906
+ * nested groups before it included; a trim cuts that geometry and replaces
1907
+ * it. A paint listed earlier is drawn on top of one listed later, as in
1908
+ * After Effects and Lottie.
1909
+ */
1910
+ export type ShapeItem = {
1911
+ /**
1912
+ * The group's items, front first.
1913
+ */
1914
+ readonly items: readonly ShapeItem[];
1915
+ /**
1916
+ * Where the group lies, and how opaque it is.
1917
+ */
1918
+ readonly transform?: ShapeTransform;
1919
+ /**
1920
+ * Items drawn together, through one transform and opacity. Their
1921
+ * geometry also counts as the enclosing group's, for the paints and
1922
+ * trims after the group.
1923
+ */
1924
+ readonly type: "group";
1925
+ } | {
1926
+ /**
1927
+ * Centre.
1928
+ */
1929
+ readonly center: AnimatedPoint;
1930
+ /**
1931
+ * Corner radius, as a fraction of the shorter side. Non-negative; a
1932
+ * radius past half the rectangle is capped.
1933
+ *
1934
+ * @defaultValue `{"mode":"constant","value":0}`
1935
+ */
1936
+ readonly corner_radius?: Animated<number>;
1937
+ /**
1938
+ * Clockwise rotation about the centre, in degrees.
1939
+ *
1940
+ * @defaultValue `{"mode":"constant","value":0}`
1941
+ */
1942
+ readonly rotation_degrees?: Animated<number>;
1943
+ /**
1944
+ * Full width and height, before rotation. Non-negative.
1945
+ */
1946
+ readonly size: Animated<Vec2>;
1947
+ /**
1948
+ * A rectangle, optionally with rounded corners.
1949
+ */
1950
+ readonly type: "rectangle";
1951
+ } | {
1952
+ /**
1953
+ * Centre.
1954
+ */
1955
+ readonly center: AnimatedPoint;
1956
+ /**
1957
+ * Clockwise rotation about the centre, in degrees.
1958
+ *
1959
+ * @defaultValue `{"mode":"constant","value":0}`
1960
+ */
1961
+ readonly rotation_degrees?: Animated<number>;
1962
+ /**
1963
+ * Full width and height, before rotation. Non-negative.
1964
+ */
1965
+ readonly size: Animated<Vec2>;
1966
+ /**
1967
+ * An ellipse.
1968
+ */
1969
+ readonly type: "ellipse";
1970
+ } | {
1971
+ /**
1972
+ * Centre.
1973
+ */
1974
+ readonly center: AnimatedPoint;
1975
+ /**
1976
+ * A star's distance of its inner corners from the centre. Non-negative.
1977
+ *
1978
+ * @defaultValue `{"mode":"constant","value":0}`
1979
+ */
1980
+ readonly inner_radius?: Animated<number>;
1981
+ /**
1982
+ * How round a star's inner corners are, in `0..=1`.
1983
+ *
1984
+ * @defaultValue `{"mode":"constant","value":0}`
1985
+ */
1986
+ readonly inner_roundness?: Animated<number>;
1987
+ /**
1988
+ * A polygon or a star.
1989
+ */
1990
+ readonly kind: PolystarKind;
1991
+ /**
1992
+ * Distance of the points from the centre, as a fraction of the shorter
1993
+ * side. Non-negative.
1994
+ */
1995
+ readonly outer_radius: Animated<number>;
1996
+ /**
1997
+ * How round the outer corners are: 0 sharp, 1 a smooth curve through
1998
+ * them. In `0..=1`.
1999
+ *
2000
+ * @defaultValue `{"mode":"constant","value":0}`
2001
+ */
2002
+ readonly outer_roundness?: Animated<number>;
2003
+ /**
2004
+ * Number of points (corners of a polygon, tips of a star), from
2005
+ * `MIN_POLYSTAR_POINTS` to `MAX_POLYSTAR_POINTS`. A fraction is
2006
+ * dropped when drawn, as Lottie drops it, so an animated count changes
2007
+ * the figure one whole point at a time.
2008
+ */
2009
+ readonly points: Animated<number>;
2010
+ /**
2011
+ * Clockwise rotation about the centre, in degrees.
2012
+ *
2013
+ * @defaultValue `{"mode":"constant","value":0}`
2014
+ */
2015
+ readonly rotation_degrees?: Animated<number>;
2016
+ /**
2017
+ * A regular polygon or star.
2018
+ */
2019
+ readonly type: "polystar";
2020
+ } | {
2021
+ /**
2022
+ * The path.
2023
+ */
2024
+ readonly path: Animated<Path>;
2025
+ /**
2026
+ * A Bezier path.
2027
+ */
2028
+ readonly type: "path";
2029
+ } | {
2030
+ /**
2031
+ * Opacity in `0..=1`.
2032
+ *
2033
+ * @defaultValue `{"mode":"constant","value":1}`
2034
+ */
2035
+ readonly opacity?: Animated<number>;
2036
+ /**
2037
+ * What covers it.
2038
+ */
2039
+ readonly paint: Animated<Paint>;
2040
+ /**
2041
+ * Which regions of the compound path are inside.
2042
+ *
2043
+ * @defaultValue `"nonzero"`
2044
+ */
2045
+ readonly rule?: FillRule;
2046
+ /**
2047
+ * Paints the inside of the geometry listed before it in its group, all
2048
+ * of it as one compound path under `rule`. An open path is closed for
2049
+ * it.
2050
+ */
2051
+ readonly type: "fill";
2052
+ } | {
2053
+ /**
2054
+ * How open ends look.
2055
+ *
2056
+ * @defaultValue `"butt"`
2057
+ */
2058
+ readonly cap?: LineCap;
2059
+ /**
2060
+ * Dashes, or a solid stroke when absent.
2061
+ *
2062
+ * @defaultValue `null`
2063
+ */
2064
+ readonly dash?: Dash | null;
2065
+ /**
2066
+ * How segments meet.
2067
+ *
2068
+ * @defaultValue `"miter"`
2069
+ */
2070
+ readonly join?: LineJoin;
2071
+ /**
2072
+ * Longest a miter join reaches, as a multiple of half the width, before
2073
+ * it is beveled. At least 1.
2074
+ *
2075
+ * @defaultValue `4`
2076
+ */
2077
+ readonly miter_limit?: number;
2078
+ /**
2079
+ * Opacity in `0..=1`.
2080
+ *
2081
+ * @defaultValue `{"mode":"constant","value":1}`
2082
+ */
2083
+ readonly opacity?: Animated<number>;
2084
+ /**
2085
+ * What covers the stroke.
2086
+ */
2087
+ readonly paint: Animated<Paint>;
2088
+ /**
2089
+ * Strokes the geometry listed before it in its group.
2090
+ */
2091
+ readonly type: "stroke";
2092
+ /**
2093
+ * Full width, as a fraction of the shorter side. Non-negative; zero
2094
+ * draws nothing.
2095
+ */
2096
+ readonly width: Animated<number>;
2097
+ } | {
2098
+ /**
2099
+ * Where it ends, in `0..=1`. Nothing is kept unless it is after
2100
+ * `start`.
2101
+ */
2102
+ readonly end: Animated<number>;
2103
+ /**
2104
+ * Whether the span is of all the geometry together or of each part.
2105
+ *
2106
+ * @defaultValue `"together"`
2107
+ */
2108
+ readonly mode?: TrimMode;
2109
+ /**
2110
+ * Turns the span is shifted by; it wraps around a closed path.
2111
+ *
2112
+ * @defaultValue `{"mode":"constant","value":0}`
2113
+ */
2114
+ readonly offset?: Animated<number>;
2115
+ /**
2116
+ * Where the kept span starts, as a fraction of the length, in `0..=1`.
2117
+ */
2118
+ readonly start: Animated<number>;
2119
+ /**
2120
+ * Keeps part of the geometry listed before it in its group, by length.
2121
+ */
2122
+ readonly type: "trim";
2123
+ };
1700
2124
  /**
1701
2125
  * A shape that limits where a clip is visible.
1702
2126
  *
1703
2127
  * Geometry is in the clip's source space, before its transform, so the mask
1704
2128
  * moves with the clip: `(0, 0)` is the source's top-left corner and `(1, 1)`
1705
- * its bottom-right. Distances (`feather`, a rectangle's `corner_radius`) are
1706
- * fractions of that space's shorter side, so a mask covers the same part of
1707
- * the picture at any render resolution.
2129
+ * its bottom-right. Distances (`feather`, a rectangle's `corner_radius`, a
2130
+ * polystar's radii) are fractions of that space's shorter side, so a mask
2131
+ * covers the same part of the picture at any render resolution.
1708
2132
  */
1709
2133
  export interface ShapeMask {
1710
2134
  /**
1711
- * Centre of the shape.
1712
- */
1713
- readonly center: Animated<Vec2>;
1714
- /**
1715
- * Width of the soft edge, centred on the outline. Non-negative; zero is
1716
- * a one-pixel antialiased edge.
2135
+ * How soft the edge is. Non-negative; zero is the outline's
2136
+ * antialiased edge. The coverage is blurred by a Gaussian of standard
2137
+ * deviation `0.3125 * feather`, which spreads its 10 to 90 percent ramp
2138
+ * over `0.8 * feather` across the outline.
1717
2139
  *
1718
2140
  * @defaultValue `{"mode":"constant","value":0}`
1719
2141
  */
1720
2142
  readonly feather?: Animated<number>;
2143
+ /**
2144
+ * Which regions of the outline are inside it.
2145
+ *
2146
+ * @defaultValue `"nonzero"`
2147
+ */
2148
+ readonly fill_rule?: FillRule;
1721
2149
  /**
1722
2150
  * Whether the mask keeps the outside of the shape instead of its inside.
1723
2151
  *
@@ -1731,19 +2159,48 @@ export interface ShapeMask {
1731
2159
  */
1732
2160
  readonly mode?: MaskMode;
1733
2161
  /**
1734
- * Clockwise rotation about the centre, in degrees.
2162
+ * The shape's outline, as a shapes generator's geometry.
2163
+ */
2164
+ readonly shape: ShapeGeometry;
2165
+ }
2166
+ /**
2167
+ * A group's placement: in pixel space, translate by `position`, rotate,
2168
+ * scale, and translate by minus `anchor`, so `anchor` lands on `position`.
2169
+ * The default leaves its items where they are.
2170
+ */
2171
+ export interface ShapeTransform {
2172
+ /**
2173
+ * The point of the items that is placed at `position`.
1735
2174
  *
1736
- * @defaultValue `{"mode":"constant","value":0}`
2175
+ * @defaultValue `{"mode":"constant","value":{"x":0,"y":0}}`
1737
2176
  */
1738
- readonly rotation_degrees?: Animated<number>;
2177
+ readonly anchor?: Animated<Vec2>;
1739
2178
  /**
1740
- * The shape's outline.
2179
+ * Opacity of the group as a whole, in `0..=1`: overlapping items are
2180
+ * composited first and faded together.
2181
+ *
2182
+ * @defaultValue `{"mode":"constant","value":1}`
1741
2183
  */
1742
- readonly shape: MaskShape;
2184
+ readonly opacity?: Animated<number>;
1743
2185
  /**
1744
- * Full width and height of the shape, before rotation. Non-negative.
2186
+ * Where `anchor` is placed.
2187
+ *
2188
+ * @defaultValue `{"mode":"constant","value":{"x":0,"y":0}}`
1745
2189
  */
1746
- readonly size: Animated<Vec2>;
2190
+ readonly position?: AnimatedPoint;
2191
+ /**
2192
+ * Clockwise rotation, in degrees.
2193
+ *
2194
+ * @defaultValue `{"mode":"constant","value":0}`
2195
+ */
2196
+ readonly rotation_degrees?: Animated<number>;
2197
+ /**
2198
+ * Per-axis scale; 1 leaves the items unscaled. Stroke widths scale with
2199
+ * it.
2200
+ *
2201
+ * @defaultValue `{"mode":"constant","value":{"x":1,"y":1}}`
2202
+ */
2203
+ readonly scale?: Animated<Vec2>;
1747
2204
  }
1748
2205
  /**
1749
2206
  * A stable media-source identifier.
@@ -1767,17 +2224,19 @@ export interface StreamTopology {
1767
2224
  readonly video?: VideoStreamShape | null;
1768
2225
  }
1769
2226
  /**
1770
- * A shape's outline paint. The stroke is centred on the outline.
2227
+ * A run of vertices joined by cubic Bezier segments.
1771
2228
  */
1772
- export interface Stroke {
2229
+ export interface Subpath {
1773
2230
  /**
1774
- * What covers the stroke.
2231
+ * Whether a segment joins the last vertex back to the first.
2232
+ *
2233
+ * @defaultValue `false`
1775
2234
  */
1776
- readonly paint: Paint;
2235
+ readonly closed?: boolean;
1777
2236
  /**
1778
- * Full width, as a fraction of the picture's shorter side. Positive.
2237
+ * The vertices, in order.
1779
2238
  */
1780
- readonly width: number;
2239
+ readonly vertices: readonly PathVertex[];
1781
2240
  }
1782
2241
  /**
1783
2242
  * How lines of text align within it.
@@ -2058,6 +2517,10 @@ export type TrackKind = "video" | "audio" | "caption";
2058
2517
  * Encoded transfer curve.
2059
2518
  */
2060
2519
  export type TransferFunction = "bt709" | "srgb" | "pq" | "hlg";
2520
+ /**
2521
+ * What a trim measures.
2522
+ */
2523
+ export type TrimMode = "together" | "individually";
2061
2524
  /**
2062
2525
  * A two-dimensional value in normalized output coordinates.
2063
2526
  */
@@ -2107,9 +2570,10 @@ export interface VisualProperties {
2107
2570
  */
2108
2571
  readonly opacity: Animated<number>;
2109
2572
  /**
2110
- * Animated normalized canvas translation.
2573
+ * Animated normalized canvas translation, along spatial curves where its
2574
+ * keyframes have tangents.
2111
2575
  */
2112
- readonly position: Animated<Vec2>;
2576
+ readonly position: AnimatedPoint;
2113
2577
  /**
2114
2578
  * Animated clockwise rotation in degrees.
2115
2579
  */