@visactor/vrender-core 0.22.10 → 0.22.11

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 (182) hide show
  1. package/cjs/animate/custom-animate.js +20 -16
  2. package/cjs/animate/custom-animate.js.map +1 -1
  3. package/cjs/common/contribution-provider.d.ts +16 -0
  4. package/cjs/common/contribution-provider.js +21 -2
  5. package/cjs/common/contribution-provider.js.map +1 -1
  6. package/cjs/common/event-listener-manager.d.ts +14 -0
  7. package/cjs/common/event-listener-manager.js +52 -0
  8. package/cjs/common/event-listener-manager.js.map +1 -0
  9. package/cjs/common/event-transformer.d.ts +12 -0
  10. package/cjs/common/event-transformer.js +91 -0
  11. package/cjs/common/event-transformer.js.map +1 -0
  12. package/cjs/common/polygon.js +0 -1
  13. package/cjs/common/render-area.js +1 -0
  14. package/cjs/common/sort.js +1 -1
  15. package/cjs/common/split-path.js +1 -1
  16. package/cjs/core/global.d.ts +7 -5
  17. package/cjs/core/global.js +13 -13
  18. package/cjs/core/global.js.map +1 -1
  19. package/cjs/core/stage.d.ts +1 -0
  20. package/cjs/core/stage.js +3 -0
  21. package/cjs/core/stage.js.map +1 -1
  22. package/cjs/core/window.d.ts +5 -4
  23. package/cjs/core/window.js +14 -13
  24. package/cjs/core/window.js.map +1 -1
  25. package/cjs/event/event-system.js +11 -10
  26. package/cjs/event/event-system.js.map +1 -1
  27. package/cjs/index.d.ts +2 -0
  28. package/cjs/index.js +4 -2
  29. package/cjs/index.js.map +1 -1
  30. package/cjs/interface/event-listener-manager.d.ts +7 -0
  31. package/cjs/interface/event-listener-manager.js +6 -0
  32. package/cjs/interface/event-listener-manager.js.map +1 -0
  33. package/cjs/interface/global.d.ts +2 -1
  34. package/cjs/interface/global.js.map +1 -1
  35. package/cjs/interface/picker.d.ts +1 -0
  36. package/cjs/interface/picker.js.map +1 -1
  37. package/cjs/interface/render.d.ts +3 -0
  38. package/cjs/interface/render.js.map +1 -1
  39. package/cjs/interface/window.d.ts +1 -0
  40. package/cjs/interface/window.js.map +1 -1
  41. package/cjs/picker/global-picker-service.d.ts +1 -0
  42. package/cjs/picker/global-picker-service.js +1 -0
  43. package/cjs/picker/global-picker-service.js.map +1 -1
  44. package/cjs/picker/picker-service.d.ts +1 -0
  45. package/cjs/picker/picker-service.js +3 -0
  46. package/cjs/picker/picker-service.js.map +1 -1
  47. package/cjs/render/contributions/render/arc-render.d.ts +2 -2
  48. package/cjs/render/contributions/render/arc-render.js +3 -3
  49. package/cjs/render/contributions/render/arc-render.js.map +1 -1
  50. package/cjs/render/contributions/render/area-render.d.ts +2 -2
  51. package/cjs/render/contributions/render/area-render.js +3 -3
  52. package/cjs/render/contributions/render/area-render.js.map +1 -1
  53. package/cjs/render/contributions/render/base-render.d.ts +2 -0
  54. package/cjs/render/contributions/render/base-render.js +3 -0
  55. package/cjs/render/contributions/render/base-render.js.map +1 -1
  56. package/cjs/render/contributions/render/circle-render.d.ts +2 -2
  57. package/cjs/render/contributions/render/circle-render.js +3 -3
  58. package/cjs/render/contributions/render/circle-render.js.map +1 -1
  59. package/cjs/render/contributions/render/draw-contribution.d.ts +1 -0
  60. package/cjs/render/contributions/render/draw-contribution.js +5 -0
  61. package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
  62. package/cjs/render/contributions/render/glyph-render.d.ts +1 -0
  63. package/cjs/render/contributions/render/glyph-render.js +1 -0
  64. package/cjs/render/contributions/render/glyph-render.js.map +1 -1
  65. package/cjs/render/contributions/render/graphic-render.d.ts +1 -0
  66. package/cjs/render/contributions/render/graphic-render.js.map +1 -1
  67. package/cjs/render/contributions/render/group-render.d.ts +1 -0
  68. package/cjs/render/contributions/render/group-render.js +4 -0
  69. package/cjs/render/contributions/render/group-render.js.map +1 -1
  70. package/cjs/render/contributions/render/image-render.d.ts +2 -2
  71. package/cjs/render/contributions/render/image-render.js +3 -3
  72. package/cjs/render/contributions/render/image-render.js.map +1 -1
  73. package/cjs/render/contributions/render/path-render.d.ts +2 -2
  74. package/cjs/render/contributions/render/path-render.js +3 -3
  75. package/cjs/render/contributions/render/path-render.js.map +1 -1
  76. package/cjs/render/contributions/render/polygon-render.d.ts +2 -2
  77. package/cjs/render/contributions/render/polygon-render.js +3 -3
  78. package/cjs/render/contributions/render/polygon-render.js.map +1 -1
  79. package/cjs/render/contributions/render/rect-render.d.ts +2 -2
  80. package/cjs/render/contributions/render/rect-render.js +3 -3
  81. package/cjs/render/contributions/render/rect-render.js.map +1 -1
  82. package/cjs/render/contributions/render/symbol-render.d.ts +2 -2
  83. package/cjs/render/contributions/render/symbol-render.js +3 -3
  84. package/cjs/render/contributions/render/symbol-render.js.map +1 -1
  85. package/cjs/render/contributions/render/text-render.d.ts +2 -2
  86. package/cjs/render/contributions/render/text-render.js +3 -3
  87. package/cjs/render/contributions/render/text-render.js.map +1 -1
  88. package/cjs/render/render-service.d.ts +1 -0
  89. package/cjs/render/render-service.js +3 -0
  90. package/cjs/render/render-service.js.map +1 -1
  91. package/dist/index.es.js +301 -85
  92. package/es/animate/custom-animate.js +20 -16
  93. package/es/animate/custom-animate.js.map +1 -1
  94. package/es/common/contribution-provider.d.ts +16 -0
  95. package/es/common/contribution-provider.js +20 -1
  96. package/es/common/contribution-provider.js.map +1 -1
  97. package/es/common/event-listener-manager.d.ts +14 -0
  98. package/es/common/event-listener-manager.js +44 -0
  99. package/es/common/event-listener-manager.js.map +1 -0
  100. package/es/common/event-transformer.d.ts +12 -0
  101. package/es/common/event-transformer.js +81 -0
  102. package/es/common/event-transformer.js.map +1 -0
  103. package/es/common/polygon.js +1 -2
  104. package/es/common/render-area.js +2 -1
  105. package/es/common/sort.js +1 -1
  106. package/es/common/split-path.js +1 -1
  107. package/es/core/global.d.ts +7 -5
  108. package/es/core/global.js +14 -12
  109. package/es/core/global.js.map +1 -1
  110. package/es/core/stage.d.ts +1 -0
  111. package/es/core/stage.js +3 -0
  112. package/es/core/stage.js.map +1 -1
  113. package/es/core/window.d.ts +5 -4
  114. package/es/core/window.js +15 -12
  115. package/es/core/window.js.map +1 -1
  116. package/es/event/event-system.js +11 -10
  117. package/es/event/event-system.js.map +1 -1
  118. package/es/index.d.ts +2 -0
  119. package/es/index.js +4 -0
  120. package/es/index.js.map +1 -1
  121. package/es/interface/event-listener-manager.d.ts +7 -0
  122. package/es/interface/event-listener-manager.js +2 -0
  123. package/es/interface/event-listener-manager.js.map +1 -0
  124. package/es/interface/global.d.ts +2 -1
  125. package/es/interface/global.js.map +1 -1
  126. package/es/interface/picker.d.ts +1 -0
  127. package/es/interface/picker.js.map +1 -1
  128. package/es/interface/render.d.ts +3 -0
  129. package/es/interface/render.js.map +1 -1
  130. package/es/interface/window.d.ts +1 -0
  131. package/es/interface/window.js.map +1 -1
  132. package/es/picker/global-picker-service.d.ts +1 -0
  133. package/es/picker/global-picker-service.js +1 -0
  134. package/es/picker/global-picker-service.js.map +1 -1
  135. package/es/picker/picker-service.d.ts +1 -0
  136. package/es/picker/picker-service.js +3 -0
  137. package/es/picker/picker-service.js.map +1 -1
  138. package/es/render/contributions/render/arc-render.d.ts +2 -2
  139. package/es/render/contributions/render/arc-render.js +3 -3
  140. package/es/render/contributions/render/arc-render.js.map +1 -1
  141. package/es/render/contributions/render/area-render.d.ts +2 -2
  142. package/es/render/contributions/render/area-render.js +3 -3
  143. package/es/render/contributions/render/area-render.js.map +1 -1
  144. package/es/render/contributions/render/base-render.d.ts +2 -0
  145. package/es/render/contributions/render/base-render.js +3 -0
  146. package/es/render/contributions/render/base-render.js.map +1 -1
  147. package/es/render/contributions/render/circle-render.d.ts +2 -2
  148. package/es/render/contributions/render/circle-render.js +3 -3
  149. package/es/render/contributions/render/circle-render.js.map +1 -1
  150. package/es/render/contributions/render/draw-contribution.d.ts +1 -0
  151. package/es/render/contributions/render/draw-contribution.js +5 -0
  152. package/es/render/contributions/render/draw-contribution.js.map +1 -1
  153. package/es/render/contributions/render/glyph-render.d.ts +1 -0
  154. package/es/render/contributions/render/glyph-render.js +1 -0
  155. package/es/render/contributions/render/glyph-render.js.map +1 -1
  156. package/es/render/contributions/render/graphic-render.d.ts +1 -0
  157. package/es/render/contributions/render/graphic-render.js.map +1 -1
  158. package/es/render/contributions/render/group-render.d.ts +1 -0
  159. package/es/render/contributions/render/group-render.js +4 -0
  160. package/es/render/contributions/render/group-render.js.map +1 -1
  161. package/es/render/contributions/render/image-render.d.ts +2 -2
  162. package/es/render/contributions/render/image-render.js +3 -3
  163. package/es/render/contributions/render/image-render.js.map +1 -1
  164. package/es/render/contributions/render/path-render.d.ts +2 -2
  165. package/es/render/contributions/render/path-render.js +3 -3
  166. package/es/render/contributions/render/path-render.js.map +1 -1
  167. package/es/render/contributions/render/polygon-render.d.ts +2 -2
  168. package/es/render/contributions/render/polygon-render.js +3 -3
  169. package/es/render/contributions/render/polygon-render.js.map +1 -1
  170. package/es/render/contributions/render/rect-render.d.ts +2 -2
  171. package/es/render/contributions/render/rect-render.js +3 -3
  172. package/es/render/contributions/render/rect-render.js.map +1 -1
  173. package/es/render/contributions/render/symbol-render.d.ts +2 -2
  174. package/es/render/contributions/render/symbol-render.js +3 -3
  175. package/es/render/contributions/render/symbol-render.js.map +1 -1
  176. package/es/render/contributions/render/text-render.d.ts +2 -2
  177. package/es/render/contributions/render/text-render.js +3 -3
  178. package/es/render/contributions/render/text-render.js.map +1 -1
  179. package/es/render/render-service.d.ts +1 -0
  180. package/es/render/render-service.js +3 -0
  181. package/es/render/render-service.js.map +1 -1
  182. package/package.json +3 -3
@@ -435,23 +435,27 @@ class TagPointsUpdate extends animate_1.ACustomAnimate {
435
435
  (0, vutils_1.isValidNumber)(lastClipRange * this.clipRange) && (this.clipRange *= lastClipRange);
436
436
  }
437
437
  onUpdate(end, ratio, out) {
438
- if (this.points = this.points.map(((point, index) => {
439
- const newPoint = (0, utils_1.pointInterpolation)(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);
440
- return newPoint.context = point.context, newPoint;
441
- })), this.clipRange) {
442
- if (this.shrinkClipRange) return void (end ? (out.points = this.toPoints, out.clipRange = 1) : (out.points = this.fromPoints,
443
- out.clipRange = this.clipRange - (this.clipRange - this.shrinkClipRange) * ratio));
444
- out.clipRange = this.clipRange + (1 - this.clipRange) * ratio;
438
+ if (end) Object.keys(this.to).forEach((k => {
439
+ out[k] = this.to[k];
440
+ })); else {
441
+ if (this.points = this.points.map(((point, index) => {
442
+ const newPoint = (0, utils_1.pointInterpolation)(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);
443
+ return newPoint.context = point.context, newPoint;
444
+ })), this.clipRange) {
445
+ if (this.shrinkClipRange) return void (end ? (out.points = this.toPoints, out.clipRange = 1) : (out.points = this.fromPoints,
446
+ out.clipRange = this.clipRange - (this.clipRange - this.shrinkClipRange) * ratio));
447
+ out.clipRange = this.clipRange + (1 - this.clipRange) * ratio;
448
+ }
449
+ if (this.segmentsCache && this.to.segments) {
450
+ let start = 0;
451
+ out.segments = this.to.segments.map(((segment, index) => {
452
+ const end = start + this.segmentsCache[index], points = this.points.slice(start, end);
453
+ return start = end, Object.assign(Object.assign({}, segment), {
454
+ points: points
455
+ });
456
+ }));
457
+ } else out.points = this.points;
445
458
  }
446
- if (this.segmentsCache && this.to.segments) {
447
- let start = 0;
448
- out.segments = this.to.segments.map(((segment, index) => {
449
- const end = start + this.segmentsCache[index], points = this.points.slice(start, end);
450
- return start = end, Object.assign(Object.assign({}, segment), {
451
- points: points
452
- });
453
- }));
454
- } else out.points = this.points;
455
459
  }
456
460
  }
