alpha2 0.4.6 → 0.5.1
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 +51 -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 +125 -176
- 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/frames.d.ts +23 -0
- package/dist/frames.js +34 -0
- package/dist/generated/project-schema.d.ts +712 -485
- package/dist/generated/project-schema.js +55 -2
- package/dist/generated/project-shape.js +276 -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 +6 -0
- package/dist/index.js +6 -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 +178 -246
- package/dist/mediabunny.js +781 -583
- package/dist/paint.d.ts +23 -0
- package/dist/paint.js +37 -0
- 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 +74 -118
- 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 +501 -587
- package/wasm/alpha2_wasm.js +661 -616
- package/wasm/alpha2_wasm_bg.wasm +0 -0
- package/wasm/alpha2_wasm_bg.wasm.d.ts +22 -12
- package/wasm/rust-crate-licenses.md +2 -2
- package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-070d94113471ef0a}/inline1.js +1 -0
- package/wasm/snippets/alpha2-wasm-070d94113471ef0a/inline2.js +82 -0
- package/wasm/snippets/alpha2-wasm-c62e60c964e88a52/inline2.js +0 -52
- /package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-070d94113471ef0a}/inline0.js +0 -0
- /package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-070d94113471ef0a}/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,13 @@ export type AudioEffect = {
|
|
|
388
415
|
*/
|
|
389
416
|
export interface AudioProperties {
|
|
390
417
|
/**
|
|
391
|
-
*
|
|
392
|
-
*
|
|
418
|
+
* The stream's channels the clip plays, by index. One index plays that channel as a mono
|
|
419
|
+
* source; two play a stereo pair, left then right. Absent plays every channel, folded by
|
|
420
|
+
* speaker position. At most two distinct indices.
|
|
421
|
+
*/
|
|
422
|
+
readonly channels?: readonly number[] | null;
|
|
423
|
+
/**
|
|
424
|
+
* Ordered single-input effects applied before the track bus, at most `MAX_CHAIN_EFFECTS`.
|
|
393
425
|
*
|
|
394
426
|
* @defaultValue `[]`
|
|
395
427
|
*/
|
|
@@ -401,8 +433,7 @@ export interface AudioProperties {
|
|
|
401
433
|
*/
|
|
402
434
|
readonly fade_in?: MediaTime;
|
|
403
435
|
/**
|
|
404
|
-
* Fade-out duration measured back from the clip's timeline end.
|
|
405
|
-
* Non-negative.
|
|
436
|
+
* Fade-out duration measured back from the clip's timeline end. Non-negative.
|
|
406
437
|
*
|
|
407
438
|
* @defaultValue `0`
|
|
408
439
|
*/
|
|
@@ -431,6 +462,16 @@ export interface AudioProperties {
|
|
|
431
462
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
432
463
|
*/
|
|
433
464
|
readonly pan?: Animated<number>;
|
|
465
|
+
/**
|
|
466
|
+
* Keeps the clip's pitch when its speed is not 1 by time-stretching instead of resampling.
|
|
467
|
+
* No effect at speed 1, on loops or on freezes.
|
|
468
|
+
*/
|
|
469
|
+
readonly preserve_pitch?: boolean;
|
|
470
|
+
/**
|
|
471
|
+
* The source's audio stream the clip plays, counted from 0 over the file's audio streams in
|
|
472
|
+
* container order. Absent plays the stream the host picks by default.
|
|
473
|
+
*/
|
|
474
|
+
readonly stream?: number | null;
|
|
434
475
|
}
|
|
435
476
|
/**
|
|
436
477
|
* An audio stream's channel count and sample rate.
|
|
@@ -448,9 +489,8 @@ export interface AudioStreamShape {
|
|
|
448
489
|
/**
|
|
449
490
|
* The color space in which blend modes are evaluated.
|
|
450
491
|
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
* the other contrast modes look as they do there only in
|
|
492
|
+
* Compositing is always premultiplied; this chooses what the blend formulas see. Contrast
|
|
493
|
+
* modes such as overlay and soft-light match design tools only in
|
|
454
494
|
* `BlendSpace::SrgbEncoded`.
|
|
455
495
|
*/
|
|
456
496
|
export type BlendSpace = "linear_light" | "srgb_encoded";
|
|
@@ -463,28 +503,41 @@ export type CacheIntent = "auto" | "pin" | "bypass";
|
|
|
463
503
|
*/
|
|
464
504
|
export interface CaptionCue {
|
|
465
505
|
/**
|
|
466
|
-
*
|
|
467
|
-
*
|
|
506
|
+
* Who says it, as the source names them (a WebVTT voice), at most 64 bytes. A track style
|
|
507
|
+
* of that name applies when the cue names no style.
|
|
468
508
|
*/
|
|
469
|
-
readonly
|
|
509
|
+
readonly speaker?: string | null;
|
|
510
|
+
/**
|
|
511
|
+
* The name of one of the track's `styles`, applied over its style.
|
|
512
|
+
*/
|
|
513
|
+
readonly style?: string | null;
|
|
514
|
+
/**
|
|
515
|
+
* The text, a string or runs; `\n` starts a line. Non-empty, at most
|
|
516
|
+
* `MAX_TEXT_CONTENT_BYTES` bytes. Run times are from the cue's start and lie within it.
|
|
517
|
+
*/
|
|
518
|
+
readonly text: TextContent;
|
|
470
519
|
/**
|
|
471
520
|
* When the cue shows. Non-empty and not before zero.
|
|
472
521
|
*/
|
|
473
522
|
readonly timeline_range: TimeRange;
|
|
474
523
|
}
|
|
475
524
|
/**
|
|
476
|
-
* What a caption track shows: its cues, in
|
|
525
|
+
* What a caption track shows: its cues, in its style.
|
|
477
526
|
*/
|
|
478
527
|
export interface Captions {
|
|
479
528
|
/**
|
|
480
|
-
* Cues in timeline order, none overlapping
|
|
481
|
-
* cue at a time. Simultaneous captions take one track each.
|
|
529
|
+
* Cues in timeline order, none overlapping; a track shows one cue at a time.
|
|
482
530
|
*/
|
|
483
531
|
readonly cues: readonly CaptionCue[];
|
|
484
532
|
/**
|
|
485
|
-
*
|
|
533
|
+
* The style every cue starts from.
|
|
486
534
|
*/
|
|
487
535
|
readonly style?: TextStyle;
|
|
536
|
+
/**
|
|
537
|
+
* Named changes to `style` for cues that name one or whose speaker has one. At most
|
|
538
|
+
* `MAX_CAPTION_STYLES`, names 1 to 64 bytes.
|
|
539
|
+
*/
|
|
540
|
+
readonly styles?: Readonly<Record<string, TextStylePatch>>;
|
|
488
541
|
}
|
|
489
542
|
/**
|
|
490
543
|
* A reference to a source over independent timeline and source ranges.
|
|
@@ -501,15 +554,13 @@ export interface Clip {
|
|
|
501
554
|
*/
|
|
502
555
|
readonly blend_mode?: ClipBlendMode;
|
|
503
556
|
/**
|
|
504
|
-
* Whether a runtime may keep and reuse the clip's rendered picture.
|
|
505
|
-
*
|
|
506
|
-
* draws.
|
|
557
|
+
* Whether a runtime may keep and reuse the clip's rendered picture. Never changes what
|
|
558
|
+
* renders.
|
|
507
559
|
*/
|
|
508
560
|
readonly cache?: CacheIntent;
|
|
509
561
|
/**
|
|
510
|
-
* The composition graph that builds the clip's picture from its source,
|
|
511
|
-
*
|
|
512
|
-
* source as it is. Visual clips only.
|
|
562
|
+
* The composition graph that builds the clip's picture from its source, with the clip's
|
|
563
|
+
* time mapping onto it. Without one the clip shows its source as is. Visual clips only.
|
|
513
564
|
*
|
|
514
565
|
* @defaultValue `null`
|
|
515
566
|
*/
|
|
@@ -519,9 +570,8 @@ export interface Clip {
|
|
|
519
570
|
*/
|
|
520
571
|
readonly id: ClipId;
|
|
521
572
|
/**
|
|
522
|
-
* Shapes that limit where the clip is visible, applied in order after
|
|
523
|
-
*
|
|
524
|
-
* `MAX_CLIP_MASKS`; visual clips only.
|
|
573
|
+
* Shapes that limit where the clip is visible, applied in order after its composition and
|
|
574
|
+
* before its transform. At most `MAX_CLIP_MASKS`; visual clips only.
|
|
525
575
|
*
|
|
526
576
|
* @defaultValue `[]`
|
|
527
577
|
*/
|
|
@@ -556,21 +606,17 @@ export interface Clip {
|
|
|
556
606
|
readonly visual?: VisualProperties;
|
|
557
607
|
}
|
|
558
608
|
/**
|
|
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.
|
|
609
|
+
* Blend mode, from W3C Compositing and Blending Level 1 (CSS `mix-blend-mode`) with the
|
|
610
|
+
* specification's formulas, plus `plus-lighter` from Level 2.
|
|
563
611
|
*/
|
|
564
|
-
export type ClipBlendMode = "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color_dodge" | "color_burn" | "hard_light" | "soft_light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity";
|
|
612
|
+
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
613
|
/**
|
|
566
614
|
* A clip's use of a `Composition`, and how its time maps onto it.
|
|
567
615
|
*
|
|
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.
|
|
616
|
+
* Composition time is `offset + (t - clip start) * scale` for timeline time `t`, rounded
|
|
617
|
+
* down to a tick. Moving a clip keeps its offset so the animation moves with it; trimming
|
|
618
|
+
* its start by `d` adds `d * scale` to the offset so the rest stays in place. A negative
|
|
619
|
+
* offset holds settings at their first keyframe and media nodes at their first frame.
|
|
574
620
|
*/
|
|
575
621
|
export interface ClipComposition {
|
|
576
622
|
/**
|
|
@@ -591,8 +637,8 @@ export interface ClipComposition {
|
|
|
591
637
|
readonly scale?: TimeScale;
|
|
592
638
|
}
|
|
593
639
|
/**
|
|
594
|
-
* One versioned
|
|
595
|
-
* transition
|
|
640
|
+
* One versioned effect invocation: a composition's effect or transition node, or a timeline
|
|
641
|
+
* transition.
|
|
596
642
|
*/
|
|
597
643
|
export interface ClipEffect {
|
|
598
644
|
/**
|
|
@@ -600,14 +646,12 @@ export interface ClipEffect {
|
|
|
600
646
|
*/
|
|
601
647
|
readonly id: string;
|
|
602
648
|
/**
|
|
603
|
-
* Named parameter values, constant or keyframed. Omitted entries use
|
|
604
|
-
* definition defaults.
|
|
649
|
+
* Named parameter values, constant or keyframed. Omitted entries use definition defaults.
|
|
605
650
|
*
|
|
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.
|
|
651
|
+
* Keyframe times are composition times in a composition node and timeline times in a
|
|
652
|
+
* timeline transition. A parameter's keyframes share one value type, and `enum` and `bool`
|
|
653
|
+
* keyframes only hold. Interpolated overshoot is clamped to the parameter's range; an
|
|
654
|
+
* authored value outside it is an error.
|
|
611
655
|
*
|
|
612
656
|
* @defaultValue `{}`
|
|
613
657
|
*/
|
|
@@ -632,8 +676,8 @@ export type ClipId = string;
|
|
|
632
676
|
*/
|
|
633
677
|
export interface ClipTransition {
|
|
634
678
|
/**
|
|
635
|
-
* Timing curve applied to the transition's linear progress. The eased
|
|
636
|
-
*
|
|
679
|
+
* Timing curve applied to the transition's linear progress. The eased progress is clamped
|
|
680
|
+
* to `0..=1`.
|
|
637
681
|
*/
|
|
638
682
|
readonly easing: Easing;
|
|
639
683
|
/**
|
|
@@ -662,8 +706,7 @@ export type ColorMatrix = "bt601" | "bt709" | "bt2020_ncl" | "rgb";
|
|
|
662
706
|
*/
|
|
663
707
|
export interface ColorMetadata {
|
|
664
708
|
/**
|
|
665
|
-
* SDR or HDR
|
|
666
|
-
* or HLG (`is_consistent`).
|
|
709
|
+
* SDR or HDR; HDR exactly when `transfer` is PQ or HLG (`is_consistent`).
|
|
667
710
|
*/
|
|
668
711
|
readonly dynamic_range: DynamicRange;
|
|
669
712
|
/**
|
|
@@ -686,13 +729,11 @@ export interface ColorMetadata {
|
|
|
686
729
|
/**
|
|
687
730
|
* How sources' colors come into the working space.
|
|
688
731
|
*
|
|
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.
|
|
732
|
+
* The working space is display-referred linear light with BT.709 primaries, `1.0` being SDR
|
|
733
|
+
* white (100 nits); every export is SDR BT.709. SDR sources decode through the sRGB EOTF and
|
|
734
|
+
* wide-gamut ones are converted to BT.709. An HDR (PQ or HLG) source is either refused or
|
|
735
|
+
* linearized, converted to BT.709, and tone-mapped from `hdr_peak_nits` to SDR white
|
|
736
|
+
* by the ITU-R BT.2390 EETF on each pixel's largest component, preserving hue.
|
|
696
737
|
*/
|
|
697
738
|
export interface ColorPipeline {
|
|
698
739
|
/**
|
|
@@ -702,9 +743,8 @@ export interface ColorPipeline {
|
|
|
702
743
|
*/
|
|
703
744
|
readonly hdr?: HdrSources;
|
|
704
745
|
/**
|
|
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`.
|
|
746
|
+
* The luminance, in nits, HDR sources are taken to peak at: PQ above it is clipped, HLG is
|
|
747
|
+
* displayed at it, and the tone map brings it to SDR white. Within `HDR_PEAK_NITS_RANGE`.
|
|
708
748
|
*
|
|
709
749
|
* @defaultValue `1000`
|
|
710
750
|
*/
|
|
@@ -731,28 +771,27 @@ export interface Composition {
|
|
|
731
771
|
*/
|
|
732
772
|
readonly id: CompositionId;
|
|
733
773
|
/**
|
|
734
|
-
* The images a group node gives it, by name, in port order
|
|
735
|
-
*
|
|
774
|
+
* The images a group node gives it, by name, in port order; its `NodeOp::GroupInput`
|
|
775
|
+
* nodes read them.
|
|
736
776
|
*/
|
|
737
777
|
readonly inputs?: readonly string[];
|
|
738
778
|
/**
|
|
739
|
-
* The graph's nodes.
|
|
740
|
-
* listed after it as its input.
|
|
779
|
+
* The graph's nodes. Order has no meaning; a node may name a later node as its input.
|
|
741
780
|
*
|
|
742
781
|
* @defaultValue `[]`
|
|
743
782
|
*/
|
|
744
783
|
readonly nodes?: readonly CompositionNode[];
|
|
745
784
|
/**
|
|
746
|
-
* The node whose image is the composition's picture. A composition
|
|
747
|
-
*
|
|
785
|
+
* The node whose image is the composition's picture. A composition without one saves but
|
|
786
|
+
* cannot be rendered.
|
|
748
787
|
*
|
|
749
788
|
* @defaultValue `null`
|
|
750
789
|
*/
|
|
751
790
|
readonly output?: NodeId | null;
|
|
752
791
|
}
|
|
753
792
|
/**
|
|
754
|
-
* A node setting a composition exposes to
|
|
755
|
-
*
|
|
793
|
+
* A node setting a composition exposes to group nodes: an effect or transition parameter of
|
|
794
|
+
* one of its nodes.
|
|
756
795
|
*/
|
|
757
796
|
export interface CompositionControl {
|
|
758
797
|
/**
|
|
@@ -777,9 +816,8 @@ export type CompositionId = string;
|
|
|
777
816
|
*/
|
|
778
817
|
export interface CompositionNode {
|
|
779
818
|
/**
|
|
780
|
-
* Whether the node passes its `NodeOp::bypass_input` through
|
|
781
|
-
*
|
|
782
|
-
* bypassed.
|
|
819
|
+
* Whether the node passes its `NodeOp::bypass_input` through unchanged. A node without
|
|
820
|
+
* inputs cannot be bypassed.
|
|
783
821
|
*
|
|
784
822
|
* @defaultValue `false`
|
|
785
823
|
*/
|
|
@@ -804,9 +842,9 @@ export interface Dash {
|
|
|
804
842
|
*/
|
|
805
843
|
readonly offset?: Animated<number>;
|
|
806
844
|
/**
|
|
807
|
-
* Alternating dash and gap lengths, as fractions of the shorter side:
|
|
808
|
-
*
|
|
809
|
-
*
|
|
845
|
+
* Alternating dash and gap lengths, as fractions of the shorter side: one to
|
|
846
|
+
* `MAX_DASH_ENTRIES` non-negative entries, not all zero. An odd count repeats once more to
|
|
847
|
+
* pair up.
|
|
810
848
|
*/
|
|
811
849
|
readonly pattern: readonly Animated<number>[];
|
|
812
850
|
}
|
|
@@ -840,9 +878,7 @@ export interface Ducking {
|
|
|
840
878
|
readonly threshold: number;
|
|
841
879
|
}
|
|
842
880
|
/**
|
|
843
|
-
*
|
|
844
|
-
* transfer: `hdr` exactly when the transfer is PQ or HLG, and a color
|
|
845
|
-
* whose two fields disagree is refused.
|
|
881
|
+
* Standard or high dynamic range; must agree with the transfer.
|
|
846
882
|
*/
|
|
847
883
|
export type DynamicRange = "sdr" | "hdr";
|
|
848
884
|
/**
|
|
@@ -919,15 +955,14 @@ export type EffectValue = {
|
|
|
919
955
|
readonly value: readonly [number, number];
|
|
920
956
|
} | {
|
|
921
957
|
/**
|
|
922
|
-
* Four finite components that are not a color, such as per-channel
|
|
923
|
-
*
|
|
958
|
+
* Four finite components that are not a color, such as per-channel thresholds; they
|
|
959
|
+
* keyframe component by component.
|
|
924
960
|
*/
|
|
925
961
|
readonly type: "vec4";
|
|
926
962
|
readonly value: readonly [number, number, number, number];
|
|
927
963
|
} | {
|
|
928
964
|
/**
|
|
929
|
-
* Straight (not premultiplied), sRGB-encoded RGBA
|
|
930
|
-
* inclusive unit interval, as a color picker shows them.
|
|
965
|
+
* Straight (not premultiplied), sRGB-encoded RGBA in `0..=1`, as a color picker shows it.
|
|
931
966
|
*/
|
|
932
967
|
readonly type: "color";
|
|
933
968
|
readonly value: readonly [number, number, number, number];
|
|
@@ -953,8 +988,8 @@ export interface EqBand {
|
|
|
953
988
|
*/
|
|
954
989
|
readonly frequency_hz: number;
|
|
955
990
|
/**
|
|
956
|
-
* Peaking gain in decibels, at most `MAX_EQ_GAIN_DB` either way.
|
|
957
|
-
*
|
|
991
|
+
* Peaking gain in decibels, at most `MAX_EQ_GAIN_DB` either way. Ignored by the pass
|
|
992
|
+
* filters.
|
|
958
993
|
*
|
|
959
994
|
* @defaultValue `0`
|
|
960
995
|
*/
|
|
@@ -989,8 +1024,7 @@ export type FlexDirection = "row" | "column" | "row_reverse" | "column_reverse";
|
|
|
989
1024
|
*/
|
|
990
1025
|
export type FlexWrap = "nowrap" | "wrap";
|
|
991
1026
|
/**
|
|
992
|
-
* A positive rational frame rate in reduced form, at most one frame per tick
|
|
993
|
-
* (120 000 frames per second).
|
|
1027
|
+
* A positive rational frame rate in reduced form, at most one frame per tick (120 000 fps).
|
|
994
1028
|
*/
|
|
995
1029
|
export interface FrameRate {
|
|
996
1030
|
/**
|
|
@@ -1005,12 +1039,10 @@ export interface FrameRate {
|
|
|
1005
1039
|
/**
|
|
1006
1040
|
* The picture of a generated source.
|
|
1007
1041
|
*
|
|
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.
|
|
1042
|
+
* A generated picture has the canvas's size and aspect. Positions are normalized, `(0, 0)`
|
|
1043
|
+
* top-left to `(1, 1)` bottom-right, and lengths are fractions of the shorter side, so the
|
|
1044
|
+
* picture is the same at any render resolution. A fill never changes over time; text
|
|
1045
|
+
* changes only through its style's animators; shapes and layouts may change.
|
|
1014
1046
|
*/
|
|
1015
1047
|
export type Generator = {
|
|
1016
1048
|
/**
|
|
@@ -1027,10 +1059,8 @@ export type Generator = {
|
|
|
1027
1059
|
*/
|
|
1028
1060
|
readonly items: readonly ShapeItem[];
|
|
1029
1061
|
/**
|
|
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.
|
|
1062
|
+
* Shapes drawn from an ordered content tree, as an After Effects or Lottie shape layer draws
|
|
1063
|
+
* them. Every value in the tree may be keyframed in picture time.
|
|
1034
1064
|
*/
|
|
1035
1065
|
readonly type: "shapes";
|
|
1036
1066
|
} | {
|
|
@@ -1040,15 +1070,13 @@ export type Generator = {
|
|
|
1040
1070
|
*/
|
|
1041
1071
|
readonly style?: TextStyle;
|
|
1042
1072
|
/**
|
|
1043
|
-
* The text; `\n` starts a line. Non-empty, at most
|
|
1044
|
-
* `MAX_TEXT_CONTENT_BYTES` bytes.
|
|
1073
|
+
* The text, a string or runs; `\n` starts a line. Non-empty, at most
|
|
1074
|
+
* `MAX_TEXT_CONTENT_BYTES` bytes. Run times are picture time.
|
|
1045
1075
|
*/
|
|
1046
|
-
readonly text:
|
|
1076
|
+
readonly text: TextContent;
|
|
1047
1077
|
/**
|
|
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.
|
|
1078
|
+
* Text on a transparent picture, laid out and placed by its style as caption cues are, and
|
|
1079
|
+
* drawn with the host's registered fonts.
|
|
1052
1080
|
*/
|
|
1053
1081
|
readonly type: "text";
|
|
1054
1082
|
} | {
|
|
@@ -1057,10 +1085,8 @@ export type Generator = {
|
|
|
1057
1085
|
*/
|
|
1058
1086
|
readonly root: LayoutNode;
|
|
1059
1087
|
/**
|
|
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`.
|
|
1088
|
+
* Boxes laid out by CSS flexbox around their text and shapes, with the engine's fonts. Any
|
|
1089
|
+
* value in the tree may be keyframed in picture time. See `LayoutNode`.
|
|
1064
1090
|
*/
|
|
1065
1091
|
readonly type: "layout";
|
|
1066
1092
|
};
|
|
@@ -1101,9 +1127,8 @@ export type Insets = number | string | {
|
|
|
1101
1127
|
/**
|
|
1102
1128
|
* Interpolation from one keyframe to the next.
|
|
1103
1129
|
*
|
|
1104
|
-
* Values
|
|
1105
|
-
*
|
|
1106
|
-
* shortest path normalizes its keyframe values.
|
|
1130
|
+
* Values interpolate numerically: a rotation from 0 to 720 degrees turns twice. A host that
|
|
1131
|
+
* wants the shortest path normalizes its keyframe values.
|
|
1107
1132
|
*/
|
|
1108
1133
|
export type Interpolation = {
|
|
1109
1134
|
/**
|
|
@@ -1138,8 +1163,7 @@ export type Interpolation = {
|
|
|
1138
1163
|
readonly y2: number;
|
|
1139
1164
|
};
|
|
1140
1165
|
/**
|
|
1141
|
-
* Where children lie along a container's main axis, or a grid's columns in
|
|
1142
|
-
* it.
|
|
1166
|
+
* Where children lie along a container's main axis, or a grid's columns in it.
|
|
1143
1167
|
*/
|
|
1144
1168
|
export type JustifyContent = "start" | "center" | "end" | "space_between" | "space_around" | "space_evenly";
|
|
1145
1169
|
/**
|
|
@@ -1151,10 +1175,8 @@ export interface Keyframe<T> {
|
|
|
1151
1175
|
*/
|
|
1152
1176
|
readonly interpolation: Interpolation;
|
|
1153
1177
|
/**
|
|
1154
|
-
* Timestamp of this value
|
|
1155
|
-
*
|
|
1156
|
-
* shapes or layout generator's tree, which is keyed in its picture's
|
|
1157
|
-
* time.
|
|
1178
|
+
* Timestamp of this value. Timeline time, except composition time in a composition node's
|
|
1179
|
+
* settings and picture time in a shapes or layout generator's tree.
|
|
1158
1180
|
*/
|
|
1159
1181
|
readonly time: MediaTime;
|
|
1160
1182
|
/**
|
|
@@ -1176,9 +1198,8 @@ export interface LayoutBorder {
|
|
|
1176
1198
|
readonly width: Animated<LayoutSize>;
|
|
1177
1199
|
}
|
|
1178
1200
|
/**
|
|
1179
|
-
* Where an absolute box lies in its parent's padding box. A missing side is
|
|
1180
|
-
*
|
|
1181
|
-
* flow on that axis.
|
|
1201
|
+
* Where an absolute box lies in its parent's padding box. A missing side is auto; with
|
|
1202
|
+
* neither `left` nor `right`, the box keeps its flow position on that axis.
|
|
1182
1203
|
*/
|
|
1183
1204
|
export interface LayoutInset {
|
|
1184
1205
|
/**
|
|
@@ -1205,27 +1226,24 @@ export type LayoutLength = number | string;
|
|
|
1205
1226
|
/**
|
|
1206
1227
|
* One box of a layout tree.
|
|
1207
1228
|
*
|
|
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.
|
|
1229
|
+
* A box lays its children out by flexbox (the default) or grid. It is a container with
|
|
1230
|
+
* children, a leaf with text or shape content, and empty otherwise (a spacer or decoration).
|
|
1231
|
+
* Each box draws background, then border, then content. Boxes draw in document order;
|
|
1232
|
+
* reversed directions and grid placement move them but do not change paint order.
|
|
1214
1233
|
*/
|
|
1215
1234
|
export interface LayoutNode {
|
|
1216
1235
|
/**
|
|
1217
|
-
* Where lines of a wrapping flex container, or a grid's rows, lie
|
|
1218
|
-
*
|
|
1236
|
+
* Where lines of a wrapping flex container, or a grid's rows, lie across the container.
|
|
1237
|
+
* Default `stretch`.
|
|
1219
1238
|
*/
|
|
1220
1239
|
readonly align_content?: AlignContent | null;
|
|
1221
1240
|
/**
|
|
1222
|
-
* Where children lie across the main axis, or in their grid areas'
|
|
1223
|
-
* rows. Default `stretch`.
|
|
1241
|
+
* Where children lie across the main axis, or in their grid areas' rows. Default `stretch`.
|
|
1224
1242
|
*/
|
|
1225
1243
|
readonly align_items?: AlignItems | null;
|
|
1226
1244
|
/**
|
|
1227
|
-
* Where the box lies across its flex container's main axis, or in its
|
|
1228
|
-
*
|
|
1245
|
+
* Where the box lies across its flex container's main axis, or in its grid area's row.
|
|
1246
|
+
* `None` follows the parent's `align_items`.
|
|
1229
1247
|
*/
|
|
1230
1248
|
readonly align_self?: AlignItems | null;
|
|
1231
1249
|
/**
|
|
@@ -1233,8 +1251,8 @@ export interface LayoutNode {
|
|
|
1233
1251
|
*/
|
|
1234
1252
|
readonly aspect_ratio?: number | null;
|
|
1235
1253
|
/**
|
|
1236
|
-
* What covers the border box, rounded by `border_radius`. Positions
|
|
1237
|
-
*
|
|
1254
|
+
* What covers the border box, rounded by `border_radius`. Positions are normalized to the
|
|
1255
|
+
* border box.
|
|
1238
1256
|
*/
|
|
1239
1257
|
readonly background?: Animated<Paint> | null;
|
|
1240
1258
|
/**
|
|
@@ -1242,28 +1260,27 @@ export interface LayoutNode {
|
|
|
1242
1260
|
*/
|
|
1243
1261
|
readonly border?: LayoutBorder | null;
|
|
1244
1262
|
/**
|
|
1245
|
-
* The corner radius of the border box. At least 0; default 0.
|
|
1246
|
-
*
|
|
1263
|
+
* The corner radius of the border box. At least 0; default 0. Capped at half the box's
|
|
1264
|
+
* shorter side.
|
|
1247
1265
|
*/
|
|
1248
1266
|
readonly border_radius?: Animated<LayoutSize> | null;
|
|
1249
1267
|
/**
|
|
1250
|
-
* Boxes laid out in this one, in document (and paint) order. Not with
|
|
1251
|
-
* `text` or `shape`.
|
|
1268
|
+
* Boxes laid out in this one, in document (and paint) order. Not with `text` or `shape`.
|
|
1252
1269
|
*/
|
|
1253
1270
|
readonly children?: readonly LayoutNode[];
|
|
1254
|
-
/**
|
|
1255
|
-
* Text color. Inherited; the root's is white.
|
|
1256
|
-
*/
|
|
1257
|
-
readonly color?: Rgba | null;
|
|
1258
1271
|
/**
|
|
1259
1272
|
* Space between columns, in place of `gap`. At least 0.
|
|
1260
1273
|
*/
|
|
1261
1274
|
readonly column_gap?: Animated<LayoutSize> | null;
|
|
1262
1275
|
/**
|
|
1263
|
-
* How the box lays its children out. Default `flex`.
|
|
1264
|
-
* text or shape content
|
|
1276
|
+
* How the box lays its children out. Default `flex`. Like every container field, not on a
|
|
1277
|
+
* box with text or shape content.
|
|
1265
1278
|
*/
|
|
1266
1279
|
readonly display?: Display | null;
|
|
1280
|
+
/**
|
|
1281
|
+
* What paints the text's glyphs, as a text style's `fill`. Inherited; the root's is white.
|
|
1282
|
+
*/
|
|
1283
|
+
readonly fill?: Paint | null;
|
|
1267
1284
|
/**
|
|
1268
1285
|
* The main size before growing and shrinking. `None` is auto.
|
|
1269
1286
|
*/
|
|
@@ -1273,34 +1290,32 @@ export interface LayoutNode {
|
|
|
1273
1290
|
*/
|
|
1274
1291
|
readonly flex_direction?: FlexDirection | null;
|
|
1275
1292
|
/**
|
|
1276
|
-
* How much of a flex container's free space the box takes. At least
|
|
1277
|
-
*
|
|
1293
|
+
* How much of a flex container's free space the box takes. At least 0; default 0. Like
|
|
1294
|
+
* every flex item field, not in a grid.
|
|
1278
1295
|
*/
|
|
1279
1296
|
readonly flex_grow?: Animated<number> | null;
|
|
1280
1297
|
/**
|
|
1281
|
-
* How much the box gives up when a flex container's space runs short.
|
|
1282
|
-
*
|
|
1298
|
+
* How much the box gives up when a flex container's space runs short. At least 0; default
|
|
1299
|
+
* 1.
|
|
1283
1300
|
*/
|
|
1284
1301
|
readonly flex_shrink?: Animated<number> | null;
|
|
1285
1302
|
/**
|
|
1286
|
-
* Whether a flex container's children wrap onto more lines. Default
|
|
1287
|
-
* `nowrap`.
|
|
1303
|
+
* Whether a flex container's children wrap onto more lines. Default `nowrap`.
|
|
1288
1304
|
*/
|
|
1289
1305
|
readonly flex_wrap?: FlexWrap | null;
|
|
1290
1306
|
/**
|
|
1291
|
-
* The family the box's text draws in, as a text style's
|
|
1292
|
-
*
|
|
1307
|
+
* The family the box's text draws in, as a text style's `font_family`. Inherited; the
|
|
1308
|
+
* root's is the host's first font.
|
|
1293
1309
|
*/
|
|
1294
1310
|
readonly font_family?: string | null;
|
|
1295
1311
|
/**
|
|
1296
|
-
* Font size: positive, at most `MAX_LAYOUT_FONT_SIZE` of the
|
|
1297
|
-
*
|
|
1312
|
+
* Font size: positive, at most `MAX_LAYOUT_FONT_SIZE` of the picture's shorter side.
|
|
1313
|
+
* Inherited; the root's is 0.05.
|
|
1298
1314
|
*/
|
|
1299
1315
|
readonly font_size?: Animated<LayoutSize> | null;
|
|
1300
1316
|
/**
|
|
1301
|
-
* The weight
|
|
1302
|
-
*
|
|
1303
|
-
* animated. Inherited; the root's is 400.
|
|
1317
|
+
* The weight in `[1, 1000]` used to match the family's faces, as a text style's
|
|
1318
|
+
* `font_weight`. Not animated. Inherited; the root's is 400.
|
|
1304
1319
|
*/
|
|
1305
1320
|
readonly font_weight?: number | null;
|
|
1306
1321
|
/**
|
|
@@ -1320,8 +1335,8 @@ export interface LayoutNode {
|
|
|
1320
1335
|
*/
|
|
1321
1336
|
readonly grid_auto_rows?: TrackList | null;
|
|
1322
1337
|
/**
|
|
1323
|
-
* The box's columns in its grid, as CSS writes them (`2`, `"1 / 3"`,
|
|
1324
|
-
* `
|
|
1338
|
+
* The box's columns in its grid, as CSS writes them (`2`, `"1 / 3"`, `"span 2"`). Default
|
|
1339
|
+
* `auto`.
|
|
1325
1340
|
*/
|
|
1326
1341
|
readonly grid_column?: GridPlacement | null;
|
|
1327
1342
|
/**
|
|
@@ -1346,38 +1361,30 @@ export interface LayoutNode {
|
|
|
1346
1361
|
*/
|
|
1347
1362
|
readonly inset?: LayoutInset | null;
|
|
1348
1363
|
/**
|
|
1349
|
-
* Where children lie along the main (
|
|
1350
|
-
* `start`.
|
|
1364
|
+
* Where children lie along the main (for a grid, inline) axis. Default `start`.
|
|
1351
1365
|
*/
|
|
1352
1366
|
readonly justify_content?: JustifyContent | null;
|
|
1353
1367
|
/**
|
|
1354
|
-
* Where a grid's children lie in their grid areas' columns. Default
|
|
1355
|
-
* `stretch`.
|
|
1368
|
+
* Where a grid's children lie in their grid areas' columns. Default `stretch`.
|
|
1356
1369
|
*/
|
|
1357
1370
|
readonly justify_items?: AlignItems | null;
|
|
1358
1371
|
/**
|
|
1359
|
-
* Where the box lies in its grid area's column. `None` follows the
|
|
1360
|
-
*
|
|
1361
|
-
* item field.
|
|
1372
|
+
* Where the box lies in its grid area's column. `None` follows the parent's
|
|
1373
|
+
* `justify_items`. Like every grid item field, not in a flex container.
|
|
1362
1374
|
*/
|
|
1363
1375
|
readonly justify_self?: AlignItems | null;
|
|
1364
1376
|
/**
|
|
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.
|
|
1377
|
+
* Space after each character, as a fraction of the font size, in `[-0.5, 1]`, as a text
|
|
1378
|
+
* style's `letter_spacing`. Not animated. Inherited; the root's is 0.
|
|
1369
1379
|
*/
|
|
1370
1380
|
readonly letter_spacing?: number | null;
|
|
1371
1381
|
/**
|
|
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.
|
|
1382
|
+
* Baseline-to-baseline distance in font sizes, in `[0.5, 3]`, as a text style's
|
|
1383
|
+
* `line_height`. Inherited; the root's is 1.2.
|
|
1376
1384
|
*/
|
|
1377
1385
|
readonly line_height?: number | null;
|
|
1378
1386
|
/**
|
|
1379
|
-
* Space outside the border, written as `padding` is. Sides may be
|
|
1380
|
-
* negative; there is no `auto`.
|
|
1387
|
+
* Space outside the border, written as `padding` is. Sides may be negative; no `auto`.
|
|
1381
1388
|
*/
|
|
1382
1389
|
readonly margin?: Animated<Insets> | null;
|
|
1383
1390
|
/**
|
|
@@ -1397,22 +1404,16 @@ export interface LayoutNode {
|
|
|
1397
1404
|
*/
|
|
1398
1405
|
readonly min_width?: Animated<LayoutLength> | null;
|
|
1399
1406
|
/**
|
|
1400
|
-
* Opacity of the box and everything in it
|
|
1401
|
-
* Drawn after layout; it never moves a box.
|
|
1407
|
+
* Opacity of the box and everything in it as one group, in `0..=1`. Applied after layout.
|
|
1402
1408
|
*/
|
|
1403
1409
|
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
1410
|
/**
|
|
1410
1411
|
* Whether content past the padding box is drawn. Default `visible`.
|
|
1411
1412
|
*/
|
|
1412
1413
|
readonly overflow?: Overflow | null;
|
|
1413
1414
|
/**
|
|
1414
|
-
* Space inside the border: a length, the CSS shorthand
|
|
1415
|
-
*
|
|
1415
|
+
* Space inside the border: a length, the CSS shorthand (`"8px 16px"`), or the sides object.
|
|
1416
|
+
* Sides at least 0; default 0.
|
|
1416
1417
|
*/
|
|
1417
1418
|
readonly padding?: Animated<Insets> | null;
|
|
1418
1419
|
/**
|
|
@@ -1420,45 +1421,57 @@ export interface LayoutNode {
|
|
|
1420
1421
|
*/
|
|
1421
1422
|
readonly position?: Position | null;
|
|
1422
1423
|
/**
|
|
1423
|
-
* Clockwise rotation of the box and everything in it about its
|
|
1424
|
-
*
|
|
1424
|
+
* Clockwise rotation of the box and everything in it about its border-box centre, in
|
|
1425
|
+
* degrees, after layout.
|
|
1425
1426
|
*/
|
|
1426
1427
|
readonly rotation_degrees?: Animated<number> | null;
|
|
1427
1428
|
/**
|
|
1428
|
-
* Space between rows (
|
|
1429
|
-
*
|
|
1429
|
+
* Space between rows (or lines of a wrapping row flex container), in place of `gap`. At
|
|
1430
|
+
* least 0.
|
|
1430
1431
|
*/
|
|
1431
1432
|
readonly row_gap?: Animated<LayoutSize> | null;
|
|
1432
1433
|
/**
|
|
1433
|
-
* Per-axis scale of the box and everything in it about its border-box
|
|
1434
|
-
* centre, after layout.
|
|
1434
|
+
* Per-axis scale of the box and everything in it about its border-box centre, after layout.
|
|
1435
1435
|
*/
|
|
1436
1436
|
readonly scale?: Animated<Vec2> | null;
|
|
1437
1437
|
/**
|
|
1438
|
-
*
|
|
1439
|
-
* `
|
|
1438
|
+
* Shadows of the glyphs and strokes, as a text style's `shadows`. Inherited as a whole list
|
|
1439
|
+
* (as CSS `text-shadow`); the root has none.
|
|
1440
|
+
*/
|
|
1441
|
+
readonly shadows?: readonly TextShadow[] | null;
|
|
1442
|
+
/**
|
|
1443
|
+
* Shapes drawn on a picture the size of the box's content box. Not with `children` or
|
|
1444
|
+
* `text`.
|
|
1440
1445
|
*/
|
|
1441
1446
|
readonly shape?: LayoutShape | null;
|
|
1442
1447
|
/**
|
|
1443
|
-
*
|
|
1444
|
-
*
|
|
1445
|
-
|
|
1446
|
-
|
|
1448
|
+
* Bands around the glyphs, as a text style's `strokes`. Inherited as a whole list; the root
|
|
1449
|
+
* has none.
|
|
1450
|
+
*/
|
|
1451
|
+
readonly strokes?: readonly TextStroke[] | null;
|
|
1452
|
+
/**
|
|
1453
|
+
* The box's text, wrapped at its content width in the inherited style; `\n` starts a line.
|
|
1454
|
+
* At most `MAX_TEXT_CONTENT_BYTES` bytes per value; may be empty. Keyframes all `hold`.
|
|
1455
|
+
* Not with `children` or `shape`.
|
|
1447
1456
|
*/
|
|
1448
1457
|
readonly text?: Animated<string> | null;
|
|
1449
1458
|
/**
|
|
1450
|
-
* How lines align within the content width. Inherited; the root's is
|
|
1451
|
-
* `start`.
|
|
1459
|
+
* How lines align within the content width. Inherited; the root's is `start`.
|
|
1452
1460
|
*/
|
|
1453
1461
|
readonly text_align?: TextAlign | null;
|
|
1454
1462
|
/**
|
|
1455
|
-
*
|
|
1456
|
-
*
|
|
1463
|
+
* Per-character motion of the box's own text, Range selectors only (layout text has no
|
|
1464
|
+
* runs). At most `MAX_TEXT_ANIMATORS`, keyed in picture time. Not inherited; never
|
|
1465
|
+
* changes layout.
|
|
1466
|
+
*/
|
|
1467
|
+
readonly text_animators?: readonly TextAnimator[];
|
|
1468
|
+
/**
|
|
1469
|
+
* Offset of the box and everything in it after layout: the object, or one or two lengths as
|
|
1470
|
+
* CSS `translate` writes them.
|
|
1457
1471
|
*/
|
|
1458
1472
|
readonly translate?: Animated<LayoutOffset> | null;
|
|
1459
1473
|
/**
|
|
1460
|
-
* Border-box width. `None` is auto.
|
|
1461
|
-
* field.
|
|
1474
|
+
* Border-box width. `None` is auto. Like every item field, not on the root.
|
|
1462
1475
|
*/
|
|
1463
1476
|
readonly width?: Animated<LayoutLength> | null;
|
|
1464
1477
|
}
|
|
@@ -1470,10 +1483,8 @@ export type LayoutOffset = string | {
|
|
|
1470
1483
|
readonly y: LayoutSize;
|
|
1471
1484
|
};
|
|
1472
1485
|
/**
|
|
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.
|
|
1486
|
+
* A box's shapes, drawn as a shapes generator draws its items on a picture the size of the
|
|
1487
|
+
* box's content box. A shape box has no size of its own.
|
|
1477
1488
|
*/
|
|
1478
1489
|
export interface LayoutShape {
|
|
1479
1490
|
/**
|
|
@@ -1507,8 +1518,7 @@ export type LineCap = "butt" | "round" | "square";
|
|
|
1507
1518
|
*/
|
|
1508
1519
|
export type LineJoin = "miter" | "round" | "bevel";
|
|
1509
1520
|
/**
|
|
1510
|
-
* Named RGB primaries linear-light media may be in, each with its own white
|
|
1511
|
-
* point.
|
|
1521
|
+
* Named RGB primaries linear-light media may be in, each with its own white point.
|
|
1512
1522
|
*/
|
|
1513
1523
|
export type LinearPrimaries = "bt709" | "bt2020" | "p3_d65" | "aces_ap0" | "aces_ap1";
|
|
1514
1524
|
/**
|
|
@@ -1518,8 +1528,8 @@ export type LoopMode = "repeat" | "ping_pong";
|
|
|
1518
1528
|
/**
|
|
1519
1529
|
* How a mask combines with the coverage of the masks before it.
|
|
1520
1530
|
*
|
|
1521
|
-
* Coverage starts empty when the first mask adds
|
|
1522
|
-
*
|
|
1531
|
+
* Coverage starts empty when the first mask adds and full otherwise, so a clip whose only
|
|
1532
|
+
* mask subtracts is visible outside the shape.
|
|
1523
1533
|
*/
|
|
1524
1534
|
export type MaskMode = "add" | "subtract" | "intersect";
|
|
1525
1535
|
/**
|
|
@@ -1527,8 +1537,8 @@ export type MaskMode = "add" | "subtract" | "intersect";
|
|
|
1527
1537
|
*/
|
|
1528
1538
|
export interface MasterAudio {
|
|
1529
1539
|
/**
|
|
1530
|
-
* Ordered single-input effects applied to the summed track buses, at
|
|
1531
|
-
*
|
|
1540
|
+
* Ordered single-input effects applied to the summed track buses, at most
|
|
1541
|
+
* `MAX_CHAIN_EFFECTS`.
|
|
1532
1542
|
*
|
|
1533
1543
|
* @defaultValue `[]`
|
|
1534
1544
|
*/
|
|
@@ -1540,8 +1550,8 @@ export interface MasterAudio {
|
|
|
1540
1550
|
*/
|
|
1541
1551
|
readonly gain?: Animated<number>;
|
|
1542
1552
|
/**
|
|
1543
|
-
* Final peak limiter.
|
|
1544
|
-
*
|
|
1553
|
+
* Final peak limiter. Omitted means `Limiter::default`; an explicit `null` leaves the mix
|
|
1554
|
+
* unlimited.
|
|
1545
1555
|
*
|
|
1546
1556
|
* @defaultValue `{"release_ms":50,"threshold":1}`
|
|
1547
1557
|
*/
|
|
@@ -1550,9 +1560,8 @@ export interface MasterAudio {
|
|
|
1550
1560
|
/**
|
|
1551
1561
|
* Another visual clip whose picture sets where this clip is visible.
|
|
1552
1562
|
*
|
|
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.
|
|
1563
|
+
* The matte clip is drawn, with its own transform and effects, only into the matte and is
|
|
1564
|
+
* never composited itself. Where it is not active, coverage is zero.
|
|
1556
1565
|
*/
|
|
1557
1566
|
export interface Matte {
|
|
1558
1567
|
/**
|
|
@@ -1569,11 +1578,10 @@ export interface Matte {
|
|
|
1569
1578
|
*/
|
|
1570
1579
|
export type MatteMode = "alpha" | "alpha_inverted" | "luma" | "luma_inverted";
|
|
1571
1580
|
/**
|
|
1572
|
-
* Evidence of a source's media, each part recorded only when
|
|
1581
|
+
* Evidence of a source's media, each part recorded only when known.
|
|
1573
1582
|
*
|
|
1574
|
-
* A matching content hash proves the same bytes
|
|
1575
|
-
*
|
|
1576
|
-
* candidates and never decides whether a candidate is the same media.
|
|
1583
|
+
* A matching content hash proves the same bytes; without one, the other parts can only show
|
|
1584
|
+
* a difference. `modified_ms` narrows a search and never decides identity.
|
|
1577
1585
|
*/
|
|
1578
1586
|
export interface MediaFingerprint {
|
|
1579
1587
|
/**
|
|
@@ -1589,10 +1597,8 @@ export interface MediaFingerprint {
|
|
|
1589
1597
|
*/
|
|
1590
1598
|
readonly content_sha256?: string | null;
|
|
1591
1599
|
/**
|
|
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.
|
|
1600
|
+
* Where the media ends on its own timeline, in ticks: first presentation plus length (a
|
|
1601
|
+
* stream starting at 1.4 s and lasting 2 s ends at 3.4 s). Non-negative.
|
|
1596
1602
|
*/
|
|
1597
1603
|
readonly duration_ticks?: number | null;
|
|
1598
1604
|
/**
|
|
@@ -1613,43 +1619,35 @@ export type MediaKind = "video" | "audio" | "image" | "generated" | "composition
|
|
|
1613
1619
|
*/
|
|
1614
1620
|
export interface MediaSource {
|
|
1615
1621
|
/**
|
|
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.
|
|
1622
|
+
* The color a `MediaKind::Video` source's pictures are in, overriding frame and stream
|
|
1623
|
+
* tags on every host. Recorded at import or declared to correct missing or wrong tags;
|
|
1624
|
+
* `None` leaves the tags in charge. Stills are always read as sRGB code values.
|
|
1621
1625
|
*
|
|
1622
1626
|
* @defaultValue `null`
|
|
1623
1627
|
*/
|
|
1624
1628
|
readonly color_metadata?: ColorMetadata | null;
|
|
1625
1629
|
/**
|
|
1626
|
-
* The composition a `MediaKind::Composition` source shows; present
|
|
1627
|
-
* exactly for that kind.
|
|
1630
|
+
* The composition a `MediaKind::Composition` source shows; present exactly for that kind.
|
|
1628
1631
|
*/
|
|
1629
1632
|
readonly composition?: CompositionId | null;
|
|
1630
1633
|
/**
|
|
1631
|
-
* What the host found at the locator when the project recorded it, so
|
|
1632
|
-
*
|
|
1633
|
-
* source has none.
|
|
1634
|
+
* What the host found at the locator when the project recorded it, so another host can tell
|
|
1635
|
+
* whether media it finds is the same. Generated sources have none.
|
|
1634
1636
|
*/
|
|
1635
1637
|
readonly fingerprint?: MediaFingerprint | null;
|
|
1636
1638
|
/**
|
|
1637
|
-
* What a `MediaKind::Generated` source draws; present exactly for
|
|
1638
|
-
* that kind.
|
|
1639
|
+
* What a `MediaKind::Generated` source draws; present exactly for that kind.
|
|
1639
1640
|
*
|
|
1640
1641
|
* @defaultValue `null`
|
|
1641
1642
|
*/
|
|
1642
1643
|
readonly generator?: Generator | null;
|
|
1643
1644
|
/**
|
|
1644
|
-
* Whether
|
|
1645
|
-
*
|
|
1646
|
-
*
|
|
1647
|
-
* and plays the source silent; the document keeps the stream for the
|
|
1648
|
-
* hosts that can.
|
|
1645
|
+
* Whether the media has an audio stream. This is a fact of the file, recorded the same by
|
|
1646
|
+
* every host whether or not it can decode the stream; a host that cannot plays the source
|
|
1647
|
+
* silent.
|
|
1649
1648
|
*
|
|
1650
|
-
* `MediaKind::Audio` always does. A `MediaKind::Video` source
|
|
1651
|
-
*
|
|
1652
|
-
* unset keeps a video clip silent.
|
|
1649
|
+
* `MediaKind::Audio` always does. A `MediaKind::Video` source must declare it for its
|
|
1650
|
+
* clips on a visual track to contribute to the mix.
|
|
1653
1651
|
*
|
|
1654
1652
|
* @defaultValue `false`
|
|
1655
1653
|
*/
|
|
@@ -1663,16 +1661,15 @@ export interface MediaSource {
|
|
|
1663
1661
|
*/
|
|
1664
1662
|
readonly kind: MediaKind;
|
|
1665
1663
|
/**
|
|
1666
|
-
* Opaque URI or host locator
|
|
1667
|
-
*
|
|
1668
|
-
* `MediaKind::Composition` source has none.
|
|
1664
|
+
* Opaque URI or host locator; the engine does not open it. Required except for
|
|
1665
|
+
* `MediaKind::Generated` and `MediaKind::Composition` sources.
|
|
1669
1666
|
*
|
|
1670
1667
|
* @defaultValue `""`
|
|
1671
1668
|
*/
|
|
1672
1669
|
readonly locator?: string;
|
|
1673
1670
|
/**
|
|
1674
|
-
* The extension provider that
|
|
1675
|
-
*
|
|
1671
|
+
* The extension provider and settings that supply this source's media when the host's own
|
|
1672
|
+
* decoders do not read it.
|
|
1676
1673
|
*/
|
|
1677
1674
|
readonly provider?: ProviderSource | null;
|
|
1678
1675
|
}
|
|
@@ -1714,14 +1711,12 @@ export type NodeId = string;
|
|
|
1714
1711
|
/**
|
|
1715
1712
|
* The operation of a `CompositionNode`.
|
|
1716
1713
|
*
|
|
1717
|
-
* Animated settings are keyed in composition time (see
|
|
1718
|
-
* `ClipComposition`), not timeline time.
|
|
1714
|
+
* Animated settings are keyed in composition time (see `ClipComposition`).
|
|
1719
1715
|
*/
|
|
1720
1716
|
export type NodeOp = {
|
|
1721
1717
|
/**
|
|
1722
|
-
* The picture of the clip showing the composition: its source at the
|
|
1723
|
-
*
|
|
1724
|
-
* draws.
|
|
1718
|
+
* The picture of the clip showing the composition: its source at the time-mapped source
|
|
1719
|
+
* time, or what its generated source draws.
|
|
1725
1720
|
*/
|
|
1726
1721
|
readonly type: "clip";
|
|
1727
1722
|
} | {
|
|
@@ -1736,8 +1731,8 @@ export type NodeOp = {
|
|
|
1736
1731
|
*/
|
|
1737
1732
|
readonly start?: MediaTime;
|
|
1738
1733
|
/**
|
|
1739
|
-
* Another visual source, read at `start` plus the composition time.
|
|
1740
|
-
*
|
|
1734
|
+
* Another visual source, read at `start` plus the composition time. Adds no sound to the
|
|
1735
|
+
* mix.
|
|
1741
1736
|
*/
|
|
1742
1737
|
readonly type: "media";
|
|
1743
1738
|
} | {
|
|
@@ -1761,16 +1756,13 @@ export type NodeOp = {
|
|
|
1761
1756
|
*/
|
|
1762
1757
|
readonly input?: NodeId | null;
|
|
1763
1758
|
/**
|
|
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.
|
|
1759
|
+
* The images the effect samples besides its input, by the names its definition declares
|
|
1760
|
+
* (`sample_<name>` in its shader); at most `MAX_EFFECT_INPUTS`. An undeclared name, or a
|
|
1761
|
+
* declared one left out, fails the frames that draw the node.
|
|
1769
1762
|
*/
|
|
1770
1763
|
readonly inputs?: Readonly<Record<string, NodeId | null>>;
|
|
1771
1764
|
/**
|
|
1772
|
-
* A registered effect: its input
|
|
1773
|
-
* besides.
|
|
1765
|
+
* A registered effect: its input plus any named images it samples.
|
|
1774
1766
|
*/
|
|
1775
1767
|
readonly type: "effect";
|
|
1776
1768
|
} | {
|
|
@@ -1853,8 +1845,8 @@ export type NodeOp = {
|
|
|
1853
1845
|
*/
|
|
1854
1846
|
readonly input?: NodeId | null;
|
|
1855
1847
|
/**
|
|
1856
|
-
* The shapes, combined in order; at most `MAX_CLIP_MASKS`.
|
|
1857
|
-
*
|
|
1848
|
+
* The shapes, combined in order; at most `MAX_CLIP_MASKS`. Geometry is in the
|
|
1849
|
+
* input image's normalized space.
|
|
1858
1850
|
*/
|
|
1859
1851
|
readonly masks: readonly ShapeMask[];
|
|
1860
1852
|
/**
|
|
@@ -1867,8 +1859,8 @@ export type NodeOp = {
|
|
|
1867
1859
|
*/
|
|
1868
1860
|
readonly composition: CompositionId;
|
|
1869
1861
|
/**
|
|
1870
|
-
* Values for its controls, by name;
|
|
1871
|
-
*
|
|
1862
|
+
* Values for its controls, by name; unset controls keep the composition's own value. Keyed
|
|
1863
|
+
* in composition time.
|
|
1872
1864
|
*/
|
|
1873
1865
|
readonly controls?: Readonly<Record<string, Animated<EffectValue>>>;
|
|
1874
1866
|
/**
|
|
@@ -1878,9 +1870,8 @@ export type NodeOp = {
|
|
|
1878
1870
|
*/
|
|
1879
1871
|
readonly inputs?: readonly (NodeId | null)[];
|
|
1880
1872
|
/**
|
|
1881
|
-
* Another composition drawn in this one's time
|
|
1882
|
-
*
|
|
1883
|
-
* from `controls`.
|
|
1873
|
+
* Another composition drawn in this one's time as a group: its output, with group inputs
|
|
1874
|
+
* fed from `inputs` and controls set from `controls`.
|
|
1884
1875
|
*/
|
|
1885
1876
|
readonly type: "group";
|
|
1886
1877
|
} | {
|
|
@@ -1889,8 +1880,7 @@ export type NodeOp = {
|
|
|
1889
1880
|
*/
|
|
1890
1881
|
readonly index: number;
|
|
1891
1882
|
/**
|
|
1892
|
-
* In a composition used as a group, the image the group node gives its
|
|
1893
|
-
* input `index`.
|
|
1883
|
+
* In a composition used as a group, the image the group node gives its input `index`.
|
|
1894
1884
|
*/
|
|
1895
1885
|
readonly type: "group_input";
|
|
1896
1886
|
};
|
|
@@ -1901,13 +1891,9 @@ export type Overflow = "visible" | "hidden";
|
|
|
1901
1891
|
/**
|
|
1902
1892
|
* A color or gradient.
|
|
1903
1893
|
*
|
|
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.
|
|
1894
|
+
* Gradients interpolate premultiplied stops in linear light, so a gradient between two colors
|
|
1895
|
+
* passes through their physical mix and a stop fading to transparent does not darken its
|
|
1896
|
+
* neighbour. A bare color is read as a solid paint; paints are written back tagged.
|
|
1911
1897
|
*/
|
|
1912
1898
|
export type Paint = {
|
|
1913
1899
|
/**
|
|
@@ -1947,8 +1933,8 @@ export type Paint = {
|
|
|
1947
1933
|
*/
|
|
1948
1934
|
readonly center: Vec2;
|
|
1949
1935
|
/**
|
|
1950
|
-
* The distance of offset 1 from the centre, as a fraction of the
|
|
1951
|
-
*
|
|
1936
|
+
* The distance of offset 1 from the centre, as a fraction of the picture's shorter side.
|
|
1937
|
+
* Positive.
|
|
1952
1938
|
*/
|
|
1953
1939
|
readonly radius: number;
|
|
1954
1940
|
/**
|
|
@@ -1990,15 +1976,15 @@ export type Paint = {
|
|
|
1990
1976
|
*/
|
|
1991
1977
|
export interface Path {
|
|
1992
1978
|
/**
|
|
1993
|
-
* The subpaths, at most `MAX_PATH_SUBPATHS`, with at most
|
|
1994
|
-
*
|
|
1979
|
+
* The subpaths, at most `MAX_PATH_SUBPATHS`, with at most `MAX_PATH_VERTICES` vertices
|
|
1980
|
+
* in total.
|
|
1995
1981
|
*/
|
|
1996
1982
|
readonly subpaths: readonly Subpath[];
|
|
1997
1983
|
}
|
|
1998
1984
|
/**
|
|
1999
|
-
* A path vertex and its tangents. The segment from
|
|
2000
|
-
* `
|
|
2001
|
-
*
|
|
1985
|
+
* A path vertex and its tangents. The segment from `a` to `b` is the cubic Bezier through
|
|
1986
|
+
* `a.point`, `a.point + a.out_tangent`, `b.point + b.in_tangent` and `b.point`; zero tangents
|
|
1987
|
+
* make it straight.
|
|
2002
1988
|
*/
|
|
2003
1989
|
export interface PathVertex {
|
|
2004
1990
|
/**
|
|
@@ -2023,18 +2009,16 @@ export interface PathVertex {
|
|
|
2023
2009
|
*/
|
|
2024
2010
|
export interface PointKeyframe {
|
|
2025
2011
|
/**
|
|
2026
|
-
* The
|
|
2027
|
-
* to this value: that curve's second control point.
|
|
2012
|
+
* The curve's second control point from the previous keyframe, relative to this value.
|
|
2028
2013
|
*/
|
|
2029
2014
|
readonly in_tangent?: Vec2;
|
|
2030
2015
|
/**
|
|
2031
|
-
* Interpolation from this keyframe to its successor: how fast the value
|
|
2032
|
-
*
|
|
2016
|
+
* Interpolation from this keyframe to its successor: how fast the value travels along the
|
|
2017
|
+
* way.
|
|
2033
2018
|
*/
|
|
2034
2019
|
readonly interpolation: Interpolation;
|
|
2035
2020
|
/**
|
|
2036
|
-
* The
|
|
2037
|
-
* value: the curve's first control point.
|
|
2021
|
+
* The curve's first control point toward the next keyframe, relative to this value.
|
|
2038
2022
|
*/
|
|
2039
2023
|
readonly out_tangent?: Vec2;
|
|
2040
2024
|
/**
|
|
@@ -2063,17 +2047,14 @@ export type ProjectId = string;
|
|
|
2063
2047
|
*/
|
|
2064
2048
|
export interface ProjectSettings {
|
|
2065
2049
|
/**
|
|
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.
|
|
2050
|
+
* Opaque color under every layer, in preview and export alike, so empty canvas is never
|
|
2051
|
+
* left to a host or encoder.
|
|
2070
2052
|
*
|
|
2071
2053
|
* @defaultValue `{"blue":0,"green":0,"red":0}`
|
|
2072
2054
|
*/
|
|
2073
2055
|
readonly background?: Rgb;
|
|
2074
2056
|
/**
|
|
2075
|
-
* The space in which clips' blend modes are evaluated, in preview and
|
|
2076
|
-
* export alike.
|
|
2057
|
+
* The space in which clips' blend modes are evaluated, in preview and export alike.
|
|
2077
2058
|
*
|
|
2078
2059
|
* @defaultValue `"linear_light"`
|
|
2079
2060
|
*/
|
|
@@ -2089,8 +2070,8 @@ export interface ProjectSettings {
|
|
|
2089
2070
|
*/
|
|
2090
2071
|
readonly frame_rate: FrameRate;
|
|
2091
2072
|
/**
|
|
2092
|
-
* Canvas height in output pixels, at most `MAX_CANVAS_DIMENSION`. The
|
|
2093
|
-
*
|
|
2073
|
+
* Canvas height in output pixels, at most `MAX_CANVAS_DIMENSION`. The canvas area is at
|
|
2074
|
+
* most `MAX_CANVAS_PIXELS`.
|
|
2094
2075
|
*/
|
|
2095
2076
|
readonly height: number;
|
|
2096
2077
|
/**
|
|
@@ -2103,41 +2084,37 @@ export interface ProjectSettings {
|
|
|
2103
2084
|
readonly width: number;
|
|
2104
2085
|
}
|
|
2105
2086
|
/**
|
|
2106
|
-
* A source whose media an extension provider supplies
|
|
2107
|
-
*
|
|
2087
|
+
* A source whose media an extension provider supplies instead of the host's video and image
|
|
2088
|
+
* decoders.
|
|
2108
2089
|
*
|
|
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.
|
|
2090
|
+
* A host picks the provider by probing the bytes at import, never by file name, and records
|
|
2091
|
+
* it here so every host opens the source the same way. The engine does not read it.
|
|
2113
2092
|
*/
|
|
2114
2093
|
export type ProviderSource = {
|
|
2115
2094
|
/**
|
|
2116
|
-
* A static SVG document, rasterized at
|
|
2117
|
-
* source's kind is `image`.
|
|
2095
|
+
* A static SVG document, rasterized at its shown size. The source's kind is `image`.
|
|
2118
2096
|
*/
|
|
2119
2097
|
readonly format: "svg";
|
|
2120
2098
|
} | {
|
|
2121
2099
|
/**
|
|
2122
|
-
* A GIF, animated WebP, or APNG: one cycle of frames, each with its own
|
|
2123
|
-
*
|
|
2100
|
+
* A GIF, animated WebP, or APNG: one cycle of frames, each with its own duration.
|
|
2101
|
+
* Repetition is the clip's. The source's kind is `video`.
|
|
2124
2102
|
*/
|
|
2125
2103
|
readonly format: "animated_image";
|
|
2126
2104
|
} | {
|
|
2127
2105
|
/**
|
|
2128
|
-
* The dotLottie animation shown, by
|
|
2129
|
-
*
|
|
2106
|
+
* The dotLottie animation shown, by ID. Absent means the package's first; always absent
|
|
2107
|
+
* for a Lottie JSON file.
|
|
2130
2108
|
*/
|
|
2131
2109
|
readonly animation?: string | null;
|
|
2132
2110
|
/**
|
|
2133
|
-
* A Lottie animation
|
|
2134
|
-
*
|
|
2111
|
+
* A Lottie animation (JSON file or dotLottie package), evaluated at its own frames. The
|
|
2112
|
+
* source's kind is `video`.
|
|
2135
2113
|
*/
|
|
2136
2114
|
readonly format: "lottie";
|
|
2137
2115
|
} | {
|
|
2138
2116
|
/**
|
|
2139
|
-
* Still images played in order at a fixed rate. The source's kind is
|
|
2140
|
-
* `video`.
|
|
2117
|
+
* Still images played in order at a fixed rate. The source's kind is `video`.
|
|
2141
2118
|
*/
|
|
2142
2119
|
readonly format: "image_sequence";
|
|
2143
2120
|
/**
|
|
@@ -2145,9 +2122,8 @@ export type ProviderSource = {
|
|
|
2145
2122
|
*/
|
|
2146
2123
|
readonly frame_rate: FrameRate;
|
|
2147
2124
|
/**
|
|
2148
|
-
* Each frame's locator, in play order. `null`
|
|
2149
|
-
*
|
|
2150
|
-
* it.
|
|
2125
|
+
* Each frame's locator, in play order. `null` marks a missing number, allowed only when
|
|
2126
|
+
* `missing` says how to show it.
|
|
2151
2127
|
*/
|
|
2152
2128
|
readonly frames: readonly (string | null)[];
|
|
2153
2129
|
/**
|
|
@@ -2157,8 +2133,8 @@ export type ProviderSource = {
|
|
|
2157
2133
|
*/
|
|
2158
2134
|
readonly missing?: MissingFrames;
|
|
2159
2135
|
/**
|
|
2160
|
-
* The primaries OpenEXR frames' linear RGB
|
|
2161
|
-
*
|
|
2136
|
+
* The primaries of OpenEXR frames' linear RGB, overriding the first frame's
|
|
2137
|
+
* chromaticities. Only for OpenEXR frames.
|
|
2162
2138
|
*/
|
|
2163
2139
|
readonly primaries?: LinearPrimaries | null;
|
|
2164
2140
|
/**
|
|
@@ -2169,20 +2145,26 @@ export type ProviderSource = {
|
|
|
2169
2145
|
readonly start_number?: number;
|
|
2170
2146
|
} | {
|
|
2171
2147
|
/**
|
|
2172
|
-
* A still OpenEXR image: linear-light RGB(A), read at half precision.
|
|
2173
|
-
*
|
|
2148
|
+
* A still OpenEXR image: linear-light RGB(A), read at half precision. The source's kind is
|
|
2149
|
+
* `image`.
|
|
2174
2150
|
*/
|
|
2175
2151
|
readonly format: "exr";
|
|
2176
2152
|
/**
|
|
2177
|
-
* The primaries its linear RGB
|
|
2178
|
-
*
|
|
2179
|
-
* defines).
|
|
2153
|
+
* The primaries of its linear RGB, overriding the file's chromaticities (BT.709 when the
|
|
2154
|
+
* file has none, as OpenEXR defines).
|
|
2180
2155
|
*/
|
|
2181
2156
|
readonly primaries?: LinearPrimaries | null;
|
|
2182
2157
|
};
|
|
2183
2158
|
/**
|
|
2184
|
-
*
|
|
2185
|
-
|
|
2159
|
+
* How selection rises and falls across a Range selector's range.
|
|
2160
|
+
*/
|
|
2161
|
+
export type RangeShape = "square" | "ramp_up" | "ramp_down" | "triangle" | "round" | "smooth";
|
|
2162
|
+
/**
|
|
2163
|
+
* What a Range selector's start, end and offset count in.
|
|
2164
|
+
*/
|
|
2165
|
+
export type RangeUnits = "percent" | "index";
|
|
2166
|
+
/**
|
|
2167
|
+
* An opaque color as a color picker shows it: straight, sRGB-encoded components in `0..=1`.
|
|
2186
2168
|
*/
|
|
2187
2169
|
export interface Rgb {
|
|
2188
2170
|
/**
|
|
@@ -2199,12 +2181,10 @@ export interface Rgb {
|
|
|
2199
2181
|
readonly red: number;
|
|
2200
2182
|
}
|
|
2201
2183
|
/**
|
|
2202
|
-
* A straight (not premultiplied), sRGB-encoded color with alpha, each
|
|
2203
|
-
* component in `0..=1`.
|
|
2184
|
+
* A straight (not premultiplied), sRGB-encoded color with alpha, each component in `0..=1`.
|
|
2204
2185
|
*
|
|
2205
|
-
*
|
|
2206
|
-
*
|
|
2207
|
-
* written back as the object: a component need not be a multiple of 1/255.
|
|
2186
|
+
* Read from the object or CSS hex (`"#rgb"`, `"#rgba"`, `"#rrggbb"`, `"#rrggbbaa"`, any
|
|
2187
|
+
* case). Always written back as the object, since components need not be multiples of 1/255.
|
|
2208
2188
|
*/
|
|
2209
2189
|
export type Rgba = {
|
|
2210
2190
|
/**
|
|
@@ -2224,6 +2204,23 @@ export type Rgba = {
|
|
|
2224
2204
|
*/
|
|
2225
2205
|
readonly red: number;
|
|
2226
2206
|
} | string;
|
|
2207
|
+
/**
|
|
2208
|
+
* Which runs a Timing selector selects.
|
|
2209
|
+
*/
|
|
2210
|
+
export type RunState = "upcoming" | "active" | "spoken";
|
|
2211
|
+
/**
|
|
2212
|
+
* A run's time span.
|
|
2213
|
+
*/
|
|
2214
|
+
export interface RunTime {
|
|
2215
|
+
/**
|
|
2216
|
+
* When it ends; after `start`.
|
|
2217
|
+
*/
|
|
2218
|
+
readonly end: MediaTime;
|
|
2219
|
+
/**
|
|
2220
|
+
* When it starts.
|
|
2221
|
+
*/
|
|
2222
|
+
readonly start: MediaTime;
|
|
2223
|
+
}
|
|
2227
2224
|
/**
|
|
2228
2225
|
* A geometry alone, as a mask's outline is.
|
|
2229
2226
|
*/
|
|
@@ -2233,8 +2230,8 @@ export type ShapeGeometry = {
|
|
|
2233
2230
|
*/
|
|
2234
2231
|
readonly center: AnimatedPoint;
|
|
2235
2232
|
/**
|
|
2236
|
-
* Corner radius, as a fraction of the shorter side. Non-negative;
|
|
2237
|
-
*
|
|
2233
|
+
* Corner radius, as a fraction of the shorter side. Non-negative; capped at half the
|
|
2234
|
+
* rectangle.
|
|
2238
2235
|
*
|
|
2239
2236
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2240
2237
|
*/
|
|
@@ -2246,8 +2243,8 @@ export type ShapeGeometry = {
|
|
|
2246
2243
|
*/
|
|
2247
2244
|
readonly rotation_degrees?: Animated<number>;
|
|
2248
2245
|
/**
|
|
2249
|
-
* Full width and height
|
|
2250
|
-
*
|
|
2246
|
+
* Full width and height before rotation: x a fraction of the picture's width, y of its
|
|
2247
|
+
* height. Non-negative.
|
|
2251
2248
|
*/
|
|
2252
2249
|
readonly size: Animated<Vec2>;
|
|
2253
2250
|
/**
|
|
@@ -2266,8 +2263,8 @@ export type ShapeGeometry = {
|
|
|
2266
2263
|
*/
|
|
2267
2264
|
readonly rotation_degrees?: Animated<number>;
|
|
2268
2265
|
/**
|
|
2269
|
-
* Full width and height
|
|
2270
|
-
*
|
|
2266
|
+
* Full width and height before rotation: x a fraction of the picture's width, y of its
|
|
2267
|
+
* height. Non-negative.
|
|
2271
2268
|
*/
|
|
2272
2269
|
readonly size: Animated<Vec2>;
|
|
2273
2270
|
/**
|
|
@@ -2296,22 +2293,19 @@ export type ShapeGeometry = {
|
|
|
2296
2293
|
*/
|
|
2297
2294
|
readonly kind: PolystarKind;
|
|
2298
2295
|
/**
|
|
2299
|
-
* Distance of the points from the centre, as a fraction of the shorter
|
|
2300
|
-
* side. Non-negative.
|
|
2296
|
+
* Distance of the points from the centre, as a fraction of the shorter side. Non-negative.
|
|
2301
2297
|
*/
|
|
2302
2298
|
readonly outer_radius: Animated<number>;
|
|
2303
2299
|
/**
|
|
2304
|
-
* How round the outer corners are
|
|
2305
|
-
* them. In `0..=1`.
|
|
2300
|
+
* How round the outer corners are, in `0..=1`: 0 sharp, 1 a smooth curve through them.
|
|
2306
2301
|
*
|
|
2307
2302
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2308
2303
|
*/
|
|
2309
2304
|
readonly outer_roundness?: Animated<number>;
|
|
2310
2305
|
/**
|
|
2311
|
-
* Number of points (corners
|
|
2312
|
-
* `
|
|
2313
|
-
*
|
|
2314
|
-
* the figure one whole point at a time.
|
|
2306
|
+
* Number of points (polygon corners or star tips), from `MIN_POLYSTAR_POINTS` to
|
|
2307
|
+
* `MAX_POLYSTAR_POINTS`. A fraction is dropped when drawn, as Lottie does, so an animated
|
|
2308
|
+
* count changes one whole point at a time.
|
|
2315
2309
|
*/
|
|
2316
2310
|
readonly points: Animated<number>;
|
|
2317
2311
|
/**
|
|
@@ -2337,11 +2331,10 @@ export type ShapeGeometry = {
|
|
|
2337
2331
|
/**
|
|
2338
2332
|
* One entry of a shapes generator's content tree.
|
|
2339
2333
|
*
|
|
2340
|
-
* A group is read front to back. Geometry accumulates in its group; a fill
|
|
2341
|
-
*
|
|
2342
|
-
*
|
|
2343
|
-
*
|
|
2344
|
-
* After Effects and Lottie.
|
|
2334
|
+
* A group is read front to back. Geometry accumulates in its group; a fill or stroke paints
|
|
2335
|
+
* the geometry listed before it in the same group (nested groups included), and a trim cuts
|
|
2336
|
+
* and replaces that geometry. Earlier paints draw on top of later ones, as in After Effects
|
|
2337
|
+
* and Lottie.
|
|
2345
2338
|
*/
|
|
2346
2339
|
export type ShapeItem = {
|
|
2347
2340
|
/**
|
|
@@ -2353,9 +2346,8 @@ export type ShapeItem = {
|
|
|
2353
2346
|
*/
|
|
2354
2347
|
readonly transform?: ShapeTransform;
|
|
2355
2348
|
/**
|
|
2356
|
-
* Items drawn together
|
|
2357
|
-
*
|
|
2358
|
-
* trims after the group.
|
|
2349
|
+
* Items drawn together through one transform and opacity. Their geometry also counts as the
|
|
2350
|
+
* enclosing group's for paints and trims after the group.
|
|
2359
2351
|
*/
|
|
2360
2352
|
readonly type: "group";
|
|
2361
2353
|
} | {
|
|
@@ -2364,8 +2356,8 @@ export type ShapeItem = {
|
|
|
2364
2356
|
*/
|
|
2365
2357
|
readonly center: AnimatedPoint;
|
|
2366
2358
|
/**
|
|
2367
|
-
* Corner radius, as a fraction of the shorter side. Non-negative;
|
|
2368
|
-
*
|
|
2359
|
+
* Corner radius, as a fraction of the shorter side. Non-negative; capped at half the
|
|
2360
|
+
* rectangle.
|
|
2369
2361
|
*
|
|
2370
2362
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2371
2363
|
*/
|
|
@@ -2377,8 +2369,8 @@ export type ShapeItem = {
|
|
|
2377
2369
|
*/
|
|
2378
2370
|
readonly rotation_degrees?: Animated<number>;
|
|
2379
2371
|
/**
|
|
2380
|
-
* Full width and height
|
|
2381
|
-
*
|
|
2372
|
+
* Full width and height before rotation: x a fraction of the picture's width, y of its
|
|
2373
|
+
* height. Non-negative.
|
|
2382
2374
|
*/
|
|
2383
2375
|
readonly size: Animated<Vec2>;
|
|
2384
2376
|
/**
|
|
@@ -2397,8 +2389,8 @@ export type ShapeItem = {
|
|
|
2397
2389
|
*/
|
|
2398
2390
|
readonly rotation_degrees?: Animated<number>;
|
|
2399
2391
|
/**
|
|
2400
|
-
* Full width and height
|
|
2401
|
-
*
|
|
2392
|
+
* Full width and height before rotation: x a fraction of the picture's width, y of its
|
|
2393
|
+
* height. Non-negative.
|
|
2402
2394
|
*/
|
|
2403
2395
|
readonly size: Animated<Vec2>;
|
|
2404
2396
|
/**
|
|
@@ -2427,22 +2419,19 @@ export type ShapeItem = {
|
|
|
2427
2419
|
*/
|
|
2428
2420
|
readonly kind: PolystarKind;
|
|
2429
2421
|
/**
|
|
2430
|
-
* Distance of the points from the centre, as a fraction of the shorter
|
|
2431
|
-
* side. Non-negative.
|
|
2422
|
+
* Distance of the points from the centre, as a fraction of the shorter side. Non-negative.
|
|
2432
2423
|
*/
|
|
2433
2424
|
readonly outer_radius: Animated<number>;
|
|
2434
2425
|
/**
|
|
2435
|
-
* How round the outer corners are
|
|
2436
|
-
* them. In `0..=1`.
|
|
2426
|
+
* How round the outer corners are, in `0..=1`: 0 sharp, 1 a smooth curve through them.
|
|
2437
2427
|
*
|
|
2438
2428
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2439
2429
|
*/
|
|
2440
2430
|
readonly outer_roundness?: Animated<number>;
|
|
2441
2431
|
/**
|
|
2442
|
-
* Number of points (corners
|
|
2443
|
-
* `
|
|
2444
|
-
*
|
|
2445
|
-
* the figure one whole point at a time.
|
|
2432
|
+
* Number of points (polygon corners or star tips), from `MIN_POLYSTAR_POINTS` to
|
|
2433
|
+
* `MAX_POLYSTAR_POINTS`. A fraction is dropped when drawn, as Lottie does, so an animated
|
|
2434
|
+
* count changes one whole point at a time.
|
|
2446
2435
|
*/
|
|
2447
2436
|
readonly points: Animated<number>;
|
|
2448
2437
|
/**
|
|
@@ -2482,9 +2471,8 @@ export type ShapeItem = {
|
|
|
2482
2471
|
*/
|
|
2483
2472
|
readonly rule?: FillRule;
|
|
2484
2473
|
/**
|
|
2485
|
-
* Paints the inside of the geometry listed before it in its group,
|
|
2486
|
-
*
|
|
2487
|
-
* it.
|
|
2474
|
+
* Paints the inside of the geometry listed before it in its group, as one compound path
|
|
2475
|
+
* under `rule`. Open paths are closed for it.
|
|
2488
2476
|
*/
|
|
2489
2477
|
readonly type: "fill";
|
|
2490
2478
|
} | {
|
|
@@ -2507,8 +2495,8 @@ export type ShapeItem = {
|
|
|
2507
2495
|
*/
|
|
2508
2496
|
readonly join?: LineJoin;
|
|
2509
2497
|
/**
|
|
2510
|
-
* Longest a miter join reaches, as a multiple of half the width, before
|
|
2511
|
-
*
|
|
2498
|
+
* Longest a miter join reaches, as a multiple of half the width, before it is beveled. At
|
|
2499
|
+
* least 1.
|
|
2512
2500
|
*
|
|
2513
2501
|
* @defaultValue `4`
|
|
2514
2502
|
*/
|
|
@@ -2528,14 +2516,12 @@ export type ShapeItem = {
|
|
|
2528
2516
|
*/
|
|
2529
2517
|
readonly type: "stroke";
|
|
2530
2518
|
/**
|
|
2531
|
-
* Full width, as a fraction of the shorter side. Non-negative; zero
|
|
2532
|
-
* draws nothing.
|
|
2519
|
+
* Full width, as a fraction of the shorter side. Non-negative; zero draws nothing.
|
|
2533
2520
|
*/
|
|
2534
2521
|
readonly width: Animated<number>;
|
|
2535
2522
|
} | {
|
|
2536
2523
|
/**
|
|
2537
|
-
* Where it ends, in `0..=1`. Nothing is kept unless it is after
|
|
2538
|
-
* `start`.
|
|
2524
|
+
* Where it ends, in `0..=1`. Nothing is kept unless it is after `start`.
|
|
2539
2525
|
*/
|
|
2540
2526
|
readonly end: Animated<number>;
|
|
2541
2527
|
/**
|
|
@@ -2562,18 +2548,14 @@ export type ShapeItem = {
|
|
|
2562
2548
|
/**
|
|
2563
2549
|
* A shape that limits where a clip is visible.
|
|
2564
2550
|
*
|
|
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.
|
|
2551
|
+
* Geometry is in the clip's source space before its transform, so the mask moves with the
|
|
2552
|
+
* clip: `(0, 0)` is the source's top-left, `(1, 1)` its bottom-right. Distances (`feather`,
|
|
2553
|
+
* `corner_radius`, polystar radii) are fractions of that space's shorter side.
|
|
2570
2554
|
*/
|
|
2571
2555
|
export interface ShapeMask {
|
|
2572
2556
|
/**
|
|
2573
|
-
*
|
|
2574
|
-
*
|
|
2575
|
-
* deviation `0.3125 * feather`, which spreads its 10 to 90 percent ramp
|
|
2576
|
-
* over `0.8 * feather` across the outline.
|
|
2557
|
+
* Edge softness, non-negative; zero is the outline's antialiased edge. Coverage is blurred
|
|
2558
|
+
* by a Gaussian with standard deviation `0.3125 * feather`, a 10-90% ramp of `0.8 * feather`.
|
|
2577
2559
|
*
|
|
2578
2560
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2579
2561
|
*/
|
|
@@ -2602,9 +2584,8 @@ export interface ShapeMask {
|
|
|
2602
2584
|
readonly shape: ShapeGeometry;
|
|
2603
2585
|
}
|
|
2604
2586
|
/**
|
|
2605
|
-
* A group's placement
|
|
2606
|
-
*
|
|
2607
|
-
* The default leaves its items where they are.
|
|
2587
|
+
* A group's placement. In pixel space: translate by `position`, rotate, scale, then
|
|
2588
|
+
* translate by minus `anchor`, so `anchor` lands on `position`. The default is identity.
|
|
2608
2589
|
*/
|
|
2609
2590
|
export interface ShapeTransform {
|
|
2610
2591
|
/**
|
|
@@ -2614,8 +2595,8 @@ export interface ShapeTransform {
|
|
|
2614
2595
|
*/
|
|
2615
2596
|
readonly anchor?: Animated<Vec2>;
|
|
2616
2597
|
/**
|
|
2617
|
-
* Opacity of the group as a whole, in `0..=1
|
|
2618
|
-
*
|
|
2598
|
+
* Opacity of the group as a whole, in `0..=1`; overlapping items are composited first and
|
|
2599
|
+
* faded together.
|
|
2619
2600
|
*
|
|
2620
2601
|
* @defaultValue `{"mode":"constant","value":1}`
|
|
2621
2602
|
*/
|
|
@@ -2633,8 +2614,7 @@ export interface ShapeTransform {
|
|
|
2633
2614
|
*/
|
|
2634
2615
|
readonly rotation_degrees?: Animated<number>;
|
|
2635
2616
|
/**
|
|
2636
|
-
* Per-axis scale; 1 leaves the items unscaled. Stroke widths scale with
|
|
2637
|
-
* it.
|
|
2617
|
+
* Per-axis scale; 1 leaves the items unscaled. Stroke widths scale with it.
|
|
2638
2618
|
*
|
|
2639
2619
|
* @defaultValue `{"mode":"constant","value":{"x":1,"y":1}}`
|
|
2640
2620
|
*/
|
|
@@ -2680,6 +2660,56 @@ export interface Subpath {
|
|
|
2680
2660
|
* How lines of text align within it.
|
|
2681
2661
|
*/
|
|
2682
2662
|
export type TextAlign = "start" | "center" | "end";
|
|
2663
|
+
/**
|
|
2664
|
+
* One animator: what it selects, and what it does to what it selects.
|
|
2665
|
+
*/
|
|
2666
|
+
export interface TextAnimator {
|
|
2667
|
+
/**
|
|
2668
|
+
* Applied to each character in proportion to its selection.
|
|
2669
|
+
*
|
|
2670
|
+
* @defaultValue `{}`
|
|
2671
|
+
*/
|
|
2672
|
+
readonly properties?: TextAnimatorProperties;
|
|
2673
|
+
/**
|
|
2674
|
+
* Gives each character its selection, in `[0, 1]`.
|
|
2675
|
+
*/
|
|
2676
|
+
readonly selector: TextSelector;
|
|
2677
|
+
}
|
|
2678
|
+
/**
|
|
2679
|
+
* What an animator does to each character, in proportion to its selection. A property left
|
|
2680
|
+
* out does nothing.
|
|
2681
|
+
*/
|
|
2682
|
+
export interface TextAnimatorProperties {
|
|
2683
|
+
/**
|
|
2684
|
+
* The fill color a fully selected character takes; a gradient fill is mixed toward it.
|
|
2685
|
+
*/
|
|
2686
|
+
readonly fill?: Animated<Rgba> | null;
|
|
2687
|
+
/**
|
|
2688
|
+
* Moves the character, in font sizes, +y down.
|
|
2689
|
+
*/
|
|
2690
|
+
readonly offset?: Animated<Vec2> | null;
|
|
2691
|
+
/**
|
|
2692
|
+
* The opacity a fully selected character takes, in `[0, 1]`.
|
|
2693
|
+
*/
|
|
2694
|
+
readonly opacity?: Animated<number> | null;
|
|
2695
|
+
/**
|
|
2696
|
+
* Turns the character about its centre, clockwise degrees.
|
|
2697
|
+
*/
|
|
2698
|
+
readonly rotation_degrees?: Animated<number> | null;
|
|
2699
|
+
/**
|
|
2700
|
+
* Scales the character about its centre; 1 is none. Each axis in `[0, 10]`.
|
|
2701
|
+
*/
|
|
2702
|
+
readonly scale?: Animated<Vec2> | null;
|
|
2703
|
+
/**
|
|
2704
|
+
* The color every stroke of a fully selected character takes.
|
|
2705
|
+
*/
|
|
2706
|
+
readonly stroke?: Animated<Rgba> | null;
|
|
2707
|
+
/**
|
|
2708
|
+
* Space added after the character, in font sizes, in `[-0.5, 1]`, as letter spacing adds
|
|
2709
|
+
* it. Lines are not re-broken.
|
|
2710
|
+
*/
|
|
2711
|
+
readonly tracking?: Animated<number> | null;
|
|
2712
|
+
}
|
|
2683
2713
|
/**
|
|
2684
2714
|
* A box behind each line of text.
|
|
2685
2715
|
*/
|
|
@@ -2689,36 +2719,168 @@ export interface TextBackground {
|
|
|
2689
2719
|
*/
|
|
2690
2720
|
readonly color: Rgba;
|
|
2691
2721
|
/**
|
|
2692
|
-
* Space between the text and the box edge, as a fraction of the font
|
|
2693
|
-
* size, in `[0, 2]`.
|
|
2722
|
+
* Space between the text and the box edge, as a fraction of the font size, in `[0, 2]`.
|
|
2694
2723
|
*
|
|
2695
2724
|
* @defaultValue `0`
|
|
2696
2725
|
*/
|
|
2697
2726
|
readonly padding?: number;
|
|
2698
2727
|
}
|
|
2699
2728
|
/**
|
|
2700
|
-
* A
|
|
2729
|
+
* A text: one string, or runs whose texts joined are the text.
|
|
2730
|
+
*
|
|
2731
|
+
* Written as `"Hello"` or `[{ "text": "Hel" }, { "text": "lo", "class": ["key"] }]`.
|
|
2732
|
+
*/
|
|
2733
|
+
export type TextContent = string | readonly TextRun[];
|
|
2734
|
+
/**
|
|
2735
|
+
* A piece of a text that animators' Class and Timing selectors can pick.
|
|
2736
|
+
*/
|
|
2737
|
+
export interface TextRun {
|
|
2738
|
+
/**
|
|
2739
|
+
* Names Class selectors match, each 1 to 64 bytes of `A-Z`, `a-z`, `0-9`, `_` and `-`; at
|
|
2740
|
+
* most `MAX_RUN_CLASSES`.
|
|
2741
|
+
*/
|
|
2742
|
+
readonly class?: readonly string[];
|
|
2743
|
+
/**
|
|
2744
|
+
* Non-empty; `\n` starts a line. A grapheme cluster spanning two runs belongs to the run
|
|
2745
|
+
* holding its first byte.
|
|
2746
|
+
*/
|
|
2747
|
+
readonly text: string;
|
|
2748
|
+
/**
|
|
2749
|
+
* When the run is said, from the holder's start (a caption cue's start, or a text
|
|
2750
|
+
* generator's picture time zero).
|
|
2751
|
+
*/
|
|
2752
|
+
readonly time?: RunTime | null;
|
|
2753
|
+
}
|
|
2754
|
+
/**
|
|
2755
|
+
* How an animator selects characters.
|
|
2756
|
+
*/
|
|
2757
|
+
export type TextSelector = {
|
|
2758
|
+
/**
|
|
2759
|
+
* The selection's scale, in `[0, 1]`. Default 1.
|
|
2760
|
+
*
|
|
2761
|
+
* @defaultValue `{"mode":"constant","value":1}`
|
|
2762
|
+
*/
|
|
2763
|
+
readonly amount?: Animated<number>;
|
|
2764
|
+
/**
|
|
2765
|
+
* What the range counts: characters (the default), non-space characters, words, or lines.
|
|
2766
|
+
*
|
|
2767
|
+
* @defaultValue `"characters"`
|
|
2768
|
+
*/
|
|
2769
|
+
readonly based_on?: TextUnit;
|
|
2770
|
+
/**
|
|
2771
|
+
* Where it ends, in the same range. Default 100.
|
|
2772
|
+
*
|
|
2773
|
+
* @defaultValue `{"mode":"constant","value":100}`
|
|
2774
|
+
*/
|
|
2775
|
+
readonly end?: Animated<number>;
|
|
2776
|
+
/**
|
|
2777
|
+
* Added to start and end, in the same range. Default 0.
|
|
2778
|
+
*
|
|
2779
|
+
* @defaultValue `{"mode":"constant","value":0}`
|
|
2780
|
+
*/
|
|
2781
|
+
readonly offset?: Animated<number>;
|
|
2782
|
+
/**
|
|
2783
|
+
* How selection rises and falls across the range.
|
|
2784
|
+
*
|
|
2785
|
+
* @defaultValue `"square"`
|
|
2786
|
+
*/
|
|
2787
|
+
readonly shape?: RangeShape;
|
|
2788
|
+
/**
|
|
2789
|
+
* Where the range starts: `[-100, 200]` percent, or `[-N, 2N]` units for `N` of
|
|
2790
|
+
* `MAX_RANGE_INDEX`. Default 0.
|
|
2791
|
+
*
|
|
2792
|
+
* @defaultValue `{"mode":"constant","value":0}`
|
|
2793
|
+
*/
|
|
2794
|
+
readonly start?: Animated<number>;
|
|
2795
|
+
/**
|
|
2796
|
+
* A range over the text's units, shaped at its ends, like After Effects' range selector.
|
|
2797
|
+
*/
|
|
2798
|
+
readonly type: "range";
|
|
2799
|
+
/**
|
|
2800
|
+
* Whether start, end and offset are percents of the units (the default) or unit indices.
|
|
2801
|
+
*
|
|
2802
|
+
* @defaultValue `"percent"`
|
|
2803
|
+
*/
|
|
2804
|
+
readonly units?: RangeUnits;
|
|
2805
|
+
} | {
|
|
2806
|
+
/**
|
|
2807
|
+
* How long the state takes to fade in and out; zero switches.
|
|
2808
|
+
*
|
|
2809
|
+
* @defaultValue `0`
|
|
2810
|
+
*/
|
|
2811
|
+
readonly ramp?: MediaTime;
|
|
2812
|
+
/**
|
|
2813
|
+
* Which runs it selects: those not yet said, being said, or said.
|
|
2814
|
+
*/
|
|
2815
|
+
readonly state: RunState;
|
|
2816
|
+
/**
|
|
2817
|
+
* Splits each run's span over its characters in order, sweeping the run character by
|
|
2818
|
+
* character.
|
|
2819
|
+
*
|
|
2820
|
+
* @defaultValue `false`
|
|
2821
|
+
*/
|
|
2822
|
+
readonly sweep?: boolean;
|
|
2823
|
+
/**
|
|
2824
|
+
* Characters of timed runs, by the run's time against the current time.
|
|
2825
|
+
*/
|
|
2826
|
+
readonly type: "timing";
|
|
2827
|
+
} | {
|
|
2828
|
+
/**
|
|
2829
|
+
* The class name.
|
|
2830
|
+
*/
|
|
2831
|
+
readonly class: string;
|
|
2832
|
+
/**
|
|
2833
|
+
* Characters of runs that carry a class.
|
|
2834
|
+
*/
|
|
2835
|
+
readonly type: "class";
|
|
2836
|
+
};
|
|
2837
|
+
/**
|
|
2838
|
+
* A shadow of a text's glyphs and strokes, behind them.
|
|
2839
|
+
*/
|
|
2840
|
+
export interface TextShadow {
|
|
2841
|
+
/**
|
|
2842
|
+
* Blur radius in font sizes, as CSS `text-shadow` takes it (the Gaussian's standard
|
|
2843
|
+
* deviation is half of it). In `[0, 1]` (`MAX_TEXT_SHADOW_BLUR`).
|
|
2844
|
+
*
|
|
2845
|
+
* @defaultValue `0`
|
|
2846
|
+
*/
|
|
2847
|
+
readonly blur?: number;
|
|
2848
|
+
/**
|
|
2849
|
+
* Shadow color.
|
|
2850
|
+
*/
|
|
2851
|
+
readonly color: Rgba;
|
|
2852
|
+
/**
|
|
2853
|
+
* Offset in font sizes, +x right, +y down; each component in `[-1, 1]`
|
|
2854
|
+
* (`MAX_TEXT_SHADOW_OFFSET`).
|
|
2855
|
+
*
|
|
2856
|
+
* @defaultValue `{"x":0,"y":0}`
|
|
2857
|
+
*/
|
|
2858
|
+
readonly offset?: Vec2;
|
|
2859
|
+
}
|
|
2860
|
+
/**
|
|
2861
|
+
* A band around the glyphs and the strokes listed before it, drawn behind them.
|
|
2701
2862
|
*/
|
|
2702
|
-
export interface
|
|
2863
|
+
export interface TextStroke {
|
|
2703
2864
|
/**
|
|
2704
2865
|
* Band color.
|
|
2705
2866
|
*/
|
|
2706
2867
|
readonly color: Rgba;
|
|
2707
2868
|
/**
|
|
2708
|
-
* Band width as a fraction of the font size,
|
|
2869
|
+
* Band width as a fraction of the font size, positive; a text's strokes sum to at most
|
|
2870
|
+
* `MAX_TEXT_STROKE_EXTENT`.
|
|
2709
2871
|
*/
|
|
2710
2872
|
readonly width: number;
|
|
2711
2873
|
}
|
|
2712
2874
|
/**
|
|
2713
|
-
* How text looks and where it lies
|
|
2714
|
-
* `Generator`.
|
|
2875
|
+
* How text looks and where it lies, for caption cues or a text `Generator`.
|
|
2715
2876
|
*
|
|
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
|
|
2877
|
+
* The font size is a fraction of the canvas's shorter side, the wrapping width a fraction
|
|
2878
|
+
* of the canvas width, and strokes, shadows and padding fractions of the font size. The
|
|
2879
|
+
* engine draws with its host's registered fonts, `font_family` first, then the rest in
|
|
2721
2880
|
* fallback order.
|
|
2881
|
+
*
|
|
2882
|
+
* Painting is bottom to top as in CSS: background boxes, shadows (last listed lowest),
|
|
2883
|
+
* strokes (outermost lowest), fill, then color glyphs.
|
|
2722
2884
|
*/
|
|
2723
2885
|
export interface TextStyle {
|
|
2724
2886
|
/**
|
|
@@ -2728,12 +2890,18 @@ export interface TextStyle {
|
|
|
2728
2890
|
*/
|
|
2729
2891
|
readonly align?: TextAlign;
|
|
2730
2892
|
/**
|
|
2731
|
-
* The point of the text, background included, placed at
|
|
2732
|
-
*
|
|
2893
|
+
* The point of the text, background included, placed at `position`; `(0.5, 1)` is its
|
|
2894
|
+
* bottom centre.
|
|
2733
2895
|
*
|
|
2734
2896
|
* @defaultValue `{"x":0.5,"y":1}`
|
|
2735
2897
|
*/
|
|
2736
2898
|
readonly anchor?: Vec2;
|
|
2899
|
+
/**
|
|
2900
|
+
* Per-character motion and color, applied in order, at most `MAX_TEXT_ANIMATORS`.
|
|
2901
|
+
* Keyframes are in the holder's time (since a caption cue's start, or a text generator's
|
|
2902
|
+
* picture time). They never change line layout.
|
|
2903
|
+
*/
|
|
2904
|
+
readonly animators?: readonly TextAnimator[];
|
|
2737
2905
|
/**
|
|
2738
2906
|
* A box behind each line.
|
|
2739
2907
|
*
|
|
@@ -2741,51 +2909,47 @@ export interface TextStyle {
|
|
|
2741
2909
|
*/
|
|
2742
2910
|
readonly background?: TextBackground | null;
|
|
2743
2911
|
/**
|
|
2744
|
-
*
|
|
2912
|
+
* What paints the glyphs; a color reads as a solid paint. Gradient positions are in the
|
|
2913
|
+
* text's layout box, `(0, 0)` top-left to `(1, 1)` bottom-right, and a radial radius is a
|
|
2914
|
+
* fraction of the box's shorter side. Default solid white.
|
|
2745
2915
|
*
|
|
2746
|
-
* @defaultValue `{"alpha":1,"blue":1,"green":1,"red":1}`
|
|
2916
|
+
* @defaultValue `{"color":{"alpha":1,"blue":1,"green":1,"red":1},"type":"solid"}`
|
|
2747
2917
|
*/
|
|
2748
|
-
readonly
|
|
2918
|
+
readonly fill?: Paint;
|
|
2749
2919
|
/**
|
|
2750
|
-
* The family
|
|
2751
|
-
*
|
|
2752
|
-
*
|
|
2753
|
-
*
|
|
2754
|
-
* fallback order alone. Non-empty, at most `MAX_FONT_FAMILY_BYTES`
|
|
2755
|
-
* bytes.
|
|
2920
|
+
* The family, as the font's name table gives it (typographic family, else family), matched
|
|
2921
|
+
* ASCII case-insensitively. Missing glyphs and unknown families fall back to the other fonts
|
|
2922
|
+
* in order; `None` uses the fallback order alone. Non-empty, at most
|
|
2923
|
+
* `MAX_FONT_FAMILY_BYTES` bytes.
|
|
2756
2924
|
*/
|
|
2757
2925
|
readonly font_family?: string | null;
|
|
2758
2926
|
/**
|
|
2759
|
-
* Font size as a fraction of the canvas's shorter side: positive, at
|
|
2760
|
-
*
|
|
2761
|
-
*
|
|
2927
|
+
* Font size as a fraction of the canvas's shorter side: positive, at most
|
|
2928
|
+
* `MAX_CAPTION_FONT_SIZE` on a caption track and `MAX_TEXT_GENERATOR_FONT_SIZE`
|
|
2929
|
+
* in a text generator.
|
|
2762
2930
|
*
|
|
2763
2931
|
* @defaultValue `0.05`
|
|
2764
2932
|
*/
|
|
2765
2933
|
readonly font_size?: number;
|
|
2766
2934
|
/**
|
|
2767
|
-
* The weight
|
|
2768
|
-
*
|
|
2769
|
-
*
|
|
2770
|
-
* draws its nearest face.
|
|
2935
|
+
* The weight in `[1, 1000]` used to match a family's faces, as CSS Fonts 4 matches
|
|
2936
|
+
* `font-weight`. Variable faces draw at it, clamped to their `wght` axis; no face is
|
|
2937
|
+
* synthetically emboldened.
|
|
2771
2938
|
*
|
|
2772
2939
|
* @defaultValue `400`
|
|
2773
2940
|
*/
|
|
2774
2941
|
readonly font_weight?: number;
|
|
2775
2942
|
/**
|
|
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.
|
|
2943
|
+
* Space after each character, as a fraction of the font size, in `[-0.5, 1]`, added as CSS
|
|
2944
|
+
* `letter-spacing` does: none after a line's last character or within cursive scripts such
|
|
2945
|
+
* as Arabic. A non-zero value turns optional ligatures off.
|
|
2781
2946
|
*
|
|
2782
2947
|
* @defaultValue `0`
|
|
2783
2948
|
*/
|
|
2784
2949
|
readonly letter_spacing?: number;
|
|
2785
2950
|
/**
|
|
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.
|
|
2951
|
+
* Baseline-to-baseline distance in font sizes, in `[0.5, 3]`. Each line's em box (0.8 font
|
|
2952
|
+
* sizes above the baseline, 0.2 below) is centred in a taller line.
|
|
2789
2953
|
*
|
|
2790
2954
|
* @defaultValue `1.2`
|
|
2791
2955
|
*/
|
|
@@ -2797,25 +2961,94 @@ export interface TextStyle {
|
|
|
2797
2961
|
*/
|
|
2798
2962
|
readonly max_width?: number;
|
|
2799
2963
|
/**
|
|
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.
|
|
2964
|
+
* Where on the canvas the text's anchor lies, `(0, 0)` top-left to `(1, 1)` bottom-right.
|
|
2808
2965
|
*
|
|
2809
2966
|
* @defaultValue `{"x":0.5,"y":0.92}`
|
|
2810
2967
|
*/
|
|
2811
2968
|
readonly position?: Vec2;
|
|
2969
|
+
/**
|
|
2970
|
+
* Shadows of the glyphs and strokes, the first on top, as CSS `text-shadow` lists them. At
|
|
2971
|
+
* most `MAX_TEXT_SHADOWS`.
|
|
2972
|
+
*/
|
|
2973
|
+
readonly shadows?: readonly TextShadow[];
|
|
2974
|
+
/**
|
|
2975
|
+
* Bands around the glyphs, innermost first, each outside the one before. At most
|
|
2976
|
+
* `MAX_TEXT_STROKES`, widths summing to at most `MAX_TEXT_STROKE_EXTENT`.
|
|
2977
|
+
*/
|
|
2978
|
+
readonly strokes?: readonly TextStroke[];
|
|
2979
|
+
}
|
|
2980
|
+
/**
|
|
2981
|
+
* Changes to a `TextStyle`. Each field set replaces the base's whole value (lists are not
|
|
2982
|
+
* merged); a field left out keeps the base's.
|
|
2983
|
+
*/
|
|
2984
|
+
export interface TextStylePatch {
|
|
2985
|
+
/**
|
|
2986
|
+
* See `TextStyle::align`.
|
|
2987
|
+
*/
|
|
2988
|
+
readonly align?: TextAlign | null;
|
|
2989
|
+
/**
|
|
2990
|
+
* See `TextStyle::anchor`.
|
|
2991
|
+
*/
|
|
2992
|
+
readonly anchor?: Vec2 | null;
|
|
2993
|
+
/**
|
|
2994
|
+
* See `TextStyle::animators`.
|
|
2995
|
+
*/
|
|
2996
|
+
readonly animators?: readonly TextAnimator[] | null;
|
|
2997
|
+
/**
|
|
2998
|
+
* The box behind each line; `null` removes the base's.
|
|
2999
|
+
*/
|
|
3000
|
+
readonly background?: TextBackground | null;
|
|
3001
|
+
/**
|
|
3002
|
+
* See `TextStyle::fill`.
|
|
3003
|
+
*/
|
|
3004
|
+
readonly fill?: Paint | null;
|
|
3005
|
+
/**
|
|
3006
|
+
* The family; `null` draws from the fallback order alone.
|
|
3007
|
+
*/
|
|
3008
|
+
readonly font_family?: string | null;
|
|
3009
|
+
/**
|
|
3010
|
+
* See `TextStyle::font_size`.
|
|
3011
|
+
*/
|
|
3012
|
+
readonly font_size?: number | null;
|
|
3013
|
+
/**
|
|
3014
|
+
* See `TextStyle::font_weight`.
|
|
3015
|
+
*/
|
|
3016
|
+
readonly font_weight?: number | null;
|
|
3017
|
+
/**
|
|
3018
|
+
* See `TextStyle::letter_spacing`.
|
|
3019
|
+
*/
|
|
3020
|
+
readonly letter_spacing?: number | null;
|
|
3021
|
+
/**
|
|
3022
|
+
* See `TextStyle::line_height`.
|
|
3023
|
+
*/
|
|
3024
|
+
readonly line_height?: number | null;
|
|
3025
|
+
/**
|
|
3026
|
+
* See `TextStyle::max_width`.
|
|
3027
|
+
*/
|
|
3028
|
+
readonly max_width?: number | null;
|
|
3029
|
+
/**
|
|
3030
|
+
* See `TextStyle::position`.
|
|
3031
|
+
*/
|
|
3032
|
+
readonly position?: Vec2 | null;
|
|
3033
|
+
/**
|
|
3034
|
+
* See `TextStyle::shadows`.
|
|
3035
|
+
*/
|
|
3036
|
+
readonly shadows?: readonly TextShadow[] | null;
|
|
3037
|
+
/**
|
|
3038
|
+
* See `TextStyle::strokes`.
|
|
3039
|
+
*/
|
|
3040
|
+
readonly strokes?: readonly TextStroke[] | null;
|
|
2812
3041
|
}
|
|
3042
|
+
/**
|
|
3043
|
+
* The units a Range selector counts.
|
|
3044
|
+
*/
|
|
3045
|
+
export type TextUnit = "characters" | "characters_excluding_spaces" | "words" | "lines";
|
|
2813
3046
|
/**
|
|
2814
3047
|
* How a clip plays its source range over its timeline range.
|
|
2815
3048
|
*
|
|
2816
|
-
* `forward` and `reverse` stretch the source range over the timeline range,
|
|
2817
|
-
*
|
|
2818
|
-
*
|
|
3049
|
+
* `forward` and `reverse` stretch the source range over the timeline range, so their speed
|
|
3050
|
+
* is the ratio of the two. A loop plays the source range at its own speed for as long as the
|
|
3051
|
+
* timeline range lasts.
|
|
2819
3052
|
*/
|
|
2820
3053
|
export type TimeMap = {
|
|
2821
3054
|
/**
|
|
@@ -2824,8 +3057,8 @@ export type TimeMap = {
|
|
|
2824
3057
|
readonly type: "forward";
|
|
2825
3058
|
} | {
|
|
2826
3059
|
/**
|
|
2827
|
-
* From the end of the source range to its start: pictures in reverse
|
|
2828
|
-
*
|
|
3060
|
+
* From the end of the source range to its start: pictures in reverse order and sound
|
|
3061
|
+
* played backwards.
|
|
2829
3062
|
*/
|
|
2830
3063
|
readonly type: "reverse";
|
|
2831
3064
|
} | {
|
|
@@ -2897,8 +3130,8 @@ export interface Track {
|
|
|
2897
3130
|
*/
|
|
2898
3131
|
readonly captions?: Captions | null;
|
|
2899
3132
|
/**
|
|
2900
|
-
* Clips on this track
|
|
2901
|
-
*
|
|
3133
|
+
* Clips on this track, in authoring order; evaluation sorts by time. A caption track has
|
|
3134
|
+
* none.
|
|
2902
3135
|
*
|
|
2903
3136
|
* @defaultValue `[]`
|
|
2904
3137
|
*/
|
|
@@ -2933,8 +3166,8 @@ export interface TrackAudio {
|
|
|
2933
3166
|
*/
|
|
2934
3167
|
readonly ducking?: Ducking | null;
|
|
2935
3168
|
/**
|
|
2936
|
-
* Ordered single-input effects applied to the summed clip signal, at
|
|
2937
|
-
*
|
|
3169
|
+
* Ordered single-input effects applied to the summed clip signal, at most
|
|
3170
|
+
* `MAX_CHAIN_EFFECTS`.
|
|
2938
3171
|
*
|
|
2939
3172
|
* @defaultValue `[]`
|
|
2940
3173
|
*/
|
|
@@ -2952,8 +3185,7 @@ export interface TrackAudio {
|
|
|
2952
3185
|
*/
|
|
2953
3186
|
readonly muted?: boolean;
|
|
2954
3187
|
/**
|
|
2955
|
-
* Animated stereo position applied after the clip mix, from `-1` (left)
|
|
2956
|
-
* to `1` (right).
|
|
3188
|
+
* Animated stereo position applied after the clip mix, from `-1` (left) to `1` (right).
|
|
2957
3189
|
*
|
|
2958
3190
|
* @defaultValue `{"mode":"constant","value":0}`
|
|
2959
3191
|
*/
|
|
@@ -3003,29 +3235,24 @@ export interface Vec2 {
|
|
|
3003
3235
|
*/
|
|
3004
3236
|
export interface VideoStreamShape {
|
|
3005
3237
|
/**
|
|
3006
|
-
* The rate
|
|
3007
|
-
*
|
|
3008
|
-
*
|
|
3009
|
-
* rate is a guess for variable-rate media, and browsers report none.
|
|
3238
|
+
* The rate the first frames are presented at, measured from packet times and rounded
|
|
3239
|
+
* (`alpha2_assets::FrameRateEvidence`), when measurable. Declared rates are not used because
|
|
3240
|
+
* they are guesses for variable-rate media and browsers report none.
|
|
3010
3241
|
*/
|
|
3011
3242
|
readonly frame_rate?: FrameRate | null;
|
|
3012
3243
|
/**
|
|
3013
|
-
* Displayed height in square pixels
|
|
3014
|
-
* pixel aspect ratio taller than wide, then turned.
|
|
3244
|
+
* Displayed height in square pixels, after the pixel aspect ratio and orientation.
|
|
3015
3245
|
*/
|
|
3016
3246
|
readonly height: number;
|
|
3017
3247
|
/**
|
|
3018
|
-
* Displayed width in square pixels
|
|
3019
|
-
* pixel aspect ratio wider than tall, then turned by the stream's
|
|
3020
|
-
* orientation.
|
|
3248
|
+
* Displayed width in square pixels, after the pixel aspect ratio and orientation.
|
|
3021
3249
|
*/
|
|
3022
3250
|
readonly width: number;
|
|
3023
3251
|
}
|
|
3024
3252
|
/**
|
|
3025
3253
|
* Resolution-independent visual presentation controls for a clip.
|
|
3026
3254
|
*
|
|
3027
|
-
*
|
|
3028
|
-
* source centred on the canvas, unscaled, unrotated and opaque.
|
|
3255
|
+
* Omitted fields default to the source centred on the canvas, unscaled, unrotated and opaque.
|
|
3029
3256
|
*/
|
|
3030
3257
|
export interface VisualProperties {
|
|
3031
3258
|
/**
|
|
@@ -3041,8 +3268,8 @@ export interface VisualProperties {
|
|
|
3041
3268
|
*/
|
|
3042
3269
|
readonly opacity?: Animated<number>;
|
|
3043
3270
|
/**
|
|
3044
|
-
* Animated normalized canvas translation, along spatial curves where
|
|
3045
|
-
*
|
|
3271
|
+
* Animated normalized canvas translation, along spatial curves where keyframes have
|
|
3272
|
+
* tangents.
|
|
3046
3273
|
*
|
|
3047
3274
|
* @defaultValue `{"mode":"constant","value":{"x":0.5,"y":0.5}}`
|
|
3048
3275
|
*/
|