@visactor/vrender-core 0.22.6 → 0.23.0-alpha.2

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.
Files changed (188) hide show
  1. package/cjs/canvas/constants.js +1 -2
  2. package/cjs/color-string/index.js +1 -2
  3. package/cjs/color-string/interpolate.d.ts +1 -0
  4. package/cjs/color-string/interpolate.js +7 -2
  5. package/cjs/color-string/interpolate.js.map +1 -1
  6. package/cjs/color-string/store.js +2 -1
  7. package/cjs/common/path-svg.js +1 -2
  8. package/cjs/common/performance-raf.d.ts +6 -0
  9. package/cjs/common/performance-raf.js +26 -0
  10. package/cjs/common/performance-raf.js.map +1 -0
  11. package/cjs/common/render-area.js +1 -0
  12. package/cjs/common/store.js +1 -1
  13. package/cjs/common/text.js +1 -1
  14. package/cjs/common/utils.js +1 -1
  15. package/cjs/core/application.js +1 -1
  16. package/cjs/core/camera.js +1 -1
  17. package/cjs/core/constants.js +1 -1
  18. package/cjs/core/core-modules.js +1 -1
  19. package/cjs/core/global-module.js +0 -2
  20. package/cjs/core/stage.d.ts +2 -1
  21. package/cjs/core/stage.js +19 -15
  22. package/cjs/core/stage.js.map +1 -1
  23. package/cjs/event/event-system.js +7 -6
  24. package/cjs/event/event-system.js.map +1 -1
  25. package/cjs/graphic/graphic.d.ts +4 -3
  26. package/cjs/graphic/graphic.js +16 -22
  27. package/cjs/graphic/graphic.js.map +1 -1
  28. package/cjs/index.d.ts +1 -3
  29. package/cjs/index.js +16 -17
  30. package/cjs/index.js.map +1 -1
  31. package/cjs/interface/animate.d.ts +5 -0
  32. package/cjs/interface/animate.js.map +1 -1
  33. package/cjs/interface/graphic.d.ts +3 -1
  34. package/cjs/interface/graphic.js.map +1 -1
  35. package/cjs/interface/index.d.ts +1 -1
  36. package/cjs/interface/index.js +9 -9
  37. package/cjs/interface/index.js.map +1 -1
  38. package/cjs/interface/stage.d.ts +1 -0
  39. package/cjs/interface/stage.js.map +1 -1
  40. package/cjs/plugins/builtin-plugin/richtext-edit-plugin.d.ts +2 -2
  41. package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js +6 -5
  42. package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
  43. package/dist/index.es.js +2323 -5068
  44. package/es/canvas/constants.js +1 -2
  45. package/es/color-string/index.js +1 -2
  46. package/es/color-string/interpolate.d.ts +1 -0
  47. package/es/color-string/interpolate.js +4 -0
  48. package/es/color-string/interpolate.js.map +1 -1
  49. package/es/color-string/store.js +2 -1
  50. package/es/common/path-svg.js +1 -2
  51. package/es/common/performance-raf.d.ts +6 -0
  52. package/es/common/performance-raf.js +18 -0
  53. package/es/common/performance-raf.js.map +1 -0
  54. package/es/common/render-area.js +2 -1
  55. package/es/common/store.js +1 -1
  56. package/es/common/text.js +1 -1
  57. package/es/common/utils.js +1 -1
  58. package/es/core/application.js +1 -1
  59. package/es/core/camera.js +1 -1
  60. package/es/core/constants.js +1 -1
  61. package/es/core/core-modules.js +1 -1
  62. package/es/core/global-module.js +0 -2
  63. package/es/core/stage.d.ts +2 -1
  64. package/es/core/stage.js +18 -17
  65. package/es/core/stage.js.map +1 -1
  66. package/es/event/event-system.js +7 -6
  67. package/es/event/event-system.js.map +1 -1
  68. package/es/graphic/graphic.d.ts +4 -3
  69. package/es/graphic/graphic.js +17 -23
  70. package/es/graphic/graphic.js.map +1 -1
  71. package/es/index.d.ts +1 -3
  72. package/es/index.js +2 -6
  73. package/es/index.js.map +1 -1
  74. package/es/interface/animate.d.ts +5 -0
  75. package/es/interface/animate.js.map +1 -1
  76. package/es/interface/graphic.d.ts +3 -1
  77. package/es/interface/graphic.js.map +1 -1
  78. package/es/interface/index.d.ts +1 -1
  79. package/es/interface/index.js +2 -2
  80. package/es/interface/index.js.map +1 -1
  81. package/es/interface/stage.d.ts +1 -0
  82. package/es/interface/stage.js.map +1 -1
  83. package/es/plugins/builtin-plugin/richtext-edit-plugin.d.ts +2 -2
  84. package/es/plugins/builtin-plugin/richtext-edit-plugin.js +4 -5
  85. package/es/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
  86. package/package.json +1 -1
  87. package/cjs/animate/Ticker/default-ticker.d.ts +0 -40
  88. package/cjs/animate/Ticker/default-ticker.js +0 -140
  89. package/cjs/animate/Ticker/default-ticker.js.map +0 -1
  90. package/cjs/animate/Ticker/index.d.ts +0 -5
  91. package/cjs/animate/Ticker/index.js +0 -23
  92. package/cjs/animate/Ticker/index.js.map +0 -1
  93. package/cjs/animate/Ticker/manual-ticker-handler.d.ts +0 -15
  94. package/cjs/animate/Ticker/manual-ticker-handler.js +0 -36
  95. package/cjs/animate/Ticker/manual-ticker-handler.js.map +0 -1
  96. package/cjs/animate/Ticker/manual-ticker.d.ts +0 -19
  97. package/cjs/animate/Ticker/manual-ticker.js +0 -37
  98. package/cjs/animate/Ticker/manual-ticker.js.map +0 -1
  99. package/cjs/animate/Ticker/raf-tick-handler.d.ts +0 -9
  100. package/cjs/animate/Ticker/raf-tick-handler.js +0 -30
  101. package/cjs/animate/Ticker/raf-tick-handler.js.map +0 -1
  102. package/cjs/animate/Ticker/timeout-tick-handler.d.ts +0 -9
  103. package/cjs/animate/Ticker/timeout-tick-handler.js +0 -28
  104. package/cjs/animate/Ticker/timeout-tick-handler.js.map +0 -1
  105. package/cjs/animate/Ticker/type.d.ts +0 -6
  106. package/cjs/animate/Ticker/type.js +0 -11
  107. package/cjs/animate/Ticker/type.js.map +0 -1
  108. package/cjs/animate/animate.d.ts +0 -147
  109. package/cjs/animate/animate.js +0 -403
  110. package/cjs/animate/animate.js.map +0 -1
  111. package/cjs/animate/custom-animate.d.ts +0 -236
  112. package/cjs/animate/custom-animate.js +0 -722
  113. package/cjs/animate/custom-animate.js.map +0 -1
  114. package/cjs/animate/default-ticker.d.ts +0 -2
  115. package/cjs/animate/default-ticker.js +0 -14
  116. package/cjs/animate/default-ticker.js.map +0 -1
  117. package/cjs/animate/easing-func.d.ts +0 -1
  118. package/cjs/animate/easing-func.js +0 -16
  119. package/cjs/animate/easing-func.js.map +0 -1
  120. package/cjs/animate/easing.d.ts +0 -49
  121. package/cjs/animate/easing.js +0 -141
  122. package/cjs/animate/easing.js.map +0 -1
  123. package/cjs/animate/group-fade.d.ts +0 -16
  124. package/cjs/animate/group-fade.js +0 -66
  125. package/cjs/animate/group-fade.js.map +0 -1
  126. package/cjs/animate/index.d.ts +0 -8
  127. package/cjs/animate/index.js +0 -24
  128. package/cjs/animate/index.js.map +0 -1
  129. package/cjs/animate/morphing.d.ts +0 -52
  130. package/cjs/animate/morphing.js +0 -292
  131. package/cjs/animate/morphing.js.map +0 -1
  132. package/cjs/animate/timeline.d.ts +0 -17
  133. package/cjs/animate/timeline.js +0 -46
  134. package/cjs/animate/timeline.js.map +0 -1
  135. package/cjs/plugins/builtin-plugin/richtext-edit-plugin-old.d.ts +0 -1
  136. package/cjs/plugins/builtin-plugin/richtext-edit-plugin-old.js +0 -3
  137. package/cjs/plugins/builtin-plugin/richtext-edit-plugin-old.js.map +0 -1
  138. package/es/animate/Ticker/default-ticker.d.ts +0 -40
  139. package/es/animate/Ticker/default-ticker.js +0 -138
  140. package/es/animate/Ticker/default-ticker.js.map +0 -1
  141. package/es/animate/Ticker/index.d.ts +0 -5
  142. package/es/animate/Ticker/index.js +0 -10
  143. package/es/animate/Ticker/index.js.map +0 -1
  144. package/es/animate/Ticker/manual-ticker-handler.d.ts +0 -15
  145. package/es/animate/Ticker/manual-ticker-handler.js +0 -28
  146. package/es/animate/Ticker/manual-ticker-handler.js.map +0 -1
  147. package/es/animate/Ticker/manual-ticker.d.ts +0 -19
  148. package/es/animate/Ticker/manual-ticker.js +0 -31
  149. package/es/animate/Ticker/manual-ticker.js.map +0 -1
  150. package/es/animate/Ticker/raf-tick-handler.d.ts +0 -9
  151. package/es/animate/Ticker/raf-tick-handler.js +0 -22
  152. package/es/animate/Ticker/raf-tick-handler.js.map +0 -1
  153. package/es/animate/Ticker/timeout-tick-handler.d.ts +0 -9
  154. package/es/animate/Ticker/timeout-tick-handler.js +0 -20
  155. package/es/animate/Ticker/timeout-tick-handler.js.map +0 -1
  156. package/es/animate/Ticker/type.d.ts +0 -6
  157. package/es/animate/Ticker/type.js +0 -7
  158. package/es/animate/Ticker/type.js.map +0 -1
  159. package/es/animate/animate.d.ts +0 -147
  160. package/es/animate/animate.js +0 -398
  161. package/es/animate/animate.js.map +0 -1
  162. package/es/animate/custom-animate.d.ts +0 -236
  163. package/es/animate/custom-animate.js +0 -699
  164. package/es/animate/custom-animate.js.map +0 -1
  165. package/es/animate/default-ticker.d.ts +0 -2
  166. package/es/animate/default-ticker.js +0 -12
  167. package/es/animate/default-ticker.js.map +0 -1
  168. package/es/animate/easing-func.d.ts +0 -1
  169. package/es/animate/easing-func.js +0 -10
  170. package/es/animate/easing-func.js.map +0 -1
  171. package/es/animate/easing.d.ts +0 -49
  172. package/es/animate/easing.js +0 -134
  173. package/es/animate/easing.js.map +0 -1
  174. package/es/animate/group-fade.d.ts +0 -16
  175. package/es/animate/group-fade.js +0 -56
  176. package/es/animate/group-fade.js.map +0 -1
  177. package/es/animate/index.d.ts +0 -8
  178. package/es/animate/index.js +0 -16
  179. package/es/animate/index.js.map +0 -1
  180. package/es/animate/morphing.d.ts +0 -52
  181. package/es/animate/morphing.js +0 -295
  182. package/es/animate/morphing.js.map +0 -1
  183. package/es/animate/timeline.d.ts +0 -17
  184. package/es/animate/timeline.js +0 -42
  185. package/es/animate/timeline.js.map +0 -1
  186. package/es/plugins/builtin-plugin/richtext-edit-plugin-old.d.ts +0 -1
  187. package/es/plugins/builtin-plugin/richtext-edit-plugin-old.js +0 -3
  188. package/es/plugins/builtin-plugin/richtext-edit-plugin-old.js.map +0 -1
