@rendley/sdk 1.9.7 → 1.10.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/README.md +0 -9
- package/dist/Engine.d.ts +10 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/libs/ffmpeg/classes.d.ts +2 -1
- package/dist/libs/ffmpeg/const.d.ts +1 -0
- package/dist/libs/ffmpeg/types.d.ts +6 -1
- package/dist/modules/background-timer/background-timer-worker.d.ts +5 -0
- package/dist/modules/background-timer/background-timer.d.ts +9 -0
- package/dist/modules/background-timer/backround-timer.types.d.ts +15 -0
- package/dist/modules/clip/Clip.d.ts +6 -3
- package/dist/modules/clip/ClipStyle.d.ts +3 -3
- package/dist/modules/clip/clips/audio/AudioClip.d.ts +1 -1
- package/dist/modules/clip/clips/custom/CustomClip.d.ts +1 -1
- package/dist/modules/clip/clips/htmlText/HtmlTextClip.d.ts +1 -1
- package/dist/modules/clip/clips/index.d.ts +1 -0
- package/dist/modules/clip/clips/lottie/LottieClip.d.ts +116 -36
- package/dist/modules/clip/clips/shape/ShapeClip.d.ts +6 -10
- package/dist/modules/clip/clips/shape/ShapeSprite.d.ts +3 -9
- package/dist/modules/clip/clips/shape/ShapeStyle.d.ts +58 -9
- package/dist/modules/clip/clips/shape/types/Shape.types.d.ts +7 -0
- package/dist/modules/clip/clips/text/TextClip.d.ts +1 -1
- package/dist/modules/clip/clips/text/TextStyle.d.ts +8 -8
- package/dist/modules/clip/clips/video/VideoClip.d.ts +1 -1
- package/dist/modules/ffmpeg/FFmpeg.d.ts +1 -1
- package/dist/modules/layer/Layer.d.ts +5 -5
- package/dist/modules/library/Library.d.ts +5 -5
- package/dist/modules/library/MediaData.d.ts +4 -3
- package/dist/modules/renderer/Renderer.d.ts +4 -0
- package/dist/modules/subtitles/SubtitleManager.d.ts +4 -4
- package/dist/modules/timeline/Timeline.d.ts +7 -7
- package/dist/modules/transition/Transition.d.ts +3 -3
- package/dist/modules/undo/UndoManager.types.d.ts +51 -0
- package/dist/types/clip.types.d.ts +2 -5
- package/dist/utils/compareVersions/compareVersions.d.ts +1 -0
- package/dist/utils/timer/performanceTimer.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DemuxerPacket, FFFSMountOptions, FFFSPath, FFFSType, FFMessageFrameData, FFMessageLoadConfig, FFMessageRenderSettings, FileData, FSNode, IsFirst, LogEventCallback, OK, ProgressEventCallback, FFMessageMuxerData, FFMessageInitMuxerData, FFMessageAuthentificateData, FFMessageFetchTSChunksData } from "./types";
|
|
1
|
+
import { DemuxerPacket, FFFSMountOptions, FFFSPath, FFFSType, FFMessageFrameData, FFMessageLoadConfig, FFMessageRenderSettings, FileData, FSNode, IsFirst, LogEventCallback, OK, ProgressEventCallback, FFMessageMuxerData, FFMessageInitMuxerData, FFMessageAuthentificateData, FFMessageFetchTSChunksData, FFMessageTranscodeData } from "./types";
|
|
2
2
|
import { MediaInfo } from '../../modules/ffmpeg/types/FFmpeg.types';
|
|
3
3
|
type FFMessageOptions = {
|
|
4
4
|
signal?: AbortSignal;
|
|
@@ -154,6 +154,7 @@ export declare class FFmpeg {
|
|
|
154
154
|
initMuxer: (initSettings: FFMessageInitMuxerData, { signal }?: FFMessageOptions) => Promise<OK>;
|
|
155
155
|
addChunkMuxer: (data: FFMessageMuxerData, { signal }?: FFMessageOptions) => Promise<OK>;
|
|
156
156
|
closeMuxer: ({ signal }?: FFMessageOptions) => Promise<OK>;
|
|
157
|
+
transcode: (data: FFMessageTranscodeData, { signal }?: FFMessageOptions) => Promise<OK>;
|
|
157
158
|
authentificate: (data: FFMessageAuthentificateData, { signal }?: FFMessageOptions) => Promise<number>;
|
|
158
159
|
isAuthenticated: () => Promise<boolean>;
|
|
159
160
|
getAuthStatus: () => Promise<number>;
|
|
@@ -30,6 +30,7 @@ export declare enum FFMessageType {
|
|
|
30
30
|
MUXER_INIT = "MUXER_INIT",
|
|
31
31
|
MUXER_ADD_VIDEO_CHUNK = "MUXER_ADD_VIDEO_CHUNK",
|
|
32
32
|
MUXER_CLOSE = "MUXER_FINALIZE",
|
|
33
|
+
TRANSCODE = "TRANSCODE",
|
|
33
34
|
AUTH_AUTHENTICATE = "AUTHENTICATE",
|
|
34
35
|
AUTH_GET_STATUS = "AUTH_STATUS",
|
|
35
36
|
AUTH_GET_SECONDS = "AUTH_GET_SECONDS",
|
|
@@ -69,6 +69,11 @@ export interface FFMessageInitMuxerData {
|
|
|
69
69
|
bitrate: number;
|
|
70
70
|
codecRFC: string;
|
|
71
71
|
}
|
|
72
|
+
export interface FFMessageTranscodeData {
|
|
73
|
+
inputPath: FFFSPath;
|
|
74
|
+
outputPath: FFFSPath;
|
|
75
|
+
bitrateFactor: number;
|
|
76
|
+
}
|
|
72
77
|
export interface FFMessageExecData {
|
|
73
78
|
args: string[];
|
|
74
79
|
timeout?: number;
|
|
@@ -140,7 +145,7 @@ export interface FFMessageMountData {
|
|
|
140
145
|
export interface FFMessageUnmountData {
|
|
141
146
|
mountPoint: FFFSPath;
|
|
142
147
|
}
|
|
143
|
-
export type FFMessageData = FFMessageLoadConfig | FFMessageExecData | FFMessageWriteFileData | FFMessageReadFileData | FFMessageDeleteFileData | FFMessageRenameData | FFMessageCreateDirData | FFMessageListDirData | FFMessageDeleteDirData | FFMessageMountData | FFMessageUnmountData | FFMessageGetInfoData | FFMessageGetSubtitlesData | FFMessageFrameData | FFMessageRenderSettings | FFMessageInitDemuxerData | FFMessageSeekDemuxerData | FFMessageIdDemuxerData | FFMessageMuxerData | FFMessageAuthentificateData | FFMessageFetchTSChunksData;
|
|
148
|
+
export type FFMessageData = FFMessageLoadConfig | FFMessageExecData | FFMessageWriteFileData | FFMessageReadFileData | FFMessageDeleteFileData | FFMessageRenameData | FFMessageCreateDirData | FFMessageListDirData | FFMessageDeleteDirData | FFMessageMountData | FFMessageUnmountData | FFMessageGetInfoData | FFMessageGetSubtitlesData | FFMessageFrameData | FFMessageRenderSettings | FFMessageInitDemuxerData | FFMessageSeekDemuxerData | FFMessageIdDemuxerData | FFMessageMuxerData | FFMessageAuthentificateData | FFMessageFetchTSChunksData | FFMessageTranscodeData;
|
|
144
149
|
export interface Message {
|
|
145
150
|
type: string;
|
|
146
151
|
data?: FFMessageData;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface IBackgroundTimerSetTimeoutMsg {
|
|
2
|
+
id: number;
|
|
3
|
+
duration: number;
|
|
4
|
+
}
|
|
5
|
+
export interface IBackgroundTimerStopTimeoutMsg {
|
|
6
|
+
id: number;
|
|
7
|
+
}
|
|
8
|
+
export declare enum BackgroundTimerMsgTypeEnum {
|
|
9
|
+
SET_TIMEOUT = "set-timeout",
|
|
10
|
+
CLEAR_TIMEOUT = "clear-timeout"
|
|
11
|
+
}
|
|
12
|
+
export interface IBackgroundTimerMsg {
|
|
13
|
+
type: BackgroundTimerMsgTypeEnum;
|
|
14
|
+
payload: IBackgroundTimerSetTimeoutMsg | IBackgroundTimerStopTimeoutMsg;
|
|
15
|
+
}
|
|
@@ -34,6 +34,7 @@ export interface ClipOptions<K extends ClipStyle = ClipStyle> {
|
|
|
34
34
|
effects?: z.infer<typeof EffectSchema>[];
|
|
35
35
|
style?: Partial<ReturnType<K["serialize"]>>;
|
|
36
36
|
isVisible?: boolean;
|
|
37
|
+
wrapMode?: WrapModeEnum;
|
|
37
38
|
}
|
|
38
39
|
export declare const AnimationClassSchema: z.ZodObject<{
|
|
39
40
|
animationDataIn: z.ZodOptional<z.ZodObject<{
|
|
@@ -959,8 +960,8 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
959
960
|
wrapMode?: MaskWrapModeEnum | undefined;
|
|
960
961
|
}>, "many">>;
|
|
961
962
|
}, "strip", z.ZodTypeAny, {
|
|
962
|
-
id: string;
|
|
963
963
|
type: string;
|
|
964
|
+
id: string;
|
|
964
965
|
subtitlesOffset: number;
|
|
965
966
|
startTime: number;
|
|
966
967
|
duration: number;
|
|
@@ -1064,8 +1065,8 @@ export declare const ClipSchema: z.ZodObject<{
|
|
|
1064
1065
|
clipId: string;
|
|
1065
1066
|
}[] | undefined;
|
|
1066
1067
|
}, {
|
|
1067
|
-
id: string;
|
|
1068
1068
|
type: string;
|
|
1069
|
+
id: string;
|
|
1069
1070
|
subtitlesOffset: number;
|
|
1070
1071
|
startTime: number;
|
|
1071
1072
|
duration: number;
|
|
@@ -1264,6 +1265,8 @@ export declare class Clip<T extends PIXI.Sprite = PIXI.Sprite, K extends ClipSty
|
|
|
1264
1265
|
removeClipMask(clip: Clip): void;
|
|
1265
1266
|
setVisible(visible: boolean): void;
|
|
1266
1267
|
getVisible(): boolean;
|
|
1268
|
+
setWrapMode(wrapMode: WrapModeEnum): void;
|
|
1269
|
+
getWrapMode(): WrapModeEnum;
|
|
1267
1270
|
private updatePIXIFilters;
|
|
1268
1271
|
hasSprite(): boolean;
|
|
1269
1272
|
update(currentTime: number): void;
|
|
@@ -1272,8 +1275,8 @@ export declare class Clip<T extends PIXI.Sprite = PIXI.Sprite, K extends ClipSty
|
|
|
1272
1275
|
clone(): Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>;
|
|
1273
1276
|
protected postRendererInit(): void;
|
|
1274
1277
|
serialize(): {
|
|
1275
|
-
id: string;
|
|
1276
1278
|
type: string;
|
|
1279
|
+
id: string;
|
|
1277
1280
|
subtitlesOffset: number;
|
|
1278
1281
|
startTime: number;
|
|
1279
1282
|
duration: number;
|
|
@@ -26,8 +26,8 @@ export declare const ClipStyleSchema: z.ZodObject<{
|
|
|
26
26
|
cornerRadius: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
27
27
|
relativeCornerRadius: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
clipId: string;
|
|
30
29
|
alpha: number;
|
|
30
|
+
clipId: string;
|
|
31
31
|
rotation: number;
|
|
32
32
|
position: [number, number];
|
|
33
33
|
scale: [number, number];
|
|
@@ -38,8 +38,8 @@ export declare const ClipStyleSchema: z.ZodObject<{
|
|
|
38
38
|
height?: number | undefined;
|
|
39
39
|
cornerRadius?: [number, number, number, number] | undefined;
|
|
40
40
|
}, {
|
|
41
|
-
clipId: string;
|
|
42
41
|
alpha: number;
|
|
42
|
+
clipId: string;
|
|
43
43
|
rotation: number;
|
|
44
44
|
position: [number, number];
|
|
45
45
|
scale: [number, number];
|
|
@@ -108,8 +108,8 @@ export declare class ClipStyle<T extends PIXI.Sprite = PIXI.Sprite> {
|
|
|
108
108
|
protected emitUpdateEvent(property: string, value: unknown): boolean;
|
|
109
109
|
destroy(): void;
|
|
110
110
|
serialize(): {
|
|
111
|
-
clipId: string;
|
|
112
111
|
alpha: number;
|
|
112
|
+
clipId: string;
|
|
113
113
|
rotation: number;
|
|
114
114
|
position: [number, number];
|
|
115
115
|
scale: [number, number];
|
|
@@ -117,8 +117,8 @@ export declare class HtmlTextClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprit
|
|
|
117
117
|
update(currentTime: number): void;
|
|
118
118
|
clone(): HtmlTextClip;
|
|
119
119
|
serialize(): {
|
|
120
|
-
id: string;
|
|
121
120
|
type: string;
|
|
121
|
+
id: string;
|
|
122
122
|
subtitlesOffset: number;
|
|
123
123
|
startTime: number;
|
|
124
124
|
duration: number;
|
|
@@ -3,6 +3,7 @@ export * from "./image/ImageClip";
|
|
|
3
3
|
export * from "./video/VideoClip";
|
|
4
4
|
export * from "./shape/ShapeClip";
|
|
5
5
|
export * from "./shape/ShapeStyle";
|
|
6
|
+
export * from "./shape/types/Shape.types";
|
|
6
7
|
export * from "./gif/GifClip";
|
|
7
8
|
export * from "./text/TextClip";
|
|
8
9
|
export * from "./text/TextStyle";
|
|
@@ -1,72 +1,145 @@
|
|
|
1
1
|
import * as PIXI from "pixi.js";
|
|
2
2
|
import zod from "zod";
|
|
3
|
+
import { WrapModeEnum } from '../../../../types';
|
|
3
4
|
import { Clip, ClipOptions } from "../../Clip";
|
|
4
5
|
import { ClipStyle } from "../../ClipStyle";
|
|
5
|
-
export declare enum
|
|
6
|
-
TEXT = "text"
|
|
6
|
+
export declare enum LottiePropertyTypeEnum {
|
|
7
|
+
TEXT = "text",
|
|
8
|
+
FILL_COLOR = "fill-color"
|
|
7
9
|
}
|
|
8
10
|
export declare const PropertySchema: zod.ZodObject<{
|
|
9
|
-
|
|
11
|
+
id: zod.ZodString;
|
|
12
|
+
type: zod.ZodDefault<zod.ZodNativeEnum<typeof LottiePropertyTypeEnum>>;
|
|
10
13
|
label: zod.ZodString;
|
|
11
|
-
|
|
14
|
+
path: zod.ZodString;
|
|
15
|
+
group: zod.ZodOptional<zod.ZodString>;
|
|
12
16
|
value: zod.ZodOptional<zod.ZodUnknown>;
|
|
13
17
|
}, "strip", zod.ZodTypeAny, {
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
type: LottiePropertyTypeEnum;
|
|
19
|
+
id: string;
|
|
20
|
+
path: string;
|
|
16
21
|
label: string;
|
|
22
|
+
group?: string | undefined;
|
|
17
23
|
value?: unknown;
|
|
18
24
|
}, {
|
|
19
|
-
|
|
25
|
+
id: string;
|
|
26
|
+
path: string;
|
|
20
27
|
label: string;
|
|
21
|
-
type?:
|
|
28
|
+
type?: LottiePropertyTypeEnum | undefined;
|
|
29
|
+
group?: string | undefined;
|
|
22
30
|
value?: unknown;
|
|
23
31
|
}>;
|
|
24
|
-
export declare const
|
|
25
|
-
|
|
32
|
+
export declare const GroupSchema: zod.ZodObject<{
|
|
33
|
+
id: zod.ZodString;
|
|
26
34
|
label: zod.ZodString;
|
|
27
|
-
name: zod.ZodString;
|
|
28
|
-
value: zod.ZodOptional<zod.ZodUnknown>;
|
|
29
35
|
}, "strip", zod.ZodTypeAny, {
|
|
30
|
-
|
|
31
|
-
type: PropertyTypeEnum;
|
|
36
|
+
id: string;
|
|
32
37
|
label: string;
|
|
33
|
-
value?: unknown;
|
|
34
38
|
}, {
|
|
35
|
-
|
|
39
|
+
id: string;
|
|
36
40
|
label: string;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
}>;
|
|
42
|
+
export declare const PropertiesSchema: zod.ZodObject<{
|
|
43
|
+
version: zod.ZodNumber;
|
|
44
|
+
groups: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
45
|
+
id: zod.ZodString;
|
|
46
|
+
label: zod.ZodString;
|
|
47
|
+
}, "strip", zod.ZodTypeAny, {
|
|
48
|
+
id: string;
|
|
49
|
+
label: string;
|
|
50
|
+
}, {
|
|
51
|
+
id: string;
|
|
52
|
+
label: string;
|
|
53
|
+
}>, "many">>;
|
|
54
|
+
properties: zod.ZodArray<zod.ZodObject<{
|
|
55
|
+
id: zod.ZodString;
|
|
56
|
+
type: zod.ZodDefault<zod.ZodNativeEnum<typeof LottiePropertyTypeEnum>>;
|
|
57
|
+
label: zod.ZodString;
|
|
58
|
+
path: zod.ZodString;
|
|
59
|
+
group: zod.ZodOptional<zod.ZodString>;
|
|
60
|
+
value: zod.ZodOptional<zod.ZodUnknown>;
|
|
61
|
+
}, "strip", zod.ZodTypeAny, {
|
|
62
|
+
type: LottiePropertyTypeEnum;
|
|
63
|
+
id: string;
|
|
64
|
+
path: string;
|
|
65
|
+
label: string;
|
|
66
|
+
group?: string | undefined;
|
|
67
|
+
value?: unknown;
|
|
68
|
+
}, {
|
|
69
|
+
id: string;
|
|
70
|
+
path: string;
|
|
71
|
+
label: string;
|
|
72
|
+
type?: LottiePropertyTypeEnum | undefined;
|
|
73
|
+
group?: string | undefined;
|
|
74
|
+
value?: unknown;
|
|
75
|
+
}>, "many">;
|
|
76
|
+
}, "strip", zod.ZodTypeAny, {
|
|
77
|
+
version: number;
|
|
78
|
+
properties: {
|
|
79
|
+
type: LottiePropertyTypeEnum;
|
|
80
|
+
id: string;
|
|
81
|
+
path: string;
|
|
82
|
+
label: string;
|
|
83
|
+
group?: string | undefined;
|
|
84
|
+
value?: unknown;
|
|
85
|
+
}[];
|
|
86
|
+
groups?: {
|
|
87
|
+
id: string;
|
|
88
|
+
label: string;
|
|
89
|
+
}[] | undefined;
|
|
90
|
+
}, {
|
|
91
|
+
version: number;
|
|
92
|
+
properties: {
|
|
93
|
+
id: string;
|
|
94
|
+
path: string;
|
|
95
|
+
label: string;
|
|
96
|
+
type?: LottiePropertyTypeEnum | undefined;
|
|
97
|
+
group?: string | undefined;
|
|
98
|
+
value?: unknown;
|
|
99
|
+
}[];
|
|
100
|
+
groups?: {
|
|
101
|
+
id: string;
|
|
102
|
+
label: string;
|
|
103
|
+
}[] | undefined;
|
|
104
|
+
}>;
|
|
105
|
+
export type Group = zod.infer<typeof GroupSchema>;
|
|
40
106
|
export type Property = zod.infer<typeof PropertySchema>;
|
|
41
107
|
export interface LottieClipOptions extends ClipOptions<ClipStyle> {
|
|
42
108
|
dataUrl: string;
|
|
43
109
|
assetsUrl?: string;
|
|
44
110
|
propertiesUrl?: string;
|
|
45
|
-
|
|
111
|
+
groups?: zod.infer<typeof GroupSchema>[];
|
|
112
|
+
properties?: zod.infer<typeof PropertySchema>[];
|
|
46
113
|
}
|
|
47
114
|
export declare class LottieClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>> {
|
|
48
115
|
private dataUrl;
|
|
49
116
|
private assetsUrl;
|
|
50
117
|
private animation?;
|
|
51
118
|
private propertiesUrl?;
|
|
52
|
-
protected properties:
|
|
119
|
+
protected properties: Property[];
|
|
120
|
+
protected groups: Group[];
|
|
121
|
+
private propertyMap;
|
|
53
122
|
constructor(options: LottieClipOptions);
|
|
54
123
|
init(layerId: string): Promise<void>;
|
|
55
124
|
private initProperties;
|
|
56
|
-
setProperty(
|
|
57
|
-
getProperties():
|
|
58
|
-
|
|
59
|
-
|
|
125
|
+
setProperty(propertyId: string, value: unknown): void;
|
|
126
|
+
getProperties(): Map<string, {
|
|
127
|
+
type: LottiePropertyTypeEnum;
|
|
128
|
+
id: string;
|
|
129
|
+
path: string;
|
|
60
130
|
label: string;
|
|
131
|
+
group?: string | undefined;
|
|
61
132
|
value?: unknown;
|
|
62
133
|
}>;
|
|
63
|
-
getProperty(
|
|
64
|
-
|
|
65
|
-
|
|
134
|
+
getProperty(propertyId: string): {
|
|
135
|
+
type: LottiePropertyTypeEnum;
|
|
136
|
+
id: string;
|
|
137
|
+
path: string;
|
|
66
138
|
label: string;
|
|
139
|
+
group?: string | undefined;
|
|
67
140
|
value?: unknown;
|
|
68
|
-
};
|
|
69
|
-
getPropertyValue(
|
|
141
|
+
} | undefined;
|
|
142
|
+
getPropertyValue(propertyId: string): any;
|
|
70
143
|
preload(currentTime: number): void;
|
|
71
144
|
updateVisibility(currentTime: number): void;
|
|
72
145
|
private getGlobalTimeToClipTime;
|
|
@@ -80,8 +153,8 @@ export declare class LottieClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>
|
|
|
80
153
|
replaceFillColor(layerId: string | number, color: Array<number>): void;
|
|
81
154
|
replaceImage(layerId: string | number, url: string): void;
|
|
82
155
|
serialize(): {
|
|
83
|
-
id: string;
|
|
84
156
|
type: string;
|
|
157
|
+
id: string;
|
|
85
158
|
subtitlesOffset: number;
|
|
86
159
|
startTime: number;
|
|
87
160
|
duration: number;
|
|
@@ -113,7 +186,7 @@ export declare class LottieClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>
|
|
|
113
186
|
style?: unknown;
|
|
114
187
|
mediaDataId?: string | undefined;
|
|
115
188
|
subtitlesId?: string | undefined;
|
|
116
|
-
wrapMode?:
|
|
189
|
+
wrapMode?: WrapModeEnum | undefined;
|
|
117
190
|
animationController?: {
|
|
118
191
|
animationDataIn?: {
|
|
119
192
|
name: string;
|
|
@@ -187,12 +260,19 @@ export declare class LottieClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>
|
|
|
187
260
|
}[] | undefined;
|
|
188
261
|
assetsUrl?: string | undefined;
|
|
189
262
|
propertiesUrl?: string | undefined;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
type: PropertyTypeEnum;
|
|
263
|
+
groups?: {
|
|
264
|
+
id: string;
|
|
193
265
|
label: string;
|
|
266
|
+
}[] | undefined;
|
|
267
|
+
properties?: {
|
|
268
|
+
type: LottiePropertyTypeEnum;
|
|
269
|
+
id: string;
|
|
270
|
+
path: string;
|
|
271
|
+
label: string;
|
|
272
|
+
group?: string | undefined;
|
|
194
273
|
value?: unknown;
|
|
195
|
-
}
|
|
274
|
+
}[] | undefined;
|
|
196
275
|
};
|
|
276
|
+
private static tryMigrateToV3;
|
|
197
277
|
static deserialize(payload: object): LottieClip;
|
|
198
278
|
}
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
import { ShapeSprite } from "./ShapeSprite";
|
|
2
2
|
import { ShapeStyle } from "./ShapeStyle";
|
|
3
|
+
import { ShapeTypeEnum } from "./types/Shape.types";
|
|
3
4
|
import { Clip, ClipOptions } from "../../Clip";
|
|
4
5
|
export interface ShapeClipOptions extends ClipOptions<ShapeStyle> {
|
|
5
|
-
shape:
|
|
6
|
+
shape: ShapeTypeEnum;
|
|
6
7
|
}
|
|
7
8
|
export declare class ShapeClip extends Clip<ShapeSprite, ShapeStyle> {
|
|
8
|
-
shape: string;
|
|
9
9
|
constructor(options: ShapeClipOptions);
|
|
10
|
-
private initGraphics;
|
|
11
|
-
preload(currentTime: number): void;
|
|
12
10
|
updateVisibility(currentTime: number): void;
|
|
13
11
|
update(currentTime: number): void;
|
|
14
|
-
offload(): void;
|
|
15
12
|
clone(): ShapeClip;
|
|
16
13
|
destroy(): void;
|
|
17
14
|
serialize(): {
|
|
18
|
-
shape: string;
|
|
19
|
-
id: string;
|
|
20
15
|
type: string;
|
|
16
|
+
id: string;
|
|
21
17
|
subtitlesOffset: number;
|
|
22
18
|
startTime: number;
|
|
23
19
|
duration: number;
|
|
@@ -43,12 +39,11 @@ export declare class ShapeClip extends Clip<ShapeSprite, ShapeStyle> {
|
|
|
43
39
|
sourceId: string;
|
|
44
40
|
}[];
|
|
45
41
|
isVisible: boolean;
|
|
46
|
-
text?: string | undefined;
|
|
47
|
-
customData?: [string, unknown][] | undefined;
|
|
48
|
-
style?: unknown;
|
|
49
42
|
mediaDataId?: string | undefined;
|
|
50
43
|
subtitlesId?: string | undefined;
|
|
51
44
|
wrapMode?: import('../../../../types').WrapModeEnum | undefined;
|
|
45
|
+
style?: unknown;
|
|
46
|
+
text?: string | undefined;
|
|
52
47
|
animationController?: {
|
|
53
48
|
animationDataIn?: {
|
|
54
49
|
name: string;
|
|
@@ -115,6 +110,7 @@ export declare class ShapeClip extends Clip<ShapeSprite, ShapeStyle> {
|
|
|
115
110
|
animationLoopCount?: number | undefined;
|
|
116
111
|
loopSmoothing?: number | undefined;
|
|
117
112
|
} | undefined;
|
|
113
|
+
customData?: [string, unknown][] | undefined;
|
|
118
114
|
clipMasks?: {
|
|
119
115
|
id: string;
|
|
120
116
|
wrapMode: import("../../../filter/MaskFilter").MaskWrapModeEnum;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import * as PIXI from "pixi.js";
|
|
2
|
+
import type { ShapeStyle } from '../../../../index';
|
|
2
3
|
export declare class ShapeSprite extends PIXI.Sprite {
|
|
3
4
|
graphics: PIXI.Graphics;
|
|
4
|
-
fillColor: string;
|
|
5
|
-
strokeColor: string;
|
|
6
|
-
strokeWidth: number;
|
|
7
|
-
strokeAlpha: number;
|
|
8
|
-
hasFill: boolean;
|
|
9
5
|
constructor();
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
drawTriangle(width: number, height: number): void;
|
|
13
|
-
drawElipse(width: number, height: number): void;
|
|
6
|
+
drawStar(x: number, y: number, style: ShapeStyle): void;
|
|
7
|
+
draw(style: ShapeStyle): void;
|
|
14
8
|
destroy(): void;
|
|
15
9
|
}
|
|
@@ -1,72 +1,105 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { ShapeTypeEnum } from '../../../../index';
|
|
2
3
|
import { ShapeSprite } from "./ShapeSprite";
|
|
3
4
|
import { ClipStyle, ClipStyleOptions } from "../../ClipStyle";
|
|
4
5
|
interface ShapeClipStyleOptions extends ClipStyleOptions {
|
|
6
|
+
shape: ShapeTypeEnum;
|
|
5
7
|
fillColor?: string;
|
|
6
8
|
strokeColor?: string;
|
|
7
9
|
strokeWidth?: number;
|
|
8
10
|
strokeAlpha?: number;
|
|
11
|
+
strokeAlignment?: number;
|
|
9
12
|
hasFill?: boolean;
|
|
13
|
+
rectRadius?: number;
|
|
14
|
+
nrPoints?: number;
|
|
15
|
+
innerRadius?: number;
|
|
16
|
+
outerRadius?: number;
|
|
10
17
|
}
|
|
11
18
|
export declare const ShapeStyleSchema: z.ZodObject<{
|
|
19
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
alpha: z.ZodNumber;
|
|
12
21
|
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
13
22
|
clipId: z.ZodString;
|
|
14
|
-
alpha: z.ZodNumber;
|
|
15
23
|
rotation: z.ZodNumber;
|
|
16
24
|
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
17
25
|
scale: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
18
26
|
zIndex: z.ZodNumber;
|
|
19
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
20
27
|
height: z.ZodOptional<z.ZodNumber>;
|
|
21
28
|
cornerRadius: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
22
29
|
relativeCornerRadius: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
30
|
+
shape: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof ShapeTypeEnum>>>;
|
|
23
31
|
fillColor: z.ZodOptional<z.ZodString>;
|
|
24
32
|
strokeColor: z.ZodOptional<z.ZodString>;
|
|
25
33
|
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
26
34
|
strokeAlpha: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
strokeAlignment: z.ZodOptional<z.ZodNumber>;
|
|
27
36
|
hasFill: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
37
|
+
rectRadius: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
nrPoints: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
innerRadius: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
outerRadius: z.ZodOptional<z.ZodNumber>;
|
|
28
41
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
|
|
42
|
+
shape: ShapeTypeEnum;
|
|
30
43
|
alpha: number;
|
|
44
|
+
clipId: string;
|
|
31
45
|
rotation: number;
|
|
32
46
|
position: [number, number];
|
|
33
47
|
scale: [number, number];
|
|
34
48
|
zIndex: number;
|
|
35
49
|
relativeCornerRadius: boolean;
|
|
36
50
|
hasFill: boolean;
|
|
37
|
-
mediaDataId?: string | undefined;
|
|
38
51
|
width?: number | undefined;
|
|
52
|
+
mediaDataId?: string | undefined;
|
|
39
53
|
height?: number | undefined;
|
|
40
54
|
cornerRadius?: [number, number, number, number] | undefined;
|
|
41
55
|
fillColor?: string | undefined;
|
|
42
56
|
strokeColor?: string | undefined;
|
|
43
57
|
strokeWidth?: number | undefined;
|
|
44
58
|
strokeAlpha?: number | undefined;
|
|
59
|
+
strokeAlignment?: number | undefined;
|
|
60
|
+
rectRadius?: number | undefined;
|
|
61
|
+
nrPoints?: number | undefined;
|
|
62
|
+
innerRadius?: number | undefined;
|
|
63
|
+
outerRadius?: number | undefined;
|
|
45
64
|
}, {
|
|
46
|
-
clipId: string;
|
|
47
65
|
alpha: number;
|
|
66
|
+
clipId: string;
|
|
48
67
|
rotation: number;
|
|
49
68
|
position: [number, number];
|
|
50
69
|
scale: [number, number];
|
|
51
70
|
zIndex: number;
|
|
52
|
-
mediaDataId?: string | undefined;
|
|
53
71
|
width?: number | undefined;
|
|
72
|
+
mediaDataId?: string | undefined;
|
|
54
73
|
height?: number | undefined;
|
|
55
74
|
cornerRadius?: [number, number, number, number] | undefined;
|
|
56
75
|
relativeCornerRadius?: boolean | undefined;
|
|
76
|
+
shape?: ShapeTypeEnum | undefined;
|
|
57
77
|
fillColor?: string | undefined;
|
|
58
78
|
strokeColor?: string | undefined;
|
|
59
79
|
strokeWidth?: number | undefined;
|
|
60
80
|
strokeAlpha?: number | undefined;
|
|
81
|
+
strokeAlignment?: number | undefined;
|
|
61
82
|
hasFill?: boolean | undefined;
|
|
83
|
+
rectRadius?: number | undefined;
|
|
84
|
+
nrPoints?: number | undefined;
|
|
85
|
+
innerRadius?: number | undefined;
|
|
86
|
+
outerRadius?: number | undefined;
|
|
62
87
|
}>;
|
|
63
88
|
export declare class ShapeStyle extends ClipStyle<ShapeSprite> {
|
|
89
|
+
protected shape: ShapeTypeEnum;
|
|
64
90
|
protected fillColor: string;
|
|
65
91
|
protected strokeColor: string;
|
|
66
92
|
protected strokeWidth: number;
|
|
67
93
|
protected strokeAlpha: number;
|
|
94
|
+
protected strokeAlignment: number;
|
|
68
95
|
protected hasFill: boolean;
|
|
96
|
+
protected rectRadius: number;
|
|
97
|
+
protected nrPoints: number;
|
|
98
|
+
protected innerRadius: number;
|
|
99
|
+
protected outerRadius: number;
|
|
69
100
|
constructor(options: ShapeClipStyleOptions);
|
|
101
|
+
setShape(shape: ShapeTypeEnum): void;
|
|
102
|
+
getShape(): ShapeTypeEnum;
|
|
70
103
|
setFillColor(fillColor: string): void;
|
|
71
104
|
getFillColor(): string;
|
|
72
105
|
setStrokeColor(strokeColor: string): void;
|
|
@@ -75,26 +108,42 @@ export declare class ShapeStyle extends ClipStyle<ShapeSprite> {
|
|
|
75
108
|
getStrokeWidth(): number;
|
|
76
109
|
setStrokeAlpha(strokeAlpha: number): void;
|
|
77
110
|
getStrokeAlpha(): number;
|
|
111
|
+
getStrokeAlignment(): number;
|
|
78
112
|
setHasFill(hasFill: boolean): void;
|
|
79
113
|
getHasFill(): boolean;
|
|
80
|
-
|
|
114
|
+
setRectRadius(rectRadius: number): void;
|
|
115
|
+
getRectRadius(): number;
|
|
116
|
+
setNrPoints(nrPoints: number): void;
|
|
117
|
+
getNrPoints(): number;
|
|
118
|
+
setInnerRadius(innerRadius: number): void;
|
|
119
|
+
getInnerRadius(): number;
|
|
120
|
+
setOuterRadius(outerRadius: number): void;
|
|
121
|
+
getOuterRadius(): number;
|
|
122
|
+
setScale(scaleX: number, scaleY: number): void;
|
|
123
|
+
update(container: ShapeSprite, redraw?: boolean): void;
|
|
81
124
|
serialize(): {
|
|
82
|
-
|
|
125
|
+
shape: ShapeTypeEnum;
|
|
83
126
|
alpha: number;
|
|
127
|
+
clipId: string;
|
|
84
128
|
rotation: number;
|
|
85
129
|
position: [number, number];
|
|
86
130
|
scale: [number, number];
|
|
87
131
|
zIndex: number;
|
|
88
132
|
relativeCornerRadius: boolean;
|
|
89
133
|
hasFill: boolean;
|
|
90
|
-
mediaDataId?: string | undefined;
|
|
91
134
|
width?: number | undefined;
|
|
135
|
+
mediaDataId?: string | undefined;
|
|
92
136
|
height?: number | undefined;
|
|
93
137
|
cornerRadius?: [number, number, number, number] | undefined;
|
|
94
138
|
fillColor?: string | undefined;
|
|
95
139
|
strokeColor?: string | undefined;
|
|
96
140
|
strokeWidth?: number | undefined;
|
|
97
141
|
strokeAlpha?: number | undefined;
|
|
142
|
+
strokeAlignment?: number | undefined;
|
|
143
|
+
rectRadius?: number | undefined;
|
|
144
|
+
nrPoints?: number | undefined;
|
|
145
|
+
innerRadius?: number | undefined;
|
|
146
|
+
outerRadius?: number | undefined;
|
|
98
147
|
};
|
|
99
148
|
static deserialize(payload: object): ShapeStyle;
|
|
100
149
|
}
|
|
@@ -20,9 +20,9 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
|
|
|
20
20
|
clone(): TextClip;
|
|
21
21
|
destroy(): void;
|
|
22
22
|
serialize(): {
|
|
23
|
+
type: string;
|
|
23
24
|
text: string;
|
|
24
25
|
id: string;
|
|
25
|
-
type: string;
|
|
26
26
|
subtitlesOffset: number;
|
|
27
27
|
startTime: number;
|
|
28
28
|
duration: number;
|