@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,468 @@
1
+ import { FadeIn } from "./fade";
2
+
3
+ import { ACustomAnimate } from "./custom-animate";
4
+
5
+ import { AnimateExecutor } from "../executor/animate-executor";
6
+
7
+ import { interpolateColor } from "@visactor/vrender-core";
8
+
9
+ export class StoryFadeIn extends FadeIn {}
10
+
11
+ export class SlideIn extends ACustomAnimate {
12
+ constructor(from, to, duration, easing, params) {
13
+ super(from, to, duration, easing, params);
14
+ }
15
+ onBind() {
16
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
17
+ super.onBind();
18
+ const attrs = this.target.getFinalAttribute(), direction = (null === (_a = this.params) || void 0 === _a ? void 0 : _a.direction) || "right", distance = (null === (_b = this.params) || void 0 === _b ? void 0 : _b.distance) || 50, fromOpacity = null !== (_d = null === (_c = this.params) || void 0 === _c ? void 0 : _c.fromOpacity) && void 0 !== _d ? _d : 0, from = {
19
+ opacity: fromOpacity,
20
+ baseOpacity: fromOpacity
21
+ }, to = {
22
+ opacity: 1,
23
+ baseOpacity: 1
24
+ };
25
+ "top" === direction ? (from.y = (null !== (_e = attrs.y) && void 0 !== _e ? _e : 0) - distance,
26
+ to.y = null !== (_f = attrs.y) && void 0 !== _f ? _f : 0, this.propKeys = [ "opacity", "baseOpacity", "y" ]) : "bottom" === direction ? (from.y = (null !== (_g = attrs.y) && void 0 !== _g ? _g : 0) + distance,
27
+ to.y = null !== (_h = attrs.y) && void 0 !== _h ? _h : 0, this.propKeys = [ "opacity", "baseOpacity", "y" ]) : "left" === direction ? (from.x = (null !== (_j = attrs.x) && void 0 !== _j ? _j : 0) - distance,
28
+ to.x = null !== (_k = attrs.x) && void 0 !== _k ? _k : 0, this.propKeys = [ "opacity", "baseOpacity", "x" ]) : (from.x = (null !== (_l = attrs.x) && void 0 !== _l ? _l : 0) + distance,
29
+ to.x = null !== (_m = attrs.x) && void 0 !== _m ? _m : 0, this.propKeys = [ "opacity", "baseOpacity", "x" ]),
30
+ this.from = from, this.to = to, this.props = to, this.target.setAttributes(from);
31
+ }
32
+ onUpdate(end, ratio, out) {
33
+ const attribute = this.target.attribute;
34
+ this.propKeys.forEach((key => {
35
+ attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
36
+ })), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
37
+ }
38
+ }
39
+
40
+ export class GrowIn extends ACustomAnimate {
41
+ constructor(from, to, duration, easing, params) {
42
+ super(from, to, duration, easing, params);
43
+ }
44
+ onBind() {
45
+ var _a, _b, _c, _d, _e, _f, _g;
46
+ super.onBind();
47
+ const attrs = this.target.getFinalAttribute(), fromScale = null !== (_b = null === (_a = this.params) || void 0 === _a ? void 0 : _a.fromScale) && void 0 !== _b ? _b : 0, direction = (null === (_c = this.params) || void 0 === _c ? void 0 : _c.direction) || "xy", fromOpacity = null !== (_e = null === (_d = this.params) || void 0 === _d ? void 0 : _d.fromOpacity) && void 0 !== _e ? _e : 0, from = {
48
+ opacity: fromOpacity,
49
+ baseOpacity: fromOpacity
50
+ }, to = {
51
+ opacity: 1,
52
+ baseOpacity: 1
53
+ };
54
+ this.propKeys = [ "opacity", "baseOpacity" ], "x" !== direction && "xy" !== direction || (from.scaleX = fromScale,
55
+ to.scaleX = null !== (_f = attrs.scaleX) && void 0 !== _f ? _f : 1, this.propKeys.push("scaleX")),
56
+ "y" !== direction && "xy" !== direction || (from.scaleY = fromScale, to.scaleY = null !== (_g = attrs.scaleY) && void 0 !== _g ? _g : 1,
57
+ this.propKeys.push("scaleY")), this.from = from, this.to = to, this.props = to,
58
+ this.target.setAttributes(from);
59
+ }
60
+ onUpdate(end, ratio, out) {
61
+ const attribute = this.target.attribute;
62
+ this.propKeys.forEach((key => {
63
+ attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
64
+ })), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
65
+ }
66
+ }
67
+
68
+ export class SpinIn extends ACustomAnimate {
69
+ constructor(from, to, duration, easing, params) {
70
+ super(from, to, duration, easing, params);
71
+ }
72
+ onBind() {
73
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
74
+ super.onBind();
75
+ const attrs = this.target.getFinalAttribute(), fromAngle = null !== (_b = null === (_a = this.params) || void 0 === _a ? void 0 : _a.fromAngle) && void 0 !== _b ? _b : 2 * Math.PI, fromScale = null !== (_d = null === (_c = this.params) || void 0 === _c ? void 0 : _c.fromScale) && void 0 !== _d ? _d : 0, fromOpacity = null !== (_f = null === (_e = this.params) || void 0 === _e ? void 0 : _e.fromOpacity) && void 0 !== _f ? _f : 0, from = {
76
+ opacity: fromOpacity,
77
+ baseOpacity: fromOpacity,
78
+ angle: fromAngle,
79
+ scaleX: fromScale,
80
+ scaleY: fromScale
81
+ }, to = {
82
+ opacity: 1,
83
+ baseOpacity: 1,
84
+ angle: null !== (_g = attrs.angle) && void 0 !== _g ? _g : 0,
85
+ scaleX: null !== (_h = attrs.scaleX) && void 0 !== _h ? _h : 1,
86
+ scaleY: null !== (_j = attrs.scaleY) && void 0 !== _j ? _j : 1
87
+ };
88
+ this.propKeys = [ "opacity", "baseOpacity", "angle", "scaleX", "scaleY" ], this.from = from,
89
+ this.to = to, this.props = to, this.target.setAttributes(from);
90
+ }
91
+ onUpdate(end, ratio, out) {
92
+ const attribute = this.target.attribute;
93
+ this.propKeys.forEach((key => {
94
+ attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
95
+ })), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
96
+ }
97
+ }
98
+
99
+ export class StrokeIn extends ACustomAnimate {
100
+ constructor(from, to, duration, easing, params) {
101
+ super(from, to, duration, easing, params), this.perimeter = 0, this.originalAttributes = {};
102
+ }
103
+ onBind() {
104
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
105
+ if (super.onBind(), this.originalAttributes = Object.assign({}, this.target.getAttributes()),
106
+ "rect" === this.target.type) {
107
+ const attr = this.target.attribute, width = null !== (_a = attr.width) && void 0 !== _a ? _a : 100, height = null !== (_b = attr.height) && void 0 !== _b ? _b : 100;
108
+ this.perimeter = 2 * (width + height);
109
+ } else if ("circle" === this.target.type) {
110
+ const radius = null !== (_c = this.target.attribute.radius) && void 0 !== _c ? _c : 50;
111
+ this.perimeter = 2 * Math.PI * radius;
112
+ } else if ("ellipse" === this.target.type) {
113
+ const attr = this.target.attribute, radiusX = null !== (_d = attr.radiusX) && void 0 !== _d ? _d : 50, radiusY = null !== (_e = attr.radiusY) && void 0 !== _e ? _e : 50;
114
+ this.perimeter = 2 * Math.PI * Math.sqrt((radiusX * radiusX + radiusY * radiusY) / 2);
115
+ } else this.perimeter = 1e3;
116
+ const lineWidth = null !== (_g = null === (_f = this.params) || void 0 === _f ? void 0 : _f.lineWidth) && void 0 !== _g ? _g : 2, strokeColor = null !== (_j = null === (_h = this.params) || void 0 === _h ? void 0 : _h.strokeColor) && void 0 !== _j ? _j : "black", fromOpacity = null !== (_l = null === (_k = this.params) || void 0 === _k ? void 0 : _k.fromOpacity) && void 0 !== _l ? _l : 1, dashLength = null !== (_o = null === (_m = this.params) || void 0 === _m ? void 0 : _m.dashLength) && void 0 !== _o ? _o : this.perimeter, showFill = null !== (_q = null === (_p = this.params) || void 0 === _p ? void 0 : _p.showFill) && void 0 !== _q && _q, fillOpacity = null !== (_s = null === (_r = this.params) || void 0 === _r ? void 0 : _r.fillOpacity) && void 0 !== _s ? _s : 0;
117
+ this.from = {
118
+ lineDash: [ dashLength, dashLength ],
119
+ lineDashOffset: dashLength,
120
+ lineWidth: lineWidth,
121
+ stroke: strokeColor,
122
+ strokeOpacity: fromOpacity
123
+ }, this.to = {
124
+ lineDash: [ dashLength, dashLength ],
125
+ lineDashOffset: 0,
126
+ lineWidth: lineWidth,
127
+ stroke: strokeColor,
128
+ strokeOpacity: fromOpacity
129
+ }, showFill ? (this.from.fillOpacity = fillOpacity, this.to.fillOpacity = null !== (_t = this.originalAttributes.fillOpacity) && void 0 !== _t ? _t : 1) : (this.from.fillOpacity = 0,
130
+ this.to.fillOpacity = 0), this.propKeys = [ "lineDash", "lineDashOffset", "lineWidth", "stroke", "strokeOpacity", "fillOpacity" ],
131
+ this.props = this.to, this.target.setAttributes(this.from);
132
+ }
133
+ onUpdate(end, ratio, out) {
134
+ var _a;
135
+ const attribute = this.target.attribute;
136
+ attribute.lineDashOffset = this.from.lineDashOffset + (this.to.lineDashOffset - this.from.lineDashOffset) * ratio,
137
+ (null === (_a = this.params) || void 0 === _a ? void 0 : _a.showFill) && (attribute.fillOpacity = this.from.fillOpacity + (this.to.fillOpacity - this.from.fillOpacity) * ratio);
138
+ }
139
+ onEnd() {
140
+ var _a;
141
+ if (super.onEnd(), !(null === (_a = this.params) || void 0 === _a ? void 0 : _a.showFill)) {
142
+ const originalAttrs = Object.assign({}, this.originalAttributes);
143
+ originalAttrs.fillOpacity = 0, this.target.setAttributes(originalAttrs);
144
+ }
145
+ }
146
+ }
147
+
148
+ export class StrokeOut extends ACustomAnimate {
149
+ constructor(from, to, duration, easing, params) {
150
+ super(from, to, duration, easing, params), this.perimeter = 0, this.originalAttributes = {};
151
+ }
152
+ onFirstRun() {
153
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
154
+ if (this.originalAttributes = Object.assign({}, this.target.getAttributes()), "rect" === this.target.type) {
155
+ const attr = this.target.attribute, width = null !== (_a = attr.width) && void 0 !== _a ? _a : 100, height = null !== (_b = attr.height) && void 0 !== _b ? _b : 100;
156
+ this.perimeter = 2 * (width + height);
157
+ } else if ("circle" === this.target.type) {
158
+ const radius = null !== (_c = this.target.attribute.radius) && void 0 !== _c ? _c : 50;
159
+ this.perimeter = 2 * Math.PI * radius;
160
+ } else if ("ellipse" === this.target.type) {
161
+ const attr = this.target.attribute, radiusX = null !== (_d = attr.radiusX) && void 0 !== _d ? _d : 50, radiusY = null !== (_e = attr.radiusY) && void 0 !== _e ? _e : 50;
162
+ this.perimeter = 2 * Math.PI * Math.sqrt((radiusX * radiusX + radiusY * radiusY) / 2);
163
+ } else this.perimeter = 1e3;
164
+ const lineWidth = null !== (_g = null === (_f = this.params) || void 0 === _f ? void 0 : _f.lineWidth) && void 0 !== _g ? _g : 2, strokeColor = null !== (_j = null === (_h = this.params) || void 0 === _h ? void 0 : _h.strokeColor) && void 0 !== _j ? _j : "black", fromOpacity = null !== (_l = null === (_k = this.params) || void 0 === _k ? void 0 : _k.fromOpacity) && void 0 !== _l ? _l : 1, dashLength = null !== (_o = null === (_m = this.params) || void 0 === _m ? void 0 : _m.dashLength) && void 0 !== _o ? _o : this.perimeter, showFill = null !== (_q = null === (_p = this.params) || void 0 === _p ? void 0 : _p.showFill) && void 0 !== _q && _q;
165
+ this.from = {
166
+ lineDash: [ dashLength, dashLength ],
167
+ lineDashOffset: 0,
168
+ lineWidth: lineWidth,
169
+ stroke: strokeColor,
170
+ strokeOpacity: fromOpacity
171
+ }, this.to = {
172
+ lineDash: [ dashLength, dashLength ],
173
+ lineDashOffset: -dashLength,
174
+ lineWidth: lineWidth,
175
+ stroke: strokeColor,
176
+ strokeOpacity: fromOpacity
177
+ }, showFill ? (this.from.fillOpacity = null !== (_r = this.originalAttributes.fillOpacity) && void 0 !== _r ? _r : 1,
178
+ this.to.fillOpacity = 0) : (this.from.fillOpacity = 0, this.to.fillOpacity = 0),
179
+ this.propKeys = [ "lineDash", "lineDashOffset", "lineWidth", "stroke", "strokeOpacity", "fillOpacity" ],
180
+ this.props = this.to, this.target.setAttributes(this.from);
181
+ }
182
+ onUpdate(end, ratio, out) {
183
+ var _a;
184
+ const attribute = this.target.attribute;
185
+ attribute.lineDashOffset = this.from.lineDashOffset + (this.to.lineDashOffset - this.from.lineDashOffset) * ratio,
186
+ (null === (_a = this.params) || void 0 === _a ? void 0 : _a.showFill) && (attribute.fillOpacity = this.from.fillOpacity + (this.to.fillOpacity - this.from.fillOpacity) * ratio);
187
+ }
188
+ }
189
+
190
+ export class MoveScaleIn extends ACustomAnimate {
191
+ constructor(from, to, duration, easing, params) {
192
+ var _a;
193
+ super(from, to, duration, easing, params);
194
+ const slideRatio = null !== (_a = null == params ? void 0 : params.slideRatio) && void 0 !== _a ? _a : .5;
195
+ this.slideInDuration = duration * slideRatio, this.growInDuration = duration * (1 - slideRatio);
196
+ }
197
+ onBind() {
198
+ var _a, _b, _c, _d, _e, _f;
199
+ super.onBind();
200
+ const executor = new AnimateExecutor(this.target);
201
+ executor.execute({
202
+ type: "custom",
203
+ custom: SlideIn,
204
+ customParameters: {
205
+ direction: (null === (_a = this.params) || void 0 === _a ? void 0 : _a.slideDirection) || "right",
206
+ distance: (null === (_b = this.params) || void 0 === _b ? void 0 : _b.slideDistance) || 50,
207
+ fromOpacity: null !== (_d = null === (_c = this.params) || void 0 === _c ? void 0 : _c.fromOpacity) && void 0 !== _d ? _d : 0
208
+ },
209
+ duration: this.slideInDuration,
210
+ easing: this.easing
211
+ }), executor.execute({
212
+ type: "custom",
213
+ custom: GrowIn,
214
+ customParameters: {
215
+ fromScale: (null === (_e = this.params) || void 0 === _e ? void 0 : _e.fromScale) || .5,
216
+ direction: (null === (_f = this.params) || void 0 === _f ? void 0 : _f.scaleDirection) || "xy",
217
+ fromOpacity: 1
218
+ },
219
+ duration: this.growInDuration,
220
+ easing: this.easing,
221
+ delay: this.slideInDuration
222
+ });
223
+ }
224
+ onUpdate(end, ratio, out) {}
225
+ }
226
+
227
+ export class MoveRotateIn extends ACustomAnimate {
228
+ constructor(from, to, duration, easing, params) {
229
+ var _a;
230
+ super(from, to, duration, easing, params);
231
+ const slideRatio = null !== (_a = null == params ? void 0 : params.slideRatio) && void 0 !== _a ? _a : .5;
232
+ this.slideInDuration = duration * slideRatio, this.spinInDuration = duration * (1 - slideRatio);
233
+ }
234
+ onBind() {
235
+ var _a, _b, _c, _d, _e, _f;
236
+ super.onBind();
237
+ const executor = new AnimateExecutor(this.target);
238
+ executor.execute({
239
+ type: "custom",
240
+ custom: SlideIn,
241
+ customParameters: {
242
+ direction: (null === (_a = this.params) || void 0 === _a ? void 0 : _a.slideDirection) || "right",
243
+ distance: (null === (_b = this.params) || void 0 === _b ? void 0 : _b.slideDistance) || 50,
244
+ fromOpacity: null !== (_d = null === (_c = this.params) || void 0 === _c ? void 0 : _c.fromOpacity) && void 0 !== _d ? _d : 0
245
+ },
246
+ duration: this.slideInDuration,
247
+ easing: this.easing
248
+ }), executor.execute({
249
+ type: "custom",
250
+ custom: SpinIn,
251
+ customParameters: {
252
+ fromAngle: (null === (_e = this.params) || void 0 === _e ? void 0 : _e.fromAngle) || Math.PI,
253
+ fromScale: (null === (_f = this.params) || void 0 === _f ? void 0 : _f.fromScale) || .5,
254
+ fromOpacity: 1
255
+ },
256
+ duration: this.spinInDuration,
257
+ easing: this.easing,
258
+ delay: this.slideInDuration
259
+ });
260
+ }
261
+ onUpdate(end, ratio, out) {}
262
+ }
263
+
264
+ export class SlideOut extends ACustomAnimate {
265
+ constructor(from, to, duration, easing, params) {
266
+ super(from, to, duration, easing, params);
267
+ }
268
+ onFirstRun() {
269
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
270
+ const attrs = this.target.getAttributes(), direction = (null === (_a = this.params) || void 0 === _a ? void 0 : _a.direction) || "right", distance = (null === (_b = this.params) || void 0 === _b ? void 0 : _b.distance) || 50, fromOpacity = null !== (_d = null === (_c = this.params) || void 0 === _c ? void 0 : _c.fromOpacity) && void 0 !== _d ? _d : 1, toOpacity = null !== (_f = null === (_e = this.params) || void 0 === _e ? void 0 : _e.toOpacity) && void 0 !== _f ? _f : 0, from = {
271
+ opacity: fromOpacity,
272
+ baseOpacity: fromOpacity
273
+ }, to = {
274
+ opacity: toOpacity,
275
+ baseOpacity: toOpacity
276
+ };
277
+ "top" === direction ? (from.y = null !== (_g = attrs.y) && void 0 !== _g ? _g : 0,
278
+ to.y = (null !== (_h = attrs.y) && void 0 !== _h ? _h : 0) - distance, this.propKeys = [ "opacity", "baseOpacity", "y" ]) : "bottom" === direction ? (from.y = null !== (_j = attrs.y) && void 0 !== _j ? _j : 0,
279
+ to.y = (null !== (_k = attrs.y) && void 0 !== _k ? _k : 0) + distance, this.propKeys = [ "opacity", "baseOpacity", "y" ]) : "left" === direction ? (from.x = null !== (_l = attrs.x) && void 0 !== _l ? _l : 0,
280
+ to.x = (null !== (_m = attrs.x) && void 0 !== _m ? _m : 0) - distance, this.propKeys = [ "opacity", "baseOpacity", "x" ]) : (from.x = null !== (_o = attrs.x) && void 0 !== _o ? _o : 0,
281
+ to.x = (null !== (_p = attrs.x) && void 0 !== _p ? _p : 0) + distance, this.propKeys = [ "opacity", "baseOpacity", "x" ]),
282
+ this.from = from, this.to = to, this.props = to;
283
+ }
284
+ onUpdate(end, ratio, out) {
285
+ const attribute = this.target.attribute;
286
+ this.propKeys.forEach((key => {
287
+ attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
288
+ })), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
289
+ }
290
+ }
291
+
292
+ export class GrowOut extends ACustomAnimate {
293
+ constructor(from, to, duration, easing, params) {
294
+ super(from, to, duration, easing, params);
295
+ }
296
+ onFirstRun() {
297
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
298
+ const attrs = this.target.getAttributes(), toScale = null !== (_b = null === (_a = this.params) || void 0 === _a ? void 0 : _a.fromScale) && void 0 !== _b ? _b : 0, direction = (null === (_c = this.params) || void 0 === _c ? void 0 : _c.direction) || "xy", fromOpacity = null !== (_e = null === (_d = this.params) || void 0 === _d ? void 0 : _d.fromOpacity) && void 0 !== _e ? _e : 1, toOpacity = null !== (_g = null === (_f = this.params) || void 0 === _f ? void 0 : _f.toOpacity) && void 0 !== _g ? _g : 0, from = {
299
+ opacity: fromOpacity,
300
+ baseOpacity: fromOpacity
301
+ }, to = {
302
+ opacity: toOpacity,
303
+ baseOpacity: toOpacity
304
+ };
305
+ this.propKeys = [ "opacity", "baseOpacity" ], "x" !== direction && "xy" !== direction || (from.scaleX = null !== (_h = attrs.scaleX) && void 0 !== _h ? _h : 1,
306
+ to.scaleX = toScale, this.propKeys.push("scaleX")), "y" !== direction && "xy" !== direction || (from.scaleY = null !== (_j = attrs.scaleY) && void 0 !== _j ? _j : 1,
307
+ to.scaleY = toScale, this.propKeys.push("scaleY")), this.from = from, this.to = to,
308
+ this.props = to;
309
+ }
310
+ onUpdate(end, ratio, out) {
311
+ const attribute = this.target.attribute;
312
+ this.propKeys.forEach((key => {
313
+ attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
314
+ })), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
315
+ }
316
+ }
317
+
318
+ export class SpinOut extends ACustomAnimate {
319
+ constructor(from, to, duration, easing, params) {
320
+ super(from, to, duration, easing, params);
321
+ }
322
+ onFirstRun() {
323
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
324
+ const attrs = this.target.getAttributes(), toAngle = null !== (_b = null === (_a = this.params) || void 0 === _a ? void 0 : _a.fromAngle) && void 0 !== _b ? _b : 2 * Math.PI, toScale = null !== (_d = null === (_c = this.params) || void 0 === _c ? void 0 : _c.fromScale) && void 0 !== _d ? _d : 0, fromOpacity = null !== (_f = null === (_e = this.params) || void 0 === _e ? void 0 : _e.fromOpacity) && void 0 !== _f ? _f : 1, toOpacity = null !== (_h = null === (_g = this.params) || void 0 === _g ? void 0 : _g.toOpacity) && void 0 !== _h ? _h : 0, from = {
325
+ opacity: fromOpacity,
326
+ baseOpacity: fromOpacity,
327
+ angle: null !== (_j = attrs.angle) && void 0 !== _j ? _j : 0,
328
+ scaleX: null !== (_k = attrs.scaleX) && void 0 !== _k ? _k : 1,
329
+ scaleY: null !== (_l = attrs.scaleY) && void 0 !== _l ? _l : 1
330
+ }, to = {
331
+ opacity: toOpacity,
332
+ baseOpacity: toOpacity,
333
+ angle: toAngle,
334
+ scaleX: toScale,
335
+ scaleY: toScale
336
+ };
337
+ this.propKeys = [ "opacity", "baseOpacity", "angle", "scaleX", "scaleY" ], this.from = from,
338
+ this.to = to, this.props = to;
339
+ }
340
+ onUpdate(end, ratio, out) {
341
+ const attribute = this.target.attribute;
342
+ this.propKeys.forEach((key => {
343
+ attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
344
+ })), this.target.addUpdatePositionTag(), this.target.addUpdateShapeAndBoundsTag();
345
+ }
346
+ }
347
+
348
+ export class MoveScaleOut extends ACustomAnimate {
349
+ constructor(from, to, duration, easing, params) {
350
+ var _a;
351
+ super(from, to, duration, easing, params);
352
+ const slideRatio = null !== (_a = null == params ? void 0 : params.slideRatio) && void 0 !== _a ? _a : .5;
353
+ this.growOutDuration = duration * (1 - slideRatio), this.slideOutDuration = duration * slideRatio;
354
+ }
355
+ onFirstRun() {
356
+ var _a, _b, _c, _d;
357
+ const executor = new AnimateExecutor(this.target);
358
+ executor.execute({
359
+ type: "custom",
360
+ custom: GrowOut,
361
+ customParameters: {
362
+ fromScale: (null === (_a = this.params) || void 0 === _a ? void 0 : _a.fromScale) || .5,
363
+ direction: (null === (_b = this.params) || void 0 === _b ? void 0 : _b.scaleDirection) || "xy",
364
+ fromOpacity: 1,
365
+ toOpacity: 1
366
+ },
367
+ duration: this.growOutDuration,
368
+ easing: this.easing
369
+ }), executor.execute({
370
+ type: "custom",
371
+ custom: SlideOut,
372
+ customParameters: {
373
+ direction: (null === (_c = this.params) || void 0 === _c ? void 0 : _c.slideDirection) || "right",
374
+ distance: (null === (_d = this.params) || void 0 === _d ? void 0 : _d.slideDistance) || 50,
375
+ fromOpacity: 1
376
+ },
377
+ duration: this.slideOutDuration,
378
+ easing: this.easing,
379
+ delay: this.growOutDuration
380
+ });
381
+ }
382
+ onUpdate(end, ratio, out) {}
383
+ }
384
+
385
+ export class MoveRotateOut extends ACustomAnimate {
386
+ constructor(from, to, duration, easing, params) {
387
+ var _a;
388
+ super(from, to, duration, easing, params);
389
+ const slideRatio = null !== (_a = null == params ? void 0 : params.slideRatio) && void 0 !== _a ? _a : .5;
390
+ this.spinOutDuration = duration * (1 - slideRatio), this.slideOutDuration = duration * slideRatio;
391
+ }
392
+ onFirstRun() {
393
+ var _a, _b, _c, _d;
394
+ const executor = new AnimateExecutor(this.target);
395
+ executor.execute({
396
+ type: "custom",
397
+ custom: SpinOut,
398
+ customParameters: {
399
+ fromAngle: (null === (_a = this.params) || void 0 === _a ? void 0 : _a.fromAngle) || Math.PI,
400
+ fromScale: (null === (_b = this.params) || void 0 === _b ? void 0 : _b.fromScale) || .5,
401
+ fromOpacity: 1,
402
+ toOpacity: 1
403
+ },
404
+ duration: this.spinOutDuration,
405
+ easing: this.easing
406
+ }), executor.execute({
407
+ type: "custom",
408
+ custom: SlideOut,
409
+ customParameters: {
410
+ direction: (null === (_c = this.params) || void 0 === _c ? void 0 : _c.slideDirection) || "right",
411
+ distance: (null === (_d = this.params) || void 0 === _d ? void 0 : _d.slideDistance) || 50,
412
+ fromOpacity: 1
413
+ },
414
+ duration: this.slideOutDuration,
415
+ easing: this.easing,
416
+ delay: this.spinOutDuration
417
+ });
418
+ }
419
+ onUpdate(end, ratio, out) {}
420
+ }
421
+
422
+ export class PulseAnimate extends ACustomAnimate {
423
+ constructor(from, to, duration, easing, params) {
424
+ super(from, to, duration, easing, params), this.originalAttributes = {}, this.pulseCount = 3,
425
+ this.pulseOpacity = .3, this.pulseScale = 1.05, this.pulseColor = null, this.pulseColorIntensity = .2,
426
+ this.strokeOnly = !1, this.fillOnly = !1, this.useScale = !0, this.useOpacity = !0,
427
+ this.useStroke = !0, this.useFill = !0, this.useColor = !1, this.originalFill = null,
428
+ this.originalStroke = null, void 0 !== (null == params ? void 0 : params.pulseCount) && (this.pulseCount = params.pulseCount),
429
+ void 0 !== (null == params ? void 0 : params.pulseScale) && (this.pulseScale = params.pulseScale),
430
+ void 0 !== (null == params ? void 0 : params.pulseColor) && (this.pulseColor = params.pulseColor),
431
+ void 0 !== (null == params ? void 0 : params.pulseColorIntensity) && (this.pulseColorIntensity = params.pulseColorIntensity),
432
+ void 0 !== (null == params ? void 0 : params.strokeOnly) && (this.strokeOnly = params.strokeOnly),
433
+ void 0 !== (null == params ? void 0 : params.fillOnly) && (this.fillOnly = params.fillOnly),
434
+ void 0 !== (null == params ? void 0 : params.useScale) && (this.useScale = params.useScale),
435
+ void 0 !== (null == params ? void 0 : params.useOpacity) && (this.useOpacity = params.useOpacity),
436
+ void 0 !== (null == params ? void 0 : params.useStroke) && (this.useStroke = params.useStroke),
437
+ void 0 !== (null == params ? void 0 : params.useFill) && (this.useFill = params.useFill),
438
+ void 0 !== (null == params ? void 0 : params.useColor) && (this.useColor = params.useColor);
439
+ }
440
+ onBind() {
441
+ super.onBind(), this.originalAttributes = Object.assign({}, this.target.getAttributes()),
442
+ this.useColor && (this.originalFill = this.originalAttributes.fill || null, this.originalStroke = this.originalAttributes.stroke || null,
443
+ this.pulseColor || (this.fillOnly && this.originalFill ? this.pulseColor = this.originalFill : this.strokeOnly && this.originalStroke ? this.pulseColor = this.originalStroke : this.originalFill ? this.pulseColor = this.originalFill : this.originalStroke ? this.pulseColor = this.originalStroke : this.pulseColor = "#FFFFFF"));
444
+ }
445
+ onUpdate(end, ratio, out) {
446
+ const angle = ratio * Math.PI * this.pulseCount, pulseValue = Math.abs(Math.sin(angle)), attribute = this.target.attribute;
447
+ if (this.useOpacity) {
448
+ const opacity = 1 + (this.pulseOpacity - 1) * pulseValue;
449
+ this.useStroke && (attribute.strokeOpacity = (this.originalAttributes.strokeOpacity || 1) * opacity),
450
+ this.useFill && (attribute.fillOpacity = (this.originalAttributes.fillOpacity || 1) * opacity);
451
+ }
452
+ if (this.useScale) {
453
+ const scale = 1 + (this.pulseScale - 1) * pulseValue;
454
+ attribute.scaleX = (this.originalAttributes.scaleX || 1) * scale, attribute.scaleY = (this.originalAttributes.scaleY || 1) * scale;
455
+ }
456
+ this.useColor && this.pulseColor && this.applyColorPulse(attribute, pulseValue),
457
+ this.target.addUpdateShapeAndBoundsTag(), this.target.addUpdatePositionTag();
458
+ }
459
+ applyColorPulse(attribute, pulseValue) {
460
+ const colorRatio = this.pulseColorIntensity * pulseValue;
461
+ this.useFill && this.originalFill && this.pulseColor && (attribute.fill = interpolateColor(this.originalFill, this.pulseColor, colorRatio, !0)),
462
+ this.useStroke && this.originalStroke && this.pulseColor && (attribute.stroke = interpolateColor(this.originalStroke, this.pulseColor, colorRatio, !0));
463
+ }
464
+ onEnd() {
465
+ super.onEnd(), this.target.setAttributes(this.originalAttributes);
466
+ }
467
+ }
468
+ //# sourceMappingURL=story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/custom/story.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAyB,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEjF,MAAM,OAAO,WAAY,SAAQ,MAAM;CAAG;AAoD1C,MAAM,OAAO,OAAQ,SAAQ,cAAsC;IAMjE,YAAY,IAAU,EAAE,EAAQ,EAAE,QAAgB,EAAE,MAAkB,EAAE,MAA+B;QACrG,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM;;QACJ,KAAK,CAAC,MAAM,EAAE,CAAC;QAEf,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAE9C,MAAM,SAAS,GAAG,CAAC,MAAA,IAAI,CAAC,MAAM,0CAAE,SAAiD,KAAI,OAAO,CAAC;QAC7F,MAAM,QAAQ,GAAG,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,QAAQ,KAAI,EAAE,CAAC;QAC7C,MAAM,WAAW,GAAG,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,WAAW,mCAAI,CAAC,CAAC;QAGl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C;SAC7C;QAGD,IAAI,CAAC,MAAM,CAAC,0BAA0B,EAAE,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,oBAAoB,EAAE,CAAC;IACrC,CAAC;IAGO,eAAe,CAAC,SAA8B,EAAE,UAAkB;QAExE,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,GAAG,UAAU,CAAC;QAGzD,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,UAAU,EAAE;YACxD,SAAS,CAAC,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;SACzF;QAGD,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,UAAU,EAAE;YAC5D,SAAS,CAAC,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;SAC7F;IACH,CAAC;IAED,KAAK;QACH,KAAK,CAAC,KAAK,EAAE,CAAC;QAEd,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACrD,CAAC;CACF","file":"story.js","sourcesContent":["import { FadeIn } from './fade';\nimport type { EasingType, IGraphicAttribute } from '@visactor/vrender-core';\nimport { ACustomAnimate } from './custom-animate';\nimport { AnimateExecutor } from '../executor/animate-executor';\nimport { ColorStore, ColorType, interpolateColor } from '@visactor/vrender-core';\n\nexport class StoryFadeIn extends FadeIn {}\n\n// 滑动动画的参数接口\nexport interface ISlideAnimationOptions {\n direction?: 'top' | 'bottom' | 'left' | 'right';\n distance?: number;\n fromOpacity?: number; // 透明度初始值,默认0\n}\n\n// 缩放动画的参数接口\nexport interface IGrowAnimationOptions {\n fromScale?: number;\n direction?: 'x' | 'y' | 'xy';\n fromOpacity?: number; // 透明度初始值,默认0\n}\n\n// 旋转动画的参数接口\nexport interface ISpinAnimationOptions {\n fromAngle?: number;\n fromScale?: number;\n fromOpacity?: number; // 透明度初始值,默认0\n}\n\n// 描边动画的参数接口\nexport interface IStrokeAnimationOptions {\n lineWidth?: number; // 描边宽度,默认2\n strokeColor?: string; // 描边颜色,默认黑色\n fromOpacity?: number; // 透明度初始值,默认1\n dashLength?: number; // 虚线长度,默认为元素周长\n showFill?: boolean; // 是否显示填充,默认false\n fillOpacity?: number; // 填充透明度,仅当showFill为true时有效\n}\n\n// 脉冲/强调动画的参数接口\nexport interface IPulseAnimationOptions {\n pulseCount?: number; // 脉冲次数\n pulseOpacity?: number; // 脉冲透明度,默认0.3\n pulseScale?: number; // 缩放比例,默认1.05\n pulseColor?: string; // 脉冲颜色,默认为元素自身颜色\n pulseColorIntensity?: number; // 脉冲颜色强度,0-1,默认0.2\n strokeOnly?: boolean; // 是否只应用于描边,默认false\n fillOnly?: boolean; // 是否只应用于填充,默认false\n useScale?: boolean; // 是否使用缩放效果,默认true\n useOpacity?: boolean; // 是否使用透明度效果,默认true\n useColor?: boolean; // 是否使用颜色效果,默认false\n useStroke?: boolean; // 是否使用描边效果,默认true\n useFill?: boolean; // 是否使用填充效果,默认true\n}\n\n/**\n * 滑动入场动画,包括从上到下,从下到上,从左到右,从右到左的位置,以及透明度属性插值\n */\nexport class SlideIn extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: ISlideAnimationOptions) {\n super(from, to, duration, easing, params);\n }\n\n onBind(): void {\n super.onBind();\n // 用于入场的时候设置属性\n const attrs = this.target.getFinalAttribute();\n\n const direction = (this.params?.direction as 'top' | 'bottom' | 'left' | 'right') || 'right';\n const distance = this.params?.distance || 50;\n const fromOpacity = this.params?.fromOpacity ?? 0; // 使用透明度初始值参数\n\n // 初始化from和to对象\n const from: Record<string, number> = { opacity: fromOpacity, baseOpacity: fromOpacity };\n const to: Record<string, number> = { opacity: 1, baseOpacity: 1 };\n\n // 根据方向设置对应的属性\n if (direction === 'top') {\n from.y = (attrs.y ?? 0) - distance;\n to.y = attrs.y ?? 0;\n this.propKeys = ['opacity', 'baseOpacity', 'y'];\n } else if (direction === 'bottom') {\n from.y = (attrs.y ?? 0) + distance;\n to.y = attrs.y ?? 0;\n this.propKeys = ['opacity', 'baseOpacity', 'y'];\n } else if (direction === 'left') {\n from.x = (attrs.x ?? 0) - distance;\n to.x = attrs.x ?? 0;\n this.propKeys = ['opacity', 'baseOpacity', 'x'];\n } else {\n // right\n from.x = (attrs.x ?? 0) + distance;\n to.x = attrs.x ?? 0;\n this.propKeys = ['opacity', 'baseOpacity', 'x'];\n }\n\n this.from = from;\n this.to = to;\n this.props = to;\n\n // 将初始属性应用到目标对象\n this.target.setAttributes(from as any);\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 缩放入场动画,包括scaleX、scaleY属性从某个比例缩放到1,该比例可以小于1也可以大于1,以及透明度属性插值\n */\nexport class GrowIn extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IGrowAnimationOptions) {\n super(from, to, duration, easing, params);\n }\n\n onBind(): void {\n super.onBind();\n // 用于入场的时候设置属性\n const attrs = this.target.getFinalAttribute();\n\n const fromScale = this.params?.fromScale ?? 0;\n const direction = this.params?.direction || 'xy';\n const fromOpacity = this.params?.fromOpacity ?? 0; // 使用透明度初始值参数\n\n // 初始化from和to对象\n const from: Record<string, number> = { opacity: fromOpacity, baseOpacity: fromOpacity };\n const to: Record<string, number> = { opacity: 1, baseOpacity: 1 };\n this.propKeys = ['opacity', 'baseOpacity'];\n\n // 根据方向设置对应的缩放属性\n if (direction === 'x' || direction === 'xy') {\n from.scaleX = fromScale;\n to.scaleX = attrs.scaleX ?? 1;\n this.propKeys.push('scaleX');\n }\n\n if (direction === 'y' || direction === 'xy') {\n from.scaleY = fromScale;\n to.scaleY = attrs.scaleY ?? 1;\n this.propKeys.push('scaleY');\n }\n\n this.from = from;\n this.to = to;\n this.props = to;\n\n // 将初始属性应用到目标对象\n this.target.setAttributes(from as any);\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 旋转入场动画,包括rotate属性从某个角度度旋转到0,以及缩放属性从某个比例缩放到1,该比例可以小于1也可以大于1\n */\nexport class SpinIn extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: ISpinAnimationOptions) {\n super(from, to, duration, easing, params);\n }\n\n onBind(): void {\n super.onBind();\n // 用于入场的时候设置属性\n const attrs = this.target.getFinalAttribute();\n\n const fromAngle = this.params?.fromAngle ?? Math.PI * 2; // 默认旋转一圈\n const fromScale = this.params?.fromScale ?? 0;\n const fromOpacity = this.params?.fromOpacity ?? 0; // 使用透明度初始值参数\n\n // 初始化from和to对象\n const from: Record<string, number> = {\n opacity: fromOpacity,\n baseOpacity: fromOpacity,\n angle: fromAngle,\n scaleX: fromScale,\n scaleY: fromScale\n };\n\n const to: Record<string, number> = {\n opacity: 1,\n baseOpacity: 1,\n angle: attrs.angle ?? 0,\n scaleX: attrs.scaleX ?? 1,\n scaleY: attrs.scaleY ?? 1\n };\n\n this.propKeys = ['opacity', 'baseOpacity', 'angle', 'scaleX', 'scaleY'];\n this.from = from;\n this.to = to;\n this.props = to;\n\n // 将初始属性应用到目标对象\n this.target.setAttributes(from as any);\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 描边入场动画,使用lineDashOffset实现描边效果\n * 通过调整虚线偏移量,创建线条逐渐显示的动画效果\n */\nexport class StrokeIn extends ACustomAnimate<Record<string, any>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, any>;\n declare to: Record<string, any>;\n private perimeter: number = 0;\n private originalAttributes: Record<string, any> = {};\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IStrokeAnimationOptions) {\n super(from, to, duration, easing, params);\n }\n\n onBind(): void {\n super.onBind();\n // 保存原始属性\n this.originalAttributes = { ...this.target.getAttributes() };\n\n // 获取图形周长\n if (this.target.type === 'rect') {\n const attr = this.target.attribute as any;\n const width = attr.width ?? 100;\n const height = attr.height ?? 100;\n this.perimeter = 2 * (width + height);\n } else if (this.target.type === 'circle') {\n const attr = this.target.attribute as any;\n const radius = attr.radius ?? 50;\n this.perimeter = 2 * Math.PI * radius;\n } else if (this.target.type === 'ellipse') {\n const attr = this.target.attribute as any;\n const radiusX = attr.radiusX ?? 50;\n const radiusY = attr.radiusY ?? 50;\n // 椭圆周长近似计算\n this.perimeter = 2 * Math.PI * Math.sqrt((radiusX * radiusX + radiusY * radiusY) / 2);\n } else {\n // 对于其他形状,使用默认值\n this.perimeter = 1000;\n }\n\n const lineWidth = this.params?.lineWidth ?? 2;\n const strokeColor = this.params?.strokeColor ?? 'black';\n const fromOpacity = this.params?.fromOpacity ?? 1;\n const dashLength = this.params?.dashLength ?? this.perimeter;\n const showFill = this.params?.showFill ?? false;\n const fillOpacity = this.params?.fillOpacity ?? 0;\n\n // 设置初始状态\n this.from = {\n lineDash: [dashLength, dashLength],\n lineDashOffset: dashLength,\n lineWidth,\n stroke: strokeColor,\n strokeOpacity: fromOpacity\n };\n\n // 设置目标状态\n this.to = {\n lineDash: [dashLength, dashLength],\n lineDashOffset: 0,\n lineWidth,\n stroke: strokeColor,\n strokeOpacity: fromOpacity\n };\n\n // 如果需要显示填充,添加填充相关属性\n if (showFill) {\n this.from.fillOpacity = fillOpacity;\n this.to.fillOpacity = this.originalAttributes.fillOpacity ?? 1;\n } else {\n this.from.fillOpacity = 0;\n this.to.fillOpacity = 0;\n }\n\n this.propKeys = ['lineDash', 'lineDashOffset', 'lineWidth', 'stroke', 'strokeOpacity', 'fillOpacity'];\n this.props = this.to;\n\n // 应用初始属性\n this.target.setAttributes(this.from);\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n\n // 更新lineDashOffset\n attribute.lineDashOffset = this.from.lineDashOffset + (this.to.lineDashOffset - this.from.lineDashOffset) * ratio;\n\n // 更新fillOpacity (如果需要显示填充)\n if (this.params?.showFill) {\n attribute.fillOpacity = this.from.fillOpacity + (this.to.fillOpacity - this.from.fillOpacity) * ratio;\n }\n }\n\n onEnd(): void {\n super.onEnd();\n // 动画结束后,是否要恢复原始属性\n if (!this.params?.showFill) {\n // 如果不显示填充,恢复原始的stroke属性但保持fillOpacity为0\n const originalAttrs = { ...this.originalAttributes };\n originalAttrs.fillOpacity = 0;\n this.target.setAttributes(originalAttrs);\n }\n }\n}\n\n/**\n * 描边出场动画,使用lineDashOffset实现描边消失效果\n */\nexport class StrokeOut extends ACustomAnimate<Record<string, any>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, any>;\n declare to: Record<string, any>;\n private perimeter: number = 0;\n private originalAttributes: Record<string, any> = {};\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IStrokeAnimationOptions) {\n super(from, to, duration, easing, params);\n }\n\n onFirstRun(): void {\n // 保存原始属性\n this.originalAttributes = { ...this.target.getAttributes() };\n\n // 获取图形周长\n if (this.target.type === 'rect') {\n const attr = this.target.attribute as any;\n const width = attr.width ?? 100;\n const height = attr.height ?? 100;\n this.perimeter = 2 * (width + height);\n } else if (this.target.type === 'circle') {\n const attr = this.target.attribute as any;\n const radius = attr.radius ?? 50;\n this.perimeter = 2 * Math.PI * radius;\n } else if (this.target.type === 'ellipse') {\n const attr = this.target.attribute as any;\n const radiusX = attr.radiusX ?? 50;\n const radiusY = attr.radiusY ?? 50;\n // 椭圆周长近似计算\n this.perimeter = 2 * Math.PI * Math.sqrt((radiusX * radiusX + radiusY * radiusY) / 2);\n } else {\n // 对于其他形状,使用默认值\n this.perimeter = 1000;\n }\n\n const lineWidth = this.params?.lineWidth ?? 2;\n const strokeColor = this.params?.strokeColor ?? 'black';\n const fromOpacity = this.params?.fromOpacity ?? 1;\n const dashLength = this.params?.dashLength ?? this.perimeter;\n const showFill = this.params?.showFill ?? false;\n\n // 设置初始状态 - 完全显示的描边\n this.from = {\n lineDash: [dashLength, dashLength],\n lineDashOffset: 0,\n lineWidth,\n stroke: strokeColor,\n strokeOpacity: fromOpacity\n };\n\n // 设置目标状态 - 完全消失的描边\n this.to = {\n lineDash: [dashLength, dashLength],\n lineDashOffset: -dashLength,\n lineWidth,\n stroke: strokeColor,\n strokeOpacity: fromOpacity\n };\n\n // 处理填充\n if (showFill) {\n this.from.fillOpacity = this.originalAttributes.fillOpacity ?? 1;\n this.to.fillOpacity = 0;\n } else {\n this.from.fillOpacity = 0;\n this.to.fillOpacity = 0;\n }\n\n this.propKeys = ['lineDash', 'lineDashOffset', 'lineWidth', 'stroke', 'strokeOpacity', 'fillOpacity'];\n this.props = this.to;\n\n // 应用初始属性\n this.target.setAttributes(this.from);\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n\n // 更新lineDashOffset\n attribute.lineDashOffset = this.from.lineDashOffset + (this.to.lineDashOffset - this.from.lineDashOffset) * ratio;\n\n // 更新fillOpacity (如果有)\n if (this.params?.showFill) {\n attribute.fillOpacity = this.from.fillOpacity + (this.to.fillOpacity - this.from.fillOpacity) * ratio;\n }\n }\n}\n\n// 复合动画的参数接口\nexport interface IMoveScaleAnimationOptions {\n slideDirection?: 'top' | 'bottom' | 'left' | 'right';\n slideDistance?: number;\n fromScale?: number;\n scaleDirection?: 'x' | 'y' | 'xy';\n slideRatio?: number; // 滑动动画占总时长的比例,默认0.5\n fromOpacity?: number; // 透明度初始值,默认0\n}\n\n/**\n * 移动+缩放入场动画\n * 先走SlideIn,然后走GrowIn\n */\nexport class MoveScaleIn extends ACustomAnimate<any> {\n declare valid: boolean;\n private readonly slideInDuration: number;\n private readonly growInDuration: number;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IMoveScaleAnimationOptions) {\n super(from, to, duration, easing, params);\n const slideRatio = params?.slideRatio ?? 0.5;\n this.slideInDuration = duration * slideRatio;\n this.growInDuration = duration * (1 - slideRatio);\n }\n\n onBind(): void {\n super.onBind();\n // 创建AnimateExecutor来运行序列动画\n const executor = new AnimateExecutor(this.target);\n\n // 第一步:滑动入场(包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SlideIn,\n customParameters: {\n direction: this.params?.slideDirection || 'right',\n distance: this.params?.slideDistance || 50,\n fromOpacity: this.params?.fromOpacity ?? 0\n },\n duration: this.slideInDuration,\n easing: this.easing\n });\n\n // 第二步:缩放入场(不包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: GrowIn,\n customParameters: {\n fromScale: this.params?.fromScale || 0.5,\n direction: this.params?.scaleDirection || 'xy',\n fromOpacity: 1 // 设置初始透明度为1,使第二阶段不进行透明度插值\n },\n duration: this.growInDuration,\n easing: this.easing,\n delay: this.slideInDuration // 等第一步完成后再开始\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 动画逻辑由子动画处理\n }\n}\n\n// 移动旋转动画的参数接口\nexport interface IMoveRotateAnimationOptions {\n slideDirection?: 'top' | 'bottom' | 'left' | 'right';\n slideDistance?: number;\n fromAngle?: number;\n fromScale?: number;\n slideRatio?: number; // 滑动动画占总时长的比例,默认0.5\n fromOpacity?: number; // 透明度初始值,默认0\n}\n\n/**\n * 移动+旋转入场动画\n * 先走SlideIn,然后走SpinIn\n */\nexport class MoveRotateIn extends ACustomAnimate<any> {\n declare valid: boolean;\n private readonly slideInDuration: number;\n private readonly spinInDuration: number;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IMoveRotateAnimationOptions) {\n super(from, to, duration, easing, params);\n const slideRatio = params?.slideRatio ?? 0.5;\n this.slideInDuration = duration * slideRatio;\n this.spinInDuration = duration * (1 - slideRatio);\n }\n\n onBind(): void {\n super.onBind();\n // 创建AnimateExecutor来运行序列动画\n const executor = new AnimateExecutor(this.target);\n\n // 第一步:滑动入场(包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SlideIn,\n customParameters: {\n direction: this.params?.slideDirection || 'right',\n distance: this.params?.slideDistance || 50,\n fromOpacity: this.params?.fromOpacity ?? 0\n },\n duration: this.slideInDuration,\n easing: this.easing\n });\n\n // 第二步:旋转入场(不包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SpinIn,\n customParameters: {\n fromAngle: this.params?.fromAngle || Math.PI,\n fromScale: this.params?.fromScale || 0.5,\n fromOpacity: 1 // 设置初始透明度为1,使第二阶段不进行透明度插值\n },\n duration: this.spinInDuration,\n easing: this.easing,\n delay: this.slideInDuration // 等第一步完成后再开始\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 动画逻辑由子动画处理\n }\n}\n\n/**\n * 滑动出场动画,包括从当前位置滑动到指定方向,以及透明度属性插值\n */\nexport class SlideOut extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(\n from: null,\n to: null,\n duration: number,\n easing: EasingType,\n params?: ISlideAnimationOptions & { toOpacity?: number }\n ) {\n super(from, to, duration, easing, params);\n }\n\n onFirstRun(): void {\n // 用于出场的时候设置属性\n const attrs = this.target.getAttributes();\n\n const direction = (this.params?.direction as 'top' | 'bottom' | 'left' | 'right') || 'right';\n const distance = this.params?.distance || 50;\n const fromOpacity = this.params?.fromOpacity ?? 1; // 使用透明度初始值参数\n const toOpacity = this.params?.toOpacity ?? 0; // 使用目标透明度参数\n\n // 初始化from和to对象\n const from: Record<string, number> = { opacity: fromOpacity, baseOpacity: fromOpacity };\n const to: Record<string, number> = { opacity: toOpacity, baseOpacity: toOpacity };\n\n // 根据方向设置对应的属性\n if (direction === 'top') {\n from.y = attrs.y ?? 0;\n to.y = (attrs.y ?? 0) - distance;\n this.propKeys = ['opacity', 'baseOpacity', 'y'];\n } else if (direction === 'bottom') {\n from.y = attrs.y ?? 0;\n to.y = (attrs.y ?? 0) + distance;\n this.propKeys = ['opacity', 'baseOpacity', 'y'];\n } else if (direction === 'left') {\n from.x = attrs.x ?? 0;\n to.x = (attrs.x ?? 0) - distance;\n this.propKeys = ['opacity', 'baseOpacity', 'x'];\n } else {\n // right\n from.x = attrs.x ?? 0;\n to.x = (attrs.x ?? 0) + distance;\n this.propKeys = ['opacity', 'baseOpacity', 'x'];\n }\n\n this.from = from;\n this.to = to;\n this.props = to;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 缩放出场动画,包括scaleX、scaleY属性从当前比例缩放到指定比例,以及透明度属性插值\n */\nexport class GrowOut extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(\n from: null,\n to: null,\n duration: number,\n easing: EasingType,\n params?: IGrowAnimationOptions & { toOpacity?: number }\n ) {\n super(from, to, duration, easing, params);\n }\n\n onFirstRun(): void {\n // 用于出场的时候设置属性\n const attrs = this.target.getAttributes();\n\n const toScale = this.params?.fromScale ?? 0; // 使用fromScale作为目标比例\n const direction = this.params?.direction || 'xy';\n const fromOpacity = this.params?.fromOpacity ?? 1; // 使用透明度初始值参数\n const toOpacity = this.params?.toOpacity ?? 0; // 使用目标透明度参数\n\n // 初始化from和to对象\n const from: Record<string, number> = { opacity: fromOpacity, baseOpacity: fromOpacity };\n const to: Record<string, number> = { opacity: toOpacity, baseOpacity: toOpacity };\n this.propKeys = ['opacity', 'baseOpacity'];\n\n // 根据方向设置对应的缩放属性\n if (direction === 'x' || direction === 'xy') {\n from.scaleX = attrs.scaleX ?? 1;\n to.scaleX = toScale;\n this.propKeys.push('scaleX');\n }\n\n if (direction === 'y' || direction === 'xy') {\n from.scaleY = attrs.scaleY ?? 1;\n to.scaleY = toScale;\n this.propKeys.push('scaleY');\n }\n\n this.from = from;\n this.to = to;\n this.props = to;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 旋转出场动画,包括rotate属性从当前角度旋转到指定角度,以及缩放属性从当前比例缩放到指定比例\n */\nexport class SpinOut extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(\n from: null,\n to: null,\n duration: number,\n easing: EasingType,\n params?: ISpinAnimationOptions & { toOpacity?: number }\n ) {\n super(from, to, duration, easing, params);\n }\n\n onFirstRun(): void {\n // 用于出场的时候设置属性\n const attrs = this.target.getAttributes();\n\n const toAngle = this.params?.fromAngle ?? Math.PI * 2; // 默认旋转一圈\n const toScale = this.params?.fromScale ?? 0;\n const fromOpacity = this.params?.fromOpacity ?? 1; // 使用透明度初始值参数\n const toOpacity = this.params?.toOpacity ?? 0; // 使用目标透明度参数\n\n // 初始化from和to对象\n const from: Record<string, number> = {\n opacity: fromOpacity,\n baseOpacity: fromOpacity,\n angle: attrs.angle ?? 0,\n scaleX: attrs.scaleX ?? 1,\n scaleY: attrs.scaleY ?? 1\n };\n\n const to: Record<string, number> = {\n opacity: toOpacity,\n baseOpacity: toOpacity,\n angle: toAngle,\n scaleX: toScale,\n scaleY: toScale\n };\n\n this.propKeys = ['opacity', 'baseOpacity', 'angle', 'scaleX', 'scaleY'];\n this.from = from;\n this.to = to;\n this.props = to;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 移动+缩放出场动画\n * 先走GrowOut,然后走SlideOut\n */\nexport class MoveScaleOut extends ACustomAnimate<any> {\n declare valid: boolean;\n private readonly growOutDuration: number;\n private readonly slideOutDuration: number;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IMoveScaleAnimationOptions) {\n super(from, to, duration, easing, params);\n const slideRatio = params?.slideRatio ?? 0.5;\n this.growOutDuration = duration * (1 - slideRatio);\n this.slideOutDuration = duration * slideRatio;\n }\n\n onFirstRun(): void {\n // 创建AnimateExecutor来运行序列动画\n const executor = new AnimateExecutor(this.target);\n\n // 第一步:缩放出场(不包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: GrowOut,\n customParameters: {\n fromScale: this.params?.fromScale || 0.5,\n direction: this.params?.scaleDirection || 'xy',\n fromOpacity: 1, // 保持透明度为1,不做变化\n toOpacity: 1 // 确保第一阶段不改变透明度\n },\n duration: this.growOutDuration,\n easing: this.easing\n });\n\n // 第二步:滑动出场(包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SlideOut,\n customParameters: {\n direction: this.params?.slideDirection || 'right',\n distance: this.params?.slideDistance || 50,\n fromOpacity: 1 // 起始透明度为1\n },\n duration: this.slideOutDuration,\n easing: this.easing,\n delay: this.growOutDuration // 等第一步完成后再开始\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 动画逻辑由子动画处理\n }\n}\n\n/**\n * 移动+旋转出场动画\n * 先走SpinOut,然后走SlideOut\n */\nexport class MoveRotateOut extends ACustomAnimate<any> {\n declare valid: boolean;\n private readonly spinOutDuration: number;\n private readonly slideOutDuration: number;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IMoveRotateAnimationOptions) {\n super(from, to, duration, easing, params);\n const slideRatio = params?.slideRatio ?? 0.5;\n this.spinOutDuration = duration * (1 - slideRatio);\n this.slideOutDuration = duration * slideRatio;\n }\n\n onFirstRun(): void {\n // 创建AnimateExecutor来运行序列动画\n const executor = new AnimateExecutor(this.target);\n\n // 第一步:旋转出场(不包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SpinOut,\n customParameters: {\n fromAngle: this.params?.fromAngle || Math.PI,\n fromScale: this.params?.fromScale || 0.5,\n fromOpacity: 1, // 保持透明度为1,不做变化\n toOpacity: 1 // 确保第一阶段不改变透明度\n },\n duration: this.spinOutDuration,\n easing: this.easing\n });\n\n // 第二步:滑动出场(包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SlideOut,\n customParameters: {\n direction: this.params?.slideDirection || 'right',\n distance: this.params?.slideDistance || 50,\n fromOpacity: 1 // 起始透明度为1\n },\n duration: this.slideOutDuration,\n easing: this.easing,\n delay: this.spinOutDuration // 等第一步完成后再开始\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 动画逻辑由子动画处理\n }\n}\n\n/**\n * 脉冲/强调动画,通过循环变化透明度、颜色和缩放来吸引注意力\n */\nexport class PulseAnimate extends ACustomAnimate<Record<string, any>> {\n declare valid: boolean;\n private originalAttributes: Record<string, any> = {};\n private pulseCount: number = 3; // 默认3次脉冲\n private pulseOpacity: number = 0.3;\n private pulseScale: number = 1.05;\n private pulseColor: string | null = null;\n private pulseColorIntensity: number = 0.2;\n private strokeOnly: boolean = false;\n private fillOnly: boolean = false;\n private useScale: boolean = true;\n private useOpacity: boolean = true;\n private useStroke: boolean = true;\n private useFill: boolean = true;\n private useColor: boolean = false;\n private originalFill: string | null = null;\n private originalStroke: string | null = null;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IPulseAnimationOptions) {\n super(from, to, duration, easing, params);\n\n // 配置脉冲参数\n if (params?.pulseCount !== undefined) {\n this.pulseCount = params.pulseCount;\n }\n if (params?.pulseScale !== undefined) {\n this.pulseScale = params.pulseScale;\n }\n if (params?.pulseColor !== undefined) {\n this.pulseColor = params.pulseColor;\n }\n if (params?.pulseColorIntensity !== undefined) {\n this.pulseColorIntensity = params.pulseColorIntensity;\n }\n if (params?.strokeOnly !== undefined) {\n this.strokeOnly = params.strokeOnly;\n }\n if (params?.fillOnly !== undefined) {\n this.fillOnly = params.fillOnly;\n }\n if (params?.useScale !== undefined) {\n this.useScale = params.useScale;\n }\n if (params?.useOpacity !== undefined) {\n this.useOpacity = params.useOpacity;\n }\n if (params?.useStroke !== undefined) {\n this.useStroke = params.useStroke;\n }\n if (params?.useFill !== undefined) {\n this.useFill = params.useFill;\n }\n if (params?.useColor !== undefined) {\n this.useColor = params.useColor;\n }\n }\n\n onBind(): void {\n super.onBind();\n // 保存原始属性\n this.originalAttributes = { ...this.target.getAttributes() };\n\n // 保存颜色相关的属性\n if (this.useColor) {\n this.originalFill = this.originalAttributes.fill || null;\n this.originalStroke = this.originalAttributes.stroke || null;\n\n // 如果没有指定脉冲颜色,使用元素自身的颜色\n if (!this.pulseColor) {\n if (this.fillOnly && this.originalFill) {\n this.pulseColor = this.originalFill;\n } else if (this.strokeOnly && this.originalStroke) {\n this.pulseColor = this.originalStroke;\n } else if (this.originalFill) {\n this.pulseColor = this.originalFill;\n } else if (this.originalStroke) {\n this.pulseColor = this.originalStroke;\n } else {\n this.pulseColor = '#FFFFFF'; // 默认白色\n }\n }\n }\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 使用ratio计算脉冲效果\n // ratio从0到1表示整个动画的进度\n\n // 计算脉冲值:通过将单个进度映射到多个脉冲周期\n // 将0-1的ratio映射到0到pulseCount*2*PI的角度,用于sin函数\n const angle = ratio * Math.PI * this.pulseCount;\n // 将sin值(-1到1)映射到0到1的范围\n const pulseValue = Math.abs(Math.sin(angle));\n\n // 应用属性\n const attribute: Record<string, any> = this.target.attribute;\n\n // 应用透明度 pulse\n if (this.useOpacity) {\n // 确保即使是最小值也是基于原始透明度的百分比\n const opacity = 1 + (this.pulseOpacity - 1) * pulseValue;\n if (this.useStroke) {\n attribute.strokeOpacity = (this.originalAttributes.strokeOpacity || 1) * opacity;\n }\n if (this.useFill) {\n attribute.fillOpacity = (this.originalAttributes.fillOpacity || 1) * opacity;\n }\n }\n\n // 应用缩放脉冲\n if (this.useScale) {\n // 计算缩放比例: 从1到pulseScale之间变化\n const scale = 1 + (this.pulseScale - 1) * pulseValue;\n attribute.scaleX = (this.originalAttributes.scaleX || 1) * scale;\n attribute.scaleY = (this.originalAttributes.scaleY || 1) * scale;\n }\n\n // 应用颜色脉冲\n if (this.useColor && this.pulseColor) {\n this.applyColorPulse(attribute, pulseValue);\n }\n\n // 确保更新渲染\n this.target.addUpdateShapeAndBoundsTag();\n this.target.addUpdatePositionTag();\n }\n\n // 应用颜色脉冲\n private applyColorPulse(attribute: Record<string, any>, pulseValue: number): void {\n // 根据pulseColorIntensity调整颜色变化强度\n const colorRatio = this.pulseColorIntensity * pulseValue;\n\n // 应用填充颜色脉冲\n if (this.useFill && this.originalFill && this.pulseColor) {\n attribute.fill = interpolateColor(this.originalFill, this.pulseColor, colorRatio, true);\n }\n\n // 应用描边颜色脉冲\n if (this.useStroke && this.originalStroke && this.pulseColor) {\n attribute.stroke = interpolateColor(this.originalStroke, this.pulseColor, colorRatio, true);\n }\n }\n\n onEnd(): void {\n super.onEnd();\n // 恢复原始属性\n this.target.setAttributes(this.originalAttributes);\n }\n}\n"]}
@@ -0,0 +1,27 @@
1
+ import type { EasingType, IArea, ICurve, ICustomPath2D, IGraphic, ILine, ILineAttribute, IRect, IRectAttribute } from '@visactor/vrender-core';
2
+ import { ACustomAnimate } from './custom-animate';
3
+ import type { IPoint } from '@visactor/vutils';
4
+ export declare class StreamLight extends ACustomAnimate<any> {
5
+ valid: boolean;
6
+ target: IGraphic;
7
+ rect: IRect;
8
+ line: ILine;
9
+ area: IArea;
10
+ constructor(from: any, to: any, duration: number, easing: EasingType, params?: {
11
+ attribute?: Partial<IRectAttribute | ILineAttribute>;
12
+ streamLength?: number;
13
+ isHorizontal?: boolean;
14
+ });
15
+ getEndProps(): Record<string, any>;
16
+ onStart(): void;
17
+ onStartLineOrArea(type: 'line' | 'area'): void;
18
+ onStartRect(): void;
19
+ onBind(): void;
20
+ onEnd(): void;
21
+ onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
22
+ protected onUpdateRect(end: boolean, ratio: number, out: Record<string, any>): void;
23
+ protected onUpdateLineOrArea(end: boolean, ratio: number, out: Record<string, any>): void;
24
+ protected _onUpdateLineOrAreaWithCache(customPath: ICustomPath2D, g: ILine | IArea, end: boolean, ratio: number, out: Record<string, any>): void;
25
+ protected _updateCurves(customPath: ICustomPath2D, curves: ICurve<IPoint>[], totalLen: number, ratio: number): void;
26
+ protected _onUpdateLineWithoutCache(customPath: ICustomPath2D, line: ILine, end: boolean, ratio: number, out: Record<string, any>): void;
27
+ }