@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.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
|
|
|
@@ -480,11 +480,14 @@
|
|
|
480
480
|
};
|
|
481
481
|
|
|
482
482
|
var TEXT_VERTEX_COUNT = 4;
|
|
483
|
+
var TEXT_VERTEX_COUNT_SHIFT = 2;
|
|
483
484
|
var TEXT_INDEX_COUNT = 2;
|
|
485
|
+
var TEXT_INDEX_COUNT_SHIFT = 1;
|
|
484
486
|
var TEXT_FMIN = 0.00001;
|
|
485
487
|
var TEXT_WORK_POINT = new pixi_js.Point();
|
|
486
488
|
var toTextBufferCount = function (shape) {
|
|
487
|
-
|
|
489
|
+
var l = shape.text.value.length;
|
|
490
|
+
return ((l >> 3) + (0 < (l & 0x7) ? 1 : 0)) << 3;
|
|
488
491
|
};
|
|
489
492
|
var buildTextClipping = function (clippings, voffset, vcount) {
|
|
490
493
|
var ic = voffset * 3 - 1;
|
|
@@ -983,7 +986,7 @@
|
|
|
983
986
|
//
|
|
984
987
|
var tx0 = 0;
|
|
985
988
|
var ty0 = 0;
|
|
986
|
-
var lineWidthMaximum =
|
|
989
|
+
var lineWidthMaximum = width;
|
|
987
990
|
switch (textDirection) {
|
|
988
991
|
case EShapeTextDirection.LEFT_TO_RIGHT:
|
|
989
992
|
getTextBBox(textAlignHorizontal, textAlignVertical, textOffsetHorizontal, textOffsetVertical, textPaddingHorizontal, textPaddingVertical, width, height, x0, y0, x1, y1, x2, y2, x3, y3, hnx, hny, vnx, vny, work);
|
|
@@ -1418,6 +1421,27 @@
|
|
|
1418
1421
|
FORMATTER_CURVE: FORMATTER_CURVE
|
|
1419
1422
|
};
|
|
1420
1423
|
|
|
1424
|
+
/*
|
|
1425
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
1426
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1427
|
+
*/
|
|
1428
|
+
var BuilderFlag = {
|
|
1429
|
+
NONE: 0,
|
|
1430
|
+
VERTEX: 1,
|
|
1431
|
+
CLIPPING: 2,
|
|
1432
|
+
STEP: 4,
|
|
1433
|
+
COLOR_FILL: 8,
|
|
1434
|
+
COLOR_STROKE: 16,
|
|
1435
|
+
UV: 32,
|
|
1436
|
+
INDEX: 64,
|
|
1437
|
+
VERTEX_AND_STEP: 5,
|
|
1438
|
+
VERTEX_STEP_AND_UV: 37,
|
|
1439
|
+
VERTEX_STEP_AND_COLOR_FILL: 13,
|
|
1440
|
+
VERTEX_CLIPPING_STEP_AND_UV: 39,
|
|
1441
|
+
CLIPPING_AND_INDEX: 66,
|
|
1442
|
+
ALL: 127
|
|
1443
|
+
};
|
|
1444
|
+
|
|
1421
1445
|
var buildColor = function (color, alpha, voffset, vcount, colors) {
|
|
1422
1446
|
var r = (((color >> 16) & 0xff) / 255.0) * alpha;
|
|
1423
1447
|
var g = (((color >> 8) & 0xff) / 255.0) * alpha;
|
|
@@ -1433,6 +1457,27 @@
|
|
|
1433
1457
|
}
|
|
1434
1458
|
};
|
|
1435
1459
|
|
|
1460
|
+
/*
|
|
1461
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
1462
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1463
|
+
*/
|
|
1464
|
+
var TOP$1 = 1;
|
|
1465
|
+
var RIGHT$1 = 2;
|
|
1466
|
+
var BOTTOM$1 = 4;
|
|
1467
|
+
var LEFT$1 = 8;
|
|
1468
|
+
var EShapeStrokeSide = {
|
|
1469
|
+
NONE: 0,
|
|
1470
|
+
TOP: TOP$1,
|
|
1471
|
+
RIGHT: RIGHT$1,
|
|
1472
|
+
BOTTOM: BOTTOM$1,
|
|
1473
|
+
LEFT: LEFT$1,
|
|
1474
|
+
TOP_OR_LEFT: TOP$1 | LEFT$1,
|
|
1475
|
+
TOP_OR_RIGHT: TOP$1 | RIGHT$1,
|
|
1476
|
+
BOTTOM_OR_LEFT: BOTTOM$1 | LEFT$1,
|
|
1477
|
+
BOTTOM_OR_RIGHT: BOTTOM$1 | RIGHT$1,
|
|
1478
|
+
ALL: TOP$1 | RIGHT$1 | BOTTOM$1 | LEFT$1
|
|
1479
|
+
};
|
|
1480
|
+
|
|
1436
1481
|
/*
|
|
1437
1482
|
* Copyright (C) 2019 Toshiba Corporation
|
|
1438
1483
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1443,29 +1488,31 @@
|
|
|
1443
1488
|
this.indexOffset = indexOffset;
|
|
1444
1489
|
this.vertexCount = vertexCount;
|
|
1445
1490
|
this.indexCount = indexCount;
|
|
1446
|
-
this.
|
|
1447
|
-
this.
|
|
1491
|
+
this.inited = BuilderFlag.NONE;
|
|
1492
|
+
this.sizeX = 0;
|
|
1493
|
+
this.sizeY = 0;
|
|
1448
1494
|
this.transformLocalId = -1;
|
|
1449
|
-
this.strokeAlign =
|
|
1450
|
-
this.strokeWidth =
|
|
1451
|
-
this.strokeSide =
|
|
1452
|
-
this.strokeStyle =
|
|
1453
|
-
this.colorFill =
|
|
1454
|
-
this.alphaFill =
|
|
1455
|
-
this.colorStroke =
|
|
1456
|
-
this.alphaStroke =
|
|
1495
|
+
this.strokeAlign = 0;
|
|
1496
|
+
this.strokeWidth = 0;
|
|
1497
|
+
this.strokeSide = EShapeStrokeSide.NONE;
|
|
1498
|
+
this.strokeStyle = EShapeStrokeStyle.NONE;
|
|
1499
|
+
this.colorFill = 0;
|
|
1500
|
+
this.alphaFill = 0;
|
|
1501
|
+
this.colorStroke = 0;
|
|
1502
|
+
this.alphaStroke = 0;
|
|
1457
1503
|
this.texture = null;
|
|
1458
|
-
this.textureTransformId =
|
|
1504
|
+
this.textureTransformId = -1;
|
|
1459
1505
|
}
|
|
1460
1506
|
BuilderBase.prototype.isCompatible = function (shape) {
|
|
1461
1507
|
return true;
|
|
1462
1508
|
};
|
|
1463
1509
|
BuilderBase.prototype.updateColorFill = function (buffer, shape) {
|
|
1464
1510
|
var fill = shape.fill;
|
|
1465
|
-
var isEnabled = shape.visible && fill.enable;
|
|
1466
1511
|
var color = fill.color;
|
|
1467
|
-
var alpha =
|
|
1468
|
-
|
|
1512
|
+
var alpha = shape.visible && fill.enable ? fill.alpha : 0;
|
|
1513
|
+
var isNotInited = !(this.inited & BuilderFlag.COLOR_FILL);
|
|
1514
|
+
if (isNotInited || color !== this.colorFill || alpha !== this.alphaFill) {
|
|
1515
|
+
this.inited |= BuilderFlag.COLOR_FILL;
|
|
1469
1516
|
this.colorFill = color;
|
|
1470
1517
|
this.alphaFill = alpha;
|
|
1471
1518
|
buffer.updateColorFills();
|
|
@@ -1474,10 +1521,11 @@
|
|
|
1474
1521
|
};
|
|
1475
1522
|
BuilderBase.prototype.updateColorStroke = function (buffer, shape) {
|
|
1476
1523
|
var stroke = shape.stroke;
|
|
1477
|
-
var isEnabled = shape.visible && stroke.enable && 0 < stroke.width;
|
|
1478
1524
|
var color = stroke.color;
|
|
1479
|
-
var alpha =
|
|
1480
|
-
|
|
1525
|
+
var alpha = shape.visible && stroke.enable && 0 < stroke.width ? stroke.alpha : 0;
|
|
1526
|
+
var isNotInited = !(this.inited & BuilderFlag.COLOR_STROKE);
|
|
1527
|
+
if (isNotInited || color !== this.colorStroke || alpha !== this.alphaStroke) {
|
|
1528
|
+
this.inited |= BuilderFlag.COLOR_STROKE;
|
|
1481
1529
|
this.colorStroke = color;
|
|
1482
1530
|
this.alphaStroke = alpha;
|
|
1483
1531
|
buffer.updateColorStrokes();
|
|
@@ -4704,9 +4752,9 @@
|
|
|
4704
4752
|
_this._lockTransformThis = new EShapeLock();
|
|
4705
4753
|
_this._lockTransformParent = new EShapeLock();
|
|
4706
4754
|
_this._lockUploaded = new EShapeLock();
|
|
4707
|
-
_this._boundsTransformId =
|
|
4708
|
-
_this._boundsInternalTransformId =
|
|
4709
|
-
_this._boundsLocalTransformId =
|
|
4755
|
+
_this._boundsTransformId = -1;
|
|
4756
|
+
_this._boundsInternalTransformId = -1;
|
|
4757
|
+
_this._boundsLocalTransformId = -1;
|
|
4710
4758
|
_this.interactive = false;
|
|
4711
4759
|
//
|
|
4712
4760
|
_this.parent = null;
|
|
@@ -4721,9 +4769,9 @@
|
|
|
4721
4769
|
return new EShapeTransformImpl(this);
|
|
4722
4770
|
};
|
|
4723
4771
|
EShapeBase.prototype.onSizeChange = function () {
|
|
4724
|
-
this._boundsTransformId =
|
|
4725
|
-
this._boundsInternalTransformId =
|
|
4726
|
-
this._boundsLocalTransformId =
|
|
4772
|
+
this._boundsTransformId = -1;
|
|
4773
|
+
this._boundsInternalTransformId = -1;
|
|
4774
|
+
this._boundsLocalTransformId = -1;
|
|
4727
4775
|
if (!this._lockTransformChild.isLocked()) {
|
|
4728
4776
|
this.callChildTransformChange();
|
|
4729
4777
|
}
|
|
@@ -8120,27 +8168,6 @@
|
|
|
8120
8168
|
return false;
|
|
8121
8169
|
};
|
|
8122
8170
|
|
|
8123
|
-
/*
|
|
8124
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
8125
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
8126
|
-
*/
|
|
8127
|
-
var TOP$1 = 1;
|
|
8128
|
-
var RIGHT$1 = 2;
|
|
8129
|
-
var BOTTOM$1 = 4;
|
|
8130
|
-
var LEFT$1 = 8;
|
|
8131
|
-
var EShapeStrokeSide = {
|
|
8132
|
-
NONE: 0,
|
|
8133
|
-
TOP: TOP$1,
|
|
8134
|
-
RIGHT: RIGHT$1,
|
|
8135
|
-
BOTTOM: BOTTOM$1,
|
|
8136
|
-
LEFT: LEFT$1,
|
|
8137
|
-
TOP_OR_LEFT: TOP$1 | LEFT$1,
|
|
8138
|
-
TOP_OR_RIGHT: TOP$1 | RIGHT$1,
|
|
8139
|
-
BOTTOM_OR_LEFT: BOTTOM$1 | LEFT$1,
|
|
8140
|
-
BOTTOM_OR_RIGHT: BOTTOM$1 | RIGHT$1,
|
|
8141
|
-
ALL: TOP$1 | RIGHT$1 | BOTTOM$1 | LEFT$1
|
|
8142
|
-
};
|
|
8143
|
-
|
|
8144
8171
|
/*
|
|
8145
8172
|
* Copyright (C) 2019 Toshiba Corporation
|
|
8146
8173
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -8460,7 +8487,7 @@
|
|
|
8460
8487
|
__extends(BuilderBar, _super);
|
|
8461
8488
|
function BuilderBar(vertexOffset, indexOffset) {
|
|
8462
8489
|
var _this = _super.call(this, vertexOffset, indexOffset, BAR_VERTEX_COUNT, BAR_INDEX_COUNT) || this;
|
|
8463
|
-
_this.pointsId =
|
|
8490
|
+
_this.pointsId = -1;
|
|
8464
8491
|
_this.pointsStyle = EShapePointsStyle.NONE;
|
|
8465
8492
|
return _this;
|
|
8466
8493
|
}
|
|
@@ -8471,6 +8498,7 @@
|
|
|
8471
8498
|
buffer.updateIndices();
|
|
8472
8499
|
buildBarClipping(buffer.clippings, voffset);
|
|
8473
8500
|
buildBarIndex(buffer.indices, voffset, ioffset);
|
|
8501
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
8474
8502
|
};
|
|
8475
8503
|
BuilderBar.prototype.update = function (buffer, shape) {
|
|
8476
8504
|
this.updateVertexStepAndColorFill(buffer, shape);
|
|
@@ -8494,11 +8522,14 @@
|
|
|
8494
8522
|
var isPointsIdChanged = pointsId !== this.pointsId;
|
|
8495
8523
|
var pointsStyle = points.style;
|
|
8496
8524
|
var isPointsStyleChanged = pointsStyle !== this.pointsStyle;
|
|
8497
|
-
|
|
8525
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_COLOR_FILL);
|
|
8526
|
+
if (isNotInited ||
|
|
8527
|
+
isSizeChanged ||
|
|
8498
8528
|
isTransformChanged ||
|
|
8499
8529
|
isStrokeWidthChanged ||
|
|
8500
8530
|
isPointsIdChanged ||
|
|
8501
8531
|
isPointsStyleChanged) {
|
|
8532
|
+
this.inited |= BuilderFlag.VERTEX_STEP_AND_COLOR_FILL;
|
|
8502
8533
|
this.sizeX = sizeX;
|
|
8503
8534
|
this.sizeY = sizeY;
|
|
8504
8535
|
this.strokeWidth = strokeWidth;
|
|
@@ -8507,8 +8538,8 @@
|
|
|
8507
8538
|
this.pointsId = pointsId;
|
|
8508
8539
|
this.pointsStyle = pointsStyle;
|
|
8509
8540
|
if (isPointsIdChanged) {
|
|
8510
|
-
// Invalidate the
|
|
8511
|
-
this.
|
|
8541
|
+
// Invalidate the UV buffer
|
|
8542
|
+
this.inited &= ~BuilderFlag.UV;
|
|
8512
8543
|
}
|
|
8513
8544
|
buffer.updateVertices();
|
|
8514
8545
|
buffer.updateSteps();
|
|
@@ -8520,7 +8551,11 @@
|
|
|
8520
8551
|
BuilderBar.prototype.updateUv = function (buffer, shape) {
|
|
8521
8552
|
var texture = toTexture(shape);
|
|
8522
8553
|
var textureTransformId = toTextureTransformId(texture);
|
|
8523
|
-
|
|
8554
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
8555
|
+
if (isNotInited ||
|
|
8556
|
+
texture !== this.texture ||
|
|
8557
|
+
textureTransformId !== this.textureTransformId) {
|
|
8558
|
+
this.inited |= BuilderFlag.UV;
|
|
8524
8559
|
this.texture = texture;
|
|
8525
8560
|
this.textureTransformId = textureTransformId;
|
|
8526
8561
|
buffer.updateUvs();
|
|
@@ -8540,32 +8575,33 @@
|
|
|
8540
8575
|
this.indexOffset = indexOffset;
|
|
8541
8576
|
this.vertexCount = vertexCount;
|
|
8542
8577
|
this.indexCount = indexCount;
|
|
8543
|
-
this.
|
|
8544
|
-
this.
|
|
8545
|
-
this.
|
|
8578
|
+
this.inited = BuilderFlag.NONE;
|
|
8579
|
+
this.sizeX = 0;
|
|
8580
|
+
this.sizeY = 0;
|
|
8581
|
+
this.transformLocalId = 0;
|
|
8546
8582
|
this.scaleX = 1;
|
|
8547
8583
|
this.scaleY = 1;
|
|
8548
|
-
this.size =
|
|
8584
|
+
this.size = 0;
|
|
8549
8585
|
this.family = "auto";
|
|
8550
8586
|
this.value = "";
|
|
8551
8587
|
this.texture = null;
|
|
8552
|
-
this.textureTransformId =
|
|
8553
|
-
this.color =
|
|
8554
|
-
this.alpha =
|
|
8555
|
-
this.weight =
|
|
8556
|
-
this.style =
|
|
8557
|
-
this.alignHorizontal =
|
|
8558
|
-
this.alignVertical =
|
|
8559
|
-
this.offsetHorizontal =
|
|
8560
|
-
this.offsetVertical =
|
|
8561
|
-
this.outlineWidth =
|
|
8562
|
-
this.outlineColor =
|
|
8563
|
-
this.outlineAlpha =
|
|
8564
|
-
this.spacingHorizontal =
|
|
8565
|
-
this.spacingVertical =
|
|
8566
|
-
this.direction =
|
|
8567
|
-
this.paddingHorizontal =
|
|
8568
|
-
this.paddingVertical =
|
|
8588
|
+
this.textureTransformId = 0;
|
|
8589
|
+
this.color = 0;
|
|
8590
|
+
this.alpha = 0;
|
|
8591
|
+
this.weight = 0;
|
|
8592
|
+
this.style = 0;
|
|
8593
|
+
this.alignHorizontal = 0;
|
|
8594
|
+
this.alignVertical = 0;
|
|
8595
|
+
this.offsetHorizontal = 0;
|
|
8596
|
+
this.offsetVertical = 0;
|
|
8597
|
+
this.outlineWidth = 0;
|
|
8598
|
+
this.outlineColor = 0;
|
|
8599
|
+
this.outlineAlpha = 0;
|
|
8600
|
+
this.spacingHorizontal = 0;
|
|
8601
|
+
this.spacingVertical = 0;
|
|
8602
|
+
this.direction = 0;
|
|
8603
|
+
this.paddingHorizontal = 0;
|
|
8604
|
+
this.paddingVertical = 0;
|
|
8569
8605
|
this.clipping = false;
|
|
8570
8606
|
this.fitting = false;
|
|
8571
8607
|
}
|
|
@@ -8580,9 +8616,10 @@
|
|
|
8580
8616
|
buffer.updateIndices();
|
|
8581
8617
|
buildTextIndex(buffer.indices, voffset, this.indexOffset, this.indexCount);
|
|
8582
8618
|
}
|
|
8619
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
8583
8620
|
};
|
|
8584
8621
|
BuilderText.prototype.isCompatible = function (shape) {
|
|
8585
|
-
return toTextBufferCount(shape)
|
|
8622
|
+
return toTextBufferCount(shape) << TEXT_VERTEX_COUNT_SHIFT === this.vertexCount;
|
|
8586
8623
|
};
|
|
8587
8624
|
BuilderText.prototype.update = function (buffer, shape) {
|
|
8588
8625
|
var vcount = this.vertexCount;
|
|
@@ -8636,7 +8673,9 @@
|
|
|
8636
8673
|
var isClippingChanged = this.clipping !== textClipping;
|
|
8637
8674
|
var isFittingChanged = this.fitting !== textFitting;
|
|
8638
8675
|
var isTextureChanged = textTexture !== this.texture || textTextureTransformId !== this.textureTransformId;
|
|
8639
|
-
|
|
8676
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX);
|
|
8677
|
+
if (isNotInited ||
|
|
8678
|
+
isSizeChanged ||
|
|
8640
8679
|
isTransformChanged ||
|
|
8641
8680
|
isCharChanged ||
|
|
8642
8681
|
isCharSizeChanged ||
|
|
@@ -8648,6 +8687,7 @@
|
|
|
8648
8687
|
isClippingChanged ||
|
|
8649
8688
|
isFittingChanged ||
|
|
8650
8689
|
isTextureChanged) {
|
|
8690
|
+
this.inited |= BuilderFlag.VERTEX;
|
|
8651
8691
|
this.size = textSize;
|
|
8652
8692
|
this.family = textFamily;
|
|
8653
8693
|
this.value = textValue;
|
|
@@ -8666,8 +8706,8 @@
|
|
|
8666
8706
|
this.texture = textTexture;
|
|
8667
8707
|
this.textureTransformId = textTextureTransformId;
|
|
8668
8708
|
if (isCharSizeChanged || isFittingChanged || (textFitting && isSizeChanged)) {
|
|
8669
|
-
// Invalidate the
|
|
8670
|
-
this.
|
|
8709
|
+
// Invalidate the step buffer.
|
|
8710
|
+
this.inited &= ~BuilderFlag.STEP;
|
|
8671
8711
|
}
|
|
8672
8712
|
// Vertices & UVs
|
|
8673
8713
|
buffer.updateVertices();
|
|
@@ -8685,7 +8725,9 @@
|
|
|
8685
8725
|
var text = shape.text;
|
|
8686
8726
|
var color = text.color;
|
|
8687
8727
|
var alpha = shape.visible && text.enable ? text.alpha : 0;
|
|
8688
|
-
|
|
8728
|
+
var isNotInited = !(this.inited & BuilderFlag.COLOR_FILL);
|
|
8729
|
+
if (isNotInited || color !== this.color || alpha !== this.alpha) {
|
|
8730
|
+
this.inited |= BuilderFlag.COLOR_FILL;
|
|
8689
8731
|
this.color = color;
|
|
8690
8732
|
this.alpha = alpha;
|
|
8691
8733
|
buffer.updateColorFills();
|
|
@@ -8697,7 +8739,9 @@
|
|
|
8697
8739
|
var outline = text.outline;
|
|
8698
8740
|
var color = outline.color;
|
|
8699
8741
|
var alpha = shape.visible && text.enable ? outline.alpha : 0;
|
|
8700
|
-
|
|
8742
|
+
var isNotInited = !(this.inited & BuilderFlag.COLOR_STROKE);
|
|
8743
|
+
if (isNotInited || color !== this.outlineColor || alpha !== this.outlineAlpha) {
|
|
8744
|
+
this.inited |= BuilderFlag.COLOR_STROKE;
|
|
8701
8745
|
this.outlineColor = color;
|
|
8702
8746
|
this.outlineAlpha = alpha;
|
|
8703
8747
|
buffer.updateColorStrokes();
|
|
@@ -8720,7 +8764,9 @@
|
|
|
8720
8764
|
}
|
|
8721
8765
|
var isScaleChanged = TEXT_FMIN < Math.abs(this.scaleX - scaleX) ||
|
|
8722
8766
|
TEXT_FMIN < Math.abs(this.scaleY - scaleY);
|
|
8723
|
-
|
|
8767
|
+
var isNotInited = !(this.inited & BuilderFlag.STEP);
|
|
8768
|
+
if (isNotInited || isWeightChanged || isOutlineWidthChanged || isScaleChanged) {
|
|
8769
|
+
this.inited |= BuilderFlag.STEP;
|
|
8724
8770
|
this.weight = textWeight;
|
|
8725
8771
|
this.outlineWidth = textOutlineWidth;
|
|
8726
8772
|
this.scaleX = scaleX;
|
|
@@ -8748,8 +8794,8 @@
|
|
|
8748
8794
|
*/
|
|
8749
8795
|
var createBarUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
8750
8796
|
var tcount = toTextBufferCount(shape);
|
|
8751
|
-
var tvcount = tcount
|
|
8752
|
-
var ticount = tcount
|
|
8797
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
8798
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
8753
8799
|
var vcount = BAR_VERTEX_COUNT + tvcount;
|
|
8754
8800
|
var icount = BAR_INDEX_COUNT + ticount;
|
|
8755
8801
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -11798,7 +11844,7 @@
|
|
|
11798
11844
|
DBaseBackgroundMeshGeometry.prototype.fillVertices = function (vertices, uvs, iv, iuv, n, x, y, r, dr, table) {
|
|
11799
11845
|
var cos = table.cos;
|
|
11800
11846
|
var sin = table.sin;
|
|
11801
|
-
var r1 = r +
|
|
11847
|
+
var r1 = r + dr;
|
|
11802
11848
|
for (var i = 0; i < n; ++i) {
|
|
11803
11849
|
var c = cos[i];
|
|
11804
11850
|
var s = sin[i];
|
|
@@ -12103,8 +12149,8 @@
|
|
|
12103
12149
|
var hw = 0.5 * borderWidth;
|
|
12104
12150
|
var r1 = r - hw;
|
|
12105
12151
|
var r2 = r + hw;
|
|
12106
|
-
var r0 = r1 -
|
|
12107
|
-
var r3 = r2 +
|
|
12152
|
+
var r0 = r1 - dr;
|
|
12153
|
+
var r3 = r2 + dr;
|
|
12108
12154
|
var cos = table.cos;
|
|
12109
12155
|
var sin = table.sin;
|
|
12110
12156
|
if (r0 < 0) {
|
|
@@ -12536,7 +12582,7 @@
|
|
|
12536
12582
|
borderMesh.y = -borderOffset;
|
|
12537
12583
|
borderMesh.width = width + borderOffset * 2;
|
|
12538
12584
|
borderMesh.height = height + borderOffset * 2;
|
|
12539
|
-
borderMesh.cornerRadius = cornerRadius;
|
|
12585
|
+
borderMesh.cornerRadius = Math.max(0, cornerRadius + borderOffset);
|
|
12540
12586
|
borderMesh.cornerMask = cornerMask;
|
|
12541
12587
|
borderMesh.borderWidth = borderWidth;
|
|
12542
12588
|
borderMesh.borderMask = borderMask;
|
|
@@ -21969,9 +22015,9 @@
|
|
|
21969
22015
|
_this._atlas = null;
|
|
21970
22016
|
_this._fontAtlases = new DynamicSDFFontAtlases();
|
|
21971
22017
|
_this._pixelScale = 1;
|
|
21972
|
-
_this._pixelScaleId =
|
|
22018
|
+
_this._pixelScaleId = -2; // Since this._shapeScaleId starts from -1.
|
|
21973
22019
|
_this._shapeScale = 1;
|
|
21974
|
-
_this._shapeScaleId =
|
|
22020
|
+
_this._shapeScaleId = -1; // Since PIXI.Transform._worldID starts from zero.
|
|
21975
22021
|
_this._work = new pixi_js.Point();
|
|
21976
22022
|
_this._buffers = [];
|
|
21977
22023
|
return _this;
|
|
@@ -24305,7 +24351,7 @@
|
|
|
24305
24351
|
this.cursor = shape.cursor;
|
|
24306
24352
|
this.reset = EShapeRuntimeReset.NONE;
|
|
24307
24353
|
this.written = EShapeRuntimeReset.NONE;
|
|
24308
|
-
this.effect =
|
|
24354
|
+
this.effect = -1;
|
|
24309
24355
|
this.isStateChanged = false;
|
|
24310
24356
|
this.interactive = false;
|
|
24311
24357
|
}
|
|
@@ -24635,12 +24681,13 @@
|
|
|
24635
24681
|
};
|
|
24636
24682
|
EShapeRuntimeImpl.prototype.update = function (shape, time) {
|
|
24637
24683
|
var data = shape.data;
|
|
24638
|
-
var
|
|
24684
|
+
var effect = this.effect;
|
|
24685
|
+
var isEffectTimeUp = 0 <= effect && effect <= time;
|
|
24639
24686
|
if (data.isChanged || this.isStateChanged || isEffectTimeUp) {
|
|
24640
24687
|
this.isStateChanged = false;
|
|
24641
24688
|
data.isChanged = false;
|
|
24642
24689
|
if (isEffectTimeUp) {
|
|
24643
|
-
this.effect =
|
|
24690
|
+
this.effect = -1;
|
|
24644
24691
|
}
|
|
24645
24692
|
shape.lock(EShapeLockPart.UPLOADED);
|
|
24646
24693
|
this.onUpdate(shape, time);
|
|
@@ -35718,13 +35765,14 @@
|
|
|
35718
35765
|
__extends(BuilderRectangleRounded, _super);
|
|
35719
35766
|
function BuilderRectangleRounded(vertexOffset, indexOffset, vertexCount, indexCount) {
|
|
35720
35767
|
var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount) || this;
|
|
35721
|
-
_this.radius =
|
|
35722
|
-
_this.corner =
|
|
35768
|
+
_this.radius = 0;
|
|
35769
|
+
_this.corner = 0;
|
|
35723
35770
|
return _this;
|
|
35724
35771
|
}
|
|
35725
35772
|
BuilderRectangleRounded.prototype.init = function (buffer) {
|
|
35726
35773
|
buffer.updateIndices();
|
|
35727
35774
|
buildRectangleRoundedIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
35775
|
+
this.inited |= BuilderFlag.INDEX;
|
|
35728
35776
|
};
|
|
35729
35777
|
BuilderRectangleRounded.prototype.update = function (buffer, shape) {
|
|
35730
35778
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
@@ -35754,7 +35802,13 @@
|
|
|
35754
35802
|
var textureTransformId = toTextureTransformId(texture);
|
|
35755
35803
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
35756
35804
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
35757
|
-
|
|
35805
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
35806
|
+
if (isNotInited ||
|
|
35807
|
+
isVertexChanged ||
|
|
35808
|
+
isTransformChanged ||
|
|
35809
|
+
isCornerChanged ||
|
|
35810
|
+
isTextureChanged) {
|
|
35811
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
35758
35812
|
this.sizeX = sizeX;
|
|
35759
35813
|
this.sizeY = sizeY;
|
|
35760
35814
|
this.radius = radius;
|
|
@@ -35771,17 +35825,17 @@
|
|
|
35771
35825
|
buffer.updateVertices();
|
|
35772
35826
|
buildRectangleRoundedVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, radius, shape.transform.internalTransform, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
35773
35827
|
// Steps
|
|
35774
|
-
if (isVertexChanged || isCornerChanged || isTransformChanged) {
|
|
35828
|
+
if (isNotInited || isVertexChanged || isCornerChanged || isTransformChanged) {
|
|
35775
35829
|
buffer.updateSteps();
|
|
35776
35830
|
buildRectangleRoundedStep(buffer.steps, voffset, strokeWidth, strokeSide, strokeStyle, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
35777
35831
|
}
|
|
35778
35832
|
// Clippings
|
|
35779
|
-
if (isVertexChanged || isCornerChanged) {
|
|
35833
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
35780
35834
|
buffer.updateClippings();
|
|
35781
35835
|
buildRectangleRoundedClipping(buffer.clippings, voffset, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
35782
35836
|
}
|
|
35783
35837
|
// UVs
|
|
35784
|
-
if (isVertexChanged || isTextureChanged) {
|
|
35838
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
35785
35839
|
buffer.updateUvs();
|
|
35786
35840
|
buildRectangleRoundedUv(buffer.uvs, voffset, toTextureUvs(texture), RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
35787
35841
|
}
|
|
@@ -35796,8 +35850,8 @@
|
|
|
35796
35850
|
*/
|
|
35797
35851
|
var createRectangleRoundedUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
35798
35852
|
var tcount = toTextBufferCount(shape);
|
|
35799
|
-
var tvcount = tcount
|
|
35800
|
-
var ticount = tcount
|
|
35853
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
35854
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
35801
35855
|
var vcount = RECTANGLE_ROUNDED_VERTEX_COUNT + tvcount;
|
|
35802
35856
|
var icount = RECTANGLE_ROUNDED_INDEX_COUNT + ticount;
|
|
35803
35857
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -36683,6 +36737,7 @@
|
|
|
36683
36737
|
var voffset = this.vertexOffset;
|
|
36684
36738
|
buildCircleClipping(buffer.clippings, voffset);
|
|
36685
36739
|
buildCircleIndex(buffer.indices, voffset, this.indexOffset);
|
|
36740
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
36686
36741
|
};
|
|
36687
36742
|
BuilderCircle.prototype.update = function (buffer, shape) {
|
|
36688
36743
|
this.updateVertexAndStep(buffer, shape);
|
|
@@ -36704,7 +36759,9 @@
|
|
|
36704
36759
|
var isStrokeChanged = this.strokeAlign !== strokeAlign ||
|
|
36705
36760
|
this.strokeWidth !== strokeWidth ||
|
|
36706
36761
|
this.strokeStyle !== strokeStyle;
|
|
36707
|
-
|
|
36762
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
|
|
36763
|
+
if (isNotInited || isSizeChanged || isTransformChanged || isStrokeChanged) {
|
|
36764
|
+
this.inited |= BuilderFlag.VERTEX_AND_STEP;
|
|
36708
36765
|
this.sizeX = sizeX;
|
|
36709
36766
|
this.sizeY = sizeY;
|
|
36710
36767
|
this.transformLocalId = transformLocalId;
|
|
@@ -36721,7 +36778,11 @@
|
|
|
36721
36778
|
BuilderCircle.prototype.updateUv = function (buffer, shape) {
|
|
36722
36779
|
var texture = toTexture(shape);
|
|
36723
36780
|
var textureTransformId = toTextureTransformId(texture);
|
|
36724
|
-
|
|
36781
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
36782
|
+
if (isNotInited ||
|
|
36783
|
+
texture !== this.texture ||
|
|
36784
|
+
textureTransformId !== this.textureTransformId) {
|
|
36785
|
+
this.inited |= BuilderFlag.UV;
|
|
36725
36786
|
this.texture = texture;
|
|
36726
36787
|
this.textureTransformId = textureTransformId;
|
|
36727
36788
|
buffer.updateUvs();
|
|
@@ -36738,8 +36799,8 @@
|
|
|
36738
36799
|
*/
|
|
36739
36800
|
var createCircleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
36740
36801
|
var tcount = toTextBufferCount(shape);
|
|
36741
|
-
var tvcount = tcount
|
|
36742
|
-
var ticount = tcount
|
|
36802
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
36803
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
36743
36804
|
var vcount = CIRCLE_VERTEX_COUNT + tvcount;
|
|
36744
36805
|
var icount = CIRCLE_INDEX_COUNT + ticount;
|
|
36745
36806
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -37183,6 +37244,7 @@
|
|
|
37183
37244
|
BuilderLine.prototype.init = function (buffer) {
|
|
37184
37245
|
buffer.updateIndices();
|
|
37185
37246
|
buildLineIndex(buffer.indices, this.vertexOffset, this.indexOffset, this.indexCount);
|
|
37247
|
+
this.inited |= BuilderFlag.INDEX;
|
|
37186
37248
|
};
|
|
37187
37249
|
BuilderLine.prototype.isCompatible = function (shape) {
|
|
37188
37250
|
var vcount = toLineVertexCount(toLinePointCount(shape.points), true);
|
|
@@ -37199,10 +37261,12 @@
|
|
|
37199
37261
|
if (points) {
|
|
37200
37262
|
var formatted = points.formatted;
|
|
37201
37263
|
var pointCount = formatted.length;
|
|
37202
|
-
|
|
37264
|
+
var isNotInited = !(this.inited & BuilderFlag.CLIPPING);
|
|
37265
|
+
if (isNotInited || this.pointCount !== pointCount) {
|
|
37266
|
+
this.inited |= BuilderFlag.CLIPPING;
|
|
37203
37267
|
this.pointCount = pointCount;
|
|
37204
|
-
// Invalidate the
|
|
37205
|
-
this.
|
|
37268
|
+
// Invalidate the vertex buffer
|
|
37269
|
+
this.inited &= ~BuilderFlag.VERTEX;
|
|
37206
37270
|
buffer.updateClippings();
|
|
37207
37271
|
buildLineClipping(buffer.clippings, this.vertexOffset, this.vertexCount, pointCount);
|
|
37208
37272
|
}
|
|
@@ -37221,15 +37285,17 @@
|
|
|
37221
37285
|
var isStrokeWidthChanged = this.strokeWidth !== strokeWidth || this.strokeStyle !== strokeStyle;
|
|
37222
37286
|
var transformLocalId = toTransformLocalId(shape);
|
|
37223
37287
|
var isTransformChanged = this.transformLocalId !== transformLocalId;
|
|
37224
|
-
|
|
37288
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_COLOR_FILL);
|
|
37289
|
+
if (isNotInited || isPointChanged || isTransformChanged || isStrokeWidthChanged) {
|
|
37290
|
+
this.inited |= BuilderFlag.VERTEX_STEP_AND_COLOR_FILL;
|
|
37225
37291
|
this.pointId = pointId;
|
|
37226
37292
|
this.pointsClosed = pointsClosed;
|
|
37227
37293
|
this.strokeWidth = strokeWidth;
|
|
37228
37294
|
this.strokeStyle = strokeStyle;
|
|
37229
37295
|
this.transformLocalId = transformLocalId;
|
|
37230
37296
|
if (isPointChanged) {
|
|
37231
|
-
// Invalidate the
|
|
37232
|
-
this.
|
|
37297
|
+
// Invalidate the UV buffer
|
|
37298
|
+
this.inited &= ~BuilderFlag.UV;
|
|
37233
37299
|
}
|
|
37234
37300
|
buffer.updateVertices();
|
|
37235
37301
|
buffer.updateSteps();
|
|
@@ -37241,7 +37307,11 @@
|
|
|
37241
37307
|
BuilderLine.prototype.updateLineUv = function (buffer, shape) {
|
|
37242
37308
|
var texture = toTexture(shape);
|
|
37243
37309
|
var textureTransformId = toTextureTransformId(texture);
|
|
37244
|
-
|
|
37310
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
37311
|
+
if (isNotInited ||
|
|
37312
|
+
texture !== this.texture ||
|
|
37313
|
+
textureTransformId !== this.textureTransformId) {
|
|
37314
|
+
this.inited |= BuilderFlag.UV;
|
|
37245
37315
|
this.texture = texture;
|
|
37246
37316
|
this.textureTransformId = textureTransformId;
|
|
37247
37317
|
buffer.updateUvs();
|
|
@@ -37411,7 +37481,9 @@
|
|
|
37411
37481
|
var isEnabled = shape.visible && fill.enable;
|
|
37412
37482
|
var color = fill.color;
|
|
37413
37483
|
var alpha = isEnabled ? fill.alpha : 0;
|
|
37414
|
-
|
|
37484
|
+
var isNotInited = !(this.inited & BuilderFlag.COLOR_FILL);
|
|
37485
|
+
if (isNotInited || color !== this.colorFill || alpha !== this.alphaFill) {
|
|
37486
|
+
this.inited |= BuilderFlag.COLOR_FILL;
|
|
37415
37487
|
this.colorFill = color;
|
|
37416
37488
|
this.alphaFill = alpha;
|
|
37417
37489
|
buffer.updateColorFills();
|
|
@@ -37437,6 +37509,7 @@
|
|
|
37437
37509
|
buffer.updateIndices();
|
|
37438
37510
|
buildTriangleClipping(buffer.clippings, this.vertexOffset);
|
|
37439
37511
|
buildTriangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
37512
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
37440
37513
|
};
|
|
37441
37514
|
BuilderMarkerTriangle.prototype.update = function (buffer, shape) {
|
|
37442
37515
|
this.updateVertexStepAndUv(buffer, shape);
|
|
@@ -37473,7 +37546,13 @@
|
|
|
37473
37546
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
37474
37547
|
var pointId = points.id;
|
|
37475
37548
|
var isPointChanged = pointId !== this.pointId;
|
|
37476
|
-
|
|
37549
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_UV);
|
|
37550
|
+
if (isNotInited ||
|
|
37551
|
+
isVertexChanged ||
|
|
37552
|
+
isTransformChanged ||
|
|
37553
|
+
isTextureChanged ||
|
|
37554
|
+
isPointChanged) {
|
|
37555
|
+
this.inited |= BuilderFlag.VERTEX_STEP_AND_UV;
|
|
37477
37556
|
this.sizeX = sizeX;
|
|
37478
37557
|
this.sizeY = sizeY;
|
|
37479
37558
|
this.transformLocalId = transformLocalId;
|
|
@@ -37488,11 +37567,11 @@
|
|
|
37488
37567
|
internalTransform.copyFrom(marker.transform).prepend(shape.transform.internalTransform);
|
|
37489
37568
|
buffer.updateVertices();
|
|
37490
37569
|
buildTriangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, TRIANGLE_WORLD_SIZE);
|
|
37491
|
-
if (isVertexChanged || isTransformChanged) {
|
|
37570
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
37492
37571
|
buffer.updateSteps();
|
|
37493
37572
|
buildTriangleStep(buffer.steps, buffer.clippings, voffset, TRIANGLE_VERTEX_COUNT, strokeWidth, strokeStyle, TRIANGLE_WORLD_SIZE);
|
|
37494
37573
|
}
|
|
37495
|
-
if (isVertexChanged || isTextureChanged) {
|
|
37574
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
37496
37575
|
buffer.updateUvs();
|
|
37497
37576
|
buildTriangleUv(buffer.uvs, toTextureUvs(texture), voffset, TRIANGLE_WORLD_SIZE);
|
|
37498
37577
|
}
|
|
@@ -37548,6 +37627,7 @@
|
|
|
37548
37627
|
var vertexOffset = this.vertexOffset;
|
|
37549
37628
|
buildCircleClipping(buffer.clippings, vertexOffset);
|
|
37550
37629
|
buildCircleIndex(buffer.indices, vertexOffset, this.indexOffset);
|
|
37630
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
37551
37631
|
};
|
|
37552
37632
|
BuilderMarkerCircle.prototype.update = function (buffer, shape) {
|
|
37553
37633
|
this.updateVertexAndStep(buffer, shape);
|
|
@@ -37581,7 +37661,13 @@
|
|
|
37581
37661
|
this.strokeStyle !== strokeStyle;
|
|
37582
37662
|
var pointId = points.id;
|
|
37583
37663
|
var isPointChanged = pointId !== this.pointId;
|
|
37584
|
-
|
|
37664
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
|
|
37665
|
+
if (isNotInited ||
|
|
37666
|
+
isSizeChanged ||
|
|
37667
|
+
isTransformChanged ||
|
|
37668
|
+
isStrokeChanged ||
|
|
37669
|
+
isPointChanged) {
|
|
37670
|
+
this.inited |= BuilderFlag.VERTEX_AND_STEP;
|
|
37585
37671
|
this.sizeX = sizeX;
|
|
37586
37672
|
this.sizeY = sizeY;
|
|
37587
37673
|
this.transformLocalId = transformLocalId;
|
|
@@ -37601,7 +37687,11 @@
|
|
|
37601
37687
|
BuilderMarkerCircle.prototype.updateUv = function (buffer, shape) {
|
|
37602
37688
|
var texture = toTexture(shape);
|
|
37603
37689
|
var textureTransformId = toTextureTransformId(texture);
|
|
37604
|
-
|
|
37690
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
37691
|
+
if (isNotInited ||
|
|
37692
|
+
texture !== this.texture ||
|
|
37693
|
+
textureTransformId !== this.textureTransformId) {
|
|
37694
|
+
this.inited |= BuilderFlag.UV;
|
|
37605
37695
|
this.texture = texture;
|
|
37606
37696
|
this.textureTransformId = textureTransformId;
|
|
37607
37697
|
buffer.updateUvs();
|
|
@@ -38098,6 +38188,7 @@
|
|
|
38098
38188
|
BuilderMarkerRectangle.prototype.init = function (buffer) {
|
|
38099
38189
|
buffer.updateIndices();
|
|
38100
38190
|
buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
38191
|
+
this.inited |= BuilderFlag.INDEX;
|
|
38101
38192
|
};
|
|
38102
38193
|
BuilderMarkerRectangle.prototype.update = function (buffer, shape) {
|
|
38103
38194
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
@@ -38136,7 +38227,13 @@
|
|
|
38136
38227
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
38137
38228
|
var pointId = points.id;
|
|
38138
38229
|
var isPointChanged = pointId !== this.pointId;
|
|
38139
|
-
|
|
38230
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
38231
|
+
if (isNotInited ||
|
|
38232
|
+
isVertexChanged ||
|
|
38233
|
+
isTransformChanged ||
|
|
38234
|
+
isTextureChanged ||
|
|
38235
|
+
isPointChanged) {
|
|
38236
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
38140
38237
|
this.sizeX = sizeX;
|
|
38141
38238
|
this.sizeY = sizeY;
|
|
38142
38239
|
this.transformLocalId = transformLocalId;
|
|
@@ -38153,17 +38250,17 @@
|
|
|
38153
38250
|
buffer.updateVertices();
|
|
38154
38251
|
buildRectangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_WORLD_SIZE);
|
|
38155
38252
|
// Steps
|
|
38156
|
-
if (isVertexChanged || isTransformChanged) {
|
|
38253
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
38157
38254
|
buffer.updateSteps();
|
|
38158
38255
|
buildRectangleStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
|
|
38159
38256
|
}
|
|
38160
38257
|
// Clippings
|
|
38161
|
-
if (isVertexChanged) {
|
|
38258
|
+
if (isNotInited || isVertexChanged) {
|
|
38162
38259
|
buffer.updateClippings();
|
|
38163
38260
|
buildRectangleClipping(buffer.clippings, voffset, RECTANGLE_WORLD_SIZE);
|
|
38164
38261
|
}
|
|
38165
38262
|
// UVs
|
|
38166
|
-
if (isVertexChanged || isTextureChanged) {
|
|
38263
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
38167
38264
|
buffer.updateUvs();
|
|
38168
38265
|
buildRectangleUv(buffer.uvs, voffset, toTextureUvs(texture), RECTANGLE_WORLD_SIZE);
|
|
38169
38266
|
}
|
|
@@ -38284,8 +38381,8 @@
|
|
|
38284
38381
|
var mhioffset = mtioffset + mticount;
|
|
38285
38382
|
// Text
|
|
38286
38383
|
var tcount = toTextBufferCount(shape);
|
|
38287
|
-
var tvcount = tcount
|
|
38288
|
-
var ticount = tcount
|
|
38384
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
38385
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
38289
38386
|
var tvoffset = mhvoffset + mhvcount;
|
|
38290
38387
|
var tioffset = mhioffset + mhicount;
|
|
38291
38388
|
// Uploaded
|
|
@@ -38801,6 +38898,7 @@
|
|
|
38801
38898
|
BuilderRectanglePivoted.prototype.init = function (buffer) {
|
|
38802
38899
|
buffer.updateIndices();
|
|
38803
38900
|
buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
38901
|
+
this.inited |= BuilderFlag.INDEX;
|
|
38804
38902
|
};
|
|
38805
38903
|
BuilderRectanglePivoted.prototype.update = function (buffer, shape) {
|
|
38806
38904
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
@@ -38827,7 +38925,9 @@
|
|
|
38827
38925
|
var textureTransformId = toTextureTransformId(texture);
|
|
38828
38926
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
38829
38927
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
38830
|
-
|
|
38928
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
38929
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
|
|
38930
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
38831
38931
|
this.sizeX = sizeX;
|
|
38832
38932
|
this.sizeY = sizeY;
|
|
38833
38933
|
this.transformLocalId = transformLocalId;
|
|
@@ -38842,17 +38942,17 @@
|
|
|
38842
38942
|
buffer.updateVertices();
|
|
38843
38943
|
buildRectangleVertex(buffer.vertices, voffset, 0.5 * sizeX, 0.5 * sizeY, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, RECTANGLE_WORLD_SIZE);
|
|
38844
38944
|
// Steps
|
|
38845
|
-
if (isVertexChanged || isTransformChanged) {
|
|
38945
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
38846
38946
|
buffer.updateSteps();
|
|
38847
38947
|
buildRectangleStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
|
|
38848
38948
|
}
|
|
38849
38949
|
// Clippings
|
|
38850
|
-
if (isVertexChanged) {
|
|
38950
|
+
if (isNotInited || isVertexChanged) {
|
|
38851
38951
|
buffer.updateClippings();
|
|
38852
38952
|
buildRectangleClipping(buffer.clippings, voffset, RECTANGLE_WORLD_SIZE);
|
|
38853
38953
|
}
|
|
38854
38954
|
// UVs
|
|
38855
|
-
if (isVertexChanged || isTextureChanged) {
|
|
38955
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
38856
38956
|
buffer.updateUvs();
|
|
38857
38957
|
buildRectangleUv(buffer.uvs, voffset, toTextureUvs(texture), RECTANGLE_WORLD_SIZE);
|
|
38858
38958
|
}
|
|
@@ -38867,8 +38967,8 @@
|
|
|
38867
38967
|
*/
|
|
38868
38968
|
var createRectanglePivotedUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
38869
38969
|
var tcount = toTextBufferCount(shape);
|
|
38870
|
-
var tvcount = tcount
|
|
38871
|
-
var ticount = tcount
|
|
38970
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
38971
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
38872
38972
|
var vcount = RECTANGLE_VERTEX_COUNT + tvcount;
|
|
38873
38973
|
var icount = RECTANGLE_INDEX_COUNT + ticount;
|
|
38874
38974
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -38886,8 +38986,8 @@
|
|
|
38886
38986
|
*/
|
|
38887
38987
|
var createGroupUploaded = function (buffer, shape, voffset, ioffset) {
|
|
38888
38988
|
var tcount = toTextBufferCount(shape);
|
|
38889
|
-
var tvcount = tcount
|
|
38890
|
-
var ticount = tcount
|
|
38989
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
38990
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
38891
38991
|
var vcount = tvcount;
|
|
38892
38992
|
var icount = ticount;
|
|
38893
38993
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -39887,6 +39987,7 @@
|
|
|
39887
39987
|
BuilderRectangle.prototype.init = function (buffer) {
|
|
39888
39988
|
buffer.updateIndices();
|
|
39889
39989
|
buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
39990
|
+
this.inited |= BuilderFlag.INDEX;
|
|
39890
39991
|
};
|
|
39891
39992
|
BuilderRectangle.prototype.update = function (buffer, shape) {
|
|
39892
39993
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
@@ -39913,7 +40014,9 @@
|
|
|
39913
40014
|
var textureTransformId = toTextureTransformId(texture);
|
|
39914
40015
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
39915
40016
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
39916
|
-
|
|
40017
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
40018
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
|
|
40019
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
39917
40020
|
this.sizeX = sizeX;
|
|
39918
40021
|
this.sizeY = sizeY;
|
|
39919
40022
|
this.transformLocalId = transformLocalId;
|
|
@@ -39928,17 +40031,17 @@
|
|
|
39928
40031
|
buffer.updateVertices();
|
|
39929
40032
|
buildRectangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, RECTANGLE_WORLD_SIZE);
|
|
39930
40033
|
// Steps
|
|
39931
|
-
if (isVertexChanged || isTransformChanged) {
|
|
40034
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
39932
40035
|
buffer.updateSteps();
|
|
39933
40036
|
buildRectangleStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
|
|
39934
40037
|
}
|
|
39935
40038
|
// Clippings
|
|
39936
|
-
if (isVertexChanged) {
|
|
40039
|
+
if (isNotInited || isVertexChanged) {
|
|
39937
40040
|
buffer.updateClippings();
|
|
39938
40041
|
buildRectangleClipping(buffer.clippings, voffset, RECTANGLE_WORLD_SIZE);
|
|
39939
40042
|
}
|
|
39940
40043
|
// UVs
|
|
39941
|
-
if (isVertexChanged || isTextureChanged) {
|
|
40044
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
39942
40045
|
buffer.updateUvs();
|
|
39943
40046
|
buildRectangleUv(buffer.uvs, voffset, toTextureUvs(texture), RECTANGLE_WORLD_SIZE);
|
|
39944
40047
|
}
|
|
@@ -39953,8 +40056,8 @@
|
|
|
39953
40056
|
*/
|
|
39954
40057
|
var createRectangleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
39955
40058
|
var tcount = toTextBufferCount(shape);
|
|
39956
|
-
var tvcount = tcount
|
|
39957
|
-
var ticount = tcount
|
|
40059
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
40060
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
39958
40061
|
var vcount = RECTANGLE_VERTEX_COUNT + tvcount;
|
|
39959
40062
|
var icount = RECTANGLE_INDEX_COUNT + ticount;
|
|
39960
40063
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -40207,6 +40310,7 @@
|
|
|
40207
40310
|
buffer.updateIndices();
|
|
40208
40311
|
buildImageSdfClipping(buffer.clippings, voffset);
|
|
40209
40312
|
buildImageSdfIndex(buffer.indices, voffset, this.indexOffset);
|
|
40313
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
40210
40314
|
};
|
|
40211
40315
|
BuilderImageSdf.prototype.update = function (buffer, shape) {
|
|
40212
40316
|
this.updateVertexAndStep(buffer, shape);
|
|
@@ -40232,7 +40336,13 @@
|
|
|
40232
40336
|
var textureWidth = texture.width * texture.resolution;
|
|
40233
40337
|
var textureHeight = texture.height * texture.resolution;
|
|
40234
40338
|
var isTextureSizeChanged = this.textureWidth !== textureWidth || this.textureHeight !== textureHeight;
|
|
40235
|
-
|
|
40339
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
|
|
40340
|
+
if (isNotInited ||
|
|
40341
|
+
isSizeChanged ||
|
|
40342
|
+
isTransformChanged ||
|
|
40343
|
+
isStrokeChanged ||
|
|
40344
|
+
isTextureSizeChanged) {
|
|
40345
|
+
this.inited |= BuilderFlag.VERTEX_AND_STEP;
|
|
40236
40346
|
this.sizeX = sizeX;
|
|
40237
40347
|
this.sizeY = sizeY;
|
|
40238
40348
|
this.transformLocalId = transformLocalId;
|
|
@@ -40252,7 +40362,11 @@
|
|
|
40252
40362
|
BuilderImageSdf.prototype.updateUv = function (buffer, shape) {
|
|
40253
40363
|
var texture = toTexture(shape);
|
|
40254
40364
|
var textureTransformId = toTextureTransformId(texture);
|
|
40255
|
-
|
|
40365
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
40366
|
+
if (isNotInited ||
|
|
40367
|
+
texture !== this.texture ||
|
|
40368
|
+
textureTransformId !== this.textureTransformId) {
|
|
40369
|
+
this.inited |= BuilderFlag.UV;
|
|
40256
40370
|
this.texture = texture;
|
|
40257
40371
|
this.textureTransformId = textureTransformId;
|
|
40258
40372
|
buffer.updateUvs();
|
|
@@ -40268,8 +40382,8 @@
|
|
|
40268
40382
|
*/
|
|
40269
40383
|
var createImageSdfUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
40270
40384
|
var tcount = toTextBufferCount(shape);
|
|
40271
|
-
var tvcount = tcount
|
|
40272
|
-
var ticount = tcount
|
|
40385
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
40386
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
40273
40387
|
var vcount = IMAGE_SDF_VERTEX_COUNT + tvcount;
|
|
40274
40388
|
var icount = IMAGE_SDF_INDEX_COUNT + ticount;
|
|
40275
40389
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -40353,8 +40467,8 @@
|
|
|
40353
40467
|
*/
|
|
40354
40468
|
var createLabelUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
40355
40469
|
var tcount = toTextBufferCount(shape);
|
|
40356
|
-
var tvcount = tcount
|
|
40357
|
-
var ticount = tcount
|
|
40470
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
40471
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
40358
40472
|
var vcount = tvcount;
|
|
40359
40473
|
var icount = ticount;
|
|
40360
40474
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -40591,7 +40705,9 @@
|
|
|
40591
40705
|
var colorStroke = stroke.color;
|
|
40592
40706
|
var alphaStroke = isStrokeEnabled ? stroke.alpha : 0;
|
|
40593
40707
|
var isStrokeChanged = colorStroke !== this.colorStroke || alphaStroke !== this.alphaStroke;
|
|
40594
|
-
|
|
40708
|
+
var isNotInited = !(this.inited & BuilderFlag.COLOR_STROKE);
|
|
40709
|
+
if (isNotInited || isPointStrokeChanged || isStrokeChanged) {
|
|
40710
|
+
this.inited |= BuilderFlag.COLOR_STROKE;
|
|
40595
40711
|
this.colorStroke = colorStroke;
|
|
40596
40712
|
this.alphaStroke = alphaStroke;
|
|
40597
40713
|
this.pointStrokeId = pointStrokeId;
|
|
@@ -41300,6 +41416,7 @@
|
|
|
41300
41416
|
buildCircleIndex(indices, voffset, ioffset);
|
|
41301
41417
|
copyIndex(indices, CIRCLE_VERTEX_COUNT, ioffset, CIRCLE_INDEX_COUNT, pointCountReserved);
|
|
41302
41418
|
}
|
|
41419
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
41303
41420
|
};
|
|
41304
41421
|
BuilderLineOfCircles.prototype.update = function (buffer, shape) {
|
|
41305
41422
|
var points = shape.points;
|
|
@@ -41331,11 +41448,14 @@
|
|
|
41331
41448
|
var isStrokeChanged = this.strokeAlign !== strokeAlign ||
|
|
41332
41449
|
this.strokeWidth !== strokeWidth ||
|
|
41333
41450
|
this.strokeStyle !== strokeStyle;
|
|
41334
|
-
|
|
41451
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
|
|
41452
|
+
if (isNotInited ||
|
|
41453
|
+
isPointChanged ||
|
|
41335
41454
|
isPointSizeChanged ||
|
|
41336
41455
|
isSizeChanged ||
|
|
41337
41456
|
isTransformChanged ||
|
|
41338
41457
|
isStrokeChanged) {
|
|
41458
|
+
this.inited |= BuilderFlag.VERTEX_AND_STEP;
|
|
41339
41459
|
this.pointId = pointId;
|
|
41340
41460
|
var formatted = points.formatted;
|
|
41341
41461
|
this.pointCount = formatted.length;
|
|
@@ -41388,7 +41508,11 @@
|
|
|
41388
41508
|
BuilderLineOfCircles.prototype.updateUv = function (buffer, shape) {
|
|
41389
41509
|
var texture = toTexture(shape);
|
|
41390
41510
|
var textureTransformId = toTextureTransformId(texture);
|
|
41391
|
-
|
|
41511
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
41512
|
+
if (isNotInited ||
|
|
41513
|
+
texture !== this.texture ||
|
|
41514
|
+
textureTransformId !== this.textureTransformId) {
|
|
41515
|
+
this.inited |= BuilderFlag.UV;
|
|
41392
41516
|
this.texture = texture;
|
|
41393
41517
|
this.textureTransformId = textureTransformId;
|
|
41394
41518
|
buffer.updateUvs();
|
|
@@ -41411,8 +41535,8 @@
|
|
|
41411
41535
|
*/
|
|
41412
41536
|
var createLineOfAnyUploaded = function (buffer, shape, voffset, vcountPerPoint, ioffset, icountPerPoint, antialiasWeight, constructor) {
|
|
41413
41537
|
var tcount = toTextBufferCount(shape);
|
|
41414
|
-
var tvcount = tcount
|
|
41415
|
-
var ticount = tcount
|
|
41538
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
41539
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
41416
41540
|
var points = shape.points;
|
|
41417
41541
|
var pointCount = toLineOfAnyPointCount(toPointsCount(points));
|
|
41418
41542
|
var pvcount = pointCount * vcountPerPoint;
|
|
@@ -41507,8 +41631,8 @@
|
|
|
41507
41631
|
__extends(BuilderLineOfRectangleRoundeds, _super);
|
|
41508
41632
|
function BuilderLineOfRectangleRoundeds(vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) {
|
|
41509
41633
|
var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) || this;
|
|
41510
|
-
_this.radius =
|
|
41511
|
-
_this.corner =
|
|
41634
|
+
_this.radius = 0;
|
|
41635
|
+
_this.corner = 0;
|
|
41512
41636
|
return _this;
|
|
41513
41637
|
}
|
|
41514
41638
|
BuilderLineOfRectangleRoundeds.prototype.init = function (buffer) {
|
|
@@ -41521,6 +41645,7 @@
|
|
|
41521
41645
|
buildRectangleRoundedIndex(indices, voffset, ioffset);
|
|
41522
41646
|
copyIndex(indices, RECTANGLE_ROUNDED_VERTEX_COUNT, ioffset, RECTANGLE_ROUNDED_INDEX_COUNT, pointCountReserved);
|
|
41523
41647
|
}
|
|
41648
|
+
this.inited |= BuilderFlag.INDEX;
|
|
41524
41649
|
};
|
|
41525
41650
|
BuilderLineOfRectangleRoundeds.prototype.update = function (buffer, shape) {
|
|
41526
41651
|
var points = shape.points;
|
|
@@ -41560,7 +41685,13 @@
|
|
|
41560
41685
|
var textureTransformId = toTextureTransformId(texture);
|
|
41561
41686
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
41562
41687
|
var isVertexChanged = isPointChanged || isPointSizeChanged || isSizeChanged || isStrokeChanged;
|
|
41563
|
-
|
|
41688
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
41689
|
+
if (isNotInited ||
|
|
41690
|
+
isVertexChanged ||
|
|
41691
|
+
isTransformChanged ||
|
|
41692
|
+
isCornerChanged ||
|
|
41693
|
+
isTextureChanged) {
|
|
41694
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
41564
41695
|
this.pointId = pointId;
|
|
41565
41696
|
var formatted = points.formatted;
|
|
41566
41697
|
this.pointCount = formatted.length;
|
|
@@ -41579,13 +41710,13 @@
|
|
|
41579
41710
|
this.textureTransformId = textureTransformId;
|
|
41580
41711
|
// Buffer
|
|
41581
41712
|
buffer.updateVertices();
|
|
41582
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41713
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41583
41714
|
buffer.updateSteps();
|
|
41584
41715
|
}
|
|
41585
|
-
if (isVertexChanged || isCornerChanged) {
|
|
41716
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
41586
41717
|
buffer.updateClippings();
|
|
41587
41718
|
}
|
|
41588
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41719
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41589
41720
|
buffer.updateUvs();
|
|
41590
41721
|
}
|
|
41591
41722
|
var pointCount = this.pointCount;
|
|
@@ -41604,17 +41735,17 @@
|
|
|
41604
41735
|
buildRectangleRoundedVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41605
41736
|
copyVertex(vertices, internalTransform, voffset, RECTANGLE_ROUNDED_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
|
|
41606
41737
|
// Steps
|
|
41607
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41738
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41608
41739
|
buildRectangleRoundedStep(steps, voffset, strokeWidth, strokeSide, strokeStyle, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41609
41740
|
copyStep(steps, voffset, RECTANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
41610
41741
|
}
|
|
41611
41742
|
// Clippings
|
|
41612
|
-
if (isVertexChanged || isCornerChanged) {
|
|
41743
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
41613
41744
|
buildRectangleRoundedClipping(clippings, voffset, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41614
41745
|
copyClipping(clippings, voffset, RECTANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
41615
41746
|
}
|
|
41616
41747
|
// UVs
|
|
41617
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41748
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41618
41749
|
buildRectangleRoundedUv(uvs, voffset, textureUvs, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41619
41750
|
copyUvs(uvs, voffset, RECTANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
41620
41751
|
}
|
|
@@ -41630,15 +41761,15 @@
|
|
|
41630
41761
|
// Vertices
|
|
41631
41762
|
buildRectangleRoundedVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41632
41763
|
// Steps
|
|
41633
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41764
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41634
41765
|
buildRectangleRoundedStep(steps, iv, strokeWidth, strokeSide, strokeStyle, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41635
41766
|
}
|
|
41636
41767
|
// Clippings
|
|
41637
|
-
if (isVertexChanged || isCornerChanged) {
|
|
41768
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
41638
41769
|
buildRectangleRoundedClipping(clippings, iv, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41639
41770
|
}
|
|
41640
41771
|
// UVs
|
|
41641
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41772
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41642
41773
|
buildRectangleRoundedUv(uvs, iv, textureUvs, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41643
41774
|
}
|
|
41644
41775
|
}
|
|
@@ -41747,6 +41878,7 @@
|
|
|
41747
41878
|
buildRectangleIndex(indices, voffset, ioffset);
|
|
41748
41879
|
copyIndex(indices, RECTANGLE_VERTEX_COUNT, ioffset, RECTANGLE_INDEX_COUNT, pointCountReserved);
|
|
41749
41880
|
}
|
|
41881
|
+
this.inited |= BuilderFlag.INDEX;
|
|
41750
41882
|
};
|
|
41751
41883
|
BuilderLineOfRectangles.prototype.update = function (buffer, shape) {
|
|
41752
41884
|
var points = shape.points;
|
|
@@ -41783,7 +41915,9 @@
|
|
|
41783
41915
|
var textureTransformId = toTextureTransformId(texture);
|
|
41784
41916
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
41785
41917
|
var isVertexChanged = isPointChanged || isPointSizeChanged || isSizeChanged || isStrokeChanged;
|
|
41786
|
-
|
|
41918
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
41919
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
|
|
41920
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
41787
41921
|
this.pointId = pointId;
|
|
41788
41922
|
var formatted = points.formatted;
|
|
41789
41923
|
this.pointCount = formatted.length;
|
|
@@ -41798,13 +41932,13 @@
|
|
|
41798
41932
|
this.textureTransformId = textureTransformId;
|
|
41799
41933
|
// Buffer
|
|
41800
41934
|
buffer.updateVertices();
|
|
41801
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41935
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41802
41936
|
buffer.updateSteps();
|
|
41803
41937
|
}
|
|
41804
|
-
if (isVertexChanged) {
|
|
41938
|
+
if (isNotInited || isVertexChanged) {
|
|
41805
41939
|
buffer.updateClippings();
|
|
41806
41940
|
}
|
|
41807
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41941
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41808
41942
|
buffer.updateUvs();
|
|
41809
41943
|
}
|
|
41810
41944
|
var pointCount = this.pointCount;
|
|
@@ -41823,17 +41957,17 @@
|
|
|
41823
41957
|
buildRectangleVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_WORLD_SIZE);
|
|
41824
41958
|
copyVertex(vertices, internalTransform, voffset, RECTANGLE_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
|
|
41825
41959
|
// Steps
|
|
41826
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41960
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41827
41961
|
buildRectangleStep(voffset, steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
|
|
41828
41962
|
copyStep(steps, voffset, RECTANGLE_VERTEX_COUNT, pointCount);
|
|
41829
41963
|
}
|
|
41830
41964
|
// Clippings
|
|
41831
|
-
if (isVertexChanged) {
|
|
41965
|
+
if (isNotInited || isVertexChanged) {
|
|
41832
41966
|
buildRectangleClipping(clippings, voffset, RECTANGLE_WORLD_SIZE);
|
|
41833
41967
|
copyClipping(clippings, voffset, RECTANGLE_VERTEX_COUNT, pointCount);
|
|
41834
41968
|
}
|
|
41835
41969
|
// UVs
|
|
41836
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41970
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41837
41971
|
buildRectangleUv(uvs, voffset, textureUvs, RECTANGLE_WORLD_SIZE);
|
|
41838
41972
|
copyUvs(uvs, voffset, RECTANGLE_VERTEX_COUNT, pointCount);
|
|
41839
41973
|
}
|
|
@@ -41849,15 +41983,15 @@
|
|
|
41849
41983
|
// Vertices
|
|
41850
41984
|
buildRectangleVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_WORLD_SIZE);
|
|
41851
41985
|
// Steps
|
|
41852
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41986
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41853
41987
|
buildRectangleStep(iv, steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
|
|
41854
41988
|
}
|
|
41855
41989
|
// Clippings
|
|
41856
|
-
if (isVertexChanged) {
|
|
41990
|
+
if (isNotInited || isVertexChanged) {
|
|
41857
41991
|
buildRectangleClipping(clippings, iv, RECTANGLE_WORLD_SIZE);
|
|
41858
41992
|
}
|
|
41859
41993
|
// UVs
|
|
41860
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41994
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41861
41995
|
buildRectangleUv(uvs, iv, textureUvs, RECTANGLE_WORLD_SIZE);
|
|
41862
41996
|
}
|
|
41863
41997
|
}
|
|
@@ -42361,8 +42495,8 @@
|
|
|
42361
42495
|
__extends(BuilderLineOfTriangleRoundeds, _super);
|
|
42362
42496
|
function BuilderLineOfTriangleRoundeds(vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) {
|
|
42363
42497
|
var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) || this;
|
|
42364
|
-
_this.radius =
|
|
42365
|
-
_this.corner =
|
|
42498
|
+
_this.radius = 0;
|
|
42499
|
+
_this.corner = 0;
|
|
42366
42500
|
return _this;
|
|
42367
42501
|
}
|
|
42368
42502
|
BuilderLineOfTriangleRoundeds.prototype.init = function (buffer) {
|
|
@@ -42374,6 +42508,7 @@
|
|
|
42374
42508
|
buildTriangleRoundedIndex(buffer.indices, voffset, ioffset);
|
|
42375
42509
|
copyIndex(buffer.indices, TRIANGLE_ROUNDED_VERTEX_COUNT, ioffset, TRIANGLE_ROUNDED_INDEX_COUNT, pointCountReserved);
|
|
42376
42510
|
}
|
|
42511
|
+
this.inited |= BuilderFlag.INDEX;
|
|
42377
42512
|
};
|
|
42378
42513
|
BuilderLineOfTriangleRoundeds.prototype.update = function (buffer, shape) {
|
|
42379
42514
|
var points = shape.points;
|
|
@@ -42416,7 +42551,13 @@
|
|
|
42416
42551
|
isSizeChanged ||
|
|
42417
42552
|
isRadiusChanged ||
|
|
42418
42553
|
isStrokeChanged;
|
|
42419
|
-
|
|
42554
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
42555
|
+
if (isNotInited ||
|
|
42556
|
+
isVertexChanged ||
|
|
42557
|
+
isTransformChanged ||
|
|
42558
|
+
isCornerChanged ||
|
|
42559
|
+
isTextureChanged) {
|
|
42560
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
42420
42561
|
this.pointId = pointId;
|
|
42421
42562
|
var formatted = points.formatted;
|
|
42422
42563
|
this.pointCount = formatted.length;
|
|
@@ -42434,13 +42575,13 @@
|
|
|
42434
42575
|
this.textureTransformId = textureTransformId;
|
|
42435
42576
|
// Buffer
|
|
42436
42577
|
buffer.updateVertices();
|
|
42437
|
-
if (isVertexChanged || isCornerChanged) {
|
|
42578
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
42438
42579
|
buffer.updateClippings();
|
|
42439
42580
|
}
|
|
42440
|
-
if (isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42581
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42441
42582
|
buffer.updateSteps();
|
|
42442
42583
|
}
|
|
42443
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42584
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42444
42585
|
buffer.updateUvs();
|
|
42445
42586
|
}
|
|
42446
42587
|
var pointCount = this.pointCount;
|
|
@@ -42459,17 +42600,17 @@
|
|
|
42459
42600
|
buildTriangleRoundedVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42460
42601
|
copyVertex(vertices, internalTransform, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
|
|
42461
42602
|
// Clippings
|
|
42462
|
-
if (isVertexChanged || isCornerChanged) {
|
|
42603
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
42463
42604
|
buildTriangleRoundedClipping(clippings, voffset, corner, radius);
|
|
42464
42605
|
copyClipping(clippings, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
42465
42606
|
}
|
|
42466
42607
|
// Steps
|
|
42467
|
-
if (isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42608
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42468
42609
|
buildTriangleRoundedStep(steps, clippings, voffset, strokeWidth, strokeStyle, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42469
42610
|
copyStep(steps, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
42470
42611
|
}
|
|
42471
42612
|
// UVs
|
|
42472
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42613
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42473
42614
|
buildTriangleRoundedUv(uvs, voffset, textureUvs, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42474
42615
|
copyUvs(uvs, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
42475
42616
|
}
|
|
@@ -42485,15 +42626,15 @@
|
|
|
42485
42626
|
// Vertices
|
|
42486
42627
|
buildTriangleRoundedVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42487
42628
|
// Clippings
|
|
42488
|
-
if (isVertexChanged || isCornerChanged) {
|
|
42629
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
42489
42630
|
buildTriangleRoundedClipping(clippings, iv, corner, radius);
|
|
42490
42631
|
}
|
|
42491
42632
|
// Steps
|
|
42492
|
-
if (isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42633
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42493
42634
|
buildTriangleRoundedStep(steps, clippings, iv, strokeWidth, strokeStyle, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42494
42635
|
}
|
|
42495
42636
|
// UVs
|
|
42496
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42637
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42497
42638
|
buildTriangleRoundedUv(uvs, iv, textureUvs, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42498
42639
|
}
|
|
42499
42640
|
}
|
|
@@ -42748,6 +42889,7 @@
|
|
|
42748
42889
|
buildTriangleIndex(indices, voffset, ioffset);
|
|
42749
42890
|
copyIndex(indices, TRIANGLE_VERTEX_COUNT, ioffset, TRIANGLE_INDEX_COUNT, pointCountReserved);
|
|
42750
42891
|
}
|
|
42892
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
42751
42893
|
};
|
|
42752
42894
|
BuilderLineOfTriangles.prototype.update = function (buffer, shape) {
|
|
42753
42895
|
var points = shape.points;
|
|
@@ -42782,7 +42924,9 @@
|
|
|
42782
42924
|
var textureTransformId = toTextureTransformId(texture);
|
|
42783
42925
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
42784
42926
|
var isVertexChanged = isPointChanged || isPointSizeChanged || isSizeChanged || isStrokeChanged;
|
|
42785
|
-
|
|
42927
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_UV);
|
|
42928
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
|
|
42929
|
+
this.inited |= BuilderFlag.VERTEX_STEP_AND_UV;
|
|
42786
42930
|
this.pointId = pointId;
|
|
42787
42931
|
var formatted = points.formatted;
|
|
42788
42932
|
this.pointCount = formatted.length;
|
|
@@ -42794,12 +42938,14 @@
|
|
|
42794
42938
|
this.strokeAlign = strokeAlign;
|
|
42795
42939
|
this.strokeWidth = strokeWidth;
|
|
42796
42940
|
this.strokeStyle = strokeStyle;
|
|
42941
|
+
this.texture = texture;
|
|
42942
|
+
this.textureTransformId = textureTransformId;
|
|
42797
42943
|
// Buffer
|
|
42798
42944
|
buffer.updateVertices();
|
|
42799
|
-
if (isVertexChanged || isTransformChanged) {
|
|
42945
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
42800
42946
|
buffer.updateSteps();
|
|
42801
42947
|
}
|
|
42802
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42948
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42803
42949
|
buffer.updateUvs();
|
|
42804
42950
|
}
|
|
42805
42951
|
var pointCount = this.pointCount;
|
|
@@ -42816,11 +42962,11 @@
|
|
|
42816
42962
|
var pointSizeY = pointSize.getY(0);
|
|
42817
42963
|
buildTriangleVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, TRIANGLE_WORLD_SIZE);
|
|
42818
42964
|
copyVertex(vertices, internalTransform, voffset, TRIANGLE_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
|
|
42819
|
-
if (isVertexChanged || isTransformChanged) {
|
|
42965
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
42820
42966
|
buildTriangleStep(steps, clippings, voffset, TRIANGLE_VERTEX_COUNT, strokeWidth, strokeStyle, TRIANGLE_WORLD_SIZE);
|
|
42821
42967
|
copyStep(steps, voffset, TRIANGLE_VERTEX_COUNT, pointCount);
|
|
42822
42968
|
}
|
|
42823
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42969
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42824
42970
|
buildTriangleUv(uvs, textureUvs, voffset, TRIANGLE_WORLD_SIZE);
|
|
42825
42971
|
copyUvs(uvs, voffset, TRIANGLE_VERTEX_COUNT, pointCount);
|
|
42826
42972
|
}
|
|
@@ -42834,10 +42980,10 @@
|
|
|
42834
42980
|
var pointSizeY = pointSize.getY(i);
|
|
42835
42981
|
var iv = voffset + i * TRIANGLE_VERTEX_COUNT;
|
|
42836
42982
|
buildTriangleVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, TRIANGLE_WORLD_SIZE);
|
|
42837
|
-
if (isVertexChanged || isTransformChanged) {
|
|
42983
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
42838
42984
|
buildTriangleStep(steps, clippings, iv, TRIANGLE_VERTEX_COUNT, strokeWidth, strokeStyle, TRIANGLE_WORLD_SIZE);
|
|
42839
42985
|
}
|
|
42840
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42986
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42841
42987
|
buildTriangleUv(uvs, textureUvs, iv, TRIANGLE_WORLD_SIZE);
|
|
42842
42988
|
}
|
|
42843
42989
|
}
|
|
@@ -43182,6 +43328,7 @@
|
|
|
43182
43328
|
var voffset = this.vertexOffset;
|
|
43183
43329
|
buildSemicircleClipping(buffer.clippings, voffset);
|
|
43184
43330
|
buildSemicircleIndex(buffer.indices, voffset, this.indexOffset);
|
|
43331
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
43185
43332
|
};
|
|
43186
43333
|
BuilderSemicircle.prototype.update = function (buffer, shape) {
|
|
43187
43334
|
this.updateVertexAndStep(buffer, shape);
|
|
@@ -43203,7 +43350,9 @@
|
|
|
43203
43350
|
var isStrokeChanged = this.strokeAlign !== strokeAlign ||
|
|
43204
43351
|
this.strokeWidth !== strokeWidth ||
|
|
43205
43352
|
this.strokeStyle !== strokeStyle;
|
|
43206
|
-
|
|
43353
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
|
|
43354
|
+
if (isNotInited || isSizeChanged || isTransformChanged || isStrokeChanged) {
|
|
43355
|
+
this.inited |= BuilderFlag.VERTEX_AND_STEP;
|
|
43207
43356
|
this.sizeX = sizeX;
|
|
43208
43357
|
this.sizeY = sizeY;
|
|
43209
43358
|
this.transformLocalId = transformLocalId;
|
|
@@ -43220,7 +43369,11 @@
|
|
|
43220
43369
|
BuilderSemicircle.prototype.updateUv = function (buffer, shape) {
|
|
43221
43370
|
var texture = toTexture(shape);
|
|
43222
43371
|
var textureTransformId = toTextureTransformId(texture);
|
|
43223
|
-
|
|
43372
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
43373
|
+
if (isNotInited ||
|
|
43374
|
+
texture !== this.texture ||
|
|
43375
|
+
textureTransformId !== this.textureTransformId) {
|
|
43376
|
+
this.inited |= BuilderFlag.UV;
|
|
43224
43377
|
this.texture = texture;
|
|
43225
43378
|
this.textureTransformId = textureTransformId;
|
|
43226
43379
|
buffer.updateUvs();
|
|
@@ -43237,8 +43390,8 @@
|
|
|
43237
43390
|
*/
|
|
43238
43391
|
var createSemicircleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
43239
43392
|
var tcount = toTextBufferCount(shape);
|
|
43240
|
-
var tvcount = tcount
|
|
43241
|
-
var ticount = tcount
|
|
43393
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
43394
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
43242
43395
|
var vcount = SEMICIRCLE_VERTEX_COUNT + tvcount;
|
|
43243
43396
|
var icount = SEMICIRCLE_INDEX_COUNT + ticount;
|
|
43244
43397
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -43321,6 +43474,7 @@
|
|
|
43321
43474
|
buffer.updateIndices();
|
|
43322
43475
|
buildTriangleClipping(buffer.clippings, this.vertexOffset);
|
|
43323
43476
|
buildTriangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
43477
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
43324
43478
|
};
|
|
43325
43479
|
BuilderTriangle.prototype.update = function (buffer, shape) {
|
|
43326
43480
|
this.updateVertexStepAndUv(buffer, shape);
|
|
@@ -43345,7 +43499,9 @@
|
|
|
43345
43499
|
var textureTransformId = toTextureTransformId(texture);
|
|
43346
43500
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
43347
43501
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
43348
|
-
|
|
43502
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_UV);
|
|
43503
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
|
|
43504
|
+
this.inited |= BuilderFlag.VERTEX_STEP_AND_UV;
|
|
43349
43505
|
this.sizeX = sizeX;
|
|
43350
43506
|
this.sizeY = sizeY;
|
|
43351
43507
|
this.transformLocalId = transformLocalId;
|
|
@@ -43357,11 +43513,11 @@
|
|
|
43357
43513
|
var voffset = this.vertexOffset;
|
|
43358
43514
|
buffer.updateVertices();
|
|
43359
43515
|
buildTriangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, TRIANGLE_WORLD_SIZE);
|
|
43360
|
-
if (isVertexChanged || isTransformChanged) {
|
|
43516
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
43361
43517
|
buffer.updateSteps();
|
|
43362
43518
|
buildTriangleStep(buffer.steps, buffer.clippings, voffset, TRIANGLE_VERTEX_COUNT, strokeWidth, strokeStyle, TRIANGLE_WORLD_SIZE);
|
|
43363
43519
|
}
|
|
43364
|
-
if (isVertexChanged || isTextureChanged) {
|
|
43520
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
43365
43521
|
buffer.updateUvs();
|
|
43366
43522
|
buildTriangleUv(buffer.uvs, toTextureUvs(texture), voffset, TRIANGLE_WORLD_SIZE);
|
|
43367
43523
|
}
|
|
@@ -43376,8 +43532,8 @@
|
|
|
43376
43532
|
*/
|
|
43377
43533
|
var createTriangleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
43378
43534
|
var tcount = toTextBufferCount(shape);
|
|
43379
|
-
var tvcount = tcount
|
|
43380
|
-
var ticount = tcount
|
|
43535
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
43536
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
43381
43537
|
var vcount = TRIANGLE_VERTEX_COUNT + tvcount;
|
|
43382
43538
|
var icount = TRIANGLE_INDEX_COUNT + ticount;
|
|
43383
43539
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -43414,13 +43570,14 @@
|
|
|
43414
43570
|
__extends(BuilderTriangleRounded, _super);
|
|
43415
43571
|
function BuilderTriangleRounded(vertexOffset, indexOffset, vertexCount, indexCount) {
|
|
43416
43572
|
var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount) || this;
|
|
43417
|
-
_this.radius =
|
|
43418
|
-
_this.corner =
|
|
43573
|
+
_this.radius = 0;
|
|
43574
|
+
_this.corner = 0;
|
|
43419
43575
|
return _this;
|
|
43420
43576
|
}
|
|
43421
43577
|
BuilderTriangleRounded.prototype.init = function (buffer) {
|
|
43422
43578
|
buffer.updateIndices();
|
|
43423
43579
|
buildTriangleRoundedIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
43580
|
+
this.inited |= BuilderFlag.INDEX;
|
|
43424
43581
|
};
|
|
43425
43582
|
BuilderTriangleRounded.prototype.update = function (buffer, shape) {
|
|
43426
43583
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
@@ -43449,7 +43606,13 @@
|
|
|
43449
43606
|
var textureTransformId = toTextureTransformId(texture);
|
|
43450
43607
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
43451
43608
|
var isVertexChanged = isSizeChanged || isRadiusChanged || isStrokeChanged;
|
|
43452
|
-
|
|
43609
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
43610
|
+
if (isNotInited ||
|
|
43611
|
+
isVertexChanged ||
|
|
43612
|
+
isTransformChanged ||
|
|
43613
|
+
isCornerChanged ||
|
|
43614
|
+
isTextureChanged) {
|
|
43615
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
43453
43616
|
this.sizeX = sizeX;
|
|
43454
43617
|
this.sizeY = sizeY;
|
|
43455
43618
|
this.radius = radius;
|
|
@@ -43463,15 +43626,15 @@
|
|
|
43463
43626
|
var voffset = this.vertexOffset;
|
|
43464
43627
|
buffer.updateVertices();
|
|
43465
43628
|
buildTriangleRoundedVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, radius, shape.transform.internalTransform, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
43466
|
-
if (isRadiusChanged || isCornerChanged) {
|
|
43629
|
+
if (isNotInited || isRadiusChanged || isCornerChanged) {
|
|
43467
43630
|
buffer.updateClippings();
|
|
43468
43631
|
buildTriangleRoundedClipping(buffer.clippings, voffset, corner, radius);
|
|
43469
43632
|
}
|
|
43470
|
-
if (isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
43633
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
43471
43634
|
buffer.updateSteps();
|
|
43472
43635
|
buildTriangleRoundedStep(buffer.steps, buffer.clippings, voffset, strokeWidth, strokeStyle, shape.radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
43473
43636
|
}
|
|
43474
|
-
if (isVertexChanged || isTextureChanged) {
|
|
43637
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
43475
43638
|
buffer.updateUvs();
|
|
43476
43639
|
buildTriangleRoundedUv(buffer.uvs, voffset, toTextureUvs(texture), radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
43477
43640
|
}
|
|
@@ -43486,8 +43649,8 @@
|
|
|
43486
43649
|
*/
|
|
43487
43650
|
var createTriangleRoundedUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
43488
43651
|
var tcount = toTextBufferCount(shape);
|
|
43489
|
-
var tvcount = tcount
|
|
43490
|
-
var ticount = tcount
|
|
43652
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
43653
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
43491
43654
|
var vcount = TRIANGLE_ROUNDED_VERTEX_COUNT + tvcount;
|
|
43492
43655
|
var icount = TRIANGLE_ROUNDED_INDEX_COUNT + ticount;
|
|
43493
43656
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -63993,7 +64156,7 @@
|
|
|
63993
64156
|
var runtime = actionable.runtime;
|
|
63994
64157
|
if (runtime) {
|
|
63995
64158
|
var runtimeEffect = runtime.effect;
|
|
63996
|
-
if (time < runtimeEffect) {
|
|
64159
|
+
if (0 <= runtimeEffect && time < runtimeEffect) {
|
|
63997
64160
|
effect = effect < 0 ? runtimeEffect : Math.min(effect, runtimeEffect);
|
|
63998
64161
|
}
|
|
63999
64162
|
}
|
|
@@ -64014,7 +64177,7 @@
|
|
|
64014
64177
|
var runtime = actionable.runtime;
|
|
64015
64178
|
if (runtime) {
|
|
64016
64179
|
var runtimeEffect = runtime.effect;
|
|
64017
|
-
if (time < runtimeEffect) {
|
|
64180
|
+
if (0 <= runtimeEffect && time < runtimeEffect) {
|
|
64018
64181
|
effect = effect < 0 ? runtimeEffect : Math.min(effect, runtimeEffect);
|
|
64019
64182
|
}
|
|
64020
64183
|
}
|
|
@@ -70983,9 +71146,9 @@
|
|
|
70983
71146
|
get: function () {
|
|
70984
71147
|
var indices = this._indices;
|
|
70985
71148
|
if (0 < indices.size) {
|
|
70986
|
-
var result_1 =
|
|
71149
|
+
var result_1 = -1;
|
|
70987
71150
|
indices.forEach(function (index) {
|
|
70988
|
-
if (result_1
|
|
71151
|
+
if (result_1 < 0) {
|
|
70989
71152
|
result_1 = index;
|
|
70990
71153
|
}
|
|
70991
71154
|
});
|
|
@@ -75953,7 +76116,9 @@
|
|
|
75953
76116
|
buildSemicircleStep: buildSemicircleStep,
|
|
75954
76117
|
buildSemicircleUv: buildSemicircleUv,
|
|
75955
76118
|
TEXT_VERTEX_COUNT: TEXT_VERTEX_COUNT,
|
|
76119
|
+
TEXT_VERTEX_COUNT_SHIFT: TEXT_VERTEX_COUNT_SHIFT,
|
|
75956
76120
|
TEXT_INDEX_COUNT: TEXT_INDEX_COUNT,
|
|
76121
|
+
TEXT_INDEX_COUNT_SHIFT: TEXT_INDEX_COUNT_SHIFT,
|
|
75957
76122
|
TEXT_FMIN: TEXT_FMIN,
|
|
75958
76123
|
toTextBufferCount: toTextBufferCount,
|
|
75959
76124
|
buildTextClipping: buildTextClipping,
|
|
@@ -76005,6 +76170,7 @@
|
|
|
76005
76170
|
BuilderText: BuilderText,
|
|
76006
76171
|
BuilderTriangleRounded: BuilderTriangleRounded,
|
|
76007
76172
|
BuilderTriangle: BuilderTriangle,
|
|
76173
|
+
BuilderFlag: BuilderFlag,
|
|
76008
76174
|
toTransformLocalId: toTransformLocalId,
|
|
76009
76175
|
toTexture: toTexture,
|
|
76010
76176
|
toTextureTransformId: toTextureTransformId,
|