@rendley/sdk 1.6.0 → 1.7.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/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/clip/Clip.d.ts +146 -15
- package/dist/modules/clip/ClipStyle.d.ts +4 -3
- package/dist/modules/clip/clips/audio/AudioClip.d.ts +20 -2
- package/dist/modules/clip/clips/custom/CustomClip.d.ts +19 -2
- package/dist/modules/clip/clips/htmlText/HtmlTextClip.d.ts +41 -115
- package/dist/modules/clip/clips/lottie/LottieClip.d.ts +19 -2
- package/dist/modules/clip/clips/shape/ShapeClip.d.ts +19 -2
- package/dist/modules/clip/clips/shape/ShapeStyle.d.ts +53 -0
- package/dist/modules/clip/clips/text/TextClip.d.ts +19 -2
- package/dist/modules/clip/clips/text/TextStyle.d.ts +80 -0
- package/dist/modules/clip/clips/video/VideoClip.d.ts +29 -7
- package/dist/modules/filter/Effect.d.ts +49 -0
- package/dist/modules/filter/MaskFilter.d.ts +46 -0
- package/dist/modules/layer/Layer.d.ts +4 -4
- package/dist/modules/timeline/Timeline.d.ts +6 -1
- package/dist/modules/undo/UndoManager.types.d.ts +6 -0
- package/dist/types/clip.types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
import { ShapeSprite } from "./ShapeSprite";
|
|
2
3
|
import { ClipStyle, ClipStyleOptions } from "../../ClipStyle";
|
|
3
4
|
interface ShapeClipStyleOptions extends ClipStyleOptions {
|
|
@@ -7,6 +8,58 @@ interface ShapeClipStyleOptions extends ClipStyleOptions {
|
|
|
7
8
|
strokeAlpha?: number;
|
|
8
9
|
hasFill?: boolean;
|
|
9
10
|
}
|
|
11
|
+
export declare const ShapeStyleSchema: z.ZodObject<{
|
|
12
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
15
|
+
clipId: z.ZodString;
|
|
16
|
+
alpha: z.ZodNumber;
|
|
17
|
+
rotation: z.ZodNumber;
|
|
18
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
19
|
+
scale: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
20
|
+
zIndex: z.ZodNumber;
|
|
21
|
+
cornerRadius: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
22
|
+
relativeCornerRadius: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
23
|
+
fillColor: z.ZodOptional<z.ZodString>;
|
|
24
|
+
strokeColor: z.ZodOptional<z.ZodString>;
|
|
25
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
strokeAlpha: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
hasFill: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
clipId: string;
|
|
30
|
+
alpha: number;
|
|
31
|
+
rotation: number;
|
|
32
|
+
position: [number, number];
|
|
33
|
+
scale: [number, number];
|
|
34
|
+
zIndex: number;
|
|
35
|
+
relativeCornerRadius: boolean;
|
|
36
|
+
hasFill: boolean;
|
|
37
|
+
height?: number | undefined;
|
|
38
|
+
width?: number | undefined;
|
|
39
|
+
mediaDataId?: string | undefined;
|
|
40
|
+
cornerRadius?: [number, number, number, number] | undefined;
|
|
41
|
+
fillColor?: string | undefined;
|
|
42
|
+
strokeColor?: string | undefined;
|
|
43
|
+
strokeWidth?: number | undefined;
|
|
44
|
+
strokeAlpha?: number | undefined;
|
|
45
|
+
}, {
|
|
46
|
+
clipId: string;
|
|
47
|
+
alpha: number;
|
|
48
|
+
rotation: number;
|
|
49
|
+
position: [number, number];
|
|
50
|
+
scale: [number, number];
|
|
51
|
+
zIndex: number;
|
|
52
|
+
height?: number | undefined;
|
|
53
|
+
width?: number | undefined;
|
|
54
|
+
mediaDataId?: string | undefined;
|
|
55
|
+
cornerRadius?: [number, number, number, number] | undefined;
|
|
56
|
+
relativeCornerRadius?: boolean | undefined;
|
|
57
|
+
fillColor?: string | undefined;
|
|
58
|
+
strokeColor?: string | undefined;
|
|
59
|
+
strokeWidth?: number | undefined;
|
|
60
|
+
strokeAlpha?: number | undefined;
|
|
61
|
+
hasFill?: boolean | undefined;
|
|
62
|
+
}>;
|
|
10
63
|
export declare class ShapeStyle extends ClipStyle<ShapeSprite> {
|
|
11
64
|
protected fillColor: string;
|
|
12
65
|
protected strokeColor: string;
|
|
@@ -35,12 +35,24 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
|
|
|
35
35
|
};
|
|
36
36
|
sourceId: string;
|
|
37
37
|
}[];
|
|
38
|
-
effects:
|
|
39
|
-
|
|
38
|
+
effects: {
|
|
39
|
+
id: string;
|
|
40
|
+
options: {
|
|
41
|
+
textureWidth: number;
|
|
42
|
+
textureHeight: number;
|
|
43
|
+
frameWidth: number;
|
|
44
|
+
frameHeight: number;
|
|
45
|
+
fragmentSrc?: string | undefined;
|
|
46
|
+
uniforms?: Record<string, unknown> | undefined;
|
|
47
|
+
};
|
|
48
|
+
sourceId: string;
|
|
49
|
+
}[];
|
|
50
|
+
isVisible: boolean;
|
|
40
51
|
style?: unknown;
|
|
41
52
|
customData?: [string, unknown][] | undefined;
|
|
42
53
|
mediaDataId?: string | undefined;
|
|
43
54
|
subtitlesId?: string | undefined;
|
|
55
|
+
wrapMode?: import('../../../../index').WrapModeEnum | undefined;
|
|
44
56
|
animationController?: {
|
|
45
57
|
animationDataIn?: {
|
|
46
58
|
name: string;
|
|
@@ -107,6 +119,11 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
|
|
|
107
119
|
animationLoopCount?: number | undefined;
|
|
108
120
|
loopSmoothing?: number | undefined;
|
|
109
121
|
} | undefined;
|
|
122
|
+
clipMasks?: {
|
|
123
|
+
id: string;
|
|
124
|
+
clipId: string;
|
|
125
|
+
wrapMode: import("../../../filter/MaskFilter").MaskWrapModeEnum;
|
|
126
|
+
}[] | undefined;
|
|
110
127
|
};
|
|
111
128
|
static deserialize(payload: object): TextClip;
|
|
112
129
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
import { TextSprite } from "./TextSprite";
|
|
2
3
|
import { ClipStyle, ClipStyleOptions } from "../../ClipStyle";
|
|
3
4
|
import { TextStyleAlign, TextStyleFontStyle, TextStyleFontWeight } from '../../../../types/text.types';
|
|
@@ -12,7 +13,78 @@ interface TextClipStyleOptions extends ClipStyleOptions {
|
|
|
12
13
|
wordWrapWidth?: number | null;
|
|
13
14
|
strokeColor?: string;
|
|
14
15
|
strokeThickness?: number;
|
|
16
|
+
padding?: number[];
|
|
15
17
|
}
|
|
18
|
+
export declare const TextStyleSchema: z.ZodObject<{
|
|
19
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
22
|
+
clipId: z.ZodString;
|
|
23
|
+
alpha: z.ZodNumber;
|
|
24
|
+
rotation: z.ZodNumber;
|
|
25
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
26
|
+
scale: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
27
|
+
zIndex: z.ZodNumber;
|
|
28
|
+
cornerRadius: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
29
|
+
relativeCornerRadius: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
30
|
+
fontSize: z.ZodNumber;
|
|
31
|
+
color: z.ZodString;
|
|
32
|
+
fontWeight: z.ZodEnum<["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900"]>;
|
|
33
|
+
fontFamily: z.ZodString;
|
|
34
|
+
textAlign: z.ZodEnum<["left", "center", "right", "justify"]>;
|
|
35
|
+
fontStyle: z.ZodEnum<["normal", "italic", "oblique"]>;
|
|
36
|
+
backgroundColor: z.ZodNullable<z.ZodString>;
|
|
37
|
+
strokeColor: z.ZodDefault<z.ZodString>;
|
|
38
|
+
strokeThickness: z.ZodDefault<z.ZodNumber>;
|
|
39
|
+
wordWrapWidth: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
40
|
+
padding: z.ZodDefault<z.ZodArray<z.ZodNumber, "many">>;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
color: string;
|
|
43
|
+
clipId: string;
|
|
44
|
+
alpha: number;
|
|
45
|
+
rotation: number;
|
|
46
|
+
position: [number, number];
|
|
47
|
+
scale: [number, number];
|
|
48
|
+
zIndex: number;
|
|
49
|
+
relativeCornerRadius: boolean;
|
|
50
|
+
fontSize: number;
|
|
51
|
+
fontWeight: "bold" | "normal" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
|
52
|
+
fontFamily: string;
|
|
53
|
+
fontStyle: "normal" | "italic" | "oblique";
|
|
54
|
+
backgroundColor: string | null;
|
|
55
|
+
strokeThickness: number;
|
|
56
|
+
strokeColor: string;
|
|
57
|
+
padding: number[];
|
|
58
|
+
wordWrapWidth: number | null;
|
|
59
|
+
textAlign: "left" | "center" | "right" | "justify";
|
|
60
|
+
height?: number | undefined;
|
|
61
|
+
width?: number | undefined;
|
|
62
|
+
mediaDataId?: string | undefined;
|
|
63
|
+
cornerRadius?: [number, number, number, number] | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
color: string;
|
|
66
|
+
clipId: string;
|
|
67
|
+
alpha: number;
|
|
68
|
+
rotation: number;
|
|
69
|
+
position: [number, number];
|
|
70
|
+
scale: [number, number];
|
|
71
|
+
zIndex: number;
|
|
72
|
+
fontSize: number;
|
|
73
|
+
fontWeight: "bold" | "normal" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
|
74
|
+
fontFamily: string;
|
|
75
|
+
fontStyle: "normal" | "italic" | "oblique";
|
|
76
|
+
backgroundColor: string | null;
|
|
77
|
+
textAlign: "left" | "center" | "right" | "justify";
|
|
78
|
+
height?: number | undefined;
|
|
79
|
+
width?: number | undefined;
|
|
80
|
+
mediaDataId?: string | undefined;
|
|
81
|
+
cornerRadius?: [number, number, number, number] | undefined;
|
|
82
|
+
relativeCornerRadius?: boolean | undefined;
|
|
83
|
+
strokeColor?: string | undefined;
|
|
84
|
+
strokeThickness?: number | undefined;
|
|
85
|
+
wordWrapWidth?: number | null | undefined;
|
|
86
|
+
padding?: number[] | undefined;
|
|
87
|
+
}>;
|
|
16
88
|
export declare class TextStyle extends ClipStyle<TextSprite> {
|
|
17
89
|
fontSize: number;
|
|
18
90
|
color: string;
|
|
@@ -24,7 +96,9 @@ export declare class TextStyle extends ClipStyle<TextSprite> {
|
|
|
24
96
|
wordWrapWidth: number | null;
|
|
25
97
|
strokeColor: string;
|
|
26
98
|
strokeThickness: number;
|
|
99
|
+
padding: number[];
|
|
27
100
|
private isDirty;
|
|
101
|
+
protected animationColor: string | null;
|
|
28
102
|
constructor(options: TextClipStyleOptions);
|
|
29
103
|
setDirty(): void;
|
|
30
104
|
setStrokeColor(strokeColor: string): void;
|
|
@@ -37,6 +111,8 @@ export declare class TextStyle extends ClipStyle<TextSprite> {
|
|
|
37
111
|
setWordWrapWidth(wordWrapWidth: number | null): void;
|
|
38
112
|
setColor(color: string): void;
|
|
39
113
|
getColor(): string;
|
|
114
|
+
setAnimationColor(color: string | null): void;
|
|
115
|
+
getAnimationColor(): string | null;
|
|
40
116
|
setFontWeight(fontWeight: TextStyleFontWeight): void;
|
|
41
117
|
getFontWeight(): "bold" | "normal" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
|
42
118
|
setFontFamily(fontFamily: string): void;
|
|
@@ -47,6 +123,8 @@ export declare class TextStyle extends ClipStyle<TextSprite> {
|
|
|
47
123
|
getFontStyle(): "normal" | "italic" | "oblique";
|
|
48
124
|
setBackgroundColor(backgroundColor: string | null): void;
|
|
49
125
|
getBackgroundColor(): string | null;
|
|
126
|
+
setPadding(padding: number | number[]): void;
|
|
127
|
+
getPadding(): number[];
|
|
50
128
|
update(container: TextSprite): void;
|
|
51
129
|
serialize(): {
|
|
52
130
|
color: string;
|
|
@@ -64,6 +142,8 @@ export declare class TextStyle extends ClipStyle<TextSprite> {
|
|
|
64
142
|
backgroundColor: string | null;
|
|
65
143
|
strokeThickness: number;
|
|
66
144
|
strokeColor: string;
|
|
145
|
+
padding: number[];
|
|
146
|
+
wordWrapWidth: number | null;
|
|
67
147
|
textAlign: "left" | "center" | "right" | "justify";
|
|
68
148
|
height?: number | undefined;
|
|
69
149
|
width?: number | undefined;
|
|
@@ -22,29 +22,34 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
22
22
|
private decoder;
|
|
23
23
|
private frameQueue;
|
|
24
24
|
private isRendering;
|
|
25
|
+
private decoderFlushed;
|
|
25
26
|
constructor(options: VideoClipOptions);
|
|
26
27
|
init(layerId: string): Promise<void>;
|
|
27
28
|
private getGlobalTimeToClipTime;
|
|
28
29
|
getIsProcessing(): boolean;
|
|
29
30
|
updateMediaData(newMediaId?: string): Promise<boolean>;
|
|
30
31
|
preload(currentTime: number): void;
|
|
31
|
-
addActionToQueue
|
|
32
|
-
processNextQueue
|
|
32
|
+
private addActionToQueue;
|
|
33
|
+
private processNextQueue;
|
|
33
34
|
private seekedCallback;
|
|
34
35
|
private playingCallback;
|
|
35
36
|
private pausedCallback;
|
|
36
37
|
private endedCallback;
|
|
37
38
|
private errorCallback;
|
|
38
39
|
private videoLoadedCallback;
|
|
40
|
+
private isVideoReady;
|
|
41
|
+
private isAudioReady;
|
|
39
42
|
setVolume(volume: number): void;
|
|
40
43
|
getVolume(): number;
|
|
41
44
|
private play;
|
|
42
45
|
private pause;
|
|
43
46
|
private renderSeek;
|
|
44
47
|
private seek;
|
|
45
|
-
renderVideoFrameOutputCallback
|
|
46
|
-
getNextRenderPacket
|
|
47
|
-
searchRenderFrame
|
|
48
|
+
private renderVideoFrameOutputCallback;
|
|
49
|
+
private getNextRenderPacket;
|
|
50
|
+
private searchRenderFrame;
|
|
51
|
+
private initializeDecoder;
|
|
52
|
+
private destroyDecoder;
|
|
48
53
|
onRenderStart(options: ExportOptions): Promise<void>;
|
|
49
54
|
onRenderDone(canceled: boolean): Promise<void>;
|
|
50
55
|
onPlay(currentTime: number): Promise<void>;
|
|
@@ -72,12 +77,24 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
72
77
|
};
|
|
73
78
|
sourceId: string;
|
|
74
79
|
}[];
|
|
75
|
-
effects:
|
|
76
|
-
|
|
80
|
+
effects: {
|
|
81
|
+
id: string;
|
|
82
|
+
options: {
|
|
83
|
+
textureWidth: number;
|
|
84
|
+
textureHeight: number;
|
|
85
|
+
frameWidth: number;
|
|
86
|
+
frameHeight: number;
|
|
87
|
+
fragmentSrc?: string | undefined;
|
|
88
|
+
uniforms?: Record<string, unknown> | undefined;
|
|
89
|
+
};
|
|
90
|
+
sourceId: string;
|
|
91
|
+
}[];
|
|
92
|
+
isVisible: boolean;
|
|
77
93
|
text?: string | undefined;
|
|
78
94
|
style?: unknown;
|
|
79
95
|
customData?: [string, unknown][] | undefined;
|
|
80
96
|
subtitlesId?: string | undefined;
|
|
97
|
+
wrapMode?: import('../../../../types').WrapModeEnum | undefined;
|
|
81
98
|
animationController?: {
|
|
82
99
|
animationDataIn?: {
|
|
83
100
|
name: string;
|
|
@@ -144,6 +161,11 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
144
161
|
animationLoopCount?: number | undefined;
|
|
145
162
|
loopSmoothing?: number | undefined;
|
|
146
163
|
} | undefined;
|
|
164
|
+
clipMasks?: {
|
|
165
|
+
id: string;
|
|
166
|
+
clipId: string;
|
|
167
|
+
wrapMode: import("../../../filter/MaskFilter").MaskWrapModeEnum;
|
|
168
|
+
}[] | undefined;
|
|
147
169
|
volume?: number | undefined;
|
|
148
170
|
muted?: boolean | undefined;
|
|
149
171
|
};
|
|
@@ -1,4 +1,53 @@
|
|
|
1
1
|
import * as PIXI from "pixi.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export declare const EffectSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
sourceId: z.ZodString;
|
|
6
|
+
options: z.ZodObject<{
|
|
7
|
+
fragmentSrc: z.ZodOptional<z.ZodString>;
|
|
8
|
+
uniforms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
9
|
+
textureWidth: z.ZodNumber;
|
|
10
|
+
textureHeight: z.ZodNumber;
|
|
11
|
+
frameWidth: z.ZodNumber;
|
|
12
|
+
frameHeight: z.ZodNumber;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
textureWidth: number;
|
|
15
|
+
textureHeight: number;
|
|
16
|
+
frameWidth: number;
|
|
17
|
+
frameHeight: number;
|
|
18
|
+
fragmentSrc?: string | undefined;
|
|
19
|
+
uniforms?: Record<string, unknown> | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
textureWidth: number;
|
|
22
|
+
textureHeight: number;
|
|
23
|
+
frameWidth: number;
|
|
24
|
+
frameHeight: number;
|
|
25
|
+
fragmentSrc?: string | undefined;
|
|
26
|
+
uniforms?: Record<string, unknown> | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
id: string;
|
|
30
|
+
options: {
|
|
31
|
+
textureWidth: number;
|
|
32
|
+
textureHeight: number;
|
|
33
|
+
frameWidth: number;
|
|
34
|
+
frameHeight: number;
|
|
35
|
+
fragmentSrc?: string | undefined;
|
|
36
|
+
uniforms?: Record<string, unknown> | undefined;
|
|
37
|
+
};
|
|
38
|
+
sourceId: string;
|
|
39
|
+
}, {
|
|
40
|
+
id: string;
|
|
41
|
+
options: {
|
|
42
|
+
textureWidth: number;
|
|
43
|
+
textureHeight: number;
|
|
44
|
+
frameWidth: number;
|
|
45
|
+
frameHeight: number;
|
|
46
|
+
fragmentSrc?: string | undefined;
|
|
47
|
+
uniforms?: Record<string, unknown> | undefined;
|
|
48
|
+
};
|
|
49
|
+
sourceId: string;
|
|
50
|
+
}>;
|
|
2
51
|
export interface EffectOptions {
|
|
3
52
|
sourceId: string;
|
|
4
53
|
fragmentSrc?: string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export declare enum MaskWrapModeEnum {
|
|
4
|
+
NONE = "none",
|
|
5
|
+
REPEAT = "repeat",
|
|
6
|
+
MIRROR = "mirror",
|
|
7
|
+
CLAMP = "clamp"
|
|
8
|
+
}
|
|
9
|
+
export declare const MaskFilterSchema: z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
clipId: z.ZodString;
|
|
12
|
+
wrapMode: z.ZodDefault<z.ZodNativeEnum<typeof MaskWrapModeEnum>>;
|
|
13
|
+
}, "strict", z.ZodTypeAny, {
|
|
14
|
+
id: string;
|
|
15
|
+
clipId: string;
|
|
16
|
+
wrapMode: MaskWrapModeEnum;
|
|
17
|
+
}, {
|
|
18
|
+
id: string;
|
|
19
|
+
clipId: string;
|
|
20
|
+
wrapMode?: MaskWrapModeEnum | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
export interface MaskFilterOptions {
|
|
23
|
+
id?: string;
|
|
24
|
+
clipId: string;
|
|
25
|
+
maskSprite: PIXI.Sprite;
|
|
26
|
+
wrapMode?: MaskWrapModeEnum;
|
|
27
|
+
}
|
|
28
|
+
export declare class MaskFilter extends PIXI.Filter {
|
|
29
|
+
private _maskSprite;
|
|
30
|
+
private _clipId;
|
|
31
|
+
private _wrapMode;
|
|
32
|
+
private _tempMatrix;
|
|
33
|
+
private _id;
|
|
34
|
+
constructor(options: MaskFilterOptions);
|
|
35
|
+
private getWrapModeInt;
|
|
36
|
+
private updateTransformMatrix;
|
|
37
|
+
updateMaskTexture(): void;
|
|
38
|
+
get maskSprite(): PIXI.Sprite;
|
|
39
|
+
set maskSprite(value: PIXI.Sprite);
|
|
40
|
+
get clipId(): string;
|
|
41
|
+
set clipId(value: string);
|
|
42
|
+
get wrapMode(): MaskWrapModeEnum;
|
|
43
|
+
set wrapMode(value: MaskWrapModeEnum);
|
|
44
|
+
get id(): string;
|
|
45
|
+
apply(filterManager: PIXI.FilterSystem, input: PIXI.RenderTexture, output: PIXI.RenderTexture, clearMode?: PIXI.CLEAR_MODES, _currentState?: PIXI.FilterState): void;
|
|
46
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as PIXI from "pixi.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { AudioClipOptions, Clip, HtmlTextClipOptions, ImageClipOptions, TextClipOptions, VideoClipOptions } from "../clip";
|
|
3
|
+
import { AudioClipOptions, Clip, ClipOptions, HtmlTextClipOptions, ImageClipOptions, TextClipOptions, VideoClipOptions } from "../clip";
|
|
4
4
|
import { GifClipOptions } from "../clip/clips/gif/GifClip";
|
|
5
|
+
import { LottieClipOptions } from "../clip/clips/lottie/LottieClip";
|
|
5
6
|
import { ShapeClipOptions } from "../clip/clips/shape/ShapeClip";
|
|
6
7
|
import { Transition, TransitionOptions } from "../transition/Transition";
|
|
7
|
-
type
|
|
8
|
-
export type ClipTypeRange = Pick<ClipOptions, "startTime" | "duration">;
|
|
8
|
+
type ClipOptionsUnion = ClipOptions | ImageClipOptions | VideoClipOptions | TextClipOptions | AudioClipOptions | GifClipOptions | ShapeClipOptions | HtmlTextClipOptions | LottieClipOptions;
|
|
9
9
|
export declare const LayerSchema: z.ZodObject<{
|
|
10
10
|
id: z.ZodString;
|
|
11
11
|
visible: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -86,7 +86,7 @@ export declare class Layer {
|
|
|
86
86
|
init(): Promise<void>;
|
|
87
87
|
destroy(): void;
|
|
88
88
|
addClip(options: Clip): Promise<Clip | null>;
|
|
89
|
-
addClip(options:
|
|
89
|
+
addClip(options: ClipOptionsUnion): Promise<Clip | null>;
|
|
90
90
|
removeClip(clipId: string): boolean;
|
|
91
91
|
setVolume(volume: number): void;
|
|
92
92
|
getVolume(): number;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { AudioClip, Clip } from "../clip";
|
|
3
3
|
import { Layer } from "../layer";
|
|
4
|
+
export declare enum AlignRoundEnum {
|
|
5
|
+
NEAREST = "nearest",
|
|
6
|
+
UP = "up",
|
|
7
|
+
DOWN = "down"
|
|
8
|
+
}
|
|
4
9
|
export declare const TimelineSchema: z.ZodObject<{
|
|
5
10
|
startTime: z.ZodNumber;
|
|
6
11
|
fps: z.ZodNumber;
|
|
@@ -150,7 +155,7 @@ export declare class Timeline {
|
|
|
150
155
|
removeLayer(layerId: string): boolean;
|
|
151
156
|
moveClipToLayer(clipId: string, newLayerId: string): Promise<void>;
|
|
152
157
|
extractAudio(clip: string | Clip): AudioClip | undefined;
|
|
153
|
-
alignTime(time: number,
|
|
158
|
+
alignTime(time: number, roundDirection?: AlignRoundEnum): number;
|
|
154
159
|
adjustClipsLayout(): void;
|
|
155
160
|
getFps(): number;
|
|
156
161
|
setFps(fps: number): void;
|
|
@@ -29,6 +29,7 @@ export declare enum UndoActionEnum {
|
|
|
29
29
|
CLIP_TEXT_WORD_WRAP_WIDTH = "clip-text-word-wrap-width",
|
|
30
30
|
CLIP_TEXT_STROKE_COLOR = "clip-text-stroke-color",
|
|
31
31
|
CLIP_TEXT_STROKE_THICKNESS = "clip-text-stroke-thickness",
|
|
32
|
+
CLIP_TEXT_PADDING = "clip-text-padding",
|
|
32
33
|
CLIP_HTML_TEXT = "clip-html-text",
|
|
33
34
|
CLIP_HTML_STYLE = "clip-html-style",
|
|
34
35
|
CLIP_LOTTIE_PROPERTY = "clip-lottie-property",
|
|
@@ -179,6 +180,11 @@ export type UndoActionMappings = {
|
|
|
179
180
|
prevStrokeThickness: number;
|
|
180
181
|
strokeThickness: number;
|
|
181
182
|
};
|
|
183
|
+
[UndoActionEnum.CLIP_TEXT_PADDING]: {
|
|
184
|
+
clipId: string;
|
|
185
|
+
prevPadding: number | number[];
|
|
186
|
+
padding: number | number[];
|
|
187
|
+
};
|
|
182
188
|
[UndoActionEnum.CLIP_HTML_TEXT]: {
|
|
183
189
|
clipId: string;
|
|
184
190
|
prevText: string;
|