@rendley/sdk 1.1.1 → 1.2.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.
@@ -64,23 +64,35 @@ export declare class ClipStyle<T extends PIXI.Sprite = PIXI.Sprite> {
64
64
  private clipId;
65
65
  private mediaDataId;
66
66
  protected mask: PIXI.Graphics | null;
67
+ protected animationPositionOffset: [number, number];
68
+ protected animationScaleMultiplier: [number, number];
69
+ protected animationRotationOffset: number;
70
+ protected animationAlphaMultiplier: number;
67
71
  constructor(options: ClipStyleOptions);
68
- private positionToCenter;
69
- private scaleDownToFit;
72
+ positionToCenter(): void;
73
+ scaleDownToFit(): void;
70
74
  setCornerRadius(radii: number | [number, number, number, number], relative?: boolean): void;
71
75
  getCornerRadius(): number[];
72
76
  setScale(scaleX: number, scaleY: number): void;
73
77
  getScale(): [number, number];
78
+ setAnimationScaleMultiplier(multiplierX: number, multiplierY: number): void;
79
+ getAnimationScaleMultiplier(): [number, number];
74
80
  getWidth(): number;
75
81
  getHeight(): number;
76
82
  getRawWidth(): number;
77
83
  getRawHeight(): number;
78
84
  setAlpha(alpha: number): void;
79
85
  getAlpha(): number;
86
+ setAnimationAlphaMultiplier(alpha: number): void;
87
+ getAnimationAlphaMultiplier(): number;
80
88
  setRotation(rotation: number): void;
81
89
  getRotation(): number;
90
+ setAnimationRotationOffset(rotation: number): void;
91
+ getAnimationRotationOffset(): number;
82
92
  setPosition(x: number, y: number): void;
83
93
  getPosition(): [number, number];
94
+ setAnimationPositionOffset(x: number, y: number): void;
95
+ getAnimationPositionOffset(): [number, number];
84
96
  setZIndex(zIndex: number): void;
85
97
  getZIndex(): number;
86
98
  load(sprite: T): void;
@@ -29,6 +29,72 @@ export declare class CustomClip extends Clip<PIXI.Sprite, ClipStyle> {
29
29
  subtitlesId?: string | undefined;
30
30
  style?: unknown;
31
31
  text?: string | undefined;
32
+ animationController?: {
33
+ animationDataIn?: {
34
+ name: string;
35
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
36
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
37
+ propertyAnimations: {
38
+ property: string;
39
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
40
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
41
+ keyframes: {
42
+ time: number;
43
+ value: string | number;
44
+ easing: import('../../../../index').EasingEnum;
45
+ space: import('../../../../index').AnimationSpaceEnum;
46
+ relativeProperty?: string | undefined;
47
+ }[];
48
+ }[];
49
+ speed?: number | undefined;
50
+ offset?: number | undefined;
51
+ amplification?: number | undefined;
52
+ } | undefined;
53
+ animationDataOut?: {
54
+ name: string;
55
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
56
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
57
+ propertyAnimations: {
58
+ property: string;
59
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
60
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
61
+ keyframes: {
62
+ time: number;
63
+ value: string | number;
64
+ easing: import('../../../../index').EasingEnum;
65
+ space: import('../../../../index').AnimationSpaceEnum;
66
+ relativeProperty?: string | undefined;
67
+ }[];
68
+ }[];
69
+ speed?: number | undefined;
70
+ offset?: number | undefined;
71
+ amplification?: number | undefined;
72
+ } | undefined;
73
+ animationDataLoop?: {
74
+ name: string;
75
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
76
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
77
+ propertyAnimations: {
78
+ property: string;
79
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
80
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
81
+ keyframes: {
82
+ time: number;
83
+ value: string | number;
84
+ easing: import('../../../../index').EasingEnum;
85
+ space: import('../../../../index').AnimationSpaceEnum;
86
+ relativeProperty?: string | undefined;
87
+ }[];
88
+ }[];
89
+ speed?: number | undefined;
90
+ offset?: number | undefined;
91
+ amplification?: number | undefined;
92
+ } | undefined;
93
+ animationInDuration?: number | undefined;
94
+ animationOutDuration?: number | undefined;
95
+ animationLoopCount?: number | undefined;
96
+ loopSmoothing?: number | undefined;
97
+ } | undefined;
32
98
  };
33
99
  static deserialize(payload: object): CustomClip;
34
100
  }
@@ -1,16 +1,63 @@
1
1
  import * as PIXI from "pixi.js";
