@visactor/vrender 0.19.24-alpha.1 → 0.19.24-alpha.2

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/cjs/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import '@visactor/vrender-core';
2
- export declare const version = "0.19.24-alpha.1";
2
+ export declare const version = "0.19.24-alpha.2";
3
3
  export * from '@visactor/vrender-core';
4
4
  export * from '@visactor/vrender-kits';
package/cjs/index.js CHANGED
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "__esModule", {
21
21
 
22
22
  const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits"), vrender_kits_2 = require("@visactor/vrender-kits");
23
23
 
24
- exports.version = "0.19.24-alpha.1", (0, vrender_core_1.preLoadAllModule)(), (0,
24
+ exports.version = "0.19.24-alpha.2", (0, vrender_core_1.preLoadAllModule)(), (0,
25
25
  vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
26
26
  vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
27
27
  (0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA8F;AAC9F,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AACnB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule } from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.19.24-alpha.1\";\n\npreLoadAllModule();\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA8F;AAC9F,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AACnB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule } from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.19.24-alpha.2\";\n\npreLoadAllModule();\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
package/dist/index.es.js CHANGED
@@ -15415,7 +15415,7 @@ class DefaultGroupBackgroundRenderContribution extends DefaultBaseBackgroundRend
15415
15415
  const defaultGroupBackgroundRenderContribution = new DefaultGroupBackgroundRenderContribution();
15416
15416
 
15417
15417
  const halfPi = pi / 2;
15418
- function createRectPath(path, x, y, width, height, rectCornerRadius) {
15418
+ function createRectPath(path, x, y, width, height, rectCornerRadius, edgeCb) {
15419
15419
  let cornerRadius;
15420
15420
  if (width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$1(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
15421
15421
  const cornerRadiusArr = rectCornerRadius;
@@ -15447,22 +15447,22 @@ function createRectPath(path, x, y, width, height, rectCornerRadius) {
15447
15447
  rightBottomPoint2 = [rightBottom[0], rightBottom[1] - _cornerRadius[2]],
15448
15448
  leftBottomPoint1 = [leftBottom[0] + _cornerRadius[3], leftBottom[1]],
15449
15449
  leftBottomPoint2 = [leftBottom[0], leftBottom[1] - _cornerRadius[3]];
15450
- if (path.moveTo(leftTopPoint1[0], leftTopPoint1[1]), path.lineTo(rightTopPoint1[0], rightTopPoint1[1]), !arrayEqual(rightTopPoint1, rightTopPoint2)) {
15450
+ if (path.moveTo(leftTopPoint1[0], leftTopPoint1[1]), edgeCb && edgeCb[0] ? edgeCb[0](leftTopPoint1[0], leftTopPoint1[1], rightTopPoint1[0], rightTopPoint1[1]) : path.lineTo(rightTopPoint1[0], rightTopPoint1[1]), !arrayEqual(rightTopPoint1, rightTopPoint2)) {
15451
15451
  const centerX = rightTopPoint1[0],
15452
15452
  centerY = rightTopPoint1[1] + _cornerRadius[1];
15453
15453
  path.arc(centerX, centerY, _cornerRadius[1], -halfPi, 0, !1);
15454
15454
  }
15455
- if (path.lineTo(rightBottomPoint2[0], rightBottomPoint2[1]), !arrayEqual(rightBottomPoint1, rightBottomPoint2)) {
15455
+ if (edgeCb && edgeCb[1] ? edgeCb[1](rightTopPoint1[0], rightTopPoint1[1], rightBottomPoint2[0], rightBottomPoint2[1]) : path.lineTo(rightBottomPoint2[0], rightBottomPoint2[1]), !arrayEqual(rightBottomPoint1, rightBottomPoint2)) {
15456
15456
  const centerX = rightBottomPoint2[0] - _cornerRadius[2],
15457
15457
  centerY = rightBottomPoint2[1];
15458
15458
  path.arc(centerX, centerY, _cornerRadius[2], 0, halfPi, !1);
15459
15459
  }
15460
- if (path.lineTo(leftBottomPoint1[0], leftBottomPoint1[1]), !arrayEqual(leftBottomPoint1, leftBottomPoint2)) {
15460
+ if (edgeCb && edgeCb[2] ? edgeCb[2](rightBottomPoint2[0], rightBottomPoint2[1], leftBottomPoint1[0], leftBottomPoint1[1]) : path.lineTo(leftBottomPoint1[0], leftBottomPoint1[1]), !arrayEqual(leftBottomPoint1, leftBottomPoint2)) {
15461
15461
  const centerX = leftBottomPoint1[0],
15462
15462
  centerY = leftBottomPoint1[1] - _cornerRadius[3];
15463
15463
  path.arc(centerX, centerY, _cornerRadius[3], halfPi, pi, !1);
15464
15464
  }
15465
- if (path.lineTo(leftTopPoint2[0], leftTopPoint2[1]), !arrayEqual(leftTopPoint1, leftTopPoint2)) {
15465
+ if (edgeCb && edgeCb[3] ? edgeCb[3](leftBottomPoint1[0], leftBottomPoint1[1], leftTopPoint2[0], leftTopPoint2[1]) : path.lineTo(leftTopPoint2[0], leftTopPoint2[1]), !arrayEqual(leftTopPoint1, leftTopPoint2)) {
15466
15466
  const centerX = leftTopPoint1[0],
15467
15467
  centerY = leftTopPoint1[1] + _cornerRadius[0];
15468
15468
  path.arc(centerX, centerY, _cornerRadius[0], pi, pi + halfPi, !1);
@@ -15556,18 +15556,27 @@ let SplitRectAfterRenderContribution = class {
15556
15556
  y1: y1,
15557
15557
  x: originX = groupAttribute.x,
15558
15558
  y: originY = groupAttribute.y,
15559
- stroke = groupAttribute.stroke
15559
+ stroke = groupAttribute.stroke,
15560
+ cornerRadius = groupAttribute.cornerRadius
15560
15561
  } = rect.attribute;
15561
15562
  let {
15562
15563
  width: width,
15563
15564
  height: height
15564
15565
  } = rect.attribute;
15565
- if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, Array.isArray(stroke) && stroke.some(s => !1 === s)) {
15566
- if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), context.beginPath(), context.moveTo(x, y), stroke[0] ? context.lineTo(x + width, y) : context.moveTo(x + width, y), stroke[1] ? context.lineTo(x + width, y + height) : context.moveTo(x + width, y + height), stroke[2] ? context.lineTo(x, y + height) : context.moveTo(x, y + height), stroke[3]) {
15566
+ if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, Array.isArray(stroke) && stroke.some(s => !1 === s)) if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), 0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num)) {
15567
+ if (context.beginPath(), context.moveTo(x, y), stroke[0] ? context.lineTo(x + width, y) : context.moveTo(x + width, y), stroke[1] ? context.lineTo(x + width, y + height) : context.moveTo(x + width, y + height), stroke[2] ? context.lineTo(x, y + height) : context.moveTo(x, y + height), stroke[3]) {
15567
15568
  const adjustY = stroke[0] ? y - context.lineWidth / 2 : y;
15568
15569
  context.lineTo(x, adjustY);
15569
15570
  } else context.moveTo(x, y);
15570
15571
  context.stroke();
15572
+ } else {
15573
+ let lastStroke,
15574
+ lastStrokeI = 0;
15575
+ createRectPath(context, x, y, width, height, cornerRadius, new Array(4).fill(0).map((_, i) => (x1, y1, x2, y2) => {
15576
+ stroke[i] && (lastStrokeI === i - 1 && stroke[i] === lastStroke || (context.setStrokeStyle(rect, Object.assign(Object.assign({}, rect.attribute), {
15577
+ stroke: stroke[i]
15578
+ }), x, y, groupAttribute), context.beginPath(), context.moveTo(x1, y1), lastStroke = stroke[i]), lastStrokeI = i, context.lineTo(x2, y2), context.stroke());
15579
+ }));
15571
15580
  }
15572
15581
  }
15573
15582
  };
@@ -17301,7 +17310,9 @@ let DefaultCanvasGroupRender = class {
17301
17310
  clip: clip,
17302
17311
  baseOpacity = 1
17303
17312
  } = group.attribute;
17304
- clip ? context.save() : context.highPerformanceSave(), context.baseGlobalAlpha *= baseOpacity;
17313
+ clip ? context.save() : context.highPerformanceSave();
17314
+ const baseGlobalAlpha = context.baseGlobalAlpha;
17315
+ context.baseGlobalAlpha *= baseOpacity;
17305
17316
  const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
17306
17317
  lastModelMatrix = context.modelMatrix;
17307
17318
  if (context.camera) {
@@ -17315,7 +17326,7 @@ let DefaultCanvasGroupRender = class {
17315
17326
  scrollY = groupAttribute.scrollY
17316
17327
  } = group.attribute;
17317
17328
  let p;
17318
- (scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha /= baseOpacity, p && p.then ? p.then(() => {
17329
+ (scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha = baseGlobalAlpha, p && p.then ? p.then(() => {
17319
17330
  clip ? context.restore() : context.highPerformanceRestore();
17320
17331
  }) : clip ? context.restore() : context.highPerformanceRestore();
17321
17332
  }
@@ -29310,7 +29321,7 @@ const registerWrapText = _registerWrapText;
29310
29321
 
29311
29322
  const roughModule = _roughModule;
29312
29323
 
29313
- const version = "0.19.24-alpha.1";
29324
+ const version = "0.19.24-alpha.2";
29314
29325
  preLoadAllModule();
29315
29326
  if (isBrowserEnv()) {
29316
29327
  loadBrowserEnv(container);
package/dist/index.js CHANGED
@@ -15421,7 +15421,7 @@
15421
15421
  const defaultGroupBackgroundRenderContribution = new DefaultGroupBackgroundRenderContribution();
15422
15422
 
15423
15423
  const halfPi = pi / 2;
15424
- function createRectPath(path, x, y, width, height, rectCornerRadius) {
15424
+ function createRectPath(path, x, y, width, height, rectCornerRadius, edgeCb) {
15425
15425
  let cornerRadius;
15426
15426
  if (width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$1(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
15427
15427
  const cornerRadiusArr = rectCornerRadius;
@@ -15453,22 +15453,22 @@
15453
15453
  rightBottomPoint2 = [rightBottom[0], rightBottom[1] - _cornerRadius[2]],
15454
15454
  leftBottomPoint1 = [leftBottom[0] + _cornerRadius[3], leftBottom[1]],
15455
15455
  leftBottomPoint2 = [leftBottom[0], leftBottom[1] - _cornerRadius[3]];
15456
- if (path.moveTo(leftTopPoint1[0], leftTopPoint1[1]), path.lineTo(rightTopPoint1[0], rightTopPoint1[1]), !arrayEqual(rightTopPoint1, rightTopPoint2)) {
15456
+ if (path.moveTo(leftTopPoint1[0], leftTopPoint1[1]), edgeCb && edgeCb[0] ? edgeCb[0](leftTopPoint1[0], leftTopPoint1[1], rightTopPoint1[0], rightTopPoint1[1]) : path.lineTo(rightTopPoint1[0], rightTopPoint1[1]), !arrayEqual(rightTopPoint1, rightTopPoint2)) {
15457
15457
  const centerX = rightTopPoint1[0],
15458
15458
  centerY = rightTopPoint1[1] + _cornerRadius[1];
15459
15459
  path.arc(centerX, centerY, _cornerRadius[1], -halfPi, 0, !1);
15460
15460
  }
15461
- if (path.lineTo(rightBottomPoint2[0], rightBottomPoint2[1]), !arrayEqual(rightBottomPoint1, rightBottomPoint2)) {
15461
+ if (edgeCb && edgeCb[1] ? edgeCb[1](rightTopPoint1[0], rightTopPoint1[1], rightBottomPoint2[0], rightBottomPoint2[1]) : path.lineTo(rightBottomPoint2[0], rightBottomPoint2[1]), !arrayEqual(rightBottomPoint1, rightBottomPoint2)) {
15462
15462
  const centerX = rightBottomPoint2[0] - _cornerRadius[2],
15463
15463
  centerY = rightBottomPoint2[1];
15464
15464
  path.arc(centerX, centerY, _cornerRadius[2], 0, halfPi, !1);
15465
15465
  }
15466
- if (path.lineTo(leftBottomPoint1[0], leftBottomPoint1[1]), !arrayEqual(leftBottomPoint1, leftBottomPoint2)) {
15466
+ if (edgeCb && edgeCb[2] ? edgeCb[2](rightBottomPoint2[0], rightBottomPoint2[1], leftBottomPoint1[0], leftBottomPoint1[1]) : path.lineTo(leftBottomPoint1[0], leftBottomPoint1[1]), !arrayEqual(leftBottomPoint1, leftBottomPoint2)) {
15467
15467
  const centerX = leftBottomPoint1[0],
15468
15468
  centerY = leftBottomPoint1[1] - _cornerRadius[3];
15469
15469
  path.arc(centerX, centerY, _cornerRadius[3], halfPi, pi, !1);
15470
15470
  }
15471
- if (path.lineTo(leftTopPoint2[0], leftTopPoint2[1]), !arrayEqual(leftTopPoint1, leftTopPoint2)) {
15471
+ if (edgeCb && edgeCb[3] ? edgeCb[3](leftBottomPoint1[0], leftBottomPoint1[1], leftTopPoint2[0], leftTopPoint2[1]) : path.lineTo(leftTopPoint2[0], leftTopPoint2[1]), !arrayEqual(leftTopPoint1, leftTopPoint2)) {
15472
15472
  const centerX = leftTopPoint1[0],
15473
15473
  centerY = leftTopPoint1[1] + _cornerRadius[0];
15474
15474
  path.arc(centerX, centerY, _cornerRadius[0], pi, pi + halfPi, !1);
@@ -15562,18 +15562,27 @@
15562
15562
  y1: y1,
15563
15563
  x: originX = groupAttribute.x,
15564
15564
  y: originY = groupAttribute.y,
15565
- stroke = groupAttribute.stroke
15565
+ stroke = groupAttribute.stroke,
15566
+ cornerRadius = groupAttribute.cornerRadius
15566
15567
  } = rect.attribute;
15567
15568
  let {
15568
15569
  width: width,
15569
15570
  height: height
15570
15571
  } = rect.attribute;
15571
- if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, Array.isArray(stroke) && stroke.some(s => !1 === s)) {
15572
- if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), context.beginPath(), context.moveTo(x, y), stroke[0] ? context.lineTo(x + width, y) : context.moveTo(x + width, y), stroke[1] ? context.lineTo(x + width, y + height) : context.moveTo(x + width, y + height), stroke[2] ? context.lineTo(x, y + height) : context.moveTo(x, y + height), stroke[3]) {
15572
+ if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, Array.isArray(stroke) && stroke.some(s => !1 === s)) if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), 0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num)) {
15573
+ if (context.beginPath(), context.moveTo(x, y), stroke[0] ? context.lineTo(x + width, y) : context.moveTo(x + width, y), stroke[1] ? context.lineTo(x + width, y + height) : context.moveTo(x + width, y + height), stroke[2] ? context.lineTo(x, y + height) : context.moveTo(x, y + height), stroke[3]) {
15573
15574
  const adjustY = stroke[0] ? y - context.lineWidth / 2 : y;
15574
15575
  context.lineTo(x, adjustY);
15575
15576
  } else context.moveTo(x, y);
15576
15577
  context.stroke();
15578
+ } else {
15579
+ let lastStroke,
15580
+ lastStrokeI = 0;
15581
+ createRectPath(context, x, y, width, height, cornerRadius, new Array(4).fill(0).map((_, i) => (x1, y1, x2, y2) => {
15582
+ stroke[i] && (lastStrokeI === i - 1 && stroke[i] === lastStroke || (context.setStrokeStyle(rect, Object.assign(Object.assign({}, rect.attribute), {
15583
+ stroke: stroke[i]
15584
+ }), x, y, groupAttribute), context.beginPath(), context.moveTo(x1, y1), lastStroke = stroke[i]), lastStrokeI = i, context.lineTo(x2, y2), context.stroke());
15585
+ }));
15577
15586
  }
15578
15587
  }
15579
15588
  };
@@ -17307,7 +17316,9 @@
17307
17316
  clip: clip,
17308
17317
  baseOpacity = 1
17309
17318
  } = group.attribute;
17310
- clip ? context.save() : context.highPerformanceSave(), context.baseGlobalAlpha *= baseOpacity;
17319
+ clip ? context.save() : context.highPerformanceSave();
17320
+ const baseGlobalAlpha = context.baseGlobalAlpha;
17321
+ context.baseGlobalAlpha *= baseOpacity;
17311
17322
  const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
17312
17323
  lastModelMatrix = context.modelMatrix;
17313
17324
  if (context.camera) {
@@ -17321,7 +17332,7 @@
17321
17332
  scrollY = groupAttribute.scrollY
17322
17333
  } = group.attribute;
17323
17334
  let p;
17324
- (scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha /= baseOpacity, p && p.then ? p.then(() => {
17335
+ (scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha = baseGlobalAlpha, p && p.then ? p.then(() => {
17325
17336
  clip ? context.restore() : context.highPerformanceRestore();
17326
17337
  }) : clip ? context.restore() : context.highPerformanceRestore();
17327
17338
  }
@@ -29316,7 +29327,7 @@
29316
29327
 
29317
29328
  const roughModule = _roughModule;
29318
29329
 
29319
- const version = "0.19.24-alpha.1";
29330
+ const version = "0.19.24-alpha.2";
29320
29331
  preLoadAllModule();
29321
29332
  if (isBrowserEnv()) {
29322
29333
  loadBrowserEnv(container);