openvideo 0.0.3 → 0.1.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.
@@ -1,4 +1,4 @@
1
- import { F as Ie, u as Ee, l as se, M as v, G as De, v as Oe, S as Fe, x as ae, E as u, e as D, y as S, z as Le, H as O, I as b, R as F, J as ne, K as He, t as m, b as f, i as B, w as L, L as K, N as We, c as Y, B as y, j as U, O as ze, Q as C, k as M, V as w, W as Ve, a as Ne, X as ie, Y as oe, Z as le, _ as ue, C as P, $ as je, a0 as A, a1 as J, D as H, a2 as $e, a3 as qe, P as Ke, d as Ye, T as X, a4 as Q, a5 as Je, a6 as Xe, a7 as Qe } from "./index-gXIG5heI.js";
1
+ import { F as Ie, u as Ee, l as se, M as v, G as De, v as Oe, S as Fe, x as ae, E as u, e as D, y as S, z as Le, H as O, I as b, R as F, J as ne, K as He, t as m, b as f, i as B, w as L, L as K, N as We, c as Y, B as y, j as U, O as ze, Q as C, k as M, V as w, W as Ve, a as Ne, X as ie, Y as oe, Z as le, _ as ue, C as P, $ as je, a0 as A, a1 as J, D as H, a2 as $e, a3 as qe, P as Ke, d as Ye, T as X, a4 as Q, a5 as Je, a6 as Xe, a7 as Qe } from "./index-C7b-H3n2.js";
2
2
  import { B as de, c as Ze } from "./colorToUniform-C2jGzNe1.js";
