@visactor/vrender-animate 0.22.4 → 0.22.12

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 (376) hide show
  1. package/cjs/animate-extension.d.ts +12 -5
  2. package/cjs/animate-extension.js +23 -12
  3. package/cjs/animate-extension.js.map +1 -1
  4. package/cjs/animate.d.ts +2 -5
  5. package/cjs/animate.js +23 -18
  6. package/cjs/animate.js.map +1 -1
  7. package/cjs/component/component-animate-extension.d.ts +1 -0
  8. package/cjs/component/component-animate-extension.js +1 -0
  9. package/cjs/component/component-animate-extension.js.map +1 -0
  10. package/cjs/component/component-animator.d.ts +22 -0
  11. package/cjs/component/component-animator.js +67 -0
  12. package/cjs/component/component-animator.js.map +1 -0
  13. package/cjs/component/index.d.ts +1 -0
  14. package/cjs/component/index.js +21 -0
  15. package/cjs/component/index.js.map +1 -0
  16. package/cjs/config/morphing.d.ts +2 -0
  17. package/cjs/config/morphing.js +9 -0
  18. package/cjs/config/morphing.js.map +1 -0
  19. package/cjs/custom/clip-graphic.d.ts +1 -1
  20. package/cjs/custom/clip-graphic.js +2 -2
  21. package/cjs/custom/clip-graphic.js.map +1 -1
  22. package/cjs/custom/clip.d.ts +2 -1
  23. package/cjs/custom/clip.js +9 -1
  24. package/cjs/custom/clip.js.map +1 -1
  25. package/cjs/custom/common.d.ts +1 -3
  26. package/cjs/custom/common.js +21 -17
  27. package/cjs/custom/common.js.map +1 -1
  28. package/cjs/custom/custom-animate.d.ts +7 -3
  29. package/cjs/custom/custom-animate.js +13 -2
  30. package/cjs/custom/custom-animate.js.map +1 -1
  31. package/cjs/custom/fade.d.ts +1 -1
  32. package/cjs/custom/fade.js +7 -2
  33. package/cjs/custom/fade.js.map +1 -1
  34. package/cjs/custom/fromTo.d.ts +10 -0
  35. package/cjs/custom/fromTo.js +42 -0
  36. package/cjs/custom/fromTo.js.map +1 -0
  37. package/cjs/custom/groupFade.d.ts +10 -0
  38. package/cjs/custom/groupFade.js +25 -0
  39. package/cjs/custom/groupFade.js.map +1 -0
  40. package/cjs/custom/growAngle.d.ts +10 -5
  41. package/cjs/custom/growAngle.js +38 -17
  42. package/cjs/custom/growAngle.js.map +1 -1
  43. package/cjs/custom/growCenter.d.ts +1 -2
  44. package/cjs/custom/growCenter.js +16 -10
  45. package/cjs/custom/growCenter.js.map +1 -1
  46. package/cjs/custom/growHeight.d.ts +1 -3
  47. package/cjs/custom/growHeight.js +19 -13
  48. package/cjs/custom/growHeight.js.map +1 -1
  49. package/cjs/custom/growPoints.d.ts +1 -2
  50. package/cjs/custom/growPoints.js +41 -36
  51. package/cjs/custom/growPoints.js.map +1 -1
  52. package/cjs/custom/growRadius.d.ts +4 -5
  53. package/cjs/custom/growRadius.js +22 -18
  54. package/cjs/custom/growRadius.js.map +1 -1
  55. package/cjs/custom/growWidth.d.ts +1 -3
  56. package/cjs/custom/growWidth.js +15 -9
  57. package/cjs/custom/growWidth.js.map +1 -1
  58. package/cjs/custom/input-text.d.ts +1 -2
  59. package/cjs/custom/input-text.js.map +1 -1
  60. package/cjs/custom/label-item-animate.d.ts +7 -0
  61. package/cjs/custom/label-item-animate.js +221 -0
  62. package/cjs/custom/label-item-animate.js.map +1 -0
  63. package/cjs/custom/morphing.d.ts +51 -0
  64. package/cjs/custom/morphing.js +298 -0
  65. package/cjs/custom/morphing.js.map +1 -0
  66. package/cjs/custom/motionPath.d.ts +21 -0
  67. package/cjs/custom/motionPath.js +31 -0
  68. package/cjs/custom/motionPath.js.map +1 -0
  69. package/cjs/custom/move.d.ts +96 -0
  70. package/cjs/custom/move.js +133 -0
  71. package/cjs/custom/move.js.map +1 -0
  72. package/cjs/custom/number.d.ts +1 -2
  73. package/cjs/custom/number.js.map +1 -1
  74. package/cjs/custom/poptip-animate.d.ts +7 -0
  75. package/cjs/custom/poptip-animate.js +109 -0
  76. package/cjs/custom/poptip-animate.js.map +1 -0
  77. package/cjs/custom/register.d.ts +27 -0
  78. package/cjs/custom/register.js +418 -3
  79. package/cjs/custom/register.js.map +1 -1
  80. package/cjs/custom/richtext/input-richtext.d.ts +35 -0
  81. package/cjs/custom/richtext/input-richtext.js +80 -0
  82. package/cjs/custom/richtext/input-richtext.js.map +1 -0
  83. package/cjs/custom/richtext/output-richtext.d.ts +37 -0
  84. package/cjs/custom/richtext/output-richtext.js +94 -0
  85. package/cjs/custom/richtext/output-richtext.js.map +1 -0
  86. package/cjs/custom/richtext/slide-out-richtext.d.ts +38 -0
  87. package/cjs/custom/richtext/slide-out-richtext.js +146 -0
  88. package/cjs/custom/richtext/slide-out-richtext.js.map +1 -0
  89. package/cjs/custom/richtext/slide-richtext.d.ts +36 -0
  90. package/cjs/custom/richtext/slide-richtext.js +144 -0
  91. package/cjs/custom/richtext/slide-richtext.js.map +1 -0
  92. package/cjs/custom/rotate.d.ts +33 -0
  93. package/cjs/custom/rotate.js +79 -0
  94. package/cjs/custom/rotate.js.map +1 -0
  95. package/cjs/custom/scale.d.ts +6 -2
  96. package/cjs/custom/scale.js +32 -17
  97. package/cjs/custom/scale.js.map +1 -1
  98. package/cjs/custom/sphere.d.ts +2 -1
  99. package/cjs/custom/sphere.js +14 -5
  100. package/cjs/custom/sphere.js.map +1 -1
  101. package/cjs/custom/state.d.ts +1 -1
  102. package/cjs/custom/state.js +1 -1
  103. package/cjs/custom/state.js.map +1 -1
  104. package/cjs/custom/story.d.ts +196 -0
  105. package/cjs/custom/story.js +497 -0
  106. package/cjs/custom/story.js.map +1 -0
  107. package/cjs/custom/streamLight.d.ts +27 -0
  108. package/cjs/custom/streamLight.js +161 -0
  109. package/cjs/custom/streamLight.js.map +1 -0
  110. package/cjs/custom/tag-points.d.ts +2 -3
  111. package/cjs/custom/tag-points.js +20 -4
  112. package/cjs/custom/tag-points.js.map +1 -1
  113. package/cjs/custom/update.d.ts +2 -2
  114. package/cjs/custom/update.js +10 -2
  115. package/cjs/custom/update.js.map +1 -1
  116. package/cjs/executor/animate-executor.d.ts +7 -6
  117. package/cjs/executor/animate-executor.js +118 -62
  118. package/cjs/executor/animate-executor.js.map +1 -1
  119. package/cjs/executor/executor.d.ts +9 -3
  120. package/cjs/executor/executor.js.map +1 -1
  121. package/cjs/index.d.ts +8 -8
  122. package/cjs/index.js +50 -18
  123. package/cjs/index.js.map +1 -1
  124. package/cjs/interpolate/store.d.ts +6 -2
  125. package/cjs/interpolate/store.js +13 -2
  126. package/cjs/interpolate/store.js.map +1 -1
  127. package/cjs/register.js +1 -5
  128. package/cjs/register.js.map +1 -1
  129. package/cjs/state/animation-state.d.ts +20 -2
  130. package/cjs/state/animation-state.js +48 -4
  131. package/cjs/state/animation-state.js.map +1 -1
  132. package/cjs/state/animation-states-registry.js +18 -0
  133. package/cjs/state/animation-states-registry.js.map +1 -1
  134. package/cjs/state/graphic-extension.d.ts +7 -1
  135. package/cjs/state/graphic-extension.js +20 -0
  136. package/cjs/state/graphic-extension.js.map +1 -1
  137. package/cjs/step.d.ts +7 -4
  138. package/cjs/step.js +33 -15
  139. package/cjs/step.js.map +1 -1
  140. package/cjs/ticker/default-ticker.d.ts +12 -7
  141. package/cjs/ticker/default-ticker.js +38 -33
  142. package/cjs/ticker/default-ticker.js.map +1 -1
  143. package/cjs/ticker/manual-ticker.d.ts +6 -1
  144. package/cjs/ticker/manual-ticker.js +26 -4
  145. package/cjs/ticker/manual-ticker.js.map +1 -1
  146. package/cjs/timeline.d.ts +14 -7
  147. package/cjs/timeline.js +31 -18
  148. package/cjs/timeline.js.map +1 -1
  149. package/cjs/utils/transform.d.ts +2 -0
  150. package/cjs/utils/transform.js +10 -0
  151. package/cjs/utils/transform.js.map +1 -0
  152. package/dist/index.es.js +3765 -527
  153. package/es/animate-extension.d.ts +12 -5
  154. package/es/animate-extension.js +24 -11
  155. package/es/animate-extension.js.map +1 -1
  156. package/es/animate.d.ts +2 -5
  157. package/es/animate.js +14 -11
  158. package/es/animate.js.map +1 -1
  159. package/es/component/component-animate-extension.d.ts +1 -0
  160. package/es/component/component-animate-extension.js +1 -0
  161. package/es/component/component-animate-extension.js.map +1 -0
  162. package/es/component/component-animator.d.ts +22 -0
  163. package/es/component/component-animator.js +59 -0
  164. package/es/component/component-animator.js.map +1 -0
  165. package/es/component/index.d.ts +1 -0
  166. package/es/component/index.js +2 -0
  167. package/es/component/index.js.map +1 -0
  168. package/es/config/morphing.d.ts +2 -0
  169. package/es/config/morphing.js +5 -0
  170. package/es/config/morphing.js.map +1 -0
  171. package/es/custom/clip-graphic.d.ts +1 -1
  172. package/es/custom/clip-graphic.js +2 -2
  173. package/es/custom/clip-graphic.js.map +1 -1
  174. package/es/custom/clip.d.ts +2 -1
  175. package/es/custom/clip.js +9 -1
  176. package/es/custom/clip.js.map +1 -1
  177. package/es/custom/common.d.ts +1 -3
  178. package/es/custom/common.js +21 -17
  179. package/es/custom/common.js.map +1 -1
  180. package/es/custom/custom-animate.d.ts +7 -3
  181. package/es/custom/custom-animate.js +10 -1
  182. package/es/custom/custom-animate.js.map +1 -1
  183. package/es/custom/fade.d.ts +1 -1
  184. package/es/custom/fade.js +7 -2
  185. package/es/custom/fade.js.map +1 -1
  186. package/es/custom/fromTo.d.ts +10 -0
  187. package/es/custom/fromTo.js +34 -0
  188. package/es/custom/fromTo.js.map +1 -0
  189. package/es/custom/groupFade.d.ts +10 -0
  190. package/es/custom/groupFade.js +15 -0
  191. package/es/custom/groupFade.js.map +1 -0
  192. package/es/custom/growAngle.d.ts +10 -5
  193. package/es/custom/growAngle.js +39 -15
  194. package/es/custom/growAngle.js.map +1 -1
  195. package/es/custom/growCenter.d.ts +1 -2
  196. package/es/custom/growCenter.js +16 -10
  197. package/es/custom/growCenter.js.map +1 -1
  198. package/es/custom/growHeight.d.ts +1 -3
  199. package/es/custom/growHeight.js +20 -14
  200. package/es/custom/growHeight.js.map +1 -1
  201. package/es/custom/growPoints.d.ts +1 -2
  202. package/es/custom/growPoints.js +40 -36
  203. package/es/custom/growPoints.js.map +1 -1
  204. package/es/custom/growRadius.d.ts +4 -5
  205. package/es/custom/growRadius.js +22 -16
  206. package/es/custom/growRadius.js.map +1 -1
  207. package/es/custom/growWidth.d.ts +1 -3
  208. package/es/custom/growWidth.js +16 -10
  209. package/es/custom/growWidth.js.map +1 -1
  210. package/es/custom/input-text.d.ts +1 -2
  211. package/es/custom/input-text.js.map +1 -1
  212. package/es/custom/label-item-animate.d.ts +7 -0
  213. package/es/custom/label-item-animate.js +215 -0
  214. package/es/custom/label-item-animate.js.map +1 -0
  215. package/es/custom/morphing.d.ts +51 -0
  216. package/es/custom/morphing.js +289 -0
  217. package/es/custom/morphing.js.map +1 -0
  218. package/es/custom/motionPath.d.ts +21 -0
  219. package/es/custom/motionPath.js +23 -0
  220. package/es/custom/motionPath.js.map +1 -0
  221. package/es/custom/move.d.ts +96 -0
  222. package/es/custom/move.js +118 -0
  223. package/es/custom/move.js.map +1 -0
  224. package/es/custom/number.d.ts +1 -2
  225. package/es/custom/number.js.map +1 -1
  226. package/es/custom/poptip-animate.d.ts +7 -0
  227. package/es/custom/poptip-animate.js +103 -0
  228. package/es/custom/poptip-animate.js.map +1 -0
  229. package/es/custom/register.d.ts +27 -0
  230. package/es/custom/register.js +48 -1
  231. package/es/custom/register.js.map +1 -1
  232. package/es/custom/richtext/input-richtext.d.ts +35 -0
  233. package/es/custom/richtext/input-richtext.js +74 -0
  234. package/es/custom/richtext/input-richtext.js.map +1 -0
  235. package/es/custom/richtext/output-richtext.d.ts +37 -0
  236. package/es/custom/richtext/output-richtext.js +88 -0
  237. package/es/custom/richtext/output-richtext.js.map +1 -0
  238. package/es/custom/richtext/slide-out-richtext.d.ts +38 -0
  239. package/es/custom/richtext/slide-out-richtext.js +140 -0
  240. package/es/custom/richtext/slide-out-richtext.js.map +1 -0
  241. package/es/custom/richtext/slide-richtext.d.ts +36 -0
  242. package/es/custom/richtext/slide-richtext.js +138 -0
  243. package/es/custom/richtext/slide-richtext.js.map +1 -0
  244. package/es/custom/rotate.d.ts +33 -0
  245. package/es/custom/rotate.js +65 -0
  246. package/es/custom/rotate.js.map +1 -0
  247. package/es/custom/scale.d.ts +6 -2
  248. package/es/custom/scale.js +32 -17
  249. package/es/custom/scale.js.map +1 -1
  250. package/es/custom/sphere.d.ts +2 -1
  251. package/es/custom/sphere.js +14 -5
  252. package/es/custom/sphere.js.map +1 -1
  253. package/es/custom/state.d.ts +1 -1
  254. package/es/custom/state.js +1 -1
  255. package/es/custom/state.js.map +1 -1
  256. package/es/custom/story.d.ts +196 -0
  257. package/es/custom/story.js +468 -0
  258. package/es/custom/story.js.map +1 -0
  259. package/es/custom/streamLight.d.ts +27 -0
  260. package/es/custom/streamLight.js +157 -0
  261. package/es/custom/streamLight.js.map +1 -0
  262. package/es/custom/tag-points.d.ts +2 -3
  263. package/es/custom/tag-points.js +21 -5
  264. package/es/custom/tag-points.js.map +1 -1
  265. package/es/custom/update.d.ts +2 -2
  266. package/es/custom/update.js +10 -2
  267. package/es/custom/update.js.map +1 -1
  268. package/es/executor/animate-executor.d.ts +7 -6
  269. package/es/executor/animate-executor.js +116 -61
  270. package/es/executor/animate-executor.js.map +1 -1
  271. package/es/executor/executor.d.ts +9 -3
  272. package/es/executor/executor.js.map +1 -1
  273. package/es/index.d.ts +8 -8
  274. package/es/index.js +10 -12
  275. package/es/index.js.map +1 -1
  276. package/es/interpolate/store.d.ts +6 -2
  277. package/es/interpolate/store.js +13 -3
  278. package/es/interpolate/store.js.map +1 -1
  279. package/es/register.js +0 -8
  280. package/es/register.js.map +1 -1
  281. package/es/state/animation-state.d.ts +20 -2
  282. package/es/state/animation-state.js +48 -2
  283. package/es/state/animation-state.js.map +1 -1
  284. package/es/state/animation-states-registry.js +18 -0
  285. package/es/state/animation-states-registry.js.map +1 -1
  286. package/es/state/graphic-extension.d.ts +7 -1
  287. package/es/state/graphic-extension.js +20 -0
  288. package/es/state/graphic-extension.js.map +1 -1
  289. package/es/step.d.ts +7 -4
  290. package/es/step.js +34 -16
  291. package/es/step.js.map +1 -1
  292. package/es/ticker/default-ticker.d.ts +12 -7
  293. package/es/ticker/default-ticker.js +30 -27
  294. package/es/ticker/default-ticker.js.map +1 -1
  295. package/es/ticker/manual-ticker.d.ts +6 -1
  296. package/es/ticker/manual-ticker.js +27 -3
  297. package/es/ticker/manual-ticker.js.map +1 -1
  298. package/es/timeline.d.ts +14 -7
  299. package/es/timeline.js +33 -18
  300. package/es/timeline.js.map +1 -1
  301. package/es/utils/transform.d.ts +2 -0
  302. package/es/utils/transform.js +4 -0
  303. package/es/utils/transform.js.map +1 -0
  304. package/package.json +16 -16
  305. package/cjs/custom/group-fade.d.ts +0 -16
  306. package/cjs/custom/group-fade.js +0 -66
  307. package/cjs/custom/group-fade.js.map +0 -1
  308. package/cjs/custom/scale-in.d.ts +0 -13
  309. package/cjs/custom/scale-in.js +0 -57
  310. package/cjs/custom/scale-in.js.map +0 -1
  311. package/cjs/interpolate/executor.d.ts +0 -66
  312. package/cjs/interpolate/executor.js +0 -6
  313. package/cjs/interpolate/executor.js.map +0 -1
  314. package/cjs/intreface/animate.d.ts +0 -91
  315. package/cjs/intreface/animate.js +0 -10
  316. package/cjs/intreface/animate.js.map +0 -1
  317. package/cjs/intreface/easing.d.ts +0 -3
  318. package/cjs/intreface/easing.js +0 -6
  319. package/cjs/intreface/easing.js.map +0 -1
  320. package/cjs/intreface/state.d.ts +0 -35
  321. package/cjs/intreface/state.js +0 -6
  322. package/cjs/intreface/state.js.map +0 -1
  323. package/cjs/intreface/ticker.d.ts +0 -37
  324. package/cjs/intreface/ticker.js +0 -10
  325. package/cjs/intreface/ticker.js.map +0 -1
  326. package/cjs/intreface/timeline.d.ts +0 -17
  327. package/cjs/intreface/timeline.js +0 -6
  328. package/cjs/intreface/timeline.js.map +0 -1
  329. package/cjs/intreface/type.d.ts +0 -13
  330. package/cjs/intreface/type.js +0 -15
  331. package/cjs/intreface/type.js.map +0 -1
  332. package/cjs/state/animation-state-machine.d.ts +0 -22
  333. package/cjs/state/animation-state-machine.js +0 -53
  334. package/cjs/state/animation-state-machine.js.map +0 -1
  335. package/cjs/state/animation-state-queue.d.ts +0 -24
  336. package/cjs/state/animation-state-queue.js +0 -66
  337. package/cjs/state/animation-state-queue.js.map +0 -1
  338. package/cjs/state/animation-state-registry.d.ts +0 -14
  339. package/cjs/state/animation-state-registry.js +0 -53
  340. package/cjs/state/animation-state-registry.js.map +0 -1
  341. package/es/custom/group-fade.d.ts +0 -16
  342. package/es/custom/group-fade.js +0 -56
  343. package/es/custom/group-fade.js.map +0 -1
  344. package/es/custom/scale-in.d.ts +0 -13
  345. package/es/custom/scale-in.js +0 -49
  346. package/es/custom/scale-in.js.map +0 -1
  347. package/es/interpolate/executor.d.ts +0 -66
  348. package/es/interpolate/executor.js +0 -2
  349. package/es/interpolate/executor.js.map +0 -1
  350. package/es/intreface/animate.d.ts +0 -91
  351. package/es/intreface/animate.js +0 -6
  352. package/es/intreface/animate.js.map +0 -1
  353. package/es/intreface/easing.d.ts +0 -3
  354. package/es/intreface/easing.js +0 -2
  355. package/es/intreface/easing.js.map +0 -1
  356. package/es/intreface/state.d.ts +0 -35
  357. package/es/intreface/state.js +0 -2
  358. package/es/intreface/state.js.map +0 -1
  359. package/es/intreface/ticker.d.ts +0 -37
  360. package/es/intreface/ticker.js +0 -6
  361. package/es/intreface/ticker.js.map +0 -1
  362. package/es/intreface/timeline.d.ts +0 -17
  363. package/es/intreface/timeline.js +0 -2
  364. package/es/intreface/timeline.js.map +0 -1
  365. package/es/intreface/type.d.ts +0 -13
  366. package/es/intreface/type.js +0 -14
  367. package/es/intreface/type.js.map +0 -1
  368. package/es/state/animation-state-machine.d.ts +0 -22
  369. package/es/state/animation-state-machine.js +0 -47
  370. package/es/state/animation-state-machine.js.map +0 -1
  371. package/es/state/animation-state-queue.d.ts +0 -24
  372. package/es/state/animation-state-queue.js +0 -58
  373. package/es/state/animation-state-queue.js.map +0 -1
  374. package/es/state/animation-state-registry.d.ts +0 -14
  375. package/es/state/animation-state-registry.js +0 -45
  376. package/es/state/animation-state-registry.js.map +0 -1
