@visactor/vrender 0.19.19 → 0.19.20

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.
package/dist/index.js CHANGED
@@ -3182,7 +3182,7 @@
3182
3182
  return genCurveSegments(path, points);
3183
3183
  }
3184
3184
 
3185
- function point$2(curveClass, x, y, defined, p) {
3185
+ function point$3(curveClass, x, y, defined, p) {
3186
3186
  curveClass.context.bezierCurveTo((2 * curveClass._x0 + curveClass._x1) / 3, (2 * curveClass._y0 + curveClass._y1) / 3, (curveClass._x0 + 2 * curveClass._x1) / 3, (curveClass._y0 + 2 * curveClass._y1) / 3, (curveClass._x0 + 4 * curveClass._x1 + x) / 6, (curveClass._y0 + 4 * curveClass._y1 + y) / 6, defined, curveClass.lastPoint1);
3187
3187
  }
3188
3188
  class Basis {
@@ -3199,7 +3199,7 @@
3199
3199
  this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0, this.startPoint && this.point(this.startPoint);
3200
3200
  }
3201
3201
  lineEnd() {
3202
- if (2 === this._point) point$2(this, 6 * this._x1 - (this._x0 + 4 * this._x1), 6 * this._y1 - (this._y0 + 4 * this._y1), !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
3202
+ if (2 === this._point) point$3(this, 6 * this._x1 - (this._x0 + 4 * this._x1), 6 * this._y1 - (this._y0 + 4 * this._y1), !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
3203
3203
  (this._line || 0 !== this._line && 1 === this._point) && this.context.closePath(), this._line = 1 - this._line;
3204
3204
  }
3205
3205
  point(p) {
@@ -3213,7 +3213,7 @@
3213
3213
  this._point = 2;
3214
3214
  break;
3215
3215
  default:
3216
- point$2(this, x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
3216
+ point$3(this, x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
3217
3217
  }
3218
3218
  this._x0 = this._x1, this._x1 = x, this._y0 = this._y1, this._y1 = y, this._lastDefined1 = this._lastDefined2, this._lastDefined2 = p.defined, this.lastPoint0 = this.lastPoint1, this.lastPoint1 = p;
3219
3219
  }
@@ -3251,7 +3251,7 @@
3251
3251
  const h = curveClass._x1 - curveClass._x0;
3252
3252
  return h ? (3 * (curveClass._y1 - curveClass._y0) / h - t) / 2 : t;
3253
3253
  }
3254
- function point$1(curveClass, t0, t1, defined, p) {
3254
+ function point$2(curveClass, t0, t1, defined, p) {
3255
3255
  const x0 = curveClass._x0,
3256
3256
  y0 = curveClass._y0,
3257
3257
  x1 = curveClass._x1,
@@ -3278,7 +3278,7 @@
3278
3278
  this.context.lineTo(this._x1, this._y1, !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
3279
3279
  break;
3280
3280
  case 3:
3281
- point$1(this, this._t0, slope2(this, this._t0), !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
3281
+ point$2(this, this._t0, slope2(this, this._t0), !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
3282
3282
  }
3283
3283
  (this._line || 0 !== this._line && 1 === this._point) && this.context.closePath(), this._line = 1 - this._line;
3284
3284
  }
@@ -3294,10 +3294,10 @@
3294
3294
  this._point = 2;
3295
3295
  break;
3296
3296
  case 2:
3297
- this._point = 3, point$1(this, slope2(this, t1 = slope3(this, x, y)), t1, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
3297
+ this._point = 3, point$2(this, slope2(this, t1 = slope3(this, x, y)), t1, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
3298
3298
  break;
3299
3299
  default:
3300
- point$1(this, this._t0, t1 = slope3(this, x, y), !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
3300
+ point$2(this, this._t0, t1 = slope3(this, x, y), !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
3301
3301
  }
3302
3302
  this._x0 = this._x1, this._x1 = x, this._y0 = this._y1, this._y1 = y, this._t0 = t1, this._lastDefined1 = this._lastDefined2, this._lastDefined2 = !1 !== p.defined, this.lastPoint0 = this.lastPoint1, this.lastPoint1 = p;
3303
3303
  }
@@ -3418,6 +3418,162 @@
3418
3418
  return genCurveSegments(path, points);
3419
3419
  }
3420
3420
 
3421
+ function point$1(curveClass, x, y, defined, p) {
3422
+ let x1 = curveClass._x1,
3423
+ y1 = curveClass._y1,
3424
+ x2 = curveClass._x2,
3425
+ y2 = curveClass._y2;
3426
+ if (curveClass._l01_a > epsilon) {
3427
+ const a = 2 * curveClass._l01_2a + 3 * curveClass._l01_a * curveClass._l12_a + curveClass._l12_2a,
3428
+ n = 3 * curveClass._l01_a * (curveClass._l01_a + curveClass._l12_a);
3429
+ x1 = (x1 * a - curveClass._x0 * curveClass._l12_2a + curveClass._x2 * curveClass._l01_2a) / n, y1 = (y1 * a - curveClass._y0 * curveClass._l12_2a + curveClass._y2 * curveClass._l01_2a) / n;
3430
+ }
3431
+ if (curveClass._l23_a > epsilon) {
3432
+ const b = 2 * curveClass._l23_2a + 3 * curveClass._l23_a * curveClass._l12_a + curveClass._l12_2a,
3433
+ m = 3 * curveClass._l23_a * (curveClass._l23_a + curveClass._l12_a);
3434
+ x2 = (x2 * b + curveClass._x1 * curveClass._l23_2a - x * curveClass._l12_2a) / m, y2 = (y2 * b + curveClass._y1 * curveClass._l23_2a - y * curveClass._l12_2a) / m;
3435
+ }
3436
+ curveClass.context.bezierCurveTo(x1, y1, x2, y2, curveClass._x2, curveClass._y2, defined, curveClass.lastPoint1);
3437
+ }
3438
+ class CatmullRom {
3439
+ constructor(context) {
3440
+ let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
3441
+ let startPoint = arguments.length > 2 ? arguments[2] : undefined;
3442
+ this.context = context, this.startPoint = startPoint, this._alpha = alpha;
3443
+ }
3444
+ areaStart() {
3445
+ this._line = 0;
3446
+ }
3447
+ areaEnd() {
3448
+ this._line = NaN;
3449
+ }
3450
+ lineStart() {
3451
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
3452
+ }
3453
+ lineEnd() {
3454
+ switch (this._point) {
3455
+ case 2:
3456
+ this.context.lineTo(this._x2, this._y2, !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
3457
+ break;
3458
+ case 3:
3459
+ this.point({
3460
+ x: this._x2,
3461
+ y: this._y2
3462
+ });
3463
+ }
3464
+ (this._line || 0 !== this._line && 1 === this._point) && this.context.closePath(), this._line = 1 - this._line;
3465
+ }
3466
+ point(p) {
3467
+ const {
3468
+ x: x,
3469
+ y: y
3470
+ } = p;
3471
+ if (this._point) {
3472
+ const x23 = this._x2 - x,
3473
+ y23 = this._y2 - y;
3474
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
3475
+ }
3476
+ switch (this._point) {
3477
+ case 0:
3478
+ this._point = 1, this._line ? this.context.lineTo(x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2) : this.context.moveTo(x, y);
3479
+ break;
3480
+ case 1:
3481
+ this._point = 2;
3482
+ break;
3483
+ case 2:
3484
+ this._point = 3;
3485
+ default:
3486
+ point$1(this, x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
3487
+ }
3488
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = x, this._y0 = this._y1, this._y1 = this._y2, this._y2 = y, this._lastDefined1 = this._lastDefined2, this._lastDefined2 = p.defined, this.lastPoint0 = this.lastPoint1, this.lastPoint1 = p;
3489
+ }
3490
+ tryUpdateLength() {
3491
+ return this.context.tryUpdateLength();
3492
+ }
3493
+ }
3494
+ function commonGenCatmullRomSegments(type, cons) {
3495
+ return function (points, alpha) {
3496
+ let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
3497
+ const {
3498
+ direction: direction,
3499
+ startPoint: startPoint
3500
+ } = params;
3501
+ if (points.length < 2 - Number(!!startPoint)) return null;
3502
+ if (points.length < 3 - Number(!!startPoint)) return genLinearSegments(points, params);
3503
+ const segContext = genSegContext(type, direction, points),
3504
+ gatmullRom = new cons(segContext, alpha, startPoint);
3505
+ return genCurveSegments(gatmullRom, points), segContext;
3506
+ };
3507
+ }
3508
+ const genCatmullRomSegments = commonGenCatmullRomSegments("catmullRom", CatmullRom);
3509
+
3510
+ class CatmullRomClosed {
3511
+ constructor(context) {
3512
+ let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
3513
+ let startPoint = arguments.length > 2 ? arguments[2] : undefined;
3514
+ this.context = context, this.startPoint = startPoint, this._alpha = alpha;
3515
+ }
3516
+ areaStart() {
3517
+ this._line = 0;
3518
+ }
3519
+ areaEnd() {
3520
+ this._line = NaN;
3521
+ }
3522
+ lineStart() {
3523
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
3524
+ }
3525
+ lineEnd() {
3526
+ switch (this._point) {
3527
+ case 1:
3528
+ this.context.moveTo(this._x3, this._y3, this.lastPoint1), this.context.closePath();
3529
+ break;
3530
+ case 2:
3531
+ this.context.lineTo(this._x3, this._y3, !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1), this.context.closePath();
3532
+ break;
3533
+ case 3:
3534
+ this.point({
3535
+ x: this._x3,
3536
+ y: this._y3
3537
+ }), this.point({
3538
+ x: this._x4,
3539
+ y: this._y4
3540
+ }), this.point({
3541
+ x: this._x5,
3542
+ y: this._y5
3543
+ });
3544
+ }
3545
+ }
3546
+ point(p) {
3547
+ const {
3548
+ x: x,
3549
+ y: y
3550
+ } = p;
3551
+ if (this._point) {
3552
+ const x23 = this._x2 - x,
3553
+ y23 = this._y2 - y;
3554
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
3555
+ }
3556
+ switch (this._point) {
3557
+ case 0:
3558
+ this._point = 1, this._x3 = x, this._y3 = y;
3559
+ break;
3560
+ case 1:
3561
+ this._point = 2, this.context.moveTo(this._x4 = x, this._y4 = y, p);
3562
+ break;
3563
+ case 2:
3564
+ this._point = 3, this._x5 = x, this._y5 = y;
3565
+ break;
3566
+ default:
3567
+ point$1(this, x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
3568
+ }
3569
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = x, this._y0 = this._y1, this._y1 = this._y2, this._y2 = y, this._lastDefined1 = this._lastDefined2, this._lastDefined2 = p.defined, this.lastPoint0 = this.lastPoint1, this.lastPoint1 = p;
3570
+ }
3571
+ tryUpdateLength() {
3572
+ return this.context.tryUpdateLength();
3573
+ }
3574
+ }
3575
+ const genCatmullRomClosedSegments = commonGenCatmullRomSegments("catmullRomClosed", CatmullRomClosed);
3576
+
3421
3577
  class CurveContext {
3422
3578
  constructor(path) {
3423
3579
  this.path = path, this._lastX = this._lastY = this._startX = this._startY = 0;
@@ -3457,6 +3613,7 @@
3457
3613
  }
3458
3614
 
3459
3615
  function calcLineCache$1(points, curveType, params) {
3616
+ var _a, _b;
3460
3617
  switch (curveType) {
3461
3618
  case "linear":
3462
3619
  default:
@@ -3473,6 +3630,10 @@
3473
3630
  return genStepSegments(points, 0, params);
3474
3631
  case "stepAfter":
3475
3632
  return genStepSegments(points, 1, params);
3633
+ case "catmullRom":
3634
+ return genCatmullRomSegments(points, null !== (_a = null == params ? void 0 : params.curveTension) && void 0 !== _a ? _a : .5, params);
3635
+ case "catmullRomClosed":
3636
+ return genCatmullRomClosedSegments(points, null !== (_b = null == params ? void 0 : params.curveTension) && void 0 !== _b ? _b : .5, params);
3476
3637
  case "linearClosed":
3477
3638
  return genLinearClosedSegments(points, params);
3478
3639
  }
@@ -3913,7 +4074,8 @@
3913
4074
  segments: [],
3914
4075
  curveType: "linear",
3915
4076
  clipRange: 1,
3916
- closePath: !1
4077
+ closePath: !1,
4078
+ curveTension: 1
3917
4079
  });
3918
4080
  const DefaultCircleAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
3919
4081
  radius: 1,
@@ -3948,7 +4110,8 @@
3948
4110
  curveType: "linear",
3949
4111
  clipRange: 1,
3950
4112
  clipRangeByDimension: "default",
3951
- closePath: !1
4113
+ closePath: !1,
4114
+ curveTension: 1
3952
4115
  });
3953
4116
  const DefaultPathAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
3954
4117
  path: new CustomPath2D(),
@@ -10527,6 +10690,7 @@
10527
10690
  }
10528
10691
  if (outerRadius <= epsilon) context.moveTo(cx, cy);else if (deltaAngle >= pi2 - epsilon) context.moveTo(cx + outerRadius * cos(startAngle), cy + outerRadius * sin(startAngle)), context.arc(cx, cy, outerRadius, startAngle, endAngle, !clockwise), innerRadius > epsilon && (context.moveTo(cx + innerRadius * cos(endAngle), cy + innerRadius * sin(endAngle)), context.arc(cx, cy, innerRadius, endAngle, startAngle, clockwise));else {
10529
10692
  const cornerRadius = arc.getParsedCornerRadius(),
10693
+ cornerRadiusIsArray = isArray$1(cornerRadius),
10530
10694
  {
10531
10695
  outerDeltaAngle: outerDeltaAngle,
10532
10696
  innerDeltaAngle: innerDeltaAngle,
@@ -10535,10 +10699,10 @@
10535
10699
  innerEndAngle: innerEndAngle,
10536
10700
  innerStartAngle: innerStartAngle
10537
10701
  } = arc.getParsePadAngle(startAngle, endAngle),
10538
- outerCornerRadiusStart = cornerRadius,
10539
- outerCornerRadiusEnd = cornerRadius,
10540
- innerCornerRadiusEnd = cornerRadius,
10541
- innerCornerRadiusStart = cornerRadius,
10702
+ outerCornerRadiusStart = cornerRadiusIsArray ? cornerRadius[0] : cornerRadius,
10703
+ outerCornerRadiusEnd = cornerRadiusIsArray ? cornerRadius[1] : cornerRadius,
10704
+ innerCornerRadiusEnd = cornerRadiusIsArray ? cornerRadius[2] : cornerRadius,
10705
+ innerCornerRadiusStart = cornerRadiusIsArray ? cornerRadius[3] : cornerRadius,
10542
10706
  maxOuterCornerRadius = Math.max(outerCornerRadiusEnd, outerCornerRadiusStart),
10543
10707
  maxInnerCornerRadius = Math.max(innerCornerRadiusEnd, innerCornerRadiusStart);
10544
10708
  let limitedOcr = maxOuterCornerRadius,
@@ -12095,7 +12259,7 @@
12095
12259
  return new Symbol$1(attributes);
12096
12260
  }
12097
12261
 
12098
- const LINE_UPDATE_TAG_KEY = ["segments", "points", "curveType", ...GRAPHIC_UPDATE_TAG_KEY];
12262
+ const LINE_UPDATE_TAG_KEY = ["segments", "points", "curveType", "curveTension", ...GRAPHIC_UPDATE_TAG_KEY];
12099
12263
  let Line$1 = class Line extends Graphic {
12100
12264
  constructor() {
12101
12265
  let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -13172,7 +13336,7 @@
13172
13336
  return new Path(attributes);
13173
13337
  }
13174
13338
 
13175
- const AREA_UPDATE_TAG_KEY = ["segments", "points", "curveType", ...GRAPHIC_UPDATE_TAG_KEY];
13339
+ const AREA_UPDATE_TAG_KEY = ["segments", "points", "curveType", "curveTension", ...GRAPHIC_UPDATE_TAG_KEY];
13176
13340
  class Area extends Graphic {
13177
13341
  constructor(params) {
13178
13342
  super(params), this.type = "area", this.numberType = AREA_NUMBER_TYPE;
@@ -13282,8 +13446,13 @@
13282
13446
  innerRadius = arcTheme.innerRadius
13283
13447
  } = this.attribute;
13284
13448
  if (outerRadius += outerPadding, innerRadius -= innerPadding, 0 === cornerRadius || "0%" === cornerRadius) return 0;
13285
- const deltaRadius = Math.abs(outerRadius - innerRadius);
13286
- return Math.min(isNumber$1(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
13449
+ const deltaRadius = Math.abs(outerRadius - innerRadius),
13450
+ parseCR = cornerRadius => Math.min(isNumber$1(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
13451
+ if (isArray$1(cornerRadius)) {
13452
+ const crList = cornerRadius.map(cr => parseCR(cr) || 0);
13453
+ return 0 === crList.length ? [crList[0], crList[0], crList[0], crList[0]] : 2 === crList.length ? [crList[0], crList[1], crList[0], crList[1]] : (3 === crList.length && crList.push(0), crList);
13454
+ }
13455
+ return parseCR(cornerRadius);
13287
13456
  }
13288
13457
  getParsedAngle() {
13289
13458
  const arcTheme = getTheme(this).arc;
@@ -15577,6 +15746,7 @@
15577
15746
  outerRadius = innerRadius, innerRadius = temp;
15578
15747
  }
15579
15748
  const cornerRadius = arc.getParsedCornerRadius(),
15749
+ cornerRadiusIsArray = isArray$1(cornerRadius),
15580
15750
  {
15581
15751
  outerDeltaAngle: outerDeltaAngle,
15582
15752
  innerDeltaAngle: innerDeltaAngle,
@@ -15585,10 +15755,10 @@
15585
15755
  innerEndAngle: innerEndAngle,
15586
15756
  innerStartAngle: innerStartAngle
15587
15757
  } = arc.getParsePadAngle(startAngle, endAngle),
15588
- outerCornerRadiusStart = cornerRadius,
15589
- outerCornerRadiusEnd = cornerRadius,
15590
- innerCornerRadiusEnd = cornerRadius,
15591
- innerCornerRadiusStart = cornerRadius,
15758
+ outerCornerRadiusStart = cornerRadiusIsArray ? cornerRadius[0] : cornerRadius,
15759
+ outerCornerRadiusEnd = cornerRadiusIsArray ? cornerRadius[1] : cornerRadius,
15760
+ innerCornerRadiusEnd = cornerRadiusIsArray ? cornerRadius[2] : cornerRadius,
15761
+ innerCornerRadiusStart = cornerRadiusIsArray ? cornerRadius[3] : cornerRadius,
15592
15762
  maxOuterCornerRadius = Math.max(outerCornerRadiusEnd, outerCornerRadiusStart),
15593
15763
  maxInnerCornerRadius = Math.max(innerCornerRadiusEnd, innerCornerRadiusStart);
15594
15764
  let limitedOcr = maxOuterCornerRadius,
@@ -15979,7 +16149,8 @@
15979
16149
  strokeOpacity = lineAttribute.strokeOpacity,
15980
16150
  segments: segments,
15981
16151
  points: points,
15982
- closePath: closePath
16152
+ closePath: closePath,
16153
+ curveTension = lineAttribute.curveTension
15983
16154
  } = line.attribute;
15984
16155
  if (!this.valid(line, lineAttribute, fillCb, strokeCb)) return;
15985
16156
  let {
@@ -16013,7 +16184,8 @@
16013
16184
  defined: lastSeg.curves[lastSeg.curves.length - 1].defined
16014
16185
  } : index > 1 && (startPoint.x = lastSeg.endX, startPoint.y = lastSeg.endY, startPoint.defined = lastSeg.curves[lastSeg.curves.length - 1].defined);
16015
16186
  const data = calcLineCache$1(seg.points, curveType, {
16016
- startPoint: startPoint
16187
+ startPoint: startPoint,
16188
+ curveTension: curveTension
16017
16189
  });
16018
16190
  return lastSeg = data, data;
16019
16191
  }).filter(item => !!item), "linearClosed" === curveType) {
@@ -16030,7 +16202,9 @@
16030
16202
  }
16031
16203
  } else {
16032
16204
  if (!points || !points.length) return line.cache = null, void line.clearUpdateShapeTag();
16033
- line.cache = calcLineCache$1(_points, curveType);
16205
+ line.cache = calcLineCache$1(_points, curveType, {
16206
+ curveTension: curveTension
16207
+ });
16034
16208
  }
16035
16209
  line.clearUpdateShapeTag();
16036
16210
  }
@@ -16201,6 +16375,7 @@
16201
16375
  };
16202
16376
  };
16203
16377
  function calcLineCache(points, curveType, params) {
16378
+ var _a, _b;
16204
16379
  switch (curveType) {
16205
16380
  case "linear":
16206
16381
  default:
@@ -16217,6 +16392,10 @@
16217
16392
  return genStepSegments(points, 0, params);
16218
16393
  case "stepAfter":
16219
16394
  return genStepSegments(points, 1, params);
16395
+ case "catmullRom":
16396
+ return genCatmullRomSegments(points, null !== (_a = null == params ? void 0 : params.curveTension) && void 0 !== _a ? _a : .5, params);
16397
+ case "catmullRomClosed":
16398
+ return genCatmullRomClosedSegments(points, null !== (_b = null == params ? void 0 : params.curveTension) && void 0 !== _b ? _b : .5, params);
16220
16399
  case "linearClosed":
16221
16400
  return genLinearClosedSegments(points, params);
16222
16401
  }
@@ -16281,7 +16460,8 @@
16281
16460
  stroke = areaAttribute.stroke,
16282
16461
  fillOpacity = areaAttribute.fillOpacity,
16283
16462
  z = areaAttribute.z,
16284
- strokeOpacity = areaAttribute.strokeOpacity
16463
+ strokeOpacity = areaAttribute.strokeOpacity,
16464
+ curveTension = areaAttribute.curveTension
16285
16465
  } = area.attribute,
16286
16466
  data = this.valid(area, areaAttribute, fillCb, strokeCb);
16287
16467
  if (!data) return;
@@ -16312,7 +16492,8 @@
16312
16492
  y: lastTopSeg.endY
16313
16493
  } : index > 1 && (startPoint.x = lastTopSeg.endX, startPoint.y = lastTopSeg.endY);
16314
16494
  const data = calcLineCache(seg.points, curveType, {
16315
- startPoint: startPoint
16495
+ startPoint: startPoint,
16496
+ curveTension: curveTension
16316
16497
  });
16317
16498
  return lastTopSeg = data, data;
16318
16499
  }).filter(item => !!item);
@@ -16333,7 +16514,9 @@
16333
16514
  y: null !== (_d = endPoint.y1) && void 0 !== _d ? _d : endPoint.y
16334
16515
  });