3
3
  var et = `in vec2 vMaskCoord;
4
4
  in vec2 vTextureCoord;
@@ -1,6 +1,6 @@
1
- import { S as G, E as d, B as v, w as m, D as S, L as j, v as ve, s as U, t as b, a8 as Be, k as K, a9 as Ae, b as p, V as L, j as B, i as A, l as F, M as $, aa as z, ab as Ne, ac as ye, ad as Y, ae as Ce, A as De, R as Ie, e as T } from "./index-gXIG5heI.js";
1
+ import { S as G, E as d, B as v, w as m, D as S, L as j, v as ve, s as U, t as b, a8 as Be, k as K, a9 as Ae, b as p, V as L, j as B, i as A, l as F, M as $, aa as z, ab as Ne, ac as ye, ad as Y, ae as Ce, A as De, R as Ie, e as T } from "./index-C7b-H3n2.js";
2
2
  import { b as q } from "./colorToUniform-C2jGzNe1.js";
3
- import { e as Ge, G as Ue, c as Fe, b as Oe, U as Pe, R as Me, B as Z, d as N, f as Le, S as He, a as we } from "./SharedSystems-B3cyWriK.js";
3
+ import { e as Ge, G as Ue, c as Fe, b as Oe, U as Pe, R as Me, B as Z, d as N, f as Le, S as He, a as we } from "./SharedSystems-BukQJH1h.js";
4
4
  class Q {
5
5
  constructor() {
6
6
  this._tempState = G.for2d(), this._didUploadHash = {};
@@ -1,6 +1,6 @@
1
- import { S as E, g as A, E as p, f as ae, D as S, b as C, B as T, c as ue, d as L, h as M, w as v, i as x, j as ce, k as de, l as k, m as w, M as D, n as H, o as he, p as pe, q as z, s as F, t as R, A as le, R as fe, e as B } from "./index-gXIG5heI.js";
1
+ import { S as E, g as A, E as p, f as ae, D as S, b as C, B as T, c as ue, d as L, h as M, w as v, i as x, j as ce, k as de, l as k, m as w, M as D, n as H, o as he, p as pe, q as z, s as F, t as R, A as le, R as fe, e as B } from "./index-C7b-H3n2.js";
2
2
  import { l as ge, a as me } from "./colorToUniform-C2jGzNe1.js";
3
- import { c as _e, u as be, U as xe, B as ye, G as Ge, e as Se, R as Be, t as Pe, S as Te, a as Ce } from "./SharedSystems-B3cyWriK.js";
3
+ import { c as _e, u as be, U as xe, B as ye, G as Ge, e as Se, R as Be, t as Pe, S as Te, a as Ce } from "./SharedSystems-BukQJH1h.js";
4
4
  const y = E.for2d();
5
5
  class O {
6
6
  start(e, t, r) {
@@ -0,0 +1,3 @@
1
+ import { EasingFunction } from './types';
2
+ export declare const easings: Record<string, EasingFunction>;
3
+ export declare function getEasing(easing: string | EasingFunction | undefined): EasingFunction;
@@ -0,0 +1,29 @@
1
+ import { AnimationOptions, AnimationTransform, IAnimation } from './types';
2
+ export interface GsapAnimationParams {
3
+ /**
4
+ * Animation presets or custom GSAP vars
5
+ */
6
+ type: "character" | "word" | "line";
7
+ from: gsap.TweenVars;
8
+ to: gsap.TweenVars;
9
+ stagger?: number | gsap.StaggerVars;
10
+ }
11
+ export declare class GsapAnimation implements IAnimation {
12
+ readonly id: string;
13
+ readonly type: string;
14
+ readonly options: Required<AnimationOptions>;
15
+ readonly params: GsapAnimationParams;
16
+ private timeline;
17
+ private lastTarget;
18
+ constructor(params: GsapAnimationParams, opts: AnimationOptions, type?: string);
19
+ getTransform(_time: number): AnimationTransform;
20
+ private getTargetCount;
21
+ apply(target: any, time: number): void;
22
+ /**
23
+ * Get current animation targets from the container based on animation type.
24
+ * Used to compare against GSAP's cached targets to detect when children are recreated.
25
+ */
26
+ private getCurrentTargets;
27
+ private initTimeline;
28
+ destroy(): void;
29
+ }
@@ -0,0 +1,5 @@
1
+ export * from './types';
2
+ export * from './easings';
3
+ export * from './registry';
4
+ export * from './keyframe-animation';
5
+ export { getPresetTemplate } from './presets';
@@ -0,0 +1,11 @@
1
+ import { AnimationOptions, AnimationTransform, IAnimation, KeyframeData } from './types';
2
+ export declare class KeyframeAnimation implements IAnimation {
3
+ readonly id: string;
4
+ readonly type: string;
5
+ readonly options: Required<AnimationOptions>;
6
+ readonly params: any;
7
+ private frames;
8
+ constructor(data: KeyframeData | any[], opts: AnimationOptions, type?: string);
9
+ getTransform(time: number): AnimationTransform;
10
+ private interpolateProps;
11
+ }
@@ -0,0 +1,34 @@
1
+ import { AnimationFactory } from './registry';
2
+ export declare const pulse: AnimationFactory;
3
+ export declare const fadeIn: AnimationFactory;
4
+ export declare const fadeOut: AnimationFactory;
5
+ export declare const slideIn: AnimationFactory;
6
+ export declare const slideOut: AnimationFactory;
7
+ export declare const zoomIn: AnimationFactory;
8
+ export declare const zoomOut: AnimationFactory;
9
+ export declare const blurIn: AnimationFactory;
10
+ export declare const blurOut: AnimationFactory;
11
+ export declare const charFadeIn: AnimationFactory;
12
+ export declare const charSlideUp: AnimationFactory;
13
+ export declare const charTypewriter: AnimationFactory;
14
+ export declare const customInPreset1: AnimationFactory;
15
+ export declare const customInPreset2: AnimationFactory;
16
+ export declare const customInPreset3: AnimationFactory;
17
+ export declare const customInPreset4: AnimationFactory;
18
+ export declare const customInPreset5: AnimationFactory;
19
+ export declare const customInPreset6: AnimationFactory;
20
+ export declare const customInPreset7: AnimationFactory;
21
+ export declare const customInPreset8: AnimationFactory;
22
+ export declare const customInPreset9: AnimationFactory;
23
+ export declare const customOutPreset1: AnimationFactory;
24
+ export declare const customOutPreset2: AnimationFactory;
25
+ export declare const customOutPreset3: AnimationFactory;
26
+ export declare const customOutPreset4: AnimationFactory;
27
+ export declare const customOutPreset5: AnimationFactory;
28
+ export declare const customOutPreset6: AnimationFactory;
29
+ export declare const customOutPreset7: AnimationFactory;
30
+ /**
31
+ * Get the keyframe template for a preset animation
32
+ * Useful for populating the animation editor UI
33
+ */
34
+ export declare function getPresetTemplate(type: string, params?: any): any;
@@ -0,0 +1,11 @@
1
+ import { AnimationOptions, IAnimation } from './types';
2
+ export type AnimationFactory = (opts: AnimationOptions, params?: any) => IAnimation;
3
+ declare class AnimationRegistry {
4
+ private factories;
5
+ constructor();
6
+ register(name: string, factory: AnimationFactory): void;
7
+ create(name: string, opts: AnimationOptions, params?: any): IAnimation;
8
+ has(name: string): boolean;
9
+ }
10
+ export declare const animationRegistry: AnimationRegistry;
11
+ export {};
@@ -0,0 +1,118 @@
1
+ export type EasingFunction = (t: number) => number;
2
+ export interface AnimationProps {
3
+ x?: number;
4
+ y?: number;
5
+ width?: number;
6
+ height?: number;
7
+ scale?: number;
8
+ opacity?: number;
9
+ angle?: number;
10
+ blur?: number;
11
+ brightness?: number;
12
+ }
13
+ export interface AnimationOptions {
14
+ duration: number;
15
+ delay?: number;
16
+ easing?: string | EasingFunction;
17
+ iterCount?: number;
18
+ id?: string;
19
+ }
20
+ export interface IAnimation {
21
+ readonly id: string;
22
+ readonly type: string;
23
+ readonly options: Required<AnimationOptions>;
24
+ readonly params?: any;
25
+ /**
26
+ * Calculate offsets and multipliers for the given time
27
+ * @param time Relative time from the start of the clip in microseconds
28
+ * @returns Partial state containing offsets/multipliers
29
+ */
30
+ getTransform(time: number): AnimationTransform;
31
+ /**
32
+ * Apply complex animations (like GSAP character animations) directly to a target
33
+ * @param target The target object (e.g., PixiJS Container)
34
+ * @param time Relative time in microseconds
35
+ */
36
+ apply?(target: any, time: number): void;
37
+ }
38
+ export interface AnimationTransform {
39
+ x?: number;
40
+ y?: number;
41
+ width?: number;
42
+ height?: number;
43
+ scale?: number;
44
+ opacity?: number;
45
+ angle?: number;
46
+ blur?: number;
47
+ brightness?: number;
48
+ }
49
+ export interface KeyframeData {
50
+ [key: string]: Partial<AnimationProps & {
51
+ easing?: string | EasingFunction;
52
+ }>;
53
+ }
54
+ export declare const ANIMATABLE_PROPERTIES: {
55
+ readonly x: {
56
+ readonly label: "X Position";
57
+ readonly min: -2000;
58
+ readonly max: 2000;
59
+ readonly step: 1;
60
+ readonly default: 0;
61
+ };
62
+ readonly y: {
63
+ readonly label: "Y Position";
64
+ readonly min: -2000;
65
+ readonly max: 2000;
66
+ readonly step: 1;
67
+ readonly default: 0;
68
+ };
69
+ readonly width: {
70
+ readonly label: "Width";
71
+ readonly min: -1000;
72
+ readonly max: 1000;
73
+ readonly step: 1;
74
+ readonly default: 0;
75
+ };
76
+ readonly height: {
77
+ readonly label: "Height";
78
+ readonly min: -1000;
79
+ readonly max: 1000;
80
+ readonly step: 1;
81
+ readonly default: 0;
82
+ };
83
+ readonly scale: {
84
+ readonly label: "Scale";
85
+ readonly min: 0;
86
+ readonly max: 3;
87
+ readonly step: 0.1;
88
+ readonly default: 1;
89
+ };
90
+ readonly opacity: {
91
+ readonly label: "Opacity";
92
+ readonly min: 0;
93
+ readonly max: 1;
94
+ readonly step: 0.01;
95
+ readonly default: 1;
96
+ };
97
+ readonly angle: {
98
+ readonly label: "Rotation";
99
+ readonly min: -360;
100
+ readonly max: 360;
101
+ readonly step: 1;
102
+ readonly default: 0;
103
+ };
104
+ readonly blur: {
105
+ readonly label: "Blur";
106
+ readonly min: 0;
107
+ readonly max: 100;
108
+ readonly step: 1;
109
+ readonly default: 0;
110
+ };
111
+ readonly brightness: {
112
+ readonly label: "Brightness";
113
+ readonly min: 0;
114
+ readonly max: 5;
115
+ readonly step: 0.1;
116
+ readonly default: 1;
117
+ };
118
+ };
@@ -1,5 +1,5 @@
1
- import { T as M, U as Z, P as m, r as te, E as y, a as ie, w as g, e as P, C as V } from "./index-gXIG5heI.js";
2
- import "./webworkerAll-I-KX_dQM.js";
1
+ import { T as M, U as Z, P as m, r as te, E as y, a as ie, w as g, e as P, C as V } from "./index-C7b-H3n2.js";
2
+ import "./webworkerAll-B_y2Hkt4.js";
3
3
  class q {
4
4
  constructor(e) {
5
5
  this._lastTransform = "", this._observer = null, this._tickerAttached = !1, this.updateTranslation = () => {
@@ -22,7 +22,7 @@ export declare abstract class BaseClip<T extends BaseSpriteEvents = BaseSpriteEv
22
22
  abstract tick(time: number): Promise<{
23
23
  video?: VideoFrame | ImageBitmap | null;
24
24
  audio?: Float32Array[];
25
- state: 'done' | 'success';
25
+ state: "done" | "success";
26
26
  }>;
27
27
  ready: Promise<IClipMeta>;
28
28
  abstract readonly meta: IClipMeta;
@@ -92,7 +92,7 @@ export declare abstract class BaseClip<T extends BaseSpriteEvents = BaseSpriteEv
92
92
  * Default implementation returns all handles
93
93
  * Override in subclasses to customize handle visibility (e.g., TextClip)
94
94
  */
95
- getVisibleHandles(): Array<'tl' | 'tr' | 'bl' | 'br' | 'ml' | 'mr' | 'mt' | 'mb' | 'rot'>;
95
+ getVisibleHandles(): Array<"tl" | "tr" | "bl" | "br" | "ml" | "mr" | "mt" | "mb" | "rot">;
96
96
  /**
97
97
  * Scale clip to fit within the scene dimensions while maintaining aspect ratio
98
98
  * @param sceneWidth Scene width
@@ -8,11 +8,11 @@ export interface ICaptionStyle {
8
8
  fontFamily?: string;
9
9
  fontWeight?: string | number;
10
10
  fontStyle?: string;
11
- color?: ICaptionOpts['fill'];
12
- align?: ICaptionOpts['align'];
13
- textCase?: ICaptionOpts['textCase'];
14
- verticalAlign?: ICaptionOpts['verticalAlign'];
15
- wordsPerLine?: ICaptionOpts['wordsPerLine'];
11
+ color?: ICaptionOpts["fill"];
12
+ align?: ICaptionOpts["align"];
13
+ textCase?: ICaptionOpts["textCase"];
14
+ verticalAlign?: ICaptionOpts["verticalAlign"];
15
+ wordsPerLine?: ICaptionOpts["wordsPerLine"];
16
16
  stroke?: {
17
17
  color: string | number;
18
18
  width: number;
@@ -36,14 +36,14 @@ export interface ICaptionEvents extends BaseSpriteEvents {
36
36
  opacity: number;
37
37
  volume: number;
38
38
  text: string;
39
- words: ICaptionOpts['words'];
40
- fill: ICaptionOpts['fill'];
41
- align: ICaptionOpts['align'];
42
- textCase: ICaptionOpts['textCase'];
43
- stroke: ICaptionOpts['stroke'];
44
- dropShadow: ICaptionOpts['dropShadow'];
45
- caption: ICaptionOpts['caption'];
46
- wordsPerLine: ICaptionOpts['wordsPerLine'];
39
+ words: ICaptionOpts["words"];
40
+ fill: ICaptionOpts["fill"];
41
+ align: ICaptionOpts["align"];
42
+ textCase: ICaptionOpts["textCase"];
43
+ stroke: ICaptionOpts["stroke"];
44
+ dropShadow: ICaptionOpts["dropShadow"];
45
+ caption: ICaptionOpts["caption"];
46
+ wordsPerLine: ICaptionOpts["wordsPerLine"];
47
47
  }>;
48
48
  }
49
49
  export interface ICaptionOpts {
@@ -73,7 +73,7 @@ export interface ICaptionOpts {
73
73
  * @default '#ffffff'
74
74
  */
75
75
  fill?: string | number | {
76
- type: 'gradient';
76
+ type: "gradient";
77
77
  x0: number;
78
78
  y0: number;
79
79
  x1: number;
@@ -150,7 +150,7 @@ export interface ICaptionOpts {
150
150
  stroke?: string | number | {
151
151
  color: string | number;
152
152
  width: number;
153
- join?: 'miter' | 'round' | 'bevel';
153
+ join?: "miter" | "round" | "bevel";
154
154
  };
155
155
  /**
156
156
  * Stroke width in pixels (used when stroke is a simple color)
@@ -161,7 +161,7 @@ export interface ICaptionOpts {
161
161
  * Text alignment ('left', 'center', 'right')
162
162
  * @default 'center'
163
163
  */
164
- align?: 'left' | 'center' | 'right';
164
+ align?: "left" | "center" | "right";
165
165
  /**
166
166
  * Drop shadow configuration
167
167
  */
@@ -181,7 +181,7 @@ export interface ICaptionOpts {
181
181
  * Word wrap mode ('break-word' or 'normal')
182
182
  * @default 'break-word'
183
183
  */
184
- wordWrapMode?: 'break-word' | 'normal';
184
+ wordWrapMode?: "break-word" | "normal";
185
185
  /**
186
186
  * Whether to enable word wrap
187
187
  * @default true
@@ -191,7 +191,7 @@ export interface ICaptionOpts {
191
191
  * Vertical alignment ('top', 'center', 'bottom')
192
192
  * @default 'bottom'
193
193
  */
194
- verticalAlign?: 'top' | 'center' | 'bottom';
194
+ verticalAlign?: "top" | "center" | "bottom";
195
195
  /**
196
196
  * Line height (multiplier)
197
197
  * @default 1
@@ -206,7 +206,7 @@ export interface ICaptionOpts {
206
206
  * Text case transformation
207
207
  * @default 'none'
208
208
  */
209
- textCase?: 'none' | 'uppercase' | 'lowercase' | 'title';
209
+ textCase?: "none" | "uppercase" | "lowercase" | "title";
210
210
  /**
211
211
  * Media ID to which the captions were applied
212
212
  */
@@ -219,7 +219,7 @@ export interface ICaptionOpts {
219
219
  * Words per line mode ('single' or 'multiple')
220
220
  * @default 'multiple'
221
221
  */
222
- wordsPerLine?: 'single' | 'multiple';
222
+ wordsPerLine?: "single" | "multiple";
223
223
  }
224
224
  /**
225
225
  * Caption clip using Canvas 2D for rendering
@@ -238,13 +238,14 @@ export interface ICaptionOpts {
238
238
  */
239
239
  export declare class Caption extends BaseClip<ICaptionEvents> implements IClip {
240
240
  readonly type = "Caption";
241
- ready: IClip['ready'];
241
+ ready: IClip["ready"];
242
242
  private _meta;
243
243
  get meta(): {
244
244
  duration: number;
245
245
  width: number;
246
246
  height: number;
247
247
  };
248
+ animate(time: number): void;
248
249
  private _visualPaddingX;
249
250
  private _visualPaddingY;
250
251
  private _lastTickTime;
@@ -270,8 +271,8 @@ export declare class Caption extends BaseClip<ICaptionEvents> implements IClip {
270
271
  set text(v: string);
271
272
  get style(): ICaptionStyle;
272
273
  set style(v: Partial<ICaptionOpts> | ICaptionStyle);
273
- get wordsPerLine(): 'single' | 'multiple';
274
- set wordsPerLine(v: 'single' | 'multiple');
274
+ get wordsPerLine(): "single" | "multiple";
275
+ set wordsPerLine(v: "single" | "multiple");
275
276
  get fontFamily(): string;
276
277
  set fontFamily(v: string);
277
278
  get fontUrl(): string;
@@ -280,20 +281,20 @@ export declare class Caption extends BaseClip<ICaptionEvents> implements IClip {
280
281
  set fontSize(v: number);
281
282
  get fontWeight(): string | number;
282
283
  set fontWeight(v: string | number);
283
- get fontStyle(): 'normal' | 'italic' | 'oblique';
284
- set fontStyle(v: 'normal' | 'italic' | 'oblique');
285
- get fill(): ICaptionOpts['fill'];
286
- set fill(v: ICaptionOpts['fill']);
287
- get align(): 'left' | 'center' | 'right';
288
- set align(v: 'left' | 'center' | 'right');
289
- get stroke(): ICaptionOpts['stroke'];
290
- set stroke(v: ICaptionOpts['stroke']);
284
+ get fontStyle(): "normal" | "italic" | "oblique";
285
+ set fontStyle(v: "normal" | "italic" | "oblique");
286
+ get fill(): ICaptionOpts["fill"];
287
+ set fill(v: ICaptionOpts["fill"]);
288
+ get align(): "left" | "center" | "right";
289
+ set align(v: "left" | "center" | "right");
290
+ get stroke(): ICaptionOpts["stroke"];
291
+ set stroke(v: ICaptionOpts["stroke"]);
291
292
  get strokeWidth(): number;
292
293
  set strokeWidth(v: number);
293
- get dropShadow(): ICaptionOpts['dropShadow'];
294
- set dropShadow(v: ICaptionOpts['dropShadow']);
295
- get caption(): ICaptionOpts['caption'];
296
- set caption(v: ICaptionOpts['caption']);
294
+ get dropShadow(): ICaptionOpts["dropShadow"];
295
+ set dropShadow(v: ICaptionOpts["dropShadow"]);
296
+ get caption(): ICaptionOpts["caption"];
297
+ set caption(v: ICaptionOpts["caption"]);
297
298
  /**
298
299
  * Bottom offset from video bottom (hybrid JSON structure)
299
300
  */
@@ -302,7 +303,7 @@ export declare class Caption extends BaseClip<ICaptionEvents> implements IClip {
302
303
  * Text case proxy
303
304
  */
304
305
  get textCase(): string;
305
- set textCase(v: 'none' | 'uppercase' | 'lowercase' | 'title');
306
+ set textCase(v: "none" | "uppercase" | "lowercase" | "title");
306
307
  /**
307
308
  * Unique identifier for this clip instance
308
309
  */
@@ -329,7 +330,7 @@ export declare class Caption extends BaseClip<ICaptionEvents> implements IClip {
329
330
  /**
330
331
  * Words setter that triggers re-render and ensures consistency
331
332
  */
332
- set words(v: ICaptionOpts['words']);
333
+ set words(v: ICaptionOpts["words"]);
333
334
  private opts;
334
335
  private pixiTextContainer;
335
336
  private renderTexture;
@@ -341,7 +342,7 @@ export declare class Caption extends BaseClip<ICaptionEvents> implements IClip {
341
342
  private externalRenderer;
342
343
  private pixiApp;
343
344
  private originalOpts;
344
- constructor(text: string, opts?: ICaptionOpts, renderer?: Application['renderer']);
345
+ constructor(text: string, opts?: ICaptionOpts, renderer?: Application["renderer"]);
345
346
  /**
346
347
  * Update text styling options and refresh the caption rendering
347
348
  */
@@ -360,11 +361,11 @@ export declare class Caption extends BaseClip<ICaptionEvents> implements IClip {
360
361
  /**
361
362
  * Set an external renderer (e.g., from Studio) to avoid creating our own Pixi App
362
363
  */
363
- setRenderer(renderer: Application['renderer']): void;
364
+ setRenderer(renderer: Application["renderer"]): void;
364
365
  private getRenderer;
365
366
  tick(time: number): Promise<{
366
367
  video: ImageBitmap;
367
- state: 'success';
368
+ state: "success";
368
369
  }>;
369
370
  split(_time: number): Promise<[this, this]>;
370
371
  addEffect(effect: {
@@ -388,5 +389,5 @@ export declare class Caption extends BaseClip<ICaptionEvents> implements IClip {
388
389
  * @returns Promise that resolves to a Caption instance
389
390
  */
390
391
  static fromObject(json: CaptionJSON): Promise<Caption>;
391
- getVisibleHandles(): Array<'tl' | 'tr' | 'bl' | 'br' | 'ml' | 'mr' | 'mt' | 'mb' | 'rot'>;
392
+ getVisibleHandles(): Array<"tl" | "tr" | "bl" | "br" | "ml" | "mr" | "mt" | "mb" | "rot">;
392
393
  }
@@ -30,6 +30,10 @@ export interface IClip<T extends BaseSpriteEvents = BaseSpriteEvents> extends Om
30
30
  * Clip type (e.g., 'video', 'image', 'text', 'audio')
31
31
  */
32
32
  readonly type: string;
33
+ /**
34
+ * Name of this clip
35
+ */
36
+ name: string;
33
37
  /**
34
38
  * Source URL or identifier for this clip
35
39
  */
@@ -111,6 +115,25 @@ export interface IClip<T extends BaseSpriteEvents = BaseSpriteEvents> extends Om
111
115
  * Center the clip within the scene dimensions
112
116
  */
113
117
  centerInScene(sceneWidth: number, sceneHeight: number): void;
118
+ /**
119
+ * Add a modular animation to the clip
120
+ * @param name Preset name or 'keyframes'
121
+ * @param opts Animation options (duration, delay, etc.)
122
+ * @param params Preset-specific parameters or KeyframeData
123
+ */
124
+ addAnimation(name: string, opts: any, params?: any): string;
125
+ /**
126
+ * Remove an animation by ID
127
+ */
128
+ removeAnimation(id: string): void;
129
+ /**
130
+ * Clear all modular animations
131
+ */
132
+ clearAnimations(): void;
133
+ /**
134
+ * List of active animations
135
+ */
136
+ readonly animations: any[];
114
137
  }
115
138
  /**
116
139
  * Optional interface for clips that support HTML media element playback
@@ -12,4 +12,8 @@ export declare class Placeholder extends BaseClip {
12
12
  }>;
13
13
  clone(): Promise<this>;
14
14
  split(time: number): Promise<[this, this]>;
15
+ /**
16
+ * Create a Placeholder instance from a JSON object
17
+ */
18
+ static fromObject(json: any): Promise<Placeholder>;
15
19
  }