457
461
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/animate/custom-animate.ts"],"names":[],"mappings":";;;AACA,6CAU0B;AAC1B,gDAA6C;AAC7C,2CAAsD;AACtD,2DAAuD;AAoBvD,uCAA2C;AAC3C,qCAAkC;AAClC,2CAAqD;AACrD,uEAAmE;AAEnE,MAAa,aAAc,SAAQ,wBAAyC;IAO1E,YACE,IAA+B,EAC/B,EAA6B,EAC7B,QAAgB,EAChB,MAAkB,EAClB,MAA4B;QAE5B,KAAK,CAAC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MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC9B,CAAC,CAAC,MAAM,EAAE,CAAC;QACb,CAAC,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IAED,KAAK;QACH,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC9B,CAAC,CAAC,KAAK,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IAED,QAAQ,CAAC,GAAY,EAAE,KAAa,EAAE,GAAwB;QAC5D,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO;SACR;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC9B,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;YACxB,MAAM,UAAU,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YACxE,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;YAC1B,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,OAAO;IACT,CAAC;CACF;AAtDD,sCAsDC","file":"custom-animate.js","sourcesContent":["import type { IPoint, IPointLike } from '@visactor/vutils';\nimport {\n clamp,\n getDecimalPlaces,\n isArray,\n isNumber,\n isValidNumber,\n pi,\n pi2,\n Point,\n PointService\n} from '@visactor/vutils';\nimport { application } from '../application';\nimport { AttributeUpdateType } from '../common/enums';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport type {\n EasingType,\n IArcGraphicAttribute,\n IArea,\n IAreaCacheItem,\n ICubicBezierCurve,\n ICurve,\n ICustomPath2D,\n IGraphic,\n IGroup,\n ILine,\n ILineAttribute,\n ILinearGradient,\n IRect,\n IRectAttribute,\n IRectGraphicAttribute,\n ISegment,\n IShadowRoot\n} from '../interface';\nimport { ACustomAnimate } from './animate';\nimport { Easing } from './easing';\nimport { pointInterpolation } from '../common/utils';\nimport { divideCubic } from '../common/segment/curve/cubic-bezier';\n\nexport class IncreaseCount extends ACustomAnimate<{ text: string | number }> {\n declare valid: boolean;\n\n private fromNumber: number;\n private toNumber: number;\n private decimalLength: number;\n\n constructor(\n from: { text: string | number },\n to: { text: string | number },\n duration: number,\n easing: EasingType,\n params?: { fixed?: boolean }\n ) {\n super(from, to, duration, easing, params);\n }\n\n getEndProps(): Record<string, any> | void {\n if (this.valid === false) {\n return {};\n }\n return {\n text: this.to\n };\n }\n\n onBind(): void {\n this.fromNumber = isNumber(this.from?.text) ? this.from?.text : Number.parseFloat(this.from?.text);\n this.toNumber = isNumber(this.to?.text) ? this.to?.text : Number.parseFloat(this.to?.text);\n if (!Number.isFinite(this.toNumber)) {\n this.fromNumber = 0;\n }\n if (!Number.isFinite(this.toNumber)) {\n this.valid = false;\n }\n if (this.valid !== false) {\n this.decimalLength =\n this.params?.fixed ?? Math.max(getDecimalPlaces(this.fromNumber), getDecimalPlaces(this.toNumber));\n }\n }\n\n onEnd(): void {\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.valid === false) {\n return;\n }\n if (end) {\n out.text = this.to?.text;\n } else {\n out.text = (this.fromNumber + (this.toNumber - this.fromNumber) * ratio).toFixed(this.decimalLength);\n }\n }\n}\n\nenum Direction {\n LEFT_TO_RIGHT = 0,\n RIGHT_TO_LEFT = 1,\n TOP_TO_BOTTOM = 2,\n BOTTOM_TO_TOP = 3,\n STROKE = 4\n}\nexport class FadeInPlus extends ACustomAnimate<any> {\n declare direction: number;\n declare toFill: string;\n declare toStroke: string;\n declare fillGradient: ILinearGradient;\n declare strokeGradient: ILinearGradient;\n declare fill: boolean;\n declare stroke: boolean;\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params?: { direction?: number; fill?: boolean; stroke?: boolean }\n ) {\n super(from, to, duration, easing, params);\n const { direction = Direction.LEFT_TO_RIGHT, fill = true, stroke = true } = params || {};\n this.direction = direction;\n this.fill = fill;\n this.stroke = stroke;\n this.fillGradient = {\n gradient: 'linear',\n stops: []\n };\n this.strokeGradient = {\n gradient: 'linear',\n stops: []\n };\n }\n\n getEndProps(): Record<string, any> {\n return {\n fill: this.toFill,\n stroke: this.toStroke\n };\n }\n\n onBind(): void {\n // this.to = parseFloat(this.target.getAnimatePropByName('text'));\n this.toFill = this.target.getComputedAttribute('fill');\n this.toStroke = this.target.getComputedAttribute('stroke');\n }\n\n onEnd(): void {\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (!this.toFill) {\n return;\n }\n if (!this.toStroke) {\n return;\n }\n switch (this.direction) {\n case Direction.RIGHT_TO_LEFT:\n this.rightToLeft(end, ratio, out);\n break;\n case Direction.TOP_TO_BOTTOM:\n this.topToBottom(end, ratio, out);\n break;\n case Direction.BOTTOM_TO_TOP:\n this.bottomToTop(end, ratio, out);\n break;\n case Direction.STROKE:\n this.strokePath(end, ratio, out);\n break;\n default:\n this.leftToRight(end, ratio, out);\n break;\n }\n }\n\n leftToRight(end: boolean, ratio: number, out: Record<string, any>) {\n if (this.fill) {\n const toFillColor = this.toFill;\n this.fillGradient.x0 = 0;\n this.fillGradient.y0 = 0;\n this.fillGradient.x1 = 1;\n this.fillGradient.y1 = 0;\n this.fillGradient.stops = [\n { offset: 0, color: toFillColor },\n { offset: ratio, color: toFillColor },\n { offset: Math.min(1, ratio * 2), color: 'transparent' }\n ];\n out.fill = this.fillGradient;\n }\n if (this.stroke) {\n const toStrokeColor = this.toStroke;\n this.strokeGradient.x0 = 0;\n this.strokeGradient.y0 = 0;\n this.strokeGradient.x1 = 1;\n this.strokeGradient.y1 = 0;\n this.strokeGradient.stops = [\n { offset: 0, color: toStrokeColor },\n { offset: ratio, color: toStrokeColor },\n { offset: Math.min(1, ratio * 6), color: 'transparent' }\n ];\n out.stroke = this.strokeGradient;\n // const dashLen = 300;\n // const offset = ratio * dashLen;\n // out.lineDash = [offset, dashLen - offset];\n }\n return;\n }\n\n strokePath(end: boolean, ratio: number, out: Record<string, any>) {\n if (this.fill) {\n const toFillColor = this.toFill;\n this.fillGradient.x0 = 0;\n this.fillGradient.y0 = 0;\n this.fillGradient.x1 = 1;\n this.fillGradient.y1 = 0;\n this.fillGradient.stops = [\n { offset: 0, color: toFillColor },\n { offset: ratio, color: toFillColor },\n { offset: Math.min(1, ratio * 2), color: 'transparent' }\n ];\n out.fill = this.fillGradient;\n }\n if (this.stroke) {\n const dashLen = 300;\n const offset = ratio * dashLen;\n out.lineDash = [offset, dashLen - offset];\n }\n return;\n }\n rightToLeft(end: boolean, ratio: number, out: Record<string, any>) {\n return;\n }\n topToBottom(end: boolean, ratio: number, out: Record<string, any>) {\n return;\n }\n bottomToTop(end: boolean, ratio: number, out: Record<string, any>) {\n return;\n }\n}\n\nexport class InputText extends ACustomAnimate<{ text: string }> {\n declare valid: boolean;\n declare target: IGraphic;\n\n private fromText: string = '';\n private toText: string | string[] = '';\n\n getEndProps(): Record<string, any> {\n if (this.valid === false) {\n return {};\n }\n return {\n text: this.to\n };\n }\n\n onBind(): void {\n this.fromText = this.from?.text ?? '';\n this.toText = this.to?.text || '';\n if (!this.toText || (isArray(this.toText) && this.toText.length === 0)) {\n this.valid = false;\n }\n if (isArray(this.toText)) {\n this.toText = this.toText.map(item => (item || '').toString());\n }\n // else {\n // this.toText = this.toText.toString();\n // // const root = this.target.attachShadow();\n // // const line = application.graphicService.creator.line({\n // // x: 0,\n // // y: 0,\n // // points: [\n // // { x: 0, y: 0 },\n // // { x: 0, y: this.target.getComputedAttribute('fontSize') }\n // // ],\n // // stroke: 'black',\n // // lineWidth: 1\n // // });\n // // root.add(line);\n // }\n }\n\n onEnd(): void {\n this.target.detachShadow();\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.valid === false) {\n return;\n }\n // update text\n const fromCount = this.fromText.length;\n const toTextIsArray = isArray(this.toText);\n const toCount = toTextIsArray\n ? (this.toText as unknown as string[]).reduce((c, t) => c + (t || '').length, 0)\n : this.toText.length;\n const count = Math.ceil(fromCount + (toCount - fromCount) * ratio);\n\n if (toTextIsArray) {\n out.text = [];\n let len = 0;\n (this.toText as unknown as string[]).forEach(t => {\n if (len + t.length > count) {\n out.text.push(t.substr(0, count - len));\n len = count;\n } else {\n out.text.push(t);\n len += t.length;\n }\n });\n } else {\n out.text = (this.toText as string).substr(0, count);\n }\n // console.log(out.text)\n\n // update line position\n // const line = this.target.shadowRoot?.at(0) as IGraphic;\n // const endX = (this.target as any).clipedWidth + 2;\n // line.setAttribute('x', endX);\n }\n}\n\nexport class StreamLight extends ACustomAnimate<any> {\n declare valid: boolean;\n declare target: IGraphic;\n\n declare rect: IRect;\n declare line: ILine;\n declare area: IArea;\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params?: { attribute?: Partial<IRectAttribute | ILineAttribute>; streamLength?: number; isHorizontal?: boolean }\n ) {\n super(from, to, duration, easing, params);\n }\n\n getEndProps(): Record<string, any> {\n return {};\n }\n\n onStart(): void {\n if (!this.target) {\n return;\n }\n if (this.target.type === 'rect') {\n this.onStartRect();\n } else if (this.target.type === 'line') {\n this.onStartLineOrArea('line');\n } else if (this.target.type === 'area') {\n this.onStartLineOrArea('area');\n }\n }\n\n onStartLineOrArea(type: 'line' | 'area') {\n const root = this.target.attachShadow();\n const line = application.graphicService.creator[type]({\n ...this.params?.attribute\n });\n this[type] = line;\n line.pathProxy = new CustomPath2D();\n root.add(line);\n }\n\n onStartRect(): void {\n const root = this.target.attachShadow();\n\n const isHorizontal = this.params?.isHorizontal ?? true;\n const sizeAttr = isHorizontal ? 'height' : 'width';\n const otherSizeAttr = isHorizontal ? 'width' : 'height';\n const size = this.target.AABBBounds[sizeAttr]();\n const y = isHorizontal ? 0 : this.target.AABBBounds.y1;\n\n const rect = application.graphicService.creator.rect({\n [sizeAttr]: size,\n fill: '#bcdeff',\n shadowBlur: 30,\n shadowColor: '#bcdeff',\n ...this.params?.attribute,\n x: 0,\n y,\n [otherSizeAttr]: 0\n });\n this.rect = rect;\n root.add(rect);\n }\n\n onBind(): void {\n return;\n }\n\n onEnd(): void {\n this.target.detachShadow();\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.rect) {\n return this.onUpdateRect(end, ratio, out);\n } else if (this.line || this.area) {\n return this.onUpdateLineOrArea(end, ratio, out);\n }\n }\n\n protected onUpdateRect(end: boolean, ratio: number, out: Record<string, any>): void {\n const isHorizontal = this.params?.isHorizontal ?? true;\n const parentAttr = (this.target as any).attribute;\n if (isHorizontal) {\n const parentWidth = parentAttr.width ?? Math.abs(parentAttr.x1 - parentAttr.x) ?? 250;\n const streamLength = this.params?.streamLength ?? parentWidth;\n const maxLength = this.params?.attribute?.width ?? 60;\n // 起点,rect x右端点 对齐 parent左端点\n // 如果parent.x1 < parent.x, 需要把rect属性移到parent x1的位置上, 因为初始 rect.x = parent.x\n const startX = -maxLength;\n // 插值\n const currentX = startX + (streamLength - startX) * ratio;\n // 位置限定 > 0\n const x = Math.max(currentX, 0);\n // 宽度计算\n const w = Math.min(Math.min(currentX + maxLength, maxLength), streamLength - currentX);\n // 如果 rect右端点 超出 parent右端点, 宽度动态调整\n const width = w + x > parentWidth ? Math.max(parentWidth - x, 0) : w;\n this.rect.setAttributes(\n {\n x,\n width,\n dx: Math.min(parentAttr.x1 - parentAttr.x, 0)\n } as any,\n false,\n {\n type: AttributeUpdateType.ANIMATE_PLAY,\n animationState: {\n ratio,\n end\n }\n }\n );\n } else {\n const parentHeight = parentAttr.height ?? Math.abs(parentAttr.y1 - parentAttr.y) ?? 250;\n const streamLength = this.params?.streamLength ?? parentHeight;\n const maxLength = this.params?.attribute?.height ?? 60;\n // 起点,y上端点 对齐 parent下端点\n const startY = parentHeight;\n // 插值\n const currentY = startY - (streamLength + maxLength) * ratio;\n // 位置限定 < parentHeight\n let y = Math.min(currentY, parentHeight);\n // 高度最小值\n const h = Math.min(parentHeight - currentY, maxLength);\n // 如果 rect上端点=y 超出 parent上端点 = 0, 则高度不断变小\n let height;\n if (y <= 0) {\n // 必须先得到高度再将y置为0, 顺序很重要\n height = Math.max(y + h, 0);\n y = 0;\n } else {\n height = h;\n }\n this.rect.setAttributes(\n {\n y,\n height,\n dy: Math.min(parentAttr.y1 - parentAttr.y, 0)\n } as any,\n false,\n {\n type: AttributeUpdateType.ANIMATE_PLAY,\n animationState: {\n ratio,\n end\n }\n }\n );\n }\n }\n\n protected onUpdateLineOrArea(end: boolean, ratio: number, out: Record<string, any>) {\n const target = this.line || this.area;\n if (!target) {\n return;\n }\n const customPath = target.pathProxy as ICustomPath2D;\n const targetLine = this.target as ILine | IArea;\n if (targetLine.cache || targetLine.cacheArea) {\n this._onUpdateLineOrAreaWithCache(customPath, targetLine, end, ratio, out);\n } else {\n this._onUpdateLineWithoutCache(customPath, targetLine, end, ratio, out);\n }\n const targetAttrs = targetLine.attribute;\n target.setAttributes({\n stroke: targetAttrs.stroke,\n ...target.attribute\n });\n target.addUpdateBoundTag();\n }\n\n // 针对有cache的linear\n protected _onUpdateLineOrAreaWithCache(\n customPath: ICustomPath2D,\n g: ILine | IArea,\n end: boolean,\n ratio: number,\n out: Record<string, any>\n ) {\n customPath.clear();\n if (g.type === 'line') {\n let cache = g.cache;\n if (!Array.isArray(cache)) {\n cache = [cache];\n }\n const totalLen = cache.reduce((l: any, c: any) => l + c.getLength(), 0);\n const curves: ICurve<IPoint>[] = [];\n cache.forEach((c: any) => {\n c.curves.forEach((ci: any) => curves.push(ci));\n });\n return this._updateCurves(customPath, curves, totalLen, ratio);\n } else if (g.type === 'area' && g.cacheArea?.top?.curves) {\n const cache = g.cacheArea as IAreaCacheItem;\n const totalLen = cache.top.curves.reduce((a, b) => a + b.getLength(), 0);\n return this._updateCurves(customPath, cache.top.curves, totalLen, ratio);\n }\n }\n\n protected _updateCurves(customPath: ICustomPath2D, curves: ICurve<IPoint>[], totalLen: number, ratio: number) {\n const startLen = totalLen * ratio;\n const endLen = Math.min(startLen + this.params?.streamLength ?? 10, totalLen);\n let lastLen = 0;\n let start = false;\n for (let i = 0; i < curves.length; i++) {\n if (curves[i].defined !== false) {\n const curveItem = curves[i];\n const len = curveItem.getLength();\n const startPercent = 1 - (lastLen + len - startLen) / len;\n let endPercent = 1 - (lastLen + len - endLen) / len;\n let curveForStart: ICubicBezierCurve;\n if (lastLen < startLen && lastLen + len > startLen) {\n start = true;\n if (curveItem.p2 && curveItem.p3) {\n const [_, curve2] = divideCubic(curveItem as ICubicBezierCurve, startPercent);\n customPath.moveTo(curve2.p0.x, curve2.p0.y);\n curveForStart = curve2;\n // console.log(curve2.p0.x, curve2.p0.y);\n } else {\n const p = curveItem.getPointAt(startPercent);\n customPath.moveTo(p.x, p.y);\n }\n }\n if (lastLen < endLen && lastLen + len > endLen) {\n if (curveItem.p2 && curveItem.p3) {\n if (curveForStart) {\n endPercent = (endLen - startLen) / curveForStart.getLength();\n }\n const [curve1] = divideCubic(curveForStart || (curveItem as ICubicBezierCurve), endPercent);\n customPath.bezierCurveTo(curve1.p1.x, curve1.p1.y, curve1.p2.x, curve1.p2.y, curve1.p3.x, curve1.p3.y);\n } else {\n const p = curveItem.getPointAt(endPercent);\n customPath.lineTo(p.x, p.y);\n }\n break;\n } else if (start) {\n if (curveItem.p2 && curveItem.p3) {\n const curve = curveForStart || curveItem;\n customPath.bezierCurveTo(curve.p1.x, curve.p1.y, curve.p2.x, curve.p2.y, curve.p3.x, curve.p3.y);\n } else {\n customPath.lineTo(curveItem.p1.x, curveItem.p1.y);\n }\n }\n lastLen += len;\n }\n }\n }\n\n // 只针对最简单的linear\n protected _onUpdateLineWithoutCache(\n customPath: ICustomPath2D,\n line: ILine,\n end: boolean,\n ratio: number,\n out: Record<string, any>\n ) {\n const { points, curveType } = line.attribute;\n if (!points || points.length < 2 || curveType !== 'linear') {\n return;\n }\n let totalLen = 0;\n for (let i = 1; i < points.length; i++) {\n totalLen += PointService.distancePP(points[i], points[i - 1]);\n }\n const startLen = totalLen * ratio;\n const endLen = Math.min(startLen + this.params?.streamLength ?? 10, totalLen);\n const nextPoints = [];\n let lastLen = 0;\n for (let i = 1; i < points.length; i++) {\n const len = PointService.distancePP(points[i], points[i - 1]);\n if (lastLen < startLen && lastLen + len > startLen) {\n nextPoints.push(PointService.pointAtPP(points[i - 1], points[i], 1 - (lastLen + len - startLen) / len));\n }\n if (lastLen < endLen && lastLen + len > endLen) {\n nextPoints.push(PointService.pointAtPP(points[i - 1], points[i], 1 - (lastLen + len - endLen) / len));\n break;\n } else if (nextPoints.length) {\n nextPoints.push(points[i]);\n }\n lastLen += len;\n }\n\n if (!nextPoints.length || nextPoints.length < 2) {\n return;\n }\n customPath.clear();\n customPath.moveTo(nextPoints[0].x, nextPoints[0].y);\n for (let i = 1; i < nextPoints.length; i++) {\n customPath.lineTo(nextPoints[i].x, nextPoints[i].y);\n }\n }\n}\n\nexport class Meteor extends ACustomAnimate<any> {\n declare size: number;\n declare target: IGraphic;\n declare root: IShadowRoot;\n declare posList: IPoint[];\n\n get lastPos(): IPoint {\n return this.posList[this.posList.length - 1];\n }\n\n constructor(size: number, duration: number, easing: EasingType, params?: any) {\n super(null, null, duration, easing, params);\n this.size = size;\n this.posList = [];\n }\n\n onBind(): void {\n const root = this.target.attachShadow();\n this.root = root;\n for (let i = 0; i < this.size; i++) {\n const g = this.target.clone();\n const scale = Math.min(((this.size - i) / this.size) * 3, 1);\n const opacity = Math.min(0.2 + 0.7 / this.size);\n g.setAttributes({ x: 0, y: 0, dx: 0, dy: 0, scaleX: scale, scaleY: scale, opacity }, false, {\n type: AttributeUpdateType.ANIMATE_BIND\n });\n root.add(g);\n }\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (end) {\n this.target.detachShadow();\n this.posList.length = 0;\n return;\n }\n\n const x = this.target.getComputedAttribute('x');\n const y = this.target.getComputedAttribute('y');\n\n const nextPos = new Point(x, y);\n if (!this.posList.length) {\n this.posList.push(nextPos);\n return;\n }\n\n this.target.shadowRoot.forEachChildren((g: IGraphic, i) => {\n const pos = this.posList[Math.max(this.posList.length - i - 1, 0)];\n g.setAttributes(\n {\n x: pos.x - x,\n y: pos.y - y\n },\n false\n );\n });\n\n this.posList.push(nextPos);\n }\n}\n\nexport class MotionPath extends ACustomAnimate<any> {\n declare valid: boolean;\n declare pathLength: number;\n declare path: CustomPath2D;\n declare distance: number;\n declare initAngle: number;\n declare changeAngle: boolean;\n declare cb?: (from: any, to: any, ratio: number, target: IGraphic) => void;\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params?: {\n path: CustomPath2D;\n distance: number;\n cb?: (from: any, to: any, ratio: number, target: IGraphic) => void;\n initAngle?: number;\n changeAngle?: boolean;\n }\n ) {\n super(from, to, duration, easing, params);\n if (params) {\n this.pathLength = params.path.getLength();\n this.path = params.path;\n this.distance = params.distance;\n this.to = params.distance * this.pathLength;\n this.initAngle = params.initAngle ?? 0;\n this.changeAngle = !!params.changeAngle;\n this.cb = params.cb;\n }\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 计算位置\n const at = this.to * ratio;\n const { pos, angle } = this.path.getAttrAt(at);\n out.x = pos.x;\n out.y = pos.y;\n if (this.changeAngle) {\n out.angle = angle + this.initAngle;\n }\n this.cb && this.cb(this.from, this.to, ratio, this.target as IGraphic);\n // out.angle = angle + this.initAngle;\n }\n}\n\nexport class TagPointsUpdate extends ACustomAnimate<{ points?: IPointLike[]; segments?: ISegment[] }> {\n protected fromPoints: IPointLike[];\n protected toPoints: IPointLike[];\n protected points: IPointLike[];\n protected interpolatePoints: [IPointLike, IPointLike][];\n protected newPointAnimateType: 'grow' | 'appear' | 'clip';\n protected clipRange: number;\n protected shrinkClipRange: number;\n protected clipRangeByDimension: 'x' | 'y';\n protected segmentsCache: number[];\n\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params?: { newPointAnimateType?: 'grow' | 'appear' | 'clip'; clipRangeByDimension?: 'x' | 'y' }\n ) {\n super(from, to, duration, easing, params);\n this.newPointAnimateType = params?.newPointAnimateType ?? 'grow';\n this.clipRangeByDimension = params?.clipRangeByDimension ?? 'x';\n }\n\n private getPoints(attribute: typeof this.from, cache = false): IPointLike[] {\n if (attribute.points) {\n return attribute.points;\n }\n\n if (attribute.segments) {\n const points = [] as IPointLike[];\n if (!this.segmentsCache) {\n this.segmentsCache = [];\n }\n attribute.segments.map(segment => {\n if (segment.points) {\n points.push(...segment.points);\n }\n if (cache) {\n this.segmentsCache.push(segment.points?.length ?? 0);\n }\n });\n return points;\n }\n return [];\n }\n\n onBind(): void {\n const originFromPoints = this.getPoints(this.from);\n const originToPoints = this.getPoints(this.to, true);\n this.fromPoints = !originFromPoints ? [] : !Array.isArray(originFromPoints) ? [originFromPoints] : originFromPoints;\n this.toPoints = !originToPoints ? [] : !Array.isArray(originToPoints) ? [originToPoints] : originToPoints;\n\n const tagMap = new Map<string, IPointLike>();\n this.fromPoints.forEach(point => {\n if (point.context) {\n tagMap.set(point.context, point);\n }\n });\n let firstMatchedIndex = Infinity;\n let lastMatchedIndex = -Infinity;\n let firstMatchedPoint: IPointLike;\n let lastMatchedPoint: IPointLike;\n for (let i = 0; i < this.toPoints.length; i += 1) {\n if (tagMap.has(this.toPoints[i].context)) {\n firstMatchedIndex = i;\n firstMatchedPoint = tagMap.get(this.toPoints[i].context);\n break;\n }\n }\n for (let i = this.toPoints.length - 1; i >= 0; i -= 1) {\n if (tagMap.has(this.toPoints[i].context)) {\n lastMatchedIndex = i;\n lastMatchedPoint = tagMap.get(this.toPoints[i].context);\n break;\n }\n }\n\n if (this.newPointAnimateType === 'clip') {\n if (this.toPoints.length !== 0) {\n if (Number.isFinite(lastMatchedIndex)) {\n this.clipRange =\n this.toPoints[lastMatchedIndex][this.clipRangeByDimension] /\n this.toPoints[this.toPoints.length - 1][this.clipRangeByDimension];\n if (this.clipRange === 1) {\n this.shrinkClipRange =\n this.toPoints[lastMatchedIndex][this.clipRangeByDimension] /\n this.fromPoints[this.fromPoints.length - 1][this.clipRangeByDimension];\n }\n if (!isValidNumber(this.clipRange)) {\n this.clipRange = 0;\n } else {\n this.clipRange = clamp(this.clipRange, 0, 1);\n }\n } else {\n this.clipRange = 0;\n }\n }\n }\n // TODO: shrink removed points\n // if no point is matched, animation should start from toPoint[0]\n let prevMatchedPoint = this.toPoints[0];\n this.interpolatePoints = this.toPoints.map((point, index) => {\n const matchedPoint = tagMap.get(point.context);\n if (matchedPoint) {\n prevMatchedPoint = matchedPoint;\n return [matchedPoint, point];\n }\n // appear new point\n if (this.newPointAnimateType === 'appear' || this.newPointAnimateType === 'clip') {\n return [point, point];\n }\n // grow new point\n if (index < firstMatchedIndex && firstMatchedPoint) {\n return [firstMatchedPoint, point];\n } else if (index > lastMatchedIndex && lastMatchedPoint) {\n return [lastMatchedPoint, point];\n }\n return [prevMatchedPoint, point];\n });\n this.points = this.interpolatePoints.map(interpolate => {\n const fromPoint = interpolate[0];\n const toPoint = interpolate[1];\n const newPoint = new Point(fromPoint.x, fromPoint.y, fromPoint.x1, fromPoint.y1);\n newPoint.defined = toPoint.defined;\n newPoint.context = toPoint.context;\n return newPoint;\n });\n }\n\n onFirstRun(): void {\n const lastClipRange = this.target.attribute.clipRange;\n if (isValidNumber(lastClipRange * this.clipRange)) {\n this.clipRange *= lastClipRange;\n }\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // if not create new points, multi points animation might not work well.\n this.points = this.points.map((point, index) => {\n const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);\n newPoint.context = point.context;\n return newPoint;\n });\n if (this.clipRange) {\n if (this.shrinkClipRange) {\n // 折线变短\n if (!end) {\n out.points = this.fromPoints;\n out.clipRange = this.clipRange - (this.clipRange - this.shrinkClipRange) * ratio;\n } else {\n out.points = this.toPoints;\n out.clipRange = 1;\n }\n return;\n }\n out.clipRange = this.clipRange + (1 - this.clipRange) * ratio;\n }\n if (this.segmentsCache && this.to.segments) {\n let start = 0;\n out.segments = this.to.segments.map((segment, index) => {\n const end = start + this.segmentsCache[index];\n const points = this.points.slice(start, end);\n start = end;\n return {\n ...segment,\n points\n };\n });\n } else {\n out.points = this.points;\n }\n }\n}\n\nexport class GraphicAnimate extends ACustomAnimate<any> {\n graphic: IGraphic;\n\n constructor(from: any, to: any, duration: number, easing: EasingType, params?: { graphic: IGraphic }) {\n super(from, to, duration, easing, params);\n this.graphic = params?.graphic;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (!this.graphic) {\n return;\n }\n Object.keys(this.from).forEach(k => {\n out[k] = this.from[k] + (this.to[k] - this.from[k]) * ratio;\n });\n }\n}\n\nexport class ClipGraphicAnimate extends ACustomAnimate<any> {\n private _group?: IGroup;\n private _clipGraphic?: IGraphic;\n protected clipFromAttribute?: any;\n protected clipToAttribute?: any;\n\n private _lastClip?: boolean;\n private _lastPath?: IGraphic[];\n\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params: { group: IGroup; clipGraphic: IGraphic }\n ) {\n super(null, null, duration, easing, params);\n this.clipFromAttribute = from;\n this.clipToAttribute = to;\n this._group = params?.group;\n this._clipGraphic = params?.clipGraphic;\n }\n\n onBind() {\n if (this._group && this._clipGraphic) {\n this._lastClip = this._group.attribute.clip;\n this._lastPath = this._group.attribute.path;\n this._group.setAttributes(\n {\n clip: true,\n path: [this._clipGraphic]\n },\n false,\n { type: AttributeUpdateType.ANIMATE_BIND }\n );\n }\n }\n\n onEnd() {\n if (this._group) {\n this._group.setAttributes(\n {\n clip: this._lastClip,\n path: this._lastPath\n },\n false,\n { type: AttributeUpdateType.ANIMATE_END }\n );\n }\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (!this._clipGraphic) {\n return;\n }\n const res: any = {};\n Object.keys(this.clipFromAttribute).forEach(k => {\n res[k] = this.clipFromAttribute[k] + (this.clipToAttribute[k] - this.clipFromAttribute[k]) * ratio;\n });\n this._clipGraphic.setAttributes(res, false, {\n type: AttributeUpdateType.ANIMATE_UPDATE,\n animationState: { ratio, end }\n });\n }\n}\n\nexport class ClipAngleAnimate extends ClipGraphicAnimate {\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params: {\n group: IGroup;\n center?: { x: number; y: number };\n startAngle?: number;\n radius?: number;\n orient?: 'clockwise' | 'anticlockwise';\n animationType?: 'in' | 'out';\n }\n ) {\n const groupAttribute = params?.group?.attribute ?? {};\n const width = groupAttribute.width ?? 0;\n const height = groupAttribute.height ?? 0;\n\n const animationType = params?.animationType ?? 'in';\n const startAngle = params?.startAngle ?? 0;\n const orient = params?.orient ?? 'clockwise';\n\n let arcStartAngle = 0;\n let arcEndAngle = 0;\n if (orient === 'anticlockwise') {\n arcEndAngle = animationType === 'in' ? startAngle + Math.PI * 2 : startAngle;\n arcEndAngle = startAngle + Math.PI * 2;\n } else {\n arcStartAngle = startAngle;\n arcEndAngle = animationType === 'out' ? startAngle + Math.PI * 2 : startAngle;\n }\n const arc = application.graphicService.creator.arc({\n x: params?.center?.x ?? width / 2,\n y: params?.center?.y ?? height / 2,\n outerRadius: params?.radius ?? (width + height) / 2,\n innerRadius: 0,\n startAngle: arcStartAngle,\n endAngle: arcEndAngle,\n fill: true\n });\n let fromAttributes: Partial<IArcGraphicAttribute>;\n let toAttributes: Partial<IArcGraphicAttribute>;\n if (orient === 'anticlockwise') {\n fromAttributes = { startAngle: startAngle + Math.PI * 2 };\n toAttributes = { startAngle: startAngle };\n } else {\n fromAttributes = { endAngle: startAngle };\n toAttributes = { endAngle: startAngle + Math.PI * 2 };\n }\n super(\n animationType === 'in' ? fromAttributes : toAttributes,\n animationType === 'in' ? toAttributes : fromAttributes,\n duration,\n easing,\n { group: params?.group, clipGraphic: arc }\n );\n }\n}\n\nexport class ClipRadiusAnimate extends ClipGraphicAnimate {\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params: {\n group: IGroup;\n center?: { x: number; y: number };\n startRadius?: number;\n endRadius?: number;\n animationType?: 'in' | 'out';\n }\n ) {\n const groupAttribute = params?.group?.attribute ?? {};\n const width = groupAttribute.width ?? 0;\n const height = groupAttribute.height ?? 0;\n\n const animationType = params?.animationType ?? 'in';\n const startRadius = params?.startRadius ?? 0;\n const endRadius = params?.endRadius ?? Math.sqrt((width / 2) ** 2 + (height / 2) ** 2);\n\n const arc = application.graphicService.creator.arc({\n x: params?.center?.x ?? width / 2,\n y: params?.center?.y ?? height / 2,\n outerRadius: animationType === 'out' ? endRadius : startRadius,\n innerRadius: 0,\n startAngle: 0,\n endAngle: Math.PI * 2,\n fill: true\n });\n const fromAttributes: Partial<IArcGraphicAttribute> = { outerRadius: startRadius };\n const toAttributes: Partial<IArcGraphicAttribute> = { outerRadius: endRadius };\n super(\n animationType === 'in' ? fromAttributes : toAttributes,\n animationType === 'in' ? toAttributes : fromAttributes,\n duration,\n easing,\n { group: params?.group, clipGraphic: arc }\n );\n }\n}\n\nexport class ClipDirectionAnimate extends ClipGraphicAnimate {\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params: {\n group: IGroup;\n direction?: 'x' | 'y';\n orient?: 'positive' | 'negative';\n width?: number;\n height?: number;\n animationType?: 'in' | 'out';\n }\n ) {\n const groupAttribute = params?.group?.attribute ?? {};\n const width = params?.width ?? groupAttribute.width ?? 0;\n const height = params?.height ?? groupAttribute.height ?? 0;\n\n const animationType = params?.animationType ?? 'in';\n const direction = params?.direction ?? 'x';\n const orient = params?.orient ?? 'positive';\n\n const rect = application.graphicService.creator.rect({\n x: 0,\n y: 0,\n width: animationType === 'in' && direction === 'x' ? 0 : width,\n height: animationType === 'in' && direction === 'y' ? 0 : height,\n fill: true\n });\n let fromAttributes: Partial<IRectGraphicAttribute> = {};\n let toAttributes: Partial<IRectGraphicAttribute> = {};\n if (direction === 'y') {\n if (orient === 'negative') {\n fromAttributes = { y: height, height: 0 };\n toAttributes = { y: 0, height: height };\n } else {\n fromAttributes = { height: 0 };\n toAttributes = { height: height };\n }\n } else {\n if (orient === 'negative') {\n fromAttributes = { x: width, width: 0 };\n toAttributes = { x: 0, width: width };\n } else {\n fromAttributes = { width: 0 };\n toAttributes = { width: width };\n }\n }\n super(\n animationType === 'in' ? fromAttributes : toAttributes,\n animationType === 'in' ? toAttributes : fromAttributes,\n duration,\n easing,\n { group: params?.group, clipGraphic: rect }\n );\n }\n}\n\ntype RotateSphereParams =\n | {\n center: { x: number; y: number; z: number };\n r: number;\n cb?: (out: any) => void;\n }\n | (() => any);\n\nexport class RotateBySphereAnimate extends ACustomAnimate<any> {\n declare params: RotateSphereParams;\n declare theta: number;\n declare phi: number;\n\n onStart(): void {\n const { center, r } = typeof this.params === 'function' ? this.params() : this.params;\n const startX = this.target.getComputedAttribute('x');\n const startY = this.target.getComputedAttribute('y');\n const startZ = this.target.getComputedAttribute('z');\n const phi = Math.acos((startY - center.y) / r);\n let theta = Math.acos((startX - center.x) / r / Math.sin(phi));\n if (startZ - center.z < 0) {\n theta = pi2 - theta;\n }\n this.theta = theta;\n this.phi = phi;\n }\n\n onBind() {\n return;\n }\n\n onEnd() {\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.phi == null || this.theta == null) {\n return;\n }\n const { center, r, cb } = typeof this.params === 'function' ? this.params() : this.params;\n const deltaAngle = Math.PI * 2 * ratio;\n const theta = this.theta + deltaAngle;\n const phi = this.phi;\n const x = r * Math.sin(phi) * Math.cos(theta) + center.x;\n const y = r * Math.cos(phi) + center.y;\n const z = r * Math.sin(phi) * Math.sin(theta) + center.z;\n out.x = x;\n out.y = y;\n out.z = z;\n // out.beta = phi;\n out.alpha = theta + pi / 2;\n while (out.alpha > pi2) {\n out.alpha -= pi2;\n }\n out.alpha = pi2 - out.alpha;\n\n out.zIndex = out.z * -10000;\n\n cb && cb(out);\n }\n}\n\nexport class AttributeAnimate extends ACustomAnimate<any> {\n declare target: IGroup;\n\n constructor(to: Record<string, any>, duration: number, easing: EasingType) {\n super({}, to, duration, easing);\n }\n\n getEndProps(): Record<string, any> {\n return this.to;\n }\n\n onBind(): void {\n Object.keys(this.to).forEach(k => {\n this.from[k] = this.target.getComputedAttribute(k);\n });\n return;\n }\n\n onEnd(): void {\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n this.target.stepInterpolate(\n this.subAnimate,\n this.subAnimate.animate,\n out,\n this.step,\n ratio,\n end,\n this.to,\n this.from\n );\n }\n}\n\nexport class AnimateGroup extends ACustomAnimate<any> {\n declare customAnimates: ACustomAnimate<any>[];\n declare updating: boolean;\n\n constructor(duration: number, customAnimates: ACustomAnimate<any>[]) {\n super(null, null, duration, 'linear');\n this.customAnimates = customAnimates;\n }\n\n initAnimates() {\n this.customAnimates.forEach(a => {\n a.step = this.step;\n a.subAnimate = this.subAnimate;\n a.target = this.target;\n });\n }\n\n getEndProps(): Record<string, any> {\n const props = {};\n this.customAnimates.forEach(a => {\n Object.assign(props, a.getEndProps());\n });\n return props;\n }\n\n onBind(): void {\n this.initAnimates();\n this.customAnimates.forEach(a => {\n a.onBind();\n });\n return;\n }\n\n onEnd(): void {\n this.customAnimates.forEach(a => {\n a.onEnd();\n });\n return;\n }\n\n onStart(): void {\n this.customAnimates.forEach(a => {\n a.onStart();\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.updating) {\n return;\n }\n this.updating = true;\n this.customAnimates.forEach(a => {\n const easing = a.easing;\n const easingFunc = typeof easing === 'string' ? Easing[easing] : easing;\n ratio = easingFunc(ratio);\n a.onUpdate(end, ratio, out);\n });\n this.updating = false;\n return;\n }\n}\n\nexport class AnimateGroup1 extends ACustomAnimate<any> {\n declare customAnimates: ACustomAnimate<any>[];\n declare updating: boolean;\n\n constructor(duration: number, customAnimates: ACustomAnimate<any>[]) {\n super(null, null, duration, 'linear');\n this.customAnimates = customAnimates;\n }\n\n initAnimates() {\n this.customAnimates.forEach(a => {\n a.step = this.step;\n a.subAnimate = this.subAnimate;\n a.target = this.target;\n });\n }\n\n getEndProps(): Record<string, any> {\n const props = {};\n this.customAnimates.forEach(a => {\n Object.assign(props, a.getEndProps());\n });\n return props;\n }\n\n onBind(): void {\n this.initAnimates();\n this.customAnimates.forEach(a => {\n a.onBind();\n });\n return;\n }\n\n onEnd(): void {\n this.customAnimates.forEach(a => {\n a.onEnd();\n });\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.updating) {\n return;\n }\n this.updating = true;\n this.customAnimates.forEach(a => {\n const easing = a.easing;\n const easingFunc = typeof easing === 'string' ? Easing[easing] : easing;\n ratio = easingFunc(ratio);\n a.onUpdate(end, ratio, out);\n });\n this.updating = false;\n return;\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/animate/custom-animate.ts"],"names":[],"mappings":";;;AACA,6CAW0B;AAC1B,gDAA6C;AAC7C,2CAAsD;AACtD,2DAAuD;AAoBvD,uCAA2C;AAC3C,qCAAkC;AAClC,2CAAqD;AACrD,uEAAmE;AAEnE,MAAa,aAAc,SAAQ,wBAAyC;IAO1E,YACE,IAA+B,EAC/B,EAA6B,EAC7B,QAAgB,EAChB,MAAkB,EAClB,MAA4B;QAE5B,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;IAED,WAAW;QACT,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,EAAE;YACxB,OAAO,EAAE,CAAC;SACX;QACD,OA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,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC9B,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC9B,CAAC,CAAC,MAAM,EAAE,CAAC;QACb,CAAC,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IAED,KAAK;QACH,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC9B,CAAC,CAAC,KAAK,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IAED,QAAQ,CAAC,GAAY,EAAE,KAAa,EAAE,GAAwB;QAC5D,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO;SACR;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC9B,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;YACxB,MAAM,UAAU,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YACxE,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;YAC1B,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,OAAO;IACT,CAAC;CACF;AAtDD,sCAsDC","file":"custom-animate.js","sourcesContent":["import type { IPoint, IPointLike } from '@visactor/vutils';\nimport {\n clamp,\n cloneDeep,\n getDecimalPlaces,\n isArray,\n isNumber,\n isValidNumber,\n pi,\n pi2,\n Point,\n PointService\n} from '@visactor/vutils';\nimport { application } from '../application';\nimport { AttributeUpdateType } from '../common/enums';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport type {\n EasingType,\n IArcGraphicAttribute,\n IArea,\n IAreaCacheItem,\n ICubicBezierCurve,\n ICurve,\n ICustomPath2D,\n IGraphic,\n IGroup,\n ILine,\n ILineAttribute,\n ILinearGradient,\n IRect,\n IRectAttribute,\n IRectGraphicAttribute,\n ISegment,\n IShadowRoot\n} from '../interface';\nimport { ACustomAnimate } from './animate';\nimport { Easing } from './easing';\nimport { pointInterpolation } from '../common/utils';\nimport { divideCubic } from '../common/segment/curve/cubic-bezier';\n\nexport class IncreaseCount extends ACustomAnimate<{ text: string | number }> {\n declare valid: boolean;\n\n private fromNumber: number;\n private toNumber: number;\n private decimalLength: number;\n\n constructor(\n from: { text: string | number },\n to: { text: string | number },\n duration: number,\n easing: EasingType,\n params?: { fixed?: boolean }\n ) {\n super(from, to, duration, easing, params);\n }\n\n getEndProps(): Record<string, any> | void {\n if (this.valid === false) {\n return {};\n }\n return {\n text: this.to\n };\n }\n\n onBind(): void {\n this.fromNumber = isNumber(this.from?.text) ? this.from?.text : Number.parseFloat(this.from?.text);\n this.toNumber = isNumber(this.to?.text) ? this.to?.text : Number.parseFloat(this.to?.text);\n if (!Number.isFinite(this.toNumber)) {\n this.fromNumber = 0;\n }\n if (!Number.isFinite(this.toNumber)) {\n this.valid = false;\n }\n if (this.valid !== false) {\n this.decimalLength =\n this.params?.fixed ?? Math.max(getDecimalPlaces(this.fromNumber), getDecimalPlaces(this.toNumber));\n }\n }\n\n onEnd(): void {\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.valid === false) {\n return;\n }\n if (end) {\n out.text = this.to?.text;\n } else {\n out.text = (this.fromNumber + (this.toNumber - this.fromNumber) * ratio).toFixed(this.decimalLength);\n }\n }\n}\n\nenum Direction {\n LEFT_TO_RIGHT = 0,\n RIGHT_TO_LEFT = 1,\n TOP_TO_BOTTOM = 2,\n BOTTOM_TO_TOP = 3,\n STROKE = 4\n}\nexport class FadeInPlus extends ACustomAnimate<any> {\n declare direction: number;\n declare toFill: string;\n declare toStroke: string;\n declare fillGradient: ILinearGradient;\n declare strokeGradient: ILinearGradient;\n declare fill: boolean;\n declare stroke: boolean;\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params?: { direction?: number; fill?: boolean; stroke?: boolean }\n ) {\n super(from, to, duration, easing, params);\n const { direction = Direction.LEFT_TO_RIGHT, fill = true, stroke = true } = params || {};\n this.direction = direction;\n this.fill = fill;\n this.stroke = stroke;\n this.fillGradient = {\n gradient: 'linear',\n stops: []\n };\n this.strokeGradient = {\n gradient: 'linear',\n stops: []\n };\n }\n\n getEndProps(): Record<string, any> {\n return {\n fill: this.toFill,\n stroke: this.toStroke\n };\n }\n\n onBind(): void {\n // this.to = parseFloat(this.target.getAnimatePropByName('text'));\n this.toFill = this.target.getComputedAttribute('fill');\n this.toStroke = this.target.getComputedAttribute('stroke');\n }\n\n onEnd(): void {\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (!this.toFill) {\n return;\n }\n if (!this.toStroke) {\n return;\n }\n switch (this.direction) {\n case Direction.RIGHT_TO_LEFT:\n this.rightToLeft(end, ratio, out);\n break;\n case Direction.TOP_TO_BOTTOM:\n this.topToBottom(end, ratio, out);\n break;\n case Direction.BOTTOM_TO_TOP:\n this.bottomToTop(end, ratio, out);\n break;\n case Direction.STROKE:\n this.strokePath(end, ratio, out);\n break;\n default:\n this.leftToRight(end, ratio, out);\n break;\n }\n }\n\n leftToRight(end: boolean, ratio: number, out: Record<string, any>) {\n if (this.fill) {\n const toFillColor = this.toFill;\n this.fillGradient.x0 = 0;\n this.fillGradient.y0 = 0;\n this.fillGradient.x1 = 1;\n this.fillGradient.y1 = 0;\n this.fillGradient.stops = [\n { offset: 0, color: toFillColor },\n { offset: ratio, color: toFillColor },\n { offset: Math.min(1, ratio * 2), color: 'transparent' }\n ];\n out.fill = this.fillGradient;\n }\n if (this.stroke) {\n const toStrokeColor = this.toStroke;\n this.strokeGradient.x0 = 0;\n this.strokeGradient.y0 = 0;\n this.strokeGradient.x1 = 1;\n this.strokeGradient.y1 = 0;\n this.strokeGradient.stops = [\n { offset: 0, color: toStrokeColor },\n { offset: ratio, color: toStrokeColor },\n { offset: Math.min(1, ratio * 6), color: 'transparent' }\n ];\n out.stroke = this.strokeGradient;\n // const dashLen = 300;\n // const offset = ratio * dashLen;\n // out.lineDash = [offset, dashLen - offset];\n }\n return;\n }\n\n strokePath(end: boolean, ratio: number, out: Record<string, any>) {\n if (this.fill) {\n const toFillColor = this.toFill;\n this.fillGradient.x0 = 0;\n this.fillGradient.y0 = 0;\n this.fillGradient.x1 = 1;\n this.fillGradient.y1 = 0;\n this.fillGradient.stops = [\n { offset: 0, color: toFillColor },\n { offset: ratio, color: toFillColor },\n { offset: Math.min(1, ratio * 2), color: 'transparent' }\n ];\n out.fill = this.fillGradient;\n }\n if (this.stroke) {\n const dashLen = 300;\n const offset = ratio * dashLen;\n out.lineDash = [offset, dashLen - offset];\n }\n return;\n }\n rightToLeft(end: boolean, ratio: number, out: Record<string, any>) {\n return;\n }\n topToBottom(end: boolean, ratio: number, out: Record<string, any>) {\n return;\n }\n bottomToTop(end: boolean, ratio: number, out: Record<string, any>) {\n return;\n }\n}\n\nexport class InputText extends ACustomAnimate<{ text: string }> {\n declare valid: boolean;\n declare target: IGraphic;\n\n private fromText: string = '';\n private toText: string | string[] = '';\n\n getEndProps(): Record<string, any> {\n if (this.valid === false) {\n return {};\n }\n return {\n text: this.to\n };\n }\n\n onBind(): void {\n this.fromText = this.from?.text ?? '';\n this.toText = this.to?.text || '';\n if (!this.toText || (isArray(this.toText) && this.toText.length === 0)) {\n this.valid = false;\n }\n if (isArray(this.toText)) {\n this.toText = this.toText.map(item => (item || '').toString());\n }\n // else {\n // this.toText = this.toText.toString();\n // // const root = this.target.attachShadow();\n // // const line = application.graphicService.creator.line({\n // // x: 0,\n // // y: 0,\n // // points: [\n // // { x: 0, y: 0 },\n // // { x: 0, y: this.target.getComputedAttribute('fontSize') }\n // // ],\n // // stroke: 'black',\n // // lineWidth: 1\n // // });\n // // root.add(line);\n // }\n }\n\n onEnd(): void {\n this.target.detachShadow();\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.valid === false) {\n return;\n }\n // update text\n const fromCount = this.fromText.length;\n const toTextIsArray = isArray(this.toText);\n const toCount = toTextIsArray\n ? (this.toText as unknown as string[]).reduce((c, t) => c + (t || '').length, 0)\n : this.toText.length;\n const count = Math.ceil(fromCount + (toCount - fromCount) * ratio);\n\n if (toTextIsArray) {\n out.text = [];\n let len = 0;\n (this.toText as unknown as string[]).forEach(t => {\n if (len + t.length > count) {\n out.text.push(t.substr(0, count - len));\n len = count;\n } else {\n out.text.push(t);\n len += t.length;\n }\n });\n } else {\n out.text = (this.toText as string).substr(0, count);\n }\n // console.log(out.text)\n\n // update line position\n // const line = this.target.shadowRoot?.at(0) as IGraphic;\n // const endX = (this.target as any).clipedWidth + 2;\n // line.setAttribute('x', endX);\n }\n}\n\nexport class StreamLight extends ACustomAnimate<any> {\n declare valid: boolean;\n declare target: IGraphic;\n\n declare rect: IRect;\n declare line: ILine;\n declare area: IArea;\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params?: { attribute?: Partial<IRectAttribute | ILineAttribute>; streamLength?: number; isHorizontal?: boolean }\n ) {\n super(from, to, duration, easing, params);\n }\n\n getEndProps(): Record<string, any> {\n return {};\n }\n\n onStart(): void {\n if (!this.target) {\n return;\n }\n if (this.target.type === 'rect') {\n this.onStartRect();\n } else if (this.target.type === 'line') {\n this.onStartLineOrArea('line');\n } else if (this.target.type === 'area') {\n this.onStartLineOrArea('area');\n }\n }\n\n onStartLineOrArea(type: 'line' | 'area') {\n const root = this.target.attachShadow();\n const line = application.graphicService.creator[type]({\n ...this.params?.attribute\n });\n this[type] = line;\n line.pathProxy = new CustomPath2D();\n root.add(line);\n }\n\n onStartRect(): void {\n const root = this.target.attachShadow();\n\n const isHorizontal = this.params?.isHorizontal ?? true;\n const sizeAttr = isHorizontal ? 'height' : 'width';\n const otherSizeAttr = isHorizontal ? 'width' : 'height';\n const size = this.target.AABBBounds[sizeAttr]();\n const y = isHorizontal ? 0 : this.target.AABBBounds.y1;\n\n const rect = application.graphicService.creator.rect({\n [sizeAttr]: size,\n fill: '#bcdeff',\n shadowBlur: 30,\n shadowColor: '#bcdeff',\n ...this.params?.attribute,\n x: 0,\n y,\n [otherSizeAttr]: 0\n });\n this.rect = rect;\n root.add(rect);\n }\n\n onBind(): void {\n return;\n }\n\n onEnd(): void {\n this.target.detachShadow();\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.rect) {\n return this.onUpdateRect(end, ratio, out);\n } else if (this.line || this.area) {\n return this.onUpdateLineOrArea(end, ratio, out);\n }\n }\n\n protected onUpdateRect(end: boolean, ratio: number, out: Record<string, any>): void {\n const isHorizontal = this.params?.isHorizontal ?? true;\n const parentAttr = (this.target as any).attribute;\n if (isHorizontal) {\n const parentWidth = parentAttr.width ?? Math.abs(parentAttr.x1 - parentAttr.x) ?? 250;\n const streamLength = this.params?.streamLength ?? parentWidth;\n const maxLength = this.params?.attribute?.width ?? 60;\n // 起点,rect x右端点 对齐 parent左端点\n // 如果parent.x1 < parent.x, 需要把rect属性移到parent x1的位置上, 因为初始 rect.x = parent.x\n const startX = -maxLength;\n // 插值\n const currentX = startX + (streamLength - startX) * ratio;\n // 位置限定 > 0\n const x = Math.max(currentX, 0);\n // 宽度计算\n const w = Math.min(Math.min(currentX + maxLength, maxLength), streamLength - currentX);\n // 如果 rect右端点 超出 parent右端点, 宽度动态调整\n const width = w + x > parentWidth ? Math.max(parentWidth - x, 0) : w;\n this.rect.setAttributes(\n {\n x,\n width,\n dx: Math.min(parentAttr.x1 - parentAttr.x, 0)\n } as any,\n false,\n {\n type: AttributeUpdateType.ANIMATE_PLAY,\n animationState: {\n ratio,\n end\n }\n }\n );\n } else {\n const parentHeight = parentAttr.height ?? Math.abs(parentAttr.y1 - parentAttr.y) ?? 250;\n const streamLength = this.params?.streamLength ?? parentHeight;\n const maxLength = this.params?.attribute?.height ?? 60;\n // 起点,y上端点 对齐 parent下端点\n const startY = parentHeight;\n // 插值\n const currentY = startY - (streamLength + maxLength) * ratio;\n // 位置限定 < parentHeight\n let y = Math.min(currentY, parentHeight);\n // 高度最小值\n const h = Math.min(parentHeight - currentY, maxLength);\n // 如果 rect上端点=y 超出 parent上端点 = 0, 则高度不断变小\n let height;\n if (y <= 0) {\n // 必须先得到高度再将y置为0, 顺序很重要\n height = Math.max(y + h, 0);\n y = 0;\n } else {\n height = h;\n }\n this.rect.setAttributes(\n {\n y,\n height,\n dy: Math.min(parentAttr.y1 - parentAttr.y, 0)\n } as any,\n false,\n {\n type: AttributeUpdateType.ANIMATE_PLAY,\n animationState: {\n ratio,\n end\n }\n }\n );\n }\n }\n\n protected onUpdateLineOrArea(end: boolean, ratio: number, out: Record<string, any>) {\n const target = this.line || this.area;\n if (!target) {\n return;\n }\n const customPath = target.pathProxy as ICustomPath2D;\n const targetLine = this.target as ILine | IArea;\n if (targetLine.cache || targetLine.cacheArea) {\n this._onUpdateLineOrAreaWithCache(customPath, targetLine, end, ratio, out);\n } else {\n this._onUpdateLineWithoutCache(customPath, targetLine, end, ratio, out);\n }\n const targetAttrs = targetLine.attribute;\n target.setAttributes({\n stroke: targetAttrs.stroke,\n ...target.attribute\n });\n target.addUpdateBoundTag();\n }\n\n // 针对有cache的linear\n protected _onUpdateLineOrAreaWithCache(\n customPath: ICustomPath2D,\n g: ILine | IArea,\n end: boolean,\n ratio: number,\n out: Record<string, any>\n ) {\n customPath.clear();\n if (g.type === 'line') {\n let cache = g.cache;\n if (!Array.isArray(cache)) {\n cache = [cache];\n }\n const totalLen = cache.reduce((l: any, c: any) => l + c.getLength(), 0);\n const curves: ICurve<IPoint>[] = [];\n cache.forEach((c: any) => {\n c.curves.forEach((ci: any) => curves.push(ci));\n });\n return this._updateCurves(customPath, curves, totalLen, ratio);\n } else if (g.type === 'area' && g.cacheArea?.top?.curves) {\n const cache = g.cacheArea as IAreaCacheItem;\n const totalLen = cache.top.curves.reduce((a, b) => a + b.getLength(), 0);\n return this._updateCurves(customPath, cache.top.curves, totalLen, ratio);\n }\n }\n\n protected _updateCurves(customPath: ICustomPath2D, curves: ICurve<IPoint>[], totalLen: number, ratio: number) {\n const startLen = totalLen * ratio;\n const endLen = Math.min(startLen + this.params?.streamLength ?? 10, totalLen);\n let lastLen = 0;\n let start = false;\n for (let i = 0; i < curves.length; i++) {\n if (curves[i].defined !== false) {\n const curveItem = curves[i];\n const len = curveItem.getLength();\n const startPercent = 1 - (lastLen + len - startLen) / len;\n let endPercent = 1 - (lastLen + len - endLen) / len;\n let curveForStart: ICubicBezierCurve;\n if (lastLen < startLen && lastLen + len > startLen) {\n start = true;\n if (curveItem.p2 && curveItem.p3) {\n const [_, curve2] = divideCubic(curveItem as ICubicBezierCurve, startPercent);\n customPath.moveTo(curve2.p0.x, curve2.p0.y);\n curveForStart = curve2;\n // console.log(curve2.p0.x, curve2.p0.y);\n } else {\n const p = curveItem.getPointAt(startPercent);\n customPath.moveTo(p.x, p.y);\n }\n }\n if (lastLen < endLen && lastLen + len > endLen) {\n if (curveItem.p2 && curveItem.p3) {\n if (curveForStart) {\n endPercent = (endLen - startLen) / curveForStart.getLength();\n }\n const [curve1] = divideCubic(curveForStart || (curveItem as ICubicBezierCurve), endPercent);\n customPath.bezierCurveTo(curve1.p1.x, curve1.p1.y, curve1.p2.x, curve1.p2.y, curve1.p3.x, curve1.p3.y);\n } else {\n const p = curveItem.getPointAt(endPercent);\n customPath.lineTo(p.x, p.y);\n }\n break;\n } else if (start) {\n if (curveItem.p2 && curveItem.p3) {\n const curve = curveForStart || curveItem;\n customPath.bezierCurveTo(curve.p1.x, curve.p1.y, curve.p2.x, curve.p2.y, curve.p3.x, curve.p3.y);\n } else {\n customPath.lineTo(curveItem.p1.x, curveItem.p1.y);\n }\n }\n lastLen += len;\n }\n }\n }\n\n // 只针对最简单的linear\n protected _onUpdateLineWithoutCache(\n customPath: ICustomPath2D,\n line: ILine,\n end: boolean,\n ratio: number,\n out: Record<string, any>\n ) {\n const { points, curveType } = line.attribute;\n if (!points || points.length < 2 || curveType !== 'linear') {\n return;\n }\n let totalLen = 0;\n for (let i = 1; i < points.length; i++) {\n totalLen += PointService.distancePP(points[i], points[i - 1]);\n }\n const startLen = totalLen * ratio;\n const endLen = Math.min(startLen + this.params?.streamLength ?? 10, totalLen);\n const nextPoints = [];\n let lastLen = 0;\n for (let i = 1; i < points.length; i++) {\n const len = PointService.distancePP(points[i], points[i - 1]);\n if (lastLen < startLen && lastLen + len > startLen) {\n nextPoints.push(PointService.pointAtPP(points[i - 1], points[i], 1 - (lastLen + len - startLen) / len));\n }\n if (lastLen < endLen && lastLen + len > endLen) {\n nextPoints.push(PointService.pointAtPP(points[i - 1], points[i], 1 - (lastLen + len - endLen) / len));\n break;\n } else if (nextPoints.length) {\n nextPoints.push(points[i]);\n }\n lastLen += len;\n }\n\n if (!nextPoints.length || nextPoints.length < 2) {\n return;\n }\n customPath.clear();\n customPath.moveTo(nextPoints[0].x, nextPoints[0].y);\n for (let i = 1; i < nextPoints.length; i++) {\n customPath.lineTo(nextPoints[i].x, nextPoints[i].y);\n }\n }\n}\n\nexport class Meteor extends ACustomAnimate<any> {\n declare size: number;\n declare target: IGraphic;\n declare root: IShadowRoot;\n declare posList: IPoint[];\n\n get lastPos(): IPoint {\n return this.posList[this.posList.length - 1];\n }\n\n constructor(size: number, duration: number, easing: EasingType, params?: any) {\n super(null, null, duration, easing, params);\n this.size = size;\n this.posList = [];\n }\n\n onBind(): void {\n const root = this.target.attachShadow();\n this.root = root;\n for (let i = 0; i < this.size; i++) {\n const g = this.target.clone();\n const scale = Math.min(((this.size - i) / this.size) * 3, 1);\n const opacity = Math.min(0.2 + 0.7 / this.size);\n g.setAttributes({ x: 0, y: 0, dx: 0, dy: 0, scaleX: scale, scaleY: scale, opacity }, false, {\n type: AttributeUpdateType.ANIMATE_BIND\n });\n root.add(g);\n }\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (end) {\n this.target.detachShadow();\n this.posList.length = 0;\n return;\n }\n\n const x = this.target.getComputedAttribute('x');\n const y = this.target.getComputedAttribute('y');\n\n const nextPos = new Point(x, y);\n if (!this.posList.length) {\n this.posList.push(nextPos);\n return;\n }\n\n this.target.shadowRoot.forEachChildren((g: IGraphic, i) => {\n const pos = this.posList[Math.max(this.posList.length - i - 1, 0)];\n g.setAttributes(\n {\n x: pos.x - x,\n y: pos.y - y\n },\n false\n );\n });\n\n this.posList.push(nextPos);\n }\n}\n\nexport class MotionPath extends ACustomAnimate<any> {\n declare valid: boolean;\n declare pathLength: number;\n declare path: CustomPath2D;\n declare distance: number;\n declare initAngle: number;\n declare changeAngle: boolean;\n declare cb?: (from: any, to: any, ratio: number, target: IGraphic) => void;\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params?: {\n path: CustomPath2D;\n distance: number;\n cb?: (from: any, to: any, ratio: number, target: IGraphic) => void;\n initAngle?: number;\n changeAngle?: boolean;\n }\n ) {\n super(from, to, duration, easing, params);\n if (params) {\n this.pathLength = params.path.getLength();\n this.path = params.path;\n this.distance = params.distance;\n this.to = params.distance * this.pathLength;\n this.initAngle = params.initAngle ?? 0;\n this.changeAngle = !!params.changeAngle;\n this.cb = params.cb;\n }\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 计算位置\n const at = this.to * ratio;\n const { pos, angle } = this.path.getAttrAt(at);\n out.x = pos.x;\n out.y = pos.y;\n if (this.changeAngle) {\n out.angle = angle + this.initAngle;\n }\n this.cb && this.cb(this.from, this.to, ratio, this.target as IGraphic);\n // out.angle = angle + this.initAngle;\n }\n}\n\nexport class TagPointsUpdate extends ACustomAnimate<{ points?: IPointLike[]; segments?: ISegment[] }> {\n protected fromPoints: IPointLike[];\n protected toPoints: IPointLike[];\n protected points: IPointLike[];\n protected interpolatePoints: [IPointLike, IPointLike][];\n protected newPointAnimateType: 'grow' | 'appear' | 'clip';\n protected clipRange: number;\n protected shrinkClipRange: number;\n protected clipRangeByDimension: 'x' | 'y';\n protected segmentsCache: number[];\n\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params?: { newPointAnimateType?: 'grow' | 'appear' | 'clip'; clipRangeByDimension?: 'x' | 'y' }\n ) {\n super(from, to, duration, easing, params);\n this.newPointAnimateType = params?.newPointAnimateType ?? 'grow';\n this.clipRangeByDimension = params?.clipRangeByDimension ?? 'x';\n }\n\n private getPoints(attribute: typeof this.from, cache = false): IPointLike[] {\n if (attribute.points) {\n return attribute.points;\n }\n\n if (attribute.segments) {\n const points = [] as IPointLike[];\n if (!this.segmentsCache) {\n this.segmentsCache = [];\n }\n attribute.segments.map(segment => {\n if (segment.points) {\n points.push(...segment.points);\n }\n if (cache) {\n this.segmentsCache.push(segment.points?.length ?? 0);\n }\n });\n return points;\n }\n return [];\n }\n\n onBind(): void {\n const originFromPoints = this.getPoints(this.from);\n const originToPoints = this.getPoints(this.to, true);\n this.fromPoints = !originFromPoints ? [] : !Array.isArray(originFromPoints) ? [originFromPoints] : originFromPoints;\n this.toPoints = !originToPoints ? [] : !Array.isArray(originToPoints) ? [originToPoints] : originToPoints;\n\n const tagMap = new Map<string, IPointLike>();\n this.fromPoints.forEach(point => {\n if (point.context) {\n tagMap.set(point.context, point);\n }\n });\n let firstMatchedIndex = Infinity;\n let lastMatchedIndex = -Infinity;\n let firstMatchedPoint: IPointLike;\n let lastMatchedPoint: IPointLike;\n for (let i = 0; i < this.toPoints.length; i += 1) {\n if (tagMap.has(this.toPoints[i].context)) {\n firstMatchedIndex = i;\n firstMatchedPoint = tagMap.get(this.toPoints[i].context);\n break;\n }\n }\n for (let i = this.toPoints.length - 1; i >= 0; i -= 1) {\n if (tagMap.has(this.toPoints[i].context)) {\n lastMatchedIndex = i;\n lastMatchedPoint = tagMap.get(this.toPoints[i].context);\n break;\n }\n }\n\n if (this.newPointAnimateType === 'clip') {\n if (this.toPoints.length !== 0) {\n if (Number.isFinite(lastMatchedIndex)) {\n this.clipRange =\n this.toPoints[lastMatchedIndex][this.clipRangeByDimension] /\n this.toPoints[this.toPoints.length - 1][this.clipRangeByDimension];\n if (this.clipRange === 1) {\n this.shrinkClipRange =\n this.toPoints[lastMatchedIndex][this.clipRangeByDimension] /\n this.fromPoints[this.fromPoints.length - 1][this.clipRangeByDimension];\n }\n if (!isValidNumber(this.clipRange)) {\n this.clipRange = 0;\n } else {\n this.clipRange = clamp(this.clipRange, 0, 1);\n }\n } else {\n this.clipRange = 0;\n }\n }\n }\n // TODO: shrink removed points\n // if no point is matched, animation should start from toPoint[0]\n let prevMatchedPoint = this.toPoints[0];\n this.interpolatePoints = this.toPoints.map((point, index) => {\n const matchedPoint = tagMap.get(point.context);\n if (matchedPoint) {\n prevMatchedPoint = matchedPoint;\n return [matchedPoint, point];\n }\n // appear new point\n if (this.newPointAnimateType === 'appear' || this.newPointAnimateType === 'clip') {\n return [point, point];\n }\n // grow new point\n if (index < firstMatchedIndex && firstMatchedPoint) {\n return [firstMatchedPoint, point];\n } else if (index > lastMatchedIndex && lastMatchedPoint) {\n return [lastMatchedPoint, point];\n }\n return [prevMatchedPoint, point];\n });\n this.points = this.interpolatePoints.map(interpolate => {\n const fromPoint = interpolate[0];\n const toPoint = interpolate[1];\n const newPoint = new Point(fromPoint.x, fromPoint.y, fromPoint.x1, fromPoint.y1);\n newPoint.defined = toPoint.defined;\n newPoint.context = toPoint.context;\n return newPoint;\n });\n }\n\n onFirstRun(): void {\n const lastClipRange = this.target.attribute.clipRange;\n if (isValidNumber(lastClipRange * this.clipRange)) {\n this.clipRange *= lastClipRange;\n }\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (end) {\n Object.keys(this.to).forEach(k => {\n out[k] = this.to[k];\n });\n return;\n }\n // if not create new points, multi points animation might not work well.\n this.points = this.points.map((point, index) => {\n const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);\n newPoint.context = point.context;\n return newPoint;\n });\n if (this.clipRange) {\n if (this.shrinkClipRange) {\n // 折线变短\n if (!end) {\n out.points = this.fromPoints;\n out.clipRange = this.clipRange - (this.clipRange - this.shrinkClipRange) * ratio;\n } else {\n out.points = this.toPoints;\n out.clipRange = 1;\n }\n return;\n }\n out.clipRange = this.clipRange + (1 - this.clipRange) * ratio;\n }\n if (this.segmentsCache && this.to.segments) {\n let start = 0;\n out.segments = this.to.segments.map((segment, index) => {\n const end = start + this.segmentsCache[index];\n const points = this.points.slice(start, end);\n start = end;\n return {\n ...segment,\n points\n };\n });\n } else {\n out.points = this.points;\n }\n }\n}\n\nexport class GraphicAnimate extends ACustomAnimate<any> {\n graphic: IGraphic;\n\n constructor(from: any, to: any, duration: number, easing: EasingType, params?: { graphic: IGraphic }) {\n super(from, to, duration, easing, params);\n this.graphic = params?.graphic;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (!this.graphic) {\n return;\n }\n Object.keys(this.from).forEach(k => {\n out[k] = this.from[k] + (this.to[k] - this.from[k]) * ratio;\n });\n }\n}\n\nexport class ClipGraphicAnimate extends ACustomAnimate<any> {\n private _group?: IGroup;\n private _clipGraphic?: IGraphic;\n protected clipFromAttribute?: any;\n protected clipToAttribute?: any;\n\n private _lastClip?: boolean;\n private _lastPath?: IGraphic[];\n\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params: { group: IGroup; clipGraphic: IGraphic }\n ) {\n super(null, null, duration, easing, params);\n this.clipFromAttribute = from;\n this.clipToAttribute = to;\n this._group = params?.group;\n this._clipGraphic = params?.clipGraphic;\n }\n\n onBind() {\n if (this._group && this._clipGraphic) {\n this._lastClip = this._group.attribute.clip;\n this._lastPath = this._group.attribute.path;\n this._group.setAttributes(\n {\n clip: true,\n path: [this._clipGraphic]\n },\n false,\n { type: AttributeUpdateType.ANIMATE_BIND }\n );\n }\n }\n\n onEnd() {\n if (this._group) {\n this._group.setAttributes(\n {\n clip: this._lastClip,\n path: this._lastPath\n },\n false,\n { type: AttributeUpdateType.ANIMATE_END }\n );\n }\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (!this._clipGraphic) {\n return;\n }\n const res: any = {};\n Object.keys(this.clipFromAttribute).forEach(k => {\n res[k] = this.clipFromAttribute[k] + (this.clipToAttribute[k] - this.clipFromAttribute[k]) * ratio;\n });\n this._clipGraphic.setAttributes(res, false, {\n type: AttributeUpdateType.ANIMATE_UPDATE,\n animationState: { ratio, end }\n });\n }\n}\n\nexport class ClipAngleAnimate extends ClipGraphicAnimate {\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params: {\n group: IGroup;\n center?: { x: number; y: number };\n startAngle?: number;\n radius?: number;\n orient?: 'clockwise' | 'anticlockwise';\n animationType?: 'in' | 'out';\n }\n ) {\n const groupAttribute = params?.group?.attribute ?? {};\n const width = groupAttribute.width ?? 0;\n const height = groupAttribute.height ?? 0;\n\n const animationType = params?.animationType ?? 'in';\n const startAngle = params?.startAngle ?? 0;\n const orient = params?.orient ?? 'clockwise';\n\n let arcStartAngle = 0;\n let arcEndAngle = 0;\n if (orient === 'anticlockwise') {\n arcEndAngle = animationType === 'in' ? startAngle + Math.PI * 2 : startAngle;\n arcEndAngle = startAngle + Math.PI * 2;\n } else {\n arcStartAngle = startAngle;\n arcEndAngle = animationType === 'out' ? startAngle + Math.PI * 2 : startAngle;\n }\n const arc = application.graphicService.creator.arc({\n x: params?.center?.x ?? width / 2,\n y: params?.center?.y ?? height / 2,\n outerRadius: params?.radius ?? (width + height) / 2,\n innerRadius: 0,\n startAngle: arcStartAngle,\n endAngle: arcEndAngle,\n fill: true\n });\n let fromAttributes: Partial<IArcGraphicAttribute>;\n let toAttributes: Partial<IArcGraphicAttribute>;\n if (orient === 'anticlockwise') {\n fromAttributes = { startAngle: startAngle + Math.PI * 2 };\n toAttributes = { startAngle: startAngle };\n } else {\n fromAttributes = { endAngle: startAngle };\n toAttributes = { endAngle: startAngle + Math.PI * 2 };\n }\n super(\n animationType === 'in' ? fromAttributes : toAttributes,\n animationType === 'in' ? toAttributes : fromAttributes,\n duration,\n easing,\n { group: params?.group, clipGraphic: arc }\n );\n }\n}\n\nexport class ClipRadiusAnimate extends ClipGraphicAnimate {\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params: {\n group: IGroup;\n center?: { x: number; y: number };\n startRadius?: number;\n endRadius?: number;\n animationType?: 'in' | 'out';\n }\n ) {\n const groupAttribute = params?.group?.attribute ?? {};\n const width = groupAttribute.width ?? 0;\n const height = groupAttribute.height ?? 0;\n\n const animationType = params?.animationType ?? 'in';\n const startRadius = params?.startRadius ?? 0;\n const endRadius = params?.endRadius ?? Math.sqrt((width / 2) ** 2 + (height / 2) ** 2);\n\n const arc = application.graphicService.creator.arc({\n x: params?.center?.x ?? width / 2,\n y: params?.center?.y ?? height / 2,\n outerRadius: animationType === 'out' ? endRadius : startRadius,\n innerRadius: 0,\n startAngle: 0,\n endAngle: Math.PI * 2,\n fill: true\n });\n const fromAttributes: Partial<IArcGraphicAttribute> = { outerRadius: startRadius };\n const toAttributes: Partial<IArcGraphicAttribute> = { outerRadius: endRadius };\n super(\n animationType === 'in' ? fromAttributes : toAttributes,\n animationType === 'in' ? toAttributes : fromAttributes,\n duration,\n easing,\n { group: params?.group, clipGraphic: arc }\n );\n }\n}\n\nexport class ClipDirectionAnimate extends ClipGraphicAnimate {\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params: {\n group: IGroup;\n direction?: 'x' | 'y';\n orient?: 'positive' | 'negative';\n width?: number;\n height?: number;\n animationType?: 'in' | 'out';\n }\n ) {\n const groupAttribute = params?.group?.attribute ?? {};\n const width = params?.width ?? groupAttribute.width ?? 0;\n const height = params?.height ?? groupAttribute.height ?? 0;\n\n const animationType = params?.animationType ?? 'in';\n const direction = params?.direction ?? 'x';\n const orient = params?.orient ?? 'positive';\n\n const rect = application.graphicService.creator.rect({\n x: 0,\n y: 0,\n width: animationType === 'in' && direction === 'x' ? 0 : width,\n height: animationType === 'in' && direction === 'y' ? 0 : height,\n fill: true\n });\n let fromAttributes: Partial<IRectGraphicAttribute> = {};\n let toAttributes: Partial<IRectGraphicAttribute> = {};\n if (direction === 'y') {\n if (orient === 'negative') {\n fromAttributes = { y: height, height: 0 };\n toAttributes = { y: 0, height: height };\n } else {\n fromAttributes = { height: 0 };\n toAttributes = { height: height };\n }\n } else {\n if (orient === 'negative') {\n fromAttributes = { x: width, width: 0 };\n toAttributes = { x: 0, width: width };\n } else {\n fromAttributes = { width: 0 };\n toAttributes = { width: width };\n }\n }\n super(\n animationType === 'in' ? fromAttributes : toAttributes,\n animationType === 'in' ? toAttributes : fromAttributes,\n duration,\n easing,\n { group: params?.group, clipGraphic: rect }\n );\n }\n}\n\ntype RotateSphereParams =\n | {\n center: { x: number; y: number; z: number };\n r: number;\n cb?: (out: any) => void;\n }\n | (() => any);\n\nexport class RotateBySphereAnimate extends ACustomAnimate<any> {\n declare params: RotateSphereParams;\n declare theta: number;\n declare phi: number;\n\n onStart(): void {\n const { center, r } = typeof this.params === 'function' ? this.params() : this.params;\n const startX = this.target.getComputedAttribute('x');\n const startY = this.target.getComputedAttribute('y');\n const startZ = this.target.getComputedAttribute('z');\n const phi = Math.acos((startY - center.y) / r);\n let theta = Math.acos((startX - center.x) / r / Math.sin(phi));\n if (startZ - center.z < 0) {\n theta = pi2 - theta;\n }\n this.theta = theta;\n this.phi = phi;\n }\n\n onBind() {\n return;\n }\n\n onEnd() {\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.phi == null || this.theta == null) {\n return;\n }\n const { center, r, cb } = typeof this.params === 'function' ? this.params() : this.params;\n const deltaAngle = Math.PI * 2 * ratio;\n const theta = this.theta + deltaAngle;\n const phi = this.phi;\n const x = r * Math.sin(phi) * Math.cos(theta) + center.x;\n const y = r * Math.cos(phi) + center.y;\n const z = r * Math.sin(phi) * Math.sin(theta) + center.z;\n out.x = x;\n out.y = y;\n out.z = z;\n // out.beta = phi;\n out.alpha = theta + pi / 2;\n while (out.alpha > pi2) {\n out.alpha -= pi2;\n }\n out.alpha = pi2 - out.alpha;\n\n out.zIndex = out.z * -10000;\n\n cb && cb(out);\n }\n}\n\nexport class AttributeAnimate extends ACustomAnimate<any> {\n declare target: IGroup;\n\n constructor(to: Record<string, any>, duration: number, easing: EasingType) {\n super({}, to, duration, easing);\n }\n\n getEndProps(): Record<string, any> {\n return this.to;\n }\n\n onBind(): void {\n Object.keys(this.to).forEach(k => {\n this.from[k] = this.target.getComputedAttribute(k);\n });\n return;\n }\n\n onEnd(): void {\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n this.target.stepInterpolate(\n this.subAnimate,\n this.subAnimate.animate,\n out,\n this.step,\n ratio,\n end,\n this.to,\n this.from\n );\n }\n}\n\nexport class AnimateGroup extends ACustomAnimate<any> {\n declare customAnimates: ACustomAnimate<any>[];\n declare updating: boolean;\n\n constructor(duration: number, customAnimates: ACustomAnimate<any>[]) {\n super(null, null, duration, 'linear');\n this.customAnimates = customAnimates;\n }\n\n initAnimates() {\n this.customAnimates.forEach(a => {\n a.step = this.step;\n a.subAnimate = this.subAnimate;\n a.target = this.target;\n });\n }\n\n getEndProps(): Record<string, any> {\n const props = {};\n this.customAnimates.forEach(a => {\n Object.assign(props, a.getEndProps());\n });\n return props;\n }\n\n onBind(): void {\n this.initAnimates();\n this.customAnimates.forEach(a => {\n a.onBind();\n });\n return;\n }\n\n onEnd(): void {\n this.customAnimates.forEach(a => {\n a.onEnd();\n });\n return;\n }\n\n onStart(): void {\n this.customAnimates.forEach(a => {\n a.onStart();\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.updating) {\n return;\n }\n this.updating = true;\n this.customAnimates.forEach(a => {\n const easing = a.easing;\n const easingFunc = typeof easing === 'string' ? Easing[easing] : easing;\n ratio = easingFunc(ratio);\n a.onUpdate(end, ratio, out);\n });\n this.updating = false;\n return;\n }\n}\n\nexport class AnimateGroup1 extends ACustomAnimate<any> {\n declare customAnimates: ACustomAnimate<any>[];\n declare updating: boolean;\n\n constructor(duration: number, customAnimates: ACustomAnimate<any>[]) {\n super(null, null, duration, 'linear');\n this.customAnimates = customAnimates;\n }\n\n initAnimates() {\n this.customAnimates.forEach(a => {\n a.step = this.step;\n a.subAnimate = this.subAnimate;\n a.target = this.target;\n });\n }\n\n getEndProps(): Record<string, any> {\n const props = {};\n this.customAnimates.forEach(a => {\n Object.assign(props, a.getEndProps());\n });\n return props;\n }\n\n onBind(): void {\n this.initAnimates();\n this.customAnimates.forEach(a => {\n a.onBind();\n });\n return;\n }\n\n onEnd(): void {\n this.customAnimates.forEach(a => {\n a.onEnd();\n });\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.updating) {\n return;\n }\n this.updating = true;\n this.customAnimates.forEach(a => {\n const easing = a.easing;\n const easingFunc = typeof easing === 'string' ? Easing[easing] : easing;\n ratio = easingFunc(ratio);\n a.onUpdate(end, ratio, out);\n });\n this.updating = false;\n return;\n }\n}\n"]}
@@ -1,4 +1,20 @@
1
1
  import type { interfaces } from '../common/inversify-lite';
2
+ import type { IContributionProvider } from '../interface';
2
3
  export declare const ContributionProvider: unique symbol;
4
+ declare class ContributionProviderCache<T> implements IContributionProvider<T> {
5
+ protected caches?: T[];
6
+ protected serviceIdentifier: interfaces.ServiceIdentifier<T>;
7
+ protected container: interfaces.Container;
8
+ constructor(serviceIdentifier: interfaces.ServiceIdentifier<T>, container: interfaces.Container);
9
+ getContributions(): T[];
10
+ refresh(): void;
11
+ }
3
12
  export declare function bindContributionProvider(bind: interfaces.Bind, id: any): void;
4
13
  export declare function bindContributionProviderNoSingletonScope(bind: interfaces.Bind, id: any): void;
14
+ export declare class ContributionStore {
15
+ static store: Map<interfaces.ServiceIdentifier<any>, ContributionProviderCache<any>>;
16
+ static getStore(id: interfaces.ServiceIdentifier<any>): ContributionProviderCache<any>;
17
+ static setStore(id: interfaces.ServiceIdentifier<any>, cache: ContributionProviderCache<any>): void;
18
+ static refreshAllContributions(): void;
19
+ }
20
+ export {};
@@ -2,17 +2,20 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
- }), exports.bindContributionProviderNoSingletonScope = exports.bindContributionProvider = exports.ContributionProvider = void 0,
5
+ }), exports.ContributionStore = exports.bindContributionProviderNoSingletonScope = exports.bindContributionProvider = exports.ContributionProvider = void 0,
6
6
  exports.ContributionProvider = Symbol("ContributionProvider");