@@ -1,236 +0,0 @@
1
- import type { IPoint, IPointLike } from '@visactor/vutils';
2
- import { CustomPath2D } from '../common/custom-path2d';
3
- import type { EasingType, IArea, ICurve, ICustomPath2D, IGraphic, IGroup, ILine, ILineAttribute, ILinearGradient, IRect, IRectAttribute, ISegment, IShadowRoot } from '../interface';
4
- import { ACustomAnimate } from './animate';
5
- export declare class IncreaseCount extends ACustomAnimate<{
6
- text: string | number;
7
- }> {
8
- valid: boolean;
9
- private fromNumber;
10
- private toNumber;
11
- private decimalLength;
12
- constructor(from: {
13
- text: string | number;
14
- }, to: {
15
- text: string | number;
16
- }, duration: number, easing: EasingType, params?: {
17
- fixed?: boolean;
18
- });
19
- getEndProps(): Record<string, any> | void;
20
- onBind(): void;
21
- onEnd(): void;
22
- onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
23
- }
24
- export declare class FadeInPlus extends ACustomAnimate<any> {
25
- direction: number;
26
- toFill: string;
27
- toStroke: string;
28
- fillGradient: ILinearGradient;
29
- strokeGradient: ILinearGradient;
30
- fill: boolean;
31
- stroke: boolean;
32
- constructor(from: any, to: any, duration: number, easing: EasingType, params?: {
33
- direction?: number;
34
- fill?: boolean;
35
- stroke?: boolean;
36
- });
37
- getEndProps(): Record<string, any>;
38
- onBind(): void;
39
- onEnd(): void;
40
- onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
41
- leftToRight(end: boolean, ratio: number, out: Record<string, any>): void;
42
- strokePath(end: boolean, ratio: number, out: Record<string, any>): void;
43
- rightToLeft(end: boolean, ratio: number, out: Record<string, any>): void;
44
- topToBottom(end: boolean, ratio: number, out: Record<string, any>): void;
45
- bottomToTop(end: boolean, ratio: number, out: Record<string, any>): void;
46
- }
47
- export declare class InputText extends ACustomAnimate<{
48
- text: string;
49
- }> {
50
- valid: boolean;
51
- target: IGraphic;
52
- private fromText;
53
- private toText;
54
- getEndProps(): Record<string, any>;
55
- onBind(): void;
56
- onEnd(): void;
57
- onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
58
- }
59
- export declare class StreamLight extends ACustomAnimate<any> {
60
- valid: boolean;
61
- target: IGraphic;
62
- rect: IRect;
63
- line: ILine;
64
- area: IArea;
65
- constructor(from: any, to: any, duration: number, easing: EasingType, params?: {
66
- attribute?: Partial<IRectAttribute | ILineAttribute>;
67
- streamLength?: number;
68
- isHorizontal?: boolean;
69
- });
70
- getEndProps(): Record<string, any>;
71
- onStart(): void;
72
- onStartLineOrArea(type: 'line' | 'area'): void;
73
- onStartRect(): void;
74
- onBind(): void;
75
- onEnd(): void;
76
- onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
77
- protected onUpdateRect(end: boolean, ratio: number, out: Record<string, any>): void;
78
- protected onUpdateLineOrArea(end: boolean, ratio: number, out: Record<string, any>): void;
79
- protected _onUpdateLineOrAreaWithCache(customPath: ICustomPath2D, g: ILine | IArea, end: boolean, ratio: number, out: Record<string, any>): void;
80
- protected _updateCurves(customPath: ICustomPath2D, curves: ICurve<IPoint>[], totalLen: number, ratio: number): void;
81
- protected _onUpdateLineWithoutCache(customPath: ICustomPath2D, line: ILine, end: boolean, ratio: number, out: Record<string, any>): void;
82
- }
83
- export declare class Meteor extends ACustomAnimate<any> {
84
- size: number;
85
- target: IGraphic;
86
- root: IShadowRoot;
87
- posList: IPoint[];
88
- get lastPos(): IPoint;
89
- constructor(size: number, duration: number, easing: EasingType, params?: any);
90
- onBind(): void;
91
- onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
92
- }
93
- export declare class MotionPath extends ACustomAnimate<any> {
94
- valid: boolean;
95
- pathLength: number;
96
- path: CustomPath2D;
97
- distance: number;
98
- initAngle: number;
99
- changeAngle: boolean;
100
- cb?: (from: any, to: any, ratio: number, target: IGraphic) => void;
101
- constructor(from: any, to: any, duration: number, easing: EasingType, params?: {
102
- path: CustomPath2D;
103
- distance: number;
104
- cb?: (from: any, to: any, ratio: number, target: IGraphic) => void;
105
- initAngle?: number;
106
- changeAngle?: boolean;
107
- });
108
- onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
109
- }
110
- export declare class TagPointsUpdate extends ACustomAnimate<{
111
- points?: IPointLike[];
112
- segments?: ISegment[];
113
- }> {
114
- protected fromPoints: IPointLike[];
115
- protected toPoints: IPointLike[];
116
- protected points: IPointLike[];
117
- protected interpolatePoints: [IPointLike, IPointLike][];
118
- protected newPointAnimateType: 'grow' | 'appear' | 'clip';
119
- protected clipRange: number;
120
- protected shrinkClipRange: number;
121
- protected clipRangeByDimension: 'x' | 'y';
122
- protected segmentsCache: number[];
123
- constructor(from: any, to: any, duration: number, easing: EasingType, params?: {
124
- newPointAnimateType?: 'grow' | 'appear' | 'clip';
125
- clipRangeByDimension?: 'x' | 'y';
126
- });
127
- private getPoints;
128
- onBind(): void;
129
- onFirstRun(): void;
130
- onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
131
- }
132
- export declare class GraphicAnimate extends ACustomAnimate<any> {
133
- graphic: IGraphic;
134
- constructor(from: any, to: any, duration: number, easing: EasingType, params?: {
135
- graphic: IGraphic;
136
- });
137
- onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
138
- }
139
- export declare class ClipGraphicAnimate extends ACustomAnimate<any> {
140
- private _group?;
141
- private _clipGraphic?;
142
- protected clipFromAttribute?: any;
143
- protected clipToAttribute?: any;
144
- private _lastClip?;
145
- private _lastPath?;
146
- constructor(from: any, to: any, duration: number, easing: EasingType, params: {
147
- group: IGroup;
148
- clipGraphic: IGraphic;
149
- });
150
- onBind(): void;
151
- onEnd(): void;
152
- onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
153
- }
154
- export declare class ClipAngleAnimate extends ClipGraphicAnimate {
155
- constructor(from: any, to: any, duration: number, easing: EasingType, params: {
156
- group: IGroup;
157
- center?: {
158
- x: number;
159
- y: number;
160
- };
161
- startAngle?: number;
162
- radius?: number;
163
- orient?: 'clockwise' | 'anticlockwise';
164
- animationType?: 'in' | 'out';
165
- });
166
- }
167
- export declare class ClipRadiusAnimate extends ClipGraphicAnimate {
168
- constructor(from: any, to: any, duration: number, easing: EasingType, params: {
169
- group: IGroup;
170
- center?: {
171
- x: number;
172
- y: number;
173
- };
174
- startRadius?: number;
175
- endRadius?: number;
176
- animationType?: 'in' | 'out';
177
- });
178
- }
179
- export declare class ClipDirectionAnimate extends ClipGraphicAnimate {
180
- constructor(from: any, to: any, duration: number, easing: EasingType, params: {
181
- group: IGroup;
182
- direction?: 'x' | 'y';
183
- orient?: 'positive' | 'negative';
184
- width?: number;
185
- height?: number;
186
- animationType?: 'in' | 'out';
187
- });
188
- }
189
- type RotateSphereParams = {
190
- center: {
191
- x: number;
192
- y: number;
193
- z: number;
194
- };
195
- r: number;
196
- cb?: (out: any) => void;
197
- } | (() => any);
198
- export declare class RotateBySphereAnimate extends ACustomAnimate<any> {
199
- params: RotateSphereParams;
200
- theta: number;
201
- phi: number;
202
- onStart(): void;
203
- onBind(): void;
204
- onEnd(): void;
205
- onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
206
- }
207
- export declare class AttributeAnimate extends ACustomAnimate<any> {
208
- target: IGroup;
209
- constructor(to: Record<string, any>, duration: number, easing: EasingType);
210
- getEndProps(): Record<string, any>;
211
- onBind(): void;
212
- onEnd(): void;
213
- onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
214
- }
215
- export declare class AnimateGroup extends ACustomAnimate<any> {
216
- customAnimates: ACustomAnimate<any>[];
217
- updating: boolean;
218
- constructor(duration: number, customAnimates: ACustomAnimate<any>[]);
219
- initAnimates(): void;
220
- getEndProps(): Record<string, any>;
221
- onBind(): void;
222
- onEnd(): void;
223
- onStart(): void;
224
- onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
225
- }
226
- export declare class AnimateGroup1 extends ACustomAnimate<any> {
227
- customAnimates: ACustomAnimate<any>[];
228
- updating: boolean;
229
- constructor(duration: number, customAnimates: ACustomAnimate<any>[]);
230
- initAnimates(): void;
231
- getEndProps(): Record<string, any>;
232
- onBind(): void;
233
- onEnd(): void;
234
- onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
235
- }
236
- export {};