@pixerate/editor 0.230.0 → 0.231.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/dist/{chunk-A57ZQDNN.cjs → chunk-5T3H7CGG.cjs} +14 -4
- package/dist/{chunk-ONNNNGNS.js → chunk-CSM5T6SE.js} +13 -3
- package/dist/image-editor/controller.d.cts +12 -0
- package/dist/image-editor/controller.d.ts +12 -0
- package/dist/image-editor/index.cjs +176 -131
- package/dist/image-editor/index.js +47 -2
- package/dist/paint-editor/index.cjs +2 -2
- package/dist/paint-editor/index.js +1 -1
- package/dist/video-editor/camera-tools.d.cts +10 -0
- package/dist/video-editor/camera-tools.d.ts +10 -0
- package/dist/video-editor/camera.d.cts +47 -0
- package/dist/video-editor/camera.d.ts +47 -0
- package/dist/video-editor/check.d.cts +1 -1
- package/dist/video-editor/check.d.ts +1 -1
- package/dist/video-editor/controller.d.cts +37 -2
- package/dist/video-editor/controller.d.ts +37 -2
- package/dist/video-editor/effect-tools.d.cts +2 -1
- package/dist/video-editor/effect-tools.d.ts +2 -1
- package/dist/video-editor/index.cjs +690 -375
- package/dist/video-editor/index.d.cts +2 -0
- package/dist/video-editor/index.d.ts +2 -0
- package/dist/video-editor/index.js +331 -16
- package/dist/video-editor/keyframes.d.cts +10 -3
- package/dist/video-editor/keyframes.d.ts +10 -3
- package/dist/video-editor/parse.d.cts +5 -3
- package/dist/video-editor/parse.d.ts +5 -3
- package/dist/video-editor/tools.d.cts +18 -0
- package/dist/video-editor/tools.d.ts +18 -0
- package/dist/video-editor/types.d.cts +37 -1
- package/dist/video-editor/types.d.ts +37 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type VideoAnimatable, type VideoKeyframes } from './keyframes.js';
|
|
2
|
-
import { type VideoClipMask, type VideoAsset, type VideoAssetProxy, type VideoClip, type VideoClipEffect, type VideoEffectRef, type VideoEffectValues, type VideoClipAnimation, type VideoGrade, type VideoGradeLut, type VideoMarker, type VideoProject, type VideoSequence, type VideoTrack, type VideoTranscriptWord, type VideoTransform, type VideoTransition } from './types.js';
|
|
2
|
+
import { type VideoClipMask, type VideoClipCamera, type VideoAsset, type VideoAssetProxy, type VideoClip, type VideoClipEffect, type VideoEffectRef, type VideoEffectValues, type VideoClipAnimation, type VideoGrade, type VideoGradeLut, type VideoMarker, type VideoProject, type VideoSequence, type VideoTrack, type VideoTranscriptWord, type VideoTransform, type VideoTransition } from './types.js';
|
|
3
3
|
/**
|
|
4
|
-
* Keyframes `{ keys: [{ t, v, ease }] }`: at least one key, in
|
|
5
|
-
*
|
|
4
|
+
* Keyframes `{ keys: [{ t, v, ease }] }`: at least one key, in time order (clip-relative ms; two
|
|
5
|
+
* at one time make a jump), each value within `range`.
|
|
6
6
|
*/
|
|
7
7
|
export declare function parseVideoKeyframes(v: unknown, path: string, { min, max }?: {
|
|
8
8
|
min?: number;
|
|
@@ -35,6 +35,8 @@ export declare function parseVideoClipEffects(v: unknown, path: string): VideoCl
|
|
|
35
35
|
export declare function parseVideoTranscriptWords(v: unknown, path: string): VideoTranscriptWord[] | undefined;
|
|
36
36
|
export declare function parseVideoAsset(v: unknown, path?: string): VideoAsset;
|
|
37
37
|
export declare function parseVideoAssetProxies(v: unknown, path: string): VideoAssetProxy[] | undefined;
|
|
38
|
+
/** A clip's camera moves `{ in, during, from, framing, base }` (see `VideoClipCamera`). */
|
|
39
|
+
export declare function parseVideoClipCamera(v: unknown, path: string): VideoClipCamera | undefined;
|
|
38
40
|
export declare function parseVideoClip(v: unknown, path?: string): VideoClip;
|
|
39
41
|
export declare function parseVideoTrack(v: unknown, path?: string): VideoTrack;
|
|
40
42
|
/** A nested sequence `{ id, name, tracks }` (see `VideoSequence`). */
|
|
@@ -69,6 +69,7 @@ export declare function describeVideoSequence(project: VideoProject, sequence: V
|
|
|
69
69
|
transition?: import("./types.cjs").VideoTransition;
|
|
70
70
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
71
71
|
mask?: import("./types.cjs").VideoClipMask;
|
|
72
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
72
73
|
} | {
|
|
73
74
|
source?: {
|
|
74
75
|
in: number;
|
|
@@ -98,6 +99,7 @@ export declare function describeVideoSequence(project: VideoProject, sequence: V
|
|
|
98
99
|
transition?: import("./types.cjs").VideoTransition;
|
|
99
100
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
100
101
|
mask?: import("./types.cjs").VideoClipMask;
|
|
102
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
101
103
|
} | {
|
|
102
104
|
source?: {
|
|
103
105
|
in: number;
|
|
@@ -122,6 +124,7 @@ export declare function describeVideoSequence(project: VideoProject, sequence: V
|
|
|
122
124
|
transition?: import("./types.cjs").VideoTransition;
|
|
123
125
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
124
126
|
mask?: import("./types.cjs").VideoClipMask;
|
|
127
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
125
128
|
} | {
|
|
126
129
|
source?: {
|
|
127
130
|
in: number;
|
|
@@ -151,6 +154,7 @@ export declare function describeVideoSequence(project: VideoProject, sequence: V
|
|
|
151
154
|
transition?: import("./types.cjs").VideoTransition;
|
|
152
155
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
153
156
|
mask?: import("./types.cjs").VideoClipMask;
|
|
157
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
154
158
|
} | {
|
|
155
159
|
source?: {
|
|
156
160
|
in: number;
|
|
@@ -174,6 +178,7 @@ export declare function describeVideoSequence(project: VideoProject, sequence: V
|
|
|
174
178
|
transition?: import("./types.cjs").VideoTransition;
|
|
175
179
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
176
180
|
mask?: import("./types.cjs").VideoClipMask;
|
|
181
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
177
182
|
effect: string;
|
|
178
183
|
provider?: string;
|
|
179
184
|
values?: import("./types.cjs").VideoEffectValues;
|
|
@@ -202,6 +207,7 @@ export declare function describeVideoSequence(project: VideoProject, sequence: V
|
|
|
202
207
|
transition?: import("./types.cjs").VideoTransition;
|
|
203
208
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
204
209
|
mask?: import("./types.cjs").VideoClipMask;
|
|
210
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
205
211
|
})[];
|
|
206
212
|
volume?: number | undefined;
|
|
207
213
|
syncLocked?: boolean | undefined;
|
|
@@ -286,6 +292,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
286
292
|
transition?: import("./types.cjs").VideoTransition;
|
|
287
293
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
288
294
|
mask?: import("./types.cjs").VideoClipMask;
|
|
295
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
289
296
|
} | {
|
|
290
297
|
source?: {
|
|
291
298
|
in: number;
|
|
@@ -315,6 +322,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
315
322
|
transition?: import("./types.cjs").VideoTransition;
|
|
316
323
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
317
324
|
mask?: import("./types.cjs").VideoClipMask;
|
|
325
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
318
326
|
} | {
|
|
319
327
|
source?: {
|
|
320
328
|
in: number;
|
|
@@ -339,6 +347,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
339
347
|
transition?: import("./types.cjs").VideoTransition;
|
|
340
348
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
341
349
|
mask?: import("./types.cjs").VideoClipMask;
|
|
350
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
342
351
|
} | {
|
|
343
352
|
source?: {
|
|
344
353
|
in: number;
|
|
@@ -368,6 +377,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
368
377
|
transition?: import("./types.cjs").VideoTransition;
|
|
369
378
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
370
379
|
mask?: import("./types.cjs").VideoClipMask;
|
|
380
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
371
381
|
} | {
|
|
372
382
|
source?: {
|
|
373
383
|
in: number;
|
|
@@ -391,6 +401,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
391
401
|
transition?: import("./types.cjs").VideoTransition;
|
|
392
402
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
393
403
|
mask?: import("./types.cjs").VideoClipMask;
|
|
404
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
394
405
|
effect: string;
|
|
395
406
|
provider?: string;
|
|
396
407
|
values?: import("./types.cjs").VideoEffectValues;
|
|
@@ -419,6 +430,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
419
430
|
transition?: import("./types.cjs").VideoTransition;
|
|
420
431
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
421
432
|
mask?: import("./types.cjs").VideoClipMask;
|
|
433
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
422
434
|
})[];
|
|
423
435
|
volume?: number | undefined;
|
|
424
436
|
syncLocked?: boolean | undefined;
|
|
@@ -523,6 +535,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
523
535
|
transition?: import("./types.cjs").VideoTransition;
|
|
524
536
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
525
537
|
mask?: import("./types.cjs").VideoClipMask;
|
|
538
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
526
539
|
} | {
|
|
527
540
|
source?: {
|
|
528
541
|
in: number;
|
|
@@ -552,6 +565,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
552
565
|
transition?: import("./types.cjs").VideoTransition;
|
|
553
566
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
554
567
|
mask?: import("./types.cjs").VideoClipMask;
|
|
568
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
555
569
|
} | {
|
|
556
570
|
source?: {
|
|
557
571
|
in: number;
|
|
@@ -576,6 +590,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
576
590
|
transition?: import("./types.cjs").VideoTransition;
|
|
577
591
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
578
592
|
mask?: import("./types.cjs").VideoClipMask;
|
|
593
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
579
594
|
} | {
|
|
580
595
|
source?: {
|
|
581
596
|
in: number;
|
|
@@ -605,6 +620,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
605
620
|
transition?: import("./types.cjs").VideoTransition;
|
|
606
621
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
607
622
|
mask?: import("./types.cjs").VideoClipMask;
|
|
623
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
608
624
|
} | {
|
|
609
625
|
source?: {
|
|
610
626
|
in: number;
|
|
@@ -628,6 +644,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
628
644
|
transition?: import("./types.cjs").VideoTransition;
|
|
629
645
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
630
646
|
mask?: import("./types.cjs").VideoClipMask;
|
|
647
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
631
648
|
effect: string;
|
|
632
649
|
provider?: string;
|
|
633
650
|
values?: import("./types.cjs").VideoEffectValues;
|
|
@@ -656,6 +673,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
656
673
|
transition?: import("./types.cjs").VideoTransition;
|
|
657
674
|
effects?: import("./types.cjs").VideoClipEffect[];
|
|
658
675
|
mask?: import("./types.cjs").VideoClipMask;
|
|
676
|
+
camera?: import("./types.cjs").VideoClipCamera;
|
|
659
677
|
})[];
|
|
660
678
|
volume?: number | undefined;
|
|
661
679
|
syncLocked?: boolean | undefined;
|
|
@@ -69,6 +69,7 @@ export declare function describeVideoSequence(project: VideoProject, sequence: V
|
|
|
69
69
|
transition?: import("./types.js").VideoTransition;
|
|
70
70
|
effects?: import("./types.js").VideoClipEffect[];
|
|
71
71
|
mask?: import("./types.js").VideoClipMask;
|
|
72
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
72
73
|
} | {
|
|
73
74
|
source?: {
|
|
74
75
|
in: number;
|
|
@@ -98,6 +99,7 @@ export declare function describeVideoSequence(project: VideoProject, sequence: V
|
|
|
98
99
|
transition?: import("./types.js").VideoTransition;
|
|
99
100
|
effects?: import("./types.js").VideoClipEffect[];
|
|
100
101
|
mask?: import("./types.js").VideoClipMask;
|
|
102
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
101
103
|
} | {
|
|
102
104
|
source?: {
|
|
103
105
|
in: number;
|
|
@@ -122,6 +124,7 @@ export declare function describeVideoSequence(project: VideoProject, sequence: V
|
|
|
122
124
|
transition?: import("./types.js").VideoTransition;
|
|
123
125
|
effects?: import("./types.js").VideoClipEffect[];
|
|
124
126
|
mask?: import("./types.js").VideoClipMask;
|
|
127
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
125
128
|
} | {
|
|
126
129
|
source?: {
|
|
127
130
|
in: number;
|
|
@@ -151,6 +154,7 @@ export declare function describeVideoSequence(project: VideoProject, sequence: V
|
|
|
151
154
|
transition?: import("./types.js").VideoTransition;
|
|
152
155
|
effects?: import("./types.js").VideoClipEffect[];
|
|
153
156
|
mask?: import("./types.js").VideoClipMask;
|
|
157
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
154
158
|
} | {
|
|
155
159
|
source?: {
|
|
156
160
|
in: number;
|
|
@@ -174,6 +178,7 @@ export declare function describeVideoSequence(project: VideoProject, sequence: V
|
|
|
174
178
|
transition?: import("./types.js").VideoTransition;
|
|
175
179
|
effects?: import("./types.js").VideoClipEffect[];
|
|
176
180
|
mask?: import("./types.js").VideoClipMask;
|
|
181
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
177
182
|
effect: string;
|
|
178
183
|
provider?: string;
|
|
179
184
|
values?: import("./types.js").VideoEffectValues;
|
|
@@ -202,6 +207,7 @@ export declare function describeVideoSequence(project: VideoProject, sequence: V
|
|
|
202
207
|
transition?: import("./types.js").VideoTransition;
|
|
203
208
|
effects?: import("./types.js").VideoClipEffect[];
|
|
204
209
|
mask?: import("./types.js").VideoClipMask;
|
|
210
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
205
211
|
})[];
|
|
206
212
|
volume?: number | undefined;
|
|
207
213
|
syncLocked?: boolean | undefined;
|
|
@@ -286,6 +292,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
286
292
|
transition?: import("./types.js").VideoTransition;
|
|
287
293
|
effects?: import("./types.js").VideoClipEffect[];
|
|
288
294
|
mask?: import("./types.js").VideoClipMask;
|
|
295
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
289
296
|
} | {
|
|
290
297
|
source?: {
|
|
291
298
|
in: number;
|
|
@@ -315,6 +322,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
315
322
|
transition?: import("./types.js").VideoTransition;
|
|
316
323
|
effects?: import("./types.js").VideoClipEffect[];
|
|
317
324
|
mask?: import("./types.js").VideoClipMask;
|
|
325
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
318
326
|
} | {
|
|
319
327
|
source?: {
|
|
320
328
|
in: number;
|
|
@@ -339,6 +347,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
339
347
|
transition?: import("./types.js").VideoTransition;
|
|
340
348
|
effects?: import("./types.js").VideoClipEffect[];
|
|
341
349
|
mask?: import("./types.js").VideoClipMask;
|
|
350
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
342
351
|
} | {
|
|
343
352
|
source?: {
|
|
344
353
|
in: number;
|
|
@@ -368,6 +377,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
368
377
|
transition?: import("./types.js").VideoTransition;
|
|
369
378
|
effects?: import("./types.js").VideoClipEffect[];
|
|
370
379
|
mask?: import("./types.js").VideoClipMask;
|
|
380
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
371
381
|
} | {
|
|
372
382
|
source?: {
|
|
373
383
|
in: number;
|
|
@@ -391,6 +401,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
391
401
|
transition?: import("./types.js").VideoTransition;
|
|
392
402
|
effects?: import("./types.js").VideoClipEffect[];
|
|
393
403
|
mask?: import("./types.js").VideoClipMask;
|
|
404
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
394
405
|
effect: string;
|
|
395
406
|
provider?: string;
|
|
396
407
|
values?: import("./types.js").VideoEffectValues;
|
|
@@ -419,6 +430,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
419
430
|
transition?: import("./types.js").VideoTransition;
|
|
420
431
|
effects?: import("./types.js").VideoClipEffect[];
|
|
421
432
|
mask?: import("./types.js").VideoClipMask;
|
|
433
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
422
434
|
})[];
|
|
423
435
|
volume?: number | undefined;
|
|
424
436
|
syncLocked?: boolean | undefined;
|
|
@@ -523,6 +535,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
523
535
|
transition?: import("./types.js").VideoTransition;
|
|
524
536
|
effects?: import("./types.js").VideoClipEffect[];
|
|
525
537
|
mask?: import("./types.js").VideoClipMask;
|
|
538
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
526
539
|
} | {
|
|
527
540
|
source?: {
|
|
528
541
|
in: number;
|
|
@@ -552,6 +565,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
552
565
|
transition?: import("./types.js").VideoTransition;
|
|
553
566
|
effects?: import("./types.js").VideoClipEffect[];
|
|
554
567
|
mask?: import("./types.js").VideoClipMask;
|
|
568
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
555
569
|
} | {
|
|
556
570
|
source?: {
|
|
557
571
|
in: number;
|
|
@@ -576,6 +590,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
576
590
|
transition?: import("./types.js").VideoTransition;
|
|
577
591
|
effects?: import("./types.js").VideoClipEffect[];
|
|
578
592
|
mask?: import("./types.js").VideoClipMask;
|
|
593
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
579
594
|
} | {
|
|
580
595
|
source?: {
|
|
581
596
|
in: number;
|
|
@@ -605,6 +620,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
605
620
|
transition?: import("./types.js").VideoTransition;
|
|
606
621
|
effects?: import("./types.js").VideoClipEffect[];
|
|
607
622
|
mask?: import("./types.js").VideoClipMask;
|
|
623
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
608
624
|
} | {
|
|
609
625
|
source?: {
|
|
610
626
|
in: number;
|
|
@@ -628,6 +644,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
628
644
|
transition?: import("./types.js").VideoTransition;
|
|
629
645
|
effects?: import("./types.js").VideoClipEffect[];
|
|
630
646
|
mask?: import("./types.js").VideoClipMask;
|
|
647
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
631
648
|
effect: string;
|
|
632
649
|
provider?: string;
|
|
633
650
|
values?: import("./types.js").VideoEffectValues;
|
|
@@ -656,6 +673,7 @@ export declare function describeVideoProject(project: VideoProject): {
|
|
|
656
673
|
transition?: import("./types.js").VideoTransition;
|
|
657
674
|
effects?: import("./types.js").VideoClipEffect[];
|
|
658
675
|
mask?: import("./types.js").VideoClipMask;
|
|
676
|
+
camera?: import("./types.js").VideoClipCamera;
|
|
659
677
|
})[];
|
|
660
678
|
volume?: number | undefined;
|
|
661
679
|
syncLocked?: boolean | undefined;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* track draws over one on a later track. Clips on one track never overlap.
|
|
7
7
|
*/
|
|
8
8
|
import type { VideoAnimatable, VideoKeyframes } from './keyframes.cjs';
|
|
9
|
-
import type { EffectValue } from '../effects/types.cjs';
|
|
9
|
+
import type { CameraMoveSpec, EffectValue } from '../effects/types.cjs';
|
|
10
10
|
export type VideoAssetKind = 'video' | 'audio' | 'image';
|
|
11
11
|
/** A spoken word in an asset's transcript, timed in the source (ms). */
|
|
12
12
|
export interface VideoTranscriptWord {
|
|
@@ -230,6 +230,42 @@ interface VideoClipBase {
|
|
|
230
230
|
effects?: VideoClipEffect[];
|
|
231
231
|
/** A shape that cuts the picture out (see `VideoClipMask`). */
|
|
232
232
|
mask?: VideoClipMask;
|
|
233
|
+
/** Provider camera moves baked into the transform's keyframes (see `VideoClipCamera`). */
|
|
234
|
+
camera?: VideoClipCamera;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Where a camera looks at a clip's picture: `zoom` × the picture as placed (default 1), centred
|
|
238
|
+
* on the point `x`, `y` pixels from the frame's centre (default 0, 0).
|
|
239
|
+
*/
|
|
240
|
+
export interface VideoCameraFraming {
|
|
241
|
+
zoom?: number;
|
|
242
|
+
x?: number;
|
|
243
|
+
y?: number;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Camera moves from the effects provider played on a clip, the clip being the shot: `in` (a
|
|
247
|
+
* `transition` move, such as a glide or whip pan) moves from `from` to `framing` over its `ms`
|
|
248
|
+
* from the clip's start, and `during` (a `hold` move, such as a Ken Burns drift) plays across the
|
|
249
|
+
* rest of the clip at `framing`. They are baked into the clip's x, y, scale and rotation keys
|
|
250
|
+
* (one per frame, two at a cut), so previews, renders and exports play them without the provider;
|
|
251
|
+
* `base` keeps the transform from before, put back when the moves are cleared. Set them with
|
|
252
|
+
* `VideoEditorController.setClipCameraMove`, which bakes them; edit the keys directly and the
|
|
253
|
+
* moves no longer describe them.
|
|
254
|
+
*/
|
|
255
|
+
export interface VideoClipCamera {
|
|
256
|
+
in?: CameraMoveSpec;
|
|
257
|
+
during?: CameraMoveSpec;
|
|
258
|
+
/** Where `in` starts (default the whole picture). */
|
|
259
|
+
from?: VideoCameraFraming;
|
|
260
|
+
/** Where `in` arrives and `during` plays (default the whole picture). */
|
|
261
|
+
framing?: VideoCameraFraming;
|
|
262
|
+
/** The clip's transform before the moves were baked. */
|
|
263
|
+
base: {
|
|
264
|
+
x?: number;
|
|
265
|
+
y?: number;
|
|
266
|
+
scale?: number;
|
|
267
|
+
rotation?: number;
|
|
268
|
+
};
|
|
233
269
|
}
|
|
234
270
|
/**
|
|
235
271
|
* The shape of a clip mask: `rectangle` (with `cornerRadius`), `ellipse`, `linear` (a straight
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* track draws over one on a later track. Clips on one track never overlap.
|
|
7
7
|
*/
|
|
8
8
|
import type { VideoAnimatable, VideoKeyframes } from './keyframes.js';
|
|
9
|
-
import type { EffectValue } from '../effects/types.js';
|
|
9
|
+
import type { CameraMoveSpec, EffectValue } from '../effects/types.js';
|
|
10
10
|
export type VideoAssetKind = 'video' | 'audio' | 'image';
|
|
11
11
|
/** A spoken word in an asset's transcript, timed in the source (ms). */
|
|
12
12
|
export interface VideoTranscriptWord {
|
|
@@ -230,6 +230,42 @@ interface VideoClipBase {
|
|
|
230
230
|
effects?: VideoClipEffect[];
|
|
231
231
|
/** A shape that cuts the picture out (see `VideoClipMask`). */
|
|
232
232
|
mask?: VideoClipMask;
|
|
233
|
+
/** Provider camera moves baked into the transform's keyframes (see `VideoClipCamera`). */
|
|
234
|
+
camera?: VideoClipCamera;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Where a camera looks at a clip's picture: `zoom` × the picture as placed (default 1), centred
|
|
238
|
+
* on the point `x`, `y` pixels from the frame's centre (default 0, 0).
|
|
239
|
+
*/
|
|
240
|
+
export interface VideoCameraFraming {
|
|
241
|
+
zoom?: number;
|
|
242
|
+
x?: number;
|
|
243
|
+
y?: number;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Camera moves from the effects provider played on a clip, the clip being the shot: `in` (a
|
|
247
|
+
* `transition` move, such as a glide or whip pan) moves from `from` to `framing` over its `ms`
|
|
248
|
+
* from the clip's start, and `during` (a `hold` move, such as a Ken Burns drift) plays across the
|
|
249
|
+
* rest of the clip at `framing`. They are baked into the clip's x, y, scale and rotation keys
|
|
250
|
+
* (one per frame, two at a cut), so previews, renders and exports play them without the provider;
|
|
251
|
+
* `base` keeps the transform from before, put back when the moves are cleared. Set them with
|
|
252
|
+
* `VideoEditorController.setClipCameraMove`, which bakes them; edit the keys directly and the
|
|
253
|
+
* moves no longer describe them.
|
|
254
|
+
*/
|
|
255
|
+
export interface VideoClipCamera {
|
|
256
|
+
in?: CameraMoveSpec;
|
|
257
|
+
during?: CameraMoveSpec;
|
|
258
|
+
/** Where `in` starts (default the whole picture). */
|
|
259
|
+
from?: VideoCameraFraming;
|
|
260
|
+
/** Where `in` arrives and `during` plays (default the whole picture). */
|
|
261
|
+
framing?: VideoCameraFraming;
|
|
262
|
+
/** The clip's transform before the moves were baked. */
|
|
263
|
+
base: {
|
|
264
|
+
x?: number;
|
|
265
|
+
y?: number;
|
|
266
|
+
scale?: number;
|
|
267
|
+
rotation?: number;
|
|
268
|
+
};
|
|
233
269
|
}
|
|
234
270
|
/**
|
|
235
271
|
* The shape of a clip mask: `rectangle` (with `cornerRadius`), `ellipse`, `linear` (a straight
|