2
+ import zod from "zod";
2
3
  import { Clip, ClipOptions } from "../../Clip";
3
4
  import { ClipStyle } from "../../ClipStyle";
5
+ export declare enum PropertyTypeEnum {
6
+ TEXT = "text"
7
+ }
8
+ export declare const PropertySchema: zod.ZodObject<{
9
+ type: zod.ZodDefault<zod.ZodNativeEnum<typeof PropertyTypeEnum>>;
10
+ label: zod.ZodString;
11
+ name: zod.ZodString;
12
+ }, "strip", zod.ZodTypeAny, {
13
+ name: string;
14
+ type: PropertyTypeEnum;
15
+ label: string;
16
+ }, {
17
+ name: string;
18
+ label: string;
19
+ type?: PropertyTypeEnum.TEXT | undefined;
20
+ }>;
21
+ export declare const PropertiesSchema: zod.ZodArray<zod.ZodObject<{
22
+ type: zod.ZodDefault<zod.ZodNativeEnum<typeof PropertyTypeEnum>>;
23
+ label: zod.ZodString;
24
+ name: zod.ZodString;
25
+ }, "strip", zod.ZodTypeAny, {
26
+ name: string;
27
+ type: PropertyTypeEnum;
28
+ label: string;
29
+ }, {
30
+ name: string;
31
+ label: string;
32
+ type?: PropertyTypeEnum.TEXT | undefined;
33
+ }>, "many">;
34
+ export type Property = zod.infer<typeof PropertySchema>;
4
35
  export interface LottieClipOptions extends ClipOptions<ClipStyle> {
5
36
  dataUrl: string;
6
37
  assetsUrl?: string;
38
+ propertiesUrl?: string;
7
39
  }
8
40
  export declare class LottieClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>> {
9
41
  private dataUrl;
10
42
  private assetsUrl;
11
43
  private animation?;
44
+ private propertiesUrl?;
45
+ protected properties: Record<string, Property>;
12
46
  constructor(options: LottieClipOptions);
13
47
  init(layerId: string): Promise<void>;
48
+ private initProperties;
49
+ setProperty(property: string, value: unknown): void;
50
+ getProperties(): Record<string, {
51
+ name: string;
52
+ type: PropertyTypeEnum;
53
+ label: string;
54
+ }>;
55
+ getProperty(property: string): {
56
+ name: string;
57
+ type: PropertyTypeEnum;
58
+ label: string;
59
+ };
60
+ getPropertyValue(property: string): any;
14
61
  preload(currentTime: number): void;
15
62
  updateVisibility(currentTime: number): void;
16
63
  private getGlobalTimeToClipTime;
@@ -18,6 +65,7 @@ export declare class LottieClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>
18
65
  offload(): void;
19
66
  clone(): LottieClip;
20
67
  destroy(): void;
68
+ private getElementFromPath;
21
69
  replaceText(layerId: string | number, text: string): void;
22
70
  private updateShapesFillCachedData;
23
71
  replaceFillColor(layerId: string | number, color: Array<number>): void;
@@ -44,7 +92,74 @@ export declare class LottieClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>
44
92
  mediaDataId?: string | undefined;
45
93
  subtitlesId?: string | undefined;
46
94
  style?: unknown;
95
+ animationController?: {
96
+ animationDataIn?: {
97
+ name: string;
98
+ inOutOfRange: import("../../../..").OutOfRangeEnum;
99
+ outOutOfRange: import("../../../..").OutOfRangeEnum;
100
+ propertyAnimations: {
101
+ property: string;
102
+ inOutOfRange: import("../../../..").OutOfRangeEnum;
103
+ outOutOfRange: import("../../../..").OutOfRangeEnum;
104
+ keyframes: {
105
+ time: number;
106
+ value: string | number;
107
+ easing: import("../../../..").EasingEnum;
108
+ space: import("../../../..").AnimationSpaceEnum;
109
+ relativeProperty?: string | undefined;
110
+ }[];
111
+ }[];
112
+ speed?: number | undefined;
113
+ offset?: number | undefined;
114
+ amplification?: number | undefined;
115
+ } | undefined;
116
+ animationDataOut?: {
117
+ name: string;
118
+ inOutOfRange: import("../../../..").OutOfRangeEnum;
119
+ outOutOfRange: import("../../../..").OutOfRangeEnum;
120
+ propertyAnimations: {
121
+ property: string;
122
+ inOutOfRange: import("../../../..").OutOfRangeEnum;
123
+ outOutOfRange: import("../../../..").OutOfRangeEnum;
124
+ keyframes: {
125
+ time: number;
126
+ value: string | number;
127
+ easing: import("../../../..").EasingEnum;
128
+ space: import("../../../..").AnimationSpaceEnum;
129
+ relativeProperty?: string | undefined;
130
+ }[];
131
+ }[];
132
+ speed?: number | undefined;
133
+ offset?: number | undefined;
134
+ amplification?: number | undefined;
135
+ } | undefined;
136
+ animationDataLoop?: {
137
+ name: string;
138
+ inOutOfRange: import("../../../..").OutOfRangeEnum;
139
+ outOutOfRange: import("../../../..").OutOfRangeEnum;
140
+ propertyAnimations: {
141
+ property: string;
142
+ inOutOfRange: import("../../../..").OutOfRangeEnum;
143
+ outOutOfRange: import("../../../..").OutOfRangeEnum;
144
+ keyframes: {
145
+ time: number;
146
+ value: string | number;
147
+ easing: import("../../../..").EasingEnum;
148
+ space: import("../../../..").AnimationSpaceEnum;
149
+ relativeProperty?: string | undefined;
150
+ }[];
151
+ }[];
152
+ speed?: number | undefined;
153
+ offset?: number | undefined;
154
+ amplification?: number | undefined;
155
+ } | undefined;
156
+ animationInDuration?: number | undefined;
157
+ animationOutDuration?: number | undefined;
158
+ animationLoopCount?: number | undefined;
159
+ loopSmoothing?: number | undefined;
160
+ } | undefined;
47
161
  assetsUrl?: string | undefined;
162
+ propertiesUrl?: string | undefined;
48
163
  };