16335
16516
  }
16336
- bottomPoints.length > 1 && (lastBottomSeg = calcLineCache(bottomPoints, "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType), bottomCaches.unshift(lastBottomSeg));
16517
+ bottomPoints.length > 1 && (lastBottomSeg = calcLineCache(bottomPoints, "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType, {
16518
+ curveTension: curveTension
16519
+ }), bottomCaches.unshift(lastBottomSeg));
16337
16520
  }
16338
16521
  area.cacheArea = bottomCaches.map((item, index) => ({
16339
16522
  top: topCaches[index],
@@ -16348,8 +16531,12 @@
16348
16531
  x: null !== (_e = points[i].x1) && void 0 !== _e ? _e : points[i].x,
16349
16532
  y: null !== (_f = points[i].y1) && void 0 !== _f ? _f : points[i].y
16350
16533
  });
16351
- const topCache = calcLineCache(topPoints, curveType),
16352
- bottomCache = calcLineCache(bottomPoints, "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType);
16534
+ const topCache = calcLineCache(topPoints, curveType, {
16535
+ curveTension: curveTension
16536
+ }),
16537
+ bottomCache = calcLineCache(bottomPoints, "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType, {
16538
+ curveTension: curveTension
16539
+ });
16353
16540
  area.cacheArea = {
16354
16541
  top: topCache,
16355
16542
  bottom: bottomCache
@@ -29111,7 +29298,7 @@
29111
29298
 
29112
29299
  const roughModule = _roughModule;
29113
29300
 
29114
- const version = "0.19.19";
29301
+ const version = "0.19.20";
29115
29302
  preLoadAllModule();
29116
29303
  if (isBrowserEnv()) {
29117
29304
  loadBrowserEnv(container);
@@ -29623,7 +29810,7 @@
29623
29810
  exports.pathMathPickModule = pathMathPickModule;
29624
29811
  exports.pathModule = pathModule;
29625
29812
  exports.pathToBezierCurves = pathToBezierCurves;
29626
- exports.point = point$2;
29813
+ exports.point = point$3;
29627
29814
  exports.pointEqual = pointEqual;
29628
29815
  exports.pointInterpolation = pointInterpolation;
29629
29816
  exports.pointInterpolationHighPerformance = pointInterpolationHighPerformance;