@wcardinal/wcardinal-ui 0.393.0 → 0.395.0

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 (157) hide show
  1. package/dist/types/wcardinal/ui/shape/e-shape-uploaded.d.ts +5 -6
  2. package/dist/types/wcardinal/ui/shape/variant/build-text.d.ts +2 -0
  3. package/dist/types/wcardinal/ui/shape/variant/builder-bar.d.ts +5 -5
  4. package/dist/types/wcardinal/ui/shape/variant/builder-base.d.ts +6 -6
  5. package/dist/types/wcardinal/ui/shape/variant/builder-circle.d.ts +5 -5
  6. package/dist/types/wcardinal/ui/shape/variant/builder-image-sdf.d.ts +5 -5
  7. package/dist/types/wcardinal/ui/shape/variant/builder-line-of-any.d.ts +3 -3
  8. package/dist/types/wcardinal/ui/shape/variant/builder-line-of-circles.d.ts +5 -5
  9. package/dist/types/wcardinal/ui/shape/variant/builder-line-of-rectangle-roundeds.d.ts +4 -4
  10. package/dist/types/wcardinal/ui/shape/variant/builder-line-of-rectangles.d.ts +4 -4
  11. package/dist/types/wcardinal/ui/shape/variant/builder-line-of-triangle-roundeds.d.ts +4 -4
  12. package/dist/types/wcardinal/ui/shape/variant/builder-line-of-triangles.d.ts +4 -4
  13. package/dist/types/wcardinal/ui/shape/variant/builder-line.d.ts +6 -6
  14. package/dist/types/wcardinal/ui/shape/variant/builder-marker-base.d.ts +2 -2
  15. package/dist/types/wcardinal/ui/shape/variant/builder-marker-circle.d.ts +5 -5
  16. package/dist/types/wcardinal/ui/shape/variant/builder-marker-rectangle.d.ts +4 -4
  17. package/dist/types/wcardinal/ui/shape/variant/builder-marker-triangle.d.ts +4 -4
  18. package/dist/types/wcardinal/ui/shape/variant/builder-rectangle-pivoted.d.ts +4 -4
  19. package/dist/types/wcardinal/ui/shape/variant/builder-rectangle-rounded.d.ts +4 -4
  20. package/dist/types/wcardinal/ui/shape/variant/builder-rectangle.d.ts +4 -4
  21. package/dist/types/wcardinal/ui/shape/variant/builder-semicircle.d.ts +5 -5
  22. package/dist/types/wcardinal/ui/shape/variant/builder-text.d.ts +8 -8
  23. package/dist/types/wcardinal/ui/shape/variant/builder-triangle-rounded.d.ts +4 -4
  24. package/dist/types/wcardinal/ui/shape/variant/builder-triangle.d.ts +4 -4
  25. package/dist/types/wcardinal/ui/shape/variant/builder.d.ts +35 -3
  26. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-input-boolean-button-off.d.ts +0 -2
  27. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-input-boolean-button-on.d.ts +0 -2
  28. package/dist/types/wcardinal/ui/theme/white/d-theme-white-input-boolean-button-off.d.ts +0 -2
  29. package/dist/types/wcardinal/ui/theme/white/d-theme-white-input-boolean-button-on.d.ts +0 -2
  30. package/dist/wcardinal/ui/d-base-background-mesh-geometry.js +5 -5
  31. package/dist/wcardinal/ui/d-base-background-mesh-geometry.js.map +1 -1
  32. package/dist/wcardinal/ui/d-base-border-mesh-geometry.js +60 -37
  33. package/dist/wcardinal/ui/d-base-border-mesh-geometry.js.map +1 -1
  34. package/dist/wcardinal/ui/d-base-outline-snippet.js +1 -1
  35. package/dist/wcardinal/ui/d-base-outline-snippet.js.map +1 -1
  36. package/dist/wcardinal/ui/d-diagram-canvas.js +2 -2
  37. package/dist/wcardinal/ui/d-diagram-canvas.js.map +1 -1
  38. package/dist/wcardinal/ui/d-table-data-list-selection.js +2 -2
  39. package/dist/wcardinal/ui/d-table-data-list-selection.js.map +1 -1
  40. package/dist/wcardinal/ui/shape/e-shape-container.js +2 -2
  41. package/dist/wcardinal/ui/shape/e-shape-container.js.map +1 -1
  42. package/dist/wcardinal/ui/shape/e-shape-runtime-impl.js +4 -3
  43. package/dist/wcardinal/ui/shape/e-shape-runtime-impl.js.map +1 -1
  44. package/dist/wcardinal/ui/shape/e-shape-uploaded.js.map +1 -1
  45. package/dist/wcardinal/ui/shape/variant/build-text.js +5 -2
  46. package/dist/wcardinal/ui/shape/variant/build-text.js.map +1 -1
  47. package/dist/wcardinal/ui/shape/variant/builder-bar.js +14 -5
  48. package/dist/wcardinal/ui/shape/variant/builder-bar.js.map +1 -1
  49. package/dist/wcardinal/ui/shape/variant/builder-base.js +23 -17
  50. package/dist/wcardinal/ui/shape/variant/builder-base.js.map +1 -1
  51. package/dist/wcardinal/ui/shape/variant/builder-circle.js +10 -2
  52. package/dist/wcardinal/ui/shape/variant/builder-circle.js.map +1 -1
  53. package/dist/wcardinal/ui/shape/variant/builder-image-sdf.js +14 -2
  54. package/dist/wcardinal/ui/shape/variant/builder-image-sdf.js.map +1 -1
  55. package/dist/wcardinal/ui/shape/variant/builder-line-of-any.js +4 -1
  56. package/dist/wcardinal/ui/shape/variant/builder-line-of-any.js.map +1 -1
  57. package/dist/wcardinal/ui/shape/variant/builder-line-of-circles.js +11 -2
  58. package/dist/wcardinal/ui/shape/variant/builder-line-of-circles.js.map +1 -1
  59. package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangle-roundeds.js +20 -12
  60. package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangle-roundeds.js.map +1 -1
  61. package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangles.js +14 -10
  62. package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangles.js.map +1 -1
  63. package/dist/wcardinal/ui/shape/variant/builder-line-of-triangle-roundeds.js +20 -12
  64. package/dist/wcardinal/ui/shape/variant/builder-line-of-triangle-roundeds.js.map +1 -1
  65. package/dist/wcardinal/ui/shape/variant/builder-line-of-triangles.js +13 -7
  66. package/dist/wcardinal/ui/shape/variant/builder-line-of-triangles.js.map +1 -1
  67. package/dist/wcardinal/ui/shape/variant/builder-line.js +17 -7
  68. package/dist/wcardinal/ui/shape/variant/builder-line.js.map +1 -1
  69. package/dist/wcardinal/ui/shape/variant/builder-marker-base.js +4 -1
  70. package/dist/wcardinal/ui/shape/variant/builder-marker-base.js.map +1 -1
  71. package/dist/wcardinal/ui/shape/variant/builder-marker-circle.js +14 -2
  72. package/dist/wcardinal/ui/shape/variant/builder-marker-circle.js.map +1 -1
  73. package/dist/wcardinal/ui/shape/variant/builder-marker-rectangle.js +12 -4
  74. package/dist/wcardinal/ui/shape/variant/builder-marker-rectangle.js.map +1 -1
  75. package/dist/wcardinal/ui/shape/variant/builder-marker-triangle.js +11 -3
  76. package/dist/wcardinal/ui/shape/variant/builder-marker-triangle.js.map +1 -1
  77. package/dist/wcardinal/ui/shape/variant/builder-rectangle-pivoted.js +8 -4
  78. package/dist/wcardinal/ui/shape/variant/builder-rectangle-pivoted.js.map +1 -1
  79. package/dist/wcardinal/ui/shape/variant/builder-rectangle-rounded.js +14 -6
  80. package/dist/wcardinal/ui/shape/variant/builder-rectangle-rounded.js.map +1 -1
  81. package/dist/wcardinal/ui/shape/variant/builder-rectangle.js +8 -4
  82. package/dist/wcardinal/ui/shape/variant/builder-rectangle.js.map +1 -1
  83. package/dist/wcardinal/ui/shape/variant/builder-semicircle.js +10 -2
  84. package/dist/wcardinal/ui/shape/variant/builder-semicircle.js.map +1 -1
  85. package/dist/wcardinal/ui/shape/variant/builder-text.js +41 -29
  86. package/dist/wcardinal/ui/shape/variant/builder-text.js.map +1 -1
  87. package/dist/wcardinal/ui/shape/variant/builder-triangle-rounded.js +14 -6
  88. package/dist/wcardinal/ui/shape/variant/builder-triangle-rounded.js.map +1 -1
  89. package/dist/wcardinal/ui/shape/variant/builder-triangle.js +7 -3
  90. package/dist/wcardinal/ui/shape/variant/builder-triangle.js.map +1 -1
  91. package/dist/wcardinal/ui/shape/variant/builder.js +16 -1
  92. package/dist/wcardinal/ui/shape/variant/builder.js.map +1 -1
  93. package/dist/wcardinal/ui/shape/variant/create-bar-uploaded.js +3 -3
  94. package/dist/wcardinal/ui/shape/variant/create-bar-uploaded.js.map +1 -1
  95. package/dist/wcardinal/ui/shape/variant/create-circle-uploaded.js +3 -3
  96. package/dist/wcardinal/ui/shape/variant/create-circle-uploaded.js.map +1 -1
  97. package/dist/wcardinal/ui/shape/variant/create-group-uploaded.js +3 -3
  98. package/dist/wcardinal/ui/shape/variant/create-group-uploaded.js.map +1 -1
  99. package/dist/wcardinal/ui/shape/variant/create-image-sdf-uploaded.js +3 -3
  100. package/dist/wcardinal/ui/shape/variant/create-image-sdf-uploaded.js.map +1 -1
  101. package/dist/wcardinal/ui/shape/variant/create-label-uploaded.js +3 -3
  102. package/dist/wcardinal/ui/shape/variant/create-label-uploaded.js.map +1 -1
  103. package/dist/wcardinal/ui/shape/variant/create-line-of-any-uploaded.js +3 -3
  104. package/dist/wcardinal/ui/shape/variant/create-line-of-any-uploaded.js.map +1 -1
  105. package/dist/wcardinal/ui/shape/variant/create-line-uploaded.js +3 -3
  106. package/dist/wcardinal/ui/shape/variant/create-line-uploaded.js.map +1 -1
  107. package/dist/wcardinal/ui/shape/variant/create-rectangle-pivoted-uploaded.js +3 -3
  108. package/dist/wcardinal/ui/shape/variant/create-rectangle-pivoted-uploaded.js.map +1 -1
  109. package/dist/wcardinal/ui/shape/variant/create-rectangle-rounded-uploaded.js +3 -3
  110. package/dist/wcardinal/ui/shape/variant/create-rectangle-rounded-uploaded.js.map +1 -1
  111. package/dist/wcardinal/ui/shape/variant/create-rectangle-uploaded.js +3 -3
  112. package/dist/wcardinal/ui/shape/variant/create-rectangle-uploaded.js.map +1 -1
  113. package/dist/wcardinal/ui/shape/variant/create-semicircle-uploaded.js +3 -3
  114. package/dist/wcardinal/ui/shape/variant/create-semicircle-uploaded.js.map +1 -1
  115. package/dist/wcardinal/ui/shape/variant/create-triangle-rounded-uploaded.js +3 -3
  116. package/dist/wcardinal/ui/shape/variant/create-triangle-rounded-uploaded.js.map +1 -1
  117. package/dist/wcardinal/ui/shape/variant/create-triangle-uploaded.js +3 -3
  118. package/dist/wcardinal/ui/shape/variant/create-triangle-uploaded.js.map +1 -1
  119. package/dist/wcardinal/ui/shape/variant/e-shape-base.js +6 -6
  120. package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
  121. package/dist/wcardinal/ui/theme/dark/d-theme-dark-button-base.js +1 -1
  122. package/dist/wcardinal/ui/theme/dark/d-theme-dark-button-base.js.map +1 -1
  123. package/dist/wcardinal/ui/theme/dark/d-theme-dark-input-boolean-button-off.js +0 -4
  124. package/dist/wcardinal/ui/theme/dark/d-theme-dark-input-boolean-button-off.js.map +1 -1
  125. package/dist/wcardinal/ui/theme/dark/d-theme-dark-input-boolean-button-on.js +0 -4
  126. package/dist/wcardinal/ui/theme/dark/d-theme-dark-input-boolean-button-on.js.map +1 -1
  127. package/dist/wcardinal/ui/theme/dark/d-theme-dark-input.js +1 -1
  128. package/dist/wcardinal/ui/theme/dark/d-theme-dark-input.js.map +1 -1
  129. package/dist/wcardinal/ui/theme/white/d-theme-white-button-base.js +1 -1
  130. package/dist/wcardinal/ui/theme/white/d-theme-white-button-base.js.map +1 -1
  131. package/dist/wcardinal/ui/theme/white/d-theme-white-input-boolean-button-off.js +0 -4
  132. package/dist/wcardinal/ui/theme/white/d-theme-white-input-boolean-button-off.js.map +1 -1
  133. package/dist/wcardinal/ui/theme/white/d-theme-white-input-boolean-button-on.js +0 -4
  134. package/dist/wcardinal/ui/theme/white/d-theme-white-input-boolean-button-on.js.map +1 -1
  135. package/dist/wcardinal/ui/theme/white/d-theme-white-input.js +1 -1
  136. package/dist/wcardinal/ui/theme/white/d-theme-white-input.js.map +1 -1
  137. package/dist/wcardinal-ui-theme-dark-en-us.js +3 -9
  138. package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
  139. package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
  140. package/dist/wcardinal-ui-theme-dark-ja-jp.js +3 -9
  141. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
  142. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
  143. package/dist/wcardinal-ui-theme-dark.js +3 -9
  144. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  145. package/dist/wcardinal-ui-theme-white-en-us.js +3 -9
  146. package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
  147. package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
  148. package/dist/wcardinal-ui-theme-white-ja-jp.js +3 -9
  149. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
  150. package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
  151. package/dist/wcardinal-ui-theme-white.js +3 -9
  152. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  153. package/dist/wcardinal-ui.cjs.js +441 -264
  154. package/dist/wcardinal-ui.js +437 -248
  155. package/dist/wcardinal-ui.min.js +2 -2
  156. package/dist/wcardinal-ui.min.js.map +1 -1
  157. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.393.0
2
+ Winter Cardinal UI v0.395.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -483,11 +483,14 @@ var toLength = function (p0x, p0y, p1x, p1y) {
483
483
  };
484
484
 
485
485
  var TEXT_VERTEX_COUNT = 4;
486
+ var TEXT_VERTEX_COUNT_SHIFT = 2;
486
487
  var TEXT_INDEX_COUNT = 2;
488
+ var TEXT_INDEX_COUNT_SHIFT = 1;
487
489
  var TEXT_FMIN = 0.00001;
488
490
  var TEXT_WORK_POINT = new pixi_js.Point();
