openvideo 0.0.4 → 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.
- package/dist/{SharedSystems-CbOvgzCC.js → SharedSystems-BukQJH1h.js} +1 -1
- package/dist/{WebGLRenderer-BytNn1OJ.js → WebGLRenderer-BuRbEm0g.js} +2 -2
- package/dist/{WebGPURenderer-BAGe_F9Z.js → WebGPURenderer-CTm7Kg4-.js} +2 -2
- package/dist/animation/easings.d.ts +3 -0
- package/dist/animation/gsap-animation.d.ts +29 -0
- package/dist/animation/index.d.ts +5 -0
- package/dist/animation/keyframe-animation.d.ts +11 -0
- package/dist/animation/presets.d.ts +34 -0
- package/dist/animation/registry.d.ts +11 -0
- package/dist/animation/types.d.ts +118 -0
- package/dist/{browserAll-D2WDRHjP.js → browserAll-NQ4Ztn0h.js} +2 -2
- package/dist/clips/base-clip.d.ts +2 -2
- package/dist/clips/caption-clip.d.ts +42 -41
- package/dist/clips/iclip.d.ts +19 -0
- package/dist/clips/placeholder-clip.d.ts +4 -0
- package/dist/clips/text-clip.d.ts +38 -17
- package/dist/{index-BdiiyukT.js → index-C7b-H3n2.js} +9660 -5456
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +28 -22
- package/dist/index.umd.js +348 -176
- package/dist/json-serialization.d.ts +5 -0
- package/dist/sprite/base-sprite.d.ts +36 -4
- package/dist/sprite/pixi-sprite-renderer.d.ts +3 -0
- package/dist/studio.d.ts +16 -16
- package/dist/{webworkerAll-BuYW7nlg.js → webworkerAll-B_y2Hkt4.js} +241 -268
- package/package.json +3 -2
|
@@ -2,6 +2,7 @@ import { Application, Texture } from 'pixi.js';
|
|
|
2
2
|
import { BaseClip } from './base-clip';
|
|
3
3
|
import { IClip } from './iclip';
|
|
4
4
|
import { TextJSON } from '../json-serialization';
|
|
5
|
+
import { BaseSpriteEvents } from '../sprite/base-sprite';
|
|
5
6
|
export interface ITextOpts {
|
|
6
7
|
/**
|
|
7
8
|
* Font size in pixels
|
|
@@ -32,7 +33,7 @@ export interface ITextOpts {
|
|
|
32
33
|
* @default '#ffffff'
|
|
33
34
|
*/
|
|
34
35
|
fill?: string | number | {
|
|
35
|
-
type:
|
|
36
|
+
type: "gradient";
|
|
36
37
|
x0: number;
|
|
37
38
|
y0: number;
|
|
38
39
|
x1: number;
|
|
@@ -48,8 +49,8 @@ export interface ITextOpts {
|
|
|
48
49
|
stroke?: string | number | {
|
|
49
50
|
color: string | number;
|
|
50
51
|
width: number;
|
|
51
|
-
join?:
|
|
52
|
-
cap?:
|
|
52
|
+
join?: "miter" | "round" | "bevel";
|
|
53
|
+
cap?: "butt" | "round" | "square";
|
|
53
54
|
miterLimit?: number;
|
|
54
55
|
};
|
|
55
56
|
/**
|
|
@@ -61,16 +62,16 @@ export interface ITextOpts {
|
|
|
61
62
|
* Text alignment ('left', 'center', 'right')
|
|
62
63
|
* @default 'left'
|
|
63
64
|
*/
|
|
64
|
-
align?:
|
|
65
|
+
align?: "left" | "center" | "right";
|
|
65
66
|
/**
|
|
66
67
|
* Alias for align to match UI property naming
|
|
67
68
|
*/
|
|
68
|
-
textAlign?:
|
|
69
|
+
textAlign?: "left" | "center" | "right";
|
|
69
70
|
/**
|
|
70
71
|
* Vertical alignment ('top', 'center', 'bottom')
|
|
71
72
|
* @default 'top'
|
|
72
73
|
*/
|
|
73
|
-
verticalAlign?:
|
|
74
|
+
verticalAlign?: "top" | "center" | "bottom" | "underline" | "overline" | "strikethrough";
|
|
74
75
|
/**
|
|
75
76
|
* Drop shadow configuration
|
|
76
77
|
*/
|
|
@@ -105,12 +106,31 @@ export interface ITextOpts {
|
|
|
105
106
|
* Text case transformation
|
|
106
107
|
* @default 'none'
|
|
107
108
|
*/
|
|
108
|
-
textCase?:
|
|
109
|
+
textCase?: "none" | "uppercase" | "lowercase" | "title";
|
|
109
110
|
/**
|
|
110
111
|
* Text decoration ('none', 'underline', 'line-through', 'overline')
|
|
111
112
|
* @default 'none'
|
|
112
113
|
*/
|
|
113
|
-
textDecoration?:
|
|
114
|
+
textDecoration?: "none" | "underline" | "line-through" | "overline";
|
|
115
|
+
/**
|
|
116
|
+
* Words per line mode ('single' or 'multiple')
|
|
117
|
+
* @default 'multiple'
|
|
118
|
+
*/
|
|
119
|
+
wordsPerLine?: "single" | "multiple";
|
|
120
|
+
}
|
|
121
|
+
export interface ITextEvents extends BaseSpriteEvents {
|
|
122
|
+
propsChange: Partial<{
|
|
123
|
+
left: number;
|
|
124
|
+
top: number;
|
|
125
|
+
width: number;
|
|
126
|
+
height: number;
|
|
127
|
+
angle: number;
|
|
128
|
+
zIndex: number;
|
|
129
|
+
opacity: number;
|
|
130
|
+
volume: number;
|
|
131
|
+
text: string;
|
|
132
|
+
style: any;
|
|
133
|
+
} & ITextOpts>;
|
|
114
134
|
}
|
|
115
135
|
/**
|
|
116
136
|
* Text clip using PixiJS Text for rendering
|
|
@@ -130,9 +150,9 @@ export interface ITextOpts {
|
|
|
130
150
|
* });
|
|
131
151
|
* textClip.duration = 5e6; // 5 seconds
|
|
132
152
|
*/
|
|
133
|
-
export declare class Text extends BaseClip {
|
|
153
|
+
export declare class Text extends BaseClip<ITextEvents> {
|
|
134
154
|
readonly type = "Text";
|
|
135
|
-
ready: IClip[
|
|
155
|
+
ready: IClip["ready"];
|
|
136
156
|
private _meta;
|
|
137
157
|
get meta(): {
|
|
138
158
|
duration: number;
|
|
@@ -164,8 +184,8 @@ export declare class Text extends BaseClip {
|
|
|
164
184
|
/**
|
|
165
185
|
* Text alignment proxy for compatibility with UI
|
|
166
186
|
*/
|
|
167
|
-
get textAlign():
|
|
168
|
-
set textAlign(v:
|
|
187
|
+
get textAlign(): "left" | "center" | "right";
|
|
188
|
+
set textAlign(v: "left" | "center" | "right");
|
|
169
189
|
/**
|
|
170
190
|
* Vertical alignment or decoration proxy
|
|
171
191
|
*/
|
|
@@ -175,7 +195,7 @@ export declare class Text extends BaseClip {
|
|
|
175
195
|
* Text case proxy
|
|
176
196
|
*/
|
|
177
197
|
get textCase(): string;
|
|
178
|
-
set textCase(v:
|
|
198
|
+
set textCase(v: "none" | "uppercase" | "lowercase" | "title");
|
|
179
199
|
private pixiTextContainer;
|
|
180
200
|
private wordTexts;
|
|
181
201
|
private textStyle;
|
|
@@ -198,13 +218,13 @@ export declare class Text extends BaseClip {
|
|
|
198
218
|
startTime: number;
|
|
199
219
|
duration: number;
|
|
200
220
|
}>;
|
|
201
|
-
constructor(text: string, opts?: ITextOpts, renderer?: Application[
|
|
221
|
+
constructor(text: string, opts?: ITextOpts, renderer?: Application["renderer"]);
|
|
202
222
|
/**
|
|
203
223
|
* Set an external renderer (e.g., from Studio) to avoid creating our own Pixi App
|
|
204
224
|
* This is an optimization for Studio preview
|
|
205
225
|
* Can be called before ready() completes
|
|
206
226
|
*/
|
|
207
|
-
setRenderer(renderer: Application[
|
|
227
|
+
setRenderer(renderer: Application["renderer"]): void;
|
|
208
228
|
/**
|
|
209
229
|
* Get the renderer for rendering text to RenderTexture
|
|
210
230
|
* Creates a minimal renderer as fallback if no external renderer is provided
|
|
@@ -219,9 +239,10 @@ export declare class Text extends BaseClip {
|
|
|
219
239
|
getTexture(): Promise<Texture | null>;
|
|
220
240
|
tick(_time: number): Promise<{
|
|
221
241
|
video: ImageBitmap;
|
|
222
|
-
state:
|
|
242
|
+
state: "success";
|
|
223
243
|
}>;
|
|
224
244
|
split(_time: number): Promise<[this, this]>;
|
|
245
|
+
animate(time: number): void;
|
|
225
246
|
addEffect(effect: {
|
|
226
247
|
id: string;
|
|
227
248
|
key: string;
|
|
@@ -262,5 +283,5 @@ export declare class Text extends BaseClip {
|
|
|
262
283
|
* Text clips should only show: mr (mid-right), mb (mid-bottom), br (bottom-right), and rot (rotation)
|
|
263
284
|
* This allows resizing width and height independently while preventing corner handles that might distort text
|
|
264
285
|
*/
|
|
265
|
-
getVisibleHandles(): Array<
|
|
286
|
+
getVisibleHandles(): Array<"tl" | "tr" | "bl" | "br" | "ml" | "mr" | "mt" | "mb" | "rot">;
|
|
266
287
|
}
|