49
164
  static deserialize(payload: object): LottieClip;
50
165
  }
@@ -36,6 +36,72 @@ export declare class ShapeClip extends Clip<ShapeSprite, ShapeStyle> {
36
36
  mediaDataId?: string | undefined;
37
37
  subtitlesId?: string | undefined;
38
38
  style?: unknown;
39
+ animationController?: {
40
+ animationDataIn?: {
41
+ name: string;
42
+ inOutOfRange: import("../../../..").OutOfRangeEnum;
43
+ outOutOfRange: import("../../../..").OutOfRangeEnum;
44
+ propertyAnimations: {
45
+ property: string;
46
+ inOutOfRange: import("../../../..").OutOfRangeEnum;
47
+ outOutOfRange: import("../../../..").OutOfRangeEnum;
48
+ keyframes: {
49
+ time: number;
50
+ value: string | number;
51
+ easing: import("../../../..").EasingEnum;
52
+ space: import("../../../..").AnimationSpaceEnum;
53
+ relativeProperty?: string | undefined;
54
+ }[];
55
+ }[];
56
+ speed?: number | undefined;
57
+ offset?: number | undefined;
58
+ amplification?: number | undefined;
59
+ } | undefined;
60
+ animationDataOut?: {
61
+ name: string;
62
+ inOutOfRange: import("../../../..").OutOfRangeEnum;
63
+ outOutOfRange: import("../../../..").OutOfRangeEnum;
64
+ propertyAnimations: {
65
+ property: string;
66
+ inOutOfRange: import("../../../..").OutOfRangeEnum;
67
+ outOutOfRange: import("../../../..").OutOfRangeEnum;
68
+ keyframes: {
69
+ time: number;
70
+ value: string | number;
71
+ easing: import("../../../..").EasingEnum;
72
+ space: import("../../../..").AnimationSpaceEnum;
73
+ relativeProperty?: string | undefined;
74
+ }[];
75
+ }[];
76
+ speed?: number | undefined;
77
+ offset?: number | undefined;
78
+ amplification?: number | undefined;
79
+ } | undefined;
80
+ animationDataLoop?: {
81
+ name: string;
82
+ inOutOfRange: import("../../../..").OutOfRangeEnum;
83
+ outOutOfRange: import("../../../..").OutOfRangeEnum;
84
+ propertyAnimations: {
85
+ property: string;
86
+ inOutOfRange: import("../../../..").OutOfRangeEnum;
87
+ outOutOfRange: import("../../../..").OutOfRangeEnum;
88
+ keyframes: {
89
+ time: number;
90
+ value: string | number;
91
+ easing: import("../../../..").EasingEnum;
92
+ space: import("../../../..").AnimationSpaceEnum;
93
+ relativeProperty?: string | undefined;
94
+ }[];
95
+ }[];
96
+ speed?: number | undefined;
97
+ offset?: number | undefined;
98
+ amplification?: number | undefined;
99
+ } | undefined;
100
+ animationInDuration?: number | undefined;
101
+ animationOutDuration?: number | undefined;
102
+ animationLoopCount?: number | undefined;
103
+ loopSmoothing?: number | undefined;
104
+ } | undefined;
39
105
  };