489
491
  var toTextBufferCount = function (shape) {
490
- return Math.ceil(shape.text.value.length / 12) * 12;
492
+ var l = shape.text.value.length;
493
+ return ((l >> 3) + (0 < (l & 0x7) ? 1 : 0)) << 3;
491
494
  };
492
495
  var buildTextClipping = function (clippings, voffset, vcount) {
493
496
  var ic = voffset * 3 - 1;
@@ -986,7 +989,7 @@ var buildTextVertex = function (vertices, uvs, voffset, vcount, originX, originY
986
989
  //
987
990
  var tx0 = 0;
988
991
  var ty0 = 0;
989
- var lineWidthMaximum = NaN;
992
+ var lineWidthMaximum = width;
990
993
  switch (textDirection) {
991
994
  case EShapeTextDirection.LEFT_TO_RIGHT:
992
995
  getTextBBox(textAlignHorizontal, textAlignVertical, textOffsetHorizontal, textOffsetVertical, textPaddingHorizontal, textPaddingVertical, width, height, x0, y0, x1, y1, x2, y2, x3, y3, hnx, hny, vnx, vny, work);
@@ -1421,6 +1424,27 @@ var EShapePointsStyle = {
1421
1424
  FORMATTER_CURVE: FORMATTER_CURVE
1422
1425
  };
1423
1426
 
1427
+ /*
1428
+ * Copyright (C) 2019 Toshiba Corporation
1429
+ * SPDX-License-Identifier: Apache-2.0
1430
+ */
1431
+ var BuilderFlag = {
1432
+ NONE: 0,
1433
+ VERTEX: 1,
1434
+ CLIPPING: 2,
1435
+ STEP: 4,
1436
+ COLOR_FILL: 8,
1437
+ COLOR_STROKE: 16,
1438
+ UV: 32,
1439
+ INDEX: 64,
1440
+ VERTEX_AND_STEP: 5,
1441
+ VERTEX_STEP_AND_UV: 37,
1442
+ VERTEX_STEP_AND_COLOR_FILL: 13,
1443
+ VERTEX_CLIPPING_STEP_AND_UV: 39,
1444
+ CLIPPING_AND_INDEX: 66,
1445
+ ALL: 127
1446
+ };
1447
+
1424
1448
  var buildColor = function (color, alpha, voffset, vcount, colors) {
1425
1449
  var r = (((color >> 16) & 0xff) / 255.0) * alpha;
1426
1450
  var g = (((color >> 8) & 0xff) / 255.0) * alpha;
@@ -1436,6 +1460,27 @@ var buildColor = function (color, alpha, voffset, vcount, colors) {
1436
1460
  }
1437
1461
  };
1438
1462
 
1463
+ /*
1464
+ * Copyright (C) 2019 Toshiba Corporation
1465
+ * SPDX-License-Identifier: Apache-2.0
1466
+ */
1467
+ var TOP$1 = 1;
1468
+ var RIGHT$1 = 2;
1469
+ var BOTTOM$1 = 4;
1470
+ var LEFT$1 = 8;
1471
+ var EShapeStrokeSide = {
1472
+ NONE: 0,
1473
+ TOP: TOP$1,
1474
+ RIGHT: RIGHT$1,
1475
+ BOTTOM: BOTTOM$1,
1476
+ LEFT: LEFT$1,
1477
+ TOP_OR_LEFT: TOP$1 | LEFT$1,
1478
+ TOP_OR_RIGHT: TOP$1 | RIGHT$1,
1479
+ BOTTOM_OR_LEFT: BOTTOM$1 | LEFT$1,
1480
+ BOTTOM_OR_RIGHT: BOTTOM$1 | RIGHT$1,
1481
+ ALL: TOP$1 | RIGHT$1 | BOTTOM$1 | LEFT$1
1482
+ };
1483
+
1439
1484
  /*
1440
1485
  * Copyright (C) 2019 Toshiba Corporation
1441
1486
  * SPDX-License-Identifier: Apache-2.0
@@ -1446,29 +1491,31 @@ var BuilderBase = /** @class */ (function () {
1446
1491
  this.indexOffset = indexOffset;
1447
1492
  this.vertexCount = vertexCount;
1448
1493
  this.indexCount = indexCount;
1449
- this.sizeX = NaN;
1450
- this.sizeY = NaN;
1494
+ this.inited = BuilderFlag.NONE;
1495
+ this.sizeX = 0;
1496
+ this.sizeY = 0;
1451
1497
  this.transformLocalId = -1;
1452
- this.strokeAlign = NaN;
1453
- this.strokeWidth = NaN;
1454
- this.strokeSide = NaN;
1455
- this.strokeStyle = NaN;
1456
- this.colorFill = NaN;
1457
- this.alphaFill = -1;
1458
- this.colorStroke = NaN;
1459
- this.alphaStroke = -1;
1498
+ this.strokeAlign = 0;
1499
+ this.strokeWidth = 0;
1500
+ this.strokeSide = EShapeStrokeSide.NONE;
1501
+ this.strokeStyle = EShapeStrokeStyle.NONE;
1502
+ this.colorFill = 0;
1503
+ this.alphaFill = 0;
1504
+ this.colorStroke = 0;
1505
+ this.alphaStroke = 0;
1460
1506
  this.texture = null;
1461
- this.textureTransformId = NaN;
1507
+ this.textureTransformId = -1;
1462
1508
  }
1463
1509
  BuilderBase.prototype.isCompatible = function (shape) {
1464
1510
  return true;
1465
1511
  };
1466
1512
  BuilderBase.prototype.updateColorFill = function (buffer, shape) {
1467
1513
  var fill = shape.fill;
1468
- var isEnabled = shape.visible && fill.enable;
1469
1514
  var color = fill.color;
1470
- var alpha = isEnabled ? fill.alpha : 0;
1471
- if (color !== this.colorFill || alpha !== this.alphaFill) {
1515
+ var alpha = shape.visible && fill.enable ? fill.alpha : 0;
1516
+ var isNotInited = !(this.inited & BuilderFlag.COLOR_FILL);
1517
+ if (isNotInited || color !== this.colorFill || alpha !== this.alphaFill) {
1518
+ this.inited |= BuilderFlag.COLOR_FILL;
1472
1519
  this.colorFill = color;
1473
1520
  this.alphaFill = alpha;
1474
1521
  buffer.updateColorFills();
@@ -1477,10 +1524,11 @@ var BuilderBase = /** @class */ (function () {
1477
1524
  };
1478
1525
  BuilderBase.prototype.updateColorStroke = function (buffer, shape) {
1479
1526
  var stroke = shape.stroke;
1480
- var isEnabled = shape.visible && stroke.enable && 0 < stroke.width;
1481
1527
  var color = stroke.color;
1482
- var alpha = isEnabled ? stroke.alpha : 0;
1483
- if (color !== this.colorStroke || alpha !== this.alphaStroke) {
1528
+ var alpha = shape.visible && stroke.enable && 0 < stroke.width ? stroke.alpha : 0;
1529
+ var isNotInited = !(this.inited & BuilderFlag.COLOR_STROKE);
1530
+ if (isNotInited || color !== this.colorStroke || alpha !== this.alphaStroke) {
1531
+ this.inited |= BuilderFlag.COLOR_STROKE;
1484
1532
  this.colorStroke = color;
1485
1533
  this.alphaStroke = alpha;
1486
1534
  buffer.updateColorStrokes();
@@ -4707,9 +4755,9 @@ var EShapeBase = /** @class */ (function (_super) {
4707
4755
  _this._lockTransformThis = new EShapeLock();
4708
4756
  _this._lockTransformParent = new EShapeLock();
4709
4757
  _this._lockUploaded = new EShapeLock();
4710
- _this._boundsTransformId = NaN;
4711
- _this._boundsInternalTransformId = NaN;
4712
- _this._boundsLocalTransformId = NaN;
4758
+ _this._boundsTransformId = -1;
4759
+ _this._boundsInternalTransformId = -1;
4760
+ _this._boundsLocalTransformId = -1;
4713
4761
  _this.interactive = false;
4714
4762
  //
4715
4763
  _this.parent = null;
@@ -4724,9 +4772,9 @@ var EShapeBase = /** @class */ (function (_super) {
4724
4772
  return new EShapeTransformImpl(this);
4725
4773
  };
4726
4774
  EShapeBase.prototype.onSizeChange = function () {
4727
- this._boundsTransformId = NaN;
4728
- this._boundsInternalTransformId = NaN;
4729
- this._boundsLocalTransformId = NaN;
4775
+ this._boundsTransformId = -1;
4776
+ this._boundsInternalTransformId = -1;
4777
+ this._boundsLocalTransformId = -1;
4730
4778
  if (!this._lockTransformChild.isLocked()) {
4731
4779
  this.callChildTransformChange();
4732
4780
  }
@@ -8123,27 +8171,6 @@ var hitTestCircle = function (shape, x, y, ax, ay, sw, ss) {
8123
8171
  return false;
8124
8172
  };
8125
8173
 
8126
- /*
8127
- * Copyright (C) 2019 Toshiba Corporation
8128
- * SPDX-License-Identifier: Apache-2.0
8129
- */
8130
- var TOP$1 = 1;
8131
- var RIGHT$1 = 2;
8132
- var BOTTOM$1 = 4;
8133
- var LEFT$1 = 8;
8134
- var EShapeStrokeSide = {
8135
- NONE: 0,
8136
- TOP: TOP$1,
8137
- RIGHT: RIGHT$1,
8138
- BOTTOM: BOTTOM$1,
8139
- LEFT: LEFT$1,
8140
- TOP_OR_LEFT: TOP$1 | LEFT$1,
8141
- TOP_OR_RIGHT: TOP$1 | RIGHT$1,
8142
- BOTTOM_OR_LEFT: BOTTOM$1 | LEFT$1,
8143
- BOTTOM_OR_RIGHT: BOTTOM$1 | RIGHT$1,
8144
- ALL: TOP$1 | RIGHT$1 | BOTTOM$1 | LEFT$1
8145
- };
8146
-
8147
8174
  /*
8148
8175
  * Copyright (C) 2019 Toshiba Corporation
8149
8176
  * SPDX-License-Identifier: Apache-2.0
@@ -8463,7 +8490,7 @@ var BuilderBar = /** @class */ (function (_super) {
8463
8490
  __extends(BuilderBar, _super);
8464
8491
  function BuilderBar(vertexOffset, indexOffset) {
8465
8492
  var _this = _super.call(this, vertexOffset, indexOffset, BAR_VERTEX_COUNT, BAR_INDEX_COUNT) || this;
8466
- _this.pointsId = NaN;
8493
+ _this.pointsId = -1;
8467
8494
  _this.pointsStyle = EShapePointsStyle.NONE;
8468
8495
  return _this;
8469
8496
  }
@@ -8474,6 +8501,7 @@ var BuilderBar = /** @class */ (function (_super) {
8474
8501
  buffer.updateIndices();
8475
8502
  buildBarClipping(buffer.clippings, voffset);
8476
8503
  buildBarIndex(buffer.indices, voffset, ioffset);
8504
+ this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
8477
8505
  };
8478
8506
  BuilderBar.prototype.update = function (buffer, shape) {
8479
8507
  this.updateVertexStepAndColorFill(buffer, shape);
@@ -8497,11 +8525,14 @@ var BuilderBar = /** @class */ (function (_super) {
8497
8525
  var isPointsIdChanged = pointsId !== this.pointsId;
8498
8526
  var pointsStyle = points.style;
8499
8527
  var isPointsStyleChanged = pointsStyle !== this.pointsStyle;
8500
- if (isSizeChanged ||
8528
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_COLOR_FILL);
8529
+ if (isNotInited ||
8530
+ isSizeChanged ||
8501
8531
  isTransformChanged ||
8502
8532
  isStrokeWidthChanged ||
8503
8533
  isPointsIdChanged ||
8504
8534
  isPointsStyleChanged) {
8535
+ this.inited |= BuilderFlag.VERTEX_STEP_AND_COLOR_FILL;
8505
8536
  this.sizeX = sizeX;
8506
8537
  this.sizeY = sizeY;
8507
8538
  this.strokeWidth = strokeWidth;
@@ -8510,8 +8541,8 @@ var BuilderBar = /** @class */ (function (_super) {
8510
8541
  this.pointsId = pointsId;
8511
8542
  this.pointsStyle = pointsStyle;
8512
8543
  if (isPointsIdChanged) {
8513
- // Invalidate the texture transform ID to update the UVs
8514
- this.textureTransformId = NaN;
8544
+ // Invalidate the UV buffer
8545
+ this.inited &= ~BuilderFlag.UV;
8515
8546
  }
8516
8547
  buffer.updateVertices();
8517
8548
  buffer.updateSteps();
@@ -8523,7 +8554,11 @@ var BuilderBar = /** @class */ (function (_super) {
8523
8554
  BuilderBar.prototype.updateUv = function (buffer, shape) {
8524
8555
  var texture = toTexture(shape);
8525
8556
  var textureTransformId = toTextureTransformId(texture);
8526
- if (texture !== this.texture || textureTransformId !== this.textureTransformId) {
8557
+ var isNotInited = !(this.inited & BuilderFlag.UV);
8558
+ if (isNotInited ||
8559
+ texture !== this.texture ||
8560
+ textureTransformId !== this.textureTransformId) {
8561
+ this.inited |= BuilderFlag.UV;
8527
8562
  this.texture = texture;
8528
8563
  this.textureTransformId = textureTransformId;
8529
8564
  buffer.updateUvs();
@@ -8543,32 +8578,33 @@ var BuilderText = /** @class */ (function () {
8543
8578
  this.indexOffset = indexOffset;
8544
8579
  this.vertexCount = vertexCount;
8545
8580
  this.indexCount = indexCount;
8546
- this.sizeX = NaN;
8547
- this.sizeY = NaN;
8548
- this.transformLocalId = NaN;
8581
+ this.inited = BuilderFlag.NONE;
8582
+ this.sizeX = 0;
8583
+ this.sizeY = 0;
8584
+ this.transformLocalId = 0;
8549
8585
  this.scaleX = 1;
8550
8586
  this.scaleY = 1;
8551
- this.size = NaN;
8587
+ this.size = 0;
8552
8588
  this.family = "auto";
8553
8589
  this.value = "";
8554
8590
  this.texture = null;
8555
- this.textureTransformId = NaN;
8556
- this.color = NaN;
8557
- this.alpha = NaN;
8558
- this.weight = NaN;
8559
- this.style = NaN;
8560
- this.alignHorizontal = NaN;
8561
- this.alignVertical = NaN;
8562
- this.offsetHorizontal = NaN;
8563
- this.offsetVertical = NaN;
8564
- this.outlineWidth = NaN;
8565
- this.outlineColor = NaN;
8566
- this.outlineAlpha = NaN;
8567
- this.spacingHorizontal = NaN;
8568
- this.spacingVertical = NaN;
8569
- this.direction = NaN;
8570
- this.paddingHorizontal = NaN;
8571
- this.paddingVertical = NaN;
8591
+ this.textureTransformId = 0;
8592
+ this.color = 0;
8593
+ this.alpha = 0;
8594
+ this.weight = 0;
8595
+ this.style = 0;
8596
+ this.alignHorizontal = 0;
8597
+ this.alignVertical = 0;
8598
+ this.offsetHorizontal = 0;
8599
+ this.offsetVertical = 0;
8600
+ this.outlineWidth = 0;
8601
+ this.outlineColor = 0;
8602
+ this.outlineAlpha = 0;
8603
+ this.spacingHorizontal = 0;
8604
+ this.spacingVertical = 0;
8605
+ this.direction = 0;
8606
+ this.paddingHorizontal = 0;
8607
+ this.paddingVertical = 0;
8572
8608
  this.clipping = false;
8573
8609
  this.fitting = false;
8574
8610
  }
@@ -8583,9 +8619,10 @@ var BuilderText = /** @class */ (function () {
8583
8619
  buffer.updateIndices();
8584
8620
  buildTextIndex(buffer.indices, voffset, this.indexOffset, this.indexCount);
8585
8621
  }
8622
+ this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
8586
8623
  };
8587
8624
  BuilderText.prototype.isCompatible = function (shape) {
8588
- return toTextBufferCount(shape) * TEXT_VERTEX_COUNT === this.vertexCount;
8625
+ return toTextBufferCount(shape) << TEXT_VERTEX_COUNT_SHIFT === this.vertexCount;
8589
8626
  };
8590
8627
  BuilderText.prototype.update = function (buffer, shape) {
8591
8628
  var vcount = this.vertexCount;
@@ -8639,7 +8676,9 @@ var BuilderText = /** @class */ (function () {
8639
8676
  var isClippingChanged = this.clipping !== textClipping;
8640
8677
  var isFittingChanged = this.fitting !== textFitting;
8641
8678
  var isTextureChanged = textTexture !== this.texture || textTextureTransformId !== this.textureTransformId;
8642
- if (isSizeChanged ||
8679
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX);
8680
+ if (isNotInited ||
8681
+ isSizeChanged ||
8643
8682
  isTransformChanged ||
8644
8683
  isCharChanged ||
8645
8684
  isCharSizeChanged ||
@@ -8651,6 +8690,7 @@ var BuilderText = /** @class */ (function () {
8651
8690
  isClippingChanged ||
8652
8691
  isFittingChanged ||
8653
8692
  isTextureChanged) {
8693
+ this.inited |= BuilderFlag.VERTEX;
8654
8694
  this.size = textSize;
8655
8695
  this.family = textFamily;
8656
8696
  this.value = textValue;
@@ -8669,8 +8709,8 @@ var BuilderText = /** @class */ (function () {
8669
8709
  this.texture = textTexture;
8670
8710
  this.textureTransformId = textTextureTransformId;
8671
8711
  if (isCharSizeChanged || isFittingChanged || (textFitting && isSizeChanged)) {
8672
- // Invalidate the text weight to update the text steps.
8673
- this.weight = NaN;
8712
+ // Invalidate the step buffer.
8713
+ this.inited &= ~BuilderFlag.STEP;
8674
8714
  }
8675
8715
  // Vertices & UVs
8676
8716
  buffer.updateVertices();
@@ -8688,7 +8728,9 @@ var BuilderText = /** @class */ (function () {
8688
8728
  var text = shape.text;
8689
8729
  var color = text.color;
8690
8730
  var alpha = shape.visible && text.enable ? text.alpha : 0;
8691
- if (color !== this.color || alpha !== this.alpha) {
8731
+ var isNotInited = !(this.inited & BuilderFlag.COLOR_FILL);
8732
+ if (isNotInited || color !== this.color || alpha !== this.alpha) {
8733
+ this.inited |= BuilderFlag.COLOR_FILL;
8692
8734
  this.color = color;
8693
8735
  this.alpha = alpha;
8694
8736
  buffer.updateColorFills();
@@ -8700,7 +8742,9 @@ var BuilderText = /** @class */ (function () {
8700
8742
  var outline = text.outline;
8701
8743
  var color = outline.color;
8702
8744
  var alpha = shape.visible && text.enable ? outline.alpha : 0;
8703
- if (color !== this.outlineColor || alpha !== this.outlineAlpha) {
8745
+ var isNotInited = !(this.inited & BuilderFlag.COLOR_STROKE);
8746
+ if (isNotInited || color !== this.outlineColor || alpha !== this.outlineAlpha) {
8747
+ this.inited |= BuilderFlag.COLOR_STROKE;
8704
8748
  this.outlineColor = color;
8705
8749
  this.outlineAlpha = alpha;
8706
8750
  buffer.updateColorStrokes();
@@ -8723,7 +8767,9 @@ var BuilderText = /** @class */ (function () {
8723
8767
  }
8724
8768
  var isScaleChanged = TEXT_FMIN < Math.abs(this.scaleX - scaleX) ||
8725
8769
  TEXT_FMIN < Math.abs(this.scaleY - scaleY);
8726
- if (isWeightChanged || isOutlineWidthChanged || isScaleChanged) {
8770
+ var isNotInited = !(this.inited & BuilderFlag.STEP);
8771
+ if (isNotInited || isWeightChanged || isOutlineWidthChanged || isScaleChanged) {
8772
+ this.inited |= BuilderFlag.STEP;
8727
8773
  this.weight = textWeight;
8728
8774
  this.outlineWidth = textOutlineWidth;
8729
8775
  this.scaleX = scaleX;
@@ -8751,8 +8797,8 @@ var BuilderText = /** @class */ (function () {
8751
8797
  */
8752
8798
  var createBarUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
8753
8799
  var tcount = toTextBufferCount(shape);
8754
- var tvcount = tcount * TEXT_VERTEX_COUNT;
8755
- var ticount = tcount * TEXT_INDEX_COUNT;
8800
+ var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
8801
+ var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
8756
8802
  var vcount = BAR_VERTEX_COUNT + tvcount;
8757
8803
  var icount = BAR_INDEX_COUNT + ticount;
8758
8804
  if (buffer.check(voffset, ioffset, vcount, icount)) {
@@ -11855,7 +11901,7 @@ var DBaseBackgroundMeshGeometry = /** @class */ (function (_super) {
11855
11901
  var w = this._width;
11856
11902
  var h = this._height;
11857
11903
  var r = Math.min(0.5 * w, 0.5 * h, this._cornerRadius);
11858
- var a = 1 / resolution;
11904
+ var a = 0.5 / resolution;
11859
11905
  var x0 = 0;
11860
11906
  var x1 = r;
11861
11907
  var x2 = w - r;
@@ -11888,7 +11934,7 @@ var DBaseBackgroundMeshGeometry = /** @class */ (function (_super) {
11888
11934
  this.fillVertices(vertices, uvs, iv, iuv, n, x1, y1, r, a, tlt);
11889
11935
  }
11890
11936
  else {
11891
- this.fillVertices(vertices, uvs, iv, iuv, n, x0, y0, 0, 0, tlt);
11937
+ this.fillVertices(vertices, uvs, iv, iuv, n, x0, y0, 0, a, tlt);
11892
11938
  }
11893
11939
  this.fillIndices(indices, ia, ii, n);
11894
11940
  iv += n4;
@@ -11900,7 +11946,7 @@ var DBaseBackgroundMeshGeometry = /** @class */ (function (_super) {
11900
11946
  this.fillVertices(vertices, uvs, iv, iuv, n, x2, y1, r, a, ttr);
11901
11947
  }
11902
11948
  else {
11903
- this.fillVertices(vertices, uvs, iv, iuv, n, x3, y0, 0, 0, ttr);
11949
+ this.fillVertices(vertices, uvs, iv, iuv, n, x3, y0, 0, a, ttr);
11904
11950
  }
11905
11951
  this.fillIndices(indices, ia, ii, n);
11906
11952
  iv += n4;
@@ -11912,7 +11958,7 @@ var DBaseBackgroundMeshGeometry = /** @class */ (function (_super) {
11912
11958
  this.fillVertices(vertices, uvs, iv, iuv, n, x2, y2, r, a, trb);
11913
11959
  }
11914
11960
  else {
11915
- this.fillVertices(vertices, uvs, iv, iuv, n, x3, y3, 0, 0, trb);
11961
+ this.fillVertices(vertices, uvs, iv, iuv, n, x3, y3, 0, a, trb);
11916
11962
  }
11917
11963
  this.fillIndices(indices, ia, ii, n);
11918
11964
  iv += n4;
@@ -11924,7 +11970,7 @@ var DBaseBackgroundMeshGeometry = /** @class */ (function (_super) {
11924
11970
  this.fillVertices(vertices, uvs, iv, iuv, n, x1, y2, r, a, tbl);
11925
11971
  }
11926
11972
  else {
11927
- this.fillVertices(vertices, uvs, iv, iuv, n, x0, y3, 0, 0, tbl);
11973
+ this.fillVertices(vertices, uvs, iv, iuv, n, x0, y3, 0, a, tbl);
11928
11974
  }
11929
11975
  this.fillIndicesEnd(indices, ia, ii, n);
11930
11976
  iv += n4;
@@ -12110,30 +12156,53 @@ var DBaseBorderMeshGeometry = /** @class */ (function (_super) {
12110
12156
  var r3 = r2 + dr;
12111
12157
  var cos = table.cos;
12112
12158
  var sin = table.sin;
12113
- if (r0 < 0) {
12114
- var m = n >> 1;
12115
- var c0 = cos[m];
12116
- var s0 = sin[m];
12117
- if (r1 < 0) {
12118
- for (var i = 0; i < n; ++i) {
12119
- var c = cos[i];
12120
- var s = sin[i];
12121
- vertices[++iv] = x + c0 * r0;
12122
- vertices[++iv] = y + s0 * r0;
12123
- vertices[++iv] = x + c0 * r1;
12124
- vertices[++iv] = y + s0 * r1;
12125
- vertices[++iv] = x + c * r2;
12126
- vertices[++iv] = y + s * r2;
12127
- vertices[++iv] = x + c * r3;
12128
- vertices[++iv] = y + s * r3;
12129
- uvs[++iuv] = 0.5 * (1 + c);
12130
- uvs[++iuv] = 0.5 * (1 + s);
12131
- uvs[++iuv] = 0.5;
12132
- uvs[++iuv] = 0.5;
12133
- uvs[++iuv] = 0.5;
12134
- uvs[++iuv] = 0.5;
12135
- uvs[++iuv] = 0.5 * (1 + c);
12136
- uvs[++iuv] = 0.5 * (1 + s);
12159
+ if (r0 <= 0) {
12160
+ var c0 = cos[0] + cos[n - 1];
12161
+ var s0 = sin[0] + sin[n - 1];
12162
+ if (r1 <= 0) {
12163
+ if (r <= 0) {
12164
+ for (var i = 0; i < n; ++i) {
12165
+ var c = cos[i];
12166
+ var s = sin[i];
12167
+ vertices[++iv] = x + c0 * r0;
12168
+ vertices[++iv] = y + s0 * r0;
12169
+ vertices[++iv] = x + c0 * r1;
12170
+ vertices[++iv] = y + s0 * r1;
12171
+ vertices[++iv] = x + c0 * r2;
12172
+ vertices[++iv] = y + s0 * r2;
12173
+ vertices[++iv] = x + c0 * r3;
12174
+ vertices[++iv] = y + s0 * r3;
12175
+ uvs[++iuv] = 0.5 * (1 + c);
12176
+ uvs[++iuv] = 0.5 * (1 + s);
12177
+ uvs[++iuv] = 0.5;
12178
+ uvs[++iuv] = 0.5;
12179
+ uvs[++iuv] = 0.5;
12180
+ uvs[++iuv] = 0.5;
12181
+ uvs[++iuv] = 0.5 * (1 + c);
12182
+ uvs[++iuv] = 0.5 * (1 + s);
12183
+ }
12184
+ }
12185
+ else {
12186
+ for (var i = 0; i < n; ++i) {
12187
+ var c = cos[i];
12188
+ var s = sin[i];
12189
+ vertices[++iv] = x + c0 * r0;
12190
+ vertices[++iv] = y + s0 * r0;
12191
+ vertices[++iv] = x + c0 * r1;
12192
+ vertices[++iv] = y + s0 * r1;
12193
+ vertices[++iv] = x + c * r2;
12194
+ vertices[++iv] = y + s * r2;
12195
+ vertices[++iv] = x + c * r3;
12196
+ vertices[++iv] = y + s * r3;
12197
+ uvs[++iuv] = 0.5 * (1 + c);
12198
+ uvs[++iuv] = 0.5 * (1 + s);
12199
+ uvs[++iuv] = 0.5;
12200
+ uvs[++iuv] = 0.5;
12201
+ uvs[++iuv] = 0.5;
12202
+ uvs[++iuv] = 0.5;
12203
+ uvs[++iuv] = 0.5 * (1 + c);
12204
+ uvs[++iuv] = 0.5 * (1 + s);
12205
+ }
12137
12206
  }
12138
12207
  }
12139
12208
  else {
@@ -12290,7 +12359,7 @@ var DBaseBorderMeshGeometry = /** @class */ (function (_super) {
12290
12359
  var h = this._height;
12291
12360
  var bw = this._borderWidth;
12292
12361
  var r = Math.min(0.5 * w, 0.5 * h, this._cornerRadius);
12293
- var a = 1 / resolution;
12362
+ var a = 0.5 / resolution;
12294
12363
  var x0 = 0;
12295
12364
  var x1 = r;
12296
12365
  var x2 = w - r;
@@ -12329,15 +12398,15 @@ var DBaseBorderMeshGeometry = /** @class */ (function (_super) {
12329
12398
  this.fillVertices(vrtcs, uvs, iv, iuv, n, x1, y1, r, a, bw, tlt);
12330
12399
  }
12331
12400
  else {
12332
- this.fillVertices(vrtcs, uvs, iv, iuv, n, x1, y1, r, 0, 0, tlt);
12401
+ this.fillVertices(vrtcs, uvs, iv, iuv, n, x1, y1, r, a, 0, tlt);
12333
12402
  }
12334
12403
  }
12335
12404
  else {
12336
12405
  if (bl || bt) {
12337
- this.fillVertices(vrtcs, uvs, iv, iuv, n, x0, y0, 0, 0, bw, tlt);
12406
+ this.fillVertices(vrtcs, uvs, iv, iuv, n, x0, y0, 0, a, bw, tlt);
12338
12407
  }
12339
12408
  else {
12340
- this.fillVertices(vrtcs, uvs, iv, iuv, n, x0, y0, 0, 0, 0, tlt);
12409
+ this.fillVertices(vrtcs, uvs, iv, iuv, n, x0, y0, 0, a, 0, tlt);
12341
12410
  }
12342
12411
  }
12343
12412
  this.fillIndices(indices, ia, ii, n, bt, false);
@@ -12351,15 +12420,15 @@ var DBaseBorderMeshGeometry = /** @class */ (function (_super) {
12351
12420
  this.fillVertices(vrtcs, uvs, iv, iuv, n, x2, y1, r, a, bw, ttr);
12352
12421
  }
12353
12422
  else {
12354
- this.fillVertices(vrtcs, uvs, iv, iuv, n, x2, y1, r, 0, 0, ttr);
12423
+ this.fillVertices(vrtcs, uvs, iv, iuv, n, x2, y1, r, a, 0, ttr);
12355
12424
  }
12356
12425
  }
12357
12426
  else {
12358
12427
  if (bt || br) {
12359
- this.fillVertices(vrtcs, uvs, iv, iuv, n, x3, y0, 0, 0, bw, ttr);
12428
+ this.fillVertices(vrtcs, uvs, iv, iuv, n, x3, y0, 0, a, bw, ttr);
12360
12429
  }
12361
12430
  else {
12362
- this.fillVertices(vrtcs, uvs, iv, iuv, n, x3, y0, 0, 0, 0, ttr);
12431
+ this.fillVertices(vrtcs, uvs, iv, iuv, n, x3, y0, 0, a, 0, ttr);
12363
12432
  }
12364
12433
  }
12365
12434
  this.fillIndices(indices, ia, ii, n, br, false);
@@ -12373,15 +12442,15 @@ var DBaseBorderMeshGeometry = /** @class */ (function (_super) {
12373
12442
  this.fillVertices(vrtcs, uvs, iv, iuv, n, x2, y2, r, a, bw, trb);
12374
12443
  }
12375
12444
  else {
12376
- this.fillVertices(vrtcs, uvs, iv, iuv, n, x2, y2, r, 0, 0, trb);
12445
+ this.fillVertices(vrtcs, uvs, iv, iuv, n, x2, y2, r, a, 0, trb);
12377
12446
  }
12378
12447
  }
12379
12448
  else {
12380
12449
  if (br || bb) {
12381
- this.fillVertices(vrtcs, uvs, iv, iuv, n, x3, y3, 0, 0, bw, trb);
12450
+ this.fillVertices(vrtcs, uvs, iv, iuv, n, x3, y3, 0, a, bw, trb);
12382
12451
  }
12383
12452
  else {
12384
- this.fillVertices(vrtcs, uvs, iv, iuv, n, x3, y3, 0, 0, 0, trb);
12453
+ this.fillVertices(vrtcs, uvs, iv, iuv, n, x3, y3, 0, a, 0, trb);
12385
12454
  }
12386
12455
  }
12387
12456
  this.fillIndices(indices, ia, ii, n, bb, false);
@@ -12395,15 +12464,15 @@ var DBaseBorderMeshGeometry = /** @class */ (function (_super) {
12395
12464
  this.fillVertices(vrtcs, uvs, iv, iuv, n, x1, y2, r, a, bw, tbl);
12396
12465
  }
12397
12466
  else {
12398
- this.fillVertices(vrtcs, uvs, iv, iuv, n, x1, y2, r, 0, 0, tbl);
12467
+ this.fillVertices(vrtcs, uvs, iv, iuv, n, x1, y2, r, a, 0, tbl);
12399
12468
  }
12400
12469
  }
12401
12470
  else {
12402
12471
  if (bb || bl) {
12403
- this.fillVertices(vrtcs, uvs, iv, iuv, n, x0, y3, 0, 0, bw, tbl);
12472
+ this.fillVertices(vrtcs, uvs, iv, iuv, n, x0, y3, 0, a, bw, tbl);
12404
12473
  }
12405
12474
  else {
12406
- this.fillVertices(vrtcs, uvs, iv, iuv, n, x0, y3, 0, 0, 0, tbl);
12475
+ this.fillVertices(vrtcs, uvs, iv, iuv, n, x0, y3, 0, a, 0, tbl);
12407
12476
  }
12408
12477
  }
12409
12478
  this.fillIndices(indices, ia, ii, n, bl, true);
@@ -12602,7 +12671,7 @@ var DBaseOutlineSnippet = /** @class */ (function () {
12602
12671
  outlineMesh.y = -outlineOffset;
12603
12672
  outlineMesh.width = width + outlineOffset * 2;
12604
12673
  outlineMesh.height = height + outlineOffset * 2;
12605
- outlineMesh.cornerRadius = cornerRadius;
12674
+ outlineMesh.cornerRadius = Math.max(0, cornerRadius + outlineOffset);
12606
12675
  outlineMesh.cornerMask = cornerMask;
12607
12676
  outlineMesh.borderWidth = outlineWidth;
12608
12677
  outlineMesh.borderMask = outlineMask;
@@ -21972,9 +22041,9 @@ var EShapeContainer = /** @class */ (function (_super) {
21972
22041
  _this._atlas = null;
21973
22042
  _this._fontAtlases = new DynamicSDFFontAtlases();
21974
22043
  _this._pixelScale = 1;
21975
- _this._pixelScaleId = NaN;
22044
+ _this._pixelScaleId = -2; // Since this._shapeScaleId starts from -1.
21976
22045
  _this._shapeScale = 1;
21977
- _this._shapeScaleId = NaN;
22046
+ _this._shapeScaleId = -1; // Since PIXI.Transform._worldID starts from zero.
21978
22047
  _this._work = new pixi_js.Point();
21979
22048
  _this._buffers = [];
21980
22049
  return _this;
@@ -24308,7 +24377,7 @@ var EShapeRuntimeImpl = /** @class */ (function () {
24308
24377
  this.cursor = shape.cursor;
24309
24378
  this.reset = EShapeRuntimeReset.NONE;
24310
24379
  this.written = EShapeRuntimeReset.NONE;
24311
- this.effect = NaN;
24380
+ this.effect = -1;
24312
24381
  this.isStateChanged = false;
24313
24382
  this.interactive = false;
24314
24383
  }
@@ -24638,12 +24707,13 @@ var EShapeRuntimeImpl = /** @class */ (function () {
24638
24707
  };
24639
24708
  EShapeRuntimeImpl.prototype.update = function (shape, time) {
24640
24709
  var data = shape.data;
24641
- var isEffectTimeUp = this.effect <= time;
24710
+ var effect = this.effect;
24711
+ var isEffectTimeUp = 0 <= effect && effect <= time;
24642
24712
  if (data.isChanged || this.isStateChanged || isEffectTimeUp) {
24643
24713
  this.isStateChanged = false;
24644
24714
  data.isChanged = false;
24645
24715
  if (isEffectTimeUp) {
24646
- this.effect = NaN;
24716
+ this.effect = -1;
24647
24717
  }
24648
24718
  shape.lock(EShapeLockPart.UPLOADED);
24649
24719
  this.onUpdate(shape, time);
@@ -35721,13 +35791,14 @@ var BuilderRectangleRounded = /** @class */ (function (_super) {
35721
35791
  __extends(BuilderRectangleRounded, _super);
35722
35792
  function BuilderRectangleRounded(vertexOffset, indexOffset, vertexCount, indexCount) {
35723
35793
  var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount) || this;
35724
- _this.radius = NaN;
35725
- _this.corner = NaN;
35794
+ _this.radius = 0;
35795
+ _this.corner = 0;
35726
35796
  return _this;
35727
35797
  }
35728
35798
  BuilderRectangleRounded.prototype.init = function (buffer) {
35729
35799
  buffer.updateIndices();
35730
35800
  buildRectangleRoundedIndex(buffer.indices, this.vertexOffset, this.indexOffset);
35801
+ this.inited |= BuilderFlag.INDEX;
35731
35802
  };
35732
35803
  BuilderRectangleRounded.prototype.update = function (buffer, shape) {
35733
35804
  this.updateVertexClippingStepAndUv(buffer, shape);
@@ -35757,7 +35828,13 @@ var BuilderRectangleRounded = /** @class */ (function (_super) {
35757
35828
  var textureTransformId = toTextureTransformId(texture);
35758
35829
  var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
35759
35830
  var isVertexChanged = isSizeChanged || isStrokeChanged;
35760
- if (isVertexChanged || isTransformChanged || isCornerChanged || isTextureChanged) {
35831
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
35832
+ if (isNotInited ||
35833
+ isVertexChanged ||
35834
+ isTransformChanged ||
35835
+ isCornerChanged ||
35836
+ isTextureChanged) {
35837
+ this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
35761
35838
  this.sizeX = sizeX;
35762
35839
  this.sizeY = sizeY;
35763
35840
  this.radius = radius;
@@ -35774,17 +35851,17 @@ var BuilderRectangleRounded = /** @class */ (function (_super) {
35774
35851
  buffer.updateVertices();
35775
35852
  buildRectangleRoundedVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, radius, shape.transform.internalTransform, RECTANGLE_ROUNDED_WORLD_SIZE);
35776
35853
  // Steps
35777
- if (isVertexChanged || isCornerChanged || isTransformChanged) {
35854
+ if (isNotInited || isVertexChanged || isCornerChanged || isTransformChanged) {
35778
35855
  buffer.updateSteps();
35779
35856
  buildRectangleRoundedStep(buffer.steps, voffset, strokeWidth, strokeSide, strokeStyle, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
35780
35857
  }
35781
35858
  // Clippings
35782
- if (isVertexChanged || isCornerChanged) {
35859
+ if (isNotInited || isVertexChanged || isCornerChanged) {
35783
35860
  buffer.updateClippings();
35784
35861
  buildRectangleRoundedClipping(buffer.clippings, voffset, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
35785
35862
  }
35786
35863
  // UVs
35787
- if (isVertexChanged || isTextureChanged) {
35864
+ if (isNotInited || isVertexChanged || isTextureChanged) {
35788
35865
  buffer.updateUvs();
35789
35866
  buildRectangleRoundedUv(buffer.uvs, voffset, toTextureUvs(texture), RECTANGLE_ROUNDED_WORLD_SIZE);
35790
35867
  }
@@ -35799,8 +35876,8 @@ var BuilderRectangleRounded = /** @class */ (function (_super) {
35799
35876
  */
35800
35877
  var createRectangleRoundedUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
35801
35878
  var tcount = toTextBufferCount(shape);
35802
- var tvcount = tcount * TEXT_VERTEX_COUNT;
35803
- var ticount = tcount * TEXT_INDEX_COUNT;
35879
+ var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
35880
+ var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
35804
35881
  var vcount = RECTANGLE_ROUNDED_VERTEX_COUNT + tvcount;
35805
35882
  var icount = RECTANGLE_ROUNDED_INDEX_COUNT + ticount;
35806
35883
  if (buffer.check(voffset, ioffset, vcount, icount)) {
@@ -36686,6 +36763,7 @@ var BuilderCircle = /** @class */ (function (_super) {
36686
36763
  var voffset = this.vertexOffset;
36687
36764
  buildCircleClipping(buffer.clippings, voffset);
36688
36765
  buildCircleIndex(buffer.indices, voffset, this.indexOffset);
36766
+ this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
36689
36767
  };
36690
36768
  BuilderCircle.prototype.update = function (buffer, shape) {
36691
36769
  this.updateVertexAndStep(buffer, shape);
@@ -36707,7 +36785,9 @@ var BuilderCircle = /** @class */ (function (_super) {
36707
36785
  var isStrokeChanged = this.strokeAlign !== strokeAlign ||
36708
36786
  this.strokeWidth !== strokeWidth ||
36709
36787
  this.strokeStyle !== strokeStyle;
36710
- if (isSizeChanged || isTransformChanged || isStrokeChanged) {
36788
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
36789
+ if (isNotInited || isSizeChanged || isTransformChanged || isStrokeChanged) {
36790
+ this.inited |= BuilderFlag.VERTEX_AND_STEP;
36711
36791
  this.sizeX = sizeX;
36712
36792
  this.sizeY = sizeY;
36713
36793
  this.transformLocalId = transformLocalId;
@@ -36724,7 +36804,11 @@ var BuilderCircle = /** @class */ (function (_super) {
36724
36804
  BuilderCircle.prototype.updateUv = function (buffer, shape) {
36725
36805
  var texture = toTexture(shape);
36726
36806
  var textureTransformId = toTextureTransformId(texture);
36727
- if (texture !== this.texture || textureTransformId !== this.textureTransformId) {
36807
+ var isNotInited = !(this.inited & BuilderFlag.UV);
36808
+ if (isNotInited ||
36809
+ texture !== this.texture ||
36810
+ textureTransformId !== this.textureTransformId) {
36811
+ this.inited |= BuilderFlag.UV;
36728
36812
  this.texture = texture;
36729
36813
  this.textureTransformId = textureTransformId;
36730
36814
  buffer.updateUvs();
@@ -36741,8 +36825,8 @@ var BuilderCircle = /** @class */ (function (_super) {
36741
36825
  */
36742
36826
  var createCircleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
36743
36827
  var tcount = toTextBufferCount(shape);
36744
- var tvcount = tcount * TEXT_VERTEX_COUNT;
36745
- var ticount = tcount * TEXT_INDEX_COUNT;
36828
+ var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
36829
+ var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
36746
36830
  var vcount = CIRCLE_VERTEX_COUNT + tvcount;
36747
36831
  var icount = CIRCLE_INDEX_COUNT + ticount;
36748
36832
  if (buffer.check(voffset, ioffset, vcount, icount)) {
@@ -37186,6 +37270,7 @@ var BuilderLine = /** @class */ (function (_super) {
37186
37270
  BuilderLine.prototype.init = function (buffer) {
37187
37271
  buffer.updateIndices();
37188
37272
  buildLineIndex(buffer.indices, this.vertexOffset, this.indexOffset, this.indexCount);
37273
+ this.inited |= BuilderFlag.INDEX;
37189
37274
  };
37190
37275
  BuilderLine.prototype.isCompatible = function (shape) {
37191
37276
  var vcount = toLineVertexCount(toLinePointCount(shape.points), true);
@@ -37202,10 +37287,12 @@ var BuilderLine = /** @class */ (function (_super) {
37202
37287
  if (points) {
37203
37288
  var formatted = points.formatted;
37204
37289
  var pointCount = formatted.length;
37205
- if (this.pointCount !== pointCount) {
37290
+ var isNotInited = !(this.inited & BuilderFlag.CLIPPING);
37291
+ if (isNotInited || this.pointCount !== pointCount) {
37292
+ this.inited |= BuilderFlag.CLIPPING;
37206
37293
  this.pointCount = pointCount;
37207
- // Invalidate the pointId to update the vertices
37208
- this.pointId = -1;
37294
+ // Invalidate the vertex buffer
37295
+ this.inited &= ~BuilderFlag.VERTEX;
37209
37296
  buffer.updateClippings();
37210
37297
  buildLineClipping(buffer.clippings, this.vertexOffset, this.vertexCount, pointCount);
37211
37298
  }
@@ -37224,15 +37311,17 @@ var BuilderLine = /** @class */ (function (_super) {
37224
37311
  var isStrokeWidthChanged = this.strokeWidth !== strokeWidth || this.strokeStyle !== strokeStyle;
37225
37312
  var transformLocalId = toTransformLocalId(shape);
37226
37313
  var isTransformChanged = this.transformLocalId !== transformLocalId;
37227
- if (isPointChanged || isTransformChanged || isStrokeWidthChanged) {
37314
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_COLOR_FILL);
37315
+ if (isNotInited || isPointChanged || isTransformChanged || isStrokeWidthChanged) {
37316
+ this.inited |= BuilderFlag.VERTEX_STEP_AND_COLOR_FILL;
37228
37317
  this.pointId = pointId;
37229
37318
  this.pointsClosed = pointsClosed;
37230
37319
  this.strokeWidth = strokeWidth;
37231
37320
  this.strokeStyle = strokeStyle;
37232
37321
  this.transformLocalId = transformLocalId;
37233
37322
  if (isPointChanged) {
37234
- // Invalidate the texture transform ID to update the UVs
37235
- this.textureTransformId = NaN;
37323
+ // Invalidate the UV buffer
37324
+ this.inited &= ~BuilderFlag.UV;
37236
37325
  }
37237
37326
  buffer.updateVertices();
37238
37327
  buffer.updateSteps();
@@ -37244,7 +37333,11 @@ var BuilderLine = /** @class */ (function (_super) {
37244
37333
  BuilderLine.prototype.updateLineUv = function (buffer, shape) {
37245
37334
  var texture = toTexture(shape);
37246
37335
  var textureTransformId = toTextureTransformId(texture);
37247
- if (texture !== this.texture || textureTransformId !== this.textureTransformId) {
37336
+ var isNotInited = !(this.inited & BuilderFlag.UV);
37337
+ if (isNotInited ||
37338
+ texture !== this.texture ||
37339
+ textureTransformId !== this.textureTransformId) {
37340
+ this.inited |= BuilderFlag.UV;
37248
37341
  this.texture = texture;
37249
37342
  this.textureTransformId = textureTransformId;
37250
37343
  buffer.updateUvs();
@@ -37414,7 +37507,9 @@ var BuilderMarkerBase = /** @class */ (function (_super) {
37414
37507
  var isEnabled = shape.visible && fill.enable;
37415
37508
  var color = fill.color;
37416
37509
  var alpha = isEnabled ? fill.alpha : 0;
37417
- if (color !== this.colorFill || alpha !== this.alphaFill) {
37510
+ var isNotInited = !(this.inited & BuilderFlag.COLOR_FILL);
37511
+ if (isNotInited || color !== this.colorFill || alpha !== this.alphaFill) {
37512
+ this.inited |= BuilderFlag.COLOR_FILL;
37418
37513
  this.colorFill = color;
37419
37514
  this.alphaFill = alpha;
37420
37515
  buffer.updateColorFills();
@@ -37440,6 +37535,7 @@ var BuilderMarkerTriangle = /** @class */ (function (_super) {
37440
37535
  buffer.updateIndices();
37441
37536
  buildTriangleClipping(buffer.clippings, this.vertexOffset);
37442
37537
  buildTriangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
37538
+ this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
37443
37539
  };
37444
37540
  BuilderMarkerTriangle.prototype.update = function (buffer, shape) {
37445
37541
  this.updateVertexStepAndUv(buffer, shape);
@@ -37476,7 +37572,13 @@ var BuilderMarkerTriangle = /** @class */ (function (_super) {
37476
37572
  var isVertexChanged = isSizeChanged || isStrokeChanged;
37477
37573
  var pointId = points.id;
37478
37574
  var isPointChanged = pointId !== this.pointId;
37479
- if (isVertexChanged || isTransformChanged || isTextureChanged || isPointChanged) {
37575
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_UV);
37576
+ if (isNotInited ||
37577
+ isVertexChanged ||
37578
+ isTransformChanged ||
37579
+ isTextureChanged ||
37580
+ isPointChanged) {
37581
+ this.inited |= BuilderFlag.VERTEX_STEP_AND_UV;
37480
37582
  this.sizeX = sizeX;
37481
37583
  this.sizeY = sizeY;
37482
37584
  this.transformLocalId = transformLocalId;
@@ -37491,11 +37593,11 @@ var BuilderMarkerTriangle = /** @class */ (function (_super) {
37491
37593
  internalTransform.copyFrom(marker.transform).prepend(shape.transform.internalTransform);
37492
37594
  buffer.updateVertices();
37493
37595
  buildTriangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, TRIANGLE_WORLD_SIZE);
37494
- if (isVertexChanged || isTransformChanged) {
37596
+ if (isNotInited || isVertexChanged || isTransformChanged) {
37495
37597
  buffer.updateSteps();
37496
37598
  buildTriangleStep(buffer.steps, buffer.clippings, voffset, TRIANGLE_VERTEX_COUNT, strokeWidth, strokeStyle, TRIANGLE_WORLD_SIZE);
37497
37599
  }
37498
- if (isVertexChanged || isTextureChanged) {
37600
+ if (isNotInited || isVertexChanged || isTextureChanged) {
37499
37601
  buffer.updateUvs();
37500
37602
  buildTriangleUv(buffer.uvs, toTextureUvs(texture), voffset, TRIANGLE_WORLD_SIZE);
37501
37603
  }
@@ -37551,6 +37653,7 @@ var BuilderMarkerCircle = /** @class */ (function (_super) {
37551
37653
  var vertexOffset = this.vertexOffset;
37552
37654
  buildCircleClipping(buffer.clippings, vertexOffset);
37553
37655
  buildCircleIndex(buffer.indices, vertexOffset, this.indexOffset);
37656
+ this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
37554
37657
  };
37555
37658
  BuilderMarkerCircle.prototype.update = function (buffer, shape) {
37556
37659
  this.updateVertexAndStep(buffer, shape);
@@ -37584,7 +37687,13 @@ var BuilderMarkerCircle = /** @class */ (function (_super) {
37584
37687
  this.strokeStyle !== strokeStyle;
37585
37688
  var pointId = points.id;
37586
37689
  var isPointChanged = pointId !== this.pointId;
37587
- if (isSizeChanged || isTransformChanged || isStrokeChanged || isPointChanged) {
37690
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
37691
+ if (isNotInited ||
37692
+ isSizeChanged ||
37693
+ isTransformChanged ||
37694
+ isStrokeChanged ||
37695
+ isPointChanged) {
37696
+ this.inited |= BuilderFlag.VERTEX_AND_STEP;
37588
37697
  this.sizeX = sizeX;
37589
37698
  this.sizeY = sizeY;
37590
37699
  this.transformLocalId = transformLocalId;
@@ -37604,7 +37713,11 @@ var BuilderMarkerCircle = /** @class */ (function (_super) {
37604
37713
  BuilderMarkerCircle.prototype.updateUv = function (buffer, shape) {
37605
37714
  var texture = toTexture(shape);
37606
37715
  var textureTransformId = toTextureTransformId(texture);
37607
- if (texture !== this.texture || textureTransformId !== this.textureTransformId) {
37716
+ var isNotInited = !(this.inited & BuilderFlag.UV);
37717
+ if (isNotInited ||
37718
+ texture !== this.texture ||
37719
+ textureTransformId !== this.textureTransformId) {
37720
+ this.inited |= BuilderFlag.UV;
37608
37721
  this.texture = texture;
37609
37722
  this.textureTransformId = textureTransformId;
37610
37723
  buffer.updateUvs();
@@ -38101,6 +38214,7 @@ var BuilderMarkerRectangle = /** @class */ (function (_super) {
38101
38214
  BuilderMarkerRectangle.prototype.init = function (buffer) {
38102
38215
  buffer.updateIndices();
38103
38216
  buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
38217
+ this.inited |= BuilderFlag.INDEX;
38104
38218
  };
38105
38219
  BuilderMarkerRectangle.prototype.update = function (buffer, shape) {
38106
38220
  this.updateVertexClippingStepAndUv(buffer, shape);
@@ -38139,7 +38253,13 @@ var BuilderMarkerRectangle = /** @class */ (function (_super) {
38139
38253
  var isVertexChanged = isSizeChanged || isStrokeChanged;
38140
38254
  var pointId = points.id;
38141
38255
  var isPointChanged = pointId !== this.pointId;
38142
- if (isVertexChanged || isTransformChanged || isTextureChanged || isPointChanged) {
38256
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
38257
+ if (isNotInited ||
38258
+ isVertexChanged ||
38259
+ isTransformChanged ||
38260
+ isTextureChanged ||
38261
+ isPointChanged) {
38262
+ this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
38143
38263
  this.sizeX = sizeX;
38144
38264
  this.sizeY = sizeY;
38145
38265
  this.transformLocalId = transformLocalId;
@@ -38156,17 +38276,17 @@ var BuilderMarkerRectangle = /** @class */ (function (_super) {
38156
38276
  buffer.updateVertices();
38157
38277
  buildRectangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_WORLD_SIZE);
38158
38278
  // Steps
38159
- if (isVertexChanged || isTransformChanged) {
38279
+ if (isNotInited || isVertexChanged || isTransformChanged) {
38160
38280
  buffer.updateSteps();
38161
38281
  buildRectangleStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
38162
38282
  }
38163
38283
  // Clippings
38164
- if (isVertexChanged) {
38284
+ if (isNotInited || isVertexChanged) {
38165
38285
  buffer.updateClippings();
38166
38286
  buildRectangleClipping(buffer.clippings, voffset, RECTANGLE_WORLD_SIZE);
38167
38287
  }
38168
38288
  // UVs
38169
- if (isVertexChanged || isTextureChanged) {
38289
+ if (isNotInited || isVertexChanged || isTextureChanged) {
38170
38290
  buffer.updateUvs();
38171
38291
  buildRectangleUv(buffer.uvs, voffset, toTextureUvs(texture), RECTANGLE_WORLD_SIZE);
38172
38292
  }
@@ -38287,8 +38407,8 @@ var createLineUploaded = function (buffer, shape, voffset, ioffset, antialiasWei
38287
38407
  var mhioffset = mtioffset + mticount;
38288
38408
  // Text
38289
38409
  var tcount = toTextBufferCount(shape);
38290
- var tvcount = tcount * TEXT_VERTEX_COUNT;
38291
- var ticount = tcount * TEXT_INDEX_COUNT;
38410
+ var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
38411
+ var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
38292
38412
  var tvoffset = mhvoffset + mhvcount;
38293
38413
  var tioffset = mhioffset + mhicount;
38294
38414
  // Uploaded
@@ -38804,6 +38924,7 @@ var BuilderRectanglePivoted = /** @class */ (function (_super) {
38804
38924
  BuilderRectanglePivoted.prototype.init = function (buffer) {
38805
38925
  buffer.updateIndices();
38806
38926
  buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
38927
+ this.inited |= BuilderFlag.INDEX;
38807
38928
  };
38808
38929
  BuilderRectanglePivoted.prototype.update = function (buffer, shape) {
38809
38930
  this.updateVertexClippingStepAndUv(buffer, shape);
@@ -38830,7 +38951,9 @@ var BuilderRectanglePivoted = /** @class */ (function (_super) {
38830
38951
  var textureTransformId = toTextureTransformId(texture);
38831
38952
  var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
38832
38953
  var isVertexChanged = isSizeChanged || isStrokeChanged;
38833
- if (isVertexChanged || isTransformChanged || isTextureChanged) {
38954
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
38955
+ if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
38956
+ this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
38834
38957
  this.sizeX = sizeX;
38835
38958
  this.sizeY = sizeY;
38836
38959
  this.transformLocalId = transformLocalId;
@@ -38845,17 +38968,17 @@ var BuilderRectanglePivoted = /** @class */ (function (_super) {
38845
38968
  buffer.updateVertices();
38846
38969
  buildRectangleVertex(buffer.vertices, voffset, 0.5 * sizeX, 0.5 * sizeY, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, RECTANGLE_WORLD_SIZE);
38847
38970
  // Steps
38848
- if (isVertexChanged || isTransformChanged) {
38971
+ if (isNotInited || isVertexChanged || isTransformChanged) {
38849
38972
  buffer.updateSteps();
38850
38973
  buildRectangleStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
38851
38974
  }
38852
38975
  // Clippings
38853
- if (isVertexChanged) {
38976
+ if (isNotInited || isVertexChanged) {
38854
38977
  buffer.updateClippings();
38855
38978
  buildRectangleClipping(buffer.clippings, voffset, RECTANGLE_WORLD_SIZE);
38856
38979
  }
38857
38980
  // UVs
38858
- if (isVertexChanged || isTextureChanged) {
38981
+ if (isNotInited || isVertexChanged || isTextureChanged) {
38859
38982
  buffer.updateUvs();
38860
38983
  buildRectangleUv(buffer.uvs, voffset, toTextureUvs(texture), RECTANGLE_WORLD_SIZE);
38861
38984
  }
@@ -38870,8 +38993,8 @@ var BuilderRectanglePivoted = /** @class */ (function (_super) {
38870
38993
  */
38871
38994
  var createRectanglePivotedUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
38872
38995
  var tcount = toTextBufferCount(shape);
38873
- var tvcount = tcount * TEXT_VERTEX_COUNT;
38874
- var ticount = tcount * TEXT_INDEX_COUNT;
38996
+ var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
38997
+ var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
38875
38998
  var vcount = RECTANGLE_VERTEX_COUNT + tvcount;
38876
38999
  var icount = RECTANGLE_INDEX_COUNT + ticount;
38877
39000
  if (buffer.check(voffset, ioffset, vcount, icount)) {
@@ -38889,8 +39012,8 @@ var createRectanglePivotedUploaded = function (buffer, shape, voffset, ioffset,
38889
39012
  */
38890
39013
  var createGroupUploaded = function (buffer, shape, voffset, ioffset) {
38891
39014
  var tcount = toTextBufferCount(shape);
38892
- var tvcount = tcount * TEXT_VERTEX_COUNT;
38893
- var ticount = tcount * TEXT_INDEX_COUNT;
39015
+ var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
39016
+ var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
38894
39017
  var vcount = tvcount;
38895
39018
  var icount = ticount;
38896
39019
  if (buffer.check(voffset, ioffset, vcount, icount)) {
@@ -39890,6 +40013,7 @@ var BuilderRectangle = /** @class */ (function (_super) {
39890
40013
  BuilderRectangle.prototype.init = function (buffer) {
39891
40014
  buffer.updateIndices();
39892
40015
  buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
40016
+ this.inited |= BuilderFlag.INDEX;
39893
40017
  };
39894
40018
  BuilderRectangle.prototype.update = function (buffer, shape) {
39895
40019
  this.updateVertexClippingStepAndUv(buffer, shape);
@@ -39916,7 +40040,9 @@ var BuilderRectangle = /** @class */ (function (_super) {
39916
40040
  var textureTransformId = toTextureTransformId(texture);
39917
40041
  var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
39918
40042
  var isVertexChanged = isSizeChanged || isStrokeChanged;
39919
- if (isVertexChanged || isTransformChanged || isTextureChanged) {
40043
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
40044
+ if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
40045
+ this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
39920
40046
  this.sizeX = sizeX;
39921
40047
  this.sizeY = sizeY;
39922
40048
  this.transformLocalId = transformLocalId;
@@ -39931,17 +40057,17 @@ var BuilderRectangle = /** @class */ (function (_super) {
39931
40057
  buffer.updateVertices();
39932
40058
  buildRectangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, RECTANGLE_WORLD_SIZE);
39933
40059
  // Steps
39934
- if (isVertexChanged || isTransformChanged) {
40060
+ if (isNotInited || isVertexChanged || isTransformChanged) {
39935
40061
  buffer.updateSteps();
39936
40062
  buildRectangleStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
39937
40063
  }
39938
40064
  // Clippings
39939
- if (isVertexChanged) {
40065
+ if (isNotInited || isVertexChanged) {
39940
40066
  buffer.updateClippings();
39941
40067
  buildRectangleClipping(buffer.clippings, voffset, RECTANGLE_WORLD_SIZE);
39942
40068
  }
39943
40069
  // UVs
39944
- if (isVertexChanged || isTextureChanged) {
40070
+ if (isNotInited || isVertexChanged || isTextureChanged) {
39945
40071
  buffer.updateUvs();
39946
40072
  buildRectangleUv(buffer.uvs, voffset, toTextureUvs(texture), RECTANGLE_WORLD_SIZE);
39947
40073
  }
@@ -39956,8 +40082,8 @@ var BuilderRectangle = /** @class */ (function (_super) {
39956
40082
  */
39957
40083
  var createRectangleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
39958
40084
  var tcount = toTextBufferCount(shape);
39959
- var tvcount = tcount * TEXT_VERTEX_COUNT;
39960
- var ticount = tcount * TEXT_INDEX_COUNT;
40085
+ var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
40086
+ var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
39961
40087
  var vcount = RECTANGLE_VERTEX_COUNT + tvcount;
39962
40088
  var icount = RECTANGLE_INDEX_COUNT + ticount;
39963
40089
  if (buffer.check(voffset, ioffset, vcount, icount)) {
@@ -40210,6 +40336,7 @@ var BuilderImageSdf = /** @class */ (function (_super) {
40210
40336
  buffer.updateIndices();
40211
40337
  buildImageSdfClipping(buffer.clippings, voffset);
40212
40338
  buildImageSdfIndex(buffer.indices, voffset, this.indexOffset);
40339
+ this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
40213
40340
  };
40214
40341
  BuilderImageSdf.prototype.update = function (buffer, shape) {
40215
40342
  this.updateVertexAndStep(buffer, shape);
@@ -40235,7 +40362,13 @@ var BuilderImageSdf = /** @class */ (function (_super) {
40235
40362
  var textureWidth = texture.width * texture.resolution;
40236
40363
  var textureHeight = texture.height * texture.resolution;
40237
40364
  var isTextureSizeChanged = this.textureWidth !== textureWidth || this.textureHeight !== textureHeight;
40238
- if (isSizeChanged || isTransformChanged || isStrokeChanged || isTextureSizeChanged) {
40365
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
40366
+ if (isNotInited ||
40367
+ isSizeChanged ||
40368
+ isTransformChanged ||
40369
+ isStrokeChanged ||
40370
+ isTextureSizeChanged) {
40371
+ this.inited |= BuilderFlag.VERTEX_AND_STEP;
40239
40372
  this.sizeX = sizeX;
40240
40373
  this.sizeY = sizeY;
40241
40374
  this.transformLocalId = transformLocalId;
@@ -40255,7 +40388,11 @@ var BuilderImageSdf = /** @class */ (function (_super) {
40255
40388
  BuilderImageSdf.prototype.updateUv = function (buffer, shape) {
40256
40389
  var texture = toTexture(shape);
40257
40390
  var textureTransformId = toTextureTransformId(texture);
40258
- if (texture !== this.texture || textureTransformId !== this.textureTransformId) {
40391
+ var isNotInited = !(this.inited & BuilderFlag.UV);
40392
+ if (isNotInited ||
40393
+ texture !== this.texture ||
40394
+ textureTransformId !== this.textureTransformId) {
40395
+ this.inited |= BuilderFlag.UV;
40259
40396
  this.texture = texture;
40260
40397
  this.textureTransformId = textureTransformId;
40261
40398
  buffer.updateUvs();
@@ -40271,8 +40408,8 @@ var BuilderImageSdf = /** @class */ (function (_super) {
40271
40408
  */
40272
40409
  var createImageSdfUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
40273
40410
  var tcount = toTextBufferCount(shape);
40274
- var tvcount = tcount * TEXT_VERTEX_COUNT;
40275
- var ticount = tcount * TEXT_INDEX_COUNT;
40411
+ var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
40412
+ var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
40276
40413
  var vcount = IMAGE_SDF_VERTEX_COUNT + tvcount;
40277
40414
  var icount = IMAGE_SDF_INDEX_COUNT + ticount;
40278
40415
  if (buffer.check(voffset, ioffset, vcount, icount)) {
@@ -40356,8 +40493,8 @@ var BuilderLabel = /** @class */ (function () {
40356
40493
  */
40357
40494
  var createLabelUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
40358
40495
  var tcount = toTextBufferCount(shape);
40359
- var tvcount = tcount * TEXT_VERTEX_COUNT;
40360
- var ticount = tcount * TEXT_INDEX_COUNT;
40496
+ var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
40497
+ var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
40361
40498
  var vcount = tvcount;
40362
40499
  var icount = ticount;
40363
40500
  if (buffer.check(voffset, ioffset, vcount, icount)) {
@@ -40594,7 +40731,9 @@ var BuilderLineOfAny = /** @class */ (function (_super) {
40594
40731
  var colorStroke = stroke.color;
40595
40732
  var alphaStroke = isStrokeEnabled ? stroke.alpha : 0;
40596
40733
  var isStrokeChanged = colorStroke !== this.colorStroke || alphaStroke !== this.alphaStroke;
40597
- if (isPointStrokeChanged || isStrokeChanged) {
40734
+ var isNotInited = !(this.inited & BuilderFlag.COLOR_STROKE);
40735
+ if (isNotInited || isPointStrokeChanged || isStrokeChanged) {
40736
+ this.inited |= BuilderFlag.COLOR_STROKE;
40598
40737
  this.colorStroke = colorStroke;
40599
40738
  this.alphaStroke = alphaStroke;
40600
40739
  this.pointStrokeId = pointStrokeId;
@@ -41303,6 +41442,7 @@ var BuilderLineOfCircles = /** @class */ (function (_super) {
41303
41442
  buildCircleIndex(indices, voffset, ioffset);
41304
41443
  copyIndex(indices, CIRCLE_VERTEX_COUNT, ioffset, CIRCLE_INDEX_COUNT, pointCountReserved);
41305
41444
  }
41445
+ this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
41306
41446
  };
41307
41447
  BuilderLineOfCircles.prototype.update = function (buffer, shape) {
41308
41448
  var points = shape.points;
@@ -41334,11 +41474,14 @@ var BuilderLineOfCircles = /** @class */ (function (_super) {
41334
41474
  var isStrokeChanged = this.strokeAlign !== strokeAlign ||
41335
41475
  this.strokeWidth !== strokeWidth ||
41336
41476
  this.strokeStyle !== strokeStyle;
41337
- if (isPointChanged ||
41477
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
41478
+ if (isNotInited ||
41479
+ isPointChanged ||
41338
41480
  isPointSizeChanged ||
41339
41481
  isSizeChanged ||
41340
41482
  isTransformChanged ||
41341
41483
  isStrokeChanged) {
41484
+ this.inited |= BuilderFlag.VERTEX_AND_STEP;
41342
41485
  this.pointId = pointId;
41343
41486
  var formatted = points.formatted;
41344
41487
  this.pointCount = formatted.length;
@@ -41391,7 +41534,11 @@ var BuilderLineOfCircles = /** @class */ (function (_super) {
41391
41534
  BuilderLineOfCircles.prototype.updateUv = function (buffer, shape) {
41392
41535
  var texture = toTexture(shape);
41393
41536
  var textureTransformId = toTextureTransformId(texture);
41394
- if (texture !== this.texture || textureTransformId !== this.textureTransformId) {
41537
+ var isNotInited = !(this.inited & BuilderFlag.UV);
41538
+ if (isNotInited ||
41539
+ texture !== this.texture ||
41540
+ textureTransformId !== this.textureTransformId) {
41541
+ this.inited |= BuilderFlag.UV;
41395
41542
  this.texture = texture;
41396
41543
  this.textureTransformId = textureTransformId;
41397
41544
  buffer.updateUvs();
@@ -41414,8 +41561,8 @@ var BuilderLineOfCircles = /** @class */ (function (_super) {
41414
41561
  */
41415
41562
  var createLineOfAnyUploaded = function (buffer, shape, voffset, vcountPerPoint, ioffset, icountPerPoint, antialiasWeight, constructor) {
41416
41563
  var tcount = toTextBufferCount(shape);
41417
- var tvcount = tcount * TEXT_VERTEX_COUNT;
41418
- var ticount = tcount * TEXT_INDEX_COUNT;
41564
+ var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
41565
+ var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
41419
41566
  var points = shape.points;
41420
41567
  var pointCount = toLineOfAnyPointCount(toPointsCount(points));
41421
41568
  var pvcount = pointCount * vcountPerPoint;
@@ -41510,8 +41657,8 @@ var BuilderLineOfRectangleRoundeds = /** @class */ (function (_super) {
41510
41657
  __extends(BuilderLineOfRectangleRoundeds, _super);
41511
41658
  function BuilderLineOfRectangleRoundeds(vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) {
41512
41659
  var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) || this;
41513
- _this.radius = NaN;
41514
- _this.corner = NaN;
41660
+ _this.radius = 0;
41661
+ _this.corner = 0;
41515
41662
  return _this;
41516
41663
  }
41517
41664
  BuilderLineOfRectangleRoundeds.prototype.init = function (buffer) {
@@ -41524,6 +41671,7 @@ var BuilderLineOfRectangleRoundeds = /** @class */ (function (_super) {
41524
41671
  buildRectangleRoundedIndex(indices, voffset, ioffset);
41525
41672
  copyIndex(indices, RECTANGLE_ROUNDED_VERTEX_COUNT, ioffset, RECTANGLE_ROUNDED_INDEX_COUNT, pointCountReserved);
41526
41673
  }
41674
+ this.inited |= BuilderFlag.INDEX;
41527
41675
  };
41528
41676
  BuilderLineOfRectangleRoundeds.prototype.update = function (buffer, shape) {
41529
41677
  var points = shape.points;
@@ -41563,7 +41711,13 @@ var BuilderLineOfRectangleRoundeds = /** @class */ (function (_super) {
41563
41711
  var textureTransformId = toTextureTransformId(texture);
41564
41712
  var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
41565
41713
  var isVertexChanged = isPointChanged || isPointSizeChanged || isSizeChanged || isStrokeChanged;
41566
- if (isVertexChanged || isTransformChanged || isCornerChanged || isTextureChanged) {
41714
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
41715
+ if (isNotInited ||
41716
+ isVertexChanged ||
41717
+ isTransformChanged ||
41718
+ isCornerChanged ||
41719
+ isTextureChanged) {
41720
+ this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
41567
41721
  this.pointId = pointId;
41568
41722
  var formatted = points.formatted;
41569
41723
  this.pointCount = formatted.length;
@@ -41582,13 +41736,13 @@ var BuilderLineOfRectangleRoundeds = /** @class */ (function (_super) {
41582
41736
  this.textureTransformId = textureTransformId;
41583
41737
  // Buffer
41584
41738
  buffer.updateVertices();
41585
- if (isVertexChanged || isTransformChanged) {
41739
+ if (isNotInited || isVertexChanged || isTransformChanged) {
41586
41740
  buffer.updateSteps();
41587
41741
  }
41588
- if (isVertexChanged || isCornerChanged) {
41742
+ if (isNotInited || isVertexChanged || isCornerChanged) {
41589
41743
  buffer.updateClippings();
41590
41744
  }
41591
- if (isVertexChanged || isTextureChanged) {
41745
+ if (isNotInited || isVertexChanged || isTextureChanged) {
41592
41746
  buffer.updateUvs();
41593
41747
  }
41594
41748
  var pointCount = this.pointCount;
@@ -41607,17 +41761,17 @@ var BuilderLineOfRectangleRoundeds = /** @class */ (function (_super) {
41607
41761
  buildRectangleRoundedVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, RECTANGLE_ROUNDED_WORLD_SIZE);
41608
41762
  copyVertex(vertices, internalTransform, voffset, RECTANGLE_ROUNDED_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
41609
41763
  // Steps
41610
- if (isVertexChanged || isTransformChanged) {
41764
+ if (isNotInited || isVertexChanged || isTransformChanged) {
41611
41765
  buildRectangleRoundedStep(steps, voffset, strokeWidth, strokeSide, strokeStyle, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
41612
41766
  copyStep(steps, voffset, RECTANGLE_ROUNDED_VERTEX_COUNT, pointCount);
41613
41767
  }
41614
41768
  // Clippings
41615
- if (isVertexChanged || isCornerChanged) {
41769
+ if (isNotInited || isVertexChanged || isCornerChanged) {
41616
41770
  buildRectangleRoundedClipping(clippings, voffset, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
41617
41771
  copyClipping(clippings, voffset, RECTANGLE_ROUNDED_VERTEX_COUNT, pointCount);
41618
41772
  }
41619
41773
  // UVs
41620
- if (isVertexChanged || isTextureChanged) {
41774
+ if (isNotInited || isVertexChanged || isTextureChanged) {
41621
41775
  buildRectangleRoundedUv(uvs, voffset, textureUvs, RECTANGLE_ROUNDED_WORLD_SIZE);
41622
41776
  copyUvs(uvs, voffset, RECTANGLE_ROUNDED_VERTEX_COUNT, pointCount);
41623
41777
  }
@@ -41633,15 +41787,15 @@ var BuilderLineOfRectangleRoundeds = /** @class */ (function (_super) {
41633
41787
  // Vertices
41634
41788
  buildRectangleRoundedVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, RECTANGLE_ROUNDED_WORLD_SIZE);
41635
41789
  // Steps
41636
- if (isVertexChanged || isTransformChanged) {
41790
+ if (isNotInited || isVertexChanged || isTransformChanged) {
41637
41791
  buildRectangleRoundedStep(steps, iv, strokeWidth, strokeSide, strokeStyle, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
41638
41792
  }
41639
41793
  // Clippings
41640
- if (isVertexChanged || isCornerChanged) {
41794
+ if (isNotInited || isVertexChanged || isCornerChanged) {
41641
41795
  buildRectangleRoundedClipping(clippings, iv, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
41642
41796
  }
41643
41797
  // UVs
41644
- if (isVertexChanged || isTextureChanged) {
41798
+ if (isNotInited || isVertexChanged || isTextureChanged) {
41645
41799
  buildRectangleRoundedUv(uvs, iv, textureUvs, RECTANGLE_ROUNDED_WORLD_SIZE);
41646
41800
  }
41647
41801
  }
@@ -41750,6 +41904,7 @@ var BuilderLineOfRectangles = /** @class */ (function (_super) {
41750
41904
  buildRectangleIndex(indices, voffset, ioffset);
41751
41905
  copyIndex(indices, RECTANGLE_VERTEX_COUNT, ioffset, RECTANGLE_INDEX_COUNT, pointCountReserved);
41752
41906
  }
41907
+ this.inited |= BuilderFlag.INDEX;
41753
41908
  };
41754
41909
  BuilderLineOfRectangles.prototype.update = function (buffer, shape) {
41755
41910
  var points = shape.points;
@@ -41786,7 +41941,9 @@ var BuilderLineOfRectangles = /** @class */ (function (_super) {
41786
41941
  var textureTransformId = toTextureTransformId(texture);
41787
41942
  var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
41788
41943
  var isVertexChanged = isPointChanged || isPointSizeChanged || isSizeChanged || isStrokeChanged;
41789
- if (isVertexChanged || isTransformChanged || isTextureChanged) {
41944
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
41945
+ if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
41946
+ this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
41790
41947
  this.pointId = pointId;
41791
41948
  var formatted = points.formatted;
41792
41949
  this.pointCount = formatted.length;
@@ -41801,13 +41958,13 @@ var BuilderLineOfRectangles = /** @class */ (function (_super) {
41801
41958
  this.textureTransformId = textureTransformId;
41802
41959
  // Buffer
41803
41960
  buffer.updateVertices();
41804
- if (isVertexChanged || isTransformChanged) {
41961
+ if (isNotInited || isVertexChanged || isTransformChanged) {
41805
41962
  buffer.updateSteps();
41806
41963
  }
41807
- if (isVertexChanged) {
41964
+ if (isNotInited || isVertexChanged) {
41808
41965
  buffer.updateClippings();
41809
41966
  }
41810
- if (isVertexChanged || isTextureChanged) {
41967
+ if (isNotInited || isVertexChanged || isTextureChanged) {
41811
41968
  buffer.updateUvs();
41812
41969
  }
41813
41970
  var pointCount = this.pointCount;
@@ -41826,17 +41983,17 @@ var BuilderLineOfRectangles = /** @class */ (function (_super) {
41826
41983
  buildRectangleVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_WORLD_SIZE);
41827
41984
  copyVertex(vertices, internalTransform, voffset, RECTANGLE_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
41828
41985
  // Steps
41829
- if (isVertexChanged || isTransformChanged) {
41986
+ if (isNotInited || isVertexChanged || isTransformChanged) {
41830
41987
  buildRectangleStep(voffset, steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
41831
41988
  copyStep(steps, voffset, RECTANGLE_VERTEX_COUNT, pointCount);
41832
41989
  }
41833
41990
  // Clippings
41834
- if (isVertexChanged) {
41991
+ if (isNotInited || isVertexChanged) {
41835
41992
  buildRectangleClipping(clippings, voffset, RECTANGLE_WORLD_SIZE);
41836
41993
  copyClipping(clippings, voffset, RECTANGLE_VERTEX_COUNT, pointCount);
41837
41994
  }
41838
41995
  // UVs
41839
- if (isVertexChanged || isTextureChanged) {
41996
+ if (isNotInited || isVertexChanged || isTextureChanged) {
41840
41997
  buildRectangleUv(uvs, voffset, textureUvs, RECTANGLE_WORLD_SIZE);
41841
41998
  copyUvs(uvs, voffset, RECTANGLE_VERTEX_COUNT, pointCount);
41842
41999
  }
@@ -41852,15 +42009,15 @@ var BuilderLineOfRectangles = /** @class */ (function (_super) {
41852
42009
  // Vertices
41853
42010
  buildRectangleVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_WORLD_SIZE);
41854
42011
  // Steps
41855
- if (isVertexChanged || isTransformChanged) {
42012
+ if (isNotInited || isVertexChanged || isTransformChanged) {
41856
42013
  buildRectangleStep(iv, steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
41857
42014
  }
41858
42015
  // Clippings
41859
- if (isVertexChanged) {
42016
+ if (isNotInited || isVertexChanged) {
41860
42017
  buildRectangleClipping(clippings, iv, RECTANGLE_WORLD_SIZE);
41861
42018
  }
41862
42019
  // UVs
41863
- if (isVertexChanged || isTextureChanged) {
42020
+ if (isNotInited || isVertexChanged || isTextureChanged) {
41864
42021
  buildRectangleUv(uvs, iv, textureUvs, RECTANGLE_WORLD_SIZE);
41865
42022
  }
41866
42023
  }
@@ -42364,8 +42521,8 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
42364
42521
  __extends(BuilderLineOfTriangleRoundeds, _super);
42365
42522
  function BuilderLineOfTriangleRoundeds(vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) {
42366
42523
  var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) || this;
42367
- _this.radius = NaN;
42368
- _this.corner = NaN;
42524
+ _this.radius = 0;
42525
+ _this.corner = 0;
42369
42526
  return _this;
42370
42527
  }
42371
42528
  BuilderLineOfTriangleRoundeds.prototype.init = function (buffer) {
@@ -42377,6 +42534,7 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
42377
42534
  buildTriangleRoundedIndex(buffer.indices, voffset, ioffset);
42378
42535
  copyIndex(buffer.indices, TRIANGLE_ROUNDED_VERTEX_COUNT, ioffset, TRIANGLE_ROUNDED_INDEX_COUNT, pointCountReserved);
42379
42536
  }
42537
+ this.inited |= BuilderFlag.INDEX;
42380
42538
  };
42381
42539
  BuilderLineOfTriangleRoundeds.prototype.update = function (buffer, shape) {
42382
42540
  var points = shape.points;
@@ -42419,7 +42577,13 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
42419
42577
  isSizeChanged ||
42420
42578
  isRadiusChanged ||
42421
42579
  isStrokeChanged;
42422
- if (isVertexChanged || isTransformChanged || isCornerChanged || isTextureChanged) {
42580
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
42581
+ if (isNotInited ||
42582
+ isVertexChanged ||
42583
+ isTransformChanged ||
42584
+ isCornerChanged ||
42585
+ isTextureChanged) {
42586
+ this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
42423
42587
  this.pointId = pointId;
42424
42588
  var formatted = points.formatted;
42425
42589
  this.pointCount = formatted.length;
@@ -42437,13 +42601,13 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
42437
42601
  this.textureTransformId = textureTransformId;
42438
42602
  // Buffer
42439
42603
  buffer.updateVertices();
42440
- if (isVertexChanged || isCornerChanged) {
42604
+ if (isNotInited || isVertexChanged || isCornerChanged) {
42441
42605
  buffer.updateClippings();
42442
42606
  }
42443
- if (isVertexChanged || isTransformChanged || isCornerChanged) {
42607
+ if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
42444
42608
  buffer.updateSteps();
42445
42609
  }
42446
- if (isVertexChanged || isTextureChanged) {
42610
+ if (isNotInited || isVertexChanged || isTextureChanged) {
42447
42611
  buffer.updateUvs();
42448
42612
  }
42449
42613
  var pointCount = this.pointCount;
@@ -42462,17 +42626,17 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
42462
42626
  buildTriangleRoundedVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, TRIANGLE_ROUNDED_WORLD_SIZE);
42463
42627
  copyVertex(vertices, internalTransform, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
42464
42628
  // Clippings
42465
- if (isVertexChanged || isCornerChanged) {
42629
+ if (isNotInited || isVertexChanged || isCornerChanged) {
42466
42630
  buildTriangleRoundedClipping(clippings, voffset, corner, radius);
42467
42631
  copyClipping(clippings, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount);
42468
42632
  }
42469
42633
  // Steps
42470
- if (isVertexChanged || isTransformChanged || isCornerChanged) {
42634
+ if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
42471
42635
  buildTriangleRoundedStep(steps, clippings, voffset, strokeWidth, strokeStyle, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
42472
42636
  copyStep(steps, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount);
42473
42637
  }
42474
42638
  // UVs
42475
- if (isVertexChanged || isTextureChanged) {
42639
+ if (isNotInited || isVertexChanged || isTextureChanged) {
42476
42640
  buildTriangleRoundedUv(uvs, voffset, textureUvs, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
42477
42641
  copyUvs(uvs, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount);
42478
42642
  }
@@ -42488,15 +42652,15 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
42488
42652
  // Vertices
42489
42653
  buildTriangleRoundedVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, TRIANGLE_ROUNDED_WORLD_SIZE);
42490
42654
  // Clippings
42491
- if (isVertexChanged || isCornerChanged) {
42655
+ if (isNotInited || isVertexChanged || isCornerChanged) {
42492
42656
  buildTriangleRoundedClipping(clippings, iv, corner, radius);
42493
42657
  }
42494
42658
  // Steps
42495
- if (isVertexChanged || isTransformChanged || isCornerChanged) {
42659
+ if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
42496
42660
  buildTriangleRoundedStep(steps, clippings, iv, strokeWidth, strokeStyle, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
42497
42661
  }
42498
42662
  // UVs
42499
- if (isVertexChanged || isTextureChanged) {
42663
+ if (isNotInited || isVertexChanged || isTextureChanged) {
42500
42664
  buildTriangleRoundedUv(uvs, iv, textureUvs, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
42501
42665
  }
42502
42666
  }
@@ -42751,6 +42915,7 @@ var BuilderLineOfTriangles = /** @class */ (function (_super) {
42751
42915
  buildTriangleIndex(indices, voffset, ioffset);
42752
42916
  copyIndex(indices, TRIANGLE_VERTEX_COUNT, ioffset, TRIANGLE_INDEX_COUNT, pointCountReserved);
42753
42917
  }
42918
+ this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
42754
42919
  };
42755
42920
  BuilderLineOfTriangles.prototype.update = function (buffer, shape) {
42756
42921
  var points = shape.points;
@@ -42785,7 +42950,9 @@ var BuilderLineOfTriangles = /** @class */ (function (_super) {
42785
42950
  var textureTransformId = toTextureTransformId(texture);
42786
42951
  var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
42787
42952
  var isVertexChanged = isPointChanged || isPointSizeChanged || isSizeChanged || isStrokeChanged;
42788
- if (isVertexChanged || isTransformChanged || isTextureChanged) {
42953
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_UV);
42954
+ if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
42955
+ this.inited |= BuilderFlag.VERTEX_STEP_AND_UV;
42789
42956
  this.pointId = pointId;
42790
42957
  var formatted = points.formatted;
42791
42958
  this.pointCount = formatted.length;
@@ -42797,12 +42964,14 @@ var BuilderLineOfTriangles = /** @class */ (function (_super) {
42797
42964
  this.strokeAlign = strokeAlign;
42798
42965
  this.strokeWidth = strokeWidth;
42799
42966
  this.strokeStyle = strokeStyle;
42967
+ this.texture = texture;
42968
+ this.textureTransformId = textureTransformId;
42800
42969
  // Buffer
42801
42970
  buffer.updateVertices();
42802
- if (isVertexChanged || isTransformChanged) {
42971
+ if (isNotInited || isVertexChanged || isTransformChanged) {
42803
42972
  buffer.updateSteps();
42804
42973
  }
42805
- if (isVertexChanged || isTextureChanged) {
42974
+ if (isNotInited || isVertexChanged || isTextureChanged) {
42806
42975
  buffer.updateUvs();
42807
42976
  }
42808
42977
  var pointCount = this.pointCount;
@@ -42819,11 +42988,11 @@ var BuilderLineOfTriangles = /** @class */ (function (_super) {
42819
42988
  var pointSizeY = pointSize.getY(0);
42820
42989
  buildTriangleVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, TRIANGLE_WORLD_SIZE);
42821
42990
  copyVertex(vertices, internalTransform, voffset, TRIANGLE_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
42822
- if (isVertexChanged || isTransformChanged) {
42991
+ if (isNotInited || isVertexChanged || isTransformChanged) {
42823
42992
  buildTriangleStep(steps, clippings, voffset, TRIANGLE_VERTEX_COUNT, strokeWidth, strokeStyle, TRIANGLE_WORLD_SIZE);
42824
42993
  copyStep(steps, voffset, TRIANGLE_VERTEX_COUNT, pointCount);
42825
42994
  }
42826
- if (isVertexChanged || isTextureChanged) {
42995
+ if (isNotInited || isVertexChanged || isTextureChanged) {
42827
42996
  buildTriangleUv(uvs, textureUvs, voffset, TRIANGLE_WORLD_SIZE);
42828
42997
  copyUvs(uvs, voffset, TRIANGLE_VERTEX_COUNT, pointCount);
42829
42998
  }
@@ -42837,10 +43006,10 @@ var BuilderLineOfTriangles = /** @class */ (function (_super) {
42837
43006
  var pointSizeY = pointSize.getY(i);
42838
43007
  var iv = voffset + i * TRIANGLE_VERTEX_COUNT;
42839
43008
  buildTriangleVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, TRIANGLE_WORLD_SIZE);
42840
- if (isVertexChanged || isTransformChanged) {
43009
+ if (isNotInited || isVertexChanged || isTransformChanged) {
42841
43010
  buildTriangleStep(steps, clippings, iv, TRIANGLE_VERTEX_COUNT, strokeWidth, strokeStyle, TRIANGLE_WORLD_SIZE);
42842
43011
  }
42843
- if (isVertexChanged || isTextureChanged) {
43012
+ if (isNotInited || isVertexChanged || isTextureChanged) {
42844
43013
  buildTriangleUv(uvs, textureUvs, iv, TRIANGLE_WORLD_SIZE);
42845
43014
  }
42846
43015
  }
@@ -43185,6 +43354,7 @@ var BuilderSemicircle = /** @class */ (function (_super) {
43185
43354
  var voffset = this.vertexOffset;
43186
43355
  buildSemicircleClipping(buffer.clippings, voffset);
43187
43356
  buildSemicircleIndex(buffer.indices, voffset, this.indexOffset);
43357
+ this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
43188
43358
  };
43189
43359
  BuilderSemicircle.prototype.update = function (buffer, shape) {
43190
43360
  this.updateVertexAndStep(buffer, shape);
@@ -43206,7 +43376,9 @@ var BuilderSemicircle = /** @class */ (function (_super) {
43206
43376
  var isStrokeChanged = this.strokeAlign !== strokeAlign ||
43207
43377
  this.strokeWidth !== strokeWidth ||
43208
43378
  this.strokeStyle !== strokeStyle;
43209
- if (isSizeChanged || isTransformChanged || isStrokeChanged) {
43379
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
43380
+ if (isNotInited || isSizeChanged || isTransformChanged || isStrokeChanged) {
43381
+ this.inited |= BuilderFlag.VERTEX_AND_STEP;
43210
43382
  this.sizeX = sizeX;
43211
43383
  this.sizeY = sizeY;
43212
43384
  this.transformLocalId = transformLocalId;
@@ -43223,7 +43395,11 @@ var BuilderSemicircle = /** @class */ (function (_super) {
43223
43395
  BuilderSemicircle.prototype.updateUv = function (buffer, shape) {
43224
43396
  var texture = toTexture(shape);
43225
43397
  var textureTransformId = toTextureTransformId(texture);
43226
- if (texture !== this.texture || textureTransformId !== this.textureTransformId) {
43398
+ var isNotInited = !(this.inited & BuilderFlag.UV);
43399
+ if (isNotInited ||
43400
+ texture !== this.texture ||
43401
+ textureTransformId !== this.textureTransformId) {
43402
+ this.inited |= BuilderFlag.UV;
43227
43403
  this.texture = texture;
43228
43404
  this.textureTransformId = textureTransformId;
43229
43405
  buffer.updateUvs();
@@ -43240,8 +43416,8 @@ var BuilderSemicircle = /** @class */ (function (_super) {
43240
43416
  */
43241
43417
  var createSemicircleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
43242
43418
  var tcount = toTextBufferCount(shape);
43243
- var tvcount = tcount * TEXT_VERTEX_COUNT;
43244
- var ticount = tcount * TEXT_INDEX_COUNT;
43419
+ var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
43420
+ var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
43245
43421
  var vcount = SEMICIRCLE_VERTEX_COUNT + tvcount;
43246
43422
  var icount = SEMICIRCLE_INDEX_COUNT + ticount;
43247
43423
  if (buffer.check(voffset, ioffset, vcount, icount)) {
@@ -43324,6 +43500,7 @@ var BuilderTriangle = /** @class */ (function (_super) {
43324
43500
  buffer.updateIndices();
43325
43501
  buildTriangleClipping(buffer.clippings, this.vertexOffset);
43326
43502
  buildTriangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
43503
+ this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
43327
43504
  };
43328
43505
  BuilderTriangle.prototype.update = function (buffer, shape) {
43329
43506
  this.updateVertexStepAndUv(buffer, shape);
@@ -43348,7 +43525,9 @@ var BuilderTriangle = /** @class */ (function (_super) {
43348
43525
  var textureTransformId = toTextureTransformId(texture);
43349
43526
  var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
43350
43527
  var isVertexChanged = isSizeChanged || isStrokeChanged;
43351
- if (isVertexChanged || isTransformChanged || isTextureChanged) {
43528
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_UV);
43529
+ if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
43530
+ this.inited |= BuilderFlag.VERTEX_STEP_AND_UV;
43352
43531
  this.sizeX = sizeX;
43353
43532
  this.sizeY = sizeY;
43354
43533
  this.transformLocalId = transformLocalId;
@@ -43360,11 +43539,11 @@ var BuilderTriangle = /** @class */ (function (_super) {
43360
43539
  var voffset = this.vertexOffset;
43361
43540
  buffer.updateVertices();
43362
43541
  buildTriangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, TRIANGLE_WORLD_SIZE);
43363
- if (isVertexChanged || isTransformChanged) {
43542
+ if (isNotInited || isVertexChanged || isTransformChanged) {
43364
43543
  buffer.updateSteps();
43365
43544
  buildTriangleStep(buffer.steps, buffer.clippings, voffset, TRIANGLE_VERTEX_COUNT, strokeWidth, strokeStyle, TRIANGLE_WORLD_SIZE);
43366
43545
  }
43367
- if (isVertexChanged || isTextureChanged) {
43546
+ if (isNotInited || isVertexChanged || isTextureChanged) {
43368
43547
  buffer.updateUvs();
43369
43548
  buildTriangleUv(buffer.uvs, toTextureUvs(texture), voffset, TRIANGLE_WORLD_SIZE);
43370
43549
  }
@@ -43379,8 +43558,8 @@ var BuilderTriangle = /** @class */ (function (_super) {
43379
43558
  */
43380
43559
  var createTriangleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
43381
43560
  var tcount = toTextBufferCount(shape);
43382
- var tvcount = tcount * TEXT_VERTEX_COUNT;
43383
- var ticount = tcount * TEXT_INDEX_COUNT;
43561
+ var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
43562
+ var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
43384
43563
  var vcount = TRIANGLE_VERTEX_COUNT + tvcount;
43385
43564
  var icount = TRIANGLE_INDEX_COUNT + ticount;
43386
43565
  if (buffer.check(voffset, ioffset, vcount, icount)) {
@@ -43417,13 +43596,14 @@ var BuilderTriangleRounded = /** @class */ (function (_super) {
43417
43596
  __extends(BuilderTriangleRounded, _super);
43418
43597
  function BuilderTriangleRounded(vertexOffset, indexOffset, vertexCount, indexCount) {
43419
43598
  var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount) || this;
43420
- _this.radius = NaN;
43421
- _this.corner = NaN;
43599
+ _this.radius = 0;
43600
+ _this.corner = 0;
43422
43601
  return _this;
43423
43602
  }
43424
43603
  BuilderTriangleRounded.prototype.init = function (buffer) {
43425
43604
  buffer.updateIndices();
43426
43605
  buildTriangleRoundedIndex(buffer.indices, this.vertexOffset, this.indexOffset);
43606
+ this.inited |= BuilderFlag.INDEX;
43427
43607
  };
43428
43608
  BuilderTriangleRounded.prototype.update = function (buffer, shape) {
43429
43609
  this.updateVertexClippingStepAndUv(buffer, shape);
@@ -43452,7 +43632,13 @@ var BuilderTriangleRounded = /** @class */ (function (_super) {
43452
43632
  var textureTransformId = toTextureTransformId(texture);
43453
43633
  var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
43454
43634
  var isVertexChanged = isSizeChanged || isRadiusChanged || isStrokeChanged;
43455
- if (isVertexChanged || isTransformChanged || isCornerChanged || isTextureChanged) {
43635
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
43636
+ if (isNotInited ||
43637
+ isVertexChanged ||
43638
+ isTransformChanged ||
43639
+ isCornerChanged ||
43640
+ isTextureChanged) {
43641
+ this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
43456
43642
  this.sizeX = sizeX;
43457
43643
  this.sizeY = sizeY;
43458
43644
  this.radius = radius;
@@ -43466,15 +43652,15 @@ var BuilderTriangleRounded = /** @class */ (function (_super) {
43466
43652
  var voffset = this.vertexOffset;
43467
43653
  buffer.updateVertices();
43468
43654
  buildTriangleRoundedVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, radius, shape.transform.internalTransform, TRIANGLE_ROUNDED_WORLD_SIZE);
43469
- if (isRadiusChanged || isCornerChanged) {
43655
+ if (isNotInited || isRadiusChanged || isCornerChanged) {
43470
43656
  buffer.updateClippings();
43471
43657
  buildTriangleRoundedClipping(buffer.clippings, voffset, corner, radius);
43472
43658
  }
43473
- if (isVertexChanged || isTransformChanged || isCornerChanged) {
43659
+ if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
43474
43660
  buffer.updateSteps();
43475
43661
  buildTriangleRoundedStep(buffer.steps, buffer.clippings, voffset, strokeWidth, strokeStyle, shape.radius, TRIANGLE_ROUNDED_WORLD_SIZE);
43476
43662
  }
43477
- if (isVertexChanged || isTextureChanged) {
43663
+ if (isNotInited || isVertexChanged || isTextureChanged) {
43478
43664
  buffer.updateUvs();
43479
43665
  buildTriangleRoundedUv(buffer.uvs, voffset, toTextureUvs(texture), radius, TRIANGLE_ROUNDED_WORLD_SIZE);
43480
43666
  }
@@ -43489,8 +43675,8 @@ var BuilderTriangleRounded = /** @class */ (function (_super) {
43489
43675
  */
43490
43676
  var createTriangleRoundedUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
43491
43677
  var tcount = toTextBufferCount(shape);
43492
- var tvcount = tcount * TEXT_VERTEX_COUNT;
43493
- var ticount = tcount * TEXT_INDEX_COUNT;
43678
+ var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
43679
+ var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
43494
43680
  var vcount = TRIANGLE_ROUNDED_VERTEX_COUNT + tvcount;
43495
43681
  var icount = TRIANGLE_ROUNDED_INDEX_COUNT + ticount;
43496
43682
  if (buffer.check(voffset, ioffset, vcount, icount)) {
@@ -47223,7 +47409,7 @@ var DThemeWhiteButtonBase = /** @class */ (function (_super) {
47223
47409
  return this.getOutlineOffsetNonActive(state);
47224
47410
  };
47225
47411
  DThemeWhiteButtonBase.prototype.getOutlineOffsetActive = function (state) {
47226
- return -1.5;
47412
+ return -1;
47227
47413
  };
47228
47414
  DThemeWhiteButtonBase.prototype.getOutlineOffsetNonActive = function (state) {
47229
47415
  return _super.prototype.getOutlineOffset.call(this, state);
@@ -49537,7 +49723,7 @@ var DThemeWhiteInput = /** @class */ (function (_super) {
49537
49723
  return true;
49538
49724
  };
49539
49725
  DThemeWhiteInput.prototype.getElementStyleBorder = function (state) {
49540
- return "border: 1px solid transparent; box-sizing: border-box;";
49726
+ return "border: 1.5px solid transparent; box-sizing: border-box;";
49541
49727
  };
49542
49728
  return DThemeWhiteInput;
49543
49729
  }(DThemeWhiteHtmlElement));
@@ -55025,9 +55211,6 @@ var DThemeWhiteInputBooleanButtonOff = /** @class */ (function (_super) {
55025
55211
  function DThemeWhiteInputBooleanButtonOff() {
55026
55212
  return _super !== null && _super.apply(this, arguments) || this;
55027
55213
  }
55028
- DThemeWhiteInputBooleanButtonOff.prototype.getBorderMask = function () {
55029
- return DBorderMask.RIGHT;
55030
- };
55031
55214
  DThemeWhiteInputBooleanButtonOff.prototype.isToggle = function () {
55032
55215
  return true;
55033
55216
  };
@@ -55058,9 +55241,6 @@ var DThemeWhiteInputBooleanButtonOn = /** @class */ (function (_super) {
55058
55241
  function DThemeWhiteInputBooleanButtonOn() {
55059
55242
  return _super !== null && _super.apply(this, arguments) || this;
55060
55243
  }
55061
- DThemeWhiteInputBooleanButtonOn.prototype.getBorderMask = function () {
55062
- return DBorderMask.LEFT;
55063
- };
55064
55244
  DThemeWhiteInputBooleanButtonOn.prototype.isToggle = function () {
55065
55245
  return true;
55066
55246
  };
@@ -58214,7 +58394,7 @@ var DThemeDarkButtonBase = /** @class */ (function (_super) {
58214
58394
  return this.getOutlineOffsetNonActive(state);
58215
58395
  };
58216
58396
  DThemeDarkButtonBase.prototype.getOutlineOffsetActive = function (state) {
58217
- return -1.5;
58397
+ return -1;
58218
58398
  };
58219
58399
  DThemeDarkButtonBase.prototype.getOutlineOffsetNonActive = function (state) {
58220
58400
  return _super.prototype.getOutlineOffset.call(this, state);
@@ -60391,7 +60571,7 @@ var DThemeDarkInput = /** @class */ (function (_super) {
60391
60571
  return true;
60392
60572
  };
60393
60573
  DThemeDarkInput.prototype.getElementStyleBorder = function (state) {
60394
- return "border: 1px solid transparent; box-sizing: border-box;";
60574
+ return "border: 1.5px solid transparent; box-sizing: border-box;";
60395
60575
  };
60396
60576
  return DThemeDarkInput;
60397
60577
  }(DThemeDarkHtmlElement));
@@ -65411,9 +65591,6 @@ var DThemeDarkInputBooleanButtonOff = /** @class */ (function (_super) {
65411
65591
  function DThemeDarkInputBooleanButtonOff() {
65412
65592
  return _super !== null && _super.apply(this, arguments) || this;
65413
65593
  }
65414
- DThemeDarkInputBooleanButtonOff.prototype.getBorderMask = function () {
65415
- return DBorderMask.RIGHT;
65416
- };
65417
65594
  DThemeDarkInputBooleanButtonOff.prototype.isToggle = function () {
65418
65595
  return true;
65419
65596
  };
@@ -65444,9 +65621,6 @@ var DThemeDarkInputBooleanButtonOn = /** @class */ (function (_super) {
65444
65621
  function DThemeDarkInputBooleanButtonOn() {
65445
65622
  return _super !== null && _super.apply(this, arguments) || this;
65446
65623
  }
65447
- DThemeDarkInputBooleanButtonOn.prototype.getBorderMask = function () {
65448
- return DBorderMask.LEFT;
65449
- };
65450
65624
  DThemeDarkInputBooleanButtonOn.prototype.isToggle = function () {
65451
65625
  return true;
65452
65626
  };
@@ -84852,7 +85026,7 @@ var DDiagramCanvas = /** @class */ (function (_super) {
84852
85026
  var runtime = actionable.runtime;
84853
85027
  if (runtime) {
84854
85028
  var runtimeEffect = runtime.effect;
84855
- if (time < runtimeEffect) {
85029
+ if (0 <= runtimeEffect && time < runtimeEffect) {
84856
85030
  effect = effect < 0 ? runtimeEffect : Math.min(effect, runtimeEffect);
84857
85031
  }
84858
85032
  }
@@ -84873,7 +85047,7 @@ var DDiagramCanvas = /** @class */ (function (_super) {
84873
85047
  var runtime = actionable.runtime;
84874
85048
  if (runtime) {
84875
85049
  var runtimeEffect = runtime.effect;
84876
- if (time < runtimeEffect) {
85050
+ if (0 <= runtimeEffect && time < runtimeEffect) {
84877
85051
  effect = effect < 0 ? runtimeEffect : Math.min(effect, runtimeEffect);
84878
85052
  }
84879
85053
  }
@@ -91747,9 +91921,9 @@ var DTableDataListSelection = /** @class */ (function (_super) {
91747
91921
  get: function () {
91748
91922
  var indices = this._indices;
91749
91923
  if (0 < indices.size) {
91750
- var result_1 = NaN;
91924
+ var result_1 = -1;
91751
91925
  indices.forEach(function (index) {
91752
- if (result_1 !== result_1) {
91926
+ if (result_1 < 0) {
91753
91927
  result_1 = index;
91754
91928
  }
91755
91929
  });
@@ -96502,6 +96676,7 @@ exports.BAR_VERTEX_COUNT = BAR_VERTEX_COUNT;
96502
96676
  exports.BuilderBar = BuilderBar;
96503
96677
  exports.BuilderBase = BuilderBase;
96504
96678
  exports.BuilderCircle = BuilderCircle;
96679
+ exports.BuilderFlag = BuilderFlag;
96505
96680
  exports.BuilderImageSdf = BuilderImageSdf;
96506
96681
  exports.BuilderLabel = BuilderLabel;
96507
96682
  exports.BuilderLine = BuilderLine;
@@ -97890,7 +98065,9 @@ exports.SEMICIRCLE_VERTEX_COUNT = SEMICIRCLE_VERTEX_COUNT;
97890
98065
  exports.SEMICIRCLE_WORLD_SIZE = SEMICIRCLE_WORLD_SIZE;
97891
98066
  exports.TEXT_FMIN = TEXT_FMIN;
97892
98067
  exports.TEXT_INDEX_COUNT = TEXT_INDEX_COUNT;
98068
+ exports.TEXT_INDEX_COUNT_SHIFT = TEXT_INDEX_COUNT_SHIFT;
97893
98069
  exports.TEXT_VERTEX_COUNT = TEXT_VERTEX_COUNT;
98070
+ exports.TEXT_VERTEX_COUNT_SHIFT = TEXT_VERTEX_COUNT_SHIFT;
97894
98071
  exports.TRIANGLE_INDEX_COUNT = TRIANGLE_INDEX_COUNT;
97895
98072
  exports.TRIANGLE_ROUNDED_INDEX_COUNT = TRIANGLE_ROUNDED_INDEX_COUNT;
97896
98073
  exports.TRIANGLE_ROUNDED_VERTEX_COUNT = TRIANGLE_ROUNDED_VERTEX_COUNT;