alpha2 0.4.6 → 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 +108 -177
- 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 +96 -162
- package/dist/frame-supply.js +181 -171
- package/dist/generated/project-schema.d.ts +701 -485
- package/dist/generated/project-schema.js +55 -2
- package/dist/generated/project-shape.js +261 -16
- 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 +82 -67
- package/dist/hdr-frames.js +112 -49
- 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 +48 -63
- package/dist/layout.js +37 -37
- 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 +166 -245
- package/dist/mediabunny.js +741 -580
- 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 +73 -117
- package/dist/project.js +384 -445
- 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 +97 -71
- package/dist/text.js +33 -70
- 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 -95
- package/dist/worker.js +235 -143
- 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 +460 -567
- package/wasm/alpha2_wasm.js +594 -594
- package/wasm/alpha2_wasm_bg.wasm +0 -0
- package/wasm/alpha2_wasm_bg.wasm.d.ts +15 -8
- package/wasm/rust-crate-licenses.md +2 -2
- package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-1313375d424845c0}/inline1.js +1 -0
- package/wasm/snippets/alpha2-wasm-1313375d424845c0/inline2.js +82 -0
- package/wasm/snippets/alpha2-wasm-c62e60c964e88a52/inline2.js +0 -52
- /package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-1313375d424845c0}/inline0.js +0 -0
- /package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → 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`. */
|
|
@@ -96,6 +104,12 @@ export declare const MAX_POLYSTAR_POINTS = 100;
|
|
|
96
104
|
export declare const MAX_PROJECT_JSON_BYTES = 67108864;
|
|
97
105
|
/** Mirrors `alpha2_model::MAX_PROVIDER_DOCUMENT_BYTES`. */
|
|
98
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;
|
|
99
113
|
/** Mirrors `alpha2_model::MAX_SAMPLE_RATE`. */
|
|
100
114
|
export declare const MAX_SAMPLE_RATE = 96000;
|
|
101
115
|
/** Mirrors `alpha2_model::MAX_SEQUENCE_FRAMES`. */
|
|
@@ -106,14 +120,26 @@ export declare const MAX_SHAPE_DEPTH = 32;
|
|
|
106
120
|
export declare const MAX_SHAPE_ITEMS = 1024;
|
|
107
121
|
/** Mirrors `alpha2_model::MAX_SVG_DOCUMENT_BYTES`. */
|
|
108
122
|
export declare const MAX_SVG_DOCUMENT_BYTES = 33554432;
|
|
123
|
+
/** Mirrors `alpha2_model::MAX_TEXT_ANIMATORS`. */
|
|
124
|
+
export declare const MAX_TEXT_ANIMATORS = 8;
|
|
109
125
|
/** Mirrors `alpha2_model::MAX_TEXT_CONTENT_BYTES`. */
|
|
110
126
|
export declare const MAX_TEXT_CONTENT_BYTES = 4096;
|
|
111
127
|
/** Mirrors `alpha2_model::MAX_TEXT_GENERATOR_FONT_SIZE`. */
|
|
112
128
|
export declare const MAX_TEXT_GENERATOR_FONT_SIZE = 1;
|
|
113
|
-
/** Mirrors `alpha2_model::MAX_TEXT_OUTLINE_WIDTH`. */
|
|
114
|
-
export declare const MAX_TEXT_OUTLINE_WIDTH = 0.5;
|
|
115
129
|
/** Mirrors `alpha2_model::MAX_TEXT_PADDING`. */
|
|
116
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;
|
|
117
143
|
/** Mirrors `alpha2_model::MAX_TRACKS`. */
|
|
118
144
|
export declare const MAX_TRACKS = 256;
|
|
119
145
|
/** Mirrors `alpha2_model::MAX_TRANSITIONS_PER_TRACK`. */
|
|
@@ -134,6 +160,8 @@ export declare const MIN_LEVEL_DB = -96;
|
|
|
134
160
|
export declare const MIN_LINE_HEIGHT = 0.5;
|
|
135
161
|
/** Mirrors `alpha2_model::MIN_POLYSTAR_POINTS`. */
|
|
136
162
|
export declare const MIN_POLYSTAR_POINTS = 3;
|
|
163
|
+
/** Mirrors `alpha2_model::MIN_RANGE_PERCENT`. */
|
|
164
|
+
export declare const MIN_RANGE_PERCENT = -100;
|
|
137
165
|
/** Mirrors `alpha2_model::MIN_SAMPLE_RATE`. */
|
|
138
166
|
export declare const MIN_SAMPLE_RATE = 8000;
|
|
139
167
|
/** Mirrors `alpha2_model::REVERB_DELAY_MS`. */
|
|
@@ -200,10 +228,18 @@ export declare const OVERFLOW_VALUES: readonly Overflow[];
|
|
|
200
228
|
export declare const POLYSTAR_KIND_VALUES: readonly PolystarKind[];
|
|
201
229
|
/** Every {@link Position}, in the model's order. */
|
|
202
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[];
|
|
203
237
|
/** Every {@link Spread}, in the model's order. */
|
|
204
238
|
export declare const SPREAD_VALUES: readonly Spread[];
|
|
205
239
|
/** Every {@link TextAlign}, in the model's order. */
|
|
206
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[];
|
|
207
243
|
/** Every {@link TrackKind}, in the model's order. */
|
|
208
244
|
export declare const TRACK_KIND_VALUES: readonly TrackKind[];
|
|
209
245
|
/** Every {@link TransferFunction}, in the model's order. */
|
|
@@ -211,11 +247,10 @@ export declare const TRANSFER_FUNCTION_VALUES: readonly TransferFunction[];
|
|
|
211
247
|
/** Every {@link TrimMode}, in the model's order. */
|
|
212
248
|
export declare const TRIM_MODE_VALUES: readonly TrimMode[];
|
|
213
249
|
/**
|
|
214
|
-
* The deserialized shape of a `Project
|
|
250
|
+
* The deserialized shape of a `Project` before its invariants are checked.
|
|
215
251
|
*
|
|
216
|
-
* This is the wire contract
|
|
217
|
-
*
|
|
218
|
-
* `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.
|
|
219
254
|
*/
|
|
220
255
|
export interface Project {
|
|
221
256
|
/**
|
|
@@ -243,8 +278,7 @@ export interface Project {
|
|
|
243
278
|
*/
|
|
244
279
|
readonly name: string;
|
|
245
280
|
/**
|
|
246
|
-
* Document version. This build reads and writes only
|
|
247
|
-
* `CURRENT_SCHEMA_VERSION`.
|
|
281
|
+
* Document version. This build reads and writes only `CURRENT_SCHEMA_VERSION`.
|
|
248
282
|
*/
|
|
249
283
|
readonly schema_version: 1;
|
|
250
284
|
/**
|
|
@@ -261,13 +295,11 @@ export interface Project {
|
|
|
261
295
|
readonly timeline: Timeline;
|
|
262
296
|
}
|
|
263
297
|
/**
|
|
264
|
-
* Where the lines of a wrapping flex container, or a grid's rows, lie
|
|
265
|
-
* across the container.
|
|
298
|
+
* Where the lines of a wrapping flex container, or a grid's rows, lie across the container.
|
|
266
299
|
*/
|
|
267
300
|
export type AlignContent = "start" | "center" | "end" | "space_between" | "space_around" | "space_evenly" | "stretch";
|
|
268
301
|
/**
|
|
269
|
-
* Where children lie across a flex container's main axis, or in their grid
|
|
270
|
-
* areas.
|
|
302
|
+
* Where children lie across a flex container's main axis, or in their grid areas.
|
|
271
303
|
*/
|
|
272
304
|
export type AlignItems = "start" | "center" | "end" | "stretch";
|
|
273
305
|
/**
|
|
@@ -295,12 +327,10 @@ export type Animated<T> = {
|
|
|
295
327
|
/**
|
|
296
328
|
* A position that can move along curves between its keyframes.
|
|
297
329
|
*
|
|
298
|
-
* Its JSON is
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
* length. Without them it moves in a straight line, as an `Animated<Vec2>`
|
|
303
|
-
* 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.
|
|
304
334
|
*/
|
|
305
335
|
export type AnimatedPoint = {
|
|
306
336
|
/**
|
|
@@ -324,8 +354,7 @@ export type AnimatedPoint = {
|
|
|
324
354
|
/**
|
|
325
355
|
* A serializable single-input audio effect applied to a clip or track bus.
|
|
326
356
|
*
|
|
327
|
-
* Sidechain ducking
|
|
328
|
-
* It is authored per track through `Ducking`.
|
|
357
|
+
* Sidechain ducking takes a second input, so it is authored per track through `Ducking`.
|
|
329
358
|
*/
|
|
330
359
|
export type AudioEffect = {
|
|
331
360
|
/**
|
|
@@ -342,8 +371,7 @@ export type AudioEffect = {
|
|
|
342
371
|
*/
|
|
343
372
|
readonly attack_ms: number;
|
|
344
373
|
/**
|
|
345
|
-
* Lookahead in milliseconds, at most `MAX_LOOKAHEAD_MS`. Reported as
|
|
346
|
-
* graph latency.
|
|
374
|
+
* Lookahead in milliseconds, at most `MAX_LOOKAHEAD_MS`. Reported as graph latency.
|
|
347
375
|
*
|
|
348
376
|
* @defaultValue `0`
|
|
349
377
|
*/
|
|
@@ -357,8 +385,7 @@ export type AudioEffect = {
|
|
|
357
385
|
*/
|
|
358
386
|
readonly release_ms: number;
|
|
359
387
|
/**
|
|
360
|
-
* Level above which gain reduction begins, in decibels from
|
|
361
|
-
* `MIN_LEVEL_DB` to 0.
|
|
388
|
+
* Level above which gain reduction begins, in decibels from `MIN_LEVEL_DB` to 0.
|
|
362
389
|
*/
|
|
363
390
|
readonly threshold_db: number;
|
|
364
391
|
/**
|
|
@@ -388,8 +415,7 @@ export type AudioEffect = {
|
|
|
388
415
|
*/
|
|
389
416
|
export interface AudioProperties {
|
|
390
417
|
/**
|
|
391
|
-
* Ordered single-input effects applied before the track bus, at most
|
|
392
|
-
* `MAX_CHAIN_EFFECTS`.
|
|
418
|
+
* Ordered single-input effects applied before the track bus, at most `MAX_CHAIN_EFFECTS`.
|
|
393
419
|
*
|
|
394
420
|
* @defaultValue `[]`
|
|
395
421
|
*/
|
|
@@ -401,8 +427,7 @@ export interface AudioProperties {
|
|
|
401
427
|
*/
|
|
402
428
|
readonly fade_in?: MediaTime;
|
|
403
429
|
/**
|
|
404
|
-
* Fade-out duration measured back from the clip's timeline end.
|
|
405
|
-
* Non-negative.
|
|
430
|
+
* Fade-out duration measured back from the clip's timeline end. Non-negative.
|
|
406
431
|
*
|
|
407
432
|
* @defaultValue `0`
|
|
408
433
|
*/
|
|
@@ -431,6 +456,11 @@ export interface AudioProperties {
|
|
|
431
456
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
432
457
|
*/
|
|
433
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;
|
|
434
464
|
}
|
|
435
465
|
/**
|
|
436
466
|
* An audio stream's channel count and sample rate.
|
|
@@ -448,9 +478,8 @@ export interface AudioStreamShape {
|
|
|
448
478
|
/**
|
|
449
479
|
* The color space in which blend modes are evaluated.
|
|
450
480
|
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
* 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
|
|
454
483
|
* `BlendSpace::SrgbEncoded`.
|
|
455
484
|
*/
|
|
456
485
|
export type BlendSpace = "linear_light" | "srgb_encoded";
|
|
@@ -463,28 +492,41 @@ export type CacheIntent = "auto" | "pin" | "bypass";
|
|
|
463
492
|
*/
|
|
464
493
|
export interface CaptionCue {
|
|
465
494
|
/**
|
|
466
|
-
*
|
|
467
|
-
*
|
|
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.
|
|
468
497
|
*/
|
|
469
|
-
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;
|
|
470
508
|
/**
|
|
471
509
|
* When the cue shows. Non-empty and not before zero.
|
|
472
510
|
*/
|
|
473
511
|
readonly timeline_range: TimeRange;
|
|
474
512
|
}
|
|
475
513
|
/**
|
|
476
|
-
* What a caption track shows: its cues, in
|
|
514
|
+
* What a caption track shows: its cues, in its style.
|
|
477
515
|
*/
|
|
478
516
|
export interface Captions {
|
|
479
517
|
/**
|
|
480
|
-
* Cues in timeline order, none overlapping
|
|
481
|
-
* 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.
|
|
482
519
|
*/
|
|
483
520
|
readonly cues: readonly CaptionCue[];
|
|
484
521
|
/**
|
|
485
|
-
*
|
|
522
|
+
* The style every cue starts from.
|
|
486
523
|
*/
|
|
487
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>>;
|
|
488
530
|
}
|
|
489
531
|
/**
|
|
490
532
|
* A reference to a source over independent timeline and source ranges.
|
|
@@ -501,15 +543,13 @@ export interface Clip {
|
|
|
501
543
|
*/
|
|
502
544
|
readonly blend_mode?: ClipBlendMode;
|
|
503
545
|
/**
|
|
504
|
-
* Whether a runtime may keep and reuse the clip's rendered picture.
|
|
505
|
-
*
|
|
506
|
-
* draws.
|
|
546
|
+
* Whether a runtime may keep and reuse the clip's rendered picture. Never changes what
|
|
547
|
+
* renders.
|
|
507
548
|
*/
|
|
508
549
|
readonly cache?: CacheIntent;
|
|
509
550
|
/**
|
|
510
|
-
* The composition graph that builds the clip's picture from its source,
|
|
511
|
-
*
|
|
512
|
-
* 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.
|
|
513
553
|
*
|
|
514
554
|
* @defaultValue `null`
|
|
515
555
|
*/
|
|
@@ -519,9 +559,8 @@ export interface Clip {
|
|
|
519
559
|
*/
|
|
520
560
|
readonly id: ClipId;
|
|
521
561
|
/**
|
|
522
|
-
* Shapes that limit where the clip is visible, applied in order after
|
|
523
|
-
*
|
|
524
|
-
* `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.
|
|
525
564
|
*
|
|
526
565
|
* @defaultValue `[]`
|
|
527
566
|
*/
|
|
@@ -556,21 +595,17 @@ export interface Clip {
|
|
|
556
595
|
readonly visual?: VisualProperties;
|
|
557
596
|
}
|
|
558
597
|
/**
|
|
559
|
-
*
|
|
560
|
-
*
|
|
561
|
-
* The modes are those of W3C Compositing and Blending Level 1 (the CSS
|
|
562
|
-
* `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.
|
|
563
600
|
*/
|
|
564
|
-
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";
|
|
565
602
|
/**
|
|
566
603
|
* A clip's use of a `Composition`, and how its time maps onto it.
|
|
567
604
|
*
|
|
568
|
-
* Composition time is `offset + (t - clip start) * scale` for timeline time
|
|
569
|
-
*
|
|
570
|
-
*
|
|
571
|
-
* offset
|
|
572
|
-
* start before composition time zero makes the offset negative: settings
|
|
573
|
-
* 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.
|
|
574
609
|
*/
|
|
575
610
|
export interface ClipComposition {
|
|
576
611
|
/**
|
|
@@ -591,8 +626,8 @@ export interface ClipComposition {
|
|
|
591
626
|
readonly scale?: TimeScale;
|
|
592
627
|
}
|
|
593
628
|
/**
|
|
594
|
-
* One versioned
|
|
595
|
-
* transition
|
|
629
|
+
* One versioned effect invocation: a composition's effect or transition node, or a timeline
|
|
630
|
+
* transition.
|
|
596
631
|
*/
|
|
597
632
|
export interface ClipEffect {
|
|
598
633
|
/**
|
|
@@ -600,14 +635,12 @@ export interface ClipEffect {
|
|
|
600
635
|
*/
|
|
601
636
|
readonly id: string;
|
|
602
637
|
/**
|
|
603
|
-
* Named parameter values, constant or keyframed. Omitted entries use
|
|
604
|
-
* definition defaults.
|
|
638
|
+
* Named parameter values, constant or keyframed. Omitted entries use definition defaults.
|
|
605
639
|
*
|
|
606
|
-
* Keyframe times are composition times in a composition node and
|
|
607
|
-
* timeline
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
* 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.
|
|
611
644
|
*
|
|
612
645
|
* @defaultValue `{}`
|
|
613
646
|
*/
|
|
@@ -632,8 +665,8 @@ export type ClipId = string;
|
|
|
632
665
|
*/
|
|
633
666
|
export interface ClipTransition {
|
|
634
667
|
/**
|
|
635
|
-
* Timing curve applied to the transition's linear progress. The eased
|
|
636
|
-
*
|
|
668
|
+
* Timing curve applied to the transition's linear progress. The eased progress is clamped
|
|
669
|
+
* to `0..=1`.
|
|
637
670
|
*/
|
|
638
671
|
readonly easing: Easing;
|
|
639
672
|
/**
|
|
@@ -662,8 +695,7 @@ export type ColorMatrix = "bt601" | "bt709" | "bt2020_ncl" | "rgb";
|
|
|
662
695
|
*/
|
|
663
696
|
export interface ColorMetadata {
|
|
664
697
|
/**
|
|
665
|
-
* SDR or HDR
|
|
666
|
-
* or HLG (`is_consistent`).
|
|
698
|
+
* SDR or HDR; HDR exactly when `transfer` is PQ or HLG (`is_consistent`).
|
|
667
699
|
*/
|
|
668
700
|
readonly dynamic_range: DynamicRange;
|
|
669
701
|
/**
|
|
@@ -686,13 +718,11 @@ export interface ColorMetadata {
|
|
|
686
718
|
/**
|
|
687
719
|
* How sources' colors come into the working space.
|
|
688
720
|
*
|
|
689
|
-
* The working space is display-referred linear light with BT.709 primaries,
|
|
690
|
-
*
|
|
691
|
-
*
|
|
692
|
-
* BT.709
|
|
693
|
-
*
|
|
694
|
-
* tone-mapped from `hdr_peak_nits` to SDR white by the ITU-R BT.2390
|
|
695
|
-
* 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.
|
|
696
726
|
*/
|
|
697
727
|
export interface ColorPipeline {
|
|
698
728
|
/**
|
|
@@ -702,9 +732,8 @@ export interface ColorPipeline {
|
|
|
702
732
|
*/
|
|
703
733
|
readonly hdr?: HdrSources;
|
|
704
734
|
/**
|
|
705
|
-
* The luminance, in nits, HDR sources are taken to peak at: PQ above it
|
|
706
|
-
*
|
|
707
|
-
* 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`.
|
|
708
737
|
*
|
|
709
738
|
* @defaultValue `1000`
|
|
710
739
|
*/
|
|
@@ -731,28 +760,27 @@ export interface Composition {
|
|
|
731
760
|
*/
|
|
732
761
|
readonly id: CompositionId;
|
|
733
762
|
/**
|
|
734
|
-
* The images a group node gives it, by name, in port order
|
|
735
|
-
*
|
|
763
|
+
* The images a group node gives it, by name, in port order; its `NodeOp::GroupInput`
|
|
764
|
+
* nodes read them.
|
|
736
765
|
*/
|
|
737
766
|
readonly inputs?: readonly string[];
|
|
738
767
|
/**
|
|
739
|
-
* The graph's nodes.
|
|
740
|
-
* 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.
|
|
741
769
|
*
|
|
742
770
|
* @defaultValue `[]`
|
|
743
771
|
*/
|
|
744
772
|
readonly nodes?: readonly CompositionNode[];
|
|
745
773
|
/**
|
|
746
|
-
* The node whose image is the composition's picture. A composition
|
|
747
|
-
*
|
|
774
|
+
* The node whose image is the composition's picture. A composition without one saves but
|
|
775
|
+
* cannot be rendered.
|
|
748
776
|
*
|
|
749
777
|
* @defaultValue `null`
|
|
750
778
|
*/
|
|
751
779
|
readonly output?: NodeId | null;
|
|
752
780
|
}
|
|
753
781
|
/**
|
|
754
|
-
* A node setting a composition exposes to
|
|
755
|
-
*
|
|
782
|
+
* A node setting a composition exposes to group nodes: an effect or transition parameter of
|
|
783
|
+
* one of its nodes.
|
|
756
784
|
*/
|
|
757
785
|
export interface CompositionControl {
|
|
758
786
|
/**
|
|
@@ -777,9 +805,8 @@ export type CompositionId = string;
|
|
|
777
805
|
*/
|
|
778
806
|
export interface CompositionNode {
|
|
779
807
|
/**
|
|
780
|
-
* Whether the node passes its `NodeOp::bypass_input` through
|
|
781
|
-
*
|
|
782
|
-
* bypassed.
|
|
808
|
+
* Whether the node passes its `NodeOp::bypass_input` through unchanged. A node without
|
|
809
|
+
* inputs cannot be bypassed.
|
|
783
810
|
*
|
|
784
811
|
* @defaultValue `false`
|
|
785
812
|
*/
|
|
@@ -804,9 +831,9 @@ export interface Dash {
|
|
|
804
831
|
*/
|
|
805
832
|
readonly offset?: Animated<number>;
|
|
806
833
|
/**
|
|
807
|
-
* Alternating dash and gap lengths, as fractions of the shorter side:
|
|
808
|
-
*
|
|
809
|
-
*
|
|
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.
|
|
810
837
|
*/
|
|
811
838
|
readonly pattern: readonly Animated<number>[];
|
|
812
839
|
}
|
|
@@ -840,9 +867,7 @@ export interface Ducking {
|
|
|
840
867
|
readonly threshold: number;
|
|
841
868
|
}
|
|
842
869
|
/**
|
|
843
|
-
*
|
|
844
|
-
* transfer: `hdr` exactly when the transfer is PQ or HLG, and a color
|
|
845
|
-
* whose two fields disagree is refused.
|
|
870
|
+
* Standard or high dynamic range; must agree with the transfer.
|
|
846
871
|
*/
|
|
847
872
|
export type DynamicRange = "sdr" | "hdr";
|
|
848
873
|
/**
|
|
@@ -919,15 +944,14 @@ export type EffectValue = {
|
|
|
919
944
|
readonly value: readonly [number, number];
|
|
920
945
|
} | {
|
|
921
946
|
/**
|
|
922
|
-
* Four finite components that are not a color, such as per-channel
|
|
923
|
-
*
|
|
947
|
+
* Four finite components that are not a color, such as per-channel thresholds; they
|
|
948
|
+
* keyframe component by component.
|
|
924
949
|
*/
|
|
925
950
|
readonly type: "vec4";
|
|
926
951
|
readonly value: readonly [number, number, number, number];
|
|
927
952
|
} | {
|
|
928
953
|
/**
|
|
929
|
-
* Straight (not premultiplied), sRGB-encoded RGBA
|
|
930
|
-
* 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.
|
|
931
955
|
*/
|
|
932
956
|
readonly type: "color";
|
|
933
957
|
readonly value: readonly [number, number, number, number];
|
|
@@ -953,8 +977,8 @@ export interface EqBand {
|
|
|
953
977
|
*/
|
|
954
978
|
readonly frequency_hz: number;
|
|
955
979
|
/**
|
|
956
|
-
* Peaking gain in decibels, at most `MAX_EQ_GAIN_DB` either way.
|
|
957
|
-
*
|
|
980
|
+
* Peaking gain in decibels, at most `MAX_EQ_GAIN_DB` either way. Ignored by the pass
|
|
981
|
+
* filters.
|
|
958
982
|
*
|
|
959
983
|
* @defaultValue `0`
|
|
960
984
|
*/
|
|
@@ -989,8 +1013,7 @@ export type FlexDirection = "row" | "column" | "row_reverse" | "column_reverse";
|
|
|
989
1013
|
*/
|
|
990
1014
|
export type FlexWrap = "nowrap" | "wrap";
|
|
991
1015
|
/**
|
|
992
|
-
* A positive rational frame rate in reduced form, at most one frame per tick
|
|
993
|
-
* (120 000 frames per second).
|
|
1016
|
+
* A positive rational frame rate in reduced form, at most one frame per tick (120 000 fps).
|
|
994
1017
|
*/
|
|
995
1018
|
export interface FrameRate {
|
|
996
1019
|
/**
|
|
@@ -1005,12 +1028,10 @@ export interface FrameRate {
|
|
|
1005
1028
|
/**
|
|
1006
1029
|
* The picture of a generated source.
|
|
1007
1030
|
*
|
|
1008
|
-
* A generated picture has the canvas's size and aspect
|
|
1009
|
-
*
|
|
1010
|
-
*
|
|
1011
|
-
*
|
|
1012
|
-
* resolution. A fill or text does not change over time (a clip animates it
|
|
1013
|
-
* 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.
|
|
1014
1035
|
*/
|
|
1015
1036
|
export type Generator = {
|
|
1016
1037
|
/**
|
|
@@ -1027,10 +1048,8 @@ export type Generator = {
|
|
|
1027
1048
|
*/
|
|
1028
1049
|
readonly items: readonly ShapeItem[];
|
|
1029
1050
|
/**
|
|
1030
|
-
* Shapes drawn from an ordered content tree, as an After Effects shape
|
|
1031
|
-
*
|
|
1032
|
-
* generators, its picture changes over time: every value in the tree
|
|
1033
|
-
* 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.
|
|
1034
1053
|
*/
|
|
1035
1054
|
readonly type: "shapes";
|
|
1036
1055
|
} | {
|
|
@@ -1040,15 +1059,13 @@ export type Generator = {
|
|
|
1040
1059
|
*/
|
|
1041
1060
|
readonly style?: TextStyle;
|
|
1042
1061
|
/**
|
|
1043
|
-
* The text; `\n` starts a line. Non-empty, at most
|
|
1044
|
-
* `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.
|
|
1045
1064
|
*/
|
|
1046
|
-
readonly text:
|
|
1065
|
+
readonly text: TextContent;
|
|
1047
1066
|
/**
|
|
1048
|
-
* Text on a transparent picture, laid out and placed by its style as
|
|
1049
|
-
*
|
|
1050
|
-
* the canvas, its anchor at `style.position`. The engine draws it with
|
|
1051
|
-
* 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.
|
|
1052
1069
|
*/
|
|
1053
1070
|
readonly type: "text";
|
|
1054
1071
|
} | {
|
|
@@ -1057,10 +1074,8 @@ export type Generator = {
|
|
|
1057
1074
|
*/
|
|
1058
1075
|
readonly root: LayoutNode;
|
|
1059
1076
|
/**
|
|
1060
|
-
* Boxes laid out by CSS flexbox around their text and shapes.
|
|
1061
|
-
*
|
|
1062
|
-
* in the picture's time. The engine lays it out with the fonts it
|
|
1063
|
-
* 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`.
|
|
1064
1079
|
*/
|
|
1065
1080
|
readonly type: "layout";
|
|
1066
1081
|
};
|
|
@@ -1101,9 +1116,8 @@ export type Insets = number | string | {
|
|
|
1101
1116
|
/**
|
|
1102
1117
|
* Interpolation from one keyframe to the next.
|
|
1103
1118
|
*
|
|
1104
|
-
* Values
|
|
1105
|
-
*
|
|
1106
|
-
* 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.
|
|
1107
1121
|
*/
|
|
1108
1122
|
export type Interpolation = {
|
|
1109
1123
|
/**
|
|
@@ -1138,8 +1152,7 @@ export type Interpolation = {
|
|
|
1138
1152
|
readonly y2: number;
|
|
1139
1153
|
};
|
|
1140
1154
|
/**
|
|
1141
|
-
* Where children lie along a container's main axis, or a grid's columns in
|
|
1142
|
-
* it.
|
|
1155
|
+
* Where children lie along a container's main axis, or a grid's columns in it.
|
|
1143
1156
|
*/
|
|
1144
1157
|
export type JustifyContent = "start" | "center" | "end" | "space_between" | "space_around" | "space_evenly";
|
|
1145
1158
|
/**
|
|
@@ -1151,10 +1164,8 @@ export interface Keyframe<T> {
|
|
|
1151
1164
|
*/
|
|
1152
1165
|
readonly interpolation: Interpolation;
|
|
1153
1166
|
/**
|
|
1154
|
-
* Timestamp of this value
|
|
1155
|
-
*
|
|
1156
|
-
* shapes or layout generator's tree, which is keyed in its picture's
|
|
1157
|
-
* 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.
|
|
1158
1169
|
*/
|
|
1159
1170
|
readonly time: MediaTime;
|
|
1160
1171
|
/**
|
|
@@ -1176,9 +1187,8 @@ export interface LayoutBorder {
|
|
|
1176
1187
|
readonly width: Animated<LayoutSize>;
|
|
1177
1188
|
}
|
|
1178
1189
|
/**
|
|
1179
|
-
* Where an absolute box lies in its parent's padding box. A missing side is
|
|
1180
|
-
*
|
|
1181
|
-
* 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.
|
|
1182
1192
|
*/
|
|
1183
1193
|
export interface LayoutInset {
|
|
1184
1194
|
/**
|
|
@@ -1205,27 +1215,24 @@ export type LayoutLength = number | string;
|
|
|
1205
1215
|
/**
|
|
1206
1216
|
* One box of a layout tree.
|
|
1207
1217
|
*
|
|
1208
|
-
* A box lays its children out by flexbox (
|
|
1209
|
-
*
|
|
1210
|
-
*
|
|
1211
|
-
*
|
|
1212
|
-
* then its content. Boxes are drawn in document order; a reversed
|
|
1213
|
-
* 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.
|
|
1214
1222
|
*/
|
|
1215
1223
|
export interface LayoutNode {
|
|
1216
1224
|
/**
|
|
1217
|
-
* Where lines of a wrapping flex container, or a grid's rows, lie
|
|
1218
|
-
*
|
|
1225
|
+
* Where lines of a wrapping flex container, or a grid's rows, lie across the container.
|
|
1226
|
+
* Default `stretch`.
|
|
1219
1227
|
*/
|
|
1220
1228
|
readonly align_content?: AlignContent | null;
|
|
1221
1229
|
/**
|
|
1222
|
-
* Where children lie across the main axis, or in their grid areas'
|
|
1223
|
-
* rows. Default `stretch`.
|
|
1230
|
+
* Where children lie across the main axis, or in their grid areas' rows. Default `stretch`.
|
|
1224
1231
|
*/
|
|
1225
1232
|
readonly align_items?: AlignItems | null;
|
|
1226
1233
|
/**
|
|
1227
|
-
* Where the box lies across its flex container's main axis, or in its
|
|
1228
|
-
*
|
|
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`.
|
|
1229
1236
|
*/
|
|
1230
1237
|
readonly align_self?: AlignItems | null;
|
|
1231
1238
|
/**
|
|
@@ -1233,8 +1240,8 @@ export interface LayoutNode {
|
|
|
1233
1240
|
*/
|
|
1234
1241
|
readonly aspect_ratio?: number | null;
|
|
1235
1242
|
/**
|
|
1236
|
-
* What covers the border box, rounded by `border_radius`. Positions
|
|
1237
|
-
*
|
|
1243
|
+
* What covers the border box, rounded by `border_radius`. Positions are normalized to the
|
|
1244
|
+
* border box.
|
|
1238
1245
|
*/
|
|
1239
1246
|
readonly background?: Animated<Paint> | null;
|
|
1240
1247
|
/**
|
|
@@ -1242,28 +1249,27 @@ export interface LayoutNode {
|
|
|
1242
1249
|
*/
|
|
1243
1250
|
readonly border?: LayoutBorder | null;
|
|
1244
1251
|
/**
|
|
1245
|
-
* The corner radius of the border box. At least 0; default 0.
|
|
1246
|
-
*
|
|
1252
|
+
* The corner radius of the border box. At least 0; default 0. Capped at half the box's
|
|
1253
|
+
* shorter side.
|
|
1247
1254
|
*/
|
|
1248
1255
|
readonly border_radius?: Animated<LayoutSize> | null;
|
|
1249
1256
|
/**
|
|
1250
|
-
* Boxes laid out in this one, in document (and paint) order. Not with
|
|
1251
|
-
* `text` or `shape`.
|
|
1257
|
+
* Boxes laid out in this one, in document (and paint) order. Not with `text` or `shape`.
|
|
1252
1258
|
*/
|
|
1253
1259
|
readonly children?: readonly LayoutNode[];
|
|
1254
|
-
/**
|
|
1255
|
-
* Text color. Inherited; the root's is white.
|
|
1256
|
-
*/
|
|
1257
|
-
readonly color?: Rgba | null;
|
|
1258
1260
|
/**
|
|
1259
1261
|
* Space between columns, in place of `gap`. At least 0.
|
|
1260
1262
|
*/
|
|
1261
1263
|
readonly column_gap?: Animated<LayoutSize> | null;
|
|
1262
1264
|
/**
|
|
1263
|
-
* How the box lays its children out. Default `flex`.
|
|
1264
|
-
* 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.
|
|
1265
1267
|
*/
|
|
1266
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;
|
|
1267
1273
|
/**
|
|
1268
1274
|
* The main size before growing and shrinking. `None` is auto.
|
|
1269
1275
|
*/
|
|
@@ -1273,34 +1279,32 @@ export interface LayoutNode {
|
|
|
1273
1279
|
*/
|
|
1274
1280
|
readonly flex_direction?: FlexDirection | null;
|
|
1275
1281
|
/**
|
|
1276
|
-
* How much of a flex container's free space the box takes. At least
|
|
1277
|
-
*
|
|
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.
|
|
1278
1284
|
*/
|
|
1279
1285
|
readonly flex_grow?: Animated<number> | null;
|
|
1280
1286
|
/**
|
|
1281
|
-
* How much the box gives up when a flex container's space runs short.
|
|
1282
|
-
*
|
|
1287
|
+
* How much the box gives up when a flex container's space runs short. At least 0; default
|
|
1288
|
+
* 1.
|
|
1283
1289
|
*/
|
|
1284
1290
|
readonly flex_shrink?: Animated<number> | null;
|
|
1285
1291
|
/**
|
|
1286
|
-
* Whether a flex container's children wrap onto more lines. Default
|
|
1287
|
-
* `nowrap`.
|
|
1292
|
+
* Whether a flex container's children wrap onto more lines. Default `nowrap`.
|
|
1288
1293
|
*/
|
|
1289
1294
|
readonly flex_wrap?: FlexWrap | null;
|
|
1290
1295
|
/**
|
|
1291
|
-
* The family the box's text draws in, as a text style's
|
|
1292
|
-
*
|
|
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.
|
|
1293
1298
|
*/
|
|
1294
1299
|
readonly font_family?: string | null;
|
|
1295
1300
|
/**
|
|
1296
|
-
* Font size: positive, at most `MAX_LAYOUT_FONT_SIZE` of the
|
|
1297
|
-
*
|
|
1301
|
+
* Font size: positive, at most `MAX_LAYOUT_FONT_SIZE` of the picture's shorter side.
|
|
1302
|
+
* Inherited; the root's is 0.05.
|
|
1298
1303
|
*/
|
|
1299
1304
|
readonly font_size?: Animated<LayoutSize> | null;
|
|
1300
1305
|
/**
|
|
1301
|
-
* The weight
|
|
1302
|
-
*
|
|
1303
|
-
* animated. Inherited; the root's is 400.
|
|
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.
|
|
1304
1308
|
*/
|
|
1305
1309
|
readonly font_weight?: number | null;
|
|
1306
1310
|
/**
|
|
@@ -1320,8 +1324,8 @@ export interface LayoutNode {
|
|
|
1320
1324
|
*/
|
|
1321
1325
|
readonly grid_auto_rows?: TrackList | null;
|
|
1322
1326
|
/**
|
|
1323
|
-
* The box's columns in its grid, as CSS writes them (`2`, `"1 / 3"`,
|
|
1324
|
-
* `
|
|
1327
|
+
* The box's columns in its grid, as CSS writes them (`2`, `"1 / 3"`, `"span 2"`). Default
|
|
1328
|
+
* `auto`.
|
|
1325
1329
|
*/
|
|
1326
1330
|
readonly grid_column?: GridPlacement | null;
|
|
1327
1331
|
/**
|
|
@@ -1346,38 +1350,30 @@ export interface LayoutNode {
|
|
|
1346
1350
|
*/
|
|
1347
1351
|
readonly inset?: LayoutInset | null;
|
|
1348
1352
|
/**
|
|
1349
|
-
* Where children lie along the main (
|
|
1350
|
-
* `start`.
|
|
1353
|
+
* Where children lie along the main (for a grid, inline) axis. Default `start`.
|
|
1351
1354
|
*/
|
|
1352
1355
|
readonly justify_content?: JustifyContent | null;
|
|
1353
1356
|
/**
|
|
1354
|
-
* Where a grid's children lie in their grid areas' columns. Default
|
|
1355
|
-
* `stretch`.
|
|
1357
|
+
* Where a grid's children lie in their grid areas' columns. Default `stretch`.
|
|
1356
1358
|
*/
|
|
1357
1359
|
readonly justify_items?: AlignItems | null;
|
|
1358
1360
|
/**
|
|
1359
|
-
* Where the box lies in its grid area's column. `None` follows the
|
|
1360
|
-
*
|
|
1361
|
-
* 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.
|
|
1362
1363
|
*/
|
|
1363
1364
|
readonly justify_self?: AlignItems | null;
|
|
1364
1365
|
/**
|
|
1365
|
-
* Space after each character, as a fraction of the font size, in
|
|
1366
|
-
*
|
|
1367
|
-
* last character, and none after a character of a cursive script.
|
|
1368
|
-
* Not animated. Inherited; the root's is 0.
|
|
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.
|
|
1369
1368
|
*/
|
|
1370
1369
|
readonly letter_spacing?: number | null;
|
|
1371
1370
|
/**
|
|
1372
|
-
* Baseline-to-baseline distance in font sizes, in `[0.5, 3]
|
|
1373
|
-
*
|
|
1374
|
-
* is centred in its line when the line is taller than an em.
|
|
1375
|
-
* Inherited; the root's is 1.2.
|
|
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.
|
|
1376
1373
|
*/
|
|
1377
1374
|
readonly line_height?: number | null;
|
|
1378
1375
|
/**
|
|
1379
|
-
* Space outside the border, written as `padding` is. Sides may be
|
|
1380
|
-
* negative; there is no `auto`.
|
|
1376
|
+
* Space outside the border, written as `padding` is. Sides may be negative; no `auto`.
|
|
1381
1377
|
*/
|
|
1382
1378
|
readonly margin?: Animated<Insets> | null;
|
|
1383
1379
|
/**
|
|
@@ -1397,22 +1393,16 @@ export interface LayoutNode {
|
|
|
1397
1393
|
*/
|
|
1398
1394
|
readonly min_width?: Animated<LayoutLength> | null;
|
|
1399
1395
|
/**
|
|
1400
|
-
* Opacity of the box and everything in it
|
|
1401
|
-
* 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.
|
|
1402
1397
|
*/
|
|
1403
1398
|
readonly opacity?: Animated<number> | null;
|
|
1404
|
-
/**
|
|
1405
|
-
* A band around the glyphs; its width a fraction of the font size.
|
|
1406
|
-
* Inherited; the root has none.
|
|
1407
|
-
*/
|
|
1408
|
-
readonly outline?: TextOutline | null;
|
|
1409
1399
|
/**
|
|
1410
1400
|
* Whether content past the padding box is drawn. Default `visible`.
|
|
1411
1401
|
*/
|
|
1412
1402
|
readonly overflow?: Overflow | null;
|
|
1413
1403
|
/**
|
|
1414
|
-
* Space inside the border: a length, the CSS shorthand
|
|
1415
|
-
*
|
|
1404
|
+
* Space inside the border: a length, the CSS shorthand (`"8px 16px"`), or the sides object.
|
|
1405
|
+
* Sides at least 0; default 0.
|
|
1416
1406
|
*/
|
|
1417
1407
|
readonly padding?: Animated<Insets> | null;
|
|
1418
1408
|
/**
|
|
@@ -1420,45 +1410,57 @@ export interface LayoutNode {
|
|
|
1420
1410
|
*/
|
|
1421
1411
|
readonly position?: Position | null;
|
|
1422
1412
|
/**
|
|
1423
|
-
* Clockwise rotation of the box and everything in it about its
|
|
1424
|
-
*
|
|
1413
|
+
* Clockwise rotation of the box and everything in it about its border-box centre, in
|
|
1414
|
+
* degrees, after layout.
|
|
1425
1415
|
*/
|
|
1426
1416
|
readonly rotation_degrees?: Animated<number> | null;
|
|
1427
1417
|
/**
|
|
1428
|
-
* Space between rows (
|
|
1429
|
-
*
|
|
1418
|
+
* Space between rows (or lines of a wrapping row flex container), in place of `gap`. At
|
|
1419
|
+
* least 0.
|
|
1430
1420
|
*/
|
|
1431
1421
|
readonly row_gap?: Animated<LayoutSize> | null;
|
|
1432
1422
|
/**
|
|
1433
|
-
* Per-axis scale of the box and everything in it about its border-box
|
|
1434
|
-
* centre, after layout.
|
|
1423
|
+
* Per-axis scale of the box and everything in it about its border-box centre, after layout.
|
|
1435
1424
|
*/
|
|
1436
1425
|
readonly scale?: Animated<Vec2> | null;
|
|
1437
1426
|
/**
|
|
1438
|
-
*
|
|
1439
|
-
* `
|
|
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`.
|
|
1440
1434
|
*/
|
|
1441
1435
|
readonly shape?: LayoutShape | null;
|
|
1442
1436
|
/**
|
|
1443
|
-
*
|
|
1444
|
-
*
|
|
1445
|
-
|
|
1446
|
-
|
|
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`.
|
|
1447
1445
|
*/
|
|
1448
1446
|
readonly text?: Animated<string> | null;
|
|
1449
1447
|
/**
|
|
1450
|
-
* How lines align within the content width. Inherited; the root's is
|
|
1451
|
-
* `start`.
|
|
1448
|
+
* How lines align within the content width. Inherited; the root's is `start`.
|
|
1452
1449
|
*/
|
|
1453
1450
|
readonly text_align?: TextAlign | null;
|
|
1454
1451
|
/**
|
|
1455
|
-
*
|
|
1456
|
-
*
|
|
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.
|
|
1457
1460
|
*/
|
|
1458
1461
|
readonly translate?: Animated<LayoutOffset> | null;
|
|
1459
1462
|
/**
|
|
1460
|
-
* Border-box width. `None` is auto.
|
|
1461
|
-
* field.
|
|
1463
|
+
* Border-box width. `None` is auto. Like every item field, not on the root.
|
|
1462
1464
|
*/
|
|
1463
1465
|
readonly width?: Animated<LayoutLength> | null;
|
|
1464
1466
|
}
|
|
@@ -1470,10 +1472,8 @@ export type LayoutOffset = string | {
|
|
|
1470
1472
|
readonly y: LayoutSize;
|
|
1471
1473
|
};
|
|
1472
1474
|
/**
|
|
1473
|
-
* A box's shapes, drawn as a shapes generator draws its items on a picture
|
|
1474
|
-
*
|
|
1475
|
-
* lengths fractions of its shorter side. A shape box has no size of its
|
|
1476
|
-
* 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.
|
|
1477
1477
|
*/
|
|
1478
1478
|
export interface LayoutShape {
|
|
1479
1479
|
/**
|
|
@@ -1507,8 +1507,7 @@ export type LineCap = "butt" | "round" | "square";
|
|
|
1507
1507
|
*/
|
|
1508
1508
|
export type LineJoin = "miter" | "round" | "bevel";
|
|
1509
1509
|
/**
|
|
1510
|
-
* Named RGB primaries linear-light media may be in, each with its own white
|
|
1511
|
-
* point.
|
|
1510
|
+
* Named RGB primaries linear-light media may be in, each with its own white point.
|
|
1512
1511
|
*/
|
|
1513
1512
|
export type LinearPrimaries = "bt709" | "bt2020" | "p3_d65" | "aces_ap0" | "aces_ap1";
|
|
1514
1513
|
/**
|
|
@@ -1518,8 +1517,8 @@ export type LoopMode = "repeat" | "ping_pong";
|
|
|
1518
1517
|
/**
|
|
1519
1518
|
* How a mask combines with the coverage of the masks before it.
|
|
1520
1519
|
*
|
|
1521
|
-
* Coverage starts empty when the first mask adds
|
|
1522
|
-
*
|
|
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.
|
|
1523
1522
|
*/
|
|
1524
1523
|
export type MaskMode = "add" | "subtract" | "intersect";
|
|
1525
1524
|
/**
|
|
@@ -1527,8 +1526,8 @@ export type MaskMode = "add" | "subtract" | "intersect";
|
|
|
1527
1526
|
*/
|
|
1528
1527
|
export interface MasterAudio {
|
|
1529
1528
|
/**
|
|
1530
|
-
* Ordered single-input effects applied to the summed track buses, at
|
|
1531
|
-
*
|
|
1529
|
+
* Ordered single-input effects applied to the summed track buses, at most
|
|
1530
|
+
* `MAX_CHAIN_EFFECTS`.
|
|
1532
1531
|
*
|
|
1533
1532
|
* @defaultValue `[]`
|
|
1534
1533
|
*/
|
|
@@ -1540,8 +1539,8 @@ export interface MasterAudio {
|
|
|
1540
1539
|
*/
|
|
1541
1540
|
readonly gain?: Animated<number>;
|
|
1542
1541
|
/**
|
|
1543
|
-
* Final peak limiter.
|
|
1544
|
-
*
|
|
1542
|
+
* Final peak limiter. Omitted means `Limiter::default`; an explicit `null` leaves the mix
|
|
1543
|
+
* unlimited.
|
|
1545
1544
|
*
|
|
1546
1545
|
* @defaultValue `{"release_ms":50,"threshold":1}`
|
|
1547
1546
|
*/
|
|
@@ -1550,9 +1549,8 @@ export interface MasterAudio {
|
|
|
1550
1549
|
/**
|
|
1551
1550
|
* Another visual clip whose picture sets where this clip is visible.
|
|
1552
1551
|
*
|
|
1553
|
-
* The matte clip is drawn, with its own transform and effects, only into the
|
|
1554
|
-
*
|
|
1555
|
-
* 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.
|
|
1556
1554
|
*/
|
|
1557
1555
|
export interface Matte {
|
|
1558
1556
|
/**
|
|
@@ -1569,11 +1567,10 @@ export interface Matte {
|
|
|
1569
1567
|
*/
|
|
1570
1568
|
export type MatteMode = "alpha" | "alpha_inverted" | "luma" | "luma_inverted";
|
|
1571
1569
|
/**
|
|
1572
|
-
* Evidence of a source's media, each part recorded only when
|
|
1570
|
+
* Evidence of a source's media, each part recorded only when known.
|
|
1573
1571
|
*
|
|
1574
|
-
* A matching content hash proves the same bytes
|
|
1575
|
-
*
|
|
1576
|
-
* 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.
|
|
1577
1574
|
*/
|
|
1578
1575
|
export interface MediaFingerprint {
|
|
1579
1576
|
/**
|
|
@@ -1589,10 +1586,8 @@ export interface MediaFingerprint {
|
|
|
1589
1586
|
*/
|
|
1590
1587
|
readonly content_sha256?: string | null;
|
|
1591
1588
|
/**
|
|
1592
|
-
* Where the media ends on its own timeline, in ticks:
|
|
1593
|
-
*
|
|
1594
|
-
* it. A transport stream that starts at 1.4 s and lasts 2 s ends at
|
|
1595
|
-
* 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.
|
|
1596
1591
|
*/
|
|
1597
1592
|
readonly duration_ticks?: number | null;
|
|
1598
1593
|
/**
|
|
@@ -1613,43 +1608,35 @@ export type MediaKind = "video" | "audio" | "image" | "generated" | "composition
|
|
|
1613
1608
|
*/
|
|
1614
1609
|
export interface MediaSource {
|
|
1615
1610
|
/**
|
|
1616
|
-
* The color a `MediaKind::Video` source's pictures are in,
|
|
1617
|
-
*
|
|
1618
|
-
*
|
|
1619
|
-
* missing or wrong tags. `None` leaves the tags in charge. A still is
|
|
1620
|
-
* 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.
|
|
1621
1614
|
*
|
|
1622
1615
|
* @defaultValue `null`
|
|
1623
1616
|
*/
|
|
1624
1617
|
readonly color_metadata?: ColorMetadata | null;
|
|
1625
1618
|
/**
|
|
1626
|
-
* The composition a `MediaKind::Composition` source shows; present
|
|
1627
|
-
* exactly for that kind.
|
|
1619
|
+
* The composition a `MediaKind::Composition` source shows; present exactly for that kind.
|
|
1628
1620
|
*/
|
|
1629
1621
|
readonly composition?: CompositionId | null;
|
|
1630
1622
|
/**
|
|
1631
|
-
* What the host found at the locator when the project recorded it, so
|
|
1632
|
-
*
|
|
1633
|
-
* 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.
|
|
1634
1625
|
*/
|
|
1635
1626
|
readonly fingerprint?: MediaFingerprint | null;
|
|
1636
1627
|
/**
|
|
1637
|
-
* What a `MediaKind::Generated` source draws; present exactly for
|
|
1638
|
-
* that kind.
|
|
1628
|
+
* What a `MediaKind::Generated` source draws; present exactly for that kind.
|
|
1639
1629
|
*
|
|
1640
1630
|
* @defaultValue `null`
|
|
1641
1631
|
*/
|
|
1642
1632
|
readonly generator?: Generator | null;
|
|
1643
1633
|
/**
|
|
1644
|
-
* Whether
|
|
1645
|
-
*
|
|
1646
|
-
*
|
|
1647
|
-
* and plays the source silent; the document keeps the stream for the
|
|
1648
|
-
* 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.
|
|
1649
1637
|
*
|
|
1650
|
-
* `MediaKind::Audio` always does. A `MediaKind::Video` source
|
|
1651
|
-
*
|
|
1652
|
-
* 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.
|
|
1653
1640
|
*
|
|
1654
1641
|
* @defaultValue `false`
|
|
1655
1642
|
*/
|
|
@@ -1663,16 +1650,15 @@ export interface MediaSource {
|
|
|
1663
1650
|
*/
|
|
1664
1651
|
readonly kind: MediaKind;
|
|
1665
1652
|
/**
|
|
1666
|
-
* Opaque URI or host locator
|
|
1667
|
-
*
|
|
1668
|
-
* `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.
|
|
1669
1655
|
*
|
|
1670
1656
|
* @defaultValue `""`
|
|
1671
1657
|
*/
|
|
1672
1658
|
readonly locator?: string;
|
|
1673
1659
|
/**
|
|
1674
|
-
* The extension provider that
|
|
1675
|
-
*
|
|
1660
|
+
* The extension provider and settings that supply this source's media when the host's own
|
|
1661
|
+
* decoders do not read it.
|
|
1676
1662
|
*/
|
|
1677
1663
|
readonly provider?: ProviderSource | null;
|
|
1678
1664
|
}
|
|
@@ -1714,14 +1700,12 @@ export type NodeId = string;
|
|
|
1714
1700
|
/**
|
|
1715
1701
|
* The operation of a `CompositionNode`.
|
|
1716
1702
|
*
|
|
1717
|
-
* Animated settings are keyed in composition time (see
|
|
1718
|
-
* `ClipComposition`), not timeline time.
|
|
1703
|
+
* Animated settings are keyed in composition time (see `ClipComposition`).
|
|
1719
1704
|
*/
|
|
1720
1705
|
export type NodeOp = {
|
|
1721
1706
|
/**
|
|
1722
|
-
* The picture of the clip showing the composition: its source at the
|
|
1723
|
-
*
|
|
1724
|
-
* 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.
|
|
1725
1709
|
*/
|
|
1726
1710
|
readonly type: "clip";
|
|
1727
1711
|
} | {
|
|
@@ -1736,8 +1720,8 @@ export type NodeOp = {
|
|
|
1736
1720
|
*/
|
|
1737
1721
|
readonly start?: MediaTime;
|
|
1738
1722
|
/**
|
|
1739
|
-
* Another visual source, read at `start` plus the composition time.
|
|
1740
|
-
*
|
|
1723
|
+
* Another visual source, read at `start` plus the composition time. Adds no sound to the
|
|
1724
|
+
* mix.
|
|
1741
1725
|
*/
|
|
1742
1726
|
readonly type: "media";
|
|
1743
1727
|
} | {
|
|
@@ -1761,16 +1745,13 @@ export type NodeOp = {
|
|
|
1761
1745
|
*/
|
|
1762
1746
|
readonly input?: NodeId | null;
|
|
1763
1747
|
/**
|
|
1764
|
-
* The images the effect samples besides its input, by the names its
|
|
1765
|
-
*
|
|
1766
|
-
*
|
|
1767
|
-
* one it declares and this leaves out, fails the frames that draw
|
|
1768
|
-
* 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.
|
|
1769
1751
|
*/
|
|
1770
1752
|
readonly inputs?: Readonly<Record<string, NodeId | null>>;
|
|
1771
1753
|
/**
|
|
1772
|
-
* A registered effect: its input
|
|
1773
|
-
* besides.
|
|
1754
|
+
* A registered effect: its input plus any named images it samples.
|
|
1774
1755
|
*/
|
|
1775
1756
|
readonly type: "effect";
|
|
1776
1757
|
} | {
|
|
@@ -1853,8 +1834,8 @@ export type NodeOp = {
|
|
|
1853
1834
|
*/
|
|
1854
1835
|
readonly input?: NodeId | null;
|
|
1855
1836
|
/**
|
|
1856
|
-
* The shapes, combined in order; at most `MAX_CLIP_MASKS`.
|
|
1857
|
-
*
|
|
1837
|
+
* The shapes, combined in order; at most `MAX_CLIP_MASKS`. Geometry is in the
|
|
1838
|
+
* input image's normalized space.
|
|
1858
1839
|
*/
|
|
1859
1840
|
readonly masks: readonly ShapeMask[];
|
|
1860
1841
|
/**
|
|
@@ -1867,8 +1848,8 @@ export type NodeOp = {
|
|
|
1867
1848
|
*/
|
|
1868
1849
|
readonly composition: CompositionId;
|
|
1869
1850
|
/**
|
|
1870
|
-
* Values for its controls, by name;
|
|
1871
|
-
*
|
|
1851
|
+
* Values for its controls, by name; unset controls keep the composition's own value. Keyed
|
|
1852
|
+
* in composition time.
|
|
1872
1853
|
*/
|
|
1873
1854
|
readonly controls?: Readonly<Record<string, Animated<EffectValue>>>;
|
|
1874
1855
|
/**
|
|
@@ -1878,9 +1859,8 @@ export type NodeOp = {
|
|
|
1878
1859
|
*/
|
|
1879
1860
|
readonly inputs?: readonly (NodeId | null)[];
|
|
1880
1861
|
/**
|
|
1881
|
-
* Another composition drawn in this one's time
|
|
1882
|
-
*
|
|
1883
|
-
* 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`.
|
|
1884
1864
|
*/
|
|
1885
1865
|
readonly type: "group";
|
|
1886
1866
|
} | {
|
|
@@ -1889,8 +1869,7 @@ export type NodeOp = {
|
|
|
1889
1869
|
*/
|
|
1890
1870
|
readonly index: number;
|
|
1891
1871
|
/**
|
|
1892
|
-
* In a composition used as a group, the image the group node gives its
|
|
1893
|
-
* input `index`.
|
|
1872
|
+
* In a composition used as a group, the image the group node gives its input `index`.
|
|
1894
1873
|
*/
|
|
1895
1874
|
readonly type: "group_input";
|
|
1896
1875
|
};
|
|
@@ -1901,13 +1880,9 @@ export type Overflow = "visible" | "hidden";
|
|
|
1901
1880
|
/**
|
|
1902
1881
|
* A color or gradient.
|
|
1903
1882
|
*
|
|
1904
|
-
* Gradients interpolate
|
|
1905
|
-
*
|
|
1906
|
-
*
|
|
1907
|
-
* its neighbour.
|
|
1908
|
-
*
|
|
1909
|
-
* A color (hex or object) is read as a solid paint of it; a paint is
|
|
1910
|
-
* 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.
|
|
1911
1886
|
*/
|
|
1912
1887
|
export type Paint = {
|
|
1913
1888
|
/**
|
|
@@ -1947,8 +1922,8 @@ export type Paint = {
|
|
|
1947
1922
|
*/
|
|
1948
1923
|
readonly center: Vec2;
|
|
1949
1924
|
/**
|
|
1950
|
-
* The distance of offset 1 from the centre, as a fraction of the
|
|
1951
|
-
*
|
|
1925
|
+
* The distance of offset 1 from the centre, as a fraction of the picture's shorter side.
|
|
1926
|
+
* Positive.
|
|
1952
1927
|
*/
|
|
1953
1928
|
readonly radius: number;
|
|
1954
1929
|
/**
|
|
@@ -1990,15 +1965,15 @@ export type Paint = {
|
|
|
1990
1965
|
*/
|
|
1991
1966
|
export interface Path {
|
|
1992
1967
|
/**
|
|
1993
|
-
* The subpaths, at most `MAX_PATH_SUBPATHS`, with at most
|
|
1994
|
-
*
|
|
1968
|
+
* The subpaths, at most `MAX_PATH_SUBPATHS`, with at most `MAX_PATH_VERTICES` vertices
|
|
1969
|
+
* in total.
|
|
1995
1970
|
*/
|
|
1996
1971
|
readonly subpaths: readonly Subpath[];
|
|
1997
1972
|
}
|
|
1998
1973
|
/**
|
|
1999
|
-
* A path vertex and its tangents. The segment from
|
|
2000
|
-
* `
|
|
2001
|
-
*
|
|
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.
|
|
2002
1977
|
*/
|
|
2003
1978
|
export interface PathVertex {
|
|
2004
1979
|
/**
|
|
@@ -2023,18 +1998,16 @@ export interface PathVertex {
|
|
|
2023
1998
|
*/
|
|
2024
1999
|
export interface PointKeyframe {
|
|
2025
2000
|
/**
|
|
2026
|
-
* The
|
|
2027
|
-
* to this value: that curve's second control point.
|
|
2001
|
+
* The curve's second control point from the previous keyframe, relative to this value.
|
|
2028
2002
|
*/
|
|
2029
2003
|
readonly in_tangent?: Vec2;
|
|
2030
2004
|
/**
|
|
2031
|
-
* Interpolation from this keyframe to its successor: how fast the value
|
|
2032
|
-
*
|
|
2005
|
+
* Interpolation from this keyframe to its successor: how fast the value travels along the
|
|
2006
|
+
* way.
|
|
2033
2007
|
*/
|
|
2034
2008
|
readonly interpolation: Interpolation;
|
|
2035
2009
|
/**
|
|
2036
|
-
* The
|
|
2037
|
-
* value: the curve's first control point.
|
|
2010
|
+
* The curve's first control point toward the next keyframe, relative to this value.
|
|
2038
2011
|
*/
|
|
2039
2012
|
readonly out_tangent?: Vec2;
|
|
2040
2013
|
/**
|
|
@@ -2063,17 +2036,14 @@ export type ProjectId = string;
|
|
|
2063
2036
|
*/
|
|
2064
2037
|
export interface ProjectSettings {
|
|
2065
2038
|
/**
|
|
2066
|
-
* Opaque color under every layer, in preview and export alike
|
|
2067
|
-
*
|
|
2068
|
-
* Empty canvas, and whatever shows through a translucent layer, is this
|
|
2069
|
-
* 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.
|
|
2070
2041
|
*
|
|
2071
2042
|
* @defaultValue `{"blue":0,"green":0,"red":0}`
|
|
2072
2043
|
*/
|
|
2073
2044
|
readonly background?: Rgb;
|
|
2074
2045
|
/**
|
|
2075
|
-
* The space in which clips' blend modes are evaluated, in preview and
|
|
2076
|
-
* export alike.
|
|
2046
|
+
* The space in which clips' blend modes are evaluated, in preview and export alike.
|
|
2077
2047
|
*
|
|
2078
2048
|
* @defaultValue `"linear_light"`
|
|
2079
2049
|
*/
|
|
@@ -2089,8 +2059,8 @@ export interface ProjectSettings {
|
|
|
2089
2059
|
*/
|
|
2090
2060
|
readonly frame_rate: FrameRate;
|
|
2091
2061
|
/**
|
|
2092
|
-
* Canvas height in output pixels, at most `MAX_CANVAS_DIMENSION`. The
|
|
2093
|
-
*
|
|
2062
|
+
* Canvas height in output pixels, at most `MAX_CANVAS_DIMENSION`. The canvas area is at
|
|
2063
|
+
* most `MAX_CANVAS_PIXELS`.
|
|
2094
2064
|
*/
|
|
2095
2065
|
readonly height: number;
|
|
2096
2066
|
/**
|
|
@@ -2103,41 +2073,37 @@ export interface ProjectSettings {
|
|
|
2103
2073
|
readonly width: number;
|
|
2104
2074
|
}
|
|
2105
2075
|
/**
|
|
2106
|
-
* A source whose media an extension provider supplies
|
|
2107
|
-
*
|
|
2076
|
+
* A source whose media an extension provider supplies instead of the host's video and image
|
|
2077
|
+
* decoders.
|
|
2108
2078
|
*
|
|
2109
|
-
* A host picks the provider by probing the bytes at import, never by
|
|
2110
|
-
*
|
|
2111
|
-
* host opens the source the same way. The engine does not read it: a
|
|
2112
|
-
* 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.
|
|
2113
2081
|
*/
|
|
2114
2082
|
export type ProviderSource = {
|
|
2115
2083
|
/**
|
|
2116
|
-
* A static SVG document, rasterized at
|
|
2117
|
-
* source's kind is `image`.
|
|
2084
|
+
* A static SVG document, rasterized at its shown size. The source's kind is `image`.
|
|
2118
2085
|
*/
|
|
2119
2086
|
readonly format: "svg";
|
|
2120
2087
|
} | {
|
|
2121
2088
|
/**
|
|
2122
|
-
* A GIF, animated WebP, or APNG: one cycle of frames, each with its own
|
|
2123
|
-
*
|
|
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`.
|
|
2124
2091
|
*/
|
|
2125
2092
|
readonly format: "animated_image";
|
|
2126
2093
|
} | {
|
|
2127
2094
|
/**
|
|
2128
|
-
* The dotLottie animation shown, by
|
|
2129
|
-
*
|
|
2095
|
+
* The dotLottie animation shown, by ID. Absent means the package's first; always absent
|
|
2096
|
+
* for a Lottie JSON file.
|
|
2130
2097
|
*/
|
|
2131
2098
|
readonly animation?: string | null;
|
|
2132
2099
|
/**
|
|
2133
|
-
* A Lottie animation
|
|
2134
|
-
*
|
|
2100
|
+
* A Lottie animation (JSON file or dotLottie package), evaluated at its own frames. The
|
|
2101
|
+
* source's kind is `video`.
|
|
2135
2102
|
*/
|
|
2136
2103
|
readonly format: "lottie";
|
|
2137
2104
|
} | {
|
|
2138
2105
|
/**
|
|
2139
|
-
* Still images played in order at a fixed rate. The source's kind is
|
|
2140
|
-
* `video`.
|
|
2106
|
+
* Still images played in order at a fixed rate. The source's kind is `video`.
|
|
2141
2107
|
*/
|
|
2142
2108
|
readonly format: "image_sequence";
|
|
2143
2109
|
/**
|
|
@@ -2145,9 +2111,8 @@ export type ProviderSource = {
|
|
|
2145
2111
|
*/
|
|
2146
2112
|
readonly frame_rate: FrameRate;
|
|
2147
2113
|
/**
|
|
2148
|
-
* Each frame's locator, in play order. `null`
|
|
2149
|
-
*
|
|
2150
|
-
* it.
|
|
2114
|
+
* Each frame's locator, in play order. `null` marks a missing number, allowed only when
|
|
2115
|
+
* `missing` says how to show it.
|
|
2151
2116
|
*/
|
|
2152
2117
|
readonly frames: readonly (string | null)[];
|
|
2153
2118
|
/**
|
|
@@ -2157,8 +2122,8 @@ export type ProviderSource = {
|
|
|
2157
2122
|
*/
|
|
2158
2123
|
readonly missing?: MissingFrames;
|
|
2159
2124
|
/**
|
|
2160
|
-
* The primaries OpenEXR frames' linear RGB
|
|
2161
|
-
*
|
|
2125
|
+
* The primaries of OpenEXR frames' linear RGB, overriding the first frame's
|
|
2126
|
+
* chromaticities. Only for OpenEXR frames.
|
|
2162
2127
|
*/
|
|
2163
2128
|
readonly primaries?: LinearPrimaries | null;
|
|
2164
2129
|
/**
|
|
@@ -2169,20 +2134,26 @@ export type ProviderSource = {
|
|
|
2169
2134
|
readonly start_number?: number;
|
|
2170
2135
|
} | {
|
|
2171
2136
|
/**
|
|
2172
|
-
* A still OpenEXR image: linear-light RGB(A), read at half precision.
|
|
2173
|
-
*
|
|
2137
|
+
* A still OpenEXR image: linear-light RGB(A), read at half precision. The source's kind is
|
|
2138
|
+
* `image`.
|
|
2174
2139
|
*/
|
|
2175
2140
|
readonly format: "exr";
|
|
2176
2141
|
/**
|
|
2177
|
-
* The primaries its linear RGB
|
|
2178
|
-
*
|
|
2179
|
-
* defines).
|
|
2142
|
+
* The primaries of its linear RGB, overriding the file's chromaticities (BT.709 when the
|
|
2143
|
+
* file has none, as OpenEXR defines).
|
|
2180
2144
|
*/
|
|
2181
2145
|
readonly primaries?: LinearPrimaries | null;
|
|
2182
2146
|
};
|
|
2183
2147
|
/**
|
|
2184
|
-
*
|
|
2185
|
-
|
|
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`.
|
|
2186
2157
|
*/
|
|
2187
2158
|
export interface Rgb {
|
|
2188
2159
|
/**
|
|
@@ -2199,12 +2170,10 @@ export interface Rgb {
|
|
|
2199
2170
|
readonly red: number;
|
|
2200
2171
|
}
|
|
2201
2172
|
/**
|
|
2202
|
-
* A straight (not premultiplied), sRGB-encoded color with alpha, each
|
|
2203
|
-
* component in `0..=1`.
|
|
2173
|
+
* A straight (not premultiplied), sRGB-encoded color with alpha, each component in `0..=1`.
|
|
2204
2174
|
*
|
|
2205
|
-
*
|
|
2206
|
-
*
|
|
2207
|
-
* 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.
|
|
2208
2177
|
*/
|
|
2209
2178
|
export type Rgba = {
|
|
2210
2179
|
/**
|
|
@@ -2224,6 +2193,23 @@ export type Rgba = {
|
|
|
2224
2193
|
*/
|
|
2225
2194
|
readonly red: number;
|
|
2226
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
|
+
}
|
|
2227
2213
|
/**
|
|
2228
2214
|
* A geometry alone, as a mask's outline is.
|
|
2229
2215
|
*/
|
|
@@ -2233,8 +2219,8 @@ export type ShapeGeometry = {
|
|
|
2233
2219
|
*/
|
|
2234
2220
|
readonly center: AnimatedPoint;
|
|
2235
2221
|
/**
|
|
2236
|
-
* Corner radius, as a fraction of the shorter side. Non-negative;
|
|
2237
|
-
*
|
|
2222
|
+
* Corner radius, as a fraction of the shorter side. Non-negative; capped at half the
|
|
2223
|
+
* rectangle.
|
|
2238
2224
|
*
|
|
2239
2225
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2240
2226
|
*/
|
|
@@ -2246,8 +2232,8 @@ export type ShapeGeometry = {
|
|
|
2246
2232
|
*/
|
|
2247
2233
|
readonly rotation_degrees?: Animated<number>;
|
|
2248
2234
|
/**
|
|
2249
|
-
* Full width and height
|
|
2250
|
-
*
|
|
2235
|
+
* Full width and height before rotation: x a fraction of the picture's width, y of its
|
|
2236
|
+
* height. Non-negative.
|
|
2251
2237
|
*/
|
|
2252
2238
|
readonly size: Animated<Vec2>;
|
|
2253
2239
|
/**
|
|
@@ -2266,8 +2252,8 @@ export type ShapeGeometry = {
|
|
|
2266
2252
|
*/
|
|
2267
2253
|
readonly rotation_degrees?: Animated<number>;
|
|
2268
2254
|
/**
|
|
2269
|
-
* Full width and height
|
|
2270
|
-
*
|
|
2255
|
+
* Full width and height before rotation: x a fraction of the picture's width, y of its
|
|
2256
|
+
* height. Non-negative.
|
|
2271
2257
|
*/
|
|
2272
2258
|
readonly size: Animated<Vec2>;
|
|
2273
2259
|
/**
|
|
@@ -2296,22 +2282,19 @@ export type ShapeGeometry = {
|
|
|
2296
2282
|
*/
|
|
2297
2283
|
readonly kind: PolystarKind;
|
|
2298
2284
|
/**
|
|
2299
|
-
* Distance of the points from the centre, as a fraction of the shorter
|
|
2300
|
-
* side. Non-negative.
|
|
2285
|
+
* Distance of the points from the centre, as a fraction of the shorter side. Non-negative.
|
|
2301
2286
|
*/
|
|
2302
2287
|
readonly outer_radius: Animated<number>;
|
|
2303
2288
|
/**
|
|
2304
|
-
* How round the outer corners are
|
|
2305
|
-
* them. In `0..=1`.
|
|
2289
|
+
* How round the outer corners are, in `0..=1`: 0 sharp, 1 a smooth curve through them.
|
|
2306
2290
|
*
|
|
2307
2291
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2308
2292
|
*/
|
|
2309
2293
|
readonly outer_roundness?: Animated<number>;
|
|
2310
2294
|
/**
|
|
2311
|
-
* Number of points (corners
|
|
2312
|
-
* `
|
|
2313
|
-
*
|
|
2314
|
-
* 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.
|
|
2315
2298
|
*/
|
|
2316
2299
|
readonly points: Animated<number>;
|
|
2317
2300
|
/**
|
|
@@ -2337,11 +2320,10 @@ export type ShapeGeometry = {
|
|
|
2337
2320
|
/**
|
|
2338
2321
|
* One entry of a shapes generator's content tree.
|
|
2339
2322
|
*
|
|
2340
|
-
* A group is read front to back. Geometry accumulates in its group; a fill
|
|
2341
|
-
*
|
|
2342
|
-
*
|
|
2343
|
-
*
|
|
2344
|
-
* 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.
|
|
2345
2327
|
*/
|
|
2346
2328
|
export type ShapeItem = {
|
|
2347
2329
|
/**
|
|
@@ -2353,9 +2335,8 @@ export type ShapeItem = {
|
|
|
2353
2335
|
*/
|
|
2354
2336
|
readonly transform?: ShapeTransform;
|
|
2355
2337
|
/**
|
|
2356
|
-
* Items drawn together
|
|
2357
|
-
*
|
|
2358
|
-
* 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.
|
|
2359
2340
|
*/
|
|
2360
2341
|
readonly type: "group";
|
|
2361
2342
|
} | {
|
|
@@ -2364,8 +2345,8 @@ export type ShapeItem = {
|
|
|
2364
2345
|
*/
|
|
2365
2346
|
readonly center: AnimatedPoint;
|
|
2366
2347
|
/**
|
|
2367
|
-
* Corner radius, as a fraction of the shorter side. Non-negative;
|
|
2368
|
-
*
|
|
2348
|
+
* Corner radius, as a fraction of the shorter side. Non-negative; capped at half the
|
|
2349
|
+
* rectangle.
|
|
2369
2350
|
*
|
|
2370
2351
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2371
2352
|
*/
|
|
@@ -2377,8 +2358,8 @@ export type ShapeItem = {
|
|
|
2377
2358
|
*/
|
|
2378
2359
|
readonly rotation_degrees?: Animated<number>;
|
|
2379
2360
|
/**
|
|
2380
|
-
* Full width and height
|
|
2381
|
-
*
|
|
2361
|
+
* Full width and height before rotation: x a fraction of the picture's width, y of its
|
|
2362
|
+
* height. Non-negative.
|
|
2382
2363
|
*/
|
|
2383
2364
|
readonly size: Animated<Vec2>;
|
|
2384
2365
|
/**
|
|
@@ -2397,8 +2378,8 @@ export type ShapeItem = {
|
|
|
2397
2378
|
*/
|
|
2398
2379
|
readonly rotation_degrees?: Animated<number>;
|
|
2399
2380
|
/**
|
|
2400
|
-
* Full width and height
|
|
2401
|
-
*
|
|
2381
|
+
* Full width and height before rotation: x a fraction of the picture's width, y of its
|
|
2382
|
+
* height. Non-negative.
|
|
2402
2383
|
*/
|
|
2403
2384
|
readonly size: Animated<Vec2>;
|
|
2404
2385
|
/**
|
|
@@ -2427,22 +2408,19 @@ export type ShapeItem = {
|
|
|
2427
2408
|
*/
|
|
2428
2409
|
readonly kind: PolystarKind;
|
|
2429
2410
|
/**
|
|
2430
|
-
* Distance of the points from the centre, as a fraction of the shorter
|
|
2431
|
-
* side. Non-negative.
|
|
2411
|
+
* Distance of the points from the centre, as a fraction of the shorter side. Non-negative.
|
|
2432
2412
|
*/
|
|
2433
2413
|
readonly outer_radius: Animated<number>;
|
|
2434
2414
|
/**
|
|
2435
|
-
* How round the outer corners are
|
|
2436
|
-
* them. In `0..=1`.
|
|
2415
|
+
* How round the outer corners are, in `0..=1`: 0 sharp, 1 a smooth curve through them.
|
|
2437
2416
|
*
|
|
2438
2417
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2439
2418
|
*/
|
|
2440
2419
|
readonly outer_roundness?: Animated<number>;
|
|
2441
2420
|
/**
|
|
2442
|
-
* Number of points (corners
|
|
2443
|
-
* `
|
|
2444
|
-
*
|
|
2445
|
-
* 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.
|
|
2446
2424
|
*/
|
|
2447
2425
|
readonly points: Animated<number>;
|
|
2448
2426
|
/**
|
|
@@ -2482,9 +2460,8 @@ export type ShapeItem = {
|
|
|
2482
2460
|
*/
|
|
2483
2461
|
readonly rule?: FillRule;
|
|
2484
2462
|
/**
|
|
2485
|
-
* Paints the inside of the geometry listed before it in its group,
|
|
2486
|
-
*
|
|
2487
|
-
* 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.
|
|
2488
2465
|
*/
|
|
2489
2466
|
readonly type: "fill";
|
|
2490
2467
|
} | {
|
|
@@ -2507,8 +2484,8 @@ export type ShapeItem = {
|
|
|
2507
2484
|
*/
|
|
2508
2485
|
readonly join?: LineJoin;
|
|
2509
2486
|
/**
|
|
2510
|
-
* Longest a miter join reaches, as a multiple of half the width, before
|
|
2511
|
-
*
|
|
2487
|
+
* Longest a miter join reaches, as a multiple of half the width, before it is beveled. At
|
|
2488
|
+
* least 1.
|
|
2512
2489
|
*
|
|
2513
2490
|
* @defaultValue `4`
|
|
2514
2491
|
*/
|
|
@@ -2528,14 +2505,12 @@ export type ShapeItem = {
|
|
|
2528
2505
|
*/
|
|
2529
2506
|
readonly type: "stroke";
|
|
2530
2507
|
/**
|
|
2531
|
-
* Full width, as a fraction of the shorter side. Non-negative; zero
|
|
2532
|
-
* draws nothing.
|
|
2508
|
+
* Full width, as a fraction of the shorter side. Non-negative; zero draws nothing.
|
|
2533
2509
|
*/
|
|
2534
2510
|
readonly width: Animated<number>;
|
|
2535
2511
|
} | {
|
|
2536
2512
|
/**
|
|
2537
|
-
* Where it ends, in `0..=1`. Nothing is kept unless it is after
|
|
2538
|
-
* `start`.
|
|
2513
|
+
* Where it ends, in `0..=1`. Nothing is kept unless it is after `start`.
|
|
2539
2514
|
*/
|
|
2540
2515
|
readonly end: Animated<number>;
|
|
2541
2516
|
/**
|
|
@@ -2562,18 +2537,14 @@ export type ShapeItem = {
|
|
|
2562
2537
|
/**
|
|
2563
2538
|
* A shape that limits where a clip is visible.
|
|
2564
2539
|
*
|
|
2565
|
-
* Geometry is in the clip's source space
|
|
2566
|
-
*
|
|
2567
|
-
*
|
|
2568
|
-
* polystar's radii) are fractions of that space's shorter side, so a mask
|
|
2569
|
-
* 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.
|
|
2570
2543
|
*/
|
|
2571
2544
|
export interface ShapeMask {
|
|
2572
2545
|
/**
|
|
2573
|
-
*
|
|
2574
|
-
*
|
|
2575
|
-
* deviation `0.3125 * feather`, which spreads its 10 to 90 percent ramp
|
|
2576
|
-
* 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`.
|
|
2577
2548
|
*
|
|
2578
2549
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2579
2550
|
*/
|
|
@@ -2602,9 +2573,8 @@ export interface ShapeMask {
|
|
|
2602
2573
|
readonly shape: ShapeGeometry;
|
|
2603
2574
|
}
|
|
2604
2575
|
/**
|
|
2605
|
-
* A group's placement
|
|
2606
|
-
*
|
|
2607
|
-
* 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.
|
|
2608
2578
|
*/
|
|
2609
2579
|
export interface ShapeTransform {
|
|
2610
2580
|
/**
|
|
@@ -2614,8 +2584,8 @@ export interface ShapeTransform {
|
|
|
2614
2584
|
*/
|
|
2615
2585
|
readonly anchor?: Animated<Vec2>;
|
|
2616
2586
|
/**
|
|
2617
|
-
* Opacity of the group as a whole, in `0..=1
|
|
2618
|
-
*
|
|
2587
|
+
* Opacity of the group as a whole, in `0..=1`; overlapping items are composited first and
|
|
2588
|
+
* faded together.
|
|
2619
2589
|
*
|
|
2620
2590
|
* @defaultValue `{"mode":"constant","value":1}`
|
|
2621
2591
|
*/
|
|
@@ -2633,8 +2603,7 @@ export interface ShapeTransform {
|
|
|
2633
2603
|
*/
|
|
2634
2604
|
readonly rotation_degrees?: Animated<number>;
|
|
2635
2605
|
/**
|
|
2636
|
-
* Per-axis scale; 1 leaves the items unscaled. Stroke widths scale with
|
|
2637
|
-
* it.
|
|
2606
|
+
* Per-axis scale; 1 leaves the items unscaled. Stroke widths scale with it.
|
|
2638
2607
|
*
|
|
2639
2608
|
* @defaultValue `{"mode":"constant","value":{"x":1,"y":1}}`
|
|
2640
2609
|
*/
|
|
@@ -2680,6 +2649,56 @@ export interface Subpath {
|
|
|
2680
2649
|
* How lines of text align within it.
|
|
2681
2650
|
*/
|
|
2682
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
|
+
}
|
|
2683
2702
|
/**
|
|
2684
2703
|
* A box behind each line of text.
|
|
2685
2704
|
*/
|
|
@@ -2689,36 +2708,168 @@ export interface TextBackground {
|
|
|
2689
2708
|
*/
|
|
2690
2709
|
readonly color: Rgba;
|
|
2691
2710
|
/**
|
|
2692
|
-
* Space between the text and the box edge, as a fraction of the font
|
|
2693
|
-
* size, in `[0, 2]`.
|
|
2711
|
+
* Space between the text and the box edge, as a fraction of the font size, in `[0, 2]`.
|
|
2694
2712
|
*
|
|
2695
2713
|
* @defaultValue `0`
|
|
2696
2714
|
*/
|
|
2697
2715
|
readonly padding?: number;
|
|
2698
2716
|
}
|
|
2699
2717
|
/**
|
|
2700
|
-
* 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.
|
|
2725
|
+
*/
|
|
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.
|
|
2701
2851
|
*/
|
|
2702
|
-
export interface
|
|
2852
|
+
export interface TextStroke {
|
|
2703
2853
|
/**
|
|
2704
2854
|
* Band color.
|
|
2705
2855
|
*/
|
|
2706
2856
|
readonly color: Rgba;
|
|
2707
2857
|
/**
|
|
2708
|
-
* 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`.
|
|
2709
2860
|
*/
|
|
2710
2861
|
readonly width: number;
|
|
2711
2862
|
}
|
|
2712
2863
|
/**
|
|
2713
|
-
* How text looks and where it lies
|
|
2714
|
-
* `Generator`.
|
|
2864
|
+
* How text looks and where it lies, for caption cues or a text `Generator`.
|
|
2715
2865
|
*
|
|
2716
|
-
*
|
|
2717
|
-
* canvas
|
|
2718
|
-
*
|
|
2719
|
-
* fractions of the font size. The engine draws with the fonts its host
|
|
2720
|
-
* registered: those of `font_family` first, then the rest in their
|
|
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
|
|
2721
2869
|
* fallback order.
|
|
2870
|
+
*
|
|
2871
|
+
* Painting is bottom to top as in CSS: background boxes, shadows (last listed lowest),
|
|
2872
|
+
* strokes (outermost lowest), fill, then color glyphs.
|
|
2722
2873
|
*/
|
|
2723
2874
|
export interface TextStyle {
|
|
2724
2875
|
/**
|
|
@@ -2728,12 +2879,18 @@ export interface TextStyle {
|
|
|
2728
2879
|
*/
|
|
2729
2880
|
readonly align?: TextAlign;
|
|
2730
2881
|
/**
|
|
2731
|
-
* The point of the text, background included, placed at
|
|
2732
|
-
*
|
|
2882
|
+
* The point of the text, background included, placed at `position`; `(0.5, 1)` is its
|
|
2883
|
+
* bottom centre.
|
|
2733
2884
|
*
|
|
2734
2885
|
* @defaultValue `{"x":0.5,"y":1}`
|
|
2735
2886
|
*/
|
|
2736
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[];
|
|
2737
2894
|
/**
|
|
2738
2895
|
* A box behind each line.
|
|
2739
2896
|
*
|
|
@@ -2741,51 +2898,47 @@ export interface TextStyle {
|
|
|
2741
2898
|
*/
|
|
2742
2899
|
readonly background?: TextBackground | null;
|
|
2743
2900
|
/**
|
|
2744
|
-
*
|
|
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.
|
|
2745
2904
|
*
|
|
2746
|
-
* @defaultValue `{"alpha":1,"blue":1,"green":1,"red":1}`
|
|
2905
|
+
* @defaultValue `{"color":{"alpha":1,"blue":1,"green":1,"red":1},"type":"solid"}`
|
|
2747
2906
|
*/
|
|
2748
|
-
readonly
|
|
2907
|
+
readonly fill?: Paint;
|
|
2749
2908
|
/**
|
|
2750
|
-
* The family
|
|
2751
|
-
*
|
|
2752
|
-
*
|
|
2753
|
-
*
|
|
2754
|
-
* fallback order alone. Non-empty, at most `MAX_FONT_FAMILY_BYTES`
|
|
2755
|
-
* 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.
|
|
2756
2913
|
*/
|
|
2757
2914
|
readonly font_family?: string | null;
|
|
2758
2915
|
/**
|
|
2759
|
-
* Font size as a fraction of the canvas's shorter side: positive, at
|
|
2760
|
-
*
|
|
2761
|
-
*
|
|
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.
|
|
2762
2919
|
*
|
|
2763
2920
|
* @defaultValue `0.05`
|
|
2764
2921
|
*/
|
|
2765
2922
|
readonly font_size?: number;
|
|
2766
2923
|
/**
|
|
2767
|
-
* The weight
|
|
2768
|
-
*
|
|
2769
|
-
*
|
|
2770
|
-
* draws its nearest face.
|
|
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.
|
|
2771
2927
|
*
|
|
2772
2928
|
* @defaultValue `400`
|
|
2773
2929
|
*/
|
|
2774
2930
|
readonly font_weight?: number;
|
|
2775
2931
|
/**
|
|
2776
|
-
* Space after each character, as a fraction of the font size, in
|
|
2777
|
-
* `
|
|
2778
|
-
*
|
|
2779
|
-
* (Arabic, say), whose joins it would break. Not zero, it turns optional
|
|
2780
|
-
* ligatures off.
|
|
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.
|
|
2781
2935
|
*
|
|
2782
2936
|
* @defaultValue `0`
|
|
2783
2937
|
*/
|
|
2784
2938
|
readonly letter_spacing?: number;
|
|
2785
2939
|
/**
|
|
2786
|
-
* Baseline-to-baseline distance in font sizes, in `[0.5, 3]`. Each
|
|
2787
|
-
*
|
|
2788
|
-
* is centred in its line when the line is taller than an em.
|
|
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.
|
|
2789
2942
|
*
|
|
2790
2943
|
* @defaultValue `1.2`
|
|
2791
2944
|
*/
|
|
@@ -2797,25 +2950,94 @@ export interface TextStyle {
|
|
|
2797
2950
|
*/
|
|
2798
2951
|
readonly max_width?: number;
|
|
2799
2952
|
/**
|
|
2800
|
-
*
|
|
2801
|
-
*
|
|
2802
|
-
* @defaultValue `null`
|
|
2803
|
-
*/
|
|
2804
|
-
readonly outline?: TextOutline | null;
|
|
2805
|
-
/**
|
|
2806
|
-
* Where on the canvas the text's anchor lies, `(0, 0)` top-left to
|
|
2807
|
-
* `(1, 1)` bottom-right.
|
|
2953
|
+
* Where on the canvas the text's anchor lies, `(0, 0)` top-left to `(1, 1)` bottom-right.
|
|
2808
2954
|
*
|
|
2809
2955
|
* @defaultValue `{"x":0.5,"y":0.92}`
|
|
2810
2956
|
*/
|
|
2811
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[];
|
|
2812
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;
|
|
3030
|
+
}
|
|
3031
|
+
/**
|
|
3032
|
+
* The units a Range selector counts.
|
|
3033
|
+
*/
|
|
3034
|
+
export type TextUnit = "characters" | "characters_excluding_spaces" | "words" | "lines";
|
|
2813
3035
|
/**
|
|
2814
3036
|
* How a clip plays its source range over its timeline range.
|
|
2815
3037
|
*
|
|
2816
|
-
* `forward` and `reverse` stretch the source range over the timeline range,
|
|
2817
|
-
*
|
|
2818
|
-
*
|
|
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.
|
|
2819
3041
|
*/
|
|
2820
3042
|
export type TimeMap = {
|
|
2821
3043
|
/**
|
|
@@ -2824,8 +3046,8 @@ export type TimeMap = {
|
|
|
2824
3046
|
readonly type: "forward";
|
|
2825
3047
|
} | {
|
|
2826
3048
|
/**
|
|
2827
|
-
* From the end of the source range to its start: pictures in reverse
|
|
2828
|
-
*
|
|
3049
|
+
* From the end of the source range to its start: pictures in reverse order and sound
|
|
3050
|
+
* played backwards.
|
|
2829
3051
|
*/
|
|
2830
3052
|
readonly type: "reverse";
|
|
2831
3053
|
} | {
|
|
@@ -2897,8 +3119,8 @@ export interface Track {
|
|
|
2897
3119
|
*/
|
|
2898
3120
|
readonly captions?: Captions | null;
|
|
2899
3121
|
/**
|
|
2900
|
-
* Clips on this track
|
|
2901
|
-
*
|
|
3122
|
+
* Clips on this track, in authoring order; evaluation sorts by time. A caption track has
|
|
3123
|
+
* none.
|
|
2902
3124
|
*
|
|
2903
3125
|
* @defaultValue `[]`
|
|
2904
3126
|
*/
|
|
@@ -2933,8 +3155,8 @@ export interface TrackAudio {
|
|
|
2933
3155
|
*/
|
|
2934
3156
|
readonly ducking?: Ducking | null;
|
|
2935
3157
|
/**
|
|
2936
|
-
* Ordered single-input effects applied to the summed clip signal, at
|
|
2937
|
-
*
|
|
3158
|
+
* Ordered single-input effects applied to the summed clip signal, at most
|
|
3159
|
+
* `MAX_CHAIN_EFFECTS`.
|
|
2938
3160
|
*
|
|
2939
3161
|
* @defaultValue `[]`
|
|
2940
3162
|
*/
|
|
@@ -2952,8 +3174,7 @@ export interface TrackAudio {
|
|
|
2952
3174
|
*/
|
|
2953
3175
|
readonly muted?: boolean;
|
|
2954
3176
|
/**
|
|
2955
|
-
* Animated stereo position applied after the clip mix, from `-1` (left)
|
|
2956
|
-
* to `1` (right).
|
|
3177
|
+
* Animated stereo position applied after the clip mix, from `-1` (left) to `1` (right).
|
|
2957
3178
|
*
|
|
2958
3179
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2959
3180
|
*/
|
|
@@ -3003,29 +3224,24 @@ export interface Vec2 {
|
|
|
3003
3224
|
*/
|
|
3004
3225
|
export interface VideoStreamShape {
|
|
3005
3226
|
/**
|
|
3006
|
-
* The rate
|
|
3007
|
-
*
|
|
3008
|
-
*
|
|
3009
|
-
* 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.
|
|
3010
3230
|
*/
|
|
3011
3231
|
readonly frame_rate?: FrameRate | null;
|
|
3012
3232
|
/**
|
|
3013
|
-
* Displayed height in square pixels
|
|
3014
|
-
* pixel aspect ratio taller than wide, then turned.
|
|
3233
|
+
* Displayed height in square pixels, after the pixel aspect ratio and orientation.
|
|
3015
3234
|
*/
|
|
3016
3235
|
readonly height: number;
|
|
3017
3236
|
/**
|
|
3018
|
-
* Displayed width in square pixels
|
|
3019
|
-
* pixel aspect ratio wider than tall, then turned by the stream's
|
|
3020
|
-
* orientation.
|
|
3237
|
+
* Displayed width in square pixels, after the pixel aspect ratio and orientation.
|
|
3021
3238
|
*/
|
|
3022
3239
|
readonly width: number;
|
|
3023
3240
|
}
|
|
3024
3241
|
/**
|
|
3025
3242
|
* Resolution-independent visual presentation controls for a clip.
|
|
3026
3243
|
*
|
|
3027
|
-
*
|
|
3028
|
-
* source centred on the canvas, unscaled, unrotated and opaque.
|
|
3244
|
+
* Omitted fields default to the source centred on the canvas, unscaled, unrotated and opaque.
|
|
3029
3245
|
*/
|
|
3030
3246
|
export interface VisualProperties {
|
|
3031
3247
|
/**
|
|
@@ -3041,8 +3257,8 @@ export interface VisualProperties {
|
|
|
3041
3257
|
*/
|
|
3042
3258
|
readonly opacity?: Animated<number>;
|
|
3043
3259
|
/**
|
|
3044
|
-
* Animated normalized canvas translation, along spatial curves where
|
|
3045
|
-
*
|
|
3260
|
+
* Animated normalized canvas translation, along spatial curves where keyframes have
|
|
3261
|
+
* tangents.
|
|
3046
3262
|
*
|
|
3047
3263
|
* @defaultValue `{"mode":"constant","value":{"x":0.5,"y":0.5}}`
|
|
3048
3264
|
*/
|