@@ -0,0 +1,221 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.LabelItemDisappear = exports.LabelItemAppear = void 0;
6
+
7
+ const custom_animate_1 = require("./custom-animate"), component_1 = require("../component"), input_text_1 = require("./input-text");
8
+
9
+ class LabelItemAppear extends custom_animate_1.AComponentAnimate {
10
+ onBind() {
11
+ super.onBind();
12
+ const animator = (0, component_1.createComponentAnimator)(this.target);
13
+ this._animator = animator;
14
+ const duration = this.duration, easing = this.easing, target = this.target, {symbolStartOuterType: symbolStartOuterType = "scale", titleType: titleType = "typewriter", titlePanelType: titlePanelType = "scale"} = this.params, symbolTime = duration / 10;
15
+ let symbolStartOuterFrom, symbolStartOuterTo;
16
+ if (target._symbolStart.setAttributes({
17
+ scaleX: 0,
18
+ scaleY: 0
19
+ }), animator.animate(target._symbolStart, {
20
+ type: "to",
21
+ to: {
22
+ scaleX: 1,
23
+ scaleY: 1
24
+ },
25
+ duration: 5 * symbolTime,
26
+ easing: easing
27
+ }), "scale" === symbolStartOuterType ? (symbolStartOuterFrom = {
28
+ scaleX: 0,
29
+ scaleY: 0
30
+ }, symbolStartOuterTo = {
31
+ scaleX: 1,
32
+ scaleY: 1
33
+ }) : (symbolStartOuterFrom = {
34
+ clipRange: 0
35
+ }, symbolStartOuterTo = {
36
+ clipRange: 1
37
+ }), target._symbolStartOuter.setAttributes(symbolStartOuterFrom), animator.animate(target._symbolStartOuter, {
38
+ type: "to",
39
+ to: symbolStartOuterTo,
40
+ duration: 5 * symbolTime,
41
+ easing: easing
42
+ }), target._symbolEnd.setAttributes({
43
+ scaleX: 0,
44
+ scaleY: 0
45
+ }), animator.animate(target._symbolEnd, {
46
+ type: "to",
47
+ to: {
48
+ scaleX: 1,
49
+ scaleY: 1
50
+ },
51
+ duration: 2 * symbolTime,
52
+ delay: 8 * symbolTime,
53
+ easing: easing
54
+ }), target._line.setAttributes({
55
+ clipRange: 0
56
+ }), animator.animate(target._line, {
57
+ type: "to",
58
+ to: {
59
+ clipRange: 1
60
+ },
61
+ duration: 9 * symbolTime,
62
+ easing: easing
63
+ }), "typewriter" === titleType) {
64
+ const titleTopText = target._titleTop.attribute.text;
65
+ target._titleTop.setAttributes({
66
+ text: ""
67
+ }), animator.animate(target._titleTop, {
68
+ type: "custom",
69
+ delay: 5 * symbolTime,
70
+ duration: 4 * symbolTime,
71
+ easing: "linear",
72
+ to: {
73
+ text: titleTopText
74
+ },
75
+ custom: input_text_1.InputText
76
+ });
77
+ const titleBottomText = target._titleBottom.attribute.text;
78
+ target._titleBottom.setAttributes({
79
+ text: ""
80
+ }), animator.animate(target._titleBottom, {
81
+ type: "custom",
82
+ delay: 5 * symbolTime,
83
+ duration: 4 * symbolTime,
84
+ easing: "linear",
85
+ to: {
86
+ text: titleBottomText
87
+ },
88
+ custom: input_text_1.InputText
89
+ });
90
+ } else target._titleTop.setAttributes({
91
+ dy: target._titleTop.AABBBounds.height() + 10
92
+ }), animator.animate(target._titleTop, {
93
+ type: "to",
94
+ to: {
95
+ dy: 0
96
+ },
97
+ delay: 5 * symbolTime,
98
+ duration: 4 * symbolTime,
99
+ easing: "linear"
100
+ }), target._titleBottom.setAttributes({
101
+ dy: -(10 + target._titleBottom.AABBBounds.height())
102
+ }), animator.animate(target._titleBottom, {
103
+ type: "to",
104
+ to: {
105
+ dy: 0
106
+ },
107
+ delay: 5 * symbolTime,
108
+ duration: 4 * symbolTime,
109
+ easing: "linear"
110
+ });
111
+ "scale" === titlePanelType ? [ target._titleTopPanel, target._titleBottomPanel ].forEach((panel => {
112
+ var _a;
113
+ const scaleX = null !== (_a = panel.attribute.scaleX) && void 0 !== _a ? _a : 1;
114
+ panel.setAttributes({
115
+ scaleX: 0
116
+ }), animator.animate(panel, {
117
+ type: "to",
118
+ to: {
119
+ scaleX: scaleX
120
+ },
121
+ duration: duration,
122
+ easing: easing
123
+ });
124
+ })) : "stroke" === titlePanelType && [ target._titleTopPanel, target._titleBottomPanel ].forEach((panel => {
125
+ const b = panel.AABBBounds, totalLen = 2 * (b.width() + b.height());
126
+ panel.setAttributes({
127
+ lineDash: [ 0, 10 * totalLen ]
128
+ }), animator.animate(panel, {
129
+ type: "to",
130
+ to: {
131
+ lineDash: [ totalLen, 10 * totalLen ]
132
+ },
133
+ duration: duration,
134
+ easing: easing
135
+ });
136
+ })), this.completeBind(animator);
137
+ }
138
+ }
139
+
140
+ exports.LabelItemAppear = LabelItemAppear;
141
+
142
+ class LabelItemDisappear extends custom_animate_1.AComponentAnimate {
143
+ onBind() {
144
+ super.onBind();
145
+ const animator = (0, component_1.createComponentAnimator)(this.target);
146
+ this._animator = animator;
147
+ const duration = this.duration, easing = this.easing, target = this.target, {mode: mode} = this.params;
148
+ "scale" === mode ? animator.animate(target._symbolStart, {
149
+ type: "to",
150
+ to: {
151
+ scaleX: 0,
152
+ scaleY: 0
153
+ },
154
+ duration: duration,
155
+ easing: easing
156
+ }) : (animator.animate(target._line, {
157
+ type: "to",
158
+ to: {
159
+ clipRange: 0
160
+ },
161
+ duration: duration,
162
+ easing: easing
163
+ }), animator.animate(target._symbolStart, {
164
+ type: "to",
165
+ to: {
166
+ scaleX: 0,
167
+ scaleY: 0
168
+ },
169
+ duration: duration / 2,
170
+ delay: duration / 2,
171
+ easing: easing
172
+ }), animator.animate(target._symbolEnd, {
173
+ type: "to",
174
+ to: {
175
+ scaleX: 0,
176
+ scaleY: 0
177
+ },
178
+ duration: duration,
179
+ easing: easing
180
+ }), animator.animate(target._titleTop, {
181
+ type: "to",
182
+ to: {
183
+ dy: target._titleTop.AABBBounds.height() + 10
184
+ },
185
+ duration: duration / 2,
186
+ easing: easing
187
+ }), animator.animate(target._titleBottom, {
188
+ type: "to",
189
+ to: {
190
+ dy: -(10 + target._titleBottom.AABBBounds.height())
191
+ },
192
+ duration: duration / 2,
193
+ easing: easing
194
+ }), animator.animate(target._symbolStartOuter, {
195
+ type: "to",
196
+ to: {
197
+ clipRange: 0
198
+ },
199
+ duration: duration / 2,
200
+ delay: duration / 2,
201
+ easing: easing
202
+ }), animator.animate(target._titleTopPanel, {
203
+ type: "to",
204
+ to: {
205
+ scaleX: 0
206
+ },
207
+ duration: duration,
208
+ easing: easing
209
+ }), animator.animate(target._titleBottomPanel, {
210
+ type: "to",
211
+ to: {
212
+ scaleX: 0
213
+ },
214
+ duration: duration,
215
+ easing: easing
216
+ })), this.completeBind(animator);
217
+ }
218
+ }
219
+
220
+ exports.LabelItemDisappear = LabelItemDisappear;
221
+ //# sourceMappingURL=label-item-animate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/custom/label-item-animate.ts"],"names":[],"mappings":";;;AAAA,qDAAqD;AACrD,4CAAuD;AACvD,6CAAyC;AAKzC,MAAa,eAAgB,SAAQ,kCAAsB;IACzD,MAAM;QACJ,KAAK,CAAC,MAAM,EAAE,CAAC;QACf,MAAM,QAAQ,GAAG,IAAA,mCAAuB,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAa,CAAC;QAElC,MAAM,EAAE,oBAAoB,GAAG,OAAO,EAAE,SAAS,GAAG,YAAY,EAAE,cAAc,GAAG,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;QAE3G,MAAM,UAAU,GAAG,QAAQ,GAAG,EAAE,CAAC;QACjC,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;QAE5D,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE;YACpC,IAAI,EAAE,IAAI;YACV,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;YAC5B,QAAQ,E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AAE,CAAC,EAAE;gBACpB,QAAQ,EAAE,QAAQ,GAAG,CAAC;gBACtB,KAAK,EAAE,QAAQ,GAAG,CAAC;gBACnB,MAAM;aACP,CAAC,CAAC;YAEH,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE;gBACtC,IAAI,EAAE,IAAI;gBACV,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;gBACjB,QAAQ;gBACR,MAAM;aACP,CAAC,CAAC;YAEH,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE;gBACzC,IAAI,EAAE,IAAI;gBACV,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;gBACjB,QAAQ;gBACR,MAAM;aACP,CAAC,CAAC;SACJ;QAED,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;CACF;AAjFD,gDAiFC","file":"label-item-animate.js","sourcesContent":["import { AComponentAnimate } from './custom-animate';\nimport { createComponentAnimator } from '../component';\nimport { InputText } from './input-text';\n\n/**\n * LabelItemAppear class handles the appear animation for StoryLabelItem components\n */\nexport class LabelItemAppear extends AComponentAnimate<any> {\n onBind(): void {\n super.onBind();\n const animator = createComponentAnimator(this.target);\n this._animator = animator;\n const duration = this.duration;\n const easing = this.easing;\n const target = this.target as any;\n\n const { symbolStartOuterType = 'scale', titleType = 'typewriter', titlePanelType = 'scale' } = this.params;\n\n const symbolTime = duration / 10;\n target._symbolStart.setAttributes({ scaleX: 0, scaleY: 0 });\n\n animator.animate(target._symbolStart, {\n type: 'to',\n to: { scaleX: 1, scaleY: 1 },\n duration: symbolTime * 5,\n easing\n });\n\n let symbolStartOuterFrom: any;\n let symbolStartOuterTo: any;\n if (symbolStartOuterType === 'scale') {\n symbolStartOuterFrom = { scaleX: 0, scaleY: 0 };\n symbolStartOuterTo = { scaleX: 1, scaleY: 1 };\n } else {\n symbolStartOuterFrom = { clipRange: 0 };\n symbolStartOuterTo = { clipRange: 1 };\n }\n target._symbolStartOuter.setAttributes(symbolStartOuterFrom);\n\n animator.animate(target._symbolStartOuter, {\n type: 'to',\n to: symbolStartOuterTo,\n duration: symbolTime * 5,\n easing\n });\n\n target._symbolEnd.setAttributes({ scaleX: 0, scaleY: 0 });\n\n animator.animate(target._symbolEnd, {\n type: 'to',\n to: { scaleX: 1, scaleY: 1 },\n duration: symbolTime * 2,\n delay: symbolTime * 8,\n easing\n });\n\n target._line.setAttributes({ clipRange: 0 });\n\n animator.animate(target._line, {\n type: 'to',\n to: { clipRange: 1 },\n duration: symbolTime * 9,\n easing\n });\n\n if (titleType === 'typewriter') {\n const titleTopText = target._titleTop.attribute.text as string;\n target._titleTop.setAttributes({ text: '' });\n\n animator.animate(target._titleTop, {\n type: 'custom',\n delay: symbolTime * 5,\n duration: symbolTime * 4,\n easing: 'linear',\n to: { text: titleTopText },\n custom: InputText\n });\n\n const titleBottomText = target._titleBottom.attribute.text as string;\n target._titleBottom.setAttributes({ text: '' });\n\n animator.animate(target._titleBottom, {\n type: 'custom',\n delay: symbolTime * 5,\n duration: symbolTime * 4,\n easing: 'linear',\n to: { text: titleBottomText },\n custom: InputText\n });\n } else {\n target._titleTop.setAttributes({ dy: target._titleTop.AABBBounds.height() + 10 });\n\n animator.animate(target._titleTop, {\n type: 'to',\n to: {\n dy: 0\n },\n delay: symbolTime * 5,\n duration: symbolTime * 4,\n easing: 'linear'\n });\n\n target._titleBottom.setAttributes({ dy: -(10 + target._titleBottom.AABBBounds.height()) });\n\n animator.animate(target._titleBottom, {\n type: 'to',\n to: {\n dy: 0\n },\n delay: symbolTime * 5,\n duration: symbolTime * 4,\n easing: 'linear'\n });\n }\n\n if (titlePanelType === 'scale') {\n [target._titleTopPanel, target._titleBottomPanel].forEach(panel => {\n const scaleX = panel.attribute.scaleX ?? 1;\n panel.setAttributes({ scaleX: 0 });\n animator.animate(panel, {\n type: 'to',\n to: {\n scaleX\n },\n duration,\n easing\n });\n });\n } else if (titlePanelType === 'stroke') {\n [target._titleTopPanel, target._titleBottomPanel].forEach(panel => {\n const b = panel.AABBBounds;\n const totalLen = (b.width() + b.height()) * 2;\n panel.setAttributes({ lineDash: [0, totalLen * 10] });\n animator.animate(panel, {\n type: 'to',\n to: {\n lineDash: [totalLen, totalLen * 10]\n },\n duration,\n easing\n });\n });\n }\n\n this.completeBind(animator);\n }\n}\n\n/**\n * LabelItemDisappear class handles the disappear animation for StoryLabelItem components\n */\nexport class LabelItemDisappear extends AComponentAnimate<any> {\n onBind(): void {\n super.onBind();\n const animator = createComponentAnimator(this.target);\n this._animator = animator;\n\n const duration = this.duration;\n const easing = this.easing;\n const target = this.target as any;\n\n const { mode } = this.params;\n\n if (mode === 'scale') {\n animator.animate(target._symbolStart, {\n type: 'to',\n to: { scaleX: 0, scaleY: 0 },\n duration,\n easing\n });\n } else {\n animator.animate(target._line, {\n type: 'to',\n to: { clipRange: 0 },\n duration,\n easing\n });\n\n animator.animate(target._symbolStart, {\n type: 'to',\n to: { scaleX: 0, scaleY: 0 },\n duration: duration / 2,\n delay: duration / 2,\n easing\n });\n\n animator.animate(target._symbolEnd, {\n type: 'to',\n to: { scaleX: 0, scaleY: 0 },\n duration,\n easing\n });\n\n animator.animate(target._titleTop, {\n type: 'to',\n to: { dy: target._titleTop.AABBBounds.height() + 10 },\n duration: duration / 2,\n easing\n });\n\n animator.animate(target._titleBottom, {\n type: 'to',\n to: { dy: -(10 + target._titleBottom.AABBBounds.height()) },\n duration: duration / 2,\n easing\n });\n\n animator.animate(target._symbolStartOuter, {\n type: 'to',\n to: { clipRange: 0 },\n duration: duration / 2,\n delay: duration / 2,\n easing\n });\n\n animator.animate(target._titleTopPanel, {\n type: 'to',\n to: { scaleX: 0 },\n duration,\n easing\n });\n\n animator.animate(target._titleBottomPanel, {\n type: 'to',\n to: { scaleX: 0 },\n duration,\n easing\n });\n }\n\n this.completeBind(animator);\n }\n}\n"]}
@@ -0,0 +1,51 @@
1
+ import { CustomPath2D, type MorphingAnimateConfig, type MultiMorphingAnimateConfig, type IGraphic, type EasingType, type IGraphicAttribute } from '@visactor/vrender-core';
2
+ import { type IMatrix } from '@visactor/vutils';
3
+ import { ACustomAnimate } from './custom-animate';
4
+ interface MorphingDataItem {
5
+ from: number[];
6
+ to: number[];
7
+ fromCp: number[];
8
+ toCp: number[];
9
+ rotation: number;
10
+ }
11
+ interface OtherAttrItem {
12
+ from: any;
13
+ to: any;
14
+ key: string;
15
+ }
16
+ export declare class MorphingPath extends ACustomAnimate<Record<string, any>> {
17
+ path: CustomPath2D;
18
+ saveOnEnd?: boolean;
19
+ otherAttrs?: OtherAttrItem[];
20
+ constructor(config: {
21
+ morphingData: MorphingDataItem[];
22
+ otherAttrs?: OtherAttrItem[];
23
+ saveOnEnd?: boolean;
24
+ }, duration: number, easing: EasingType);
25
+ private morphingData?;
26
+ getEndProps(): Record<string, any>;
27
+ onBind(): void;
28
+ onEnd(): void;
29
+ onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
30
+ }
31
+ export declare const morphPath: (fromGraphic: IGraphic | null, toGraphic: IGraphic, animationConfig?: MorphingAnimateConfig, fromGraphicTransform?: IMatrix) => import("@visactor/vrender-core").IAnimate;
32
+ export declare const oneToMultiMorph: (fromGraphic: IGraphic, toGraphics: IGraphic[], animationConfig?: MultiMorphingAnimateConfig) => void;
33
+ export declare class MultiToOneMorphingPath extends ACustomAnimate<Record<string, any>> {
34
+ path: CustomPath2D;
35
+ otherAttrs?: OtherAttrItem[][];
36
+ constructor(config: {
37
+ morphingData: MorphingDataItem[][];
38
+ otherAttrs?: OtherAttrItem[][];
39
+ }, duration: number, easing: EasingType);
40
+ private morphingData?;
41
+ getEndProps(): Record<string, any>;
42
+ onBind(): void;
43
+ private addPathProxy;
44
+ private clearPathProxy;
45
+ onEnd(): void;
46
+ onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
47
+ }
48
+ export declare const cloneGraphic: (graphic: IGraphic, count: number, needAppend?: boolean) => IGraphic<Partial<IGraphicAttribute>>[];
49
+ export declare const splitGraphic: (graphic: IGraphic, count: number, needAppend?: boolean) => IGraphic<Partial<IGraphicAttribute>>[];
50
+ export declare const multiToOneMorph: (fromGraphics: IGraphic[], toGraphic: IGraphic, animationConfig?: MultiMorphingAnimateConfig) => void;
51
+ export {};
@@ -0,0 +1,298 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.multiToOneMorph = exports.splitGraphic = exports.cloneGraphic = exports.MultiToOneMorphingPath = exports.oneToMultiMorph = exports.morphPath = exports.MorphingPath = void 0;
6
+
7
+ const vrender_core_1 = require("@visactor/vrender-core"), vutils_1 = require("@visactor/vutils"), custom_animate_1 = require("./custom-animate"), morphing_1 = require("../config/morphing"), transform_1 = require("../utils/transform"), interpolateOtherAttrs = (attrs, out, ratio) => {
8
+ attrs.forEach((entry => {
9
+ if (Number.isFinite(entry.to)) out[entry.key] = entry.from + (entry.to - entry.from) * ratio; else if ("fill" === entry.key || "stroke" === entry.key) {
10
+ const color = (0, vrender_core_1.interpolateColor)(entry.from, entry.to, ratio, !1);
11
+ color && (out[entry.key] = color);
12
+ }
13
+ }));
14
+ }, interpolateMorphingData = (morphingData, path, ratio) => {
15
+ const tmpArr = [], newCp = [];
16
+ path.clear();
17
+ for (let i = 0; i < morphingData.length; i++) {
18
+ const item = morphingData[i], from = item.from, to = item.to, angle = item.rotation * ratio, fromCp = item.fromCp, toCp = item.toCp, sa = Math.sin(angle), ca = Math.cos(angle);
19
+ newCp[0] = fromCp[0] + (toCp[0] - fromCp[0]) * ratio, newCp[1] = fromCp[1] + (toCp[1] - fromCp[1]) * ratio;
20
+ for (let m = 0; m < from.length; m += 2) {
21
+ const x0 = from[m], y0 = from[m + 1], x = x0 * (1 - ratio) + to[m] * ratio, y = y0 * (1 - ratio) + to[m + 1] * ratio;
22
+ tmpArr[m] = x * ca - y * sa + newCp[0], tmpArr[m + 1] = x * sa + y * ca + newCp[1];
23
+ }
24
+ let x0 = tmpArr[0], y0 = tmpArr[1];
25
+ path.moveTo(x0, y0);
26
+ for (let m = 2; m < from.length; m += 6) {
27
+ const x1 = tmpArr[m], y1 = tmpArr[m + 1], x2 = tmpArr[m + 2], y2 = tmpArr[m + 3], x3 = tmpArr[m + 4], y3 = tmpArr[m + 5];
28
+ x0 === x1 && y0 === y1 && x2 === x3 && y2 === y3 ? path.lineTo(x3, y3) : path.bezierCurveTo(x1, y1, x2, y2, x3, y3),
29
+ x0 = x3, y0 = y3;
30
+ }
31
+ }
32
+ }, parseMorphingData = (fromPath, toPath, config) => {
33
+ const fromBezier = fromPath ? (0, vrender_core_1.pathToBezierCurves)(fromPath) : [], toBezier = (0,
34
+ vrender_core_1.pathToBezierCurves)(toPath);
35
+ config && fromBezier && (config.fromTransform && (0, vrender_core_1.applyTransformOnBezierCurves)(fromBezier, config.fromTransform.clone().getInverse()),
36
+ (0, vrender_core_1.applyTransformOnBezierCurves)(fromBezier, config.toTransfrom));
37
+ const [fromBezierCurves, toBezierCurves] = (0, vrender_core_1.alignBezierCurves)(fromBezier, toBezier);
38
+ return fromPath ? (0, vrender_core_1.findBestMorphingRotation)(fromBezierCurves, toBezierCurves, 10, Math.PI) : toBezierCurves.map(((to, index) => ({
39
+ from: fromBezierCurves[index],
40
+ to: to,
41
+ fromCp: [ 0, 0 ],
42
+ toCp: [ 0, 0 ],
43
+ rotation: 0
44
+ })));
45
+ }, validateOtherAttrs = [ "fill", "fillOpacity", "shadowBlur", "shadowColor", "shadowOffsetX", "shadowOffsetY", "stroke", "strokeOpacity", "lineDashOffset" ], parseOtherAnimateAttrs = (fromAttrs, toAttrs) => {
46
+ if (!fromAttrs || !toAttrs) return null;
47
+ const res = [];
48
+ let hasAttr = !1;
49
+ return Object.keys(fromAttrs).forEach((fromKey => {
50
+ if (!validateOtherAttrs.includes(fromKey)) return;
51
+ const toValue = toAttrs[fromKey];
52
+ if (!(0, vutils_1.isNil)(toValue) && !(0, vutils_1.isNil)(fromAttrs[fromKey]) && toValue !== fromAttrs[fromKey]) {
53
+ if ("fill" === fromKey || "stroke" === fromKey) {
54
+ const parseColor = color => "string" == typeof color ? vrender_core_1.ColorStore.Get(color, vrender_core_1.ColorType.Color255) : color;
55
+ res.push({
56
+ from: (0, vutils_1.isArray)(fromAttrs[fromKey]) ? fromAttrs[fromKey].map(parseColor) : parseColor(fromAttrs[fromKey]),
57
+ to: (0, vutils_1.isArray)(toValue) ? toValue.map(parseColor) : parseColor(toValue),
58
+ key: fromKey
59
+ });
60
+ } else res.push({
61
+ from: fromAttrs[fromKey],
62
+ to: toValue,
63
+ key: fromKey
64
+ });
65
+ hasAttr = !0;
66
+ }
67
+ })), hasAttr ? res : null;
68
+ };
69
+
70
+ class MorphingPath extends custom_animate_1.ACustomAnimate {
71
+ constructor(config, duration, easing) {
72
+ super({}, {}, duration, easing), this.morphingData = config.morphingData, this.otherAttrs = config.otherAttrs,
73
+ this.saveOnEnd = config.saveOnEnd;
74
+ }
75
+ getEndProps() {
76
+ return {};
77
+ }
78
+ onBind() {
79
+ this.target.createPathProxy(), this.onUpdate(!1, 0, this.target.attribute);
80
+ }
81
+ onEnd() {}
82
+ onUpdate(end, ratio, out) {
83
+ const target = this.target, pathProxy = "function" == typeof target.pathProxy ? target.pathProxy(target.attribute) : target.pathProxy;
84
+ interpolateMorphingData(this.morphingData, pathProxy, ratio), this.otherAttrs && this.otherAttrs.length && interpolateOtherAttrs(this.otherAttrs, out, ratio),
85
+ this.target.setAttributes(out), end && !this.saveOnEnd && (this.target.pathProxy = null);
86
+ }
87
+ }
88
+
89
+ exports.MorphingPath = MorphingPath;
90
+
91
+ const morphPath = (fromGraphic, toGraphic, animationConfig, fromGraphicTransform) => {
92
+ var _a, _b, _c;
93
+ if (fromGraphic && (!fromGraphic.valid || !fromGraphic.toCustomPath)) return __DEV__ && console.error(fromGraphic, " is not validate"),
94
+ null;
95
+ if (!toGraphic.valid || !toGraphic.toCustomPath) return __DEV__ && console.error(toGraphic, " is not validate"),
96
+ null;
97
+ let fromTransform = null == fromGraphic ? void 0 : fromGraphic.globalTransMatrix;
98
+ fromGraphicTransform && fromTransform && (fromTransform = fromGraphicTransform.clone().multiply(fromTransform.a, fromTransform.b, fromTransform.c, fromTransform.d, fromTransform.e, fromTransform.f));
99
+ const morphingData = parseMorphingData(null === (_a = null == fromGraphic ? void 0 : fromGraphic.toCustomPath) || void 0 === _a ? void 0 : _a.call(fromGraphic), toGraphic.toCustomPath(), {
100
+ fromTransform: fromTransform,
101
+ toTransfrom: toGraphic.globalTransMatrix
102
+ }), attrs = parseOtherAnimateAttrs(null == fromGraphic ? void 0 : fromGraphic.attribute, toGraphic.attribute), animate = toGraphic.animate(animationConfig);
103
+ (null == animationConfig ? void 0 : animationConfig.delay) && animate.wait(animationConfig.delay);
104
+ const morphingPath = new MorphingPath({
105
+ morphingData: morphingData,
106
+ otherAttrs: attrs
107
+ }, null !== (_b = null == animationConfig ? void 0 : animationConfig.duration) && void 0 !== _b ? _b : morphing_1.DefaultMorphingAnimateConfig.duration, null !== (_c = null == animationConfig ? void 0 : animationConfig.easing) && void 0 !== _c ? _c : morphing_1.DefaultMorphingAnimateConfig.easing);
108
+ return animate.play(morphingPath), animate;
109
+ };
110
+
111
+ exports.morphPath = morphPath;
112
+
113
+ const oneToMultiMorph = (fromGraphic, toGraphics, animationConfig) => {
114
+ var _a;
115
+ const validateToGraphics = toGraphics.filter((graphic => graphic && graphic.toCustomPath && graphic.valid));
116
+ validateToGraphics.length || __DEV__ && console.error(validateToGraphics, " is not validate"),
117
+ fromGraphic.valid && fromGraphic.toCustomPath || __DEV__ && console.error(fromGraphic, " is not validate");
118
+ const childGraphics = ("clone" === (null == animationConfig ? void 0 : animationConfig.splitPath) ? exports.cloneGraphic : null !== (_a = null == animationConfig ? void 0 : animationConfig.splitPath) && void 0 !== _a ? _a : exports.splitGraphic)(fromGraphic, validateToGraphics.length, !1), oldOnEnd = null == animationConfig ? void 0 : animationConfig.onEnd;
119
+ let count = validateToGraphics.length;
120
+ const onEachEnd = () => {
121
+ count--, 0 === count && oldOnEnd && oldOnEnd();
122
+ };
123
+ validateToGraphics.forEach(((toChild, index) => {
124
+ var _a;
125
+ const fromChild = childGraphics[index], delay = (null !== (_a = null == animationConfig ? void 0 : animationConfig.delay) && void 0 !== _a ? _a : 0) + ((null == animationConfig ? void 0 : animationConfig.individualDelay) ? animationConfig.individualDelay(index, validateToGraphics.length, fromChild, toChild) : 0);
126
+ (0, exports.morphPath)(fromChild, toChild, Object.assign({}, animationConfig, {
127
+ onEnd: onEachEnd,
128
+ delay: delay
129
+ }), fromGraphic.globalTransMatrix);
130
+ }));
131
+ };
132
+
133
+ exports.oneToMultiMorph = oneToMultiMorph;
134
+
135
+ class MultiToOneMorphingPath extends custom_animate_1.ACustomAnimate {
136
+ constructor(config, duration, easing) {
137
+ super({}, {}, duration, easing), this.morphingData = config.morphingData, this.otherAttrs = config.otherAttrs;
138
+ }
139
+ getEndProps() {
140
+ return {};
141
+ }
142
+ onBind() {
143
+ this.addPathProxy();
144
+ }
145
+ addPathProxy() {
146
+ this.target.shadowRoot.forEachChildren((child => {
147
+ child.createPathProxy();
148
+ })), this.onUpdate(!1, 0, this.target.attribute);
149
+ }
150
+ clearPathProxy() {
151
+ this.target.shadowRoot.forEachChildren((child => {
152
+ child.pathProxy = null;
153
+ }));
154
+ }
155
+ onEnd() {}
156
+ onUpdate(end, ratio, out) {
157
+ this.target.shadowRoot.forEachChildren(((child, index) => {
158
+ var _a;
159
+ interpolateMorphingData(this.morphingData[index], "function" == typeof child.pathProxy ? child.pathProxy(child.attribute) : child.pathProxy, ratio),
160
+ (null === (_a = this.otherAttrs) || void 0 === _a ? void 0 : _a[index]) && this.otherAttrs[index].length && interpolateOtherAttrs(this.otherAttrs[index], child.attribute, ratio);
161
+ })), end && (this.clearPathProxy(), this.morphingData = null);
162
+ }
163
+ }
164
+
165
+ exports.MultiToOneMorphingPath = MultiToOneMorphingPath;
166
+
167
+ const parseShadowChildAttrs = graphicAttrs => {
168
+ const attrs = {};
169
+ return Object.keys(graphicAttrs).forEach((key => {
170
+ (0, transform_1.isTransformKey)(key) || (attrs[key] = graphicAttrs[key]);
171
+ })), attrs;
172
+ }, appendShadowChildrenToGraphic = (graphic, children, count) => {
173
+ const childAttrs = parseShadowChildAttrs(graphic.attribute), shadowRoot = graphic.attachShadow();
174
+ if (children.length) shadowRoot.setTheme({
175
+ [children[0].type]: childAttrs
176
+ }), children.forEach((element => {
177
+ element.setAttributes({
178
+ pickable: !1
179
+ }), shadowRoot.appendChild(element);
180
+ })); else {
181
+ const box = graphic.AABBBounds, width = box.width(), height = box.height();
182
+ shadowRoot.setTheme({
183
+ rect: childAttrs
184
+ }), new Array(count).fill(0).forEach((el => {
185
+ const child = vrender_core_1.application.graphicService.creator.rect({
186
+ x: 0,
187
+ y: 0,
188
+ width: width,
189
+ height: height,
190
+ pickable: !1
191
+ });
192
+ shadowRoot.appendChild(child), children.push(child);
193
+ }));
194
+ }
195
+ }, cloneGraphic = (graphic, count, needAppend) => {
196
+ const children = [], childAttrs = needAppend ? null : parseShadowChildAttrs(graphic.attribute), path = graphic.toCustomPath();
197
+ for (let i = 0; i < count; i++) {
198
+ const element = {
199
+ path: (new vrender_core_1.CustomPath2D).fromCustomPath2D(path)
200
+ };
201
+ children.push(vrender_core_1.application.graphicService.creator.path(needAppend ? element : Object.assign({}, childAttrs, element)));
202
+ }
203
+ return needAppend && appendShadowChildrenToGraphic(graphic, children, count), children;
204
+ };
205
+
206
+ exports.cloneGraphic = cloneGraphic;
207
+
208
+ const splitGraphic = (graphic, count, needAppend) => {
209
+ const children = [], childAttrs = needAppend ? null : parseShadowChildAttrs(graphic.attribute);
210
+ if ("rect" === graphic.type) {
211
+ (0, vrender_core_1.splitRect)(graphic, count).forEach((element => {
212
+ children.push(vrender_core_1.application.graphicService.creator.rect(needAppend ? element : Object.assign({}, childAttrs, element)));
213
+ }));
214
+ } else if ("arc" === graphic.type) {
215
+ (0, vrender_core_1.splitArc)(graphic, count).forEach((element => {
216
+ children.push(vrender_core_1.application.graphicService.creator.arc(needAppend ? element : Object.assign({}, childAttrs, element)));
217
+ }));
218
+ } else if ("circle" === graphic.type) {
219
+ (0, vrender_core_1.splitCircle)(graphic, count).forEach((element => {
220
+ children.push(vrender_core_1.application.graphicService.creator.arc(needAppend ? element : Object.assign({}, childAttrs, element)));
221
+ }));
222
+ } else if ("line" === graphic.type) {
223
+ const childrenAttrs = (0, vrender_core_1.splitLine)(graphic, count), defaultSymbol = {
224
+ size: 10,
225
+ symbolType: "circle"
226
+ };
227
+ childrenAttrs.forEach((element => {
228
+ children.push(vrender_core_1.application.graphicService.creator.symbol(needAppend ? Object.assign({}, element, defaultSymbol) : Object.assign({}, childAttrs, element, defaultSymbol)));
229
+ }));
230
+ } else if ("polygon" === graphic.type) {
231
+ (0, vrender_core_1.splitPolygon)(graphic, count).forEach((element => {
232
+ children.push(vrender_core_1.application.graphicService.creator.polygon(needAppend ? element : Object.assign({}, childAttrs, element)));
233
+ }));
234
+ } else if ("area" === graphic.type) {
235
+ (0, vrender_core_1.splitArea)(graphic, count).forEach((element => {
236
+ children.push(vrender_core_1.application.graphicService.creator.polygon(needAppend ? element : Object.assign({}, childAttrs, element)));
237
+ }));
238
+ } else if ("path" === graphic.type) {
239
+ (0, vrender_core_1.splitPath)(graphic, count).forEach((element => {
240
+ "path" in element ? children.push(vrender_core_1.application.graphicService.creator.path(needAppend ? element : Object.assign({}, childAttrs, element))) : children.push(vrender_core_1.application.graphicService.creator.polygon(needAppend ? element : Object.assign({}, childAttrs, element)));
241
+ }));
242
+ }
243
+ return needAppend && appendShadowChildrenToGraphic(graphic, children, count), children;
244
+ };
245
+
246
+ exports.splitGraphic = splitGraphic;
247
+
248
+ const multiToOneMorph = (fromGraphics, toGraphic, animationConfig) => {
249
+ var _a, _b, _c;
250
+ const validateFromGraphics = fromGraphics.filter((graphic => graphic.toCustomPath && graphic.valid));
251
+ validateFromGraphics.length || __DEV__ && console.error(fromGraphics, " is not validate"),
252
+ toGraphic.valid && toGraphic.toCustomPath || __DEV__ && console.error(toGraphic, " is not validate");
253
+ const childGraphics = ("clone" === (null == animationConfig ? void 0 : animationConfig.splitPath) ? exports.cloneGraphic : null !== (_a = null == animationConfig ? void 0 : animationConfig.splitPath) && void 0 !== _a ? _a : exports.splitGraphic)(toGraphic, validateFromGraphics.length, !0), toAttrs = toGraphic.attribute;
254
+ toGraphic.setAttribute("visible", !1);
255
+ const morphingData = validateFromGraphics.map(((graphic, index) => parseMorphingData(graphic.toCustomPath(), childGraphics[index].toCustomPath(), {
256
+ fromTransform: graphic.globalTransMatrix,
257
+ toTransfrom: childGraphics[index].globalTransMatrix
258
+ }))), otherAttrs = validateFromGraphics.map(((graphic, index) => parseOtherAnimateAttrs(graphic.attribute, toAttrs)));
259
+ if (null == animationConfig ? void 0 : animationConfig.individualDelay) {
260
+ const oldOnEnd = animationConfig.onEnd;
261
+ let count = validateFromGraphics.length;
262
+ const onEachEnd = () => {
263
+ count--, 0 === count && (toGraphic.setAttributes({
264
+ visible: !0,
265
+ ratio: null
266
+ }, !1, {
267
+ type: vrender_core_1.AttributeUpdateType.ANIMATE_END
268
+ }), toGraphic.detachShadow(), oldOnEnd && oldOnEnd());
269
+ };
270
+ childGraphics.forEach(((to, index) => {
271
+ var _a, _b, _c;
272
+ const delay = (null !== (_a = animationConfig.delay) && void 0 !== _a ? _a : 0) + animationConfig.individualDelay(index, validateFromGraphics.length, fromGraphics[index], to), animate = to.animate(Object.assign({}, animationConfig, {
273
+ onEnd: onEachEnd
274
+ }));
275
+ animate.wait(delay), animate.play(new MorphingPath({
276
+ morphingData: morphingData[index],
277
+ saveOnEnd: !0,
278
+ otherAttrs: otherAttrs[index]
279
+ }, null !== (_b = animationConfig.duration) && void 0 !== _b ? _b : morphing_1.DefaultMorphingAnimateConfig.duration, null !== (_c = animationConfig.easing) && void 0 !== _c ? _c : morphing_1.DefaultMorphingAnimateConfig.easing));
280
+ }));
281
+ } else {
282
+ const oldOnEnd = null == animationConfig ? void 0 : animationConfig.onEnd, config = animationConfig ? Object.assign({}, animationConfig) : {};
283
+ config.onEnd = () => {
284
+ toGraphic.setAttribute("visible", !0, !1, {
285
+ type: vrender_core_1.AttributeUpdateType.ANIMATE_END
286
+ }), toGraphic.detachShadow(), oldOnEnd && oldOnEnd();
287
+ };
288
+ const animate = toGraphic.animate(config);
289
+ (null == animationConfig ? void 0 : animationConfig.delay) && animate.wait(animationConfig.delay),
290
+ animate.play(new MultiToOneMorphingPath({
291
+ morphingData: morphingData,
292
+ otherAttrs: otherAttrs
293
+ }, null !== (_b = null == animationConfig ? void 0 : animationConfig.duration) && void 0 !== _b ? _b : morphing_1.DefaultMorphingAnimateConfig.duration, null !== (_c = null == animationConfig ? void 0 : animationConfig.easing) && void 0 !== _c ? _c : morphing_1.DefaultMorphingAnimateConfig.easing));
294
+ }
295
+ };
296
+
297
+ exports.multiToOneMorph = multiToOneMorph;
298
+ //# sourceMappingURL=morphing.js.map