@pixerate/editor 0.234.0 → 0.235.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation-editor/controller.d.cts +25 -0
- package/dist/animation-editor/controller.d.ts +25 -0
- package/dist/animation-editor/index.cjs +159 -50
- package/dist/animation-editor/index.d.cts +1 -0
- package/dist/animation-editor/index.d.ts +1 -0
- package/dist/animation-editor/index.js +115 -6
- package/dist/animation-editor/layers.d.cts +2 -0
- package/dist/animation-editor/layers.d.ts +2 -0
- package/dist/animation-editor/sequence.d.cts +33 -0
- package/dist/animation-editor/sequence.d.ts +33 -0
- package/dist/{chunk-I277KJLQ.js → chunk-G3RUKJ5C.js} +105 -1
- package/dist/{chunk-6RZVFYGJ.cjs → chunk-JWCKJNDR.cjs} +105 -1
- package/dist/effects/index.cjs +19 -11
- package/dist/effects/index.d.cts +1 -0
- package/dist/effects/index.d.ts +1 -0
- package/dist/effects/index.js +9 -1
- package/dist/effects/template-tools.d.cts +25 -0
- package/dist/effects/template-tools.d.ts +25 -0
- package/dist/effects/templates.d.cts +30 -1
- package/dist/effects/templates.d.ts +30 -1
- package/dist/video-editor/controller.d.cts +26 -0
- package/dist/video-editor/controller.d.ts +26 -0
- package/dist/video-editor/index.cjs +187 -42
- package/dist/video-editor/index.d.cts +1 -0
- package/dist/video-editor/index.d.ts +1 -0
- package/dist/video-editor/index.js +145 -0
- package/dist/video-editor/sequence.d.cts +38 -0
- package/dist/video-editor/sequence.d.ts +38 -0
- package/package.json +1 -1
|
@@ -71,6 +71,19 @@ export type MotionShotLayerResult = ({
|
|
|
71
71
|
ok: false;
|
|
72
72
|
error: string;
|
|
73
73
|
};
|
|
74
|
+
/** What filling a template did: the shots and layers it made, slots left open, and notes. */
|
|
75
|
+
export type MotionTemplateResult = {
|
|
76
|
+
ok: true;
|
|
77
|
+
template: string;
|
|
78
|
+
mode: 'replace' | 'append';
|
|
79
|
+
shots: string[];
|
|
80
|
+
layers: string[];
|
|
81
|
+
openSlots: string[];
|
|
82
|
+
notes: string[];
|
|
83
|
+
} | {
|
|
84
|
+
ok: false;
|
|
85
|
+
error: string;
|
|
86
|
+
};
|
|
74
87
|
/** A layer as `addShotLayer` takes it: its id is made when left out. */
|
|
75
88
|
export type MotionShotLayerInput = Omit<MotionShotLayer, 'id' | 'provider' | 'name'> & {
|
|
76
89
|
id?: string;
|
|
@@ -143,6 +156,8 @@ export interface AnimationEditorState {
|
|
|
143
156
|
revision: number;
|
|
144
157
|
/** The registered effects provider, or `null`. */
|
|
145
158
|
effectsProvider: EffectProvider | null;
|
|
159
|
+
/** Goes up each time shot layer or transition pictures come in, so a stage that caches its frame draws again. */
|
|
160
|
+
layerPictures: number;
|
|
146
161
|
/** The take being recorded, or `null`. While recording, frames show the take so far. */
|
|
147
162
|
recording: AnimationEditorRecording | null;
|
|
148
163
|
}
|
|
@@ -323,6 +338,16 @@ export declare class AnimationEditorController {
|
|
|
323
338
|
}): Promise<MotionShotLayerResult>;
|
|
324
339
|
/** Removes a shot's transition. One undo step. Works without a provider. */
|
|
325
340
|
clearShotTransition(shot: string): MotionShotLayerResult;
|
|
341
|
+
/**
|
|
342
|
+
* Fills a provider sequence template and loads it: `replace` (default) makes a new scene the
|
|
343
|
+
* size of the template's stage from its shots; `append` adds its shots after the current ones,
|
|
344
|
+
* scaled to the artwork. Values are checked first and every problem is refused at once. One
|
|
345
|
+
* undo step. Returns the new shot and layer ids, slots left open and notes.
|
|
346
|
+
*/
|
|
347
|
+
fillTemplate(template: string, values?: Record<string, unknown>, options?: {
|
|
348
|
+
name?: string;
|
|
349
|
+
mode?: 'replace' | 'append';
|
|
350
|
+
}): Promise<MotionTemplateResult>;
|
|
326
351
|
/**
|
|
327
352
|
* Starts recording a take: the playhead goes to where the take's shot will start (default:
|
|
328
353
|
* the end of the scene) and plays on, and every `recordSample` (or stage gesture) is a value
|
|
@@ -71,6 +71,19 @@ export type MotionShotLayerResult = ({
|
|
|
71
71
|
ok: false;
|
|
72
72
|
error: string;
|
|
73
73
|
};
|
|
74
|
+
/** What filling a template did: the shots and layers it made, slots left open, and notes. */
|
|
75
|
+
export type MotionTemplateResult = {
|
|
76
|
+
ok: true;
|
|
77
|
+
template: string;
|
|
78
|
+
mode: 'replace' | 'append';
|
|
79
|
+
shots: string[];
|
|
80
|
+
layers: string[];
|
|
81
|
+
openSlots: string[];
|
|
82
|
+
notes: string[];
|
|
83
|
+
} | {
|
|
84
|
+
ok: false;
|
|
85
|
+
error: string;
|
|
86
|
+
};
|
|
74
87
|
/** A layer as `addShotLayer` takes it: its id is made when left out. */
|
|
75
88
|
export type MotionShotLayerInput = Omit<MotionShotLayer, 'id' | 'provider' | 'name'> & {
|
|
76
89
|
id?: string;
|
|
@@ -143,6 +156,8 @@ export interface AnimationEditorState {
|
|
|
143
156
|
revision: number;
|
|
144
157
|
/** The registered effects provider, or `null`. */
|
|
145
158
|
effectsProvider: EffectProvider | null;
|
|
159
|
+
/** Goes up each time shot layer or transition pictures come in, so a stage that caches its frame draws again. */
|
|
160
|
+
layerPictures: number;
|
|
146
161
|
/** The take being recorded, or `null`. While recording, frames show the take so far. */
|
|
147
162
|
recording: AnimationEditorRecording | null;
|
|
148
163
|
}
|
|
@@ -323,6 +338,16 @@ export declare class AnimationEditorController {
|
|
|
323
338
|
}): Promise<MotionShotLayerResult>;
|
|
324
339
|
/** Removes a shot's transition. One undo step. Works without a provider. */
|
|
325
340
|
clearShotTransition(shot: string): MotionShotLayerResult;
|
|
341
|
+
/**
|
|
342
|
+
* Fills a provider sequence template and loads it: `replace` (default) makes a new scene the
|
|
343
|
+
* size of the template's stage from its shots; `append` adds its shots after the current ones,
|
|
344
|
+
* scaled to the artwork. Values are checked first and every problem is refused at once. One
|
|
345
|
+
* undo step. Returns the new shot and layer ids, slots left open and notes.
|
|
346
|
+
*/
|
|
347
|
+
fillTemplate(template: string, values?: Record<string, unknown>, options?: {
|
|
348
|
+
name?: string;
|
|
349
|
+
mode?: 'replace' | 'append';
|
|
350
|
+
}): Promise<MotionTemplateResult>;
|
|
326
351
|
/**
|
|
327
352
|
* Starts recording a take: the playhead goes to where the take's shot will start (default:
|
|
328
353
|
* the end of the scene) and plays on, and every `recordSample` (or stage gesture) is a value
|