@wcardinal/wcardinal-ui 0.392.0 → 0.394.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.
- package/dist/types/wcardinal/ui/shape/e-shape-uploaded.d.ts +5 -6
- package/dist/types/wcardinal/ui/shape/variant/build-text.d.ts +2 -0
- package/dist/types/wcardinal/ui/shape/variant/builder-bar.d.ts +5 -5
- package/dist/types/wcardinal/ui/shape/variant/builder-base.d.ts +6 -6
- package/dist/types/wcardinal/ui/shape/variant/builder-circle.d.ts +5 -5
- package/dist/types/wcardinal/ui/shape/variant/builder-image-sdf.d.ts +5 -5
- package/dist/types/wcardinal/ui/shape/variant/builder-line-of-any.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/variant/builder-line-of-circles.d.ts +5 -5
- package/dist/types/wcardinal/ui/shape/variant/builder-line-of-rectangle-roundeds.d.ts +4 -4
- package/dist/types/wcardinal/ui/shape/variant/builder-line-of-rectangles.d.ts +4 -4
- package/dist/types/wcardinal/ui/shape/variant/builder-line-of-triangle-roundeds.d.ts +4 -4
- package/dist/types/wcardinal/ui/shape/variant/builder-line-of-triangles.d.ts +4 -4
- package/dist/types/wcardinal/ui/shape/variant/builder-line.d.ts +6 -6
- package/dist/types/wcardinal/ui/shape/variant/builder-marker-base.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/variant/builder-marker-circle.d.ts +5 -5
- package/dist/types/wcardinal/ui/shape/variant/builder-marker-rectangle.d.ts +4 -4
- package/dist/types/wcardinal/ui/shape/variant/builder-marker-triangle.d.ts +4 -4
- package/dist/types/wcardinal/ui/shape/variant/builder-rectangle-pivoted.d.ts +4 -4
- package/dist/types/wcardinal/ui/shape/variant/builder-rectangle-rounded.d.ts +4 -4
- package/dist/types/wcardinal/ui/shape/variant/builder-rectangle.d.ts +4 -4
- package/dist/types/wcardinal/ui/shape/variant/builder-semicircle.d.ts +5 -5
- package/dist/types/wcardinal/ui/shape/variant/builder-text.d.ts +8 -8
- package/dist/types/wcardinal/ui/shape/variant/builder-triangle-rounded.d.ts +4 -4
- package/dist/types/wcardinal/ui/shape/variant/builder-triangle.d.ts +4 -4
- package/dist/types/wcardinal/ui/shape/variant/builder.d.ts +35 -3
- package/dist/wcardinal/ui/d-base-background-mesh-geometry.js +1 -1
- package/dist/wcardinal/ui/d-base-background-mesh-geometry.js.map +1 -1
- package/dist/wcardinal/ui/d-base-border-mesh-geometry.js +2 -2
- package/dist/wcardinal/ui/d-base-border-mesh-geometry.js.map +1 -1
- package/dist/wcardinal/ui/d-base-border-snippet.js +1 -1
- package/dist/wcardinal/ui/d-base-border-snippet.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-canvas.js +2 -2
- package/dist/wcardinal/ui/d-diagram-canvas.js.map +1 -1
- package/dist/wcardinal/ui/d-table-data-list-selection.js +2 -2
- package/dist/wcardinal/ui/d-table-data-list-selection.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-container.js +2 -2
- package/dist/wcardinal/ui/shape/e-shape-container.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-runtime-impl.js +4 -3
- package/dist/wcardinal/ui/shape/e-shape-runtime-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-text.js +5 -2
- package/dist/wcardinal/ui/shape/variant/build-text.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-bar.js +14 -5
- package/dist/wcardinal/ui/shape/variant/builder-bar.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-base.js +23 -17
- package/dist/wcardinal/ui/shape/variant/builder-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-circle.js +10 -2
- package/dist/wcardinal/ui/shape/variant/builder-circle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-image-sdf.js +14 -2
- package/dist/wcardinal/ui/shape/variant/builder-image-sdf.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-any.js +4 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-any.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-circles.js +11 -2
- package/dist/wcardinal/ui/shape/variant/builder-line-of-circles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangle-roundeds.js +20 -12
- package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangle-roundeds.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangles.js +14 -10
- package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-triangle-roundeds.js +20 -12
- package/dist/wcardinal/ui/shape/variant/builder-line-of-triangle-roundeds.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-triangles.js +13 -7
- package/dist/wcardinal/ui/shape/variant/builder-line-of-triangles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line.js +17 -7
- package/dist/wcardinal/ui/shape/variant/builder-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-marker-base.js +4 -1
- package/dist/wcardinal/ui/shape/variant/builder-marker-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-marker-circle.js +14 -2
- package/dist/wcardinal/ui/shape/variant/builder-marker-circle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-marker-rectangle.js +12 -4
- package/dist/wcardinal/ui/shape/variant/builder-marker-rectangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-marker-triangle.js +11 -3
- package/dist/wcardinal/ui/shape/variant/builder-marker-triangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-rectangle-pivoted.js +8 -4
- package/dist/wcardinal/ui/shape/variant/builder-rectangle-pivoted.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-rectangle-rounded.js +14 -6
- package/dist/wcardinal/ui/shape/variant/builder-rectangle-rounded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-rectangle.js +8 -4
- package/dist/wcardinal/ui/shape/variant/builder-rectangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-semicircle.js +10 -2
- package/dist/wcardinal/ui/shape/variant/builder-semicircle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-text.js +41 -29
- package/dist/wcardinal/ui/shape/variant/builder-text.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-triangle-rounded.js +14 -6
- package/dist/wcardinal/ui/shape/variant/builder-triangle-rounded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-triangle.js +7 -3
- package/dist/wcardinal/ui/shape/variant/builder-triangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder.js +16 -1
- package/dist/wcardinal/ui/shape/variant/builder.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-bar-uploaded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/create-bar-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-circle-uploaded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/create-circle-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-group-uploaded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/create-group-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-image-sdf-uploaded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/create-image-sdf-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-label-uploaded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/create-label-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-line-of-any-uploaded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/create-line-of-any-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-line-uploaded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/create-line-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-rectangle-pivoted-uploaded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/create-rectangle-pivoted-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-rectangle-rounded-uploaded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/create-rectangle-rounded-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-rectangle-uploaded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/create-rectangle-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-semicircle-uploaded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/create-semicircle-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-triangle-rounded-uploaded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/create-triangle-rounded-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-triangle-uploaded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/create-triangle-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js +6 -6
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-base.js +2 -2
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-base.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-base.js +2 -2
- package/dist/wcardinal/ui/theme/white/d-theme-white-base.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +3 -3
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +3 -3
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +3 -3
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.js +3 -3
- package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +3 -3
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +3 -3
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui.cjs.js +379 -213
- package/dist/wcardinal-ui.js +375 -209
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
package/dist/wcardinal-ui.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.394.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
|
-
|
|
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 =
|
|
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.
|
|
1450
|
-
this.
|
|
1494
|
+
this.inited = BuilderFlag.NONE;
|
|
1495
|
+
this.sizeX = 0;
|
|
1496
|
+
this.sizeY = 0;
|
|
1451
1497
|
this.transformLocalId = -1;
|
|
1452
|
-
this.strokeAlign =
|
|
1453
|
-
this.strokeWidth =
|
|
1454
|
-
this.strokeSide =
|
|
1455
|
-
this.strokeStyle =
|
|
1456
|
-
this.colorFill =
|
|
1457
|
-
this.alphaFill =
|
|
1458
|
-
this.colorStroke =
|
|
1459
|
-
this.alphaStroke =
|
|
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 =
|
|
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 =
|
|
1471
|
-
|
|
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 =
|
|
1483
|
-
|
|
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 =
|
|
4711
|
-
_this._boundsInternalTransformId =
|
|
4712
|
-
_this._boundsLocalTransformId =
|
|
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 =
|
|
4728
|
-
this._boundsInternalTransformId =
|
|
4729
|
-
this._boundsLocalTransformId =
|
|
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 =
|
|
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
|
-
|
|
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
|
|
8514
|
-
this.
|
|
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
|
-
|
|
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.
|
|
8547
|
-
this.
|
|
8548
|
-
this.
|
|
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 =
|
|
8587
|
+
this.size = 0;
|
|
8552
8588
|
this.family = "auto";
|
|
8553
8589
|
this.value = "";
|
|
8554
8590
|
this.texture = null;
|
|
8555
|
-
this.textureTransformId =
|
|
8556
|
-
this.color =
|
|
8557
|
-
this.alpha =
|
|
8558
|
-
this.weight =
|
|
8559
|
-
this.style =
|
|
8560
|
-
this.alignHorizontal =
|
|
8561
|
-
this.alignVertical =
|
|
8562
|
-
this.offsetHorizontal =
|
|
8563
|
-
this.offsetVertical =
|
|
8564
|
-
this.outlineWidth =
|
|
8565
|
-
this.outlineColor =
|
|
8566
|
-
this.outlineAlpha =
|
|
8567
|
-
this.spacingHorizontal =
|
|
8568
|
-
this.spacingVertical =
|
|
8569
|
-
this.direction =
|
|
8570
|
-
this.paddingHorizontal =
|
|
8571
|
-
this.paddingVertical =
|
|
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)
|
|
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
|
-
|
|
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
|
|
8673
|
-
this.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
8755
|
-
var ticount = tcount
|
|
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)) {
|
|
@@ -11801,7 +11847,7 @@ var DBaseBackgroundMeshGeometry = /** @class */ (function (_super) {
|
|
|
11801
11847
|
DBaseBackgroundMeshGeometry.prototype.fillVertices = function (vertices, uvs, iv, iuv, n, x, y, r, dr, table) {
|
|
11802
11848
|
var cos = table.cos;
|
|
11803
11849
|
var sin = table.sin;
|
|
11804
|
-
var r1 = r +
|
|
11850
|
+
var r1 = r + dr;
|
|
11805
11851
|
for (var i = 0; i < n; ++i) {
|
|
11806
11852
|
var c = cos[i];
|
|
11807
11853
|
var s = sin[i];
|
|
@@ -12106,8 +12152,8 @@ var DBaseBorderMeshGeometry = /** @class */ (function (_super) {
|
|
|
12106
12152
|
var hw = 0.5 * borderWidth;
|
|
12107
12153
|
var r1 = r - hw;
|
|
12108
12154
|
var r2 = r + hw;
|
|
12109
|
-
var r0 = r1 -
|
|
12110
|
-
var r3 = r2 +
|
|
12155
|
+
var r0 = r1 - dr;
|
|
12156
|
+
var r3 = r2 + dr;
|
|
12111
12157
|
var cos = table.cos;
|
|
12112
12158
|
var sin = table.sin;
|
|
12113
12159
|
if (r0 < 0) {
|
|
@@ -12539,7 +12585,7 @@ var DBaseBorderSnippet = /** @class */ (function () {
|
|
|
12539
12585
|
borderMesh.y = -borderOffset;
|
|
12540
12586
|
borderMesh.width = width + borderOffset * 2;
|
|
12541
12587
|
borderMesh.height = height + borderOffset * 2;
|
|
12542
|
-
borderMesh.cornerRadius = cornerRadius;
|
|
12588
|
+
borderMesh.cornerRadius = Math.max(0, cornerRadius + borderOffset);
|
|
12543
12589
|
borderMesh.cornerMask = cornerMask;
|
|
12544
12590
|
borderMesh.borderWidth = borderWidth;
|
|
12545
12591
|
borderMesh.borderMask = borderMask;
|
|
@@ -21972,9 +22018,9 @@ var EShapeContainer = /** @class */ (function (_super) {
|
|
|
21972
22018
|
_this._atlas = null;
|
|
21973
22019
|
_this._fontAtlases = new DynamicSDFFontAtlases();
|
|
21974
22020
|
_this._pixelScale = 1;
|
|
21975
|
-
_this._pixelScaleId =
|
|
22021
|
+
_this._pixelScaleId = -2; // Since this._shapeScaleId starts from -1.
|
|
21976
22022
|
_this._shapeScale = 1;
|
|
21977
|
-
_this._shapeScaleId =
|
|
22023
|
+
_this._shapeScaleId = -1; // Since PIXI.Transform._worldID starts from zero.
|
|
21978
22024
|
_this._work = new pixi_js.Point();
|
|
21979
22025
|
_this._buffers = [];
|
|
21980
22026
|
return _this;
|
|
@@ -24308,7 +24354,7 @@ var EShapeRuntimeImpl = /** @class */ (function () {
|
|
|
24308
24354
|
this.cursor = shape.cursor;
|
|
24309
24355
|
this.reset = EShapeRuntimeReset.NONE;
|
|
24310
24356
|
this.written = EShapeRuntimeReset.NONE;
|
|
24311
|
-
this.effect =
|
|
24357
|
+
this.effect = -1;
|
|
24312
24358
|
this.isStateChanged = false;
|
|
24313
24359
|
this.interactive = false;
|
|
24314
24360
|
}
|
|
@@ -24638,12 +24684,13 @@ var EShapeRuntimeImpl = /** @class */ (function () {
|
|
|
24638
24684
|
};
|
|
24639
24685
|
EShapeRuntimeImpl.prototype.update = function (shape, time) {
|
|
24640
24686
|
var data = shape.data;
|
|
24641
|
-
var
|
|
24687
|
+
var effect = this.effect;
|
|
24688
|
+
var isEffectTimeUp = 0 <= effect && effect <= time;
|
|
24642
24689
|
if (data.isChanged || this.isStateChanged || isEffectTimeUp) {
|
|
24643
24690
|
this.isStateChanged = false;
|
|
24644
24691
|
data.isChanged = false;
|
|
24645
24692
|
if (isEffectTimeUp) {
|
|
24646
|
-
this.effect =
|
|
24693
|
+
this.effect = -1;
|
|
24647
24694
|
}
|
|
24648
24695
|
shape.lock(EShapeLockPart.UPLOADED);
|
|
24649
24696
|
this.onUpdate(shape, time);
|
|
@@ -35721,13 +35768,14 @@ var BuilderRectangleRounded = /** @class */ (function (_super) {
|
|
|
35721
35768
|
__extends(BuilderRectangleRounded, _super);
|
|
35722
35769
|
function BuilderRectangleRounded(vertexOffset, indexOffset, vertexCount, indexCount) {
|
|
35723
35770
|
var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount) || this;
|
|
35724
|
-
_this.radius =
|
|
35725
|
-
_this.corner =
|
|
35771
|
+
_this.radius = 0;
|
|
35772
|
+
_this.corner = 0;
|
|
35726
35773
|
return _this;
|
|
35727
35774
|
}
|
|
35728
35775
|
BuilderRectangleRounded.prototype.init = function (buffer) {
|
|
35729
35776
|
buffer.updateIndices();
|
|
35730
35777
|
buildRectangleRoundedIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
35778
|
+
this.inited |= BuilderFlag.INDEX;
|
|
35731
35779
|
};
|
|
35732
35780
|
BuilderRectangleRounded.prototype.update = function (buffer, shape) {
|
|
35733
35781
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
@@ -35757,7 +35805,13 @@ var BuilderRectangleRounded = /** @class */ (function (_super) {
|
|
|
35757
35805
|
var textureTransformId = toTextureTransformId(texture);
|
|
35758
35806
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
35759
35807
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
35760
|
-
|
|
35808
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
35809
|
+
if (isNotInited ||
|
|
35810
|
+
isVertexChanged ||
|
|
35811
|
+
isTransformChanged ||
|
|
35812
|
+
isCornerChanged ||
|
|
35813
|
+
isTextureChanged) {
|
|
35814
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
35761
35815
|
this.sizeX = sizeX;
|
|
35762
35816
|
this.sizeY = sizeY;
|
|
35763
35817
|
this.radius = radius;
|
|
@@ -35774,17 +35828,17 @@ var BuilderRectangleRounded = /** @class */ (function (_super) {
|
|
|
35774
35828
|
buffer.updateVertices();
|
|
35775
35829
|
buildRectangleRoundedVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, radius, shape.transform.internalTransform, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
35776
35830
|
// Steps
|
|
35777
|
-
if (isVertexChanged || isCornerChanged || isTransformChanged) {
|
|
35831
|
+
if (isNotInited || isVertexChanged || isCornerChanged || isTransformChanged) {
|
|
35778
35832
|
buffer.updateSteps();
|
|
35779
35833
|
buildRectangleRoundedStep(buffer.steps, voffset, strokeWidth, strokeSide, strokeStyle, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
35780
35834
|
}
|
|
35781
35835
|
// Clippings
|
|
35782
|
-
if (isVertexChanged || isCornerChanged) {
|
|
35836
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
35783
35837
|
buffer.updateClippings();
|
|
35784
35838
|
buildRectangleRoundedClipping(buffer.clippings, voffset, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
35785
35839
|
}
|
|
35786
35840
|
// UVs
|
|
35787
|
-
if (isVertexChanged || isTextureChanged) {
|
|
35841
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
35788
35842
|
buffer.updateUvs();
|
|
35789
35843
|
buildRectangleRoundedUv(buffer.uvs, voffset, toTextureUvs(texture), RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
35790
35844
|
}
|
|
@@ -35799,8 +35853,8 @@ var BuilderRectangleRounded = /** @class */ (function (_super) {
|
|
|
35799
35853
|
*/
|
|
35800
35854
|
var createRectangleRoundedUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
35801
35855
|
var tcount = toTextBufferCount(shape);
|
|
35802
|
-
var tvcount = tcount
|
|
35803
|
-
var ticount = tcount
|
|
35856
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
35857
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
35804
35858
|
var vcount = RECTANGLE_ROUNDED_VERTEX_COUNT + tvcount;
|
|
35805
35859
|
var icount = RECTANGLE_ROUNDED_INDEX_COUNT + ticount;
|
|
35806
35860
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -36686,6 +36740,7 @@ var BuilderCircle = /** @class */ (function (_super) {
|
|
|
36686
36740
|
var voffset = this.vertexOffset;
|
|
36687
36741
|
buildCircleClipping(buffer.clippings, voffset);
|
|
36688
36742
|
buildCircleIndex(buffer.indices, voffset, this.indexOffset);
|
|
36743
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
36689
36744
|
};
|
|
36690
36745
|
BuilderCircle.prototype.update = function (buffer, shape) {
|
|
36691
36746
|
this.updateVertexAndStep(buffer, shape);
|
|
@@ -36707,7 +36762,9 @@ var BuilderCircle = /** @class */ (function (_super) {
|
|
|
36707
36762
|
var isStrokeChanged = this.strokeAlign !== strokeAlign ||
|
|
36708
36763
|
this.strokeWidth !== strokeWidth ||
|
|
36709
36764
|
this.strokeStyle !== strokeStyle;
|
|
36710
|
-
|
|
36765
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
|
|
36766
|
+
if (isNotInited || isSizeChanged || isTransformChanged || isStrokeChanged) {
|
|
36767
|
+
this.inited |= BuilderFlag.VERTEX_AND_STEP;
|
|
36711
36768
|
this.sizeX = sizeX;
|
|
36712
36769
|
this.sizeY = sizeY;
|
|
36713
36770
|
this.transformLocalId = transformLocalId;
|
|
@@ -36724,7 +36781,11 @@ var BuilderCircle = /** @class */ (function (_super) {
|
|
|
36724
36781
|
BuilderCircle.prototype.updateUv = function (buffer, shape) {
|
|
36725
36782
|
var texture = toTexture(shape);
|
|
36726
36783
|
var textureTransformId = toTextureTransformId(texture);
|
|
36727
|
-
|
|
36784
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
36785
|
+
if (isNotInited ||
|
|
36786
|
+
texture !== this.texture ||
|
|
36787
|
+
textureTransformId !== this.textureTransformId) {
|
|
36788
|
+
this.inited |= BuilderFlag.UV;
|
|
36728
36789
|
this.texture = texture;
|
|
36729
36790
|
this.textureTransformId = textureTransformId;
|
|
36730
36791
|
buffer.updateUvs();
|
|
@@ -36741,8 +36802,8 @@ var BuilderCircle = /** @class */ (function (_super) {
|
|
|
36741
36802
|
*/
|
|
36742
36803
|
var createCircleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
36743
36804
|
var tcount = toTextBufferCount(shape);
|
|
36744
|
-
var tvcount = tcount
|
|
36745
|
-
var ticount = tcount
|
|
36805
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
36806
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
36746
36807
|
var vcount = CIRCLE_VERTEX_COUNT + tvcount;
|
|
36747
36808
|
var icount = CIRCLE_INDEX_COUNT + ticount;
|
|
36748
36809
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -37186,6 +37247,7 @@ var BuilderLine = /** @class */ (function (_super) {
|
|
|
37186
37247
|
BuilderLine.prototype.init = function (buffer) {
|
|
37187
37248
|
buffer.updateIndices();
|
|
37188
37249
|
buildLineIndex(buffer.indices, this.vertexOffset, this.indexOffset, this.indexCount);
|
|
37250
|
+
this.inited |= BuilderFlag.INDEX;
|
|
37189
37251
|
};
|
|
37190
37252
|
BuilderLine.prototype.isCompatible = function (shape) {
|
|
37191
37253
|
var vcount = toLineVertexCount(toLinePointCount(shape.points), true);
|
|
@@ -37202,10 +37264,12 @@ var BuilderLine = /** @class */ (function (_super) {
|
|
|
37202
37264
|
if (points) {
|
|
37203
37265
|
var formatted = points.formatted;
|
|
37204
37266
|
var pointCount = formatted.length;
|
|
37205
|
-
|
|
37267
|
+
var isNotInited = !(this.inited & BuilderFlag.CLIPPING);
|
|
37268
|
+
if (isNotInited || this.pointCount !== pointCount) {
|
|
37269
|
+
this.inited |= BuilderFlag.CLIPPING;
|
|
37206
37270
|
this.pointCount = pointCount;
|
|
37207
|
-
// Invalidate the
|
|
37208
|
-
this.
|
|
37271
|
+
// Invalidate the vertex buffer
|
|
37272
|
+
this.inited &= ~BuilderFlag.VERTEX;
|
|
37209
37273
|
buffer.updateClippings();
|
|
37210
37274
|
buildLineClipping(buffer.clippings, this.vertexOffset, this.vertexCount, pointCount);
|
|
37211
37275
|
}
|
|
@@ -37224,15 +37288,17 @@ var BuilderLine = /** @class */ (function (_super) {
|
|
|
37224
37288
|
var isStrokeWidthChanged = this.strokeWidth !== strokeWidth || this.strokeStyle !== strokeStyle;
|
|
37225
37289
|
var transformLocalId = toTransformLocalId(shape);
|
|
37226
37290
|
var isTransformChanged = this.transformLocalId !== transformLocalId;
|
|
37227
|
-
|
|
37291
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_COLOR_FILL);
|
|
37292
|
+
if (isNotInited || isPointChanged || isTransformChanged || isStrokeWidthChanged) {
|
|
37293
|
+
this.inited |= BuilderFlag.VERTEX_STEP_AND_COLOR_FILL;
|
|
37228
37294
|
this.pointId = pointId;
|
|
37229
37295
|
this.pointsClosed = pointsClosed;
|
|
37230
37296
|
this.strokeWidth = strokeWidth;
|
|
37231
37297
|
this.strokeStyle = strokeStyle;
|
|
37232
37298
|
this.transformLocalId = transformLocalId;
|
|
37233
37299
|
if (isPointChanged) {
|
|
37234
|
-
// Invalidate the
|
|
37235
|
-
this.
|
|
37300
|
+
// Invalidate the UV buffer
|
|
37301
|
+
this.inited &= ~BuilderFlag.UV;
|
|
37236
37302
|
}
|
|
37237
37303
|
buffer.updateVertices();
|
|
37238
37304
|
buffer.updateSteps();
|
|
@@ -37244,7 +37310,11 @@ var BuilderLine = /** @class */ (function (_super) {
|
|
|
37244
37310
|
BuilderLine.prototype.updateLineUv = function (buffer, shape) {
|
|
37245
37311
|
var texture = toTexture(shape);
|
|
37246
37312
|
var textureTransformId = toTextureTransformId(texture);
|
|
37247
|
-
|
|
37313
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
37314
|
+
if (isNotInited ||
|
|
37315
|
+
texture !== this.texture ||
|
|
37316
|
+
textureTransformId !== this.textureTransformId) {
|
|
37317
|
+
this.inited |= BuilderFlag.UV;
|
|
37248
37318
|
this.texture = texture;
|
|
37249
37319
|
this.textureTransformId = textureTransformId;
|
|
37250
37320
|
buffer.updateUvs();
|
|
@@ -37414,7 +37484,9 @@ var BuilderMarkerBase = /** @class */ (function (_super) {
|
|
|
37414
37484
|
var isEnabled = shape.visible && fill.enable;
|
|
37415
37485
|
var color = fill.color;
|
|
37416
37486
|
var alpha = isEnabled ? fill.alpha : 0;
|
|
37417
|
-
|
|
37487
|
+
var isNotInited = !(this.inited & BuilderFlag.COLOR_FILL);
|
|
37488
|
+
if (isNotInited || color !== this.colorFill || alpha !== this.alphaFill) {
|
|
37489
|
+
this.inited |= BuilderFlag.COLOR_FILL;
|
|
37418
37490
|
this.colorFill = color;
|
|
37419
37491
|
this.alphaFill = alpha;
|
|
37420
37492
|
buffer.updateColorFills();
|
|
@@ -37440,6 +37512,7 @@ var BuilderMarkerTriangle = /** @class */ (function (_super) {
|
|
|
37440
37512
|
buffer.updateIndices();
|
|
37441
37513
|
buildTriangleClipping(buffer.clippings, this.vertexOffset);
|
|
37442
37514
|
buildTriangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
37515
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
37443
37516
|
};
|
|
37444
37517
|
BuilderMarkerTriangle.prototype.update = function (buffer, shape) {
|
|
37445
37518
|
this.updateVertexStepAndUv(buffer, shape);
|
|
@@ -37476,7 +37549,13 @@ var BuilderMarkerTriangle = /** @class */ (function (_super) {
|
|
|
37476
37549
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
37477
37550
|
var pointId = points.id;
|
|
37478
37551
|
var isPointChanged = pointId !== this.pointId;
|
|
37479
|
-
|
|
37552
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_UV);
|
|
37553
|
+
if (isNotInited ||
|
|
37554
|
+
isVertexChanged ||
|
|
37555
|
+
isTransformChanged ||
|
|
37556
|
+
isTextureChanged ||
|
|
37557
|
+
isPointChanged) {
|
|
37558
|
+
this.inited |= BuilderFlag.VERTEX_STEP_AND_UV;
|
|
37480
37559
|
this.sizeX = sizeX;
|
|
37481
37560
|
this.sizeY = sizeY;
|
|
37482
37561
|
this.transformLocalId = transformLocalId;
|
|
@@ -37491,11 +37570,11 @@ var BuilderMarkerTriangle = /** @class */ (function (_super) {
|
|
|
37491
37570
|
internalTransform.copyFrom(marker.transform).prepend(shape.transform.internalTransform);
|
|
37492
37571
|
buffer.updateVertices();
|
|
37493
37572
|
buildTriangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, TRIANGLE_WORLD_SIZE);
|
|
37494
|
-
if (isVertexChanged || isTransformChanged) {
|
|
37573
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
37495
37574
|
buffer.updateSteps();
|
|
37496
37575
|
buildTriangleStep(buffer.steps, buffer.clippings, voffset, TRIANGLE_VERTEX_COUNT, strokeWidth, strokeStyle, TRIANGLE_WORLD_SIZE);
|
|
37497
37576
|
}
|
|
37498
|
-
if (isVertexChanged || isTextureChanged) {
|
|
37577
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
37499
37578
|
buffer.updateUvs();
|
|
37500
37579
|
buildTriangleUv(buffer.uvs, toTextureUvs(texture), voffset, TRIANGLE_WORLD_SIZE);
|
|
37501
37580
|
}
|
|
@@ -37551,6 +37630,7 @@ var BuilderMarkerCircle = /** @class */ (function (_super) {
|
|
|
37551
37630
|
var vertexOffset = this.vertexOffset;
|
|
37552
37631
|
buildCircleClipping(buffer.clippings, vertexOffset);
|
|
37553
37632
|
buildCircleIndex(buffer.indices, vertexOffset, this.indexOffset);
|
|
37633
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
37554
37634
|
};
|
|
37555
37635
|
BuilderMarkerCircle.prototype.update = function (buffer, shape) {
|
|
37556
37636
|
this.updateVertexAndStep(buffer, shape);
|
|
@@ -37584,7 +37664,13 @@ var BuilderMarkerCircle = /** @class */ (function (_super) {
|
|
|
37584
37664
|
this.strokeStyle !== strokeStyle;
|
|
37585
37665
|
var pointId = points.id;
|
|
37586
37666
|
var isPointChanged = pointId !== this.pointId;
|
|
37587
|
-
|
|
37667
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
|
|
37668
|
+
if (isNotInited ||
|
|
37669
|
+
isSizeChanged ||
|
|
37670
|
+
isTransformChanged ||
|
|
37671
|
+
isStrokeChanged ||
|
|
37672
|
+
isPointChanged) {
|
|
37673
|
+
this.inited |= BuilderFlag.VERTEX_AND_STEP;
|
|
37588
37674
|
this.sizeX = sizeX;
|
|
37589
37675
|
this.sizeY = sizeY;
|
|
37590
37676
|
this.transformLocalId = transformLocalId;
|
|
@@ -37604,7 +37690,11 @@ var BuilderMarkerCircle = /** @class */ (function (_super) {
|
|
|
37604
37690
|
BuilderMarkerCircle.prototype.updateUv = function (buffer, shape) {
|
|
37605
37691
|
var texture = toTexture(shape);
|
|
37606
37692
|
var textureTransformId = toTextureTransformId(texture);
|
|
37607
|
-
|
|
37693
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
37694
|
+
if (isNotInited ||
|
|
37695
|
+
texture !== this.texture ||
|
|
37696
|
+
textureTransformId !== this.textureTransformId) {
|
|
37697
|
+
this.inited |= BuilderFlag.UV;
|
|
37608
37698
|
this.texture = texture;
|
|
37609
37699
|
this.textureTransformId = textureTransformId;
|
|
37610
37700
|
buffer.updateUvs();
|
|
@@ -38101,6 +38191,7 @@ var BuilderMarkerRectangle = /** @class */ (function (_super) {
|
|
|
38101
38191
|
BuilderMarkerRectangle.prototype.init = function (buffer) {
|
|
38102
38192
|
buffer.updateIndices();
|
|
38103
38193
|
buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
38194
|
+
this.inited |= BuilderFlag.INDEX;
|
|
38104
38195
|
};
|
|
38105
38196
|
BuilderMarkerRectangle.prototype.update = function (buffer, shape) {
|
|
38106
38197
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
@@ -38139,7 +38230,13 @@ var BuilderMarkerRectangle = /** @class */ (function (_super) {
|
|
|
38139
38230
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
38140
38231
|
var pointId = points.id;
|
|
38141
38232
|
var isPointChanged = pointId !== this.pointId;
|
|
38142
|
-
|
|
38233
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
38234
|
+
if (isNotInited ||
|
|
38235
|
+
isVertexChanged ||
|
|
38236
|
+
isTransformChanged ||
|
|
38237
|
+
isTextureChanged ||
|
|
38238
|
+
isPointChanged) {
|
|
38239
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
38143
38240
|
this.sizeX = sizeX;
|
|
38144
38241
|
this.sizeY = sizeY;
|
|
38145
38242
|
this.transformLocalId = transformLocalId;
|
|
@@ -38156,17 +38253,17 @@ var BuilderMarkerRectangle = /** @class */ (function (_super) {
|
|
|
38156
38253
|
buffer.updateVertices();
|
|
38157
38254
|
buildRectangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_WORLD_SIZE);
|
|
38158
38255
|
// Steps
|
|
38159
|
-
if (isVertexChanged || isTransformChanged) {
|
|
38256
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
38160
38257
|
buffer.updateSteps();
|
|
38161
38258
|
buildRectangleStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
|
|
38162
38259
|
}
|
|
38163
38260
|
// Clippings
|
|
38164
|
-
if (isVertexChanged) {
|
|
38261
|
+
if (isNotInited || isVertexChanged) {
|
|
38165
38262
|
buffer.updateClippings();
|
|
38166
38263
|
buildRectangleClipping(buffer.clippings, voffset, RECTANGLE_WORLD_SIZE);
|
|
38167
38264
|
}
|
|
38168
38265
|
// UVs
|
|
38169
|
-
if (isVertexChanged || isTextureChanged) {
|
|
38266
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
38170
38267
|
buffer.updateUvs();
|
|
38171
38268
|
buildRectangleUv(buffer.uvs, voffset, toTextureUvs(texture), RECTANGLE_WORLD_SIZE);
|
|
38172
38269
|
}
|
|
@@ -38287,8 +38384,8 @@ var createLineUploaded = function (buffer, shape, voffset, ioffset, antialiasWei
|
|
|
38287
38384
|
var mhioffset = mtioffset + mticount;
|
|
38288
38385
|
// Text
|
|
38289
38386
|
var tcount = toTextBufferCount(shape);
|
|
38290
|
-
var tvcount = tcount
|
|
38291
|
-
var ticount = tcount
|
|
38387
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
38388
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
38292
38389
|
var tvoffset = mhvoffset + mhvcount;
|
|
38293
38390
|
var tioffset = mhioffset + mhicount;
|
|
38294
38391
|
// Uploaded
|
|
@@ -38804,6 +38901,7 @@ var BuilderRectanglePivoted = /** @class */ (function (_super) {
|
|
|
38804
38901
|
BuilderRectanglePivoted.prototype.init = function (buffer) {
|
|
38805
38902
|
buffer.updateIndices();
|
|
38806
38903
|
buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
38904
|
+
this.inited |= BuilderFlag.INDEX;
|
|
38807
38905
|
};
|
|
38808
38906
|
BuilderRectanglePivoted.prototype.update = function (buffer, shape) {
|
|
38809
38907
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
@@ -38830,7 +38928,9 @@ var BuilderRectanglePivoted = /** @class */ (function (_super) {
|
|
|
38830
38928
|
var textureTransformId = toTextureTransformId(texture);
|
|
38831
38929
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
38832
38930
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
38833
|
-
|
|
38931
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
38932
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
|
|
38933
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
38834
38934
|
this.sizeX = sizeX;
|
|
38835
38935
|
this.sizeY = sizeY;
|
|
38836
38936
|
this.transformLocalId = transformLocalId;
|
|
@@ -38845,17 +38945,17 @@ var BuilderRectanglePivoted = /** @class */ (function (_super) {
|
|
|
38845
38945
|
buffer.updateVertices();
|
|
38846
38946
|
buildRectangleVertex(buffer.vertices, voffset, 0.5 * sizeX, 0.5 * sizeY, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, RECTANGLE_WORLD_SIZE);
|
|
38847
38947
|
// Steps
|
|
38848
|
-
if (isVertexChanged || isTransformChanged) {
|
|
38948
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
38849
38949
|
buffer.updateSteps();
|
|
38850
38950
|
buildRectangleStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
|
|
38851
38951
|
}
|
|
38852
38952
|
// Clippings
|
|
38853
|
-
if (isVertexChanged) {
|
|
38953
|
+
if (isNotInited || isVertexChanged) {
|
|
38854
38954
|
buffer.updateClippings();
|
|
38855
38955
|
buildRectangleClipping(buffer.clippings, voffset, RECTANGLE_WORLD_SIZE);
|
|
38856
38956
|
}
|
|
38857
38957
|
// UVs
|
|
38858
|
-
if (isVertexChanged || isTextureChanged) {
|
|
38958
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
38859
38959
|
buffer.updateUvs();
|
|
38860
38960
|
buildRectangleUv(buffer.uvs, voffset, toTextureUvs(texture), RECTANGLE_WORLD_SIZE);
|
|
38861
38961
|
}
|
|
@@ -38870,8 +38970,8 @@ var BuilderRectanglePivoted = /** @class */ (function (_super) {
|
|
|
38870
38970
|
*/
|
|
38871
38971
|
var createRectanglePivotedUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
38872
38972
|
var tcount = toTextBufferCount(shape);
|
|
38873
|
-
var tvcount = tcount
|
|
38874
|
-
var ticount = tcount
|
|
38973
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
38974
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
38875
38975
|
var vcount = RECTANGLE_VERTEX_COUNT + tvcount;
|
|
38876
38976
|
var icount = RECTANGLE_INDEX_COUNT + ticount;
|
|
38877
38977
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -38889,8 +38989,8 @@ var createRectanglePivotedUploaded = function (buffer, shape, voffset, ioffset,
|
|
|
38889
38989
|
*/
|
|
38890
38990
|
var createGroupUploaded = function (buffer, shape, voffset, ioffset) {
|
|
38891
38991
|
var tcount = toTextBufferCount(shape);
|
|
38892
|
-
var tvcount = tcount
|
|
38893
|
-
var ticount = tcount
|
|
38992
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
38993
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
38894
38994
|
var vcount = tvcount;
|
|
38895
38995
|
var icount = ticount;
|
|
38896
38996
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -39890,6 +39990,7 @@ var BuilderRectangle = /** @class */ (function (_super) {
|
|
|
39890
39990
|
BuilderRectangle.prototype.init = function (buffer) {
|
|
39891
39991
|
buffer.updateIndices();
|
|
39892
39992
|
buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
39993
|
+
this.inited |= BuilderFlag.INDEX;
|
|
39893
39994
|
};
|
|
39894
39995
|
BuilderRectangle.prototype.update = function (buffer, shape) {
|
|
39895
39996
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
@@ -39916,7 +40017,9 @@ var BuilderRectangle = /** @class */ (function (_super) {
|
|
|
39916
40017
|
var textureTransformId = toTextureTransformId(texture);
|
|
39917
40018
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
39918
40019
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
39919
|
-
|
|
40020
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
40021
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
|
|
40022
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
39920
40023
|
this.sizeX = sizeX;
|
|
39921
40024
|
this.sizeY = sizeY;
|
|
39922
40025
|
this.transformLocalId = transformLocalId;
|
|
@@ -39931,17 +40034,17 @@ var BuilderRectangle = /** @class */ (function (_super) {
|
|
|
39931
40034
|
buffer.updateVertices();
|
|
39932
40035
|
buildRectangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, RECTANGLE_WORLD_SIZE);
|
|
39933
40036
|
// Steps
|
|
39934
|
-
if (isVertexChanged || isTransformChanged) {
|
|
40037
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
39935
40038
|
buffer.updateSteps();
|
|
39936
40039
|
buildRectangleStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
|
|
39937
40040
|
}
|
|
39938
40041
|
// Clippings
|
|
39939
|
-
if (isVertexChanged) {
|
|
40042
|
+
if (isNotInited || isVertexChanged) {
|
|
39940
40043
|
buffer.updateClippings();
|
|
39941
40044
|
buildRectangleClipping(buffer.clippings, voffset, RECTANGLE_WORLD_SIZE);
|
|
39942
40045
|
}
|
|
39943
40046
|
// UVs
|
|
39944
|
-
if (isVertexChanged || isTextureChanged) {
|
|
40047
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
39945
40048
|
buffer.updateUvs();
|
|
39946
40049
|
buildRectangleUv(buffer.uvs, voffset, toTextureUvs(texture), RECTANGLE_WORLD_SIZE);
|
|
39947
40050
|
}
|
|
@@ -39956,8 +40059,8 @@ var BuilderRectangle = /** @class */ (function (_super) {
|
|
|
39956
40059
|
*/
|
|
39957
40060
|
var createRectangleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
39958
40061
|
var tcount = toTextBufferCount(shape);
|
|
39959
|
-
var tvcount = tcount
|
|
39960
|
-
var ticount = tcount
|
|
40062
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
40063
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
39961
40064
|
var vcount = RECTANGLE_VERTEX_COUNT + tvcount;
|
|
39962
40065
|
var icount = RECTANGLE_INDEX_COUNT + ticount;
|
|
39963
40066
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -40210,6 +40313,7 @@ var BuilderImageSdf = /** @class */ (function (_super) {
|
|
|
40210
40313
|
buffer.updateIndices();
|
|
40211
40314
|
buildImageSdfClipping(buffer.clippings, voffset);
|
|
40212
40315
|
buildImageSdfIndex(buffer.indices, voffset, this.indexOffset);
|
|
40316
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
40213
40317
|
};
|
|
40214
40318
|
BuilderImageSdf.prototype.update = function (buffer, shape) {
|
|
40215
40319
|
this.updateVertexAndStep(buffer, shape);
|
|
@@ -40235,7 +40339,13 @@ var BuilderImageSdf = /** @class */ (function (_super) {
|
|
|
40235
40339
|
var textureWidth = texture.width * texture.resolution;
|
|
40236
40340
|
var textureHeight = texture.height * texture.resolution;
|
|
40237
40341
|
var isTextureSizeChanged = this.textureWidth !== textureWidth || this.textureHeight !== textureHeight;
|
|
40238
|
-
|
|
40342
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
|
|
40343
|
+
if (isNotInited ||
|
|
40344
|
+
isSizeChanged ||
|
|
40345
|
+
isTransformChanged ||
|
|
40346
|
+
isStrokeChanged ||
|
|
40347
|
+
isTextureSizeChanged) {
|
|
40348
|
+
this.inited |= BuilderFlag.VERTEX_AND_STEP;
|
|
40239
40349
|
this.sizeX = sizeX;
|
|
40240
40350
|
this.sizeY = sizeY;
|
|
40241
40351
|
this.transformLocalId = transformLocalId;
|
|
@@ -40255,7 +40365,11 @@ var BuilderImageSdf = /** @class */ (function (_super) {
|
|
|
40255
40365
|
BuilderImageSdf.prototype.updateUv = function (buffer, shape) {
|
|
40256
40366
|
var texture = toTexture(shape);
|
|
40257
40367
|
var textureTransformId = toTextureTransformId(texture);
|
|
40258
|
-
|
|
40368
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
40369
|
+
if (isNotInited ||
|
|
40370
|
+
texture !== this.texture ||
|
|
40371
|
+
textureTransformId !== this.textureTransformId) {
|
|
40372
|
+
this.inited |= BuilderFlag.UV;
|
|
40259
40373
|
this.texture = texture;
|
|
40260
40374
|
this.textureTransformId = textureTransformId;
|
|
40261
40375
|
buffer.updateUvs();
|
|
@@ -40271,8 +40385,8 @@ var BuilderImageSdf = /** @class */ (function (_super) {
|
|
|
40271
40385
|
*/
|
|
40272
40386
|
var createImageSdfUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
40273
40387
|
var tcount = toTextBufferCount(shape);
|
|
40274
|
-
var tvcount = tcount
|
|
40275
|
-
var ticount = tcount
|
|
40388
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
40389
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
40276
40390
|
var vcount = IMAGE_SDF_VERTEX_COUNT + tvcount;
|
|
40277
40391
|
var icount = IMAGE_SDF_INDEX_COUNT + ticount;
|
|
40278
40392
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -40356,8 +40470,8 @@ var BuilderLabel = /** @class */ (function () {
|
|
|
40356
40470
|
*/
|
|
40357
40471
|
var createLabelUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
40358
40472
|
var tcount = toTextBufferCount(shape);
|
|
40359
|
-
var tvcount = tcount
|
|
40360
|
-
var ticount = tcount
|
|
40473
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
40474
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
40361
40475
|
var vcount = tvcount;
|
|
40362
40476
|
var icount = ticount;
|
|
40363
40477
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -40594,7 +40708,9 @@ var BuilderLineOfAny = /** @class */ (function (_super) {
|
|
|
40594
40708
|
var colorStroke = stroke.color;
|
|
40595
40709
|
var alphaStroke = isStrokeEnabled ? stroke.alpha : 0;
|
|
40596
40710
|
var isStrokeChanged = colorStroke !== this.colorStroke || alphaStroke !== this.alphaStroke;
|
|
40597
|
-
|
|
40711
|
+
var isNotInited = !(this.inited & BuilderFlag.COLOR_STROKE);
|
|
40712
|
+
if (isNotInited || isPointStrokeChanged || isStrokeChanged) {
|
|
40713
|
+
this.inited |= BuilderFlag.COLOR_STROKE;
|
|
40598
40714
|
this.colorStroke = colorStroke;
|
|
40599
40715
|
this.alphaStroke = alphaStroke;
|
|
40600
40716
|
this.pointStrokeId = pointStrokeId;
|
|
@@ -41303,6 +41419,7 @@ var BuilderLineOfCircles = /** @class */ (function (_super) {
|
|
|
41303
41419
|
buildCircleIndex(indices, voffset, ioffset);
|
|
41304
41420
|
copyIndex(indices, CIRCLE_VERTEX_COUNT, ioffset, CIRCLE_INDEX_COUNT, pointCountReserved);
|
|
41305
41421
|
}
|
|
41422
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
41306
41423
|
};
|
|
41307
41424
|
BuilderLineOfCircles.prototype.update = function (buffer, shape) {
|
|
41308
41425
|
var points = shape.points;
|
|
@@ -41334,11 +41451,14 @@ var BuilderLineOfCircles = /** @class */ (function (_super) {
|
|
|
41334
41451
|
var isStrokeChanged = this.strokeAlign !== strokeAlign ||
|
|
41335
41452
|
this.strokeWidth !== strokeWidth ||
|
|
41336
41453
|
this.strokeStyle !== strokeStyle;
|
|
41337
|
-
|
|
41454
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
|
|
41455
|
+
if (isNotInited ||
|
|
41456
|
+
isPointChanged ||
|
|
41338
41457
|
isPointSizeChanged ||
|
|
41339
41458
|
isSizeChanged ||
|
|
41340
41459
|
isTransformChanged ||
|
|
41341
41460
|
isStrokeChanged) {
|
|
41461
|
+
this.inited |= BuilderFlag.VERTEX_AND_STEP;
|
|
41342
41462
|
this.pointId = pointId;
|
|
41343
41463
|
var formatted = points.formatted;
|
|
41344
41464
|
this.pointCount = formatted.length;
|
|
@@ -41391,7 +41511,11 @@ var BuilderLineOfCircles = /** @class */ (function (_super) {
|
|
|
41391
41511
|
BuilderLineOfCircles.prototype.updateUv = function (buffer, shape) {
|
|
41392
41512
|
var texture = toTexture(shape);
|
|
41393
41513
|
var textureTransformId = toTextureTransformId(texture);
|
|
41394
|
-
|
|
41514
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
41515
|
+
if (isNotInited ||
|
|
41516
|
+
texture !== this.texture ||
|
|
41517
|
+
textureTransformId !== this.textureTransformId) {
|
|
41518
|
+
this.inited |= BuilderFlag.UV;
|
|
41395
41519
|
this.texture = texture;
|
|
41396
41520
|
this.textureTransformId = textureTransformId;
|
|
41397
41521
|
buffer.updateUvs();
|
|
@@ -41414,8 +41538,8 @@ var BuilderLineOfCircles = /** @class */ (function (_super) {
|
|
|
41414
41538
|
*/
|
|
41415
41539
|
var createLineOfAnyUploaded = function (buffer, shape, voffset, vcountPerPoint, ioffset, icountPerPoint, antialiasWeight, constructor) {
|
|
41416
41540
|
var tcount = toTextBufferCount(shape);
|
|
41417
|
-
var tvcount = tcount
|
|
41418
|
-
var ticount = tcount
|
|
41541
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
41542
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
41419
41543
|
var points = shape.points;
|
|
41420
41544
|
var pointCount = toLineOfAnyPointCount(toPointsCount(points));
|
|
41421
41545
|
var pvcount = pointCount * vcountPerPoint;
|
|
@@ -41510,8 +41634,8 @@ var BuilderLineOfRectangleRoundeds = /** @class */ (function (_super) {
|
|
|
41510
41634
|
__extends(BuilderLineOfRectangleRoundeds, _super);
|
|
41511
41635
|
function BuilderLineOfRectangleRoundeds(vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) {
|
|
41512
41636
|
var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) || this;
|
|
41513
|
-
_this.radius =
|
|
41514
|
-
_this.corner =
|
|
41637
|
+
_this.radius = 0;
|
|
41638
|
+
_this.corner = 0;
|
|
41515
41639
|
return _this;
|
|
41516
41640
|
}
|
|
41517
41641
|
BuilderLineOfRectangleRoundeds.prototype.init = function (buffer) {
|
|
@@ -41524,6 +41648,7 @@ var BuilderLineOfRectangleRoundeds = /** @class */ (function (_super) {
|
|
|
41524
41648
|
buildRectangleRoundedIndex(indices, voffset, ioffset);
|
|
41525
41649
|
copyIndex(indices, RECTANGLE_ROUNDED_VERTEX_COUNT, ioffset, RECTANGLE_ROUNDED_INDEX_COUNT, pointCountReserved);
|
|
41526
41650
|
}
|
|
41651
|
+
this.inited |= BuilderFlag.INDEX;
|
|
41527
41652
|
};
|
|
41528
41653
|
BuilderLineOfRectangleRoundeds.prototype.update = function (buffer, shape) {
|
|
41529
41654
|
var points = shape.points;
|
|
@@ -41563,7 +41688,13 @@ var BuilderLineOfRectangleRoundeds = /** @class */ (function (_super) {
|
|
|
41563
41688
|
var textureTransformId = toTextureTransformId(texture);
|
|
41564
41689
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
41565
41690
|
var isVertexChanged = isPointChanged || isPointSizeChanged || isSizeChanged || isStrokeChanged;
|
|
41566
|
-
|
|
41691
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
41692
|
+
if (isNotInited ||
|
|
41693
|
+
isVertexChanged ||
|
|
41694
|
+
isTransformChanged ||
|
|
41695
|
+
isCornerChanged ||
|
|
41696
|
+
isTextureChanged) {
|
|
41697
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
41567
41698
|
this.pointId = pointId;
|
|
41568
41699
|
var formatted = points.formatted;
|
|
41569
41700
|
this.pointCount = formatted.length;
|
|
@@ -41582,13 +41713,13 @@ var BuilderLineOfRectangleRoundeds = /** @class */ (function (_super) {
|
|
|
41582
41713
|
this.textureTransformId = textureTransformId;
|
|
41583
41714
|
// Buffer
|
|
41584
41715
|
buffer.updateVertices();
|
|
41585
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41716
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41586
41717
|
buffer.updateSteps();
|
|
41587
41718
|
}
|
|
41588
|
-
if (isVertexChanged || isCornerChanged) {
|
|
41719
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
41589
41720
|
buffer.updateClippings();
|
|
41590
41721
|
}
|
|
41591
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41722
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41592
41723
|
buffer.updateUvs();
|
|
41593
41724
|
}
|
|
41594
41725
|
var pointCount = this.pointCount;
|
|
@@ -41607,17 +41738,17 @@ var BuilderLineOfRectangleRoundeds = /** @class */ (function (_super) {
|
|
|
41607
41738
|
buildRectangleRoundedVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41608
41739
|
copyVertex(vertices, internalTransform, voffset, RECTANGLE_ROUNDED_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
|
|
41609
41740
|
// Steps
|
|
41610
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41741
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41611
41742
|
buildRectangleRoundedStep(steps, voffset, strokeWidth, strokeSide, strokeStyle, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41612
41743
|
copyStep(steps, voffset, RECTANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
41613
41744
|
}
|
|
41614
41745
|
// Clippings
|
|
41615
|
-
if (isVertexChanged || isCornerChanged) {
|
|
41746
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
41616
41747
|
buildRectangleRoundedClipping(clippings, voffset, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41617
41748
|
copyClipping(clippings, voffset, RECTANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
41618
41749
|
}
|
|
41619
41750
|
// UVs
|
|
41620
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41751
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41621
41752
|
buildRectangleRoundedUv(uvs, voffset, textureUvs, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41622
41753
|
copyUvs(uvs, voffset, RECTANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
41623
41754
|
}
|
|
@@ -41633,15 +41764,15 @@ var BuilderLineOfRectangleRoundeds = /** @class */ (function (_super) {
|
|
|
41633
41764
|
// Vertices
|
|
41634
41765
|
buildRectangleRoundedVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41635
41766
|
// Steps
|
|
41636
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41767
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41637
41768
|
buildRectangleRoundedStep(steps, iv, strokeWidth, strokeSide, strokeStyle, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41638
41769
|
}
|
|
41639
41770
|
// Clippings
|
|
41640
|
-
if (isVertexChanged || isCornerChanged) {
|
|
41771
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
41641
41772
|
buildRectangleRoundedClipping(clippings, iv, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41642
41773
|
}
|
|
41643
41774
|
// UVs
|
|
41644
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41775
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41645
41776
|
buildRectangleRoundedUv(uvs, iv, textureUvs, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41646
41777
|
}
|
|
41647
41778
|
}
|
|
@@ -41750,6 +41881,7 @@ var BuilderLineOfRectangles = /** @class */ (function (_super) {
|
|
|
41750
41881
|
buildRectangleIndex(indices, voffset, ioffset);
|
|
41751
41882
|
copyIndex(indices, RECTANGLE_VERTEX_COUNT, ioffset, RECTANGLE_INDEX_COUNT, pointCountReserved);
|
|
41752
41883
|
}
|
|
41884
|
+
this.inited |= BuilderFlag.INDEX;
|
|
41753
41885
|
};
|
|
41754
41886
|
BuilderLineOfRectangles.prototype.update = function (buffer, shape) {
|
|
41755
41887
|
var points = shape.points;
|
|
@@ -41786,7 +41918,9 @@ var BuilderLineOfRectangles = /** @class */ (function (_super) {
|
|
|
41786
41918
|
var textureTransformId = toTextureTransformId(texture);
|
|
41787
41919
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
41788
41920
|
var isVertexChanged = isPointChanged || isPointSizeChanged || isSizeChanged || isStrokeChanged;
|
|
41789
|
-
|
|
41921
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
41922
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
|
|
41923
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
41790
41924
|
this.pointId = pointId;
|
|
41791
41925
|
var formatted = points.formatted;
|
|
41792
41926
|
this.pointCount = formatted.length;
|
|
@@ -41801,13 +41935,13 @@ var BuilderLineOfRectangles = /** @class */ (function (_super) {
|
|
|
41801
41935
|
this.textureTransformId = textureTransformId;
|
|
41802
41936
|
// Buffer
|
|
41803
41937
|
buffer.updateVertices();
|
|
41804
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41938
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41805
41939
|
buffer.updateSteps();
|
|
41806
41940
|
}
|
|
41807
|
-
if (isVertexChanged) {
|
|
41941
|
+
if (isNotInited || isVertexChanged) {
|
|
41808
41942
|
buffer.updateClippings();
|
|
41809
41943
|
}
|
|
41810
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41944
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41811
41945
|
buffer.updateUvs();
|
|
41812
41946
|
}
|
|
41813
41947
|
var pointCount = this.pointCount;
|
|
@@ -41826,17 +41960,17 @@ var BuilderLineOfRectangles = /** @class */ (function (_super) {
|
|
|
41826
41960
|
buildRectangleVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_WORLD_SIZE);
|
|
41827
41961
|
copyVertex(vertices, internalTransform, voffset, RECTANGLE_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
|
|
41828
41962
|
// Steps
|
|
41829
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41963
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41830
41964
|
buildRectangleStep(voffset, steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
|
|
41831
41965
|
copyStep(steps, voffset, RECTANGLE_VERTEX_COUNT, pointCount);
|
|
41832
41966
|
}
|
|
41833
41967
|
// Clippings
|
|
41834
|
-
if (isVertexChanged) {
|
|
41968
|
+
if (isNotInited || isVertexChanged) {
|
|
41835
41969
|
buildRectangleClipping(clippings, voffset, RECTANGLE_WORLD_SIZE);
|
|
41836
41970
|
copyClipping(clippings, voffset, RECTANGLE_VERTEX_COUNT, pointCount);
|
|
41837
41971
|
}
|
|
41838
41972
|
// UVs
|
|
41839
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41973
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41840
41974
|
buildRectangleUv(uvs, voffset, textureUvs, RECTANGLE_WORLD_SIZE);
|
|
41841
41975
|
copyUvs(uvs, voffset, RECTANGLE_VERTEX_COUNT, pointCount);
|
|
41842
41976
|
}
|
|
@@ -41852,15 +41986,15 @@ var BuilderLineOfRectangles = /** @class */ (function (_super) {
|
|
|
41852
41986
|
// Vertices
|
|
41853
41987
|
buildRectangleVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_WORLD_SIZE);
|
|
41854
41988
|
// Steps
|
|
41855
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41989
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41856
41990
|
buildRectangleStep(iv, steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
|
|
41857
41991
|
}
|
|
41858
41992
|
// Clippings
|
|
41859
|
-
if (isVertexChanged) {
|
|
41993
|
+
if (isNotInited || isVertexChanged) {
|
|
41860
41994
|
buildRectangleClipping(clippings, iv, RECTANGLE_WORLD_SIZE);
|
|
41861
41995
|
}
|
|
41862
41996
|
// UVs
|
|
41863
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41997
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41864
41998
|
buildRectangleUv(uvs, iv, textureUvs, RECTANGLE_WORLD_SIZE);
|
|
41865
41999
|
}
|
|
41866
42000
|
}
|
|
@@ -42364,8 +42498,8 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
|
|
|
42364
42498
|
__extends(BuilderLineOfTriangleRoundeds, _super);
|
|
42365
42499
|
function BuilderLineOfTriangleRoundeds(vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) {
|
|
42366
42500
|
var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) || this;
|
|
42367
|
-
_this.radius =
|
|
42368
|
-
_this.corner =
|
|
42501
|
+
_this.radius = 0;
|
|
42502
|
+
_this.corner = 0;
|
|
42369
42503
|
return _this;
|
|
42370
42504
|
}
|
|
42371
42505
|
BuilderLineOfTriangleRoundeds.prototype.init = function (buffer) {
|
|
@@ -42377,6 +42511,7 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
|
|
|
42377
42511
|
buildTriangleRoundedIndex(buffer.indices, voffset, ioffset);
|
|
42378
42512
|
copyIndex(buffer.indices, TRIANGLE_ROUNDED_VERTEX_COUNT, ioffset, TRIANGLE_ROUNDED_INDEX_COUNT, pointCountReserved);
|
|
42379
42513
|
}
|
|
42514
|
+
this.inited |= BuilderFlag.INDEX;
|
|
42380
42515
|
};
|
|
42381
42516
|
BuilderLineOfTriangleRoundeds.prototype.update = function (buffer, shape) {
|
|
42382
42517
|
var points = shape.points;
|
|
@@ -42419,7 +42554,13 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
|
|
|
42419
42554
|
isSizeChanged ||
|
|
42420
42555
|
isRadiusChanged ||
|
|
42421
42556
|
isStrokeChanged;
|
|
42422
|
-
|
|
42557
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
42558
|
+
if (isNotInited ||
|
|
42559
|
+
isVertexChanged ||
|
|
42560
|
+
isTransformChanged ||
|
|
42561
|
+
isCornerChanged ||
|
|
42562
|
+
isTextureChanged) {
|
|
42563
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
42423
42564
|
this.pointId = pointId;
|
|
42424
42565
|
var formatted = points.formatted;
|
|
42425
42566
|
this.pointCount = formatted.length;
|
|
@@ -42437,13 +42578,13 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
|
|
|
42437
42578
|
this.textureTransformId = textureTransformId;
|
|
42438
42579
|
// Buffer
|
|
42439
42580
|
buffer.updateVertices();
|
|
42440
|
-
if (isVertexChanged || isCornerChanged) {
|
|
42581
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
42441
42582
|
buffer.updateClippings();
|
|
42442
42583
|
}
|
|
42443
|
-
if (isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42584
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42444
42585
|
buffer.updateSteps();
|
|
42445
42586
|
}
|
|
42446
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42587
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42447
42588
|
buffer.updateUvs();
|
|
42448
42589
|
}
|
|
42449
42590
|
var pointCount = this.pointCount;
|
|
@@ -42462,17 +42603,17 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
|
|
|
42462
42603
|
buildTriangleRoundedVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42463
42604
|
copyVertex(vertices, internalTransform, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
|
|
42464
42605
|
// Clippings
|
|
42465
|
-
if (isVertexChanged || isCornerChanged) {
|
|
42606
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
42466
42607
|
buildTriangleRoundedClipping(clippings, voffset, corner, radius);
|
|
42467
42608
|
copyClipping(clippings, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
42468
42609
|
}
|
|
42469
42610
|
// Steps
|
|
42470
|
-
if (isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42611
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42471
42612
|
buildTriangleRoundedStep(steps, clippings, voffset, strokeWidth, strokeStyle, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42472
42613
|
copyStep(steps, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
42473
42614
|
}
|
|
42474
42615
|
// UVs
|
|
42475
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42616
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42476
42617
|
buildTriangleRoundedUv(uvs, voffset, textureUvs, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42477
42618
|
copyUvs(uvs, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
42478
42619
|
}
|
|
@@ -42488,15 +42629,15 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
|
|
|
42488
42629
|
// Vertices
|
|
42489
42630
|
buildTriangleRoundedVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42490
42631
|
// Clippings
|
|
42491
|
-
if (isVertexChanged || isCornerChanged) {
|
|
42632
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
42492
42633
|
buildTriangleRoundedClipping(clippings, iv, corner, radius);
|
|
42493
42634
|
}
|
|
42494
42635
|
// Steps
|
|
42495
|
-
if (isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42636
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42496
42637
|
buildTriangleRoundedStep(steps, clippings, iv, strokeWidth, strokeStyle, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42497
42638
|
}
|
|
42498
42639
|
// UVs
|
|
42499
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42640
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42500
42641
|
buildTriangleRoundedUv(uvs, iv, textureUvs, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42501
42642
|
}
|
|
42502
42643
|
}
|
|
@@ -42751,6 +42892,7 @@ var BuilderLineOfTriangles = /** @class */ (function (_super) {
|
|
|
42751
42892
|
buildTriangleIndex(indices, voffset, ioffset);
|
|
42752
42893
|
copyIndex(indices, TRIANGLE_VERTEX_COUNT, ioffset, TRIANGLE_INDEX_COUNT, pointCountReserved);
|
|
42753
42894
|
}
|
|
42895
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
42754
42896
|
};
|
|
42755
42897
|
BuilderLineOfTriangles.prototype.update = function (buffer, shape) {
|
|
42756
42898
|
var points = shape.points;
|
|
@@ -42785,7 +42927,9 @@ var BuilderLineOfTriangles = /** @class */ (function (_super) {
|
|
|
42785
42927
|
var textureTransformId = toTextureTransformId(texture);
|
|
42786
42928
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
42787
42929
|
var isVertexChanged = isPointChanged || isPointSizeChanged || isSizeChanged || isStrokeChanged;
|
|
42788
|
-
|
|
42930
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_UV);
|
|
42931
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
|
|
42932
|
+
this.inited |= BuilderFlag.VERTEX_STEP_AND_UV;
|
|
42789
42933
|
this.pointId = pointId;
|
|
42790
42934
|
var formatted = points.formatted;
|
|
42791
42935
|
this.pointCount = formatted.length;
|
|
@@ -42797,12 +42941,14 @@ var BuilderLineOfTriangles = /** @class */ (function (_super) {
|
|
|
42797
42941
|
this.strokeAlign = strokeAlign;
|
|
42798
42942
|
this.strokeWidth = strokeWidth;
|
|
42799
42943
|
this.strokeStyle = strokeStyle;
|
|
42944
|
+
this.texture = texture;
|
|
42945
|
+
this.textureTransformId = textureTransformId;
|
|
42800
42946
|
// Buffer
|
|
42801
42947
|
buffer.updateVertices();
|
|
42802
|
-
if (isVertexChanged || isTransformChanged) {
|
|
42948
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
42803
42949
|
buffer.updateSteps();
|
|
42804
42950
|
}
|
|
42805
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42951
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42806
42952
|
buffer.updateUvs();
|
|
42807
42953
|
}
|
|
42808
42954
|
var pointCount = this.pointCount;
|
|
@@ -42819,11 +42965,11 @@ var BuilderLineOfTriangles = /** @class */ (function (_super) {
|
|
|
42819
42965
|
var pointSizeY = pointSize.getY(0);
|
|
42820
42966
|
buildTriangleVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, TRIANGLE_WORLD_SIZE);
|
|
42821
42967
|
copyVertex(vertices, internalTransform, voffset, TRIANGLE_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
|
|
42822
|
-
if (isVertexChanged || isTransformChanged) {
|
|
42968
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
42823
42969
|
buildTriangleStep(steps, clippings, voffset, TRIANGLE_VERTEX_COUNT, strokeWidth, strokeStyle, TRIANGLE_WORLD_SIZE);
|
|
42824
42970
|
copyStep(steps, voffset, TRIANGLE_VERTEX_COUNT, pointCount);
|
|
42825
42971
|
}
|
|
42826
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42972
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42827
42973
|
buildTriangleUv(uvs, textureUvs, voffset, TRIANGLE_WORLD_SIZE);
|
|
42828
42974
|
copyUvs(uvs, voffset, TRIANGLE_VERTEX_COUNT, pointCount);
|
|
42829
42975
|
}
|
|
@@ -42837,10 +42983,10 @@ var BuilderLineOfTriangles = /** @class */ (function (_super) {
|
|
|
42837
42983
|
var pointSizeY = pointSize.getY(i);
|
|
42838
42984
|
var iv = voffset + i * TRIANGLE_VERTEX_COUNT;
|
|
42839
42985
|
buildTriangleVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, TRIANGLE_WORLD_SIZE);
|
|
42840
|
-
if (isVertexChanged || isTransformChanged) {
|
|
42986
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
42841
42987
|
buildTriangleStep(steps, clippings, iv, TRIANGLE_VERTEX_COUNT, strokeWidth, strokeStyle, TRIANGLE_WORLD_SIZE);
|
|
42842
42988
|
}
|
|
42843
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42989
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42844
42990
|
buildTriangleUv(uvs, textureUvs, iv, TRIANGLE_WORLD_SIZE);
|
|
42845
42991
|
}
|
|
42846
42992
|
}
|
|
@@ -43185,6 +43331,7 @@ var BuilderSemicircle = /** @class */ (function (_super) {
|
|
|
43185
43331
|
var voffset = this.vertexOffset;
|
|
43186
43332
|
buildSemicircleClipping(buffer.clippings, voffset);
|
|
43187
43333
|
buildSemicircleIndex(buffer.indices, voffset, this.indexOffset);
|
|
43334
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
43188
43335
|
};
|
|
43189
43336
|
BuilderSemicircle.prototype.update = function (buffer, shape) {
|
|
43190
43337
|
this.updateVertexAndStep(buffer, shape);
|
|
@@ -43206,7 +43353,9 @@ var BuilderSemicircle = /** @class */ (function (_super) {
|
|
|
43206
43353
|
var isStrokeChanged = this.strokeAlign !== strokeAlign ||
|
|
43207
43354
|
this.strokeWidth !== strokeWidth ||
|
|
43208
43355
|
this.strokeStyle !== strokeStyle;
|
|
43209
|
-
|
|
43356
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
|
|
43357
|
+
if (isNotInited || isSizeChanged || isTransformChanged || isStrokeChanged) {
|
|
43358
|
+
this.inited |= BuilderFlag.VERTEX_AND_STEP;
|
|
43210
43359
|
this.sizeX = sizeX;
|
|
43211
43360
|
this.sizeY = sizeY;
|
|
43212
43361
|
this.transformLocalId = transformLocalId;
|
|
@@ -43223,7 +43372,11 @@ var BuilderSemicircle = /** @class */ (function (_super) {
|
|
|
43223
43372
|
BuilderSemicircle.prototype.updateUv = function (buffer, shape) {
|
|
43224
43373
|
var texture = toTexture(shape);
|
|
43225
43374
|
var textureTransformId = toTextureTransformId(texture);
|
|
43226
|
-
|
|
43375
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
43376
|
+
if (isNotInited ||
|
|
43377
|
+
texture !== this.texture ||
|
|
43378
|
+
textureTransformId !== this.textureTransformId) {
|
|
43379
|
+
this.inited |= BuilderFlag.UV;
|
|
43227
43380
|
this.texture = texture;
|
|
43228
43381
|
this.textureTransformId = textureTransformId;
|
|
43229
43382
|
buffer.updateUvs();
|
|
@@ -43240,8 +43393,8 @@ var BuilderSemicircle = /** @class */ (function (_super) {
|
|
|
43240
43393
|
*/
|
|
43241
43394
|
var createSemicircleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
43242
43395
|
var tcount = toTextBufferCount(shape);
|
|
43243
|
-
var tvcount = tcount
|
|
43244
|
-
var ticount = tcount
|
|
43396
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
43397
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
43245
43398
|
var vcount = SEMICIRCLE_VERTEX_COUNT + tvcount;
|
|
43246
43399
|
var icount = SEMICIRCLE_INDEX_COUNT + ticount;
|
|
43247
43400
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -43324,6 +43477,7 @@ var BuilderTriangle = /** @class */ (function (_super) {
|
|
|
43324
43477
|
buffer.updateIndices();
|
|
43325
43478
|
buildTriangleClipping(buffer.clippings, this.vertexOffset);
|
|
43326
43479
|
buildTriangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
43480
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
43327
43481
|
};
|
|
43328
43482
|
BuilderTriangle.prototype.update = function (buffer, shape) {
|
|
43329
43483
|
this.updateVertexStepAndUv(buffer, shape);
|
|
@@ -43348,7 +43502,9 @@ var BuilderTriangle = /** @class */ (function (_super) {
|
|
|
43348
43502
|
var textureTransformId = toTextureTransformId(texture);
|
|
43349
43503
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
43350
43504
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
43351
|
-
|
|
43505
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_UV);
|
|
43506
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
|
|
43507
|
+
this.inited |= BuilderFlag.VERTEX_STEP_AND_UV;
|
|
43352
43508
|
this.sizeX = sizeX;
|
|
43353
43509
|
this.sizeY = sizeY;
|
|
43354
43510
|
this.transformLocalId = transformLocalId;
|
|
@@ -43360,11 +43516,11 @@ var BuilderTriangle = /** @class */ (function (_super) {
|
|
|
43360
43516
|
var voffset = this.vertexOffset;
|
|
43361
43517
|
buffer.updateVertices();
|
|
43362
43518
|
buildTriangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, TRIANGLE_WORLD_SIZE);
|
|
43363
|
-
if (isVertexChanged || isTransformChanged) {
|
|
43519
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
43364
43520
|
buffer.updateSteps();
|
|
43365
43521
|
buildTriangleStep(buffer.steps, buffer.clippings, voffset, TRIANGLE_VERTEX_COUNT, strokeWidth, strokeStyle, TRIANGLE_WORLD_SIZE);
|
|
43366
43522
|
}
|
|
43367
|
-
if (isVertexChanged || isTextureChanged) {
|
|
43523
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
43368
43524
|
buffer.updateUvs();
|
|
43369
43525
|
buildTriangleUv(buffer.uvs, toTextureUvs(texture), voffset, TRIANGLE_WORLD_SIZE);
|
|
43370
43526
|
}
|
|
@@ -43379,8 +43535,8 @@ var BuilderTriangle = /** @class */ (function (_super) {
|
|
|
43379
43535
|
*/
|
|
43380
43536
|
var createTriangleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
43381
43537
|
var tcount = toTextBufferCount(shape);
|
|
43382
|
-
var tvcount = tcount
|
|
43383
|
-
var ticount = tcount
|
|
43538
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
43539
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
43384
43540
|
var vcount = TRIANGLE_VERTEX_COUNT + tvcount;
|
|
43385
43541
|
var icount = TRIANGLE_INDEX_COUNT + ticount;
|
|
43386
43542
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -43417,13 +43573,14 @@ var BuilderTriangleRounded = /** @class */ (function (_super) {
|
|
|
43417
43573
|
__extends(BuilderTriangleRounded, _super);
|
|
43418
43574
|
function BuilderTriangleRounded(vertexOffset, indexOffset, vertexCount, indexCount) {
|
|
43419
43575
|
var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount) || this;
|
|
43420
|
-
_this.radius =
|
|
43421
|
-
_this.corner =
|
|
43576
|
+
_this.radius = 0;
|
|
43577
|
+
_this.corner = 0;
|
|
43422
43578
|
return _this;
|
|
43423
43579
|
}
|
|
43424
43580
|
BuilderTriangleRounded.prototype.init = function (buffer) {
|
|
43425
43581
|
buffer.updateIndices();
|
|
43426
43582
|
buildTriangleRoundedIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
43583
|
+
this.inited |= BuilderFlag.INDEX;
|
|
43427
43584
|
};
|
|
43428
43585
|
BuilderTriangleRounded.prototype.update = function (buffer, shape) {
|
|
43429
43586
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
@@ -43452,7 +43609,13 @@ var BuilderTriangleRounded = /** @class */ (function (_super) {
|
|
|
43452
43609
|
var textureTransformId = toTextureTransformId(texture);
|
|
43453
43610
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
43454
43611
|
var isVertexChanged = isSizeChanged || isRadiusChanged || isStrokeChanged;
|
|
43455
|
-
|
|
43612
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
43613
|
+
if (isNotInited ||
|
|
43614
|
+
isVertexChanged ||
|
|
43615
|
+
isTransformChanged ||
|
|
43616
|
+
isCornerChanged ||
|
|
43617
|
+
isTextureChanged) {
|
|
43618
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
43456
43619
|
this.sizeX = sizeX;
|
|
43457
43620
|
this.sizeY = sizeY;
|
|
43458
43621
|
this.radius = radius;
|
|
@@ -43466,15 +43629,15 @@ var BuilderTriangleRounded = /** @class */ (function (_super) {
|
|
|
43466
43629
|
var voffset = this.vertexOffset;
|
|
43467
43630
|
buffer.updateVertices();
|
|
43468
43631
|
buildTriangleRoundedVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, radius, shape.transform.internalTransform, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
43469
|
-
if (isRadiusChanged || isCornerChanged) {
|
|
43632
|
+
if (isNotInited || isRadiusChanged || isCornerChanged) {
|
|
43470
43633
|
buffer.updateClippings();
|
|
43471
43634
|
buildTriangleRoundedClipping(buffer.clippings, voffset, corner, radius);
|
|
43472
43635
|
}
|
|
43473
|
-
if (isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
43636
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
43474
43637
|
buffer.updateSteps();
|
|
43475
43638
|
buildTriangleRoundedStep(buffer.steps, buffer.clippings, voffset, strokeWidth, strokeStyle, shape.radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
43476
43639
|
}
|
|
43477
|
-
if (isVertexChanged || isTextureChanged) {
|
|
43640
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
43478
43641
|
buffer.updateUvs();
|
|
43479
43642
|
buildTriangleRoundedUv(buffer.uvs, voffset, toTextureUvs(texture), radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
43480
43643
|
}
|
|
@@ -43489,8 +43652,8 @@ var BuilderTriangleRounded = /** @class */ (function (_super) {
|
|
|
43489
43652
|
*/
|
|
43490
43653
|
var createTriangleRoundedUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
43491
43654
|
var tcount = toTextBufferCount(shape);
|
|
43492
|
-
var tvcount = tcount
|
|
43493
|
-
var ticount = tcount
|
|
43655
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
43656
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
43494
43657
|
var vcount = TRIANGLE_ROUNDED_VERTEX_COUNT + tvcount;
|
|
43495
43658
|
var icount = TRIANGLE_ROUNDED_INDEX_COUNT + ticount;
|
|
43496
43659
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -46897,7 +47060,7 @@ var DThemeWhiteBase = /** @class */ (function (_super) {
|
|
|
46897
47060
|
return 1;
|
|
46898
47061
|
};
|
|
46899
47062
|
DThemeWhiteBase.prototype.getBorderWidth = function (state) {
|
|
46900
|
-
return 1
|
|
47063
|
+
return 1;
|
|
46901
47064
|
};
|
|
46902
47065
|
DThemeWhiteBase.prototype.getBorderAlign = function (state) {
|
|
46903
47066
|
return 0;
|
|
@@ -46936,7 +47099,7 @@ var DThemeWhiteBase = /** @class */ (function (_super) {
|
|
|
46936
47099
|
return 0;
|
|
46937
47100
|
};
|
|
46938
47101
|
DThemeWhiteBase.prototype.getOutlineWidth = function (state) {
|
|
46939
|
-
return 1
|
|
47102
|
+
return 1;
|
|
46940
47103
|
};
|
|
46941
47104
|
DThemeWhiteBase.prototype.getOutlineOffset = function (state) {
|
|
46942
47105
|
return 0;
|
|
@@ -57894,7 +58057,7 @@ var DThemeDarkBase = /** @class */ (function (_super) {
|
|
|
57894
58057
|
return 1;
|
|
57895
58058
|
};
|
|
57896
58059
|
DThemeDarkBase.prototype.getBorderWidth = function (state) {
|
|
57897
|
-
return 1
|
|
58060
|
+
return 1;
|
|
57898
58061
|
};
|
|
57899
58062
|
DThemeDarkBase.prototype.getBorderAlign = function (state) {
|
|
57900
58063
|
return 0;
|
|
@@ -57933,7 +58096,7 @@ var DThemeDarkBase = /** @class */ (function (_super) {
|
|
|
57933
58096
|
return 0;
|
|
57934
58097
|
};
|
|
57935
58098
|
DThemeDarkBase.prototype.getOutlineWidth = function (state) {
|
|
57936
|
-
return 1
|
|
58099
|
+
return 1;
|
|
57937
58100
|
};
|
|
57938
58101
|
DThemeDarkBase.prototype.getOutlineOffset = function (state) {
|
|
57939
58102
|
return 0;
|
|
@@ -84852,7 +85015,7 @@ var DDiagramCanvas = /** @class */ (function (_super) {
|
|
|
84852
85015
|
var runtime = actionable.runtime;
|
|
84853
85016
|
if (runtime) {
|
|
84854
85017
|
var runtimeEffect = runtime.effect;
|
|
84855
|
-
if (time < runtimeEffect) {
|
|
85018
|
+
if (0 <= runtimeEffect && time < runtimeEffect) {
|
|
84856
85019
|
effect = effect < 0 ? runtimeEffect : Math.min(effect, runtimeEffect);
|
|
84857
85020
|
}
|
|
84858
85021
|
}
|
|
@@ -84873,7 +85036,7 @@ var DDiagramCanvas = /** @class */ (function (_super) {
|
|
|
84873
85036
|
var runtime = actionable.runtime;
|
|
84874
85037
|
if (runtime) {
|
|
84875
85038
|
var runtimeEffect = runtime.effect;
|
|
84876
|
-
if (time < runtimeEffect) {
|
|
85039
|
+
if (0 <= runtimeEffect && time < runtimeEffect) {
|
|
84877
85040
|
effect = effect < 0 ? runtimeEffect : Math.min(effect, runtimeEffect);
|
|
84878
85041
|
}
|
|
84879
85042
|
}
|
|
@@ -91747,9 +91910,9 @@ var DTableDataListSelection = /** @class */ (function (_super) {
|
|
|
91747
91910
|
get: function () {
|
|
91748
91911
|
var indices = this._indices;
|
|
91749
91912
|
if (0 < indices.size) {
|
|
91750
|
-
var result_1 =
|
|
91913
|
+
var result_1 = -1;
|
|
91751
91914
|
indices.forEach(function (index) {
|
|
91752
|
-
if (result_1
|
|
91915
|
+
if (result_1 < 0) {
|
|
91753
91916
|
result_1 = index;
|
|
91754
91917
|
}
|
|
91755
91918
|
});
|
|
@@ -96502,6 +96665,7 @@ exports.BAR_VERTEX_COUNT = BAR_VERTEX_COUNT;
|
|
|
96502
96665
|
exports.BuilderBar = BuilderBar;
|
|
96503
96666
|
exports.BuilderBase = BuilderBase;
|
|
96504
96667
|
exports.BuilderCircle = BuilderCircle;
|
|
96668
|
+
exports.BuilderFlag = BuilderFlag;
|
|
96505
96669
|
exports.BuilderImageSdf = BuilderImageSdf;
|
|
96506
96670
|
exports.BuilderLabel = BuilderLabel;
|
|
96507
96671
|
exports.BuilderLine = BuilderLine;
|
|
@@ -97890,7 +98054,9 @@ exports.SEMICIRCLE_VERTEX_COUNT = SEMICIRCLE_VERTEX_COUNT;
|
|
|
97890
98054
|
exports.SEMICIRCLE_WORLD_SIZE = SEMICIRCLE_WORLD_SIZE;
|
|
97891
98055
|
exports.TEXT_FMIN = TEXT_FMIN;
|
|
97892
98056
|
exports.TEXT_INDEX_COUNT = TEXT_INDEX_COUNT;
|
|
98057
|
+
exports.TEXT_INDEX_COUNT_SHIFT = TEXT_INDEX_COUNT_SHIFT;
|
|
97893
98058
|
exports.TEXT_VERTEX_COUNT = TEXT_VERTEX_COUNT;
|
|
98059
|
+
exports.TEXT_VERTEX_COUNT_SHIFT = TEXT_VERTEX_COUNT_SHIFT;
|
|
97894
98060
|
exports.TRIANGLE_INDEX_COUNT = TRIANGLE_INDEX_COUNT;
|
|
97895
98061
|
exports.TRIANGLE_ROUNDED_INDEX_COUNT = TRIANGLE_ROUNDED_INDEX_COUNT;
|
|
97896
98062
|
exports.TRIANGLE_ROUNDED_VERTEX_COUNT = TRIANGLE_ROUNDED_VERTEX_COUNT;
|