@rendley/sdk 1.10.3 → 1.11.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/LICENSE +48 -48
- package/README.md +31 -31
- package/dist/Engine.d.ts +54 -4
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/modules/background-timer/background-timer.d.ts +2 -1
- package/dist/modules/clip/Clip.d.ts +37 -124
- package/dist/modules/clip/ClipStyle.d.ts +5 -0
- package/dist/modules/clip/clips/audio/AudioClip.d.ts +6 -18
- package/dist/modules/clip/clips/custom/CustomClip.d.ts +5 -17
- package/dist/modules/clip/clips/htmlText/HtmlTextClip.d.ts +6 -18
- package/dist/modules/clip/clips/lottie/LottieClip.d.ts +34 -41
- package/dist/modules/clip/clips/shape/ShapeClip.d.ts +5 -17
- package/dist/modules/clip/clips/text/TextClip.d.ts +6 -18
- package/dist/modules/clip/clips/video/VideoClip.d.ts +7 -18
- package/dist/modules/effect/BasicEffect.d.ts +6 -0
- package/dist/modules/effect/Effect.d.ts +47 -0
- package/dist/modules/effect/EffectBase.d.ts +9 -0
- package/dist/modules/effect/built-in-effects/BuiltInBlurEffect.d.ts +11 -0
- package/dist/modules/effect/built-in-effects/BuiltInFactory.d.ts +4 -0
- package/dist/modules/effect/index.d.ts +2 -0
- package/dist/modules/event-emitter/types/EventEmitter.types.d.ts +40 -4
- package/dist/modules/ffmpeg/types/FFmpeg.types.d.ts +1 -0
- package/dist/modules/filter/Filter.d.ts +27 -29
- package/dist/modules/filter/MaskFilter.d.ts +1 -1
- package/dist/modules/filter/index.d.ts +1 -1
- package/dist/modules/layer/Layer.d.ts +20 -19
- package/dist/modules/library/BuiltInEffectDefines.d.ts +7 -0
- package/dist/modules/library/EffectData.d.ts +141 -0
- package/dist/modules/library/FilterData.d.ts +49 -0
- package/dist/modules/library/Library.d.ts +355 -0
- package/dist/modules/library/MediaData.d.ts +11 -1
- package/dist/modules/library/TransitionData.d.ts +141 -0
- package/dist/modules/library/index.d.ts +7 -1
- package/dist/modules/library/types/Property.types.d.ts +54 -0
- package/dist/modules/library/types/Texture.types.d.ts +40 -0
- package/dist/modules/subtitles/SubtitleManager.d.ts +1 -1
- package/dist/modules/timeline/Timeline.d.ts +27 -24
- package/dist/modules/transition/Transition.d.ts +27 -17
- package/dist/modules/undo/UndoManager.types.d.ts +6 -0
- package/dist/modules/upgrader/Upgrader.d.ts +5 -0
- package/package.json +83 -82
- package/dist/modules/filter/Effect.d.ts +0 -84
- package/dist/modules/filter/utils/removeShaderNameLine.d.ts +0 -1
- package/dist/modules/library/types/MediaData.types.d.ts +0 -8
|
@@ -30,30 +30,18 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
|
|
|
30
30
|
rightTrim: number;
|
|
31
31
|
filters: {
|
|
32
32
|
id: string;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
sourceId: string;
|
|
33
|
+
provider: string;
|
|
34
|
+
filterId: string;
|
|
37
35
|
intensity: number;
|
|
36
|
+
clipId?: string | undefined;
|
|
38
37
|
}[];
|
|
39
|
-
effects:
|
|
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
|
-
}[];
|
|
38
|
+
effects: any[];
|
|
51
39
|
isVisible: boolean;
|
|
40
|
+
wrapMode?: import('../../../../index').WrapModeEnum | undefined;
|
|
52
41
|
customData?: [string, unknown][] | undefined;
|
|
53
42
|
style?: unknown;
|
|
54
43
|
mediaDataId?: string | undefined;
|
|
55
44
|
subtitlesId?: string | undefined;
|
|
56
|
-
wrapMode?: import('../../../../index').WrapModeEnum | undefined;
|
|
57
45
|
animationController?: {
|
|
58
46
|
animationDataIn?: {
|
|
59
47
|
name: string;
|
|
@@ -121,8 +109,8 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
|
|
|
121
109
|
loopSmoothing?: number | undefined;
|
|
122
110
|
} | undefined;
|
|
123
111
|
clipMasks?: {
|
|
112
|
+
wrapMode: import('../../../../index').MaskWrapModeEnum;
|
|
124
113
|
id: string;
|
|
125
|
-
wrapMode: import("../../../filter/MaskFilter").MaskWrapModeEnum;
|
|
126
114
|
clipId: string;
|
|
127
115
|
}[] | undefined;
|
|
128
116
|
};
|
|
@@ -23,6 +23,7 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
23
23
|
private frameQueue;
|
|
24
24
|
private isRendering;
|
|
25
25
|
private decoderFlushed;
|
|
26
|
+
private renderWithPlayer;
|
|
26
27
|
private callbacks;
|
|
27
28
|
constructor(options: VideoClipOptions);
|
|
28
29
|
init(layerId: string): Promise<void>;
|
|
@@ -76,30 +77,18 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
76
77
|
rightTrim: number;
|
|
77
78
|
filters: {
|
|
78
79
|
id: string;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
};
|
|
82
|
-
sourceId: string;
|
|
80
|
+
provider: string;
|
|
81
|
+
filterId: string;
|
|
83
82
|
intensity: number;
|
|
83
|
+
clipId?: string | undefined;
|
|
84
84
|
}[];
|
|
85
|
-
effects:
|
|
86
|
-
id: string;
|
|
87
|
-
options: {
|
|
88
|
-
textureWidth: number;
|
|
89
|
-
textureHeight: number;
|
|
90
|
-
frameWidth: number;
|
|
91
|
-
frameHeight: number;
|
|
92
|
-
fragmentSrc?: string | undefined;
|
|
93
|
-
uniforms?: Record<string, unknown> | undefined;
|
|
94
|
-
};
|
|
95
|
-
sourceId: string;
|
|
96
|
-
}[];
|
|
85
|
+
effects: any[];
|
|
97
86
|
isVisible: boolean;
|
|
98
87
|
text?: string | undefined;
|
|
88
|
+
wrapMode?: import('../../../../types').WrapModeEnum | undefined;
|
|
99
89
|
customData?: [string, unknown][] | undefined;
|
|
100
90
|
style?: unknown;
|
|
101
91
|
subtitlesId?: string | undefined;
|
|
102
|
-
wrapMode?: import('../../../../types').WrapModeEnum | undefined;
|
|
103
92
|
animationController?: {
|
|
104
93
|
animationDataIn?: {
|
|
105
94
|
name: string;
|
|
@@ -167,8 +156,8 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
|
|
|
167
156
|
loopSmoothing?: number | undefined;
|
|
168
157
|
} | undefined;
|
|
169
158
|
clipMasks?: {
|
|
159
|
+
wrapMode: import("../../../filter").MaskWrapModeEnum;
|
|
170
160
|
id: string;
|
|
171
|
-
wrapMode: import("../../../filter/MaskFilter").MaskWrapModeEnum;
|
|
172
161
|
clipId: string;
|
|
173
162
|
}[] | undefined;
|
|
174
163
|
volume?: number | undefined;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export declare const EffectSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
effectId: z.ZodString;
|
|
6
|
+
provider: z.ZodString;
|
|
7
|
+
properties: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodAny], null>, "many">;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
id: string;
|
|
10
|
+
provider: string;
|
|
11
|
+
properties: [string, any][];
|
|
12
|
+
effectId: string;
|
|
13
|
+
}, {
|
|
14
|
+
id: string;
|
|
15
|
+
provider: string;
|
|
16
|
+
properties: [string, any][];
|
|
17
|
+
effectId: string;
|
|
18
|
+
}>;
|
|
19
|
+
export declare class Effect {
|
|
20
|
+
private id;
|
|
21
|
+
private readonly effectId;
|
|
22
|
+
private provider;
|
|
23
|
+
private effect;
|
|
24
|
+
private readonly inputTextures;
|
|
25
|
+
private propertyMap;
|
|
26
|
+
private readonly tempProperties?;
|
|
27
|
+
constructor(effectId: string, properties?: Record<string, any>);
|
|
28
|
+
init(): void;
|
|
29
|
+
update(clipTime: number): void;
|
|
30
|
+
getPixiFilter(): PIXI.Filter;
|
|
31
|
+
setProperty(propertyName: string, value: any): void;
|
|
32
|
+
getProperty(propertyName: string): any;
|
|
33
|
+
getId(): string;
|
|
34
|
+
setId(id: string): void;
|
|
35
|
+
getEffectId(): string;
|
|
36
|
+
getProvider(): string;
|
|
37
|
+
getIsBuiltIn(): boolean;
|
|
38
|
+
getProperties(): Map<string, any>;
|
|
39
|
+
destroy(): void;
|
|
40
|
+
serialize(): {
|
|
41
|
+
id: string;
|
|
42
|
+
provider: string;
|
|
43
|
+
properties: [string, any][];
|
|
44
|
+
effectId: string;
|
|
45
|
+
};
|
|
46
|
+
static deserialize(data: object): Effect;
|
|
47
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
export declare abstract class EffectBase {
|
|
3
|
+
protected pixiFilter: PIXI.Filter;
|
|
4
|
+
constructor(pixiFilter: PIXI.Filter);
|
|
5
|
+
getPixiFilter(): PIXI.Filter;
|
|
6
|
+
update(currentTime: number): void;
|
|
7
|
+
abstract setProperty(propertyName: string, value: any): void;
|
|
8
|
+
abstract getProperty(propertyName: string): any;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EffectBase } from "../EffectBase";
|
|
2
|
+
export declare enum BuiltInBlurEffectPropertiesEnum {
|
|
3
|
+
STRENGTH = "strength",
|
|
4
|
+
QUALITY = "quality",
|
|
5
|
+
KERNEL_SIZE = "kernelSize"
|
|
6
|
+
}
|
|
7
|
+
export declare class BuiltInBlurEffect extends EffectBase {
|
|
8
|
+
constructor(properties: Map<string, any>);
|
|
9
|
+
setProperty(propertyName: string, value: any): void;
|
|
10
|
+
getProperty(propertyName: string): number | null;
|
|
11
|
+
}
|
|
@@ -32,6 +32,12 @@ export declare enum EventsEnum {
|
|
|
32
32
|
LIBRARY_ERROR = "library:error",
|
|
33
33
|
LIBRARY_MEDIA_UPDATED = "library:media:updated",
|
|
34
34
|
LIBRARY_PROGRESS = "library:progress",
|
|
35
|
+
LIBRARY_EFFECT_ADDED = "library:effect:added",// To Libary
|
|
36
|
+
LIBRARY_EFFECT_REMOVED = "library:effect:removed",// From Library
|
|
37
|
+
LIBRARY_FILTER_ADDED = "library:filter:added",
|
|
38
|
+
LIBRARY_FILTER_REMOVED = "library:filter:removed",
|
|
39
|
+
LIBRARY_TRANSITION_ADDED = "library:transition:added",
|
|
40
|
+
LIBRARY_TRANSITION_REMOVED = "library:transition:removed",
|
|
35
41
|
SUBTITLES_ADDED = "subtitles:added",
|
|
36
42
|
SUBTITLES_REMOVED = "subtitles:removed",
|
|
37
43
|
SUBTITLES_MAIN_STYLE_UPDATED = "subtitles:main-style:updated",
|
|
@@ -39,6 +45,8 @@ export declare enum EventsEnum {
|
|
|
39
45
|
SUBTITLES_ANIMATION_UPDATED = "subtitles:animation:updated",
|
|
40
46
|
SUBTITLES_TEXT_MODE_UPDATED = "subtitles:text-mode:updated",
|
|
41
47
|
SUBTITLES_TRANSFORM_UPDATED = "subtitles:transform:updated",
|
|
48
|
+
EFFECT_PROPERTY_CHANGED = "effect:property:changed",
|
|
49
|
+
TRANSITION_PROPERTY_CHANGED = "transition:property:changed",
|
|
42
50
|
FONT_ADDED = "font:added",
|
|
43
51
|
FONT_REMOVED = "font:removed",
|
|
44
52
|
FONT_ERROR = "font:error",
|
|
@@ -128,23 +136,23 @@ export type EventPayloadMap = {
|
|
|
128
136
|
};
|
|
129
137
|
[EventsEnum.CLIP_FILTER_ADDED]: {
|
|
130
138
|
clipId: string;
|
|
139
|
+
id: string;
|
|
131
140
|
filterId: string;
|
|
132
|
-
sourceId: string;
|
|
133
141
|
};
|
|
134
142
|
[EventsEnum.CLIP_FILTER_REMOVED]: {
|
|
135
143
|
clipId: string;
|
|
144
|
+
id: string;
|
|
136
145
|
filterId: string;
|
|
137
|
-
sourceId: string;
|
|
138
146
|
};
|
|
139
147
|
[EventsEnum.CLIP_EFFECT_ADDED]: {
|
|
140
148
|
clipId: string;
|
|
149
|
+
id: string;
|
|
141
150
|
effectId: string;
|
|
142
|
-
sourceId: string;
|
|
143
151
|
};
|
|
144
152
|
[EventsEnum.CLIP_EFFECT_REMOVED]: {
|
|
145
153
|
clipId: string;
|
|
154
|
+
id: string;
|
|
146
155
|
effectId: string;
|
|
147
|
-
sourceId: string;
|
|
148
156
|
};
|
|
149
157
|
[EventsEnum.LIBRARY_ADDED]: {
|
|
150
158
|
mediaDataId: string;
|
|
@@ -179,6 +187,34 @@ export type EventPayloadMap = {
|
|
|
179
187
|
[EventsEnum.SUBTITLES_ANIMATION_UPDATED]: undefined;
|
|
180
188
|
[EventsEnum.SUBTITLES_TEXT_MODE_UPDATED]: undefined;
|
|
181
189
|
[EventsEnum.SUBTITLES_TRANSFORM_UPDATED]: undefined;
|
|
190
|
+
[EventsEnum.LIBRARY_EFFECT_ADDED]: {
|
|
191
|
+
effectId: string;
|
|
192
|
+
};
|
|
193
|
+
[EventsEnum.LIBRARY_EFFECT_REMOVED]: {
|
|
194
|
+
effectId: string;
|
|
195
|
+
};
|
|
196
|
+
[EventsEnum.LIBRARY_FILTER_ADDED]: {
|
|
197
|
+
filterId: string;
|
|
198
|
+
};
|
|
199
|
+
[EventsEnum.LIBRARY_FILTER_REMOVED]: {
|
|
200
|
+
filterId: string;
|
|
201
|
+
};
|
|
202
|
+
[EventsEnum.LIBRARY_TRANSITION_ADDED]: {
|
|
203
|
+
transitionId: string;
|
|
204
|
+
};
|
|
205
|
+
[EventsEnum.LIBRARY_TRANSITION_REMOVED]: {
|
|
206
|
+
transitionId: string;
|
|
207
|
+
};
|
|
208
|
+
[EventsEnum.EFFECT_PROPERTY_CHANGED]: {
|
|
209
|
+
id: string;
|
|
210
|
+
property: string;
|
|
211
|
+
value: any;
|
|
212
|
+
};
|
|
213
|
+
[EventsEnum.TRANSITION_PROPERTY_CHANGED]: {
|
|
214
|
+
id: string;
|
|
215
|
+
property: string;
|
|
216
|
+
value: any;
|
|
217
|
+
};
|
|
182
218
|
[EventsEnum.FONT_ADDED]: {
|
|
183
219
|
fontId: string;
|
|
184
220
|
};
|
|
@@ -2,54 +2,52 @@ import * as PIXI from "pixi.js";
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export declare const FilterSchema: z.ZodObject<{
|
|
4
4
|
id: z.ZodString;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
lutUrl: string;
|
|
11
|
-
}, {
|
|
12
|
-
lutUrl: string;
|
|
13
|
-
}>;
|
|
5
|
+
filterId: z.ZodString;
|
|
6
|
+
provider: z.ZodString;
|
|
7
|
+
clipId: z.ZodOptional<z.ZodString>;
|
|
8
|
+
intensity: z.ZodNumber;
|
|
14
9
|
}, "strip", z.ZodTypeAny, {
|
|
15
10
|
id: string;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
sourceId: string;
|
|
11
|
+
provider: string;
|
|
12
|
+
filterId: string;
|
|
20
13
|
intensity: number;
|
|
14
|
+
clipId?: string | undefined;
|
|
21
15
|
}, {
|
|
22
16
|
id: string;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
intensity?: number | undefined;
|
|
17
|
+
provider: string;
|
|
18
|
+
filterId: string;
|
|
19
|
+
intensity: number;
|
|
20
|
+
clipId?: string | undefined;
|
|
28
21
|
}>;
|
|
29
22
|
export interface FilterOptions {
|
|
30
|
-
|
|
31
|
-
sourceId: string;
|
|
23
|
+
filterId: string;
|
|
32
24
|
intensity?: number;
|
|
25
|
+
clipId?: string;
|
|
33
26
|
}
|
|
34
27
|
export declare class Filter {
|
|
35
|
-
id
|
|
36
|
-
private
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
private id;
|
|
29
|
+
private readonly filterId;
|
|
30
|
+
private provider;
|
|
31
|
+
private clipId?;
|
|
32
|
+
private intensity;
|
|
39
33
|
private lutTexture;
|
|
40
34
|
private pixiFilter;
|
|
41
35
|
constructor(options: FilterOptions);
|
|
36
|
+
init(): void;
|
|
37
|
+
getId(): string;
|
|
38
|
+
setClipId(clipId: string): void;
|
|
39
|
+
getClipId(): string | undefined;
|
|
40
|
+
getProvider(): string;
|
|
42
41
|
setIntensity(intensity: number): void;
|
|
43
42
|
getIntensity(): number;
|
|
44
|
-
|
|
43
|
+
getFilterId(): string;
|
|
45
44
|
getPixiFilter(): PIXI.Filter;
|
|
46
45
|
serialize(): {
|
|
47
46
|
id: string;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
};
|
|
51
|
-
sourceId: string;
|
|
47
|
+
provider: string;
|
|
48
|
+
filterId: string;
|
|
52
49
|
intensity: number;
|
|
50
|
+
clipId?: string | undefined;
|
|
53
51
|
};
|
|
54
52
|
static deserialize(data: object): Filter;
|
|
55
53
|
}
|
|
@@ -11,8 +11,8 @@ export declare const MaskFilterSchema: z.ZodObject<{
|
|
|
11
11
|
clipId: z.ZodString;
|
|
12
12
|
wrapMode: z.ZodDefault<z.ZodNativeEnum<typeof MaskWrapModeEnum>>;
|
|
13
13
|
}, "strict", z.ZodTypeAny, {
|
|
14
|
-
id: string;
|
|
15
14
|
wrapMode: MaskWrapModeEnum;
|
|
15
|
+
id: string;
|
|
16
16
|
clipId: string;
|
|
17
17
|
}, {
|
|
18
18
|
id: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./Filter";
|
|
2
|
-
export * from "./
|
|
2
|
+
export * from "./MaskFilter";
|
|
@@ -17,43 +17,43 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
17
17
|
clips: z.ZodArray<z.ZodAny, "many">;
|
|
18
18
|
transitions: z.ZodArray<z.ZodObject<{
|
|
19
19
|
id: z.ZodString;
|
|
20
|
-
name: z.ZodString;
|
|
21
20
|
startClipId: z.ZodString;
|
|
22
21
|
endClipId: z.ZodString;
|
|
23
22
|
inDuration: z.ZodNumber;
|
|
24
23
|
outDuration: z.ZodNumber;
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
transitionId: z.ZodString;
|
|
25
|
+
provider: z.ZodString;
|
|
26
|
+
properties: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodAny], null>, "many">;
|
|
27
27
|
}, "strip", z.ZodTypeAny, {
|
|
28
|
-
type: "transition";
|
|
29
|
-
name: string;
|
|
30
28
|
id: string;
|
|
29
|
+
provider: string;
|
|
30
|
+
properties: [string, any][];
|
|
31
31
|
startClipId: string;
|
|
32
32
|
endClipId: string;
|
|
33
33
|
inDuration: number;
|
|
34
34
|
outDuration: number;
|
|
35
|
-
|
|
35
|
+
transitionId: string;
|
|
36
36
|
}, {
|
|
37
|
-
type: "transition";
|
|
38
|
-
name: string;
|
|
39
37
|
id: string;
|
|
38
|
+
provider: string;
|
|
39
|
+
properties: [string, any][];
|
|
40
40
|
startClipId: string;
|
|
41
41
|
endClipId: string;
|
|
42
42
|
inDuration: number;
|
|
43
43
|
outDuration: number;
|
|
44
|
-
|
|
44
|
+
transitionId: string;
|
|
45
45
|
}>, "many">;
|
|
46
46
|
}, "strip", z.ZodTypeAny, {
|
|
47
47
|
id: string;
|
|
48
48
|
transitions: {
|
|
49
|
-
type: "transition";
|
|
50
|
-
name: string;
|
|
51
49
|
id: string;
|
|
50
|
+
provider: string;
|
|
51
|
+
properties: [string, any][];
|
|
52
52
|
startClipId: string;
|
|
53
53
|
endClipId: string;
|
|
54
54
|
inDuration: number;
|
|
55
55
|
outDuration: number;
|
|
56
|
-
|
|
56
|
+
transitionId: string;
|
|
57
57
|
}[];
|
|
58
58
|
clips: any[];
|
|
59
59
|
visible?: boolean | undefined;
|
|
@@ -62,14 +62,14 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
62
62
|
}, {
|
|
63
63
|
id: string;
|
|
64
64
|
transitions: {
|
|
65
|
-
type: "transition";
|
|
66
|
-
name: string;
|
|
67
65
|
id: string;
|
|
66
|
+
provider: string;
|
|
67
|
+
properties: [string, any][];
|
|
68
68
|
startClipId: string;
|
|
69
69
|
endClipId: string;
|
|
70
70
|
inDuration: number;
|
|
71
71
|
outDuration: number;
|
|
72
|
-
|
|
72
|
+
transitionId: string;
|
|
73
73
|
}[];
|
|
74
74
|
clips: any[];
|
|
75
75
|
visible?: boolean | undefined;
|
|
@@ -100,7 +100,8 @@ export declare class Layer {
|
|
|
100
100
|
moveClipToLayer(clipId: string, newLayerId: string): void;
|
|
101
101
|
splitClip(clipId: string, time: number): Promise<Clip | null>;
|
|
102
102
|
addTransition(data: TransitionOptions | Transition): void;
|
|
103
|
-
removeTransition(
|
|
103
|
+
removeTransition(id: string): void;
|
|
104
|
+
removeAllTransitionsByTransitionId(transitionId: string): void;
|
|
104
105
|
getTransitions(): Transition[];
|
|
105
106
|
getDuration(): number;
|
|
106
107
|
hasEmptySpace(startTime: number, endTime: number): boolean;
|
|
@@ -118,14 +119,14 @@ export declare class Layer {
|
|
|
118
119
|
serialize(): {
|
|
119
120
|
id: string;
|
|
120
121
|
transitions: {
|
|
121
|
-
type: "transition";
|
|
122
|
-
name: string;
|
|
123
122
|
id: string;
|
|
123
|
+
provider: string;
|
|
124
|
+
properties: [string, any][];
|
|
124
125
|
startClipId: string;
|
|
125
126
|
endClipId: string;
|
|
126
127
|
inDuration: number;
|
|
127
128
|
outDuration: number;
|
|
128
|
-
|
|
129
|
+
transitionId: string;
|
|
129
130
|
}[];
|
|
130
131
|
clips: any[];
|
|
131
132
|
visible?: boolean | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EffectDataOptions } from "./EffectData";
|
|
2
|
+
export declare enum BuiltInEffectIdEnum {
|
|
3
|
+
BLUR = "builtin-blur",
|
|
4
|
+
GLOW = "builtin-glow"
|
|
5
|
+
}
|
|
6
|
+
export declare const BuiltInEffectIds: BuiltInEffectIdEnum[];
|
|
7
|
+
export declare const BuiltInEffectOptions: EffectDataOptions[];
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { PropertyDescription } from "./types/Property.types";
|
|
4
|
+
import { InputTextureDescriptor } from "./types/Texture.types";
|
|
5
|
+
export interface EffectDataOptions {
|
|
6
|
+
id?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
provider?: string;
|
|
9
|
+
fragmentSrc: string;
|
|
10
|
+
properties?: PropertyDescription[];
|
|
11
|
+
inputTextures?: InputTextureDescriptor[];
|
|
12
|
+
serializable?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const EffectDataSchema: z.ZodObject<{
|
|
15
|
+
id: z.ZodString;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
provider: z.ZodString;
|
|
18
|
+
fragmentSrc: z.ZodString;
|
|
19
|
+
properties: z.ZodArray<z.ZodObject<{
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
type: z.ZodNativeEnum<typeof import("./types/Property.types").PropertyDescriptionTypeEnum>;
|
|
22
|
+
label: z.ZodOptional<z.ZodString>;
|
|
23
|
+
description: z.ZodOptional<z.ZodString>;
|
|
24
|
+
defaultValue: z.ZodType<Required<any>, z.ZodTypeDef, Required<any>>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
type: import("./types/Property.types").PropertyDescriptionTypeEnum;
|
|
27
|
+
name: string;
|
|
28
|
+
defaultValue: Required<any>;
|
|
29
|
+
label?: string | undefined;
|
|
30
|
+
description?: string | undefined;
|
|
31
|
+
}, {
|
|
32
|
+
type: import("./types/Property.types").PropertyDescriptionTypeEnum;
|
|
33
|
+
name: string;
|
|
34
|
+
defaultValue: Required<any>;
|
|
35
|
+
label?: string | undefined;
|
|
36
|
+
description?: string | undefined;
|
|
37
|
+
}>, "many">;
|
|
38
|
+
inputTextures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
39
|
+
name: z.ZodString;
|
|
40
|
+
url: z.ZodString;
|
|
41
|
+
wrapMode: z.ZodOptional<z.ZodNativeEnum<typeof import("./types/Texture.types").InputTextureWrapMode>>;
|
|
42
|
+
scaleMode: z.ZodOptional<z.ZodNativeEnum<typeof import("./types/Texture.types").InputTextureScaleMode>>;
|
|
43
|
+
mipmap: z.ZodOptional<z.ZodNativeEnum<typeof import("./types/Texture.types").InputTextureMipmapMode>>;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
name: string;
|
|
46
|
+
url: string;
|
|
47
|
+
wrapMode?: import("./types/Texture.types").InputTextureWrapMode | undefined;
|
|
48
|
+
scaleMode?: import("./types/Texture.types").InputTextureScaleMode | undefined;
|
|
49
|
+
mipmap?: import("./types/Texture.types").InputTextureMipmapMode | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
name: string;
|
|
52
|
+
url: string;
|
|
53
|
+
wrapMode?: import("./types/Texture.types").InputTextureWrapMode | undefined;
|
|
54
|
+
scaleMode?: import("./types/Texture.types").InputTextureScaleMode | undefined;
|
|
55
|
+
mipmap?: import("./types/Texture.types").InputTextureMipmapMode | undefined;
|
|
56
|
+
}>, "many">>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
name: string;
|
|
59
|
+
id: string;
|
|
60
|
+
provider: string;
|
|
61
|
+
fragmentSrc: string;
|
|
62
|
+
properties: {
|
|
63
|
+
type: import("./types/Property.types").PropertyDescriptionTypeEnum;
|
|
64
|
+
name: string;
|
|
65
|
+
defaultValue: Required<any>;
|
|
66
|
+
label?: string | undefined;
|
|
67
|
+
description?: string | undefined;
|
|
68
|
+
}[];
|
|
69
|
+
inputTextures?: {
|
|
70
|
+
name: string;
|
|
71
|
+
url: string;
|
|
72
|
+
wrapMode?: import("./types/Texture.types").InputTextureWrapMode | undefined;
|
|
73
|
+
scaleMode?: import("./types/Texture.types").InputTextureScaleMode | undefined;
|
|
74
|
+
mipmap?: import("./types/Texture.types").InputTextureMipmapMode | undefined;
|
|
75
|
+
}[] | undefined;
|
|
76
|
+
}, {
|
|
77
|
+
name: string;
|
|
78
|
+
id: string;
|
|
79
|
+
provider: string;
|
|
80
|
+
fragmentSrc: string;
|
|
81
|
+
properties: {
|
|
82
|
+
type: import("./types/Property.types").PropertyDescriptionTypeEnum;
|
|
83
|
+
name: string;
|
|
84
|
+
defaultValue: Required<any>;
|
|
85
|
+
label?: string | undefined;
|
|
86
|
+
description?: string | undefined;
|
|
87
|
+
}[];
|
|
88
|
+
inputTextures?: {
|
|
89
|
+
name: string;
|
|
90
|
+
url: string;
|
|
91
|
+
wrapMode?: import("./types/Texture.types").InputTextureWrapMode | undefined;
|
|
92
|
+
scaleMode?: import("./types/Texture.types").InputTextureScaleMode | undefined;
|
|
93
|
+
mipmap?: import("./types/Texture.types").InputTextureMipmapMode | undefined;
|
|
94
|
+
}[] | undefined;
|
|
95
|
+
}>;
|
|
96
|
+
export declare class EffectData {
|
|
97
|
+
private readonly id;
|
|
98
|
+
private readonly name;
|
|
99
|
+
private readonly provider;
|
|
100
|
+
private readonly fragmentSrc;
|
|
101
|
+
private readonly properties;
|
|
102
|
+
private readonly inputTextures?;
|
|
103
|
+
private readonly serializable;
|
|
104
|
+
private initialized;
|
|
105
|
+
private readonly defaultPropertyMap;
|
|
106
|
+
private readonly textures;
|
|
107
|
+
constructor(options: EffectDataOptions);
|
|
108
|
+
init(): Promise<void>;
|
|
109
|
+
getInputTextures(): InputTextureDescriptor[] | undefined;
|
|
110
|
+
getTextureImage(name: string): ImageBitmap | undefined;
|
|
111
|
+
createPixiTexture(name: string): PIXI.Texture<PIXI.Resource> | null;
|
|
112
|
+
getId(): string;
|
|
113
|
+
getName(): string;
|
|
114
|
+
getProvider(): string;
|
|
115
|
+
getIsBuiltIn(): boolean;
|
|
116
|
+
getProperties(): PropertyDescription[];
|
|
117
|
+
getDefaultPropertyMap(): ReadonlyMap<string, any>;
|
|
118
|
+
getIsSerializable(): boolean;
|
|
119
|
+
createEffectInstance(initPropertyMap: Map<string, any>, inputTextures: Record<string, PIXI.Texture>): import("../effect/EffectBase").EffectBase | null;
|
|
120
|
+
serialize(): {
|
|
121
|
+
name: string;
|
|
122
|
+
id: string;
|
|
123
|
+
provider: string;
|
|
124
|
+
fragmentSrc: string;
|
|
125
|
+
properties: {
|
|
126
|
+
type: import("./types/Property.types").PropertyDescriptionTypeEnum;
|
|
127
|
+
name: string;
|
|
128
|
+
defaultValue: Required<any>;
|
|
129
|
+
label?: string | undefined;
|
|
130
|
+
description?: string | undefined;
|
|
131
|
+
}[];
|
|
132
|
+
inputTextures?: {
|
|
133
|
+
name: string;
|
|
134
|
+
url: string;
|
|
135
|
+
wrapMode?: import("./types/Texture.types").InputTextureWrapMode | undefined;
|
|
136
|
+
scaleMode?: import("./types/Texture.types").InputTextureScaleMode | undefined;
|
|
137
|
+
mipmap?: import("./types/Texture.types").InputTextureMipmapMode | undefined;
|
|
138
|
+
}[] | undefined;
|
|
139
|
+
};
|
|
140
|
+
static deserialize(data: any): EffectData;
|
|
141
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export declare const FilterDataSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
provider: z.ZodString;
|
|
7
|
+
lutUrl: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
name: string;
|
|
10
|
+
id: string;
|
|
11
|
+
provider: string;
|
|
12
|
+
lutUrl: string;
|
|
13
|
+
}, {
|
|
14
|
+
name: string;
|
|
15
|
+
id: string;
|
|
16
|
+
provider: string;
|
|
17
|
+
lutUrl: string;
|
|
18
|
+
}>;
|
|
19
|
+
export interface FilterDataOptions {
|
|
20
|
+
id?: string;
|
|
21
|
+
lutUrl: string;
|
|
22
|
+
name?: string;
|
|
23
|
+
provider?: string;
|
|
24
|
+
serializable?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare class FilterData {
|
|
27
|
+
private readonly id;
|
|
28
|
+
private readonly lutUrl;
|
|
29
|
+
private readonly name;
|
|
30
|
+
private readonly provider;
|
|
31
|
+
private lutImage;
|
|
32
|
+
private readonly serializable;
|
|
33
|
+
private initialized;
|
|
34
|
+
constructor(options: FilterDataOptions);
|
|
35
|
+
init(): Promise<void>;
|
|
36
|
+
getId(): string;
|
|
37
|
+
getName(): string;
|
|
38
|
+
getProvider(): string;
|
|
39
|
+
getLutUrl(): string;
|
|
40
|
+
getIsSerializable(): boolean;
|
|
41
|
+
createPixiTexture(): PIXI.Texture<PIXI.Resource> | null;
|
|
42
|
+
serialize(): {
|
|
43
|
+
name: string;
|
|
44
|
+
id: string;
|
|
45
|
+
provider: string;
|
|
46
|
+
lutUrl: string;
|
|
47
|
+
};
|
|
48
|
+
static deserialize(data: object): FilterData;
|
|
49
|
+
}
|