40
106
  static deserialize(payload: object): ShapeClip;
41
107
  }
@@ -1,6 +1,6 @@
1
1
  import { TextSprite } from "./TextSprite";
2
2
  import { TextStyle } from "./TextStyle";
3
- import { Clip, ClipOptions } from "../../Clip";
3
+ import { /*AnimationTypeEnum,*/ Clip, ClipOptions } from "../../Clip";
4
4
  export interface TextClipOptions extends ClipOptions<TextStyle> {
5
5
  text?: string;
6
6
  }
@@ -9,9 +9,14 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
9
9
  constructor(options: TextClipOptions);
10
10
  getText(): string;
11
11
  setText(text?: string): void;
12
+ setAnimationText(text: string): void;
12
13
  seek(currentTime: number): void;
13
14
  preload(currentTime: number): void;
14
15
  update(currentTime: number): void;
16
+ protected setAnimationPropertyValue(property: string, value: any): void;
17
+ protected getAnimationPropertyValue(property: string): number | string;
18
+ protected resetAnimationPropertyValue(property: string): void;
19
+ resetAllAnimationProperties(): void;
15
20
  offload(): void;
16
21
  clone(): TextClip;
17
22
  destroy(): void;
@@ -36,6 +41,72 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
36
41
  mediaDataId?: string | undefined;
37
42
  subtitlesId?: string | undefined;
38
43
  style?: unknown;
44
+ animationController?: {
45
+ animationDataIn?: {
46
+ name: string;
47
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
48
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
49
+ propertyAnimations: {
50
+ property: string;
51
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
52
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
53
+ keyframes: {
54
+ time: number;
55
+ value: string | number;
56
+ easing: import('../../../../index').EasingEnum;
57
+ space: import('../../../../index').AnimationSpaceEnum;
58
+ relativeProperty?: string | undefined;
59
+ }[];
60
+ }[];
61
+ speed?: number | undefined;
62
+ offset?: number | undefined;
63
+ amplification?: number | undefined;
64
+ } | undefined;
65
+ animationDataOut?: {
66
+ name: string;
67
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
68
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
69
+ propertyAnimations: {
70
+ property: string;
71
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
72
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
73
+ keyframes: {
74
+ time: number;
75
+ value: string | number;
76
+ easing: import('../../../../index').EasingEnum;
77
+ space: import('../../../../index').AnimationSpaceEnum;
78
+ relativeProperty?: string | undefined;
79
+ }[];
80
+ }[];
81
+ speed?: number | undefined;
82
+ offset?: number | undefined;
83
+ amplification?: number | undefined;
84
+ } | undefined;
85
+ animationDataLoop?: {
86
+ name: string;
87
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
88
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
89
+ propertyAnimations: {
90
+ property: string;
91
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
92
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
93
+ keyframes: {
94
+ time: number;
95
+ value: string | number;
96
+ easing: import('../../../../index').EasingEnum;
97
+ space: import('../../../../index').AnimationSpaceEnum;
98
+ relativeProperty?: string | undefined;
99
+ }[];
100
+ }[];
101
+ speed?: number | undefined;
102
+ offset?: number | undefined;
103
+ amplification?: number | undefined;
104
+ } | undefined;
105
+ animationInDuration?: number | undefined;
106
+ animationOutDuration?: number | undefined;
107
+ animationLoopCount?: number | undefined;
108
+ loopSmoothing?: number | undefined;
109
+ } | undefined;
39
110
  };
40
111
  static deserialize(payload: object): TextClip;
41
112
  }
@@ -1,7 +1,9 @@
1
1
  import * as PIXI from "pixi.js";
2
+ import { GLTexture } from "pixi.js";
2
3
  declare class WebCodecsVideoFrameResource extends PIXI.Resource {
3
4
  private frame;
4
- upload(renderer: PIXI.Renderer, baseTexture: PIXI.BaseTexture<PIXI.Resource, PIXI.IAutoDetectOptions>): boolean;
5
+ upload(renderer: PIXI.Renderer, baseTexture: PIXI.BaseTexture<PIXI.Resource, PIXI.IAutoDetectOptions>, glTexture: GLTexture): boolean;
6
+ dispose(): void;
5
7
  updateFrame(frame: VideoFrame): void;
6
8
  }
7
9
  export { WebCodecsVideoFrameResource };