@visactor/vchart 2.1.2-alpha.7 → 2.1.2-alpha.9

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 (84) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +142 -142
  3. package/build/index.js +142 -142
  4. package/build/index.min.js +2 -2
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/constant/box-plot.js +2 -1
  7. package/cjs/constant/layout.js +1 -1
  8. package/cjs/constant/marker.js +1 -1
  9. package/cjs/constant/polar.js +1 -2
  10. package/cjs/constant/scatter.js +1 -1
  11. package/cjs/constant/scroll-bar.js +1 -1
  12. package/cjs/constant/sunburst.js +1 -1
  13. package/cjs/constant/waterfall.js +1 -1
  14. package/cjs/constant/word-cloud.js +1 -1
  15. package/cjs/core/index.js +1 -1
  16. package/cjs/core/instance-manager.js +1 -1
  17. package/cjs/core/interface.js +1 -1
  18. package/cjs/core/util.js +1 -1
  19. package/cjs/core/vchart.js +1 -1
  20. package/cjs/data/data-view-utils.js +1 -1
  21. package/cjs/data/initialize.js +1 -1
  22. package/cjs/data/register.js +1 -1
  23. package/cjs/mark/box-plot.js +2 -2
  24. package/cjs/mark/box-plot.js.map +1 -1
  25. package/cjs/mark/cell.js +2 -2
  26. package/cjs/mark/cell.js.map +1 -1
  27. package/cjs/mark/glyph.js +2 -2
  28. package/cjs/mark/glyph.js.map +1 -1
  29. package/cjs/mark/image.js +3 -3
  30. package/cjs/mark/image.js.map +1 -1
  31. package/cjs/mark/link-path.js +2 -2
  32. package/cjs/mark/link-path.js.map +1 -1
  33. package/cjs/mark/liquid.js +2 -2
  34. package/cjs/mark/liquid.js.map +1 -1
  35. package/cjs/mark/path.js +3 -3
  36. package/cjs/mark/path.js.map +1 -1
  37. package/cjs/mark/polygon/polygon.js +3 -3
  38. package/cjs/mark/polygon/polygon.js.map +1 -1
  39. package/cjs/mark/ripple.js +2 -2
  40. package/cjs/mark/ripple.js.map +1 -1
  41. package/cjs/mark/rule.js +3 -3
  42. package/cjs/mark/rule.js.map +1 -1
  43. package/cjs/series/radar/animation.js +2 -2
  44. package/cjs/series/radar/animation.js.map +1 -1
  45. package/esm/constant/box-plot.js +2 -1
  46. package/esm/constant/layout.js +1 -1
  47. package/esm/constant/marker.js +1 -1
  48. package/esm/constant/polar.js +1 -2
  49. package/esm/constant/scatter.js +1 -1
  50. package/esm/constant/scroll-bar.js +1 -1
  51. package/esm/constant/sunburst.js +1 -1
  52. package/esm/constant/waterfall.js +1 -1
  53. package/esm/constant/word-cloud.js +1 -1
  54. package/esm/core/index.js +1 -1
  55. package/esm/core/instance-manager.js +1 -1
  56. package/esm/core/interface.js +1 -1
  57. package/esm/core/util.js +1 -1
  58. package/esm/core/vchart.js +1 -1
  59. package/esm/data/data-view-utils.js +1 -1
  60. package/esm/data/initialize.js +1 -1
  61. package/esm/data/register.js +1 -1
  62. package/esm/mark/box-plot.js +3 -1
  63. package/esm/mark/box-plot.js.map +1 -1
  64. package/esm/mark/cell.js +3 -1
  65. package/esm/mark/cell.js.map +1 -1
  66. package/esm/mark/glyph.js +3 -1
  67. package/esm/mark/glyph.js.map +1 -1
  68. package/esm/mark/image.js +3 -1
  69. package/esm/mark/image.js.map +1 -1
  70. package/esm/mark/link-path.js +1 -1
  71. package/esm/mark/link-path.js.map +1 -1
  72. package/esm/mark/liquid.js +1 -1
  73. package/esm/mark/liquid.js.map +1 -1
  74. package/esm/mark/path.js +3 -1
  75. package/esm/mark/path.js.map +1 -1
  76. package/esm/mark/polygon/polygon.js +3 -1
  77. package/esm/mark/polygon/polygon.js.map +1 -1
  78. package/esm/mark/ripple.js +1 -1
  79. package/esm/mark/ripple.js.map +1 -1
  80. package/esm/mark/rule.js +3 -1
  81. package/esm/mark/rule.js.map +1 -1
  82. package/esm/series/radar/animation.js +1 -1
  83. package/esm/series/radar/animation.js.map +1 -1
  84. package/package.json +9 -9