7
7
 
8
8
  class ContributionProviderCache {
9
9
  constructor(serviceIdentifier, container) {
10
- this.serviceIdentifier = serviceIdentifier, this.container = container;
10
+ this.serviceIdentifier = serviceIdentifier, this.container = container, ContributionStore.setStore(this.serviceIdentifier, this);
11
11
  }
12
12
  getContributions() {
13
13
  return this.caches || (this.caches = [], this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier))),
14
14
  this.caches;
15
15
  }
16
+ refresh() {
17
+ this.caches && (this.caches.length = 0, this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier)));
18
+ }
16
19
  }
17
20
 
18
21
  function bindContributionProvider(bind, id) {
@@ -24,4 +27,20 @@ function bindContributionProviderNoSingletonScope(bind, id) {
24
27
  }
25
28
 
26
29
  exports.bindContributionProvider = bindContributionProvider, exports.bindContributionProviderNoSingletonScope = bindContributionProviderNoSingletonScope;
30
+
31
+ class ContributionStore {
32
+ static getStore(id) {
33
+ return this.store.get(id);
34
+ }
35
+ static setStore(id, cache) {
36
+ this.store.set(id, cache);
37
+ }
38
+ static refreshAllContributions() {
39
+ this.store.forEach((cache => {
40
+ cache.refresh();
41
+ }));
42
+ }
43
+ }
44
+
45
+ exports.ContributionStore = ContributionStore, ContributionStore.store = new Map;
27
46
  //# sourceMappingURL=contribution-provider.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common/contribution-provider.ts"],"names":[],"mappings":";;;AAGa,QAAA,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAEnE,MAAM,yBAAyB;IAK7B,YAAY,iBAAkD,EAAE,SAA+B;QAC7F,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;YACjB,IAAI,CAAC,SAAS;gBACZ,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC;gBAC9C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;SACtE;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF;AAED,SAAgB,wBAAwB,CAAC,IAAqB,EAAE,EAAO;IACrE,IAAI,CAAC,4BAAoB,CAAC;SACvB,cAAc,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,IAAI,yBAAyB,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;SAC/E,gBAAgB,EAAE;SAClB,eAAe,CAAC,EAAE,CAAC,CAAC;AACzB,CAAC;AALD,4DAKC;AAED,SAAgB,wCAAwC,CAAC,IAAqB,EAAE,EAAO;IACrF,IAAI,CAAC,4BAAoB,CAAC;SACvB,cAAc,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,IAAI,yBAAyB,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;SAC/E,eAAe,CAAC,EAAE,CAAC,CAAC;AACzB,CAAC;AAJD,4FAIC","file":"contribution-provider.js","sourcesContent":["import type { interfaces } from '../common/inversify-lite';\nimport type { IContributionProvider } from '../interface';\n\nexport const ContributionProvider = Symbol('ContributionProvider');\n\nclass ContributionProviderCache<T> implements IContributionProvider<T> {\n protected caches?: T[];\n protected serviceIdentifier: interfaces.ServiceIdentifier<T>;\n protected container: interfaces.Container;\n\n constructor(serviceIdentifier: interfaces.ServiceIdentifier<T>, container: interfaces.Container) {\n this.serviceIdentifier = serviceIdentifier;\n this.container = container;\n }\n\n getContributions(): T[] {\n if (!this.caches) {\n this.caches = [];\n this.container &&\n this.container.isBound(this.serviceIdentifier) &&\n this.caches.push(...this.container.getAll(this.serviceIdentifier));\n }\n return this.caches;\n }\n}\n\nexport function bindContributionProvider(bind: interfaces.Bind, id: any): void {\n bind(ContributionProvider)\n .toDynamicValue(({ container }) => new ContributionProviderCache(id, container))\n .inSingletonScope()\n .whenTargetNamed(id);\n}\n\nexport function bindContributionProviderNoSingletonScope(bind: interfaces.Bind, id: any): void {\n bind(ContributionProvider)\n .toDynamicValue(({ container }) => new ContributionProviderCache(id, container))\n .whenTargetNamed(id);\n}\n"]}
1
+ {"version":3,"sources":["../src/common/contribution-provider.ts"],"names":[],"mappings":";;;AAGa,QAAA,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAEnE,MAAM,yBAAyB;IAK7B,YAAY,iBAAkD,EAAE,SAA+B;QAC7F,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,EAAE,C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AAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,EAAqC,EAAE,KAAqC;QAC1F,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,MAAM,CAAC,uBAAuB;QAC5B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACzB,KAAK,CAAC,OAAO,EAAE,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC;;AAfH,8CAgBC;AAfQ,uBAAK,GAA2E,IAAI,GAAG,EAAE,CAAC","file":"contribution-provider.js","sourcesContent":["import type { interfaces } from '../common/inversify-lite';\nimport type { IContributionProvider } from '../interface';\n\nexport const ContributionProvider = Symbol('ContributionProvider');\n\nclass ContributionProviderCache<T> implements IContributionProvider<T> {\n protected caches?: T[];\n protected serviceIdentifier: interfaces.ServiceIdentifier<T>;\n protected container: interfaces.Container;\n\n constructor(serviceIdentifier: interfaces.ServiceIdentifier<T>, container: interfaces.Container) {\n this.serviceIdentifier = serviceIdentifier;\n this.container = container;\n ContributionStore.setStore(this.serviceIdentifier, this);\n }\n\n getContributions(): T[] {\n if (!this.caches) {\n this.caches = [];\n this.container &&\n this.container.isBound(this.serviceIdentifier) &&\n this.caches.push(...this.container.getAll(this.serviceIdentifier));\n }\n return this.caches;\n }\n\n refresh() {\n if (!this.caches) {\n return;\n }\n this.caches.length = 0;\n this.container &&\n this.container.isBound(this.serviceIdentifier) &&\n this.caches.push(...this.container.getAll(this.serviceIdentifier));\n }\n}\n\nexport function bindContributionProvider(bind: interfaces.Bind, id: any): void {\n bind(ContributionProvider)\n .toDynamicValue(({ container }) => new ContributionProviderCache(id, container))\n .inSingletonScope()\n .whenTargetNamed(id);\n}\n\nexport function bindContributionProviderNoSingletonScope(bind: interfaces.Bind, id: any): void {\n bind(ContributionProvider)\n .toDynamicValue(({ container }) => new ContributionProviderCache(id, container))\n .whenTargetNamed(id);\n}\n\nexport class ContributionStore {\n static store: Map<interfaces.ServiceIdentifier<any>, ContributionProviderCache<any>> = new Map();\n\n static getStore(id: interfaces.ServiceIdentifier<any>): ContributionProviderCache<any> {\n return this.store.get(id);\n }\n\n static setStore(id: interfaces.ServiceIdentifier<any>, cache: ContributionProviderCache<any>): void {\n this.store.set(id, cache);\n }\n\n static refreshAllContributions(): void {\n this.store.forEach(cache => {\n cache.refresh();\n });\n }\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import type { IEventListenerManager } from '../interface/event-listener-manager';
2
+ export declare class EventListenerManager implements IEventListenerManager {
3
+ protected _listenerMap: Map<string, Map<EventListenerOrEventListenerObject, EventListener>>;
4
+ protected _eventListenerTransformer: (event: Event) => Event;
5
+ constructor();
6
+ setEventListenerTransformer(transformer: (event: Event) => Event): void;
7
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
8
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
9
+ dispatchEvent(event: Event): boolean;
10
+ clearAllEventListeners(): void;
11
+ protected _nativeAddEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void;
12
+ protected _nativeRemoveEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void;
13
+ protected _nativeDispatchEvent(event: Event): boolean;
14
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.EventListenerManager = void 0;
6
+
7
+ class EventListenerManager {
8
+ constructor() {
9
+ this._listenerMap = new Map, this._eventListenerTransformer = event => event;
10
+ }
11
+ setEventListenerTransformer(transformer) {
12
+ this._eventListenerTransformer = transformer || (event => event);
13
+ }
14
+ addEventListener(type, listener, options) {
15
+ if (!listener) return;
16
+ const wrappedListener = event => {
17
+ const transformedEvent = this._eventListenerTransformer(event);
18
+ "function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent);
19
+ };
20
+ this._listenerMap.has(type) || this._listenerMap.set(type, new Map), this._listenerMap.get(type).set(listener, wrappedListener),
21
+ this._nativeAddEventListener(type, wrappedListener, options);
22
+ }
23
+ removeEventListener(type, listener, options) {
24
+ var _a;
25
+ if (!listener) return;
26
+ const wrappedListener = null === (_a = this._listenerMap.get(type)) || void 0 === _a ? void 0 : _a.get(listener);
27
+ wrappedListener && (this._nativeRemoveEventListener(type, wrappedListener, options),
28
+ this._listenerMap.get(type).delete(listener), 0 === this._listenerMap.get(type).size && this._listenerMap.delete(type));
29
+ }
30
+ dispatchEvent(event) {
31
+ return this._nativeDispatchEvent(event);
32
+ }
33
+ clearAllEventListeners() {
34
+ this._listenerMap.forEach(((listenersMap, type) => {
35
+ listenersMap.forEach(((wrappedListener, originalListener) => {
36
+ this._nativeRemoveEventListener(type, wrappedListener, void 0);
37
+ }));
38
+ })), this._listenerMap.clear();
39
+ }
40
+ _nativeAddEventListener(type, listener, options) {
41
+ throw new Error("_nativeAddEventListener must be implemented by derived classes");
42
+ }
43
+ _nativeRemoveEventListener(type, listener, options) {
44
+ throw new Error("_nativeRemoveEventListener must be implemented by derived classes");
45
+ }
46
+ _nativeDispatchEvent(event) {
47
+ throw new Error("_nativeDispatchEvent must be implemented by derived classes");
48
+ }
49
+ }
50
+
51
+ exports.EventListenerManager = EventListenerManager;
52
+ //# sourceMappingURL=event-listener-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/common/event-listener-manager.ts"],"names":[],"mappings":";;;AAMA,MAAa,oBAAoB;IAY/B;QACE,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;QAC9B,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC;IAClD,CAAC;IAMD,2BAA2B,CAAC,WAAoC;QAC9D,IAAI,CAAC,yBAAyB,GAAG,WAAW,IAAI,CAAC,KAAK,CAAC,EAA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YAC9C,IAAI,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC,IAAI,KAAK,CAAC,EAAE;gBAC3C,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;aAChC;SACF;IACH,CAAC;IAMD,aAAa,CAAC,KAAY;QACxB,OAAO,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAKD,sBAAsB;QACpB,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,IAAI,EAAE,EAAE;YAC/C,YAAY,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,gBAAgB,EAAE,EAAE;gBACzD,IAAI,CAAC,0BAA0B,CAAC,IAAI,EAAE,eAAe,EAAE,SAAS,CAAC,CAAC;YACpE,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;IAMS,uBAAuB,CAC/B,IAAY,EACZ,QAAuB,EACvB,OAA2C;QAE3C,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IAMS,0BAA0B,CAClC,IAAY,EACZ,QAAuB,EACvB,OAAwC;QAExC,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;IACvF,CAAC;IAMS,oBAAoB,CAAC,KAAY;QACzC,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;IACjF,CAAC;CACF;AA5ID,oDA4IC","file":"event-listener-manager.js","sourcesContent":["import type { IEventListenerManager } from '../interface/event-listener-manager';\n\n/**\n * Base class to manage event listeners with support for event transformation\n * Used by DefaultGlobal and DefaultWindow to handle the transformation of event coordinates\n */\nexport class EventListenerManager implements IEventListenerManager {\n /**\n * Map that stores the mapping from original listeners to wrapped listeners\n * Structure: Map<eventType, Map<originalListener, wrappedListener>>\n */\n protected _listenerMap: Map<string, Map<EventListenerOrEventListenerObject, EventListener>>;\n\n /**\n * Transformer function that transforms the event\n */\n protected _eventListenerTransformer: (event: Event) => Event;\n\n constructor() {\n this._listenerMap = new Map();\n this._eventListenerTransformer = event => event; // Default: no transformation\n }\n\n /**\n * Set the event transformer function\n * @param transformer Function that transforms events\n */\n setEventListenerTransformer(transformer: (event: Event) => Event): void {\n this._eventListenerTransformer = transformer || (event => event);\n }\n\n /**\n * Add an event listener with event transformation\n * @param type Event type\n * @param listener Original event listener\n * @param options Event listener options\n */\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions\n ): void {\n if (!listener) {\n return;\n }\n\n // Create a wrapped listener that applies the transformation\n const wrappedListener = (event: Event) => {\n const transformedEvent = this._eventListenerTransformer(event);\n if (typeof listener === 'function') {\n listener(transformedEvent);\n } else if (listener.handleEvent) {\n listener.handleEvent(transformedEvent);\n }\n };\n\n // Store the mapping between original and wrapped listener\n if (!this._listenerMap.has(type)) {\n this._listenerMap.set(type, new Map());\n }\n this._listenerMap.get(type)!.set(listener, wrappedListener);\n\n // Add the wrapped listener\n this._nativeAddEventListener(type, wrappedListener, options);\n }\n\n /**\n * Remove an event listener\n * @param type Event type\n * @param listener Event listener to remove\n * @param options Event listener options\n */\n removeEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions\n ): void {\n if (!listener) {\n return;\n }\n\n // Get the wrapped listener from our map\n const wrappedListener = this._listenerMap.get(type)?.get(listener);\n if (wrappedListener) {\n // Remove the wrapped listener\n this._nativeRemoveEventListener(type, wrappedListener, options);\n\n // Remove from our map\n this._listenerMap.get(type)!.delete(listener);\n if (this._listenerMap.get(type)!.size === 0) {\n this._listenerMap.delete(type);\n }\n }\n }\n\n /**\n * Dispatch an event\n * @param event Event to dispatch\n */\n dispatchEvent(event: Event): boolean {\n return this._nativeDispatchEvent(event);\n }\n\n /**\n * Clear all event listeners\n */\n clearAllEventListeners(): void {\n this._listenerMap.forEach((listenersMap, type) => {\n listenersMap.forEach((wrappedListener, originalListener) => {\n this._nativeRemoveEventListener(type, wrappedListener, undefined);\n });\n });\n this._listenerMap.clear();\n }\n\n /**\n * Native implementation of addEventListener\n * To be implemented by derived classes\n */\n protected _nativeAddEventListener(\n type: string,\n listener: EventListener,\n options?: boolean | AddEventListenerOptions\n ): void {\n throw new Error('_nativeAddEventListener must be implemented by derived classes');\n }\n\n /**\n * Native implementation of removeEventListener\n * To be implemented by derived classes\n */\n protected _nativeRemoveEventListener(\n type: string,\n listener: EventListener,\n options?: boolean | EventListenerOptions\n ): void {\n throw new Error('_nativeRemoveEventListener must be implemented by derived classes');\n }\n\n /**\n * Native implementation of dispatchEvent\n * To be implemented by derived classes\n */\n protected _nativeDispatchEvent(event: Event): boolean {\n throw new Error('_nativeDispatchEvent must be implemented by derived classes');\n }\n}\n"]}