@visactor/vrender-animate 1.0.0-alpha.2 → 1.0.0-alpha.21

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 (186) hide show
  1. package/cjs/animate-extension.d.ts +3 -2
  2. package/cjs/animate-extension.js +5 -2
  3. package/cjs/animate-extension.js.map +1 -1
  4. package/cjs/animate.d.ts +1 -0
  5. package/cjs/animate.js +8 -5
  6. package/cjs/animate.js.map +1 -1
  7. package/cjs/config/morphing.d.ts +2 -0
  8. package/cjs/config/morphing.js +9 -0
  9. package/cjs/config/morphing.js.map +1 -0
  10. package/cjs/custom/clip-graphic.js +1 -1
  11. package/cjs/custom/clip-graphic.js.map +1 -1
  12. package/cjs/custom/clip.d.ts +1 -0
  13. package/cjs/custom/clip.js +9 -1
  14. package/cjs/custom/clip.js.map +1 -1
  15. package/cjs/custom/common.d.ts +0 -1
  16. package/cjs/custom/common.js +6 -9
  17. package/cjs/custom/common.js.map +1 -1
  18. package/cjs/custom/fade.js +7 -2
  19. package/cjs/custom/fade.js.map +1 -1
  20. package/cjs/custom/{from-to.js → fromTo.js} +6 -9
  21. package/cjs/custom/fromTo.js.map +1 -0
  22. package/cjs/custom/{group-fade.js → groupFade.js} +4 -3
  23. package/cjs/custom/groupFade.js.map +1 -0
  24. package/cjs/custom/growAngle.js +3 -2
  25. package/cjs/custom/growAngle.js.map +1 -1
  26. package/cjs/custom/growCenter.js +1 -1
  27. package/cjs/custom/growCenter.js.map +1 -1
  28. package/cjs/custom/growHeight.js +5 -5
  29. package/cjs/custom/growHeight.js.map +1 -1
  30. package/cjs/custom/growPoints.js +22 -21
  31. package/cjs/custom/growPoints.js.map +1 -1
  32. package/cjs/custom/growRadius.js +1 -1
  33. package/cjs/custom/growRadius.js.map +1 -1
  34. package/cjs/custom/growWidth.js +1 -1
  35. package/cjs/custom/growWidth.js.map +1 -1
  36. package/cjs/custom/morphing.d.ts +51 -0
  37. package/cjs/custom/morphing.js +298 -0
  38. package/cjs/custom/morphing.js.map +1 -0
  39. package/cjs/custom/motionPath.d.ts +21 -0
  40. package/cjs/custom/motionPath.js +31 -0
  41. package/cjs/custom/motionPath.js.map +1 -0
  42. package/cjs/custom/move.d.ts +4 -0
  43. package/cjs/custom/move.js +11 -11
  44. package/cjs/custom/move.js.map +1 -1
  45. package/cjs/custom/register.d.ts +27 -0
  46. package/cjs/custom/register.js +394 -4
  47. package/cjs/custom/register.js.map +1 -1
  48. package/cjs/custom/richtext/input-richtext.d.ts +4 -2
  49. package/cjs/custom/richtext/input-richtext.js +20 -10
  50. package/cjs/custom/richtext/input-richtext.js.map +1 -1
  51. package/cjs/custom/richtext/slide-richtext.js +1 -1
  52. package/cjs/custom/rotate.js +2 -1
  53. package/cjs/custom/rotate.js.map +1 -1
  54. package/cjs/custom/scale.js +7 -7
  55. package/cjs/custom/scale.js.map +1 -1
  56. package/cjs/custom/story.d.ts +68 -0
  57. package/cjs/custom/story.js +149 -3
  58. package/cjs/custom/story.js.map +1 -1
  59. package/cjs/custom/streamLight.d.ts +27 -0
  60. package/cjs/custom/streamLight.js +161 -0
  61. package/cjs/custom/streamLight.js.map +1 -0
  62. package/cjs/custom/tag-points.js +4 -1
  63. package/cjs/custom/tag-points.js.map +1 -1
  64. package/cjs/custom/update.js +2 -3
  65. package/cjs/custom/update.js.map +1 -1
  66. package/cjs/executor/animate-executor.d.ts +1 -1
  67. package/cjs/executor/animate-executor.js +69 -63
  68. package/cjs/executor/animate-executor.js.map +1 -1
  69. package/cjs/index.d.ts +3 -2
  70. package/cjs/index.js +34 -14
  71. package/cjs/index.js.map +1 -1
  72. package/cjs/state/animation-states-registry.js +18 -0
  73. package/cjs/state/animation-states-registry.js.map +1 -1
  74. package/cjs/step.d.ts +2 -0
  75. package/cjs/step.js +10 -2
  76. package/cjs/step.js.map +1 -1
  77. package/cjs/ticker/default-ticker.d.ts +3 -2
  78. package/cjs/ticker/default-ticker.js +9 -6
  79. package/cjs/ticker/default-ticker.js.map +1 -1
  80. package/cjs/ticker/manual-ticker.d.ts +6 -1
  81. package/cjs/ticker/manual-ticker.js +26 -4
  82. package/cjs/ticker/manual-ticker.js.map +1 -1
  83. package/cjs/timeline.d.ts +13 -5
  84. package/cjs/timeline.js +31 -18
  85. package/cjs/timeline.js.map +1 -1
  86. package/cjs/utils/transform.d.ts +2 -0
  87. package/cjs/utils/transform.js +10 -0
  88. package/cjs/utils/transform.js.map +1 -0
  89. package/dist/index.es.js +1374 -186
  90. package/es/animate-extension.d.ts +3 -2
  91. package/es/animate-extension.js +5 -2
  92. package/es/animate-extension.js.map +1 -1
  93. package/es/animate.d.ts +1 -0
  94. package/es/animate.js +8 -5
  95. package/es/animate.js.map +1 -1
  96. package/es/config/morphing.d.ts +2 -0
  97. package/es/config/morphing.js +5 -0
  98. package/es/config/morphing.js.map +1 -0
  99. package/es/custom/clip-graphic.js +1 -1
  100. package/es/custom/clip-graphic.js.map +1 -1
  101. package/es/custom/clip.d.ts +1 -0
  102. package/es/custom/clip.js +9 -1
  103. package/es/custom/clip.js.map +1 -1
  104. package/es/custom/common.d.ts +0 -1
  105. package/es/custom/common.js +6 -9
  106. package/es/custom/common.js.map +1 -1
  107. package/es/custom/fade.js +7 -2
  108. package/es/custom/fade.js.map +1 -1
  109. package/es/custom/{from-to.js → fromTo.js} +6 -9
  110. package/es/custom/fromTo.js.map +1 -0
  111. package/es/custom/{group-fade.js → groupFade.js} +4 -3
  112. package/es/custom/groupFade.js.map +1 -0
  113. package/es/custom/growAngle.js +3 -2
  114. package/es/custom/growAngle.js.map +1 -1
  115. package/es/custom/growCenter.js +1 -1
  116. package/es/custom/growCenter.js.map +1 -1
  117. package/es/custom/growHeight.js +5 -5
  118. package/es/custom/growHeight.js.map +1 -1
  119. package/es/custom/growPoints.js +22 -21
  120. package/es/custom/growPoints.js.map +1 -1
  121. package/es/custom/growRadius.js +1 -1
  122. package/es/custom/growRadius.js.map +1 -1
  123. package/es/custom/growWidth.js +1 -1
  124. package/es/custom/growWidth.js.map +1 -1
  125. package/es/custom/morphing.d.ts +51 -0
  126. package/es/custom/morphing.js +289 -0
  127. package/es/custom/morphing.js.map +1 -0
  128. package/es/custom/motionPath.d.ts +21 -0
  129. package/es/custom/motionPath.js +23 -0
  130. package/es/custom/motionPath.js.map +1 -0
  131. package/es/custom/move.d.ts +4 -0
  132. package/es/custom/move.js +10 -10
  133. package/es/custom/move.js.map +1 -1
  134. package/es/custom/register.d.ts +27 -0
  135. package/es/custom/register.js +15 -5
  136. package/es/custom/register.js.map +1 -1
  137. package/es/custom/richtext/input-richtext.d.ts +4 -2
  138. package/es/custom/richtext/input-richtext.js +20 -10
  139. package/es/custom/richtext/input-richtext.js.map +1 -1
  140. package/es/custom/richtext/slide-richtext.js +1 -1
  141. package/es/custom/rotate.js +2 -1
  142. package/es/custom/rotate.js.map +1 -1
  143. package/es/custom/scale.js +7 -7
  144. package/es/custom/scale.js.map +1 -1
  145. package/es/custom/story.d.ts +68 -0
  146. package/es/custom/story.js +142 -1
  147. package/es/custom/story.js.map +1 -1
  148. package/es/custom/streamLight.d.ts +27 -0
  149. package/es/custom/streamLight.js +157 -0
  150. package/es/custom/streamLight.js.map +1 -0
  151. package/es/custom/tag-points.js +4 -1
  152. package/es/custom/tag-points.js.map +1 -1
  153. package/es/custom/update.js +2 -3
  154. package/es/custom/update.js.map +1 -1
  155. package/es/executor/animate-executor.d.ts +1 -1
  156. package/es/executor/animate-executor.js +68 -61
  157. package/es/executor/animate-executor.js.map +1 -1
  158. package/es/index.d.ts +3 -2
  159. package/es/index.js +4 -2
  160. package/es/index.js.map +1 -1
  161. package/es/state/animation-states-registry.js +18 -0
  162. package/es/state/animation-states-registry.js.map +1 -1
  163. package/es/step.d.ts +2 -0
  164. package/es/step.js +10 -2
  165. package/es/step.js.map +1 -1
  166. package/es/ticker/default-ticker.d.ts +3 -2
  167. package/es/ticker/default-ticker.js +9 -6
  168. package/es/ticker/default-ticker.js.map +1 -1
  169. package/es/ticker/manual-ticker.d.ts +6 -1
  170. package/es/ticker/manual-ticker.js +27 -3
  171. package/es/ticker/manual-ticker.js.map +1 -1
  172. package/es/timeline.d.ts +13 -5
  173. package/es/timeline.js +32 -17
  174. package/es/timeline.js.map +1 -1
  175. package/es/utils/transform.d.ts +2 -0
  176. package/es/utils/transform.js +4 -0
  177. package/es/utils/transform.js.map +1 -0
  178. package/package.json +5 -5
  179. package/cjs/custom/from-to.js.map +0 -1
  180. package/cjs/custom/group-fade.js.map +0 -1
  181. package/es/custom/from-to.js.map +0 -1
  182. package/es/custom/group-fade.js.map +0 -1
  183. /package/cjs/custom/{from-to.d.ts → fromTo.d.ts} +0 -0
  184. /package/cjs/custom/{group-fade.d.ts → groupFade.d.ts} +0 -0
  185. /package/es/custom/{from-to.d.ts → fromTo.d.ts} +0 -0
  186. /package/es/custom/{group-fade.d.ts → groupFade.d.ts} +0 -0
