alpha2 0.4.5 → 0.5.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.
- package/README.md +5 -4
- package/THIRD_PARTY_NOTICES.md +4 -0
- package/dist/abort.d.ts +12 -0
- package/dist/abort.js +48 -0
- package/dist/active-clock.d.ts +35 -0
- package/dist/active-clock.js +99 -0
- package/dist/assets.d.ts +28 -22
- package/dist/assets.js +8 -12
- package/dist/audio-layout.d.ts +52 -74
- package/dist/audio-layout.js +114 -148
- package/dist/audio-timeline.d.ts +89 -117
- package/dist/audio-timeline.js +102 -118
- package/dist/audio-worker.d.ts +12 -21
- package/dist/audio-worker.js +8 -13
- package/dist/audio-worklet-processor.js +45 -58
- package/dist/audio-worklet.d.ts +45 -76
- package/dist/audio-worklet.js +44 -79
- package/dist/audio.d.ts +15 -23
- package/dist/audio.js +9 -13
- package/dist/builder.d.ts +45 -63
- package/dist/builder.js +49 -45
- package/dist/capabilities.d.ts +99 -16
- package/dist/capabilities.js +2 -2
- package/dist/captions.d.ts +45 -22
- package/dist/captions.js +60 -15
- package/dist/chroma-siting.d.ts +24 -41
- package/dist/chroma-siting.js +38 -71
- package/dist/containers.d.ts +41 -30
- package/dist/containers.js +59 -27
- package/dist/decoder-fallback.d.ts +13 -0
- package/dist/decoder-fallback.js +38 -0
- package/dist/decoder-order.d.ts +24 -39
- package/dist/decoder-order.js +28 -42
- package/dist/edit.d.ts +77 -154
- package/dist/edit.js +98 -180
- package/dist/effects.d.ts +109 -173
- package/dist/effects.js +7 -9
- package/dist/export-destination.d.ts +25 -41
- package/dist/export-destination.js +20 -32
- package/dist/export-failure.d.ts +34 -59
- package/dist/export-failure.js +54 -48
- package/dist/export-metrics.d.ts +116 -0
- package/dist/export-metrics.js +74 -0
- package/dist/export-retry.d.ts +46 -29
- package/dist/export-retry.js +86 -51
- package/dist/exporter.d.ts +67 -116
- package/dist/exporter.js +133 -133
- package/dist/extensions.d.ts +69 -115
- package/dist/extensions.js +55 -82
- package/dist/frame-intake.d.ts +92 -0
- package/dist/frame-intake.js +114 -0
- package/dist/frame-supply.d.ts +98 -157
- package/dist/frame-supply.js +191 -162
- package/dist/generated/project-schema.d.ts +742 -464
- package/dist/generated/project-schema.js +63 -2
- package/dist/generated/project-shape.js +663 -118
- package/dist/geometry.d.ts +28 -34
- package/dist/geometry.js +18 -23
- package/dist/gpu-recovery.d.ts +92 -0
- package/dist/gpu-recovery.js +135 -0
- package/dist/hdr-frames.d.ts +88 -62
- package/dist/hdr-frames.js +123 -46
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/json-text.d.ts +13 -23
- package/dist/json-text.js +10 -20
- package/dist/layout-values.d.ts +14 -22
- package/dist/layout-values.js +18 -21
- package/dist/layout.d.ts +55 -55
- package/dist/layout.js +37 -36
- package/dist/loudness.d.ts +27 -32
- package/dist/loudness.js +19 -23
- package/dist/media.d.ts +85 -237
- package/dist/media.js +133 -287
- package/dist/mediabunny.d.ts +173 -237
- package/dist/mediabunny.js +943 -518
- package/dist/physical-frames.d.ts +5 -17
- package/dist/physical-frames.js +4 -11
- package/dist/player.d.ts +56 -47
- package/dist/player.js +155 -40
- package/dist/presented-frames.d.ts +2 -7
- package/dist/presented-frames.js +3 -8
- package/dist/project.d.ts +83 -110
- package/dist/project.js +421 -447
- package/dist/rate-control.d.ts +9 -23
- package/dist/rate-control.js +7 -18
- package/dist/renderer-choice.d.ts +41 -0
- package/dist/renderer-choice.js +82 -0
- package/dist/repacked-bytes.d.ts +0 -2
- package/dist/repacked-bytes.js +2 -5
- package/dist/robustness.d.ts +25 -37
- package/dist/robustness.js +71 -54
- package/dist/sha256.d.ts +5 -13
- package/dist/sha256.js +9 -24
- package/dist/text.d.ts +106 -63
- package/dist/text.js +44 -69
- package/dist/video-frames.d.ts +7 -25
- package/dist/video-frames.js +12 -29
- package/dist/waveform.d.ts +5 -11
- package/dist/waveform.js +4 -9
- package/dist/worker-error.d.ts +5 -20
- package/dist/worker-error.js +8 -25
- package/dist/worker.d.ts +82 -92
- package/dist/worker.js +239 -144
- package/package.json +26 -2
- package/wasm/alpha2_audio_worklet.wasm +0 -0
- package/wasm/alpha2_extensions.d.ts +26 -47
- package/wasm/alpha2_extensions.js +26 -47
- package/wasm/alpha2_extensions_bg.wasm +0 -0
- package/wasm/alpha2_wasm.d.ts +487 -543
- package/wasm/alpha2_wasm.js +669 -572
- package/wasm/alpha2_wasm_bg.wasm +0 -0
- package/wasm/alpha2_wasm_bg.wasm.d.ts +20 -8
- package/wasm/rust-crate-licenses.md +2 -2
- package/wasm/snippets/{alpha2-wasm-57b04ecc6db57e1f → alpha2-wasm-1313375d424845c0}/inline1.js +1 -0
- package/wasm/snippets/alpha2-wasm-1313375d424845c0/inline2.js +82 -0
- package/wasm/snippets/alpha2-wasm-57b04ecc6db57e1f/inline2.js +0 -52
- /package/wasm/snippets/{alpha2-wasm-57b04ecc6db57e1f → alpha2-wasm-1313375d424845c0}/inline0.js +0 -0
- /package/wasm/snippets/{alpha2-wasm-57b04ecc6db57e1f → alpha2-wasm-1313375d424845c0}/inline3.js +0 -0
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
export declare const AUDIO_EFFECT_STATE_MARGIN_MS = 1100;
|
|
3
3
|
/** Mirrors `alpha2_model::CURRENT_SCHEMA_VERSION`. */
|
|
4
4
|
export declare const CURRENT_SCHEMA_VERSION = 1;
|
|
5
|
+
/** Mirrors `alpha2_model::MAX_ANIMATOR_SCALE`. */
|
|
6
|
+
export declare const MAX_ANIMATOR_SCALE = 10;
|
|
5
7
|
/** Mirrors `alpha2_model::MAX_AUDIO_DELAY_MS`. */
|
|
6
8
|
export declare const MAX_AUDIO_DELAY_MS = 120000;
|
|
7
9
|
/** Mirrors `alpha2_model::MAX_AUDIO_EFFECTS`. */
|
|
@@ -16,8 +18,14 @@ export declare const MAX_CAPTION_FILE_BYTES = 67108864;
|
|
|
16
18
|
export declare const MAX_CAPTION_FILE_CUES = 65536;
|
|
17
19
|
/** Mirrors `alpha2_model::MAX_CAPTION_FONT_SIZE`. */
|
|
18
20
|
export declare const MAX_CAPTION_FONT_SIZE = 0.25;
|
|
21
|
+
/** Mirrors `alpha2_model::MAX_CAPTION_NAME_BYTES`. */
|
|
22
|
+
export declare const MAX_CAPTION_NAME_BYTES = 64;
|
|
23
|
+
/** Mirrors `alpha2_model::MAX_CAPTION_STYLES`. */
|
|
24
|
+
export declare const MAX_CAPTION_STYLES = 32;
|
|
19
25
|
/** Mirrors `alpha2_model::MAX_CHAIN_EFFECTS`. */
|
|
20
26
|
export declare const MAX_CHAIN_EFFECTS = 16;
|
|
27
|
+
/** Mirrors `alpha2_model::MAX_CLASS_NAME_BYTES`. */
|
|
28
|
+
export declare const MAX_CLASS_NAME_BYTES = 64;
|
|
21
29
|
/** Mirrors `alpha2_model::MAX_CLIPS`. */
|
|
22
30
|
export declare const MAX_CLIPS = 100000;
|
|
23
31
|
/** Mirrors `alpha2_model::MAX_CLIPS_PER_TRACK`. */
|
|
@@ -50,6 +58,8 @@ export declare const MAX_EQ_GAIN_DB = 36;
|
|
|
50
58
|
export declare const MAX_EQ_Q = 50;
|
|
51
59
|
/** Mirrors `alpha2_model::MAX_FONT_FAMILY_BYTES`. */
|
|
52
60
|
export declare const MAX_FONT_FAMILY_BYTES = 256;
|
|
61
|
+
/** Mirrors `alpha2_model::MAX_FONT_WEIGHT`. */
|
|
62
|
+
export declare const MAX_FONT_WEIGHT = 1000;
|
|
53
63
|
/** Mirrors `alpha2_model::MAX_FRAME_INLINED_NODES`. */
|
|
54
64
|
export declare const MAX_FRAME_INLINED_NODES = 65536;
|
|
55
65
|
/** Mirrors `alpha2_model::MAX_GAIN`. */
|
|
@@ -74,6 +84,8 @@ export declare const MAX_LAYOUT_ISOLATED = 16;
|
|
|
74
84
|
export declare const MAX_LAYOUT_NODES = 256;
|
|
75
85
|
/** Mirrors `alpha2_model::MAX_LAYOUT_TEXTS`. */
|
|
76
86
|
export declare const MAX_LAYOUT_TEXTS = 64;
|
|
87
|
+
/** Mirrors `alpha2_model::MAX_LETTER_SPACING`. */
|
|
88
|
+
export declare const MAX_LETTER_SPACING = 1;
|
|
77
89
|
/** Mirrors `alpha2_model::MAX_LINE_HEIGHT`. */
|
|
78
90
|
export declare const MAX_LINE_HEIGHT = 3;
|
|
79
91
|
/** Mirrors `alpha2_model::MAX_LOOKAHEAD_MS`. */
|
|
@@ -92,6 +104,12 @@ export declare const MAX_POLYSTAR_POINTS = 100;
|
|
|
92
104
|
export declare const MAX_PROJECT_JSON_BYTES = 67108864;
|
|
93
105
|
/** Mirrors `alpha2_model::MAX_PROVIDER_DOCUMENT_BYTES`. */
|
|
94
106
|
export declare const MAX_PROVIDER_DOCUMENT_BYTES = 268435456;
|
|
107
|
+
/** Mirrors `alpha2_model::MAX_RANGE_INDEX`. */
|
|
108
|
+
export declare const MAX_RANGE_INDEX = 4096;
|
|
109
|
+
/** Mirrors `alpha2_model::MAX_RANGE_PERCENT`. */
|
|
110
|
+
export declare const MAX_RANGE_PERCENT = 200;
|
|
111
|
+
/** Mirrors `alpha2_model::MAX_RUN_CLASSES`. */
|
|
112
|
+
export declare const MAX_RUN_CLASSES = 8;
|
|
95
113
|
/** Mirrors `alpha2_model::MAX_SAMPLE_RATE`. */
|
|
96
114
|
export declare const MAX_SAMPLE_RATE = 96000;
|
|
97
115
|
/** Mirrors `alpha2_model::MAX_SEQUENCE_FRAMES`. */
|
|
@@ -102,14 +120,26 @@ export declare const MAX_SHAPE_DEPTH = 32;
|
|
|
102
120
|
export declare const MAX_SHAPE_ITEMS = 1024;
|
|
103
121
|
/** Mirrors `alpha2_model::MAX_SVG_DOCUMENT_BYTES`. */
|
|
104
122
|
export declare const MAX_SVG_DOCUMENT_BYTES = 33554432;
|
|
123
|
+
/** Mirrors `alpha2_model::MAX_TEXT_ANIMATORS`. */
|
|
124
|
+
export declare const MAX_TEXT_ANIMATORS = 8;
|
|
105
125
|
/** Mirrors `alpha2_model::MAX_TEXT_CONTENT_BYTES`. */
|
|
106
126
|
export declare const MAX_TEXT_CONTENT_BYTES = 4096;
|
|
107
127
|
/** Mirrors `alpha2_model::MAX_TEXT_GENERATOR_FONT_SIZE`. */
|
|
108
128
|
export declare const MAX_TEXT_GENERATOR_FONT_SIZE = 1;
|
|
109
|
-
/** Mirrors `alpha2_model::MAX_TEXT_OUTLINE_WIDTH`. */
|
|
110
|
-
export declare const MAX_TEXT_OUTLINE_WIDTH = 0.5;
|
|
111
129
|
/** Mirrors `alpha2_model::MAX_TEXT_PADDING`. */
|
|
112
130
|
export declare const MAX_TEXT_PADDING = 2;
|
|
131
|
+
/** Mirrors `alpha2_model::MAX_TEXT_RUNS`. */
|
|
132
|
+
export declare const MAX_TEXT_RUNS = 512;
|
|
133
|
+
/** Mirrors `alpha2_model::MAX_TEXT_SHADOWS`. */
|
|
134
|
+
export declare const MAX_TEXT_SHADOWS = 4;
|
|
135
|
+
/** Mirrors `alpha2_model::MAX_TEXT_SHADOW_BLUR`. */
|
|
136
|
+
export declare const MAX_TEXT_SHADOW_BLUR = 1;
|
|
137
|
+
/** Mirrors `alpha2_model::MAX_TEXT_SHADOW_OFFSET`. */
|
|
138
|
+
export declare const MAX_TEXT_SHADOW_OFFSET = 1;
|
|
139
|
+
/** Mirrors `alpha2_model::MAX_TEXT_STROKES`. */
|
|
140
|
+
export declare const MAX_TEXT_STROKES = 4;
|
|
141
|
+
/** Mirrors `alpha2_model::MAX_TEXT_STROKE_EXTENT`. */
|
|
142
|
+
export declare const MAX_TEXT_STROKE_EXTENT = 0.5;
|
|
113
143
|
/** Mirrors `alpha2_model::MAX_TRACKS`. */
|
|
114
144
|
export declare const MAX_TRACKS = 256;
|
|
115
145
|
/** Mirrors `alpha2_model::MAX_TRANSITIONS_PER_TRACK`. */
|
|
@@ -118,14 +148,20 @@ export declare const MAX_TRANSITIONS_PER_TRACK = 4096;
|
|
|
118
148
|
export declare const MIN_EQ_FREQUENCY_HZ = 10;
|
|
119
149
|
/** Mirrors `alpha2_model::MIN_EQ_Q`. */
|
|
120
150
|
export declare const MIN_EQ_Q = 0.05;
|
|
151
|
+
/** Mirrors `alpha2_model::MIN_FONT_WEIGHT`. */
|
|
152
|
+
export declare const MIN_FONT_WEIGHT = 1;
|
|
121
153
|
/** Mirrors `alpha2_model::MIN_HDR_PEAK_NITS`. */
|
|
122
154
|
export declare const MIN_HDR_PEAK_NITS = 100;
|
|
155
|
+
/** Mirrors `alpha2_model::MIN_LETTER_SPACING`. */
|
|
156
|
+
export declare const MIN_LETTER_SPACING = -0.5;
|
|
123
157
|
/** Mirrors `alpha2_model::MIN_LEVEL_DB`. */
|
|
124
158
|
export declare const MIN_LEVEL_DB = -96;
|
|
125
159
|
/** Mirrors `alpha2_model::MIN_LINE_HEIGHT`. */
|
|
126
160
|
export declare const MIN_LINE_HEIGHT = 0.5;
|
|
127
161
|
/** Mirrors `alpha2_model::MIN_POLYSTAR_POINTS`. */
|
|
128
162
|
export declare const MIN_POLYSTAR_POINTS = 3;
|
|
163
|
+
/** Mirrors `alpha2_model::MIN_RANGE_PERCENT`. */
|
|
164
|
+
export declare const MIN_RANGE_PERCENT = -100;
|
|
129
165
|
/** Mirrors `alpha2_model::MIN_SAMPLE_RATE`. */
|
|
130
166
|
export declare const MIN_SAMPLE_RATE = 8000;
|
|
131
167
|
/** Mirrors `alpha2_model::REVERB_DELAY_MS`. */
|
|
@@ -192,10 +228,18 @@ export declare const OVERFLOW_VALUES: readonly Overflow[];
|
|
|
192
228
|
export declare const POLYSTAR_KIND_VALUES: readonly PolystarKind[];
|
|
193
229
|
/** Every {@link Position}, in the model's order. */
|
|
194
230
|
export declare const POSITION_VALUES: readonly Position[];
|
|
231
|
+
/** Every {@link RangeShape}, in the model's order. */
|
|
232
|
+
export declare const RANGE_SHAPE_VALUES: readonly RangeShape[];
|
|
233
|
+
/** Every {@link RangeUnits}, in the model's order. */
|
|
234
|
+
export declare const RANGE_UNITS_VALUES: readonly RangeUnits[];
|
|
235
|
+
/** Every {@link RunState}, in the model's order. */
|
|
236
|
+
export declare const RUN_STATE_VALUES: readonly RunState[];
|
|
195
237
|
/** Every {@link Spread}, in the model's order. */
|
|
196
238
|
export declare const SPREAD_VALUES: readonly Spread[];
|
|
197
239
|
/** Every {@link TextAlign}, in the model's order. */
|
|
198
240
|
export declare const TEXT_ALIGN_VALUES: readonly TextAlign[];
|
|
241
|
+
/** Every {@link TextUnit}, in the model's order. */
|
|
242
|
+
export declare const TEXT_UNIT_VALUES: readonly TextUnit[];
|
|
199
243
|
/** Every {@link TrackKind}, in the model's order. */
|
|
200
244
|
export declare const TRACK_KIND_VALUES: readonly TrackKind[];
|
|
201
245
|
/** Every {@link TransferFunction}, in the model's order. */
|
|
@@ -203,11 +247,10 @@ export declare const TRANSFER_FUNCTION_VALUES: readonly TransferFunction[];
|
|
|
203
247
|
/** Every {@link TrimMode}, in the model's order. */
|
|
204
248
|
export declare const TRIM_MODE_VALUES: readonly TrimMode[];
|
|
205
249
|
/**
|
|
206
|
-
* The deserialized shape of a `Project
|
|
250
|
+
* The deserialized shape of a `Project` before its invariants are checked.
|
|
207
251
|
*
|
|
208
|
-
* This is the wire contract
|
|
209
|
-
*
|
|
210
|
-
* `Project::validate` then decides whether it means anything.
|
|
252
|
+
* This is the wire contract the published JSON Schema is derived from; `Project::validate`
|
|
253
|
+
* then decides whether a well-shaped document is valid.
|
|
211
254
|
*/
|
|
212
255
|
export interface Project {
|
|
213
256
|
/**
|
|
@@ -235,8 +278,7 @@ export interface Project {
|
|
|
235
278
|
*/
|
|
236
279
|
readonly name: string;
|
|
237
280
|
/**
|
|
238
|
-
* Document version. This build reads and writes only
|
|
239
|
-
* `CURRENT_SCHEMA_VERSION`.
|
|
281
|
+
* Document version. This build reads and writes only `CURRENT_SCHEMA_VERSION`.
|
|
240
282
|
*/
|
|
241
283
|
readonly schema_version: 1;
|
|
242
284
|
/**
|
|
@@ -253,13 +295,11 @@ export interface Project {
|
|
|
253
295
|
readonly timeline: Timeline;
|
|
254
296
|
}
|
|
255
297
|
/**
|
|
256
|
-
* Where the lines of a wrapping flex container, or a grid's rows, lie
|
|
257
|
-
* across the container.
|
|
298
|
+
* Where the lines of a wrapping flex container, or a grid's rows, lie across the container.
|
|
258
299
|
*/
|
|
259
300
|
export type AlignContent = "start" | "center" | "end" | "space_between" | "space_around" | "space_evenly" | "stretch";
|
|
260
301
|
/**
|
|
261
|
-
* Where children lie across a flex container's main axis, or in their grid
|
|
262
|
-
* areas.
|
|
302
|
+
* Where children lie across a flex container's main axis, or in their grid areas.
|
|
263
303
|
*/
|
|
264
304
|
export type AlignItems = "start" | "center" | "end" | "stretch";
|
|
265
305
|
/**
|
|
@@ -287,12 +327,10 @@ export type Animated<T> = {
|
|
|
287
327
|
/**
|
|
288
328
|
* A position that can move along curves between its keyframes.
|
|
289
329
|
*
|
|
290
|
-
* Its JSON is
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
* length. Without them it moves in a straight line, as an `Animated<Vec2>`
|
|
295
|
-
* does.
|
|
330
|
+
* Its JSON is an `Animated<Vec2>` plus optional spatial tangents per keyframe. With them,
|
|
331
|
+
* the value travels the cubic Bezier through this keyframe's `out_tangent` and the next's
|
|
332
|
+
* `in_tangent`, at the speed its timing curve sets along the arc length. Without them it
|
|
333
|
+
* moves in a straight line.
|
|
296
334
|
*/
|
|
297
335
|
export type AnimatedPoint = {
|
|
298
336
|
/**
|
|
@@ -316,8 +354,7 @@ export type AnimatedPoint = {
|
|
|
316
354
|
/**
|
|
317
355
|
* A serializable single-input audio effect applied to a clip or track bus.
|
|
318
356
|
*
|
|
319
|
-
* Sidechain ducking
|
|
320
|
-
* It is authored per track through `Ducking`.
|
|
357
|
+
* Sidechain ducking takes a second input, so it is authored per track through `Ducking`.
|
|
321
358
|
*/
|
|
322
359
|
export type AudioEffect = {
|
|
323
360
|
/**
|
|
@@ -334,8 +371,7 @@ export type AudioEffect = {
|
|
|
334
371
|
*/
|
|
335
372
|
readonly attack_ms: number;
|
|
336
373
|
/**
|
|
337
|
-
* Lookahead in milliseconds, at most `MAX_LOOKAHEAD_MS`. Reported as
|
|
338
|
-
* graph latency.
|
|
374
|
+
* Lookahead in milliseconds, at most `MAX_LOOKAHEAD_MS`. Reported as graph latency.
|
|
339
375
|
*
|
|
340
376
|
* @defaultValue `0`
|
|
341
377
|
*/
|
|
@@ -349,8 +385,7 @@ export type AudioEffect = {
|
|
|
349
385
|
*/
|
|
350
386
|
readonly release_ms: number;
|
|
351
387
|
/**
|
|
352
|
-
* Level above which gain reduction begins, in decibels from
|
|
353
|
-
* `MIN_LEVEL_DB` to 0.
|
|
388
|
+
* Level above which gain reduction begins, in decibels from `MIN_LEVEL_DB` to 0.
|
|
354
389
|
*/
|
|
355
390
|
readonly threshold_db: number;
|
|
356
391
|
/**
|
|
@@ -380,8 +415,7 @@ export type AudioEffect = {
|
|
|
380
415
|
*/
|
|
381
416
|
export interface AudioProperties {
|
|
382
417
|
/**
|
|
383
|
-
* Ordered single-input effects applied before the track bus, at most
|
|
384
|
-
* `MAX_CHAIN_EFFECTS`.
|
|
418
|
+
* Ordered single-input effects applied before the track bus, at most `MAX_CHAIN_EFFECTS`.
|
|
385
419
|
*
|
|
386
420
|
* @defaultValue `[]`
|
|
387
421
|
*/
|
|
@@ -393,8 +427,7 @@ export interface AudioProperties {
|
|
|
393
427
|
*/
|
|
394
428
|
readonly fade_in?: MediaTime;
|
|
395
429
|
/**
|
|
396
|
-
* Fade-out duration measured back from the clip's timeline end.
|
|
397
|
-
* Non-negative.
|
|
430
|
+
* Fade-out duration measured back from the clip's timeline end. Non-negative.
|
|
398
431
|
*
|
|
399
432
|
* @defaultValue `0`
|
|
400
433
|
*/
|
|
@@ -423,6 +456,11 @@ export interface AudioProperties {
|
|
|
423
456
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
424
457
|
*/
|
|
425
458
|
readonly pan?: Animated<number>;
|
|
459
|
+
/**
|
|
460
|
+
* Keeps the clip's pitch when its speed is not 1 by time-stretching instead of resampling.
|
|
461
|
+
* No effect at speed 1, on loops or on freezes.
|
|
462
|
+
*/
|
|
463
|
+
readonly preserve_pitch?: boolean;
|
|
426
464
|
}
|
|
427
465
|
/**
|
|
428
466
|
* An audio stream's channel count and sample rate.
|
|
@@ -440,9 +478,8 @@ export interface AudioStreamShape {
|
|
|
440
478
|
/**
|
|
441
479
|
* The color space in which blend modes are evaluated.
|
|
442
480
|
*
|
|
443
|
-
*
|
|
444
|
-
*
|
|
445
|
-
* the other contrast modes look as they do there only in
|
|
481
|
+
* Compositing is always premultiplied; this chooses what the blend formulas see. Contrast
|
|
482
|
+
* modes such as overlay and soft-light match design tools only in
|
|
446
483
|
* `BlendSpace::SrgbEncoded`.
|
|
447
484
|
*/
|
|
448
485
|
export type BlendSpace = "linear_light" | "srgb_encoded";
|
|
@@ -455,28 +492,41 @@ export type CacheIntent = "auto" | "pin" | "bypass";
|
|
|
455
492
|
*/
|
|
456
493
|
export interface CaptionCue {
|
|
457
494
|
/**
|
|
458
|
-
*
|
|
459
|
-
*
|
|
495
|
+
* Who says it, as the source names them (a WebVTT voice), at most 64 bytes. A track style
|
|
496
|
+
* of that name applies when the cue names no style.
|
|
460
497
|
*/
|
|
461
|
-
readonly
|
|
498
|
+
readonly speaker?: string | null;
|
|
499
|
+
/**
|
|
500
|
+
* The name of one of the track's `styles`, applied over its style.
|
|
501
|
+
*/
|
|
502
|
+
readonly style?: string | null;
|
|
503
|
+
/**
|
|
504
|
+
* The text, a string or runs; `\n` starts a line. Non-empty, at most
|
|
505
|
+
* `MAX_TEXT_CONTENT_BYTES` bytes. Run times are from the cue's start and lie within it.
|
|
506
|
+
*/
|
|
507
|
+
readonly text: TextContent;
|
|
462
508
|
/**
|
|
463
509
|
* When the cue shows. Non-empty and not before zero.
|
|
464
510
|
*/
|
|
465
511
|
readonly timeline_range: TimeRange;
|
|
466
512
|
}
|
|
467
513
|
/**
|
|
468
|
-
* What a caption track shows: its cues, in
|
|
514
|
+
* What a caption track shows: its cues, in its style.
|
|
469
515
|
*/
|
|
470
516
|
export interface Captions {
|
|
471
517
|
/**
|
|
472
|
-
* Cues in timeline order, none overlapping
|
|
473
|
-
* cue at a time. Simultaneous captions take one track each.
|
|
518
|
+
* Cues in timeline order, none overlapping; a track shows one cue at a time.
|
|
474
519
|
*/
|
|
475
520
|
readonly cues: readonly CaptionCue[];
|
|
476
521
|
/**
|
|
477
|
-
*
|
|
522
|
+
* The style every cue starts from.
|
|
478
523
|
*/
|
|
479
524
|
readonly style?: TextStyle;
|
|
525
|
+
/**
|
|
526
|
+
* Named changes to `style` for cues that name one or whose speaker has one. At most
|
|
527
|
+
* `MAX_CAPTION_STYLES`, names 1 to 64 bytes.
|
|
528
|
+
*/
|
|
529
|
+
readonly styles?: Readonly<Record<string, TextStylePatch>>;
|
|
480
530
|
}
|
|
481
531
|
/**
|
|
482
532
|
* A reference to a source over independent timeline and source ranges.
|
|
@@ -493,15 +543,13 @@ export interface Clip {
|
|
|
493
543
|
*/
|
|
494
544
|
readonly blend_mode?: ClipBlendMode;
|
|
495
545
|
/**
|
|
496
|
-
* Whether a runtime may keep and reuse the clip's rendered picture.
|
|
497
|
-
*
|
|
498
|
-
* draws.
|
|
546
|
+
* Whether a runtime may keep and reuse the clip's rendered picture. Never changes what
|
|
547
|
+
* renders.
|
|
499
548
|
*/
|
|
500
549
|
readonly cache?: CacheIntent;
|
|
501
550
|
/**
|
|
502
|
-
* The composition graph that builds the clip's picture from its source,
|
|
503
|
-
*
|
|
504
|
-
* source as it is. Visual clips only.
|
|
551
|
+
* The composition graph that builds the clip's picture from its source, with the clip's
|
|
552
|
+
* time mapping onto it. Without one the clip shows its source as is. Visual clips only.
|
|
505
553
|
*
|
|
506
554
|
* @defaultValue `null`
|
|
507
555
|
*/
|
|
@@ -511,9 +559,8 @@ export interface Clip {
|
|
|
511
559
|
*/
|
|
512
560
|
readonly id: ClipId;
|
|
513
561
|
/**
|
|
514
|
-
* Shapes that limit where the clip is visible, applied in order after
|
|
515
|
-
*
|
|
516
|
-
* `MAX_CLIP_MASKS`; visual clips only.
|
|
562
|
+
* Shapes that limit where the clip is visible, applied in order after its composition and
|
|
563
|
+
* before its transform. At most `MAX_CLIP_MASKS`; visual clips only.
|
|
517
564
|
*
|
|
518
565
|
* @defaultValue `[]`
|
|
519
566
|
*/
|
|
@@ -548,21 +595,17 @@ export interface Clip {
|
|
|
548
595
|
readonly visual?: VisualProperties;
|
|
549
596
|
}
|
|
550
597
|
/**
|
|
551
|
-
*
|
|
552
|
-
*
|
|
553
|
-
* The modes are those of W3C Compositing and Blending Level 1 (the CSS
|
|
554
|
-
* `mix-blend-mode` values), with the specification's formulas.
|
|
598
|
+
* Blend mode, from W3C Compositing and Blending Level 1 (CSS `mix-blend-mode`) with the
|
|
599
|
+
* specification's formulas, plus `plus-lighter` from Level 2.
|
|
555
600
|
*/
|
|
556
|
-
export type ClipBlendMode = "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color_dodge" | "color_burn" | "hard_light" | "soft_light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity";
|
|
601
|
+
export type ClipBlendMode = "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color_dodge" | "color_burn" | "hard_light" | "soft_light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity" | "plus_lighter";
|
|
557
602
|
/**
|
|
558
603
|
* A clip's use of a `Composition`, and how its time maps onto it.
|
|
559
604
|
*
|
|
560
|
-
* Composition time is `offset + (t - clip start) * scale` for timeline time
|
|
561
|
-
*
|
|
562
|
-
*
|
|
563
|
-
* offset
|
|
564
|
-
* start before composition time zero makes the offset negative: settings
|
|
565
|
-
* hold their first keyframe there, and media nodes show their first frame.
|
|
605
|
+
* Composition time is `offset + (t - clip start) * scale` for timeline time `t`, rounded
|
|
606
|
+
* down to a tick. Moving a clip keeps its offset so the animation moves with it; trimming
|
|
607
|
+
* its start by `d` adds `d * scale` to the offset so the rest stays in place. A negative
|
|
608
|
+
* offset holds settings at their first keyframe and media nodes at their first frame.
|
|
566
609
|
*/
|
|
567
610
|
export interface ClipComposition {
|
|
568
611
|
/**
|
|
@@ -583,8 +626,8 @@ export interface ClipComposition {
|
|
|
583
626
|
readonly scale?: TimeScale;
|
|
584
627
|
}
|
|
585
628
|
/**
|
|
586
|
-
* One versioned
|
|
587
|
-
* transition
|
|
629
|
+
* One versioned effect invocation: a composition's effect or transition node, or a timeline
|
|
630
|
+
* transition.
|
|
588
631
|
*/
|
|
589
632
|
export interface ClipEffect {
|
|
590
633
|
/**
|
|
@@ -592,14 +635,12 @@ export interface ClipEffect {
|
|
|
592
635
|
*/
|
|
593
636
|
readonly id: string;
|
|
594
637
|
/**
|
|
595
|
-
* Named parameter values, constant or keyframed. Omitted entries use
|
|
596
|
-
* definition defaults.
|
|
638
|
+
* Named parameter values, constant or keyframed. Omitted entries use definition defaults.
|
|
597
639
|
*
|
|
598
|
-
* Keyframe times are composition times in a composition node and
|
|
599
|
-
* timeline
|
|
600
|
-
*
|
|
601
|
-
*
|
|
602
|
-
* range is clamped to it; an authored value outside it is an error.
|
|
640
|
+
* Keyframe times are composition times in a composition node and timeline times in a
|
|
641
|
+
* timeline transition. A parameter's keyframes share one value type, and `enum` and `bool`
|
|
642
|
+
* keyframes only hold. Interpolated overshoot is clamped to the parameter's range; an
|
|
643
|
+
* authored value outside it is an error.
|
|
603
644
|
*
|
|
604
645
|
* @defaultValue `{}`
|
|
605
646
|
*/
|
|
@@ -624,8 +665,8 @@ export type ClipId = string;
|
|
|
624
665
|
*/
|
|
625
666
|
export interface ClipTransition {
|
|
626
667
|
/**
|
|
627
|
-
* Timing curve applied to the transition's linear progress. The eased
|
|
628
|
-
*
|
|
668
|
+
* Timing curve applied to the transition's linear progress. The eased progress is clamped
|
|
669
|
+
* to `0..=1`.
|
|
629
670
|
*/
|
|
630
671
|
readonly easing: Easing;
|
|
631
672
|
/**
|
|
@@ -654,8 +695,7 @@ export type ColorMatrix = "bt601" | "bt709" | "bt2020_ncl" | "rgb";
|
|
|
654
695
|
*/
|
|
655
696
|
export interface ColorMetadata {
|
|
656
697
|
/**
|
|
657
|
-
* SDR or HDR
|
|
658
|
-
* or HLG (`is_consistent`).
|
|
698
|
+
* SDR or HDR; HDR exactly when `transfer` is PQ or HLG (`is_consistent`).
|
|
659
699
|
*/
|
|
660
700
|
readonly dynamic_range: DynamicRange;
|
|
661
701
|
/**
|
|
@@ -678,13 +718,11 @@ export interface ColorMetadata {
|
|
|
678
718
|
/**
|
|
679
719
|
* How sources' colors come into the working space.
|
|
680
720
|
*
|
|
681
|
-
* The working space is display-referred linear light with BT.709 primaries,
|
|
682
|
-
*
|
|
683
|
-
*
|
|
684
|
-
* BT.709
|
|
685
|
-
*
|
|
686
|
-
* tone-mapped from `hdr_peak_nits` to SDR white by the ITU-R BT.2390
|
|
687
|
-
* EETF on each pixel's largest component, which keeps its hue.
|
|
721
|
+
* The working space is display-referred linear light with BT.709 primaries, `1.0` being SDR
|
|
722
|
+
* white (100 nits); every export is SDR BT.709. SDR sources decode through the sRGB EOTF and
|
|
723
|
+
* wide-gamut ones are converted to BT.709. An HDR (PQ or HLG) source is either refused or
|
|
724
|
+
* linearized, converted to BT.709, and tone-mapped from `hdr_peak_nits` to SDR white
|
|
725
|
+
* by the ITU-R BT.2390 EETF on each pixel's largest component, preserving hue.
|
|
688
726
|
*/
|
|
689
727
|
export interface ColorPipeline {
|
|
690
728
|
/**
|
|
@@ -694,9 +732,8 @@ export interface ColorPipeline {
|
|
|
694
732
|
*/
|
|
695
733
|
readonly hdr?: HdrSources;
|
|
696
734
|
/**
|
|
697
|
-
* The luminance, in nits, HDR sources are taken to peak at: PQ above it
|
|
698
|
-
*
|
|
699
|
-
* to SDR white. Within `HDR_PEAK_NITS_RANGE`.
|
|
735
|
+
* The luminance, in nits, HDR sources are taken to peak at: PQ above it is clipped, HLG is
|
|
736
|
+
* displayed at it, and the tone map brings it to SDR white. Within `HDR_PEAK_NITS_RANGE`.
|
|
700
737
|
*
|
|
701
738
|
* @defaultValue `1000`
|
|
702
739
|
*/
|
|
@@ -723,28 +760,27 @@ export interface Composition {
|
|
|
723
760
|
*/
|
|
724
761
|
readonly id: CompositionId;
|
|
725
762
|
/**
|
|
726
|
-
* The images a group node gives it, by name, in port order
|
|
727
|
-
*
|
|
763
|
+
* The images a group node gives it, by name, in port order; its `NodeOp::GroupInput`
|
|
764
|
+
* nodes read them.
|
|
728
765
|
*/
|
|
729
766
|
readonly inputs?: readonly string[];
|
|
730
767
|
/**
|
|
731
|
-
* The graph's nodes.
|
|
732
|
-
* listed after it as its input.
|
|
768
|
+
* The graph's nodes. Order has no meaning; a node may name a later node as its input.
|
|
733
769
|
*
|
|
734
770
|
* @defaultValue `[]`
|
|
735
771
|
*/
|
|
736
772
|
readonly nodes?: readonly CompositionNode[];
|
|
737
773
|
/**
|
|
738
|
-
* The node whose image is the composition's picture. A composition
|
|
739
|
-
*
|
|
774
|
+
* The node whose image is the composition's picture. A composition without one saves but
|
|
775
|
+
* cannot be rendered.
|
|
740
776
|
*
|
|
741
777
|
* @defaultValue `null`
|
|
742
778
|
*/
|
|
743
779
|
readonly output?: NodeId | null;
|
|
744
780
|
}
|
|
745
781
|
/**
|
|
746
|
-
* A node setting a composition exposes to
|
|
747
|
-
*
|
|
782
|
+
* A node setting a composition exposes to group nodes: an effect or transition parameter of
|
|
783
|
+
* one of its nodes.
|
|
748
784
|
*/
|
|
749
785
|
export interface CompositionControl {
|
|
750
786
|
/**
|
|
@@ -769,9 +805,8 @@ export type CompositionId = string;
|
|
|
769
805
|
*/
|
|
770
806
|
export interface CompositionNode {
|
|
771
807
|
/**
|
|
772
|
-
* Whether the node passes its `NodeOp::bypass_input` through
|
|
773
|
-
*
|
|
774
|
-
* bypassed.
|
|
808
|
+
* Whether the node passes its `NodeOp::bypass_input` through unchanged. A node without
|
|
809
|
+
* inputs cannot be bypassed.
|
|
775
810
|
*
|
|
776
811
|
* @defaultValue `false`
|
|
777
812
|
*/
|
|
@@ -796,9 +831,9 @@ export interface Dash {
|
|
|
796
831
|
*/
|
|
797
832
|
readonly offset?: Animated<number>;
|
|
798
833
|
/**
|
|
799
|
-
* Alternating dash and gap lengths, as fractions of the shorter side:
|
|
800
|
-
*
|
|
801
|
-
*
|
|
834
|
+
* Alternating dash and gap lengths, as fractions of the shorter side: one to
|
|
835
|
+
* `MAX_DASH_ENTRIES` non-negative entries, not all zero. An odd count repeats once more to
|
|
836
|
+
* pair up.
|
|
802
837
|
*/
|
|
803
838
|
readonly pattern: readonly Animated<number>[];
|
|
804
839
|
}
|
|
@@ -832,9 +867,7 @@ export interface Ducking {
|
|
|
832
867
|
readonly threshold: number;
|
|
833
868
|
}
|
|
834
869
|
/**
|
|
835
|
-
*
|
|
836
|
-
* transfer: `hdr` exactly when the transfer is PQ or HLG, and a color
|
|
837
|
-
* whose two fields disagree is refused.
|
|
870
|
+
* Standard or high dynamic range; must agree with the transfer.
|
|
838
871
|
*/
|
|
839
872
|
export type DynamicRange = "sdr" | "hdr";
|
|
840
873
|
/**
|
|
@@ -911,15 +944,14 @@ export type EffectValue = {
|
|
|
911
944
|
readonly value: readonly [number, number];
|
|
912
945
|
} | {
|
|
913
946
|
/**
|
|
914
|
-
* Four finite components that are not a color, such as per-channel
|
|
915
|
-
*
|
|
947
|
+
* Four finite components that are not a color, such as per-channel thresholds; they
|
|
948
|
+
* keyframe component by component.
|
|
916
949
|
*/
|
|
917
950
|
readonly type: "vec4";
|
|
918
951
|
readonly value: readonly [number, number, number, number];
|
|
919
952
|
} | {
|
|
920
953
|
/**
|
|
921
|
-
* Straight (not premultiplied), sRGB-encoded RGBA
|
|
922
|
-
* inclusive unit interval, as a color picker shows them.
|
|
954
|
+
* Straight (not premultiplied), sRGB-encoded RGBA in `0..=1`, as a color picker shows it.
|
|
923
955
|
*/
|
|
924
956
|
readonly type: "color";
|
|
925
957
|
readonly value: readonly [number, number, number, number];
|
|
@@ -945,8 +977,8 @@ export interface EqBand {
|
|
|
945
977
|
*/
|
|
946
978
|
readonly frequency_hz: number;
|
|
947
979
|
/**
|
|
948
|
-
* Peaking gain in decibels, at most `MAX_EQ_GAIN_DB` either way.
|
|
949
|
-
*
|
|
980
|
+
* Peaking gain in decibels, at most `MAX_EQ_GAIN_DB` either way. Ignored by the pass
|
|
981
|
+
* filters.
|
|
950
982
|
*
|
|
951
983
|
* @defaultValue `0`
|
|
952
984
|
*/
|
|
@@ -981,8 +1013,7 @@ export type FlexDirection = "row" | "column" | "row_reverse" | "column_reverse";
|
|
|
981
1013
|
*/
|
|
982
1014
|
export type FlexWrap = "nowrap" | "wrap";
|
|
983
1015
|
/**
|
|
984
|
-
* A positive rational frame rate in reduced form, at most one frame per tick
|
|
985
|
-
* (120 000 frames per second).
|
|
1016
|
+
* A positive rational frame rate in reduced form, at most one frame per tick (120 000 fps).
|
|
986
1017
|
*/
|
|
987
1018
|
export interface FrameRate {
|
|
988
1019
|
/**
|
|
@@ -997,12 +1028,10 @@ export interface FrameRate {
|
|
|
997
1028
|
/**
|
|
998
1029
|
* The picture of a generated source.
|
|
999
1030
|
*
|
|
1000
|
-
* A generated picture has the canvas's size and aspect
|
|
1001
|
-
*
|
|
1002
|
-
*
|
|
1003
|
-
*
|
|
1004
|
-
* resolution. A fill or text does not change over time (a clip animates it
|
|
1005
|
-
* with its transform, effects, and masks); shapes and layouts may.
|
|
1031
|
+
* A generated picture has the canvas's size and aspect. Positions are normalized, `(0, 0)`
|
|
1032
|
+
* top-left to `(1, 1)` bottom-right, and lengths are fractions of the shorter side, so the
|
|
1033
|
+
* picture is the same at any render resolution. A fill never changes over time; text
|
|
1034
|
+
* changes only through its style's animators; shapes and layouts may change.
|
|
1006
1035
|
*/
|
|
1007
1036
|
export type Generator = {
|
|
1008
1037
|
/**
|
|
@@ -1019,10 +1048,8 @@ export type Generator = {
|
|
|
1019
1048
|
*/
|
|
1020
1049
|
readonly items: readonly ShapeItem[];
|
|
1021
1050
|
/**
|
|
1022
|
-
* Shapes drawn from an ordered content tree, as an After Effects shape
|
|
1023
|
-
*
|
|
1024
|
-
* generators, its picture changes over time: every value in the tree
|
|
1025
|
-
* may be keyframed, in the picture's time.
|
|
1051
|
+
* Shapes drawn from an ordered content tree, as an After Effects or Lottie shape layer draws
|
|
1052
|
+
* them. Every value in the tree may be keyframed in picture time.
|
|
1026
1053
|
*/
|
|
1027
1054
|
readonly type: "shapes";
|
|
1028
1055
|
} | {
|
|
@@ -1032,15 +1059,13 @@ export type Generator = {
|
|
|
1032
1059
|
*/
|
|
1033
1060
|
readonly style?: TextStyle;
|
|
1034
1061
|
/**
|
|
1035
|
-
* The text; `\n` starts a line. Non-empty, at most
|
|
1036
|
-
* `MAX_TEXT_CONTENT_BYTES` bytes.
|
|
1062
|
+
* The text, a string or runs; `\n` starts a line. Non-empty, at most
|
|
1063
|
+
* `MAX_TEXT_CONTENT_BYTES` bytes. Run times are picture time.
|
|
1037
1064
|
*/
|
|
1038
|
-
readonly text:
|
|
1065
|
+
readonly text: TextContent;
|
|
1039
1066
|
/**
|
|
1040
|
-
* Text on a transparent picture, laid out and placed by its style as
|
|
1041
|
-
*
|
|
1042
|
-
* the canvas, its anchor at `style.position`. The engine draws it with
|
|
1043
|
-
* the fonts its host registered.
|
|
1067
|
+
* Text on a transparent picture, laid out and placed by its style as caption cues are, and
|
|
1068
|
+
* drawn with the host's registered fonts.
|
|
1044
1069
|
*/
|
|
1045
1070
|
readonly type: "text";
|
|
1046
1071
|
} | {
|
|
@@ -1049,10 +1074,8 @@ export type Generator = {
|
|
|
1049
1074
|
*/
|
|
1050
1075
|
readonly root: LayoutNode;
|
|
1051
1076
|
/**
|
|
1052
|
-
* Boxes laid out by CSS flexbox around their text and shapes.
|
|
1053
|
-
*
|
|
1054
|
-
* in the picture's time. The engine lays it out with the fonts it
|
|
1055
|
-
* draws with. See `LayoutNode`.
|
|
1077
|
+
* Boxes laid out by CSS flexbox around their text and shapes, with the engine's fonts. Any
|
|
1078
|
+
* value in the tree may be keyframed in picture time. See `LayoutNode`.
|
|
1056
1079
|
*/
|
|
1057
1080
|
readonly type: "layout";
|
|
1058
1081
|
};
|
|
@@ -1093,9 +1116,8 @@ export type Insets = number | string | {
|
|
|
1093
1116
|
/**
|
|
1094
1117
|
* Interpolation from one keyframe to the next.
|
|
1095
1118
|
*
|
|
1096
|
-
* Values
|
|
1097
|
-
*
|
|
1098
|
-
* shortest path normalizes its keyframe values.
|
|
1119
|
+
* Values interpolate numerically: a rotation from 0 to 720 degrees turns twice. A host that
|
|
1120
|
+
* wants the shortest path normalizes its keyframe values.
|
|
1099
1121
|
*/
|
|
1100
1122
|
export type Interpolation = {
|
|
1101
1123
|
/**
|
|
@@ -1130,8 +1152,7 @@ export type Interpolation = {
|
|
|
1130
1152
|
readonly y2: number;
|
|
1131
1153
|
};
|
|
1132
1154
|
/**
|
|
1133
|
-
* Where children lie along a container's main axis, or a grid's columns in
|
|
1134
|
-
* it.
|
|
1155
|
+
* Where children lie along a container's main axis, or a grid's columns in it.
|
|
1135
1156
|
*/
|
|
1136
1157
|
export type JustifyContent = "start" | "center" | "end" | "space_between" | "space_around" | "space_evenly";
|
|
1137
1158
|
/**
|
|
@@ -1143,10 +1164,8 @@ export interface Keyframe<T> {
|
|
|
1143
1164
|
*/
|
|
1144
1165
|
readonly interpolation: Interpolation;
|
|
1145
1166
|
/**
|
|
1146
|
-
* Timestamp of this value
|
|
1147
|
-
*
|
|
1148
|
-
* shapes or layout generator's tree, which is keyed in its picture's
|
|
1149
|
-
* time.
|
|
1167
|
+
* Timestamp of this value. Timeline time, except composition time in a composition node's
|
|
1168
|
+
* settings and picture time in a shapes or layout generator's tree.
|
|
1150
1169
|
*/
|
|
1151
1170
|
readonly time: MediaTime;
|
|
1152
1171
|
/**
|
|
@@ -1168,9 +1187,8 @@ export interface LayoutBorder {
|
|
|
1168
1187
|
readonly width: Animated<LayoutSize>;
|
|
1169
1188
|
}
|
|
1170
1189
|
/**
|
|
1171
|
-
* Where an absolute box lies in its parent's padding box. A missing side is
|
|
1172
|
-
*
|
|
1173
|
-
* flow on that axis.
|
|
1190
|
+
* Where an absolute box lies in its parent's padding box. A missing side is auto; with
|
|
1191
|
+
* neither `left` nor `right`, the box keeps its flow position on that axis.
|
|
1174
1192
|
*/
|
|
1175
1193
|
export interface LayoutInset {
|
|
1176
1194
|
/**
|
|
@@ -1197,27 +1215,24 @@ export type LayoutLength = number | string;
|
|
|
1197
1215
|
/**
|
|
1198
1216
|
* One box of a layout tree.
|
|
1199
1217
|
*
|
|
1200
|
-
* A box lays its children out by flexbox (
|
|
1201
|
-
*
|
|
1202
|
-
*
|
|
1203
|
-
*
|
|
1204
|
-
* then its content. Boxes are drawn in document order; a reversed
|
|
1205
|
-
* direction or a grid placement moves them, not their order.
|
|
1218
|
+
* A box lays its children out by flexbox (the default) or grid. It is a container with
|
|
1219
|
+
* children, a leaf with text or shape content, and empty otherwise (a spacer or decoration).
|
|
1220
|
+
* Each box draws background, then border, then content. Boxes draw in document order;
|
|
1221
|
+
* reversed directions and grid placement move them but do not change paint order.
|
|
1206
1222
|
*/
|
|
1207
1223
|
export interface LayoutNode {
|
|
1208
1224
|
/**
|
|
1209
|
-
* Where lines of a wrapping flex container, or a grid's rows, lie
|
|
1210
|
-
*
|
|
1225
|
+
* Where lines of a wrapping flex container, or a grid's rows, lie across the container.
|
|
1226
|
+
* Default `stretch`.
|
|
1211
1227
|
*/
|
|
1212
1228
|
readonly align_content?: AlignContent | null;
|
|
1213
1229
|
/**
|
|
1214
|
-
* Where children lie across the main axis, or in their grid areas'
|
|
1215
|
-
* rows. Default `stretch`.
|
|
1230
|
+
* Where children lie across the main axis, or in their grid areas' rows. Default `stretch`.
|
|
1216
1231
|
*/
|
|
1217
1232
|
readonly align_items?: AlignItems | null;
|
|
1218
1233
|
/**
|
|
1219
|
-
* Where the box lies across its flex container's main axis, or in its
|
|
1220
|
-
*
|
|
1234
|
+
* Where the box lies across its flex container's main axis, or in its grid area's row.
|
|
1235
|
+
* `None` follows the parent's `align_items`.
|
|
1221
1236
|
*/
|
|
1222
1237
|
readonly align_self?: AlignItems | null;
|
|
1223
1238
|
/**
|
|
@@ -1225,8 +1240,8 @@ export interface LayoutNode {
|
|
|
1225
1240
|
*/
|
|
1226
1241
|
readonly aspect_ratio?: number | null;
|
|
1227
1242
|
/**
|
|
1228
|
-
* What covers the border box, rounded by `border_radius`. Positions
|
|
1229
|
-
*
|
|
1243
|
+
* What covers the border box, rounded by `border_radius`. Positions are normalized to the
|
|
1244
|
+
* border box.
|
|
1230
1245
|
*/
|
|
1231
1246
|
readonly background?: Animated<Paint> | null;
|
|
1232
1247
|
/**
|
|
@@ -1234,28 +1249,27 @@ export interface LayoutNode {
|
|
|
1234
1249
|
*/
|
|
1235
1250
|
readonly border?: LayoutBorder | null;
|
|
1236
1251
|
/**
|
|
1237
|
-
* The corner radius of the border box. At least 0; default 0.
|
|
1238
|
-
*
|
|
1252
|
+
* The corner radius of the border box. At least 0; default 0. Capped at half the box's
|
|
1253
|
+
* shorter side.
|
|
1239
1254
|
*/
|
|
1240
1255
|
readonly border_radius?: Animated<LayoutSize> | null;
|
|
1241
1256
|
/**
|
|
1242
|
-
* Boxes laid out in this one, in document (and paint) order. Not with
|
|
1243
|
-
* `text` or `shape`.
|
|
1257
|
+
* Boxes laid out in this one, in document (and paint) order. Not with `text` or `shape`.
|
|
1244
1258
|
*/
|
|
1245
1259
|
readonly children?: readonly LayoutNode[];
|
|
1246
|
-
/**
|
|
1247
|
-
* Text color. Inherited; the root's is white.
|
|
1248
|
-
*/
|
|
1249
|
-
readonly color?: Rgba | null;
|
|
1250
1260
|
/**
|
|
1251
1261
|
* Space between columns, in place of `gap`. At least 0.
|
|
1252
1262
|
*/
|
|
1253
1263
|
readonly column_gap?: Animated<LayoutSize> | null;
|
|
1254
1264
|
/**
|
|
1255
|
-
* How the box lays its children out. Default `flex`.
|
|
1256
|
-
* text or shape content
|
|
1265
|
+
* How the box lays its children out. Default `flex`. Like every container field, not on a
|
|
1266
|
+
* box with text or shape content.
|
|
1257
1267
|
*/
|
|
1258
1268
|
readonly display?: Display | null;
|
|
1269
|
+
/**
|
|
1270
|
+
* What paints the text's glyphs, as a text style's `fill`. Inherited; the root's is white.
|
|
1271
|
+
*/
|
|
1272
|
+
readonly fill?: Paint | null;
|
|
1259
1273
|
/**
|
|
1260
1274
|
* The main size before growing and shrinking. `None` is auto.
|
|
1261
1275
|
*/
|
|
@@ -1265,30 +1279,34 @@ export interface LayoutNode {
|
|
|
1265
1279
|
*/
|
|
1266
1280
|
readonly flex_direction?: FlexDirection | null;
|
|
1267
1281
|
/**
|
|
1268
|
-
* How much of a flex container's free space the box takes. At least
|
|
1269
|
-
*
|
|
1282
|
+
* How much of a flex container's free space the box takes. At least 0; default 0. Like
|
|
1283
|
+
* every flex item field, not in a grid.
|
|
1270
1284
|
*/
|
|
1271
1285
|
readonly flex_grow?: Animated<number> | null;
|
|
1272
1286
|
/**
|
|
1273
|
-
* How much the box gives up when a flex container's space runs short.
|
|
1274
|
-
*
|
|
1287
|
+
* How much the box gives up when a flex container's space runs short. At least 0; default
|
|
1288
|
+
* 1.
|
|
1275
1289
|
*/
|
|
1276
1290
|
readonly flex_shrink?: Animated<number> | null;
|
|
1277
1291
|
/**
|
|
1278
|
-
* Whether a flex container's children wrap onto more lines. Default
|
|
1279
|
-
* `nowrap`.
|
|
1292
|
+
* Whether a flex container's children wrap onto more lines. Default `nowrap`.
|
|
1280
1293
|
*/
|
|
1281
1294
|
readonly flex_wrap?: FlexWrap | null;
|
|
1282
1295
|
/**
|
|
1283
|
-
* The family the box's text draws in, as a text style's
|
|
1284
|
-
*
|
|
1296
|
+
* The family the box's text draws in, as a text style's `font_family`. Inherited; the
|
|
1297
|
+
* root's is the host's first font.
|
|
1285
1298
|
*/
|
|
1286
1299
|
readonly font_family?: string | null;
|
|
1287
1300
|
/**
|
|
1288
|
-
* Font size: positive, at most `MAX_LAYOUT_FONT_SIZE` of the
|
|
1289
|
-
*
|
|
1301
|
+
* Font size: positive, at most `MAX_LAYOUT_FONT_SIZE` of the picture's shorter side.
|
|
1302
|
+
* Inherited; the root's is 0.05.
|
|
1290
1303
|
*/
|
|
1291
1304
|
readonly font_size?: Animated<LayoutSize> | null;
|
|
1305
|
+
/**
|
|
1306
|
+
* The weight in `[1, 1000]` used to match the family's faces, as a text style's
|
|
1307
|
+
* `font_weight`. Not animated. Inherited; the root's is 400.
|
|
1308
|
+
*/
|
|
1309
|
+
readonly font_weight?: number | null;
|
|
1292
1310
|
/**
|
|
1293
1311
|
* Space between children, on both axes. At least 0; default 0.
|
|
1294
1312
|
*/
|
|
@@ -1306,8 +1324,8 @@ export interface LayoutNode {
|
|
|
1306
1324
|
*/
|
|
1307
1325
|
readonly grid_auto_rows?: TrackList | null;
|
|
1308
1326
|
/**
|
|
1309
|
-
* The box's columns in its grid, as CSS writes them (`2`, `"1 / 3"`,
|
|
1310
|
-
* `
|
|
1327
|
+
* The box's columns in its grid, as CSS writes them (`2`, `"1 / 3"`, `"span 2"`). Default
|
|
1328
|
+
* `auto`.
|
|
1311
1329
|
*/
|
|
1312
1330
|
readonly grid_column?: GridPlacement | null;
|
|
1313
1331
|
/**
|
|
@@ -1332,29 +1350,30 @@ export interface LayoutNode {
|
|
|
1332
1350
|
*/
|
|
1333
1351
|
readonly inset?: LayoutInset | null;
|
|
1334
1352
|
/**
|
|
1335
|
-
* Where children lie along the main (
|
|
1336
|
-
* `start`.
|
|
1353
|
+
* Where children lie along the main (for a grid, inline) axis. Default `start`.
|
|
1337
1354
|
*/
|
|
1338
1355
|
readonly justify_content?: JustifyContent | null;
|
|
1339
1356
|
/**
|
|
1340
|
-
* Where a grid's children lie in their grid areas' columns. Default
|
|
1341
|
-
* `stretch`.
|
|
1357
|
+
* Where a grid's children lie in their grid areas' columns. Default `stretch`.
|
|
1342
1358
|
*/
|
|
1343
1359
|
readonly justify_items?: AlignItems | null;
|
|
1344
1360
|
/**
|
|
1345
|
-
* Where the box lies in its grid area's column. `None` follows the
|
|
1346
|
-
*
|
|
1347
|
-
* item field.
|
|
1361
|
+
* Where the box lies in its grid area's column. `None` follows the parent's
|
|
1362
|
+
* `justify_items`. Like every grid item field, not in a flex container.
|
|
1348
1363
|
*/
|
|
1349
1364
|
readonly justify_self?: AlignItems | null;
|
|
1350
1365
|
/**
|
|
1351
|
-
*
|
|
1352
|
-
* Inherited; the root's is
|
|
1366
|
+
* Space after each character, as a fraction of the font size, in `[-0.5, 1]`, as a text
|
|
1367
|
+
* style's `letter_spacing`. Not animated. Inherited; the root's is 0.
|
|
1368
|
+
*/
|
|
1369
|
+
readonly letter_spacing?: number | null;
|
|
1370
|
+
/**
|
|
1371
|
+
* Baseline-to-baseline distance in font sizes, in `[0.5, 3]`, as a text style's
|
|
1372
|
+
* `line_height`. Inherited; the root's is 1.2.
|
|
1353
1373
|
*/
|
|
1354
1374
|
readonly line_height?: number | null;
|
|
1355
1375
|
/**
|
|
1356
|
-
* Space outside the border, written as `padding` is. Sides may be
|
|
1357
|
-
* negative; there is no `auto`.
|
|
1376
|
+
* Space outside the border, written as `padding` is. Sides may be negative; no `auto`.
|
|
1358
1377
|
*/
|
|
1359
1378
|
readonly margin?: Animated<Insets> | null;
|
|
1360
1379
|
/**
|
|
@@ -1374,22 +1393,16 @@ export interface LayoutNode {
|
|
|
1374
1393
|
*/
|
|
1375
1394
|
readonly min_width?: Animated<LayoutLength> | null;
|
|
1376
1395
|
/**
|
|
1377
|
-
* Opacity of the box and everything in it
|
|
1378
|
-
* Drawn after layout; it never moves a box.
|
|
1396
|
+
* Opacity of the box and everything in it as one group, in `0..=1`. Applied after layout.
|
|
1379
1397
|
*/
|
|
1380
1398
|
readonly opacity?: Animated<number> | null;
|
|
1381
|
-
/**
|
|
1382
|
-
* A band around the glyphs; its width a fraction of the font size.
|
|
1383
|
-
* Inherited; the root has none.
|
|
1384
|
-
*/
|
|
1385
|
-
readonly outline?: TextOutline | null;
|
|
1386
1399
|
/**
|
|
1387
1400
|
* Whether content past the padding box is drawn. Default `visible`.
|
|
1388
1401
|
*/
|
|
1389
1402
|
readonly overflow?: Overflow | null;
|
|
1390
1403
|
/**
|
|
1391
|
-
* Space inside the border: a length, the CSS shorthand
|
|
1392
|
-
*
|
|
1404
|
+
* Space inside the border: a length, the CSS shorthand (`"8px 16px"`), or the sides object.
|
|
1405
|
+
* Sides at least 0; default 0.
|
|
1393
1406
|
*/
|
|
1394
1407
|
readonly padding?: Animated<Insets> | null;
|
|
1395
1408
|
/**
|
|
@@ -1397,45 +1410,57 @@ export interface LayoutNode {
|
|
|
1397
1410
|
*/
|
|
1398
1411
|
readonly position?: Position | null;
|
|
1399
1412
|
/**
|
|
1400
|
-
* Clockwise rotation of the box and everything in it about its
|
|
1401
|
-
*
|
|
1413
|
+
* Clockwise rotation of the box and everything in it about its border-box centre, in
|
|
1414
|
+
* degrees, after layout.
|
|
1402
1415
|
*/
|
|
1403
1416
|
readonly rotation_degrees?: Animated<number> | null;
|
|
1404
1417
|
/**
|
|
1405
|
-
* Space between rows (
|
|
1406
|
-
*
|
|
1418
|
+
* Space between rows (or lines of a wrapping row flex container), in place of `gap`. At
|
|
1419
|
+
* least 0.
|
|
1407
1420
|
*/
|
|
1408
1421
|
readonly row_gap?: Animated<LayoutSize> | null;
|
|
1409
1422
|
/**
|
|
1410
|
-
* Per-axis scale of the box and everything in it about its border-box
|
|
1411
|
-
* centre, after layout.
|
|
1423
|
+
* Per-axis scale of the box and everything in it about its border-box centre, after layout.
|
|
1412
1424
|
*/
|
|
1413
1425
|
readonly scale?: Animated<Vec2> | null;
|
|
1414
1426
|
/**
|
|
1415
|
-
*
|
|
1416
|
-
* `
|
|
1427
|
+
* Shadows of the glyphs and strokes, as a text style's `shadows`. Inherited as a whole list
|
|
1428
|
+
* (as CSS `text-shadow`); the root has none.
|
|
1429
|
+
*/
|
|
1430
|
+
readonly shadows?: readonly TextShadow[] | null;
|
|
1431
|
+
/**
|
|
1432
|
+
* Shapes drawn on a picture the size of the box's content box. Not with `children` or
|
|
1433
|
+
* `text`.
|
|
1417
1434
|
*/
|
|
1418
1435
|
readonly shape?: LayoutShape | null;
|
|
1419
1436
|
/**
|
|
1420
|
-
*
|
|
1421
|
-
*
|
|
1422
|
-
|
|
1423
|
-
|
|
1437
|
+
* Bands around the glyphs, as a text style's `strokes`. Inherited as a whole list; the root
|
|
1438
|
+
* has none.
|
|
1439
|
+
*/
|
|
1440
|
+
readonly strokes?: readonly TextStroke[] | null;
|
|
1441
|
+
/**
|
|
1442
|
+
* The box's text, wrapped at its content width in the inherited style; `\n` starts a line.
|
|
1443
|
+
* At most `MAX_TEXT_CONTENT_BYTES` bytes per value; may be empty. Keyframes all `hold`.
|
|
1444
|
+
* Not with `children` or `shape`.
|
|
1424
1445
|
*/
|
|
1425
1446
|
readonly text?: Animated<string> | null;
|
|
1426
1447
|
/**
|
|
1427
|
-
* How lines align within the content width. Inherited; the root's is
|
|
1428
|
-
* `start`.
|
|
1448
|
+
* How lines align within the content width. Inherited; the root's is `start`.
|
|
1429
1449
|
*/
|
|
1430
1450
|
readonly text_align?: TextAlign | null;
|
|
1431
1451
|
/**
|
|
1432
|
-
*
|
|
1433
|
-
*
|
|
1452
|
+
* Per-character motion of the box's own text, Range selectors only (layout text has no
|
|
1453
|
+
* runs). At most `MAX_TEXT_ANIMATORS`, keyed in picture time. Not inherited; never
|
|
1454
|
+
* changes layout.
|
|
1455
|
+
*/
|
|
1456
|
+
readonly text_animators?: readonly TextAnimator[];
|
|
1457
|
+
/**
|
|
1458
|
+
* Offset of the box and everything in it after layout: the object, or one or two lengths as
|
|
1459
|
+
* CSS `translate` writes them.
|
|
1434
1460
|
*/
|
|
1435
1461
|
readonly translate?: Animated<LayoutOffset> | null;
|
|
1436
1462
|
/**
|
|
1437
|
-
* Border-box width. `None` is auto.
|
|
1438
|
-
* field.
|
|
1463
|
+
* Border-box width. `None` is auto. Like every item field, not on the root.
|
|
1439
1464
|
*/
|
|
1440
1465
|
readonly width?: Animated<LayoutLength> | null;
|
|
1441
1466
|
}
|
|
@@ -1447,10 +1472,8 @@ export type LayoutOffset = string | {
|
|
|
1447
1472
|
readonly y: LayoutSize;
|
|
1448
1473
|
};
|
|
1449
1474
|
/**
|
|
1450
|
-
* A box's shapes, drawn as a shapes generator draws its items on a picture
|
|
1451
|
-
*
|
|
1452
|
-
* lengths fractions of its shorter side. A shape box has no size of its
|
|
1453
|
-
* own.
|
|
1475
|
+
* A box's shapes, drawn as a shapes generator draws its items on a picture the size of the
|
|
1476
|
+
* box's content box. A shape box has no size of its own.
|
|
1454
1477
|
*/
|
|
1455
1478
|
export interface LayoutShape {
|
|
1456
1479
|
/**
|
|
@@ -1484,8 +1507,7 @@ export type LineCap = "butt" | "round" | "square";
|
|
|
1484
1507
|
*/
|
|
1485
1508
|
export type LineJoin = "miter" | "round" | "bevel";
|
|
1486
1509
|
/**
|
|
1487
|
-
* Named RGB primaries linear-light media may be in, each with its own white
|
|
1488
|
-
* point.
|
|
1510
|
+
* Named RGB primaries linear-light media may be in, each with its own white point.
|
|
1489
1511
|
*/
|
|
1490
1512
|
export type LinearPrimaries = "bt709" | "bt2020" | "p3_d65" | "aces_ap0" | "aces_ap1";
|
|
1491
1513
|
/**
|
|
@@ -1495,8 +1517,8 @@ export type LoopMode = "repeat" | "ping_pong";
|
|
|
1495
1517
|
/**
|
|
1496
1518
|
* How a mask combines with the coverage of the masks before it.
|
|
1497
1519
|
*
|
|
1498
|
-
* Coverage starts empty when the first mask adds
|
|
1499
|
-
*
|
|
1520
|
+
* Coverage starts empty when the first mask adds and full otherwise, so a clip whose only
|
|
1521
|
+
* mask subtracts is visible outside the shape.
|
|
1500
1522
|
*/
|
|
1501
1523
|
export type MaskMode = "add" | "subtract" | "intersect";
|
|
1502
1524
|
/**
|
|
@@ -1504,8 +1526,8 @@ export type MaskMode = "add" | "subtract" | "intersect";
|
|
|
1504
1526
|
*/
|
|
1505
1527
|
export interface MasterAudio {
|
|
1506
1528
|
/**
|
|
1507
|
-
* Ordered single-input effects applied to the summed track buses, at
|
|
1508
|
-
*
|
|
1529
|
+
* Ordered single-input effects applied to the summed track buses, at most
|
|
1530
|
+
* `MAX_CHAIN_EFFECTS`.
|
|
1509
1531
|
*
|
|
1510
1532
|
* @defaultValue `[]`
|
|
1511
1533
|
*/
|
|
@@ -1517,8 +1539,8 @@ export interface MasterAudio {
|
|
|
1517
1539
|
*/
|
|
1518
1540
|
readonly gain?: Animated<number>;
|
|
1519
1541
|
/**
|
|
1520
|
-
* Final peak limiter.
|
|
1521
|
-
*
|
|
1542
|
+
* Final peak limiter. Omitted means `Limiter::default`; an explicit `null` leaves the mix
|
|
1543
|
+
* unlimited.
|
|
1522
1544
|
*
|
|
1523
1545
|
* @defaultValue `{"release_ms":50,"threshold":1}`
|
|
1524
1546
|
*/
|
|
@@ -1527,9 +1549,8 @@ export interface MasterAudio {
|
|
|
1527
1549
|
/**
|
|
1528
1550
|
* Another visual clip whose picture sets where this clip is visible.
|
|
1529
1551
|
*
|
|
1530
|
-
* The matte clip is drawn, with its own transform and effects, only into the
|
|
1531
|
-
*
|
|
1532
|
-
* the matte clip is not active, its coverage is zero.
|
|
1552
|
+
* The matte clip is drawn, with its own transform and effects, only into the matte and is
|
|
1553
|
+
* never composited itself. Where it is not active, coverage is zero.
|
|
1533
1554
|
*/
|
|
1534
1555
|
export interface Matte {
|
|
1535
1556
|
/**
|
|
@@ -1546,11 +1567,10 @@ export interface Matte {
|
|
|
1546
1567
|
*/
|
|
1547
1568
|
export type MatteMode = "alpha" | "alpha_inverted" | "luma" | "luma_inverted";
|
|
1548
1569
|
/**
|
|
1549
|
-
* Evidence of a source's media, each part recorded only when
|
|
1570
|
+
* Evidence of a source's media, each part recorded only when known.
|
|
1550
1571
|
*
|
|
1551
|
-
* A matching content hash proves the same bytes
|
|
1552
|
-
*
|
|
1553
|
-
* candidates and never decides whether a candidate is the same media.
|
|
1572
|
+
* A matching content hash proves the same bytes; without one, the other parts can only show
|
|
1573
|
+
* a difference. `modified_ms` narrows a search and never decides identity.
|
|
1554
1574
|
*/
|
|
1555
1575
|
export interface MediaFingerprint {
|
|
1556
1576
|
/**
|
|
@@ -1566,10 +1586,8 @@ export interface MediaFingerprint {
|
|
|
1566
1586
|
*/
|
|
1567
1587
|
readonly content_sha256?: string | null;
|
|
1568
1588
|
/**
|
|
1569
|
-
* Where the media ends on its own timeline, in ticks:
|
|
1570
|
-
*
|
|
1571
|
-
* it. A transport stream that starts at 1.4 s and lasts 2 s ends at
|
|
1572
|
-
* 3.4 s. Non-negative.
|
|
1589
|
+
* Where the media ends on its own timeline, in ticks: first presentation plus length (a
|
|
1590
|
+
* stream starting at 1.4 s and lasting 2 s ends at 3.4 s). Non-negative.
|
|
1573
1591
|
*/
|
|
1574
1592
|
readonly duration_ticks?: number | null;
|
|
1575
1593
|
/**
|
|
@@ -1590,43 +1608,35 @@ export type MediaKind = "video" | "audio" | "image" | "generated" | "composition
|
|
|
1590
1608
|
*/
|
|
1591
1609
|
export interface MediaSource {
|
|
1592
1610
|
/**
|
|
1593
|
-
* The color a `MediaKind::Video` source's pictures are in,
|
|
1594
|
-
*
|
|
1595
|
-
*
|
|
1596
|
-
* missing or wrong tags. `None` leaves the tags in charge. A still is
|
|
1597
|
-
* read as sRGB code values whatever it declares.
|
|
1611
|
+
* The color a `MediaKind::Video` source's pictures are in, overriding frame and stream
|
|
1612
|
+
* tags on every host. Recorded at import or declared to correct missing or wrong tags;
|
|
1613
|
+
* `None` leaves the tags in charge. Stills are always read as sRGB code values.
|
|
1598
1614
|
*
|
|
1599
1615
|
* @defaultValue `null`
|
|
1600
1616
|
*/
|
|
1601
1617
|
readonly color_metadata?: ColorMetadata | null;
|
|
1602
1618
|
/**
|
|
1603
|
-
* The composition a `MediaKind::Composition` source shows; present
|
|
1604
|
-
* exactly for that kind.
|
|
1619
|
+
* The composition a `MediaKind::Composition` source shows; present exactly for that kind.
|
|
1605
1620
|
*/
|
|
1606
1621
|
readonly composition?: CompositionId | null;
|
|
1607
1622
|
/**
|
|
1608
|
-
* What the host found at the locator when the project recorded it, so
|
|
1609
|
-
*
|
|
1610
|
-
* source has none.
|
|
1623
|
+
* What the host found at the locator when the project recorded it, so another host can tell
|
|
1624
|
+
* whether media it finds is the same. Generated sources have none.
|
|
1611
1625
|
*/
|
|
1612
1626
|
readonly fingerprint?: MediaFingerprint | null;
|
|
1613
1627
|
/**
|
|
1614
|
-
* What a `MediaKind::Generated` source draws; present exactly for
|
|
1615
|
-
* that kind.
|
|
1628
|
+
* What a `MediaKind::Generated` source draws; present exactly for that kind.
|
|
1616
1629
|
*
|
|
1617
1630
|
* @defaultValue `null`
|
|
1618
1631
|
*/
|
|
1619
1632
|
readonly generator?: Generator | null;
|
|
1620
1633
|
/**
|
|
1621
|
-
* Whether
|
|
1622
|
-
*
|
|
1623
|
-
*
|
|
1624
|
-
* and plays the source silent; the document keeps the stream for the
|
|
1625
|
-
* hosts that can.
|
|
1634
|
+
* Whether the media has an audio stream. This is a fact of the file, recorded the same by
|
|
1635
|
+
* every host whether or not it can decode the stream; a host that cannot plays the source
|
|
1636
|
+
* silent.
|
|
1626
1637
|
*
|
|
1627
|
-
* `MediaKind::Audio` always does. A `MediaKind::Video` source
|
|
1628
|
-
*
|
|
1629
|
-
* unset keeps a video clip silent.
|
|
1638
|
+
* `MediaKind::Audio` always does. A `MediaKind::Video` source must declare it for its
|
|
1639
|
+
* clips on a visual track to contribute to the mix.
|
|
1630
1640
|
*
|
|
1631
1641
|
* @defaultValue `false`
|
|
1632
1642
|
*/
|
|
@@ -1640,16 +1650,15 @@ export interface MediaSource {
|
|
|
1640
1650
|
*/
|
|
1641
1651
|
readonly kind: MediaKind;
|
|
1642
1652
|
/**
|
|
1643
|
-
* Opaque URI or host locator
|
|
1644
|
-
*
|
|
1645
|
-
* `MediaKind::Composition` source has none.
|
|
1653
|
+
* Opaque URI or host locator; the engine does not open it. Required except for
|
|
1654
|
+
* `MediaKind::Generated` and `MediaKind::Composition` sources.
|
|
1646
1655
|
*
|
|
1647
1656
|
* @defaultValue `""`
|
|
1648
1657
|
*/
|
|
1649
1658
|
readonly locator?: string;
|
|
1650
1659
|
/**
|
|
1651
|
-
* The extension provider that
|
|
1652
|
-
*
|
|
1660
|
+
* The extension provider and settings that supply this source's media when the host's own
|
|
1661
|
+
* decoders do not read it.
|
|
1653
1662
|
*/
|
|
1654
1663
|
readonly provider?: ProviderSource | null;
|
|
1655
1664
|
}
|
|
@@ -1691,14 +1700,12 @@ export type NodeId = string;
|
|
|
1691
1700
|
/**
|
|
1692
1701
|
* The operation of a `CompositionNode`.
|
|
1693
1702
|
*
|
|
1694
|
-
* Animated settings are keyed in composition time (see
|
|
1695
|
-
* `ClipComposition`), not timeline time.
|
|
1703
|
+
* Animated settings are keyed in composition time (see `ClipComposition`).
|
|
1696
1704
|
*/
|
|
1697
1705
|
export type NodeOp = {
|
|
1698
1706
|
/**
|
|
1699
|
-
* The picture of the clip showing the composition: its source at the
|
|
1700
|
-
*
|
|
1701
|
-
* draws.
|
|
1707
|
+
* The picture of the clip showing the composition: its source at the time-mapped source
|
|
1708
|
+
* time, or what its generated source draws.
|
|
1702
1709
|
*/
|
|
1703
1710
|
readonly type: "clip";
|
|
1704
1711
|
} | {
|
|
@@ -1713,8 +1720,8 @@ export type NodeOp = {
|
|
|
1713
1720
|
*/
|
|
1714
1721
|
readonly start?: MediaTime;
|
|
1715
1722
|
/**
|
|
1716
|
-
* Another visual source, read at `start` plus the composition time.
|
|
1717
|
-
*
|
|
1723
|
+
* Another visual source, read at `start` plus the composition time. Adds no sound to the
|
|
1724
|
+
* mix.
|
|
1718
1725
|
*/
|
|
1719
1726
|
readonly type: "media";
|
|
1720
1727
|
} | {
|
|
@@ -1738,16 +1745,13 @@ export type NodeOp = {
|
|
|
1738
1745
|
*/
|
|
1739
1746
|
readonly input?: NodeId | null;
|
|
1740
1747
|
/**
|
|
1741
|
-
* The images the effect samples besides its input, by the names its
|
|
1742
|
-
*
|
|
1743
|
-
*
|
|
1744
|
-
* one it declares and this leaves out, fails the frames that draw
|
|
1745
|
-
* the node.
|
|
1748
|
+
* The images the effect samples besides its input, by the names its definition declares
|
|
1749
|
+
* (`sample_<name>` in its shader); at most `MAX_EFFECT_INPUTS`. An undeclared name, or a
|
|
1750
|
+
* declared one left out, fails the frames that draw the node.
|
|
1746
1751
|
*/
|
|
1747
1752
|
readonly inputs?: Readonly<Record<string, NodeId | null>>;
|
|
1748
1753
|
/**
|
|
1749
|
-
* A registered effect: its input
|
|
1750
|
-
* besides.
|
|
1754
|
+
* A registered effect: its input plus any named images it samples.
|
|
1751
1755
|
*/
|
|
1752
1756
|
readonly type: "effect";
|
|
1753
1757
|
} | {
|
|
@@ -1830,8 +1834,8 @@ export type NodeOp = {
|
|
|
1830
1834
|
*/
|
|
1831
1835
|
readonly input?: NodeId | null;
|
|
1832
1836
|
/**
|
|
1833
|
-
* The shapes, combined in order; at most `MAX_CLIP_MASKS`.
|
|
1834
|
-
*
|
|
1837
|
+
* The shapes, combined in order; at most `MAX_CLIP_MASKS`. Geometry is in the
|
|
1838
|
+
* input image's normalized space.
|
|
1835
1839
|
*/
|
|
1836
1840
|
readonly masks: readonly ShapeMask[];
|
|
1837
1841
|
/**
|
|
@@ -1844,8 +1848,8 @@ export type NodeOp = {
|
|
|
1844
1848
|
*/
|
|
1845
1849
|
readonly composition: CompositionId;
|
|
1846
1850
|
/**
|
|
1847
|
-
* Values for its controls, by name;
|
|
1848
|
-
*
|
|
1851
|
+
* Values for its controls, by name; unset controls keep the composition's own value. Keyed
|
|
1852
|
+
* in composition time.
|
|
1849
1853
|
*/
|
|
1850
1854
|
readonly controls?: Readonly<Record<string, Animated<EffectValue>>>;
|
|
1851
1855
|
/**
|
|
@@ -1855,9 +1859,8 @@ export type NodeOp = {
|
|
|
1855
1859
|
*/
|
|
1856
1860
|
readonly inputs?: readonly (NodeId | null)[];
|
|
1857
1861
|
/**
|
|
1858
|
-
* Another composition drawn in this one's time
|
|
1859
|
-
*
|
|
1860
|
-
* from `controls`.
|
|
1862
|
+
* Another composition drawn in this one's time as a group: its output, with group inputs
|
|
1863
|
+
* fed from `inputs` and controls set from `controls`.
|
|
1861
1864
|
*/
|
|
1862
1865
|
readonly type: "group";
|
|
1863
1866
|
} | {
|
|
@@ -1866,8 +1869,7 @@ export type NodeOp = {
|
|
|
1866
1869
|
*/
|
|
1867
1870
|
readonly index: number;
|
|
1868
1871
|
/**
|
|
1869
|
-
* In a composition used as a group, the image the group node gives its
|
|
1870
|
-
* input `index`.
|
|
1872
|
+
* In a composition used as a group, the image the group node gives its input `index`.
|
|
1871
1873
|
*/
|
|
1872
1874
|
readonly type: "group_input";
|
|
1873
1875
|
};
|
|
@@ -1878,13 +1880,9 @@ export type Overflow = "visible" | "hidden";
|
|
|
1878
1880
|
/**
|
|
1879
1881
|
* A color or gradient.
|
|
1880
1882
|
*
|
|
1881
|
-
* Gradients interpolate
|
|
1882
|
-
*
|
|
1883
|
-
*
|
|
1884
|
-
* its neighbour.
|
|
1885
|
-
*
|
|
1886
|
-
* A color (hex or object) is read as a solid paint of it; a paint is
|
|
1887
|
-
* written back tagged.
|
|
1883
|
+
* Gradients interpolate premultiplied stops in linear light, so a gradient between two colors
|
|
1884
|
+
* passes through their physical mix and a stop fading to transparent does not darken its
|
|
1885
|
+
* neighbour. A bare color is read as a solid paint; paints are written back tagged.
|
|
1888
1886
|
*/
|
|
1889
1887
|
export type Paint = {
|
|
1890
1888
|
/**
|
|
@@ -1924,8 +1922,8 @@ export type Paint = {
|
|
|
1924
1922
|
*/
|
|
1925
1923
|
readonly center: Vec2;
|
|
1926
1924
|
/**
|
|
1927
|
-
* The distance of offset 1 from the centre, as a fraction of the
|
|
1928
|
-
*
|
|
1925
|
+
* The distance of offset 1 from the centre, as a fraction of the picture's shorter side.
|
|
1926
|
+
* Positive.
|
|
1929
1927
|
*/
|
|
1930
1928
|
readonly radius: number;
|
|
1931
1929
|
/**
|
|
@@ -1967,15 +1965,15 @@ export type Paint = {
|
|
|
1967
1965
|
*/
|
|
1968
1966
|
export interface Path {
|
|
1969
1967
|
/**
|
|
1970
|
-
* The subpaths, at most `MAX_PATH_SUBPATHS`, with at most
|
|
1971
|
-
*
|
|
1968
|
+
* The subpaths, at most `MAX_PATH_SUBPATHS`, with at most `MAX_PATH_VERTICES` vertices
|
|
1969
|
+
* in total.
|
|
1972
1970
|
*/
|
|
1973
1971
|
readonly subpaths: readonly Subpath[];
|
|
1974
1972
|
}
|
|
1975
1973
|
/**
|
|
1976
|
-
* A path vertex and its tangents. The segment from
|
|
1977
|
-
* `
|
|
1978
|
-
*
|
|
1974
|
+
* A path vertex and its tangents. The segment from `a` to `b` is the cubic Bezier through
|
|
1975
|
+
* `a.point`, `a.point + a.out_tangent`, `b.point + b.in_tangent` and `b.point`; zero tangents
|
|
1976
|
+
* make it straight.
|
|
1979
1977
|
*/
|
|
1980
1978
|
export interface PathVertex {
|
|
1981
1979
|
/**
|
|
@@ -2000,18 +1998,16 @@ export interface PathVertex {
|
|
|
2000
1998
|
*/
|
|
2001
1999
|
export interface PointKeyframe {
|
|
2002
2000
|
/**
|
|
2003
|
-
* The
|
|
2004
|
-
* to this value: that curve's second control point.
|
|
2001
|
+
* The curve's second control point from the previous keyframe, relative to this value.
|
|
2005
2002
|
*/
|
|
2006
2003
|
readonly in_tangent?: Vec2;
|
|
2007
2004
|
/**
|
|
2008
|
-
* Interpolation from this keyframe to its successor: how fast the value
|
|
2009
|
-
*
|
|
2005
|
+
* Interpolation from this keyframe to its successor: how fast the value travels along the
|
|
2006
|
+
* way.
|
|
2010
2007
|
*/
|
|
2011
2008
|
readonly interpolation: Interpolation;
|
|
2012
2009
|
/**
|
|
2013
|
-
* The
|
|
2014
|
-
* value: the curve's first control point.
|
|
2010
|
+
* The curve's first control point toward the next keyframe, relative to this value.
|
|
2015
2011
|
*/
|
|
2016
2012
|
readonly out_tangent?: Vec2;
|
|
2017
2013
|
/**
|
|
@@ -2040,17 +2036,14 @@ export type ProjectId = string;
|
|
|
2040
2036
|
*/
|
|
2041
2037
|
export interface ProjectSettings {
|
|
2042
2038
|
/**
|
|
2043
|
-
* Opaque color under every layer, in preview and export alike
|
|
2044
|
-
*
|
|
2045
|
-
* Empty canvas, and whatever shows through a translucent layer, is this
|
|
2046
|
-
* color rather than something a host or encoder decides.
|
|
2039
|
+
* Opaque color under every layer, in preview and export alike, so empty canvas is never
|
|
2040
|
+
* left to a host or encoder.
|
|
2047
2041
|
*
|
|
2048
2042
|
* @defaultValue `{"blue":0,"green":0,"red":0}`
|
|
2049
2043
|
*/
|
|
2050
2044
|
readonly background?: Rgb;
|
|
2051
2045
|
/**
|
|
2052
|
-
* The space in which clips' blend modes are evaluated, in preview and
|
|
2053
|
-
* export alike.
|
|
2046
|
+
* The space in which clips' blend modes are evaluated, in preview and export alike.
|
|
2054
2047
|
*
|
|
2055
2048
|
* @defaultValue `"linear_light"`
|
|
2056
2049
|
*/
|
|
@@ -2066,8 +2059,8 @@ export interface ProjectSettings {
|
|
|
2066
2059
|
*/
|
|
2067
2060
|
readonly frame_rate: FrameRate;
|
|
2068
2061
|
/**
|
|
2069
|
-
* Canvas height in output pixels, at most `MAX_CANVAS_DIMENSION`. The
|
|
2070
|
-
*
|
|
2062
|
+
* Canvas height in output pixels, at most `MAX_CANVAS_DIMENSION`. The canvas area is at
|
|
2063
|
+
* most `MAX_CANVAS_PIXELS`.
|
|
2071
2064
|
*/
|
|
2072
2065
|
readonly height: number;
|
|
2073
2066
|
/**
|
|
@@ -2080,41 +2073,37 @@ export interface ProjectSettings {
|
|
|
2080
2073
|
readonly width: number;
|
|
2081
2074
|
}
|
|
2082
2075
|
/**
|
|
2083
|
-
* A source whose media an extension provider supplies
|
|
2084
|
-
*
|
|
2076
|
+
* A source whose media an extension provider supplies instead of the host's video and image
|
|
2077
|
+
* decoders.
|
|
2085
2078
|
*
|
|
2086
|
-
* A host picks the provider by probing the bytes at import, never by
|
|
2087
|
-
*
|
|
2088
|
-
* host opens the source the same way. The engine does not read it: a
|
|
2089
|
-
* provider source needs frames like any video or image source.
|
|
2079
|
+
* A host picks the provider by probing the bytes at import, never by file name, and records
|
|
2080
|
+
* it here so every host opens the source the same way. The engine does not read it.
|
|
2090
2081
|
*/
|
|
2091
2082
|
export type ProviderSource = {
|
|
2092
2083
|
/**
|
|
2093
|
-
* A static SVG document, rasterized at
|
|
2094
|
-
* source's kind is `image`.
|
|
2084
|
+
* A static SVG document, rasterized at its shown size. The source's kind is `image`.
|
|
2095
2085
|
*/
|
|
2096
2086
|
readonly format: "svg";
|
|
2097
2087
|
} | {
|
|
2098
2088
|
/**
|
|
2099
|
-
* A GIF, animated WebP, or APNG: one cycle of frames, each with its own
|
|
2100
|
-
*
|
|
2089
|
+
* A GIF, animated WebP, or APNG: one cycle of frames, each with its own duration.
|
|
2090
|
+
* Repetition is the clip's. The source's kind is `video`.
|
|
2101
2091
|
*/
|
|
2102
2092
|
readonly format: "animated_image";
|
|
2103
2093
|
} | {
|
|
2104
2094
|
/**
|
|
2105
|
-
* The dotLottie animation shown, by
|
|
2106
|
-
*
|
|
2095
|
+
* The dotLottie animation shown, by ID. Absent means the package's first; always absent
|
|
2096
|
+
* for a Lottie JSON file.
|
|
2107
2097
|
*/
|
|
2108
2098
|
readonly animation?: string | null;
|
|
2109
2099
|
/**
|
|
2110
|
-
* A Lottie animation
|
|
2111
|
-
*
|
|
2100
|
+
* A Lottie animation (JSON file or dotLottie package), evaluated at its own frames. The
|
|
2101
|
+
* source's kind is `video`.
|
|
2112
2102
|
*/
|
|
2113
2103
|
readonly format: "lottie";
|
|
2114
2104
|
} | {
|
|
2115
2105
|
/**
|
|
2116
|
-
* Still images played in order at a fixed rate. The source's kind is
|
|
2117
|
-
* `video`.
|
|
2106
|
+
* Still images played in order at a fixed rate. The source's kind is `video`.
|
|
2118
2107
|
*/
|
|
2119
2108
|
readonly format: "image_sequence";
|
|
2120
2109
|
/**
|
|
@@ -2122,9 +2111,8 @@ export type ProviderSource = {
|
|
|
2122
2111
|
*/
|
|
2123
2112
|
readonly frame_rate: FrameRate;
|
|
2124
2113
|
/**
|
|
2125
|
-
* Each frame's locator, in play order. `null`
|
|
2126
|
-
*
|
|
2127
|
-
* it.
|
|
2114
|
+
* Each frame's locator, in play order. `null` marks a missing number, allowed only when
|
|
2115
|
+
* `missing` says how to show it.
|
|
2128
2116
|
*/
|
|
2129
2117
|
readonly frames: readonly (string | null)[];
|
|
2130
2118
|
/**
|
|
@@ -2134,8 +2122,8 @@ export type ProviderSource = {
|
|
|
2134
2122
|
*/
|
|
2135
2123
|
readonly missing?: MissingFrames;
|
|
2136
2124
|
/**
|
|
2137
|
-
* The primaries OpenEXR frames' linear RGB
|
|
2138
|
-
*
|
|
2125
|
+
* The primaries of OpenEXR frames' linear RGB, overriding the first frame's
|
|
2126
|
+
* chromaticities. Only for OpenEXR frames.
|
|
2139
2127
|
*/
|
|
2140
2128
|
readonly primaries?: LinearPrimaries | null;
|
|
2141
2129
|
/**
|
|
@@ -2146,20 +2134,26 @@ export type ProviderSource = {
|
|
|
2146
2134
|
readonly start_number?: number;
|
|
2147
2135
|
} | {
|
|
2148
2136
|
/**
|
|
2149
|
-
* A still OpenEXR image: linear-light RGB(A), read at half precision.
|
|
2150
|
-
*
|
|
2137
|
+
* A still OpenEXR image: linear-light RGB(A), read at half precision. The source's kind is
|
|
2138
|
+
* `image`.
|
|
2151
2139
|
*/
|
|
2152
2140
|
readonly format: "exr";
|
|
2153
2141
|
/**
|
|
2154
|
-
* The primaries its linear RGB
|
|
2155
|
-
*
|
|
2156
|
-
* defines).
|
|
2142
|
+
* The primaries of its linear RGB, overriding the file's chromaticities (BT.709 when the
|
|
2143
|
+
* file has none, as OpenEXR defines).
|
|
2157
2144
|
*/
|
|
2158
2145
|
readonly primaries?: LinearPrimaries | null;
|
|
2159
2146
|
};
|
|
2160
2147
|
/**
|
|
2161
|
-
*
|
|
2162
|
-
|
|
2148
|
+
* How selection rises and falls across a Range selector's range.
|
|
2149
|
+
*/
|
|
2150
|
+
export type RangeShape = "square" | "ramp_up" | "ramp_down" | "triangle" | "round" | "smooth";
|
|
2151
|
+
/**
|
|
2152
|
+
* What a Range selector's start, end and offset count in.
|
|
2153
|
+
*/
|
|
2154
|
+
export type RangeUnits = "percent" | "index";
|
|
2155
|
+
/**
|
|
2156
|
+
* An opaque color as a color picker shows it: straight, sRGB-encoded components in `0..=1`.
|
|
2163
2157
|
*/
|
|
2164
2158
|
export interface Rgb {
|
|
2165
2159
|
/**
|
|
@@ -2176,12 +2170,10 @@ export interface Rgb {
|
|
|
2176
2170
|
readonly red: number;
|
|
2177
2171
|
}
|
|
2178
2172
|
/**
|
|
2179
|
-
* A straight (not premultiplied), sRGB-encoded color with alpha, each
|
|
2180
|
-
* component in `0..=1`.
|
|
2173
|
+
* A straight (not premultiplied), sRGB-encoded color with alpha, each component in `0..=1`.
|
|
2181
2174
|
*
|
|
2182
|
-
*
|
|
2183
|
-
*
|
|
2184
|
-
* written back as the object: a component need not be a multiple of 1/255.
|
|
2175
|
+
* Read from the object or CSS hex (`"#rgb"`, `"#rgba"`, `"#rrggbb"`, `"#rrggbbaa"`, any
|
|
2176
|
+
* case). Always written back as the object, since components need not be multiples of 1/255.
|
|
2185
2177
|
*/
|
|
2186
2178
|
export type Rgba = {
|
|
2187
2179
|
/**
|
|
@@ -2201,6 +2193,23 @@ export type Rgba = {
|
|
|
2201
2193
|
*/
|
|
2202
2194
|
readonly red: number;
|
|
2203
2195
|
} | string;
|
|
2196
|
+
/**
|
|
2197
|
+
* Which runs a Timing selector selects.
|
|
2198
|
+
*/
|
|
2199
|
+
export type RunState = "upcoming" | "active" | "spoken";
|
|
2200
|
+
/**
|
|
2201
|
+
* A run's time span.
|
|
2202
|
+
*/
|
|
2203
|
+
export interface RunTime {
|
|
2204
|
+
/**
|
|
2205
|
+
* When it ends; after `start`.
|
|
2206
|
+
*/
|
|
2207
|
+
readonly end: MediaTime;
|
|
2208
|
+
/**
|
|
2209
|
+
* When it starts.
|
|
2210
|
+
*/
|
|
2211
|
+
readonly start: MediaTime;
|
|
2212
|
+
}
|
|
2204
2213
|
/**
|
|
2205
2214
|
* A geometry alone, as a mask's outline is.
|
|
2206
2215
|
*/
|
|
@@ -2210,8 +2219,8 @@ export type ShapeGeometry = {
|
|
|
2210
2219
|
*/
|
|
2211
2220
|
readonly center: AnimatedPoint;
|
|
2212
2221
|
/**
|
|
2213
|
-
* Corner radius, as a fraction of the shorter side. Non-negative;
|
|
2214
|
-
*
|
|
2222
|
+
* Corner radius, as a fraction of the shorter side. Non-negative; capped at half the
|
|
2223
|
+
* rectangle.
|
|
2215
2224
|
*
|
|
2216
2225
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2217
2226
|
*/
|
|
@@ -2223,7 +2232,8 @@ export type ShapeGeometry = {
|
|
|
2223
2232
|
*/
|
|
2224
2233
|
readonly rotation_degrees?: Animated<number>;
|
|
2225
2234
|
/**
|
|
2226
|
-
* Full width and height
|
|
2235
|
+
* Full width and height before rotation: x a fraction of the picture's width, y of its
|
|
2236
|
+
* height. Non-negative.
|
|
2227
2237
|
*/
|
|
2228
2238
|
readonly size: Animated<Vec2>;
|
|
2229
2239
|
/**
|
|
@@ -2242,7 +2252,8 @@ export type ShapeGeometry = {
|
|
|
2242
2252
|
*/
|
|
2243
2253
|
readonly rotation_degrees?: Animated<number>;
|
|
2244
2254
|
/**
|
|
2245
|
-
* Full width and height
|
|
2255
|
+
* Full width and height before rotation: x a fraction of the picture's width, y of its
|
|
2256
|
+
* height. Non-negative.
|
|
2246
2257
|
*/
|
|
2247
2258
|
readonly size: Animated<Vec2>;
|
|
2248
2259
|
/**
|
|
@@ -2271,22 +2282,19 @@ export type ShapeGeometry = {
|
|
|
2271
2282
|
*/
|
|
2272
2283
|
readonly kind: PolystarKind;
|
|
2273
2284
|
/**
|
|
2274
|
-
* Distance of the points from the centre, as a fraction of the shorter
|
|
2275
|
-
* side. Non-negative.
|
|
2285
|
+
* Distance of the points from the centre, as a fraction of the shorter side. Non-negative.
|
|
2276
2286
|
*/
|
|
2277
2287
|
readonly outer_radius: Animated<number>;
|
|
2278
2288
|
/**
|
|
2279
|
-
* How round the outer corners are
|
|
2280
|
-
* them. In `0..=1`.
|
|
2289
|
+
* How round the outer corners are, in `0..=1`: 0 sharp, 1 a smooth curve through them.
|
|
2281
2290
|
*
|
|
2282
2291
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2283
2292
|
*/
|
|
2284
2293
|
readonly outer_roundness?: Animated<number>;
|
|
2285
2294
|
/**
|
|
2286
|
-
* Number of points (corners
|
|
2287
|
-
* `
|
|
2288
|
-
*
|
|
2289
|
-
* the figure one whole point at a time.
|
|
2295
|
+
* Number of points (polygon corners or star tips), from `MIN_POLYSTAR_POINTS` to
|
|
2296
|
+
* `MAX_POLYSTAR_POINTS`. A fraction is dropped when drawn, as Lottie does, so an animated
|
|
2297
|
+
* count changes one whole point at a time.
|
|
2290
2298
|
*/
|
|
2291
2299
|
readonly points: Animated<number>;
|
|
2292
2300
|
/**
|
|
@@ -2312,11 +2320,10 @@ export type ShapeGeometry = {
|
|
|
2312
2320
|
/**
|
|
2313
2321
|
* One entry of a shapes generator's content tree.
|
|
2314
2322
|
*
|
|
2315
|
-
* A group is read front to back. Geometry accumulates in its group; a fill
|
|
2316
|
-
*
|
|
2317
|
-
*
|
|
2318
|
-
*
|
|
2319
|
-
* After Effects and Lottie.
|
|
2323
|
+
* A group is read front to back. Geometry accumulates in its group; a fill or stroke paints
|
|
2324
|
+
* the geometry listed before it in the same group (nested groups included), and a trim cuts
|
|
2325
|
+
* and replaces that geometry. Earlier paints draw on top of later ones, as in After Effects
|
|
2326
|
+
* and Lottie.
|
|
2320
2327
|
*/
|
|
2321
2328
|
export type ShapeItem = {
|
|
2322
2329
|
/**
|
|
@@ -2328,9 +2335,8 @@ export type ShapeItem = {
|
|
|
2328
2335
|
*/
|
|
2329
2336
|
readonly transform?: ShapeTransform;
|
|
2330
2337
|
/**
|
|
2331
|
-
* Items drawn together
|
|
2332
|
-
*
|
|
2333
|
-
* trims after the group.
|
|
2338
|
+
* Items drawn together through one transform and opacity. Their geometry also counts as the
|
|
2339
|
+
* enclosing group's for paints and trims after the group.
|
|
2334
2340
|
*/
|
|
2335
2341
|
readonly type: "group";
|
|
2336
2342
|
} | {
|
|
@@ -2339,8 +2345,8 @@ export type ShapeItem = {
|
|
|
2339
2345
|
*/
|
|
2340
2346
|
readonly center: AnimatedPoint;
|
|
2341
2347
|
/**
|
|
2342
|
-
* Corner radius, as a fraction of the shorter side. Non-negative;
|
|
2343
|
-
*
|
|
2348
|
+
* Corner radius, as a fraction of the shorter side. Non-negative; capped at half the
|
|
2349
|
+
* rectangle.
|
|
2344
2350
|
*
|
|
2345
2351
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2346
2352
|
*/
|
|
@@ -2352,7 +2358,8 @@ export type ShapeItem = {
|
|
|
2352
2358
|
*/
|
|
2353
2359
|
readonly rotation_degrees?: Animated<number>;
|
|
2354
2360
|
/**
|
|
2355
|
-
* Full width and height
|
|
2361
|
+
* Full width and height before rotation: x a fraction of the picture's width, y of its
|
|
2362
|
+
* height. Non-negative.
|
|
2356
2363
|
*/
|
|
2357
2364
|
readonly size: Animated<Vec2>;
|
|
2358
2365
|
/**
|
|
@@ -2371,7 +2378,8 @@ export type ShapeItem = {
|
|
|
2371
2378
|
*/
|
|
2372
2379
|
readonly rotation_degrees?: Animated<number>;
|
|
2373
2380
|
/**
|
|
2374
|
-
* Full width and height
|
|
2381
|
+
* Full width and height before rotation: x a fraction of the picture's width, y of its
|
|
2382
|
+
* height. Non-negative.
|
|
2375
2383
|
*/
|
|
2376
2384
|
readonly size: Animated<Vec2>;
|
|
2377
2385
|
/**
|
|
@@ -2400,22 +2408,19 @@ export type ShapeItem = {
|
|
|
2400
2408
|
*/
|
|
2401
2409
|
readonly kind: PolystarKind;
|
|
2402
2410
|
/**
|
|
2403
|
-
* Distance of the points from the centre, as a fraction of the shorter
|
|
2404
|
-
* side. Non-negative.
|
|
2411
|
+
* Distance of the points from the centre, as a fraction of the shorter side. Non-negative.
|
|
2405
2412
|
*/
|
|
2406
2413
|
readonly outer_radius: Animated<number>;
|
|
2407
2414
|
/**
|
|
2408
|
-
* How round the outer corners are
|
|
2409
|
-
* them. In `0..=1`.
|
|
2415
|
+
* How round the outer corners are, in `0..=1`: 0 sharp, 1 a smooth curve through them.
|
|
2410
2416
|
*
|
|
2411
2417
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2412
2418
|
*/
|
|
2413
2419
|
readonly outer_roundness?: Animated<number>;
|
|
2414
2420
|
/**
|
|
2415
|
-
* Number of points (corners
|
|
2416
|
-
* `
|
|
2417
|
-
*
|
|
2418
|
-
* the figure one whole point at a time.
|
|
2421
|
+
* Number of points (polygon corners or star tips), from `MIN_POLYSTAR_POINTS` to
|
|
2422
|
+
* `MAX_POLYSTAR_POINTS`. A fraction is dropped when drawn, as Lottie does, so an animated
|
|
2423
|
+
* count changes one whole point at a time.
|
|
2419
2424
|
*/
|
|
2420
2425
|
readonly points: Animated<number>;
|
|
2421
2426
|
/**
|
|
@@ -2455,9 +2460,8 @@ export type ShapeItem = {
|
|
|
2455
2460
|
*/
|
|
2456
2461
|
readonly rule?: FillRule;
|
|
2457
2462
|
/**
|
|
2458
|
-
* Paints the inside of the geometry listed before it in its group,
|
|
2459
|
-
*
|
|
2460
|
-
* it.
|
|
2463
|
+
* Paints the inside of the geometry listed before it in its group, as one compound path
|
|
2464
|
+
* under `rule`. Open paths are closed for it.
|
|
2461
2465
|
*/
|
|
2462
2466
|
readonly type: "fill";
|
|
2463
2467
|
} | {
|
|
@@ -2480,8 +2484,8 @@ export type ShapeItem = {
|
|
|
2480
2484
|
*/
|
|
2481
2485
|
readonly join?: LineJoin;
|
|
2482
2486
|
/**
|
|
2483
|
-
* Longest a miter join reaches, as a multiple of half the width, before
|
|
2484
|
-
*
|
|
2487
|
+
* Longest a miter join reaches, as a multiple of half the width, before it is beveled. At
|
|
2488
|
+
* least 1.
|
|
2485
2489
|
*
|
|
2486
2490
|
* @defaultValue `4`
|
|
2487
2491
|
*/
|
|
@@ -2501,14 +2505,12 @@ export type ShapeItem = {
|
|
|
2501
2505
|
*/
|
|
2502
2506
|
readonly type: "stroke";
|
|
2503
2507
|
/**
|
|
2504
|
-
* Full width, as a fraction of the shorter side. Non-negative; zero
|
|
2505
|
-
* draws nothing.
|
|
2508
|
+
* Full width, as a fraction of the shorter side. Non-negative; zero draws nothing.
|
|
2506
2509
|
*/
|
|
2507
2510
|
readonly width: Animated<number>;
|
|
2508
2511
|
} | {
|
|
2509
2512
|
/**
|
|
2510
|
-
* Where it ends, in `0..=1`. Nothing is kept unless it is after
|
|
2511
|
-
* `start`.
|
|
2513
|
+
* Where it ends, in `0..=1`. Nothing is kept unless it is after `start`.
|
|
2512
2514
|
*/
|
|
2513
2515
|
readonly end: Animated<number>;
|
|
2514
2516
|
/**
|
|
@@ -2535,18 +2537,14 @@ export type ShapeItem = {
|
|
|
2535
2537
|
/**
|
|
2536
2538
|
* A shape that limits where a clip is visible.
|
|
2537
2539
|
*
|
|
2538
|
-
* Geometry is in the clip's source space
|
|
2539
|
-
*
|
|
2540
|
-
*
|
|
2541
|
-
* polystar's radii) are fractions of that space's shorter side, so a mask
|
|
2542
|
-
* covers the same part of the picture at any render resolution.
|
|
2540
|
+
* Geometry is in the clip's source space before its transform, so the mask moves with the
|
|
2541
|
+
* clip: `(0, 0)` is the source's top-left, `(1, 1)` its bottom-right. Distances (`feather`,
|
|
2542
|
+
* `corner_radius`, polystar radii) are fractions of that space's shorter side.
|
|
2543
2543
|
*/
|
|
2544
2544
|
export interface ShapeMask {
|
|
2545
2545
|
/**
|
|
2546
|
-
*
|
|
2547
|
-
*
|
|
2548
|
-
* deviation `0.3125 * feather`, which spreads its 10 to 90 percent ramp
|
|
2549
|
-
* over `0.8 * feather` across the outline.
|
|
2546
|
+
* Edge softness, non-negative; zero is the outline's antialiased edge. Coverage is blurred
|
|
2547
|
+
* by a Gaussian with standard deviation `0.3125 * feather`, a 10-90% ramp of `0.8 * feather`.
|
|
2550
2548
|
*
|
|
2551
2549
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2552
2550
|
*/
|
|
@@ -2575,9 +2573,8 @@ export interface ShapeMask {
|
|
|
2575
2573
|
readonly shape: ShapeGeometry;
|
|
2576
2574
|
}
|
|
2577
2575
|
/**
|
|
2578
|
-
* A group's placement
|
|
2579
|
-
*
|
|
2580
|
-
* The default leaves its items where they are.
|
|
2576
|
+
* A group's placement. In pixel space: translate by `position`, rotate, scale, then
|
|
2577
|
+
* translate by minus `anchor`, so `anchor` lands on `position`. The default is identity.
|
|
2581
2578
|
*/
|
|
2582
2579
|
export interface ShapeTransform {
|
|
2583
2580
|
/**
|
|
@@ -2587,8 +2584,8 @@ export interface ShapeTransform {
|
|
|
2587
2584
|
*/
|
|
2588
2585
|
readonly anchor?: Animated<Vec2>;
|
|
2589
2586
|
/**
|
|
2590
|
-
* Opacity of the group as a whole, in `0..=1
|
|
2591
|
-
*
|
|
2587
|
+
* Opacity of the group as a whole, in `0..=1`; overlapping items are composited first and
|
|
2588
|
+
* faded together.
|
|
2592
2589
|
*
|
|
2593
2590
|
* @defaultValue `{"mode":"constant","value":1}`
|
|
2594
2591
|
*/
|
|
@@ -2606,8 +2603,7 @@ export interface ShapeTransform {
|
|
|
2606
2603
|
*/
|
|
2607
2604
|
readonly rotation_degrees?: Animated<number>;
|
|
2608
2605
|
/**
|
|
2609
|
-
* Per-axis scale; 1 leaves the items unscaled. Stroke widths scale with
|
|
2610
|
-
* it.
|
|
2606
|
+
* Per-axis scale; 1 leaves the items unscaled. Stroke widths scale with it.
|
|
2611
2607
|
*
|
|
2612
2608
|
* @defaultValue `{"mode":"constant","value":{"x":1,"y":1}}`
|
|
2613
2609
|
*/
|
|
@@ -2653,6 +2649,56 @@ export interface Subpath {
|
|
|
2653
2649
|
* How lines of text align within it.
|
|
2654
2650
|
*/
|
|
2655
2651
|
export type TextAlign = "start" | "center" | "end";
|
|
2652
|
+
/**
|
|
2653
|
+
* One animator: what it selects, and what it does to what it selects.
|
|
2654
|
+
*/
|
|
2655
|
+
export interface TextAnimator {
|
|
2656
|
+
/**
|
|
2657
|
+
* Applied to each character in proportion to its selection.
|
|
2658
|
+
*
|
|
2659
|
+
* @defaultValue `{}`
|
|
2660
|
+
*/
|
|
2661
|
+
readonly properties?: TextAnimatorProperties;
|
|
2662
|
+
/**
|
|
2663
|
+
* Gives each character its selection, in `[0, 1]`.
|
|
2664
|
+
*/
|
|
2665
|
+
readonly selector: TextSelector;
|
|
2666
|
+
}
|
|
2667
|
+
/**
|
|
2668
|
+
* What an animator does to each character, in proportion to its selection. A property left
|
|
2669
|
+
* out does nothing.
|
|
2670
|
+
*/
|
|
2671
|
+
export interface TextAnimatorProperties {
|
|
2672
|
+
/**
|
|
2673
|
+
* The fill color a fully selected character takes; a gradient fill is mixed toward it.
|
|
2674
|
+
*/
|
|
2675
|
+
readonly fill?: Animated<Rgba> | null;
|
|
2676
|
+
/**
|
|
2677
|
+
* Moves the character, in font sizes, +y down.
|
|
2678
|
+
*/
|
|
2679
|
+
readonly offset?: Animated<Vec2> | null;
|
|
2680
|
+
/**
|
|
2681
|
+
* The opacity a fully selected character takes, in `[0, 1]`.
|
|
2682
|
+
*/
|
|
2683
|
+
readonly opacity?: Animated<number> | null;
|
|
2684
|
+
/**
|
|
2685
|
+
* Turns the character about its centre, clockwise degrees.
|
|
2686
|
+
*/
|
|
2687
|
+
readonly rotation_degrees?: Animated<number> | null;
|
|
2688
|
+
/**
|
|
2689
|
+
* Scales the character about its centre; 1 is none. Each axis in `[0, 10]`.
|
|
2690
|
+
*/
|
|
2691
|
+
readonly scale?: Animated<Vec2> | null;
|
|
2692
|
+
/**
|
|
2693
|
+
* The color every stroke of a fully selected character takes.
|
|
2694
|
+
*/
|
|
2695
|
+
readonly stroke?: Animated<Rgba> | null;
|
|
2696
|
+
/**
|
|
2697
|
+
* Space added after the character, in font sizes, in `[-0.5, 1]`, as letter spacing adds
|
|
2698
|
+
* it. Lines are not re-broken.
|
|
2699
|
+
*/
|
|
2700
|
+
readonly tracking?: Animated<number> | null;
|
|
2701
|
+
}
|
|
2656
2702
|
/**
|
|
2657
2703
|
* A box behind each line of text.
|
|
2658
2704
|
*/
|
|
@@ -2662,35 +2708,168 @@ export interface TextBackground {
|
|
|
2662
2708
|
*/
|
|
2663
2709
|
readonly color: Rgba;
|
|
2664
2710
|
/**
|
|
2665
|
-
* Space between the text and the box edge, as a fraction of the font
|
|
2666
|
-
* size, in `[0, 2]`.
|
|
2711
|
+
* Space between the text and the box edge, as a fraction of the font size, in `[0, 2]`.
|
|
2667
2712
|
*
|
|
2668
2713
|
* @defaultValue `0`
|
|
2669
2714
|
*/
|
|
2670
2715
|
readonly padding?: number;
|
|
2671
2716
|
}
|
|
2672
2717
|
/**
|
|
2673
|
-
* A
|
|
2718
|
+
* A text: one string, or runs whose texts joined are the text.
|
|
2719
|
+
*
|
|
2720
|
+
* Written as `"Hello"` or `[{ "text": "Hel" }, { "text": "lo", "class": ["key"] }]`.
|
|
2721
|
+
*/
|
|
2722
|
+
export type TextContent = string | readonly TextRun[];
|
|
2723
|
+
/**
|
|
2724
|
+
* A piece of a text that animators' Class and Timing selectors can pick.
|
|
2674
2725
|
*/
|
|
2675
|
-
export interface
|
|
2726
|
+
export interface TextRun {
|
|
2727
|
+
/**
|
|
2728
|
+
* Names Class selectors match, each 1 to 64 bytes of `A-Z`, `a-z`, `0-9`, `_` and `-`; at
|
|
2729
|
+
* most `MAX_RUN_CLASSES`.
|
|
2730
|
+
*/
|
|
2731
|
+
readonly class?: readonly string[];
|
|
2732
|
+
/**
|
|
2733
|
+
* Non-empty; `\n` starts a line. A grapheme cluster spanning two runs belongs to the run
|
|
2734
|
+
* holding its first byte.
|
|
2735
|
+
*/
|
|
2736
|
+
readonly text: string;
|
|
2737
|
+
/**
|
|
2738
|
+
* When the run is said, from the holder's start (a caption cue's start, or a text
|
|
2739
|
+
* generator's picture time zero).
|
|
2740
|
+
*/
|
|
2741
|
+
readonly time?: RunTime | null;
|
|
2742
|
+
}
|
|
2743
|
+
/**
|
|
2744
|
+
* How an animator selects characters.
|
|
2745
|
+
*/
|
|
2746
|
+
export type TextSelector = {
|
|
2747
|
+
/**
|
|
2748
|
+
* The selection's scale, in `[0, 1]`. Default 1.
|
|
2749
|
+
*
|
|
2750
|
+
* @defaultValue `{"mode":"constant","value":1}`
|
|
2751
|
+
*/
|
|
2752
|
+
readonly amount?: Animated<number>;
|
|
2753
|
+
/**
|
|
2754
|
+
* What the range counts: characters (the default), non-space characters, words, or lines.
|
|
2755
|
+
*
|
|
2756
|
+
* @defaultValue `"characters"`
|
|
2757
|
+
*/
|
|
2758
|
+
readonly based_on?: TextUnit;
|
|
2759
|
+
/**
|
|
2760
|
+
* Where it ends, in the same range. Default 100.
|
|
2761
|
+
*
|
|
2762
|
+
* @defaultValue `{"mode":"constant","value":100}`
|
|
2763
|
+
*/
|
|
2764
|
+
readonly end?: Animated<number>;
|
|
2765
|
+
/**
|
|
2766
|
+
* Added to start and end, in the same range. Default 0.
|
|
2767
|
+
*
|
|
2768
|
+
* @defaultValue `{"mode":"constant","value":0}`
|
|
2769
|
+
*/
|
|
2770
|
+
readonly offset?: Animated<number>;
|
|
2771
|
+
/**
|
|
2772
|
+
* How selection rises and falls across the range.
|
|
2773
|
+
*
|
|
2774
|
+
* @defaultValue `"square"`
|
|
2775
|
+
*/
|
|
2776
|
+
readonly shape?: RangeShape;
|
|
2777
|
+
/**
|
|
2778
|
+
* Where the range starts: `[-100, 200]` percent, or `[-N, 2N]` units for `N` of
|
|
2779
|
+
* `MAX_RANGE_INDEX`. Default 0.
|
|
2780
|
+
*
|
|
2781
|
+
* @defaultValue `{"mode":"constant","value":0}`
|
|
2782
|
+
*/
|
|
2783
|
+
readonly start?: Animated<number>;
|
|
2784
|
+
/**
|
|
2785
|
+
* A range over the text's units, shaped at its ends, like After Effects' range selector.
|
|
2786
|
+
*/
|
|
2787
|
+
readonly type: "range";
|
|
2788
|
+
/**
|
|
2789
|
+
* Whether start, end and offset are percents of the units (the default) or unit indices.
|
|
2790
|
+
*
|
|
2791
|
+
* @defaultValue `"percent"`
|
|
2792
|
+
*/
|
|
2793
|
+
readonly units?: RangeUnits;
|
|
2794
|
+
} | {
|
|
2795
|
+
/**
|
|
2796
|
+
* How long the state takes to fade in and out; zero switches.
|
|
2797
|
+
*
|
|
2798
|
+
* @defaultValue `0`
|
|
2799
|
+
*/
|
|
2800
|
+
readonly ramp?: MediaTime;
|
|
2801
|
+
/**
|
|
2802
|
+
* Which runs it selects: those not yet said, being said, or said.
|
|
2803
|
+
*/
|
|
2804
|
+
readonly state: RunState;
|
|
2805
|
+
/**
|
|
2806
|
+
* Splits each run's span over its characters in order, sweeping the run character by
|
|
2807
|
+
* character.
|
|
2808
|
+
*
|
|
2809
|
+
* @defaultValue `false`
|
|
2810
|
+
*/
|
|
2811
|
+
readonly sweep?: boolean;
|
|
2812
|
+
/**
|
|
2813
|
+
* Characters of timed runs, by the run's time against the current time.
|
|
2814
|
+
*/
|
|
2815
|
+
readonly type: "timing";
|
|
2816
|
+
} | {
|
|
2817
|
+
/**
|
|
2818
|
+
* The class name.
|
|
2819
|
+
*/
|
|
2820
|
+
readonly class: string;
|
|
2821
|
+
/**
|
|
2822
|
+
* Characters of runs that carry a class.
|
|
2823
|
+
*/
|
|
2824
|
+
readonly type: "class";
|
|
2825
|
+
};
|
|
2826
|
+
/**
|
|
2827
|
+
* A shadow of a text's glyphs and strokes, behind them.
|
|
2828
|
+
*/
|
|
2829
|
+
export interface TextShadow {
|
|
2830
|
+
/**
|
|
2831
|
+
* Blur radius in font sizes, as CSS `text-shadow` takes it (the Gaussian's standard
|
|
2832
|
+
* deviation is half of it). In `[0, 1]` (`MAX_TEXT_SHADOW_BLUR`).
|
|
2833
|
+
*
|
|
2834
|
+
* @defaultValue `0`
|
|
2835
|
+
*/
|
|
2836
|
+
readonly blur?: number;
|
|
2837
|
+
/**
|
|
2838
|
+
* Shadow color.
|
|
2839
|
+
*/
|
|
2840
|
+
readonly color: Rgba;
|
|
2841
|
+
/**
|
|
2842
|
+
* Offset in font sizes, +x right, +y down; each component in `[-1, 1]`
|
|
2843
|
+
* (`MAX_TEXT_SHADOW_OFFSET`).
|
|
2844
|
+
*
|
|
2845
|
+
* @defaultValue `{"x":0,"y":0}`
|
|
2846
|
+
*/
|
|
2847
|
+
readonly offset?: Vec2;
|
|
2848
|
+
}
|
|
2849
|
+
/**
|
|
2850
|
+
* A band around the glyphs and the strokes listed before it, drawn behind them.
|
|
2851
|
+
*/
|
|
2852
|
+
export interface TextStroke {
|
|
2676
2853
|
/**
|
|
2677
2854
|
* Band color.
|
|
2678
2855
|
*/
|
|
2679
2856
|
readonly color: Rgba;
|
|
2680
2857
|
/**
|
|
2681
|
-
* Band width as a fraction of the font size,
|
|
2858
|
+
* Band width as a fraction of the font size, positive; a text's strokes sum to at most
|
|
2859
|
+
* `MAX_TEXT_STROKE_EXTENT`.
|
|
2682
2860
|
*/
|
|
2683
2861
|
readonly width: number;
|
|
2684
2862
|
}
|
|
2685
2863
|
/**
|
|
2686
|
-
* How text looks and where it lies
|
|
2687
|
-
*
|
|
2864
|
+
* How text looks and where it lies, for caption cues or a text `Generator`.
|
|
2865
|
+
*
|
|
2866
|
+
* The font size is a fraction of the canvas's shorter side, the wrapping width a fraction
|
|
2867
|
+
* of the canvas width, and strokes, shadows and padding fractions of the font size. The
|
|
2868
|
+
* engine draws with its host's registered fonts, `font_family` first, then the rest in
|
|
2869
|
+
* fallback order.
|
|
2688
2870
|
*
|
|
2689
|
-
*
|
|
2690
|
-
*
|
|
2691
|
-
* outline and background padding fractions of the font size. The engine
|
|
2692
|
-
* draws with the fonts its host registered: those of `font_family` first,
|
|
2693
|
-
* then the rest in their fallback order.
|
|
2871
|
+
* Painting is bottom to top as in CSS: background boxes, shadows (last listed lowest),
|
|
2872
|
+
* strokes (outermost lowest), fill, then color glyphs.
|
|
2694
2873
|
*/
|
|
2695
2874
|
export interface TextStyle {
|
|
2696
2875
|
/**
|
|
@@ -2700,12 +2879,18 @@ export interface TextStyle {
|
|
|
2700
2879
|
*/
|
|
2701
2880
|
readonly align?: TextAlign;
|
|
2702
2881
|
/**
|
|
2703
|
-
* The point of the text, background included, placed at
|
|
2704
|
-
*
|
|
2882
|
+
* The point of the text, background included, placed at `position`; `(0.5, 1)` is its
|
|
2883
|
+
* bottom centre.
|
|
2705
2884
|
*
|
|
2706
2885
|
* @defaultValue `{"x":0.5,"y":1}`
|
|
2707
2886
|
*/
|
|
2708
2887
|
readonly anchor?: Vec2;
|
|
2888
|
+
/**
|
|
2889
|
+
* Per-character motion and color, applied in order, at most `MAX_TEXT_ANIMATORS`.
|
|
2890
|
+
* Keyframes are in the holder's time (since a caption cue's start, or a text generator's
|
|
2891
|
+
* picture time). They never change line layout.
|
|
2892
|
+
*/
|
|
2893
|
+
readonly animators?: readonly TextAnimator[];
|
|
2709
2894
|
/**
|
|
2710
2895
|
* A box behind each line.
|
|
2711
2896
|
*
|
|
@@ -2713,30 +2898,47 @@ export interface TextStyle {
|
|
|
2713
2898
|
*/
|
|
2714
2899
|
readonly background?: TextBackground | null;
|
|
2715
2900
|
/**
|
|
2716
|
-
*
|
|
2901
|
+
* What paints the glyphs; a color reads as a solid paint. Gradient positions are in the
|
|
2902
|
+
* text's layout box, `(0, 0)` top-left to `(1, 1)` bottom-right, and a radial radius is a
|
|
2903
|
+
* fraction of the box's shorter side. Default solid white.
|
|
2717
2904
|
*
|
|
2718
|
-
* @defaultValue `{"alpha":1,"blue":1,"green":1,"red":1}`
|
|
2905
|
+
* @defaultValue `{"color":{"alpha":1,"blue":1,"green":1,"red":1},"type":"solid"}`
|
|
2719
2906
|
*/
|
|
2720
|
-
readonly
|
|
2907
|
+
readonly fill?: Paint;
|
|
2721
2908
|
/**
|
|
2722
|
-
* The family
|
|
2723
|
-
*
|
|
2724
|
-
*
|
|
2725
|
-
*
|
|
2726
|
-
* fallback order alone. Non-empty, at most `MAX_FONT_FAMILY_BYTES`
|
|
2727
|
-
* bytes.
|
|
2909
|
+
* The family, as the font's name table gives it (typographic family, else family), matched
|
|
2910
|
+
* ASCII case-insensitively. Missing glyphs and unknown families fall back to the other fonts
|
|
2911
|
+
* in order; `None` uses the fallback order alone. Non-empty, at most
|
|
2912
|
+
* `MAX_FONT_FAMILY_BYTES` bytes.
|
|
2728
2913
|
*/
|
|
2729
2914
|
readonly font_family?: string | null;
|
|
2730
2915
|
/**
|
|
2731
|
-
* Font size as a fraction of the canvas
|
|
2732
|
-
* `MAX_CAPTION_FONT_SIZE` on a caption track and
|
|
2733
|
-
*
|
|
2916
|
+
* Font size as a fraction of the canvas's shorter side: positive, at most
|
|
2917
|
+
* `MAX_CAPTION_FONT_SIZE` on a caption track and `MAX_TEXT_GENERATOR_FONT_SIZE`
|
|
2918
|
+
* in a text generator.
|
|
2734
2919
|
*
|
|
2735
2920
|
* @defaultValue `0.05`
|
|
2736
2921
|
*/
|
|
2737
2922
|
readonly font_size?: number;
|
|
2738
2923
|
/**
|
|
2739
|
-
*
|
|
2924
|
+
* The weight in `[1, 1000]` used to match a family's faces, as CSS Fonts 4 matches
|
|
2925
|
+
* `font-weight`. Variable faces draw at it, clamped to their `wght` axis; no face is
|
|
2926
|
+
* synthetically emboldened.
|
|
2927
|
+
*
|
|
2928
|
+
* @defaultValue `400`
|
|
2929
|
+
*/
|
|
2930
|
+
readonly font_weight?: number;
|
|
2931
|
+
/**
|
|
2932
|
+
* Space after each character, as a fraction of the font size, in `[-0.5, 1]`, added as CSS
|
|
2933
|
+
* `letter-spacing` does: none after a line's last character or within cursive scripts such
|
|
2934
|
+
* as Arabic. A non-zero value turns optional ligatures off.
|
|
2935
|
+
*
|
|
2936
|
+
* @defaultValue `0`
|
|
2937
|
+
*/
|
|
2938
|
+
readonly letter_spacing?: number;
|
|
2939
|
+
/**
|
|
2940
|
+
* Baseline-to-baseline distance in font sizes, in `[0.5, 3]`. Each line's em box (0.8 font
|
|
2941
|
+
* sizes above the baseline, 0.2 below) is centred in a taller line.
|
|
2740
2942
|
*
|
|
2741
2943
|
* @defaultValue `1.2`
|
|
2742
2944
|
*/
|
|
@@ -2748,25 +2950,94 @@ export interface TextStyle {
|
|
|
2748
2950
|
*/
|
|
2749
2951
|
readonly max_width?: number;
|
|
2750
2952
|
/**
|
|
2751
|
-
*
|
|
2752
|
-
*
|
|
2753
|
-
* @defaultValue `null`
|
|
2754
|
-
*/
|
|
2755
|
-
readonly outline?: TextOutline | null;
|
|
2756
|
-
/**
|
|
2757
|
-
* Where on the canvas the text's anchor lies, `(0, 0)` top-left to
|
|
2758
|
-
* `(1, 1)` bottom-right.
|
|
2953
|
+
* Where on the canvas the text's anchor lies, `(0, 0)` top-left to `(1, 1)` bottom-right.
|
|
2759
2954
|
*
|
|
2760
2955
|
* @defaultValue `{"x":0.5,"y":0.92}`
|
|
2761
2956
|
*/
|
|
2762
2957
|
readonly position?: Vec2;
|
|
2958
|
+
/**
|
|
2959
|
+
* Shadows of the glyphs and strokes, the first on top, as CSS `text-shadow` lists them. At
|
|
2960
|
+
* most `MAX_TEXT_SHADOWS`.
|
|
2961
|
+
*/
|
|
2962
|
+
readonly shadows?: readonly TextShadow[];
|
|
2963
|
+
/**
|
|
2964
|
+
* Bands around the glyphs, innermost first, each outside the one before. At most
|
|
2965
|
+
* `MAX_TEXT_STROKES`, widths summing to at most `MAX_TEXT_STROKE_EXTENT`.
|
|
2966
|
+
*/
|
|
2967
|
+
readonly strokes?: readonly TextStroke[];
|
|
2968
|
+
}
|
|
2969
|
+
/**
|
|
2970
|
+
* Changes to a `TextStyle`. Each field set replaces the base's whole value (lists are not
|
|
2971
|
+
* merged); a field left out keeps the base's.
|
|
2972
|
+
*/
|
|
2973
|
+
export interface TextStylePatch {
|
|
2974
|
+
/**
|
|
2975
|
+
* See `TextStyle::align`.
|
|
2976
|
+
*/
|
|
2977
|
+
readonly align?: TextAlign | null;
|
|
2978
|
+
/**
|
|
2979
|
+
* See `TextStyle::anchor`.
|
|
2980
|
+
*/
|
|
2981
|
+
readonly anchor?: Vec2 | null;
|
|
2982
|
+
/**
|
|
2983
|
+
* See `TextStyle::animators`.
|
|
2984
|
+
*/
|
|
2985
|
+
readonly animators?: readonly TextAnimator[] | null;
|
|
2986
|
+
/**
|
|
2987
|
+
* The box behind each line; `null` removes the base's.
|
|
2988
|
+
*/
|
|
2989
|
+
readonly background?: TextBackground | null;
|
|
2990
|
+
/**
|
|
2991
|
+
* See `TextStyle::fill`.
|
|
2992
|
+
*/
|
|
2993
|
+
readonly fill?: Paint | null;
|
|
2994
|
+
/**
|
|
2995
|
+
* The family; `null` draws from the fallback order alone.
|
|
2996
|
+
*/
|
|
2997
|
+
readonly font_family?: string | null;
|
|
2998
|
+
/**
|
|
2999
|
+
* See `TextStyle::font_size`.
|
|
3000
|
+
*/
|
|
3001
|
+
readonly font_size?: number | null;
|
|
3002
|
+
/**
|
|
3003
|
+
* See `TextStyle::font_weight`.
|
|
3004
|
+
*/
|
|
3005
|
+
readonly font_weight?: number | null;
|
|
3006
|
+
/**
|
|
3007
|
+
* See `TextStyle::letter_spacing`.
|
|
3008
|
+
*/
|
|
3009
|
+
readonly letter_spacing?: number | null;
|
|
3010
|
+
/**
|
|
3011
|
+
* See `TextStyle::line_height`.
|
|
3012
|
+
*/
|
|
3013
|
+
readonly line_height?: number | null;
|
|
3014
|
+
/**
|
|
3015
|
+
* See `TextStyle::max_width`.
|
|
3016
|
+
*/
|
|
3017
|
+
readonly max_width?: number | null;
|
|
3018
|
+
/**
|
|
3019
|
+
* See `TextStyle::position`.
|
|
3020
|
+
*/
|
|
3021
|
+
readonly position?: Vec2 | null;
|
|
3022
|
+
/**
|
|
3023
|
+
* See `TextStyle::shadows`.
|
|
3024
|
+
*/
|
|
3025
|
+
readonly shadows?: readonly TextShadow[] | null;
|
|
3026
|
+
/**
|
|
3027
|
+
* See `TextStyle::strokes`.
|
|
3028
|
+
*/
|
|
3029
|
+
readonly strokes?: readonly TextStroke[] | null;
|
|
2763
3030
|
}
|
|
3031
|
+
/**
|
|
3032
|
+
* The units a Range selector counts.
|
|
3033
|
+
*/
|
|
3034
|
+
export type TextUnit = "characters" | "characters_excluding_spaces" | "words" | "lines";
|
|
2764
3035
|
/**
|
|
2765
3036
|
* How a clip plays its source range over its timeline range.
|
|
2766
3037
|
*
|
|
2767
|
-
* `forward` and `reverse` stretch the source range over the timeline range,
|
|
2768
|
-
*
|
|
2769
|
-
*
|
|
3038
|
+
* `forward` and `reverse` stretch the source range over the timeline range, so their speed
|
|
3039
|
+
* is the ratio of the two. A loop plays the source range at its own speed for as long as the
|
|
3040
|
+
* timeline range lasts.
|
|
2770
3041
|
*/
|
|
2771
3042
|
export type TimeMap = {
|
|
2772
3043
|
/**
|
|
@@ -2775,8 +3046,8 @@ export type TimeMap = {
|
|
|
2775
3046
|
readonly type: "forward";
|
|
2776
3047
|
} | {
|
|
2777
3048
|
/**
|
|
2778
|
-
* From the end of the source range to its start: pictures in reverse
|
|
2779
|
-
*
|
|
3049
|
+
* From the end of the source range to its start: pictures in reverse order and sound
|
|
3050
|
+
* played backwards.
|
|
2780
3051
|
*/
|
|
2781
3052
|
readonly type: "reverse";
|
|
2782
3053
|
} | {
|
|
@@ -2848,8 +3119,8 @@ export interface Track {
|
|
|
2848
3119
|
*/
|
|
2849
3120
|
readonly captions?: Captions | null;
|
|
2850
3121
|
/**
|
|
2851
|
-
* Clips on this track
|
|
2852
|
-
*
|
|
3122
|
+
* Clips on this track, in authoring order; evaluation sorts by time. A caption track has
|
|
3123
|
+
* none.
|
|
2853
3124
|
*
|
|
2854
3125
|
* @defaultValue `[]`
|
|
2855
3126
|
*/
|
|
@@ -2884,8 +3155,8 @@ export interface TrackAudio {
|
|
|
2884
3155
|
*/
|
|
2885
3156
|
readonly ducking?: Ducking | null;
|
|
2886
3157
|
/**
|
|
2887
|
-
* Ordered single-input effects applied to the summed clip signal, at
|
|
2888
|
-
*
|
|
3158
|
+
* Ordered single-input effects applied to the summed clip signal, at most
|
|
3159
|
+
* `MAX_CHAIN_EFFECTS`.
|
|
2889
3160
|
*
|
|
2890
3161
|
* @defaultValue `[]`
|
|
2891
3162
|
*/
|
|
@@ -2903,8 +3174,7 @@ export interface TrackAudio {
|
|
|
2903
3174
|
*/
|
|
2904
3175
|
readonly muted?: boolean;
|
|
2905
3176
|
/**
|
|
2906
|
-
* Animated stereo position applied after the clip mix, from `-1` (left)
|
|
2907
|
-
* to `1` (right).
|
|
3177
|
+
* Animated stereo position applied after the clip mix, from `-1` (left) to `1` (right).
|
|
2908
3178
|
*
|
|
2909
3179
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2910
3180
|
*/
|
|
@@ -2954,47 +3224,55 @@ export interface Vec2 {
|
|
|
2954
3224
|
*/
|
|
2955
3225
|
export interface VideoStreamShape {
|
|
2956
3226
|
/**
|
|
2957
|
-
* The rate
|
|
2958
|
-
*
|
|
2959
|
-
*
|
|
2960
|
-
* rate is a guess for variable-rate media, and browsers report none.
|
|
3227
|
+
* The rate the first frames are presented at, measured from packet times and rounded
|
|
3228
|
+
* (`alpha2_assets::FrameRateEvidence`), when measurable. Declared rates are not used because
|
|
3229
|
+
* they are guesses for variable-rate media and browsers report none.
|
|
2961
3230
|
*/
|
|
2962
3231
|
readonly frame_rate?: FrameRate | null;
|
|
2963
3232
|
/**
|
|
2964
|
-
* Displayed height in square pixels
|
|
2965
|
-
* pixel aspect ratio taller than wide, then turned.
|
|
3233
|
+
* Displayed height in square pixels, after the pixel aspect ratio and orientation.
|
|
2966
3234
|
*/
|
|
2967
3235
|
readonly height: number;
|
|
2968
3236
|
/**
|
|
2969
|
-
* Displayed width in square pixels
|
|
2970
|
-
* pixel aspect ratio wider than tall, then turned by the stream's
|
|
2971
|
-
* orientation.
|
|
3237
|
+
* Displayed width in square pixels, after the pixel aspect ratio and orientation.
|
|
2972
3238
|
*/
|
|
2973
3239
|
readonly width: number;
|
|
2974
3240
|
}
|
|
2975
3241
|
/**
|
|
2976
3242
|
* Resolution-independent visual presentation controls for a clip.
|
|
3243
|
+
*
|
|
3244
|
+
* Omitted fields default to the source centred on the canvas, unscaled, unrotated and opaque.
|
|
2977
3245
|
*/
|
|
2978
3246
|
export interface VisualProperties {
|
|
2979
3247
|
/**
|
|
2980
3248
|
* Unanimated normalized point within the source rectangle.
|
|
3249
|
+
*
|
|
3250
|
+
* @defaultValue `{"x":0.5,"y":0.5}`
|
|
2981
3251
|
*/
|
|
2982
|
-
readonly anchor
|
|
3252
|
+
readonly anchor?: Vec2;
|
|
2983
3253
|
/**
|
|
2984
3254
|
* Animated opacity constrained to `0..=1`.
|
|
3255
|
+
*
|
|
3256
|
+
* @defaultValue `{"mode":"constant","value":1}`
|
|
2985
3257
|
*/
|
|
2986
|
-
readonly opacity
|
|
3258
|
+
readonly opacity?: Animated<number>;
|
|
2987
3259
|
/**
|
|
2988
|
-
* Animated normalized canvas translation, along spatial curves where
|
|
2989
|
-
*
|
|
3260
|
+
* Animated normalized canvas translation, along spatial curves where keyframes have
|
|
3261
|
+
* tangents.
|
|
3262
|
+
*
|
|
3263
|
+
* @defaultValue `{"mode":"constant","value":{"x":0.5,"y":0.5}}`
|
|
2990
3264
|
*/
|
|
2991
|
-
readonly position
|
|
3265
|
+
readonly position?: AnimatedPoint;
|
|
2992
3266
|
/**
|
|
2993
3267
|
* Animated clockwise rotation in degrees.
|
|
3268
|
+
*
|
|
3269
|
+
* @defaultValue `{"mode":"constant","value":0}`
|
|
2994
3270
|
*/
|
|
2995
|
-
readonly rotation_degrees
|
|
3271
|
+
readonly rotation_degrees?: Animated<number>;
|
|
2996
3272
|
/**
|
|
2997
3273
|
* Animated per-axis scale.
|
|
3274
|
+
*
|
|
3275
|
+
* @defaultValue `{"mode":"constant","value":{"x":1,"y":1}}`
|
|
2998
3276
|
*/
|
|
2999
|
-
readonly scale
|
|
3277
|
+
readonly scale?: Animated<Vec2>;
|
|
3000
3278
|
}
|