package/build/index.es.js CHANGED
@@ -75333,148 +75333,6 @@ class MapSeriesTooltipHelper extends BaseSeriesTooltipHelper {
75333
75333
  }
75334
75334
  }
75335
75335
 
75336
- function pseudoRandom(n, seed = 0) {
75337
- let hash = 3735928559 ^ seed;
75338
- return hash = (2654435769 ^ hash) + (hash << 6) + (hash >> 2), hash = 3432918353 * (hash ^ n), hash = hash << 15 | hash >>> 17, hash ^= hash << 25, hash += hash << 9, hash ^= hash >> 4, hash ^= hash << 18, hash |= 1, (hash >>> 0) % 2147483647 / 2147483647;
75339
- }
75340
- function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75341
- const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
75342
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
75343
- return Math.min(1, Math.max(0, _r));
75344
- }
75345
- function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75346
- const delay = column / columnCount,
75347
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
75348
- return Math.min(1, Math.max(0, _r));
75349
- }
75350
- function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75351
- const delay = (columnCount - 1 - column) / columnCount,
75352
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
75353
- return Math.min(1, Math.max(0, _r));
75354
- }
75355
- function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75356
- const delay = row / rowCount,
75357
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
75358
- return Math.min(1, Math.max(0, _r));
75359
- }
75360
- function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75361
- const delay = (rowCount - 1 - row) / rowCount,
75362
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
75363
- return Math.min(1, Math.max(0, _r));
75364
- }
75365
- function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75366
- const centerRow = rowCount / 2,
75367
- centerCol = columnCount / 2,
75368
- distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
75369
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
75370
- return Math.min(1, Math.max(0, _r));
75371
- }
75372
- function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75373
- const delay = (row / rowCount + column / columnCount) / 2,
75374
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
75375
- return Math.min(1, Math.max(0, _r));
75376
- }
75377
- function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75378
- const centerRow = rowCount / 2,
75379
- centerCol = columnCount / 2,
75380
- angle = Math.atan2(row - centerRow, column - centerCol),
75381
- delay = (angle < 0 ? angle + 2 * Math.PI : angle) / (2 * Math.PI),
75382
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
75383
- return Math.min(1, Math.max(0, _r));
75384
- }
75385
- function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75386
- const centerRow = rowCount / 2,
75387
- centerCol = columnCount / 2,
75388
- normalizedDistance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)) / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)),
75389
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
75390
- return Math.min(1, Math.max(0, _r));
75391
- }
75392
- function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75393
- const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
75394
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
75395
- return Math.min(1, Math.max(0, _r));
75396
- }
75397
- function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75398
- const rowPhase = row / rowCount,
75399
- colPhase = column / columnCount,
75400
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * rowPhase * Math.PI) * Math.sin(2 * ratio * Math.PI - 2 * colPhase * Math.PI) + 1) / 2;
75401
- return Math.min(1, Math.max(0, _r));
75402
- }
75403
- function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75404
- const centerRow = rowCount / 2,
75405
- centerCol = columnCount / 2,
75406
- distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
75407
- angle = Math.atan2(row - centerRow, column - centerCol),
75408
- delay = (distance / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)) + angle / (2 * Math.PI)) / 2,
75409
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
75410
- return Math.min(1, Math.max(0, _r));
75411
- }
75412
- function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75413
- const centerCol = columnCount / 2,
75414
- distance = Math.abs(column - centerCol) / centerCol,
75415
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
75416
- return Math.min(1, Math.max(0, _r));
75417
- }
75418
- function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75419
- const centerCol = columnCount / 2,
75420
- distance = 1 - Math.abs(column - centerCol) / centerCol,
75421
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
75422
- return Math.min(1, Math.max(0, _r));
75423
- }
75424
- function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75425
- const centerRow = rowCount / 2,
75426
- distance = Math.abs(row - centerRow) / centerRow,
75427
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
75428
- return Math.min(1, Math.max(0, _r));
75429
- }
75430
- function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75431
- const centerRow = rowCount / 2,
75432
- distance = 1 - Math.abs(row - centerRow) / centerRow,
75433
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
75434
- return Math.min(1, Math.max(0, _r));
75435
- }
75436
- function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75437
- const centerRow = rowCount / 2,
75438
- centerCol = columnCount / 2,
75439
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
75440
- normalizedDistance = Math.min(distance, 1),
75441
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
75442
- return Math.min(1, Math.max(0, _r));
75443
- }
75444
- function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75445
- const centerRow = rowCount / 2,
75446
- centerCol = columnCount / 2,
75447
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
75448
- normalizedDistance = 1 - Math.min(distance, 1),
75449
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
75450
- return Math.min(1, Math.max(0, _r));
75451
- }
75452
- function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75453
- const centerRow = rowCount / 2,
75454
- centerCol = columnCount / 2,
75455
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
75456
- normalizedDistance = Math.min(distance, 1),
75457
- wavePhase = 2 * ratio * Math.PI * 3,
75458
- decay = Math.max(0, 1 - normalizedDistance),
75459
- _r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
75460
- return Math.min(1, Math.max(0, _r));
75461
- }
75462
- function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75463
- const index = row * columnCount + column,
75464
- phase = 2 * pseudoRandom(index, 0) * Math.PI,
75465
- speed = .5 * pseudoRandom(index, 1) + .5,
75466
- direction = 2 * pseudoRandom(index, 2) * Math.PI,
75467
- centerRow = rowCount / 2,
75468
- centerCol = columnCount / 2,
75469
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
75470
- normalizedDistance = Math.min(distance, 1),
75471
- scatterRatio = (ratio - .4) / .6,
75472
- movement = Math.sin(scatterRatio * speed * 8 * Math.PI + phase + direction * scatterRatio),
75473
- distanceEffect = Math.cos(normalizedDistance * Math.PI + scatterRatio * Math.PI),
75474
- _r = minRatio + amplitude * ((movement + 1) / 2 * Math.max(0, 1 - 1.2 * scatterRatio) * (.3 + .7 * distanceEffect));
75475
- return Math.min(1, Math.max(0, _r));
75476
- }
75477
-
75478
75336
  class PathMark extends BaseMark {
75479
75337
  constructor() {
75480
75338
  super(...arguments);
@@ -111931,6 +111789,148 @@ const registerChartResizeZoomPlugin = () => {
111931
111789
  registerChartPlugin(ChartResizeZoomPlugin);
111932
111790
  };
111933
111791
 
111792
+ function pseudoRandom(n, seed = 0) {
111793
+ let hash = 3735928559 ^ seed;
111794
+ return hash = (2654435769 ^ hash) + (hash << 6) + (hash >> 2), hash = 3432918353 * (hash ^ n), hash = hash << 15 | hash >>> 17, hash ^= hash << 25, hash += hash << 9, hash ^= hash >> 4, hash ^= hash << 18, hash |= 1, (hash >>> 0) % 2147483647 / 2147483647;
111795
+ }
111796
+ function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111797
+ const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
111798
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
111799
+ return Math.min(1, Math.max(0, _r));
111800
+ }
111801
+ function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111802
+ const delay = column / columnCount,
111803
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
111804
+ return Math.min(1, Math.max(0, _r));
111805
+ }
111806
+ function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111807
+ const delay = (columnCount - 1 - column) / columnCount,
111808
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
111809
+ return Math.min(1, Math.max(0, _r));
111810
+ }
111811
+ function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111812
+ const delay = row / rowCount,
111813
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
111814
+ return Math.min(1, Math.max(0, _r));
111815
+ }
111816
+ function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111817
+ const delay = (rowCount - 1 - row) / rowCount,
111818
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
111819
+ return Math.min(1, Math.max(0, _r));
111820
+ }
111821
+ function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111822
+ const centerRow = rowCount / 2,
111823
+ centerCol = columnCount / 2,
111824
+ distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
111825
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
111826
+ return Math.min(1, Math.max(0, _r));
111827
+ }
111828
+ function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111829
+ const delay = (row / rowCount + column / columnCount) / 2,
111830
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
111831
+ return Math.min(1, Math.max(0, _r));
111832
+ }
111833
+ function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111834
+ const centerRow = rowCount / 2,
111835
+ centerCol = columnCount / 2,
111836
+ angle = Math.atan2(row - centerRow, column - centerCol),
111837
+ delay = (angle < 0 ? angle + 2 * Math.PI : angle) / (2 * Math.PI),
111838
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
111839
+ return Math.min(1, Math.max(0, _r));
111840
+ }
111841
+ function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111842
+ const centerRow = rowCount / 2,
111843
+ centerCol = columnCount / 2,
111844
+ normalizedDistance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)) / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)),
111845
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
111846
+ return Math.min(1, Math.max(0, _r));
111847
+ }
111848
+ function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111849
+ const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
111850
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
111851
+ return Math.min(1, Math.max(0, _r));
111852
+ }
111853
+ function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111854
+ const rowPhase = row / rowCount,
111855
+ colPhase = column / columnCount,
111856
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * rowPhase * Math.PI) * Math.sin(2 * ratio * Math.PI - 2 * colPhase * Math.PI) + 1) / 2;
111857
+ return Math.min(1, Math.max(0, _r));
111858
+ }
111859
+ function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111860
+ const centerRow = rowCount / 2,
111861
+ centerCol = columnCount / 2,
111862
+ distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
111863
+ angle = Math.atan2(row - centerRow, column - centerCol),
111864
+ delay = (distance / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)) + angle / (2 * Math.PI)) / 2,
111865
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
111866
+ return Math.min(1, Math.max(0, _r));
111867
+ }
111868
+ function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111869
+ const centerCol = columnCount / 2,
111870
+ distance = Math.abs(column - centerCol) / centerCol,
111871
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
111872
+ return Math.min(1, Math.max(0, _r));
111873
+ }
111874
+ function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111875
+ const centerCol = columnCount / 2,
111876
+ distance = 1 - Math.abs(column - centerCol) / centerCol,
111877
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
111878
+ return Math.min(1, Math.max(0, _r));
111879
+ }
111880
+ function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111881
+ const centerRow = rowCount / 2,
111882
+ distance = Math.abs(row - centerRow) / centerRow,
111883
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
111884
+ return Math.min(1, Math.max(0, _r));
111885
+ }
111886
+ function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111887
+ const centerRow = rowCount / 2,
111888
+ distance = 1 - Math.abs(row - centerRow) / centerRow,
111889
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
111890
+ return Math.min(1, Math.max(0, _r));
111891
+ }
111892
+ function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111893
+ const centerRow = rowCount / 2,
111894
+ centerCol = columnCount / 2,
111895
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
111896
+ normalizedDistance = Math.min(distance, 1),
111897
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
111898
+ return Math.min(1, Math.max(0, _r));
111899
+ }
111900
+ function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111901
+ const centerRow = rowCount / 2,
111902
+ centerCol = columnCount / 2,
111903
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
111904
+ normalizedDistance = 1 - Math.min(distance, 1),
111905
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
111906
+ return Math.min(1, Math.max(0, _r));
111907
+ }
111908
+ function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111909
+ const centerRow = rowCount / 2,
111910
+ centerCol = columnCount / 2,
111911
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
111912
+ normalizedDistance = Math.min(distance, 1),
111913
+ wavePhase = 2 * ratio * Math.PI * 3,
111914
+ decay = Math.max(0, 1 - normalizedDistance),
111915
+ _r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
111916
+ return Math.min(1, Math.max(0, _r));
111917
+ }
111918
+ function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111919
+ const index = row * columnCount + column,
111920
+ phase = 2 * pseudoRandom(index, 0) * Math.PI,
111921
+ speed = .5 * pseudoRandom(index, 1) + .5,
111922
+ direction = 2 * pseudoRandom(index, 2) * Math.PI,
111923
+ centerRow = rowCount / 2,
111924
+ centerCol = columnCount / 2,
111925
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
111926
+ normalizedDistance = Math.min(distance, 1),
111927
+ scatterRatio = (ratio - .4) / .6,
111928
+ movement = Math.sin(scatterRatio * speed * 8 * Math.PI + phase + direction * scatterRatio),
111929
+ distanceEffect = Math.cos(normalizedDistance * Math.PI + scatterRatio * Math.PI),
111930
+ _r = minRatio + amplitude * ((movement + 1) / 2 * Math.max(0, 1 - 1.2 * scatterRatio) * (.3 + .7 * distanceEffect));
111931
+ return Math.min(1, Math.max(0, _r));
111932
+ }
111933
+
111934
111934
  function registerStateTransition() {
111935
111935
  const animationTransitionRegistry = AnimationTransitionRegistry.getInstance();
111936
111936
  animationTransitionRegistry.registerTransition('update', '*', () => ({
package/build/index.js CHANGED
@@ -75339,148 +75339,6 @@
75339
75339
  }
75340
75340
  }
75341
75341
 
75342
- function pseudoRandom(n, seed = 0) {
75343
- let hash = 3735928559 ^ seed;
75344
- return hash = (2654435769 ^ hash) + (hash << 6) + (hash >> 2), hash = 3432918353 * (hash ^ n), hash = hash << 15 | hash >>> 17, hash ^= hash << 25, hash += hash << 9, hash ^= hash >> 4, hash ^= hash << 18, hash |= 1, (hash >>> 0) % 2147483647 / 2147483647;
75345
- }
75346
- function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75347
- const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
75348
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
75349
- return Math.min(1, Math.max(0, _r));
75350
- }
75351
- function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75352
- const delay = column / columnCount,
75353
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
75354
- return Math.min(1, Math.max(0, _r));
75355
- }
75356
- function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75357
- const delay = (columnCount - 1 - column) / columnCount,
75358
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
75359
- return Math.min(1, Math.max(0, _r));
75360
- }
75361
- function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75362
- const delay = row / rowCount,
75363
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
75364
- return Math.min(1, Math.max(0, _r));
75365
- }
75366
- function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75367
- const delay = (rowCount - 1 - row) / rowCount,
75368
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
75369
- return Math.min(1, Math.max(0, _r));
75370
- }
75371
- function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75372
- const centerRow = rowCount / 2,
75373
- centerCol = columnCount / 2,
75374
- distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
75375
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
75376
- return Math.min(1, Math.max(0, _r));
75377
- }
75378
- function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75379
- const delay = (row / rowCount + column / columnCount) / 2,
75380
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
75381
- return Math.min(1, Math.max(0, _r));
75382
- }
75383
- function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75384
- const centerRow = rowCount / 2,
75385
- centerCol = columnCount / 2,
75386
- angle = Math.atan2(row - centerRow, column - centerCol),
75387
- delay = (angle < 0 ? angle + 2 * Math.PI : angle) / (2 * Math.PI),
75388
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
75389
- return Math.min(1, Math.max(0, _r));
75390
- }
75391
- function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75392
- const centerRow = rowCount / 2,
75393
- centerCol = columnCount / 2,
75394
- normalizedDistance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)) / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)),
75395
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
75396
- return Math.min(1, Math.max(0, _r));
75397
- }
75398
- function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75399
- const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
75400
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
75401
- return Math.min(1, Math.max(0, _r));
75402
- }
75403
- function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75404
- const rowPhase = row / rowCount,
75405
- colPhase = column / columnCount,
75406
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * rowPhase * Math.PI) * Math.sin(2 * ratio * Math.PI - 2 * colPhase * Math.PI) + 1) / 2;
75407
- return Math.min(1, Math.max(0, _r));
75408
- }
75409
- function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75410
- const centerRow = rowCount / 2,
75411
- centerCol = columnCount / 2,
75412
- distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
75413
- angle = Math.atan2(row - centerRow, column - centerCol),
75414
- delay = (distance / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)) + angle / (2 * Math.PI)) / 2,
75415
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
75416
- return Math.min(1, Math.max(0, _r));
75417
- }
75418
- function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75419
- const centerCol = columnCount / 2,
75420
- distance = Math.abs(column - centerCol) / centerCol,
75421
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
75422
- return Math.min(1, Math.max(0, _r));
75423
- }
75424
- function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75425
- const centerCol = columnCount / 2,
75426
- distance = 1 - Math.abs(column - centerCol) / centerCol,
75427
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
75428
- return Math.min(1, Math.max(0, _r));
75429
- }
75430
- function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75431
- const centerRow = rowCount / 2,
75432
- distance = Math.abs(row - centerRow) / centerRow,
75433
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
75434
- return Math.min(1, Math.max(0, _r));
75435
- }
75436
- function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75437
- const centerRow = rowCount / 2,
75438
- distance = 1 - Math.abs(row - centerRow) / centerRow,
75439
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
75440
- return Math.min(1, Math.max(0, _r));
75441
- }
75442
- function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75443
- const centerRow = rowCount / 2,
75444
- centerCol = columnCount / 2,
75445
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
75446
- normalizedDistance = Math.min(distance, 1),
75447
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
75448
- return Math.min(1, Math.max(0, _r));
75449
- }
75450
- function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75451
- const centerRow = rowCount / 2,
75452
- centerCol = columnCount / 2,
75453
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
75454
- normalizedDistance = 1 - Math.min(distance, 1),
75455
- _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
75456
- return Math.min(1, Math.max(0, _r));
75457
- }
75458
- function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75459
- const centerRow = rowCount / 2,
75460
- centerCol = columnCount / 2,
75461
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
75462
- normalizedDistance = Math.min(distance, 1),
75463
- wavePhase = 2 * ratio * Math.PI * 3,
75464
- decay = Math.max(0, 1 - normalizedDistance),
75465
- _r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
75466
- return Math.min(1, Math.max(0, _r));
75467
- }
75468
- function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
75469
- const index = row * columnCount + column,
75470
- phase = 2 * pseudoRandom(index, 0) * Math.PI,
75471
- speed = .5 * pseudoRandom(index, 1) + .5,
75472
- direction = 2 * pseudoRandom(index, 2) * Math.PI,
75473
- centerRow = rowCount / 2,
75474
- centerCol = columnCount / 2,
75475
- distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
75476
- normalizedDistance = Math.min(distance, 1),
75477
- scatterRatio = (ratio - .4) / .6,
75478
- movement = Math.sin(scatterRatio * speed * 8 * Math.PI + phase + direction * scatterRatio),
75479
- distanceEffect = Math.cos(normalizedDistance * Math.PI + scatterRatio * Math.PI),
75480
- _r = minRatio + amplitude * ((movement + 1) / 2 * Math.max(0, 1 - 1.2 * scatterRatio) * (.3 + .7 * distanceEffect));
75481
- return Math.min(1, Math.max(0, _r));
75482
- }
75483
-
75484
75342
  class PathMark extends BaseMark {
75485
75343
  constructor() {
75486
75344
  super(...arguments);
@@ -111937,6 +111795,148 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
111937
111795
  registerChartPlugin(ChartResizeZoomPlugin);
111938
111796
  };
111939
111797
 
111798
+ function pseudoRandom(n, seed = 0) {
111799
+ let hash = 3735928559 ^ seed;
111800
+ return hash = (2654435769 ^ hash) + (hash << 6) + (hash >> 2), hash = 3432918353 * (hash ^ n), hash = hash << 15 | hash >>> 17, hash ^= hash << 25, hash += hash << 9, hash ^= hash >> 4, hash ^= hash << 18, hash |= 1, (hash >>> 0) % 2147483647 / 2147483647;
111801
+ }
111802
+ function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111803
+ const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
111804
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
111805
+ return Math.min(1, Math.max(0, _r));
111806
+ }
111807
+ function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111808
+ const delay = column / columnCount,
111809
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
111810
+ return Math.min(1, Math.max(0, _r));
111811
+ }
111812
+ function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111813
+ const delay = (columnCount - 1 - column) / columnCount,
111814
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
111815
+ return Math.min(1, Math.max(0, _r));
111816
+ }
111817
+ function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111818
+ const delay = row / rowCount,
111819
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
111820
+ return Math.min(1, Math.max(0, _r));
111821
+ }
111822
+ function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111823
+ const delay = (rowCount - 1 - row) / rowCount,
111824
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
111825
+ return Math.min(1, Math.max(0, _r));
111826
+ }
111827
+ function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111828
+ const centerRow = rowCount / 2,
111829
+ centerCol = columnCount / 2,
111830
+ distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
111831
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
111832
+ return Math.min(1, Math.max(0, _r));
111833
+ }
111834
+ function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111835
+ const delay = (row / rowCount + column / columnCount) / 2,
111836
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
111837
+ return Math.min(1, Math.max(0, _r));
111838
+ }
111839
+ function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111840
+ const centerRow = rowCount / 2,
111841
+ centerCol = columnCount / 2,
111842
+ angle = Math.atan2(row - centerRow, column - centerCol),
111843
+ delay = (angle < 0 ? angle + 2 * Math.PI : angle) / (2 * Math.PI),
111844
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
111845
+ return Math.min(1, Math.max(0, _r));
111846
+ }
111847
+ function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111848
+ const centerRow = rowCount / 2,
111849
+ centerCol = columnCount / 2,
111850
+ normalizedDistance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)) / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)),
111851
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
111852
+ return Math.min(1, Math.max(0, _r));
111853
+ }
111854
+ function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111855
+ const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
111856
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
111857
+ return Math.min(1, Math.max(0, _r));
111858
+ }
111859
+ function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111860
+ const rowPhase = row / rowCount,
111861
+ colPhase = column / columnCount,
111862
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * rowPhase * Math.PI) * Math.sin(2 * ratio * Math.PI - 2 * colPhase * Math.PI) + 1) / 2;
111863
+ return Math.min(1, Math.max(0, _r));
111864
+ }
111865
+ function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111866
+ const centerRow = rowCount / 2,
111867
+ centerCol = columnCount / 2,
111868
+ distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
111869
+ angle = Math.atan2(row - centerRow, column - centerCol),
111870
+ delay = (distance / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)) + angle / (2 * Math.PI)) / 2,
111871
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
111872
+ return Math.min(1, Math.max(0, _r));
111873
+ }
111874
+ function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111875
+ const centerCol = columnCount / 2,
111876
+ distance = Math.abs(column - centerCol) / centerCol,
111877
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
111878
+ return Math.min(1, Math.max(0, _r));
111879
+ }
111880
+ function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111881
+ const centerCol = columnCount / 2,
111882
+ distance = 1 - Math.abs(column - centerCol) / centerCol,
111883
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
111884
+ return Math.min(1, Math.max(0, _r));
111885
+ }
111886
+ function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111887
+ const centerRow = rowCount / 2,
111888
+ distance = Math.abs(row - centerRow) / centerRow,
111889
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
111890
+ return Math.min(1, Math.max(0, _r));
111891
+ }
111892
+ function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111893
+ const centerRow = rowCount / 2,
111894
+ distance = 1 - Math.abs(row - centerRow) / centerRow,
111895
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
111896
+ return Math.min(1, Math.max(0, _r));
111897
+ }
111898
+ function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111899
+ const centerRow = rowCount / 2,
111900
+ centerCol = columnCount / 2,
111901
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
111902
+ normalizedDistance = Math.min(distance, 1),
111903
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
111904
+ return Math.min(1, Math.max(0, _r));
111905
+ }
111906
+ function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111907
+ const centerRow = rowCount / 2,
111908
+ centerCol = columnCount / 2,
111909
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
111910
+ normalizedDistance = 1 - Math.min(distance, 1),
111911
+ _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
111912
+ return Math.min(1, Math.max(0, _r));
111913
+ }
111914
+ function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111915
+ const centerRow = rowCount / 2,
111916
+ centerCol = columnCount / 2,
111917
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
111918
+ normalizedDistance = Math.min(distance, 1),
111919
+ wavePhase = 2 * ratio * Math.PI * 3,
111920
+ decay = Math.max(0, 1 - normalizedDistance),
111921
+ _r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
111922
+ return Math.min(1, Math.max(0, _r));
111923
+ }
111924
+ function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
111925
+ const index = row * columnCount + column,
111926
+ phase = 2 * pseudoRandom(index, 0) * Math.PI,
111927
+ speed = .5 * pseudoRandom(index, 1) + .5,
111928
+ direction = 2 * pseudoRandom(index, 2) * Math.PI,
111929
+ centerRow = rowCount / 2,
111930
+ centerCol = columnCount / 2,
111931
+ distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
111932
+ normalizedDistance = Math.min(distance, 1),
111933
+ scatterRatio = (ratio - .4) / .6,
111934
+ movement = Math.sin(scatterRatio * speed * 8 * Math.PI + phase + direction * scatterRatio),
111935
+ distanceEffect = Math.cos(normalizedDistance * Math.PI + scatterRatio * Math.PI),
111936
+ _r = minRatio + amplitude * ((movement + 1) / 2 * Math.max(0, 1 - 1.2 * scatterRatio) * (.3 + .7 * distanceEffect));
111937
+ return Math.min(1, Math.max(0, _r));
111938
+ }
111939
+
111940
111940
  function registerStateTransition() {
111941
111941
  const animationTransitionRegistry = AnimationTransitionRegistry.getInstance();
111942
111942
  animationTransitionRegistry.registerTransition('update', '*', () => ({