@@ -5,14 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  }), exports.MoveOut = exports.MoveIn = exports.MoveBase = exports.moveOut = exports.moveIn = void 0;
6
6
 
7
7
  const vutils_1 = require("@visactor/vutils"), custom_animate_1 = require("./custom-animate"), moveIn = (graphic, options, animationParameters) => {
8
- var _a, _b;
9
- const {offset: offset = 0, orient: orient, direction: direction, point: pointOpt, excludeChannels: excludeChannels = []} = null != options ? options : {};
8
+ var _a, _b, _c, _d;
9
+ const {offset: offset = 0, orient: orient, direction: direction, point: pointOpt, excludeChannels: excludeChannels = [], layoutRect: layoutRect = {}} = null != options ? options : {};
10
10
  let changedX = 0, changedY = 0;
11
- "negative" === orient && (animationParameters.group ? (changedX = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(),
12
- changedY = null !== (_b = animationParameters.groupHeight) && void 0 !== _b ? _b : animationParameters.group.getBounds().height(),
13
- animationParameters.groupWidth = changedX, animationParameters.groupHeight = changedY) : (changedX = animationParameters.width,
14
- changedY = animationParameters.height)), changedX += offset, changedY += offset;
15
- const point = (0, vutils_1.isFunction)(pointOpt) ? pointOpt.call(null, graphic.getDatum(), graphic, animationParameters) : pointOpt, fromX = point && (0,
11
+ "negative" === orient && (changedX = null !== (_a = layoutRect.width) && void 0 !== _a ? _a : graphic.stage.viewWidth,
12
+ changedY = null !== (_b = layoutRect.height) && void 0 !== _b ? _b : graphic.stage.viewHeight),
13
+ changedX += offset, changedY += offset;
14
+ const point = (0, vutils_1.isFunction)(pointOpt) ? pointOpt.call(null, null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, animationParameters) : pointOpt, fromX = point && (0,
16
15
  vutils_1.isValidNumber)(point.x) ? point.x : changedX, fromY = point && (0, vutils_1.isValidNumber)(point.y) ? point.y : changedY, finalAttrs = graphic.getFinalAttribute(), finalAttrsX = excludeChannels.includes("x") ? graphic.attribute.x : finalAttrs.x, finalAttrsY = excludeChannels.includes("y") ? graphic.attribute.y : finalAttrs.y;
17
16
  switch (direction) {
18
17
  case "x":
@@ -52,9 +51,9 @@ const vutils_1 = require("@visactor/vutils"), custom_animate_1 = require("./cust
52
51
  exports.moveIn = moveIn;
53
52
 
54
53
  const moveOut = (graphic, options, animationParameters) => {
55
- var _a, _b;
56
- const {offset: offset = 0, orient: orient, direction: direction, point: pointOpt} = null != options ? options : {}, groupBounds = animationParameters.group ? animationParameters.group.getBounds() : null, groupWidth = null !== (_a = null == groupBounds ? void 0 : groupBounds.width()) && void 0 !== _a ? _a : animationParameters.width, groupHeight = null !== (_b = null == groupBounds ? void 0 : groupBounds.height()) && void 0 !== _b ? _b : animationParameters.height, changedX = ("negative" === orient ? groupWidth : 0) + offset, changedY = ("negative" === orient ? groupHeight : 0) + offset, point = (0,
57
- vutils_1.isFunction)(pointOpt) ? pointOpt.call(null, graphic.getDatum(), graphic, animationParameters) : pointOpt, fromX = point && (0,
54
+ var _a, _b, _c, _d, _e, _f;
55
+ const {offset: offset = 0, orient: orient, direction: direction, point: pointOpt} = null != options ? options : {}, groupWidth = null !== (_b = null === (_a = options.layoutRect) || void 0 === _a ? void 0 : _a.width) && void 0 !== _b ? _b : graphic.stage.viewWidth, groupHeight = null !== (_d = null === (_c = options.layoutRect) || void 0 === _c ? void 0 : _c.height) && void 0 !== _d ? _d : graphic.stage.viewHeight, changedX = ("negative" === orient ? groupWidth : 0) + offset, changedY = ("negative" === orient ? groupHeight : 0) + offset, point = (0,
56
+ vutils_1.isFunction)(pointOpt) ? pointOpt.call(null, null === (_f = null === (_e = graphic.context) || void 0 === _e ? void 0 : _e.data) || void 0 === _f ? void 0 : _f[0], graphic, animationParameters) : pointOpt, fromX = point && (0,
58
57
  vutils_1.isValidNumber)(point.x) ? point.x : changedX, fromY = point && (0, vutils_1.isValidNumber)(point.y) ? point.y : changedY;
59
58
  switch (direction) {
60
59
  case "x":
@@ -109,12 +108,13 @@ exports.MoveBase = MoveBase;
109
108
 
110
109
  class MoveIn extends MoveBase {
111
110
  onBind() {
111
+ var _a;
112
112
  super.onBind();
113
113
  const {from: from, to: to} = (0, exports.moveIn)(this.target, this.params.options, this.params);
114
114
  this.props = to, this.propKeys = Object.keys(to).filter((key => null != to[key])),
115
115
  this.from = from, this.to = to;
116
116
  const finalAttribute = this.target.getFinalAttribute();
117
- finalAttribute && Object.assign(this.target.attribute, finalAttribute), this.target.setAttributes(from);
117
+ finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_a = this.params.controlOptions) || void 0 === _a ? void 0 : _a.immediatelyApply) && this.target.setAttributes(from);
118
118
  }
119
119
  }
120
120
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/custom/move.ts"],"names":[],"mappings":";;;AACA,6CAA6D;AAC7D,qDAAkD;AAwB3C,MAAM,MAAM,GAAG,CACpB,OAAiB,EACjB,OAA8B,EAC9B,mBAAyC,EACzC,EAAE;;IACF,MAAM,EAAE,MAAM,GAAG,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,eAAe,GAAG,EAAE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ourcesContent":["import type { EasingType, IGraphic, IGroup } from '@visactor/vrender-core';\nimport { isFunction, isValidNumber } from '@visactor/vutils';\nimport { ACustomAnimate } from './custom-animate';\n\nexport type FunctionCallback<T> = (...args: any[]) => T;\n\nexport interface IMoveAnimationOptions {\n direction?: 'x' | 'y' | 'xy';\n orient?: 'positive' | 'negative';\n offset?: number;\n point?: { x?: number; y?: number } | FunctionCallback<{ x?: number; y?: number }>;\n excludeChannels?: string[];\n}\n\ninterface IAnimationParameters {\n width: number;\n height: number;\n group: IGroup;\n elementIndex: number;\n elementCount: number;\n view: any;\n}\n\n// When user did not provide proper x/y value, move animation will never work properly,\n// due to that, default x/y value won't be set.\n\nexport const moveIn = (\n graphic: IGraphic,\n options: IMoveAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n const { offset = 0, orient, direction, point: pointOpt, excludeChannels = [] } = options ?? {};\n let changedX = 0;\n let changedY = 0;\n\n if (orient === 'negative') {\n // consider the offset of group\n if (animationParameters.group) {\n changedX = (animationParameters as any).groupWidth ?? animationParameters.group.getBounds().width();\n changedY = (animationParameters as any).groupHeight ?? animationParameters.group.getBounds().height();\n\n (animationParameters as any).groupWidth = changedX;\n (animationParameters as any).groupHeight = changedY;\n } else {\n changedX = animationParameters.width;\n changedY = animationParameters.height;\n }\n }\n\n changedX += offset;\n changedY += offset;\n const point = isFunction(pointOpt) ? pointOpt.call(null, graphic.getDatum(), graphic, animationParameters) : pointOpt;\n const fromX = point && isValidNumber(point.x) ? point.x : changedX;\n const fromY = point && isValidNumber(point.y) ? point.y : changedY;\n const finalAttrs = graphic.getFinalAttribute();\n const finalAttrsX = excludeChannels.includes('x') ? graphic.attribute.x : finalAttrs.x;\n const finalAttrsY = excludeChannels.includes('y') ? graphic.attribute.y : finalAttrs.y;\n\n switch (direction) {\n case 'x':\n return {\n from: { x: fromX },\n to: { x: finalAttrsX }\n };\n case 'y':\n return {\n from: { y: fromY },\n to: { y: finalAttrsY }\n };\n case 'xy':\n default:\n return {\n from: { x: fromX, y: fromY },\n to: {\n x: finalAttrsX,\n y: finalAttrsY\n }\n };\n }\n};\n\nexport const moveOut = (\n graphic: IGraphic,\n options: IMoveAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n const { offset = 0, orient, direction, point: pointOpt } = options ?? {};\n\n // consider the offset of group\n const groupBounds = animationParameters.group ? animationParameters.group.getBounds() : null;\n const groupWidth = groupBounds?.width() ?? animationParameters.width;\n const groupHeight = groupBounds?.height() ?? animationParameters.height;\n const changedX = (orient === 'negative' ? groupWidth : 0) + offset;\n const changedY = (orient === 'negative' ? groupHeight : 0) + offset;\n const point = isFunction(pointOpt) ? pointOpt.call(null, graphic.getDatum(), graphic, animationParameters) : pointOpt;\n const fromX = point && isValidNumber(point.x) ? point.x : changedX;\n const fromY = point && isValidNumber(point.y) ? point.y : changedY;\n\n switch (direction) {\n case 'x':\n return {\n from: { x: graphic.attribute.x },\n to: { x: fromX }\n };\n case 'y':\n return {\n from: { y: graphic.attribute.y },\n to: { y: fromY }\n };\n case 'xy':\n default:\n return {\n from: {\n x: graphic.attribute.x,\n y: graphic.attribute.y\n },\n to: { x: fromX, y: fromY }\n };\n }\n};\n\nexport class MoveBase extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: any) {\n super(from, to, duration, easing, params);\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 */\nexport class MoveIn extends MoveBase {\n onBind(): void {\n super.onBind();\n const { from, to } = moveIn(this.target, this.params.options, this.params);\n this.props = to;\n this.propKeys = Object.keys(to).filter(key => (to as any)[key] != null);\n this.from = from;\n this.to = to;\n\n // 用于入场的时候设置属性(因为有动画的时候VChart不会再设置属性了)\n const finalAttribute = this.target.getFinalAttribute();\n if (finalAttribute) {\n Object.assign(this.target.attribute, finalAttribute);\n }\n this.target.setAttributes(from);\n }\n}\n\nexport class MoveOut extends MoveBase {\n onBind(): void {\n super.onBind();\n const { from, to } = moveOut(this.target, this.params.options, this.params);\n this.props = to;\n this.propKeys = Object.keys(to).filter(key => (to as any)[key] != null);\n this.from = from;\n this.to = to;\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/custom/move.ts"],"names":[],"mappings":";;;AACA,6CAA6D;AAC7D,qDAAkD;AAyB3C,MAAM,MAAM,GAAG,CACpB,OAAiB,EACjB,OAA8B,EAC9B,mBAAyC,EACzC,EAAE;;IACF,MAAM,EAAE,MAAM,GAAG,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,eAAe,GAAG,EAAE,EAAE,UAAU,GAAG,EAAE,EAAE,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC;IAChH,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,IAAI,QAAQ,GAAG,CAAC,CAAC;IAEjB,IAAI,MAAM,KAAK,UAAU,EAAE;QACzB,QAAQ,GAAG,MAAC,UAAkB,CAAC,KAAK,mCAAI,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC;QAChE,QAAQ,GAAG,MAAC,UAAkB,CAAC,MAAM,mCAAI,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC;KACnE;IAED,QAAQ,IAAI,MAAM,CAAC;IACnB,QAAQ,IAAI,MAAM,CAAC;IACnB,MAAM,KAAK,GAAG,IAAA,mBAAU,EAAC,QAAQ,CAAC;QAChC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,MAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,IAAI,0CAAG,CAAC,CAAC,EAAE,OAAO,EAAE,mBAAmB,CAAC;QAC/E,CAAC,CAAC,QAAQ,CAAC;IACb,MAAM,KAAK,GA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,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAE,EAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC;QACxE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;CACF;AATD,0BASC","file":"move.js","sourcesContent":["import type { EasingType, IGraphic, IGroup } from '@visactor/vrender-core';\nimport { isFunction, isValidNumber } from '@visactor/vutils';\nimport { ACustomAnimate } from './custom-animate';\n\nexport type FunctionCallback<T> = (...args: any[]) => T;\n\nexport interface IMoveAnimationOptions {\n direction?: 'x' | 'y' | 'xy';\n orient?: 'positive' | 'negative';\n offset?: number;\n point?: { x?: number; y?: number } | FunctionCallback<{ x?: number; y?: number }>;\n excludeChannels?: string[];\n layoutRect?: { width: number; height: number };\n}\n\ninterface IAnimationParameters {\n width: number;\n height: number;\n group: IGroup;\n elementIndex: number;\n elementCount: number;\n view: any;\n}\n\n// When user did not provide proper x/y value, move animation will never work properly,\n// due to that, default x/y value won't be set.\n\nexport const moveIn = (\n graphic: IGraphic,\n options: IMoveAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n const { offset = 0, orient, direction, point: pointOpt, excludeChannels = [], layoutRect = {} } = options ?? {};\n let changedX = 0;\n let changedY = 0;\n\n if (orient === 'negative') {\n changedX = (layoutRect as any).width ?? graphic.stage.viewWidth;\n changedY = (layoutRect as any).height ?? graphic.stage.viewHeight;\n }\n\n changedX += offset;\n changedY += offset;\n const point = isFunction(pointOpt)\n ? pointOpt.call(null, graphic.context?.data?.[0], graphic, animationParameters)\n : pointOpt;\n const fromX = point && isValidNumber(point.x) ? point.x : changedX;\n const fromY = point && isValidNumber(point.y) ? point.y : changedY;\n const finalAttrs = graphic.getFinalAttribute();\n const finalAttrsX = excludeChannels.includes('x') ? graphic.attribute.x : finalAttrs.x;\n const finalAttrsY = excludeChannels.includes('y') ? graphic.attribute.y : finalAttrs.y;\n\n switch (direction) {\n case 'x':\n return {\n from: { x: fromX },\n to: { x: finalAttrsX }\n };\n case 'y':\n return {\n from: { y: fromY },\n to: { y: finalAttrsY }\n };\n case 'xy':\n default:\n return {\n from: { x: fromX, y: fromY },\n to: {\n x: finalAttrsX,\n y: finalAttrsY\n }\n };\n }\n};\n\nexport const moveOut = (\n graphic: IGraphic,\n options: IMoveAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n const { offset = 0, orient, direction, point: pointOpt } = options ?? {};\n\n // consider the offset of group\n // const groupBounds = graphic.parent ? graphic.parent.getBounds() : null;\n const groupWidth = options.layoutRect?.width ?? graphic.stage.viewWidth;\n const groupHeight = options.layoutRect?.height ?? graphic.stage.viewHeight;\n const changedX = (orient === 'negative' ? groupWidth : 0) + offset;\n const changedY = (orient === 'negative' ? groupHeight : 0) + offset;\n const point = isFunction(pointOpt)\n ? pointOpt.call(null, graphic.context?.data?.[0], graphic, animationParameters)\n : pointOpt;\n const fromX = point && isValidNumber(point.x) ? point.x : changedX;\n const fromY = point && isValidNumber(point.y) ? point.y : changedY;\n\n switch (direction) {\n case 'x':\n return {\n from: { x: graphic.attribute.x },\n to: { x: fromX }\n };\n case 'y':\n return {\n from: { y: graphic.attribute.y },\n to: { y: fromY }\n };\n case 'xy':\n default:\n return {\n from: {\n x: graphic.attribute.x,\n y: graphic.attribute.y\n },\n to: { x: fromX, y: fromY }\n };\n }\n};\n\nexport class MoveBase extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: any) {\n super(from, to, duration, easing, params);\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 */\nexport class MoveIn extends MoveBase {\n onBind(): void {\n super.onBind();\n const { from, to } = moveIn(this.target, this.params.options, this.params);\n this.props = to;\n this.propKeys = Object.keys(to).filter(key => (to as any)[key] != null);\n this.from = from;\n this.to = to;\n\n // 用于入场的时候设置属性(因为有动画的时候VChart不会再设置属性了)\n const finalAttribute = this.target.getFinalAttribute();\n if (finalAttribute) {\n this.target.setAttributes(finalAttribute);\n }\n\n if (this.params.controlOptions?.immediatelyApply !== false) {\n this.target.setAttributes(from);\n }\n }\n}\n\nexport class MoveOut extends MoveBase {\n onBind(): void {\n super.onBind();\n const { from, to } = moveOut(this.target, this.params.options, this.params);\n this.props = to;\n this.propKeys = Object.keys(to).filter(key => (to as any)[key] != null);\n this.from = from;\n this.to = to;\n }\n}\n"]}
@@ -1 +1,28 @@
1
+ import { ClipIn, ClipOut } from './clip';
2
+ import { FadeIn, FadeOut } from './fade';
3
+ import { GrowAngleIn, GrowAngleOut } from './growAngle';
4
+ import { GrowCenterIn, GrowCenterOut } from './growCenter';
5
+ import { GrowHeightIn, GrowHeightOut } from './growHeight';
6
+ import { GrowPointsIn, GrowPointsOut, GrowPointsXIn, GrowPointsXOut, GrowPointsYIn, GrowPointsYOut } from './growPoints';
7
+ import { GrowRadiusIn, GrowRadiusOut } from './growRadius';
8
+ import { GrowWidthIn, GrowWidthOut } from './growWidth';
9
+ import { InputText } from './input-text';
10
+ import { LabelItemAppear, LabelItemDisappear } from './label-item-animate';
11
+ import { IncreaseCount } from './number';
12
+ import { PoptipAppear, PoptipDisappear } from './poptip-animate';
13
+ import { InputRichText } from './richtext/input-richtext';
14
+ import { OutputRichText } from './richtext/output-richtext';
15
+ import { SlideRichText } from './richtext/slide-richtext';
16
+ import { SlideOutRichText } from './richtext/slide-out-richtext';
17
+ import { ScaleIn, ScaleOut } from './scale';
18
+ import { State } from './state';
19
+ import { GrowIn, GrowOut, MoveRotateIn, MoveRotateOut, MoveScaleIn, MoveScaleOut, PulseAnimate, SlideIn, SlideOut, SpinIn, SpinOut, StrokeIn, StrokeOut } from './story';
20
+ import { Update } from './update';
21
+ import { MoveIn, MoveOut } from './move';
22
+ import { RotateIn, RotateOut } from './rotate';
23
+ import { MotionPath } from './motionPath';
24
+ import { FromTo } from './fromTo';
25
+ import { GroupFadeIn, GroupFadeOut } from './groupFade';
26
+ import { StreamLight } from './streamLight';
1
27
  export declare const registerCustomAnimate: () => void;
28
+ export { ClipIn, ClipOut, FadeIn, FadeOut, GrowAngleIn, GrowAngleOut, GrowCenterIn, GrowCenterOut, GrowHeightIn, GrowHeightOut, GrowPointsIn, GrowPointsOut, GrowPointsXIn, GrowPointsXOut, GrowPointsYIn, GrowPointsYOut, GrowRadiusIn, GrowRadiusOut, GrowWidthIn, GrowWidthOut, IncreaseCount, PoptipAppear, PoptipDisappear, ScaleIn, ScaleOut, MoveIn, MoveOut, RotateIn, RotateOut, State, Update, MotionPath, LabelItemAppear, LabelItemDisappear, InputText, InputRichText, OutputRichText, SlideRichText, SlideOutRichText, SlideIn, GrowIn, SpinIn, MoveScaleIn, MoveRotateIn, SlideOut, GrowOut, SpinOut, MoveScaleOut, MoveRotateOut, StrokeIn, StrokeOut, PulseAnimate, GroupFadeIn, GroupFadeOut, FromTo, StreamLight };
@@ -2,11 +2,396 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
- }), exports.registerCustomAnimate = void 0;
5
+ }), exports.MoveRotateOut = exports.MoveScaleOut = exports.SpinOut = exports.GrowOut = exports.SlideOut = exports.MoveRotateIn = exports.MoveScaleIn = exports.SpinIn = exports.GrowIn = exports.SlideIn = exports.SlideOutRichText = exports.SlideRichText = exports.OutputRichText = exports.InputRichText = exports.InputText = exports.LabelItemDisappear = exports.LabelItemAppear = exports.MotionPath = exports.Update = exports.State = exports.RotateOut = exports.RotateIn = exports.MoveOut = exports.MoveIn = exports.ScaleOut = exports.ScaleIn = exports.PoptipDisappear = exports.PoptipAppear = exports.IncreaseCount = exports.GrowWidthOut = exports.GrowWidthIn = exports.GrowRadiusOut = exports.GrowRadiusIn = exports.GrowPointsYOut = exports.GrowPointsYIn = exports.GrowPointsXOut = exports.GrowPointsXIn = exports.GrowPointsOut = exports.GrowPointsIn = exports.GrowHeightOut = exports.GrowHeightIn = exports.GrowCenterOut = exports.GrowCenterIn = exports.GrowAngleOut = exports.GrowAngleIn = exports.FadeOut = exports.FadeIn = exports.ClipOut = exports.ClipIn = exports.registerCustomAnimate = void 0,
6
+ exports.StreamLight = exports.FromTo = exports.GroupFadeOut = exports.GroupFadeIn = exports.PulseAnimate = exports.StrokeOut = exports.StrokeIn = void 0;
6
7
 
7
- const animate_executor_1 = require("../executor/animate-executor"), clip_1 = require("./clip"), fade_1 = require("./fade"), growAngle_1 = require("./growAngle"), growCenter_1 = require("./growCenter"), growHeight_1 = require("./growHeight"), growPoints_1 = require("./growPoints"), growRadius_1 = require("./growRadius"), growWidth_1 = require("./growWidth"), input_text_1 = require("./input-text"), label_item_animate_1 = require("./label-item-animate"), number_1 = require("./number"), poptip_animate_1 = require("./poptip-animate"), input_richtext_1 = require("./richtext/input-richtext"), output_richtext_1 = require("./richtext/output-richtext"), slide_richtext_1 = require("./richtext/slide-richtext"), slide_out_richtext_1 = require("./richtext/slide-out-richtext"), scale_1 = require("./scale"), state_1 = require("./state"), story_1 = require("./story"), update_1 = require("./update"), move_1 = require("./move"), rotate_1 = require("./rotate"), from_to_1 = require("./from-to"), registerCustomAnimate = () => {
8
+ const animate_executor_1 = require("../executor/animate-executor"), clip_1 = require("./clip");
9
+
10
+ Object.defineProperty(exports, "ClipIn", {
11
+ enumerable: !0,
12
+ get: function() {
13
+ return clip_1.ClipIn;
14
+ }
15
+ }), Object.defineProperty(exports, "ClipOut", {
16
+ enumerable: !0,
17
+ get: function() {
18
+ return clip_1.ClipOut;
19
+ }
20
+ });
21
+
22
+ const fade_1 = require("./fade");
23
+
24
+ Object.defineProperty(exports, "FadeIn", {
25
+ enumerable: !0,
26
+ get: function() {
27
+ return fade_1.FadeIn;
28
+ }
29
+ }), Object.defineProperty(exports, "FadeOut", {
30
+ enumerable: !0,
31
+ get: function() {
32
+ return fade_1.FadeOut;
33
+ }
34
+ });
35
+
36
+ const growAngle_1 = require("./growAngle");
37
+
38
+ Object.defineProperty(exports, "GrowAngleIn", {
39
+ enumerable: !0,
40
+ get: function() {
41
+ return growAngle_1.GrowAngleIn;
42
+ }
43
+ }), Object.defineProperty(exports, "GrowAngleOut", {
44
+ enumerable: !0,
45
+ get: function() {
46
+ return growAngle_1.GrowAngleOut;
47
+ }
48
+ });
49
+
50
+ const growCenter_1 = require("./growCenter");
51
+
52
+ Object.defineProperty(exports, "GrowCenterIn", {
53
+ enumerable: !0,
54
+ get: function() {
55
+ return growCenter_1.GrowCenterIn;
56
+ }
57
+ }), Object.defineProperty(exports, "GrowCenterOut", {
58
+ enumerable: !0,
59
+ get: function() {
60
+ return growCenter_1.GrowCenterOut;
61
+ }
62
+ });
63
+
64
+ const growHeight_1 = require("./growHeight");
65
+
66
+ Object.defineProperty(exports, "GrowHeightIn", {
67
+ enumerable: !0,
68
+ get: function() {
69
+ return growHeight_1.GrowHeightIn;
70
+ }
71
+ }), Object.defineProperty(exports, "GrowHeightOut", {
72
+ enumerable: !0,
73
+ get: function() {
74
+ return growHeight_1.GrowHeightOut;
75
+ }
76
+ });
77
+
78
+ const growPoints_1 = require("./growPoints");
79
+
80
+ Object.defineProperty(exports, "GrowPointsIn", {
81
+ enumerable: !0,
82
+ get: function() {
83
+ return growPoints_1.GrowPointsIn;
84
+ }
85
+ }), Object.defineProperty(exports, "GrowPointsOut", {
86
+ enumerable: !0,
87
+ get: function() {
88
+ return growPoints_1.GrowPointsOut;
89
+ }
90
+ }), Object.defineProperty(exports, "GrowPointsXIn", {
91
+ enumerable: !0,
92
+ get: function() {
93
+ return growPoints_1.GrowPointsXIn;
94
+ }
95
+ }), Object.defineProperty(exports, "GrowPointsXOut", {
96
+ enumerable: !0,
97
+ get: function() {
98
+ return growPoints_1.GrowPointsXOut;
99
+ }
100
+ }), Object.defineProperty(exports, "GrowPointsYIn", {
101
+ enumerable: !0,
102
+ get: function() {
103
+ return growPoints_1.GrowPointsYIn;
104
+ }
105
+ }), Object.defineProperty(exports, "GrowPointsYOut", {
106
+ enumerable: !0,
107
+ get: function() {
108
+ return growPoints_1.GrowPointsYOut;
109
+ }
110
+ });
111
+
112
+ const growRadius_1 = require("./growRadius");
113
+
114
+ Object.defineProperty(exports, "GrowRadiusIn", {
115
+ enumerable: !0,
116
+ get: function() {
117
+ return growRadius_1.GrowRadiusIn;
118
+ }
119
+ }), Object.defineProperty(exports, "GrowRadiusOut", {
120
+ enumerable: !0,
121
+ get: function() {
122
+ return growRadius_1.GrowRadiusOut;
123
+ }
124
+ });
125
+
126
+ const growWidth_1 = require("./growWidth");
127
+
128
+ Object.defineProperty(exports, "GrowWidthIn", {
129
+ enumerable: !0,
130
+ get: function() {
131
+ return growWidth_1.GrowWidthIn;
132
+ }
133
+ }), Object.defineProperty(exports, "GrowWidthOut", {
134
+ enumerable: !0,
135
+ get: function() {
136
+ return growWidth_1.GrowWidthOut;
137
+ }
138
+ });
139
+
140
+ const input_text_1 = require("./input-text");
141
+
142
+ Object.defineProperty(exports, "InputText", {
143
+ enumerable: !0,
144
+ get: function() {
145
+ return input_text_1.InputText;
146
+ }
147
+ });
148
+
149
+ const label_item_animate_1 = require("./label-item-animate");
150
+
151
+ Object.defineProperty(exports, "LabelItemAppear", {
152
+ enumerable: !0,
153
+ get: function() {
154
+ return label_item_animate_1.LabelItemAppear;
155
+ }
156
+ }), Object.defineProperty(exports, "LabelItemDisappear", {
157
+ enumerable: !0,
158
+ get: function() {
159
+ return label_item_animate_1.LabelItemDisappear;
160
+ }
161
+ });
162
+
163
+ const number_1 = require("./number");
164
+
165
+ Object.defineProperty(exports, "IncreaseCount", {
166
+ enumerable: !0,
167
+ get: function() {
168
+ return number_1.IncreaseCount;
169
+ }
170
+ });
171
+
172
+ const poptip_animate_1 = require("./poptip-animate");
173
+
174
+ Object.defineProperty(exports, "PoptipAppear", {
175
+ enumerable: !0,
176
+ get: function() {
177
+ return poptip_animate_1.PoptipAppear;
178
+ }
179
+ }), Object.defineProperty(exports, "PoptipDisappear", {
180
+ enumerable: !0,
181
+ get: function() {
182
+ return poptip_animate_1.PoptipDisappear;
183
+ }
184
+ });
185
+
186
+ const input_richtext_1 = require("./richtext/input-richtext");
187
+
188
+ Object.defineProperty(exports, "InputRichText", {
189
+ enumerable: !0,
190
+ get: function() {
191
+ return input_richtext_1.InputRichText;
192
+ }
193
+ });
194
+
195
+ const output_richtext_1 = require("./richtext/output-richtext");
196
+
197
+ Object.defineProperty(exports, "OutputRichText", {
198
+ enumerable: !0,
199
+ get: function() {
200
+ return output_richtext_1.OutputRichText;
201
+ }
202
+ });
203
+
204
+ const slide_richtext_1 = require("./richtext/slide-richtext");
205
+
206
+ Object.defineProperty(exports, "SlideRichText", {
207
+ enumerable: !0,
208
+ get: function() {
209
+ return slide_richtext_1.SlideRichText;
210
+ }
211
+ });
212
+
213
+ const slide_out_richtext_1 = require("./richtext/slide-out-richtext");
214
+
215
+ Object.defineProperty(exports, "SlideOutRichText", {
216
+ enumerable: !0,
217
+ get: function() {
218
+ return slide_out_richtext_1.SlideOutRichText;
219
+ }
220
+ });
221
+
222
+ const scale_1 = require("./scale");
223
+
224
+ Object.defineProperty(exports, "ScaleIn", {
225
+ enumerable: !0,
226
+ get: function() {
227
+ return scale_1.ScaleIn;
228
+ }
229
+ }), Object.defineProperty(exports, "ScaleOut", {
230
+ enumerable: !0,
231
+ get: function() {
232
+ return scale_1.ScaleOut;
233
+ }
234
+ });
235
+
236
+ const state_1 = require("./state");
237
+
238
+ Object.defineProperty(exports, "State", {
239
+ enumerable: !0,
240
+ get: function() {
241
+ return state_1.State;
242
+ }
243
+ });
244
+
245
+ const story_1 = require("./story");
246
+
247
+ Object.defineProperty(exports, "GrowIn", {
248
+ enumerable: !0,
249
+ get: function() {
250
+ return story_1.GrowIn;
251
+ }
252
+ }), Object.defineProperty(exports, "GrowOut", {
253
+ enumerable: !0,
254
+ get: function() {
255
+ return story_1.GrowOut;
256
+ }
257
+ }), Object.defineProperty(exports, "MoveRotateIn", {
258
+ enumerable: !0,
259
+ get: function() {
260
+ return story_1.MoveRotateIn;
261
+ }
262
+ }), Object.defineProperty(exports, "MoveRotateOut", {
263
+ enumerable: !0,
264
+ get: function() {
265
+ return story_1.MoveRotateOut;
266
+ }
267
+ }), Object.defineProperty(exports, "MoveScaleIn", {
268
+ enumerable: !0,
269
+ get: function() {
270
+ return story_1.MoveScaleIn;
271
+ }
272
+ }), Object.defineProperty(exports, "MoveScaleOut", {
273
+ enumerable: !0,
274
+ get: function() {
275
+ return story_1.MoveScaleOut;
276
+ }
277
+ }), Object.defineProperty(exports, "PulseAnimate", {
278
+ enumerable: !0,
279
+ get: function() {
280
+ return story_1.PulseAnimate;
281
+ }
282
+ }), Object.defineProperty(exports, "SlideIn", {
283
+ enumerable: !0,
284
+ get: function() {
285
+ return story_1.SlideIn;
286
+ }
287
+ }), Object.defineProperty(exports, "SlideOut", {
288
+ enumerable: !0,
289
+ get: function() {
290
+ return story_1.SlideOut;
291
+ }
292
+ }), Object.defineProperty(exports, "SpinIn", {
293
+ enumerable: !0,
294
+ get: function() {
295
+ return story_1.SpinIn;
296
+ }
297
+ }), Object.defineProperty(exports, "SpinOut", {
298
+ enumerable: !0,
299
+ get: function() {
300
+ return story_1.SpinOut;
301
+ }
302
+ }), Object.defineProperty(exports, "StrokeIn", {
303
+ enumerable: !0,
304
+ get: function() {
305
+ return story_1.StrokeIn;
306
+ }
307
+ }), Object.defineProperty(exports, "StrokeOut", {
308
+ enumerable: !0,
309
+ get: function() {
310
+ return story_1.StrokeOut;
311
+ }
312
+ });
313
+
314
+ const update_1 = require("./update");
315
+
316
+ Object.defineProperty(exports, "Update", {
317
+ enumerable: !0,
318
+ get: function() {
319
+ return update_1.Update;
320
+ }
321
+ });
322
+
323
+ const move_1 = require("./move");
324
+
325
+ Object.defineProperty(exports, "MoveIn", {
326
+ enumerable: !0,
327
+ get: function() {
328
+ return move_1.MoveIn;
329
+ }
330
+ }), Object.defineProperty(exports, "MoveOut", {
331
+ enumerable: !0,
332
+ get: function() {
333
+ return move_1.MoveOut;
334
+ }
335
+ });
336
+
337
+ const rotate_1 = require("./rotate");
338
+
339
+ Object.defineProperty(exports, "RotateIn", {
340
+ enumerable: !0,
341
+ get: function() {
342
+ return rotate_1.RotateIn;
343
+ }
344
+ }), Object.defineProperty(exports, "RotateOut", {
345
+ enumerable: !0,
346
+ get: function() {
347
+ return rotate_1.RotateOut;
348
+ }
349
+ });
350
+
351
+ const motionPath_1 = require("./motionPath");
352
+
353
+ Object.defineProperty(exports, "MotionPath", {
354
+ enumerable: !0,
355
+ get: function() {
356
+ return motionPath_1.MotionPath;
357
+ }
358
+ });
359
+
360
+ const fromTo_1 = require("./fromTo");
361
+
362
+ Object.defineProperty(exports, "FromTo", {
363
+ enumerable: !0,
364
+ get: function() {
365
+ return fromTo_1.FromTo;
366
+ }
367
+ });
368
+
369
+ const groupFade_1 = require("./groupFade");
370
+
371
+ Object.defineProperty(exports, "GroupFadeIn", {
372
+ enumerable: !0,
373
+ get: function() {
374
+ return groupFade_1.GroupFadeIn;
375
+ }
376
+ }), Object.defineProperty(exports, "GroupFadeOut", {
377
+ enumerable: !0,
378
+ get: function() {
379
+ return groupFade_1.GroupFadeOut;
380
+ }
381
+ });
382
+
383
+ const streamLight_1 = require("./streamLight");
384
+
385
+ Object.defineProperty(exports, "StreamLight", {
386
+ enumerable: !0,
387
+ get: function() {
388
+ return streamLight_1.StreamLight;
389
+ }
390
+ });
391
+
392
+ const registerCustomAnimate = () => {
8
393
  animate_executor_1.AnimateExecutor.registerBuiltInAnimate("increaseCount", number_1.IncreaseCount),
9
- animate_executor_1.AnimateExecutor.registerBuiltInAnimate("fromTo", from_to_1.FromTo),
394
+ animate_executor_1.AnimateExecutor.registerBuiltInAnimate("fromTo", fromTo_1.FromTo),
10
395
  animate_executor_1.AnimateExecutor.registerBuiltInAnimate("scaleIn", scale_1.ScaleIn),
11
396
  animate_executor_1.AnimateExecutor.registerBuiltInAnimate("scaleOut", scale_1.ScaleOut),
12
397
  animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growHeightIn", growHeight_1.GrowHeightIn),
@@ -49,11 +434,16 @@ const animate_executor_1 = require("../executor/animate-executor"), clip_1 = req
49
434
  animate_executor_1.AnimateExecutor.registerBuiltInAnimate("spinIn", story_1.SpinIn),
50
435
  animate_executor_1.AnimateExecutor.registerBuiltInAnimate("moveScaleIn", story_1.MoveScaleIn),
51
436
  animate_executor_1.AnimateExecutor.registerBuiltInAnimate("moveRotateIn", story_1.MoveRotateIn),
437
+ animate_executor_1.AnimateExecutor.registerBuiltInAnimate("strokeIn", story_1.StrokeIn),
52
438
  animate_executor_1.AnimateExecutor.registerBuiltInAnimate("slideOut", story_1.SlideOut),
53
439
  animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growOut", story_1.GrowOut),
54
440
  animate_executor_1.AnimateExecutor.registerBuiltInAnimate("spinOut", story_1.SpinOut),
55
441
  animate_executor_1.AnimateExecutor.registerBuiltInAnimate("moveScaleOut", story_1.MoveScaleOut),
56
- animate_executor_1.AnimateExecutor.registerBuiltInAnimate("moveRotateOut", story_1.MoveRotateOut);
442
+ animate_executor_1.AnimateExecutor.registerBuiltInAnimate("moveRotateOut", story_1.MoveRotateOut),
443
+ animate_executor_1.AnimateExecutor.registerBuiltInAnimate("strokeOut", story_1.StrokeOut),
444
+ animate_executor_1.AnimateExecutor.registerBuiltInAnimate("pulse", story_1.PulseAnimate),
445
+ animate_executor_1.AnimateExecutor.registerBuiltInAnimate("MotionPath", motionPath_1.MotionPath),
446
+ animate_executor_1.AnimateExecutor.registerBuiltInAnimate("streamLight", streamLight_1.StreamLight);
57
447
  };
58
448
 
59
449
  exports.registerCustomAnimate = registerCustomAnimate;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/custom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register.js","sourcesContent":["import { AnimateExecutor } from '../executor/animate-executor';\nimport { ClipIn, ClipOut } from './clip';\nimport { FadeIn, FadeOut } from './fade';\nimport { GrowAngleIn, GrowAngleOut } from './growAngle';\nimport { GrowCenterIn, GrowCenterOut } from './growCenter';\nimport { GrowHeightIn, GrowHeightOut } from './growHeight';\nimport {\n GrowPointsIn,\n GrowPointsOut,\n GrowPointsXIn,\n GrowPointsXOut,\n GrowPointsYIn,\n GrowPointsYOut\n} from './growPoints';\nimport { GrowRadiusIn, GrowRadiusOut } from './growRadius';\nimport { GrowWidthIn, GrowWidthOut } from './growWidth';\nimport { InputText } from './input-text';\nimport { LabelItemAppear, LabelItemDisappear } from './label-item-animate';\nimport { IncreaseCount } from './number';\nimport { PoptipAppear, PoptipDisappear } from './poptip-animate';\nimport { InputRichText } from './richtext/input-richtext';\nimport { OutputRichText } from './richtext/output-richtext';\nimport { SlideRichText } from './richtext/slide-richtext';\nimport { SlideOutRichText } from './richtext/slide-out-richtext';\nimport { ScaleIn, ScaleOut } from './scale';\nimport { State } from './state';\nimport {\n GrowIn,\n GrowOut,\n MoveRotateIn,\n MoveRotateOut,\n MoveScaleIn,\n MoveScaleOut,\n SlideIn,\n SlideOut,\n SpinIn,\n SpinOut\n} from './story';\nimport { Update } from './update';\nimport { MoveIn, MoveOut } from './move';\nimport { RotateIn, RotateOut } from './rotate';\nimport { FromTo } from './from-to';\n\nexport const registerCustomAnimate = () => {\n // 基础动画\n AnimateExecutor.registerBuiltInAnimate('increaseCount', IncreaseCount);\n\n AnimateExecutor.registerBuiltInAnimate('fromTo', FromTo);\n AnimateExecutor.registerBuiltInAnimate('scaleIn', ScaleIn);\n AnimateExecutor.registerBuiltInAnimate('scaleOut', ScaleOut);\n AnimateExecutor.registerBuiltInAnimate('growHeightIn', GrowHeightIn);\n AnimateExecutor.registerBuiltInAnimate('growHeightOut', GrowHeightOut);\n AnimateExecutor.registerBuiltInAnimate('growWidthIn', GrowWidthIn);\n AnimateExecutor.registerBuiltInAnimate('growWidthOut', GrowWidthOut);\n AnimateExecutor.registerBuiltInAnimate('growCenterIn', GrowCenterIn);\n AnimateExecutor.registerBuiltInAnimate('growCenterOut', GrowCenterOut);\n AnimateExecutor.registerBuiltInAnimate('clipIn', ClipIn);\n AnimateExecutor.registerBuiltInAnimate('clipOut', ClipOut);\n AnimateExecutor.registerBuiltInAnimate('fadeIn', FadeIn);\n AnimateExecutor.registerBuiltInAnimate('fadeOut', FadeOut);\n AnimateExecutor.registerBuiltInAnimate('growPointsIn', GrowPointsIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsOut', GrowPointsOut);\n AnimateExecutor.registerBuiltInAnimate('growPointsXIn', GrowPointsXIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsXOut', GrowPointsXOut);\n AnimateExecutor.registerBuiltInAnimate('growPointsYIn', GrowPointsYIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsYOut', GrowPointsYOut);\n AnimateExecutor.registerBuiltInAnimate('growAngleIn', GrowAngleIn);\n AnimateExecutor.registerBuiltInAnimate('growAngleOut', GrowAngleOut);\n AnimateExecutor.registerBuiltInAnimate('growRadiusIn', GrowRadiusIn);\n AnimateExecutor.registerBuiltInAnimate('growRadiusOut', GrowRadiusOut);\n AnimateExecutor.registerBuiltInAnimate('moveIn', MoveIn);\n AnimateExecutor.registerBuiltInAnimate('moveOut', MoveOut);\n AnimateExecutor.registerBuiltInAnimate('rotateIn', RotateIn);\n AnimateExecutor.registerBuiltInAnimate('rotateOut', RotateOut);\n // state和update共用一个自定义动画类\n AnimateExecutor.registerBuiltInAnimate('update', Update);\n AnimateExecutor.registerBuiltInAnimate('state', State);\n // Label item animations\n AnimateExecutor.registerBuiltInAnimate('labelItemAppear', LabelItemAppear);\n AnimateExecutor.registerBuiltInAnimate('labelItemDisappear', LabelItemDisappear);\n // Poptip animations\n AnimateExecutor.registerBuiltInAnimate('poptipAppear', PoptipAppear);\n AnimateExecutor.registerBuiltInAnimate('poptipDisappear', PoptipDisappear);\n\n // Text input animations\n AnimateExecutor.registerBuiltInAnimate('inputText', InputText);\n AnimateExecutor.registerBuiltInAnimate('inputRichText', InputRichText);\n AnimateExecutor.registerBuiltInAnimate('outputRichText', OutputRichText);\n AnimateExecutor.registerBuiltInAnimate('slideRichText', SlideRichText);\n AnimateExecutor.registerBuiltInAnimate('slideOutRichText', SlideOutRichText);\n\n // 故事化动画 - 入场\n AnimateExecutor.registerBuiltInAnimate('slideIn', SlideIn);\n AnimateExecutor.registerBuiltInAnimate('growIn', GrowIn);\n AnimateExecutor.registerBuiltInAnimate('spinIn', SpinIn);\n AnimateExecutor.registerBuiltInAnimate('moveScaleIn', MoveScaleIn);\n AnimateExecutor.registerBuiltInAnimate('moveRotateIn', MoveRotateIn);\n\n // 故事化动画 - 出场\n AnimateExecutor.registerBuiltInAnimate('slideOut', SlideOut);\n AnimateExecutor.registerBuiltInAnimate('growOut', GrowOut);\n AnimateExecutor.registerBuiltInAnimate('spinOut', SpinOut);\n AnimateExecutor.registerBuiltInAnimate('moveScaleOut', MoveScaleOut);\n AnimateExecutor.registerBuiltInAnimate('moveRotateOut', MoveRotateOut);\n};\n"]}
1
+ {"version":3,"sources":["../src/custom/register.ts"],"names":[],"mappings":";;;;AAAA,mEAA+D;AAC/D,iCAAyC;AA0HvC,uFA1HO,aAAM,OA0HP;AACN,wFA3He,cAAO,OA2Hf;AA1HT,iCAAyC;AA2HvC,uFA3HO,aAAM,OA2HP;AACN,wFA5He,cAAO,OA4Hf;AA3HT,2CAAwD;AA4HtD,4FA5HO,uBAAW,OA4HP;AACX,6FA7HoB,wBAAY,OA6HpB;AA5Hd,6CAA2D;AA6HzD,6FA7HO,yBAAY,OA6HP;AACZ,8FA9HqB,0BAAa,OA8HrB;AA7Hf,6CAA2D;AA8HzD,6FA9HO,yBAAY,OA8HP;AACZ,8FA/HqB,0BAAa,OA+HrB;AA9Hf,6CAOsB;AAwHpB,6FA9HA,yBAAY,OA8HA;AACZ,8FA9HA,0BAAa,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sB,CAAC,eAAe,EAAE,qBAAa,CAAC,CAAC;IACvE,kCAAe,CAAC,sBAAsB,CAAC,WAAW,EAAE,iBAAS,CAAC,CAAC;IAG/D,kCAAe,CAAC,sBAAsB,CAAC,OAAO,EAAE,oBAAY,CAAC,CAAC;IAG9D,kCAAe,CAAC,sBAAsB,CAAC,YAAY,EAAE,uBAAU,CAAC,CAAC;IAEjE,kCAAe,CAAC,sBAAsB,CAAC,aAAa,EAAE,yBAAW,CAAC,CAAC;AACrE,CAAC,CAAC;AAvEW,QAAA,qBAAqB,yBAuEhC","file":"register.js","sourcesContent":["import { AnimateExecutor } from '../executor/animate-executor';\nimport { ClipIn, ClipOut } from './clip';\nimport { FadeIn, FadeOut } from './fade';\nimport { GrowAngleIn, GrowAngleOut } from './growAngle';\nimport { GrowCenterIn, GrowCenterOut } from './growCenter';\nimport { GrowHeightIn, GrowHeightOut } from './growHeight';\nimport {\n GrowPointsIn,\n GrowPointsOut,\n GrowPointsXIn,\n GrowPointsXOut,\n GrowPointsYIn,\n GrowPointsYOut\n} from './growPoints';\nimport { GrowRadiusIn, GrowRadiusOut } from './growRadius';\nimport { GrowWidthIn, GrowWidthOut } from './growWidth';\nimport { InputText } from './input-text';\nimport { LabelItemAppear, LabelItemDisappear } from './label-item-animate';\nimport { IncreaseCount } from './number';\nimport { PoptipAppear, PoptipDisappear } from './poptip-animate';\nimport { InputRichText } from './richtext/input-richtext';\nimport { OutputRichText } from './richtext/output-richtext';\nimport { SlideRichText } from './richtext/slide-richtext';\nimport { SlideOutRichText } from './richtext/slide-out-richtext';\nimport { ScaleIn, ScaleOut } from './scale';\nimport { State } from './state';\nimport {\n GrowIn,\n GrowOut,\n MoveRotateIn,\n MoveRotateOut,\n MoveScaleIn,\n MoveScaleOut,\n PulseAnimate,\n SlideIn,\n SlideOut,\n SpinIn,\n SpinOut,\n StrokeIn,\n StrokeOut\n} from './story';\nimport { Update } from './update';\nimport { MoveIn, MoveOut } from './move';\nimport { RotateIn, RotateOut } from './rotate';\nimport { MotionPath } from './motionPath';\nimport { FromTo } from './fromTo';\nimport { GroupFadeIn, GroupFadeOut } from './groupFade';\nimport { StreamLight } from './streamLight';\n\nexport const registerCustomAnimate = () => {\n // 基础动画\n AnimateExecutor.registerBuiltInAnimate('increaseCount', IncreaseCount);\n\n AnimateExecutor.registerBuiltInAnimate('fromTo', FromTo);\n AnimateExecutor.registerBuiltInAnimate('scaleIn', ScaleIn);\n AnimateExecutor.registerBuiltInAnimate('scaleOut', ScaleOut);\n AnimateExecutor.registerBuiltInAnimate('growHeightIn', GrowHeightIn);\n AnimateExecutor.registerBuiltInAnimate('growHeightOut', GrowHeightOut);\n AnimateExecutor.registerBuiltInAnimate('growWidthIn', GrowWidthIn);\n AnimateExecutor.registerBuiltInAnimate('growWidthOut', GrowWidthOut);\n AnimateExecutor.registerBuiltInAnimate('growCenterIn', GrowCenterIn);\n AnimateExecutor.registerBuiltInAnimate('growCenterOut', GrowCenterOut);\n AnimateExecutor.registerBuiltInAnimate('clipIn', ClipIn);\n AnimateExecutor.registerBuiltInAnimate('clipOut', ClipOut);\n AnimateExecutor.registerBuiltInAnimate('fadeIn', FadeIn);\n AnimateExecutor.registerBuiltInAnimate('fadeOut', FadeOut);\n AnimateExecutor.registerBuiltInAnimate('growPointsIn', GrowPointsIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsOut', GrowPointsOut);\n AnimateExecutor.registerBuiltInAnimate('growPointsXIn', GrowPointsXIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsXOut', GrowPointsXOut);\n AnimateExecutor.registerBuiltInAnimate('growPointsYIn', GrowPointsYIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsYOut', GrowPointsYOut);\n AnimateExecutor.registerBuiltInAnimate('growAngleIn', GrowAngleIn);\n AnimateExecutor.registerBuiltInAnimate('growAngleOut', GrowAngleOut);\n AnimateExecutor.registerBuiltInAnimate('growRadiusIn', GrowRadiusIn);\n AnimateExecutor.registerBuiltInAnimate('growRadiusOut', GrowRadiusOut);\n AnimateExecutor.registerBuiltInAnimate('moveIn', MoveIn);\n AnimateExecutor.registerBuiltInAnimate('moveOut', MoveOut);\n AnimateExecutor.registerBuiltInAnimate('rotateIn', RotateIn);\n AnimateExecutor.registerBuiltInAnimate('rotateOut', RotateOut);\n // state和update共用一个自定义动画类\n AnimateExecutor.registerBuiltInAnimate('update', Update);\n AnimateExecutor.registerBuiltInAnimate('state', State);\n // Label item animations\n AnimateExecutor.registerBuiltInAnimate('labelItemAppear', LabelItemAppear);\n AnimateExecutor.registerBuiltInAnimate('labelItemDisappear', LabelItemDisappear);\n // Poptip animations\n AnimateExecutor.registerBuiltInAnimate('poptipAppear', PoptipAppear);\n AnimateExecutor.registerBuiltInAnimate('poptipDisappear', PoptipDisappear);\n\n // Text input animations\n AnimateExecutor.registerBuiltInAnimate('inputText', InputText);\n AnimateExecutor.registerBuiltInAnimate('inputRichText', InputRichText);\n AnimateExecutor.registerBuiltInAnimate('outputRichText', OutputRichText);\n AnimateExecutor.registerBuiltInAnimate('slideRichText', SlideRichText);\n AnimateExecutor.registerBuiltInAnimate('slideOutRichText', SlideOutRichText);\n\n // 故事化动画 - 入场\n AnimateExecutor.registerBuiltInAnimate('slideIn', SlideIn);\n AnimateExecutor.registerBuiltInAnimate('growIn', GrowIn);\n AnimateExecutor.registerBuiltInAnimate('spinIn', SpinIn);\n AnimateExecutor.registerBuiltInAnimate('moveScaleIn', MoveScaleIn);\n AnimateExecutor.registerBuiltInAnimate('moveRotateIn', MoveRotateIn);\n AnimateExecutor.registerBuiltInAnimate('strokeIn', StrokeIn);\n\n // 故事化动画 - 出场\n AnimateExecutor.registerBuiltInAnimate('slideOut', SlideOut);\n AnimateExecutor.registerBuiltInAnimate('growOut', GrowOut);\n AnimateExecutor.registerBuiltInAnimate('spinOut', SpinOut);\n AnimateExecutor.registerBuiltInAnimate('moveScaleOut', MoveScaleOut);\n AnimateExecutor.registerBuiltInAnimate('moveRotateOut', MoveRotateOut);\n AnimateExecutor.registerBuiltInAnimate('strokeOut', StrokeOut);\n\n // 特效动画\n AnimateExecutor.registerBuiltInAnimate('pulse', PulseAnimate);\n\n // 路径动画\n AnimateExecutor.registerBuiltInAnimate('MotionPath', MotionPath);\n // 流光动画\n AnimateExecutor.registerBuiltInAnimate('streamLight', StreamLight);\n};\n\nexport {\n ClipIn,\n ClipOut,\n FadeIn,\n FadeOut,\n GrowAngleIn,\n GrowAngleOut,\n GrowCenterIn,\n GrowCenterOut,\n GrowHeightIn,\n GrowHeightOut,\n GrowPointsIn,\n GrowPointsOut,\n GrowPointsXIn,\n GrowPointsXOut,\n GrowPointsYIn,\n GrowPointsYOut,\n GrowRadiusIn,\n GrowRadiusOut,\n GrowWidthIn,\n GrowWidthOut,\n IncreaseCount,\n PoptipAppear,\n PoptipDisappear,\n ScaleIn,\n ScaleOut,\n MoveIn,\n MoveOut,\n RotateIn,\n RotateOut,\n State,\n Update,\n MotionPath,\n LabelItemAppear,\n LabelItemDisappear,\n InputText,\n InputRichText,\n OutputRichText,\n SlideRichText,\n SlideOutRichText,\n SlideIn,\n GrowIn,\n SpinIn,\n MoveScaleIn,\n MoveRotateIn,\n SlideOut,\n GrowOut,\n SpinOut,\n MoveScaleOut,\n MoveRotateOut,\n StrokeIn,\n StrokeOut,\n PulseAnimate,\n GroupFadeIn,\n GroupFadeOut,\n FromTo,\n StreamLight\n};\n"]}
@@ -10,10 +10,10 @@ export declare class InputRichText extends ACustomAnimate<{
10
10
  private showCursor;
11
11
  private cursorChar;
12
12
  private blinkCursor;
13
- private beforeText;
14
- private afterText;
15
13
  private fadeInChars;
16
14
  private fadeInDuration;
15
+ private strokeFirst;
16
+ private strokeToFillRatio;
17
17
  constructor(from: {
18
18
  textConfig: IRichTextCharacter[];
19
19
  }, to: {
@@ -26,6 +26,8 @@ export declare class InputRichText extends ACustomAnimate<{
26
26
  afterText?: string;
27
27
  fadeInChars?: boolean;
28
28
  fadeInDuration?: number;
29
+ strokeFirst?: boolean;
30
+ strokeToFillRatio?: number;
29
31
  });
30
32
  onFirstRun(): void;
31
33
  onEnd(cb?: (animate: IAnimate, step: IStep) => void): void;