@wcardinal/wcardinal-ui 0.393.0 → 0.395.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/types/wcardinal/ui/theme/dark/d-theme-dark-input-boolean-button-off.d.ts +0 -2
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-input-boolean-button-on.d.ts +0 -2
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-input-boolean-button-off.d.ts +0 -2
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-input-boolean-button-on.d.ts +0 -2
- package/dist/wcardinal/ui/d-base-background-mesh-geometry.js +5 -5
- package/dist/wcardinal/ui/d-base-background-mesh-geometry.js.map +1 -1
- package/dist/wcardinal/ui/d-base-border-mesh-geometry.js +60 -37
- package/dist/wcardinal/ui/d-base-border-mesh-geometry.js.map +1 -1
- package/dist/wcardinal/ui/d-base-outline-snippet.js +1 -1
- package/dist/wcardinal/ui/d-base-outline-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-button-base.js +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-button-base.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-input-boolean-button-off.js +0 -4
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-input-boolean-button-off.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-input-boolean-button-on.js +0 -4
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-input-boolean-button-on.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-input.js +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-input.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-button-base.js +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-button-base.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-input-boolean-button-off.js +0 -4
- package/dist/wcardinal/ui/theme/white/d-theme-white-input-boolean-button-off.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-input-boolean-button-on.js +0 -4
- package/dist/wcardinal/ui/theme/white/d-theme-white-input-boolean-button-on.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-input.js +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-input.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +3 -9
- 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 -9
- 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 -9
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.js +3 -9
- 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 -9
- 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 -9
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui.cjs.js +441 -264
- package/dist/wcardinal-ui.js +437 -248
- 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.395.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)) {
|
|
@@ -11852,7 +11898,7 @@
|
|
|
11852
11898
|
var w = this._width;
|
|
11853
11899
|
var h = this._height;
|
|
11854
11900
|
var r = Math.min(0.5 * w, 0.5 * h, this._cornerRadius);
|
|
11855
|
-
var a =
|
|
11901
|
+
var a = 0.5 / resolution;
|
|
11856
11902
|
var x0 = 0;
|
|
11857
11903
|
var x1 = r;
|
|
11858
11904
|
var x2 = w - r;
|
|
@@ -11885,7 +11931,7 @@
|
|
|
11885
11931
|
this.fillVertices(vertices, uvs, iv, iuv, n, x1, y1, r, a, tlt);
|
|
11886
11932
|
}
|
|
11887
11933
|
else {
|
|
11888
|
-
this.fillVertices(vertices, uvs, iv, iuv, n, x0, y0, 0,
|
|
11934
|
+
this.fillVertices(vertices, uvs, iv, iuv, n, x0, y0, 0, a, tlt);
|
|
11889
11935
|
}
|
|
11890
11936
|
this.fillIndices(indices, ia, ii, n);
|
|
11891
11937
|
iv += n4;
|
|
@@ -11897,7 +11943,7 @@
|
|
|
11897
11943
|
this.fillVertices(vertices, uvs, iv, iuv, n, x2, y1, r, a, ttr);
|
|
11898
11944
|
}
|
|
11899
11945
|
else {
|
|
11900
|
-
this.fillVertices(vertices, uvs, iv, iuv, n, x3, y0, 0,
|
|
11946
|
+
this.fillVertices(vertices, uvs, iv, iuv, n, x3, y0, 0, a, ttr);
|
|
11901
11947
|
}
|
|
11902
11948
|
this.fillIndices(indices, ia, ii, n);
|
|
11903
11949
|
iv += n4;
|
|
@@ -11909,7 +11955,7 @@
|
|
|
11909
11955
|
this.fillVertices(vertices, uvs, iv, iuv, n, x2, y2, r, a, trb);
|
|
11910
11956
|
}
|
|
11911
11957
|
else {
|
|
11912
|
-
this.fillVertices(vertices, uvs, iv, iuv, n, x3, y3, 0,
|
|
11958
|
+
this.fillVertices(vertices, uvs, iv, iuv, n, x3, y3, 0, a, trb);
|
|
11913
11959
|
}
|
|
11914
11960
|
this.fillIndices(indices, ia, ii, n);
|
|
11915
11961
|
iv += n4;
|
|
@@ -11921,7 +11967,7 @@
|
|
|
11921
11967
|
this.fillVertices(vertices, uvs, iv, iuv, n, x1, y2, r, a, tbl);
|
|
11922
11968
|
}
|
|
11923
11969
|
else {
|
|
11924
|
-
this.fillVertices(vertices, uvs, iv, iuv, n, x0, y3, 0,
|
|
11970
|
+
this.fillVertices(vertices, uvs, iv, iuv, n, x0, y3, 0, a, tbl);
|
|
11925
11971
|
}
|
|
11926
11972
|
this.fillIndicesEnd(indices, ia, ii, n);
|
|
11927
11973
|
iv += n4;
|
|
@@ -12107,30 +12153,53 @@
|
|
|
12107
12153
|
var r3 = r2 + dr;
|
|
12108
12154
|
var cos = table.cos;
|
|
12109
12155
|
var sin = table.sin;
|
|
12110
|
-
if (r0
|
|
12111
|
-
var
|
|
12112
|
-
var
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
|
|
12117
|
-
|
|
12118
|
-
|
|
12119
|
-
|
|
12120
|
-
|
|
12121
|
-
|
|
12122
|
-
|
|
12123
|
-
|
|
12124
|
-
|
|
12125
|
-
|
|
12126
|
-
|
|
12127
|
-
|
|
12128
|
-
|
|
12129
|
-
|
|
12130
|
-
|
|
12131
|
-
|
|
12132
|
-
|
|
12133
|
-
|
|
12156
|
+
if (r0 <= 0) {
|
|
12157
|
+
var c0 = cos[0] + cos[n - 1];
|
|
12158
|
+
var s0 = sin[0] + sin[n - 1];
|
|
12159
|
+
if (r1 <= 0) {
|
|
12160
|
+
if (r <= 0) {
|
|
12161
|
+
for (var i = 0; i < n; ++i) {
|
|
12162
|
+
var c = cos[i];
|
|
12163
|
+
var s = sin[i];
|
|
12164
|
+
vertices[++iv] = x + c0 * r0;
|
|
12165
|
+
vertices[++iv] = y + s0 * r0;
|
|
12166
|
+
vertices[++iv] = x + c0 * r1;
|
|
12167
|
+
vertices[++iv] = y + s0 * r1;
|
|
12168
|
+
vertices[++iv] = x + c0 * r2;
|
|
12169
|
+
vertices[++iv] = y + s0 * r2;
|
|
12170
|
+
vertices[++iv] = x + c0 * r3;
|
|
12171
|
+
vertices[++iv] = y + s0 * r3;
|
|
12172
|
+
uvs[++iuv] = 0.5 * (1 + c);
|
|
12173
|
+
uvs[++iuv] = 0.5 * (1 + s);
|
|
12174
|
+
uvs[++iuv] = 0.5;
|
|
12175
|
+
uvs[++iuv] = 0.5;
|
|
12176
|
+
uvs[++iuv] = 0.5;
|
|
12177
|
+
uvs[++iuv] = 0.5;
|
|
12178
|
+
uvs[++iuv] = 0.5 * (1 + c);
|
|
12179
|
+
uvs[++iuv] = 0.5 * (1 + s);
|
|
12180
|
+
}
|
|
12181
|
+
}
|
|
12182
|
+
else {
|
|
12183
|
+
for (var i = 0; i < n; ++i) {
|
|
12184
|
+
var c = cos[i];
|
|
12185
|
+
var s = sin[i];
|
|
12186
|
+
vertices[++iv] = x + c0 * r0;
|
|
12187
|
+
vertices[++iv] = y + s0 * r0;
|
|
12188
|
+
vertices[++iv] = x + c0 * r1;
|
|
12189
|
+
vertices[++iv] = y + s0 * r1;
|
|
12190
|
+
vertices[++iv] = x + c * r2;
|
|
12191
|
+
vertices[++iv] = y + s * r2;
|
|
12192
|
+
vertices[++iv] = x + c * r3;
|
|
12193
|
+
vertices[++iv] = y + s * r3;
|
|
12194
|
+
uvs[++iuv] = 0.5 * (1 + c);
|
|
12195
|
+
uvs[++iuv] = 0.5 * (1 + s);
|
|
12196
|
+
uvs[++iuv] = 0.5;
|
|
12197
|
+
uvs[++iuv] = 0.5;
|
|
12198
|
+
uvs[++iuv] = 0.5;
|
|
12199
|
+
uvs[++iuv] = 0.5;
|
|
12200
|
+
uvs[++iuv] = 0.5 * (1 + c);
|
|
12201
|
+
uvs[++iuv] = 0.5 * (1 + s);
|
|
12202
|
+
}
|
|
12134
12203
|
}
|
|
12135
12204
|
}
|
|
12136
12205
|
else {
|
|
@@ -12287,7 +12356,7 @@
|
|
|
12287
12356
|
var h = this._height;
|
|
12288
12357
|
var bw = this._borderWidth;
|
|
12289
12358
|
var r = Math.min(0.5 * w, 0.5 * h, this._cornerRadius);
|
|
12290
|
-
var a =
|
|
12359
|
+
var a = 0.5 / resolution;
|
|
12291
12360
|
var x0 = 0;
|
|
12292
12361
|
var x1 = r;
|
|
12293
12362
|
var x2 = w - r;
|
|
@@ -12326,15 +12395,15 @@
|
|
|
12326
12395
|
this.fillVertices(vrtcs, uvs, iv, iuv, n, x1, y1, r, a, bw, tlt);
|
|
12327
12396
|
}
|
|
12328
12397
|
else {
|
|
12329
|
-
this.fillVertices(vrtcs, uvs, iv, iuv, n, x1, y1, r,
|
|
12398
|
+
this.fillVertices(vrtcs, uvs, iv, iuv, n, x1, y1, r, a, 0, tlt);
|
|
12330
12399
|
}
|
|
12331
12400
|
}
|
|
12332
12401
|
else {
|
|
12333
12402
|
if (bl || bt) {
|
|
12334
|
-
this.fillVertices(vrtcs, uvs, iv, iuv, n, x0, y0, 0,
|
|
12403
|
+
this.fillVertices(vrtcs, uvs, iv, iuv, n, x0, y0, 0, a, bw, tlt);
|
|
12335
12404
|
}
|
|
12336
12405
|
else {
|
|
12337
|
-
this.fillVertices(vrtcs, uvs, iv, iuv, n, x0, y0, 0,
|
|
12406
|
+
this.fillVertices(vrtcs, uvs, iv, iuv, n, x0, y0, 0, a, 0, tlt);
|
|
12338
12407
|
}
|
|
12339
12408
|
}
|
|
12340
12409
|
this.fillIndices(indices, ia, ii, n, bt, false);
|
|
@@ -12348,15 +12417,15 @@
|
|
|
12348
12417
|
this.fillVertices(vrtcs, uvs, iv, iuv, n, x2, y1, r, a, bw, ttr);
|
|
12349
12418
|
}
|
|
12350
12419
|
else {
|
|
12351
|
-
this.fillVertices(vrtcs, uvs, iv, iuv, n, x2, y1, r,
|
|
12420
|
+
this.fillVertices(vrtcs, uvs, iv, iuv, n, x2, y1, r, a, 0, ttr);
|
|
12352
12421
|
}
|
|
12353
12422
|
}
|
|
12354
12423
|
else {
|
|
12355
12424
|
if (bt || br) {
|
|
12356
|
-
this.fillVertices(vrtcs, uvs, iv, iuv, n, x3, y0, 0,
|
|
12425
|
+
this.fillVertices(vrtcs, uvs, iv, iuv, n, x3, y0, 0, a, bw, ttr);
|
|
12357
12426
|
}
|
|
12358
12427
|
else {
|
|
12359
|
-
this.fillVertices(vrtcs, uvs, iv, iuv, n, x3, y0, 0,
|
|
12428
|
+
this.fillVertices(vrtcs, uvs, iv, iuv, n, x3, y0, 0, a, 0, ttr);
|
|
12360
12429
|
}
|
|
12361
12430
|
}
|
|
12362
12431
|
this.fillIndices(indices, ia, ii, n, br, false);
|
|
@@ -12370,15 +12439,15 @@
|
|
|
12370
12439
|
this.fillVertices(vrtcs, uvs, iv, iuv, n, x2, y2, r, a, bw, trb);
|
|
12371
12440
|
}
|
|
12372
12441
|
else {
|
|
12373
|
-
this.fillVertices(vrtcs, uvs, iv, iuv, n, x2, y2, r,
|
|
12442
|
+
this.fillVertices(vrtcs, uvs, iv, iuv, n, x2, y2, r, a, 0, trb);
|
|
12374
12443
|
}
|
|
12375
12444
|
}
|
|
12376
12445
|
else {
|
|
12377
12446
|
if (br || bb) {
|
|
12378
|
-
this.fillVertices(vrtcs, uvs, iv, iuv, n, x3, y3, 0,
|
|
12447
|
+
this.fillVertices(vrtcs, uvs, iv, iuv, n, x3, y3, 0, a, bw, trb);
|
|
12379
12448
|
}
|
|
12380
12449
|
else {
|
|
12381
|
-
this.fillVertices(vrtcs, uvs, iv, iuv, n, x3, y3, 0,
|
|
12450
|
+
this.fillVertices(vrtcs, uvs, iv, iuv, n, x3, y3, 0, a, 0, trb);
|
|
12382
12451
|
}
|
|
12383
12452
|
}
|
|
12384
12453
|
this.fillIndices(indices, ia, ii, n, bb, false);
|
|
@@ -12392,15 +12461,15 @@
|
|
|
12392
12461
|
this.fillVertices(vrtcs, uvs, iv, iuv, n, x1, y2, r, a, bw, tbl);
|
|
12393
12462
|
}
|
|
12394
12463
|
else {
|
|
12395
|
-
this.fillVertices(vrtcs, uvs, iv, iuv, n, x1, y2, r,
|
|
12464
|
+
this.fillVertices(vrtcs, uvs, iv, iuv, n, x1, y2, r, a, 0, tbl);
|
|
12396
12465
|
}
|
|
12397
12466
|
}
|
|
12398
12467
|
else {
|
|
12399
12468
|
if (bb || bl) {
|
|
12400
|
-
this.fillVertices(vrtcs, uvs, iv, iuv, n, x0, y3, 0,
|
|
12469
|
+
this.fillVertices(vrtcs, uvs, iv, iuv, n, x0, y3, 0, a, bw, tbl);
|
|
12401
12470
|
}
|
|
12402
12471
|
else {
|
|
12403
|
-
this.fillVertices(vrtcs, uvs, iv, iuv, n, x0, y3, 0,
|
|
12472
|
+
this.fillVertices(vrtcs, uvs, iv, iuv, n, x0, y3, 0, a, 0, tbl);
|
|
12404
12473
|
}
|
|
12405
12474
|
}
|
|
12406
12475
|
this.fillIndices(indices, ia, ii, n, bl, true);
|
|
@@ -12599,7 +12668,7 @@
|
|
|
12599
12668
|
outlineMesh.y = -outlineOffset;
|
|
12600
12669
|
outlineMesh.width = width + outlineOffset * 2;
|
|
12601
12670
|
outlineMesh.height = height + outlineOffset * 2;
|
|
12602
|
-
outlineMesh.cornerRadius = cornerRadius;
|
|
12671
|
+
outlineMesh.cornerRadius = Math.max(0, cornerRadius + outlineOffset);
|
|
12603
12672
|
outlineMesh.cornerMask = cornerMask;
|
|
12604
12673
|
outlineMesh.borderWidth = outlineWidth;
|
|
12605
12674
|
outlineMesh.borderMask = outlineMask;
|
|
@@ -21969,9 +22038,9 @@
|
|
|
21969
22038
|
_this._atlas = null;
|
|
21970
22039
|
_this._fontAtlases = new DynamicSDFFontAtlases();
|
|
21971
22040
|
_this._pixelScale = 1;
|
|
21972
|
-
_this._pixelScaleId =
|
|
22041
|
+
_this._pixelScaleId = -2; // Since this._shapeScaleId starts from -1.
|
|
21973
22042
|
_this._shapeScale = 1;
|
|
21974
|
-
_this._shapeScaleId =
|
|
22043
|
+
_this._shapeScaleId = -1; // Since PIXI.Transform._worldID starts from zero.
|
|
21975
22044
|
_this._work = new pixi_js.Point();
|
|
21976
22045
|
_this._buffers = [];
|
|
21977
22046
|
return _this;
|
|
@@ -24305,7 +24374,7 @@
|
|
|
24305
24374
|
this.cursor = shape.cursor;
|
|
24306
24375
|
this.reset = EShapeRuntimeReset.NONE;
|
|
24307
24376
|
this.written = EShapeRuntimeReset.NONE;
|
|
24308
|
-
this.effect =
|
|
24377
|
+
this.effect = -1;
|
|
24309
24378
|
this.isStateChanged = false;
|
|
24310
24379
|
this.interactive = false;
|
|
24311
24380
|
}
|
|
@@ -24635,12 +24704,13 @@
|
|
|
24635
24704
|
};
|
|
24636
24705
|
EShapeRuntimeImpl.prototype.update = function (shape, time) {
|
|
24637
24706
|
var data = shape.data;
|
|
24638
|
-
var
|
|
24707
|
+
var effect = this.effect;
|
|
24708
|
+
var isEffectTimeUp = 0 <= effect && effect <= time;
|
|
24639
24709
|
if (data.isChanged || this.isStateChanged || isEffectTimeUp) {
|
|
24640
24710
|
this.isStateChanged = false;
|
|
24641
24711
|
data.isChanged = false;
|
|
24642
24712
|
if (isEffectTimeUp) {
|
|
24643
|
-
this.effect =
|
|
24713
|
+
this.effect = -1;
|
|
24644
24714
|
}
|
|
24645
24715
|
shape.lock(EShapeLockPart.UPLOADED);
|
|
24646
24716
|
this.onUpdate(shape, time);
|
|
@@ -35718,13 +35788,14 @@
|
|
|
35718
35788
|
__extends(BuilderRectangleRounded, _super);
|
|
35719
35789
|
function BuilderRectangleRounded(vertexOffset, indexOffset, vertexCount, indexCount) {
|
|
35720
35790
|
var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount) || this;
|
|
35721
|
-
_this.radius =
|
|
35722
|
-
_this.corner =
|
|
35791
|
+
_this.radius = 0;
|
|
35792
|
+
_this.corner = 0;
|
|
35723
35793
|
return _this;
|
|
35724
35794
|
}
|
|
35725
35795
|
BuilderRectangleRounded.prototype.init = function (buffer) {
|
|
35726
35796
|
buffer.updateIndices();
|
|
35727
35797
|
buildRectangleRoundedIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
35798
|
+
this.inited |= BuilderFlag.INDEX;
|
|
35728
35799
|
};
|
|
35729
35800
|
BuilderRectangleRounded.prototype.update = function (buffer, shape) {
|
|
35730
35801
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
@@ -35754,7 +35825,13 @@
|
|
|
35754
35825
|
var textureTransformId = toTextureTransformId(texture);
|
|
35755
35826
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
35756
35827
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
35757
|
-
|
|
35828
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
35829
|
+
if (isNotInited ||
|
|
35830
|
+
isVertexChanged ||
|
|
35831
|
+
isTransformChanged ||
|
|
35832
|
+
isCornerChanged ||
|
|
35833
|
+
isTextureChanged) {
|
|
35834
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
35758
35835
|
this.sizeX = sizeX;
|
|
35759
35836
|
this.sizeY = sizeY;
|
|
35760
35837
|
this.radius = radius;
|
|
@@ -35771,17 +35848,17 @@
|
|
|
35771
35848
|
buffer.updateVertices();
|
|
35772
35849
|
buildRectangleRoundedVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, radius, shape.transform.internalTransform, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
35773
35850
|
// Steps
|
|
35774
|
-
if (isVertexChanged || isCornerChanged || isTransformChanged) {
|
|
35851
|
+
if (isNotInited || isVertexChanged || isCornerChanged || isTransformChanged) {
|
|
35775
35852
|
buffer.updateSteps();
|
|
35776
35853
|
buildRectangleRoundedStep(buffer.steps, voffset, strokeWidth, strokeSide, strokeStyle, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
35777
35854
|
}
|
|
35778
35855
|
// Clippings
|
|
35779
|
-
if (isVertexChanged || isCornerChanged) {
|
|
35856
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
35780
35857
|
buffer.updateClippings();
|
|
35781
35858
|
buildRectangleRoundedClipping(buffer.clippings, voffset, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
35782
35859
|
}
|
|
35783
35860
|
// UVs
|
|
35784
|
-
if (isVertexChanged || isTextureChanged) {
|
|
35861
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
35785
35862
|
buffer.updateUvs();
|
|
35786
35863
|
buildRectangleRoundedUv(buffer.uvs, voffset, toTextureUvs(texture), RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
35787
35864
|
}
|
|
@@ -35796,8 +35873,8 @@
|
|
|
35796
35873
|
*/
|
|
35797
35874
|
var createRectangleRoundedUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
35798
35875
|
var tcount = toTextBufferCount(shape);
|
|
35799
|
-
var tvcount = tcount
|
|
35800
|
-
var ticount = tcount
|
|
35876
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
35877
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
35801
35878
|
var vcount = RECTANGLE_ROUNDED_VERTEX_COUNT + tvcount;
|
|
35802
35879
|
var icount = RECTANGLE_ROUNDED_INDEX_COUNT + ticount;
|
|
35803
35880
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -36683,6 +36760,7 @@
|
|
|
36683
36760
|
var voffset = this.vertexOffset;
|
|
36684
36761
|
buildCircleClipping(buffer.clippings, voffset);
|
|
36685
36762
|
buildCircleIndex(buffer.indices, voffset, this.indexOffset);
|
|
36763
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
36686
36764
|
};
|
|
36687
36765
|
BuilderCircle.prototype.update = function (buffer, shape) {
|
|
36688
36766
|
this.updateVertexAndStep(buffer, shape);
|
|
@@ -36704,7 +36782,9 @@
|
|
|
36704
36782
|
var isStrokeChanged = this.strokeAlign !== strokeAlign ||
|
|
36705
36783
|
this.strokeWidth !== strokeWidth ||
|
|
36706
36784
|
this.strokeStyle !== strokeStyle;
|
|
36707
|
-
|
|
36785
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
|
|
36786
|
+
if (isNotInited || isSizeChanged || isTransformChanged || isStrokeChanged) {
|
|
36787
|
+
this.inited |= BuilderFlag.VERTEX_AND_STEP;
|
|
36708
36788
|
this.sizeX = sizeX;
|
|
36709
36789
|
this.sizeY = sizeY;
|
|
36710
36790
|
this.transformLocalId = transformLocalId;
|
|
@@ -36721,7 +36801,11 @@
|
|
|
36721
36801
|
BuilderCircle.prototype.updateUv = function (buffer, shape) {
|
|
36722
36802
|
var texture = toTexture(shape);
|
|
36723
36803
|
var textureTransformId = toTextureTransformId(texture);
|
|
36724
|
-
|
|
36804
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
36805
|
+
if (isNotInited ||
|
|
36806
|
+
texture !== this.texture ||
|
|
36807
|
+
textureTransformId !== this.textureTransformId) {
|
|
36808
|
+
this.inited |= BuilderFlag.UV;
|
|
36725
36809
|
this.texture = texture;
|
|
36726
36810
|
this.textureTransformId = textureTransformId;
|
|
36727
36811
|
buffer.updateUvs();
|
|
@@ -36738,8 +36822,8 @@
|
|
|
36738
36822
|
*/
|
|
36739
36823
|
var createCircleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
36740
36824
|
var tcount = toTextBufferCount(shape);
|
|
36741
|
-
var tvcount = tcount
|
|
36742
|
-
var ticount = tcount
|
|
36825
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
36826
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
36743
36827
|
var vcount = CIRCLE_VERTEX_COUNT + tvcount;
|
|
36744
36828
|
var icount = CIRCLE_INDEX_COUNT + ticount;
|
|
36745
36829
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -37183,6 +37267,7 @@
|
|
|
37183
37267
|
BuilderLine.prototype.init = function (buffer) {
|
|
37184
37268
|
buffer.updateIndices();
|
|
37185
37269
|
buildLineIndex(buffer.indices, this.vertexOffset, this.indexOffset, this.indexCount);
|
|
37270
|
+
this.inited |= BuilderFlag.INDEX;
|
|
37186
37271
|
};
|
|
37187
37272
|
BuilderLine.prototype.isCompatible = function (shape) {
|
|
37188
37273
|
var vcount = toLineVertexCount(toLinePointCount(shape.points), true);
|
|
@@ -37199,10 +37284,12 @@
|
|
|
37199
37284
|
if (points) {
|
|
37200
37285
|
var formatted = points.formatted;
|
|
37201
37286
|
var pointCount = formatted.length;
|
|
37202
|
-
|
|
37287
|
+
var isNotInited = !(this.inited & BuilderFlag.CLIPPING);
|
|
37288
|
+
if (isNotInited || this.pointCount !== pointCount) {
|
|
37289
|
+
this.inited |= BuilderFlag.CLIPPING;
|
|
37203
37290
|
this.pointCount = pointCount;
|
|
37204
|
-
// Invalidate the
|
|
37205
|
-
this.
|
|
37291
|
+
// Invalidate the vertex buffer
|
|
37292
|
+
this.inited &= ~BuilderFlag.VERTEX;
|
|
37206
37293
|
buffer.updateClippings();
|
|
37207
37294
|
buildLineClipping(buffer.clippings, this.vertexOffset, this.vertexCount, pointCount);
|
|
37208
37295
|
}
|
|
@@ -37221,15 +37308,17 @@
|
|
|
37221
37308
|
var isStrokeWidthChanged = this.strokeWidth !== strokeWidth || this.strokeStyle !== strokeStyle;
|
|
37222
37309
|
var transformLocalId = toTransformLocalId(shape);
|
|
37223
37310
|
var isTransformChanged = this.transformLocalId !== transformLocalId;
|
|
37224
|
-
|
|
37311
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_COLOR_FILL);
|
|
37312
|
+
if (isNotInited || isPointChanged || isTransformChanged || isStrokeWidthChanged) {
|
|
37313
|
+
this.inited |= BuilderFlag.VERTEX_STEP_AND_COLOR_FILL;
|
|
37225
37314
|
this.pointId = pointId;
|
|
37226
37315
|
this.pointsClosed = pointsClosed;
|
|
37227
37316
|
this.strokeWidth = strokeWidth;
|
|
37228
37317
|
this.strokeStyle = strokeStyle;
|
|
37229
37318
|
this.transformLocalId = transformLocalId;
|
|
37230
37319
|
if (isPointChanged) {
|
|
37231
|
-
// Invalidate the
|
|
37232
|
-
this.
|
|
37320
|
+
// Invalidate the UV buffer
|
|
37321
|
+
this.inited &= ~BuilderFlag.UV;
|
|
37233
37322
|
}
|
|
37234
37323
|
buffer.updateVertices();
|
|
37235
37324
|
buffer.updateSteps();
|
|
@@ -37241,7 +37330,11 @@
|
|
|
37241
37330
|
BuilderLine.prototype.updateLineUv = function (buffer, shape) {
|
|
37242
37331
|
var texture = toTexture(shape);
|
|
37243
37332
|
var textureTransformId = toTextureTransformId(texture);
|
|
37244
|
-
|
|
37333
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
37334
|
+
if (isNotInited ||
|
|
37335
|
+
texture !== this.texture ||
|
|
37336
|
+
textureTransformId !== this.textureTransformId) {
|
|
37337
|
+
this.inited |= BuilderFlag.UV;
|
|
37245
37338
|
this.texture = texture;
|
|
37246
37339
|
this.textureTransformId = textureTransformId;
|
|
37247
37340
|
buffer.updateUvs();
|
|
@@ -37411,7 +37504,9 @@
|
|
|
37411
37504
|
var isEnabled = shape.visible && fill.enable;
|
|
37412
37505
|
var color = fill.color;
|
|
37413
37506
|
var alpha = isEnabled ? fill.alpha : 0;
|
|
37414
|
-
|
|
37507
|
+
var isNotInited = !(this.inited & BuilderFlag.COLOR_FILL);
|
|
37508
|
+
if (isNotInited || color !== this.colorFill || alpha !== this.alphaFill) {
|
|
37509
|
+
this.inited |= BuilderFlag.COLOR_FILL;
|
|
37415
37510
|
this.colorFill = color;
|
|
37416
37511
|
this.alphaFill = alpha;
|
|
37417
37512
|
buffer.updateColorFills();
|
|
@@ -37437,6 +37532,7 @@
|
|
|
37437
37532
|
buffer.updateIndices();
|
|
37438
37533
|
buildTriangleClipping(buffer.clippings, this.vertexOffset);
|
|
37439
37534
|
buildTriangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
37535
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
37440
37536
|
};
|
|
37441
37537
|
BuilderMarkerTriangle.prototype.update = function (buffer, shape) {
|
|
37442
37538
|
this.updateVertexStepAndUv(buffer, shape);
|
|
@@ -37473,7 +37569,13 @@
|
|
|
37473
37569
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
37474
37570
|
var pointId = points.id;
|
|
37475
37571
|
var isPointChanged = pointId !== this.pointId;
|
|
37476
|
-
|
|
37572
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_UV);
|
|
37573
|
+
if (isNotInited ||
|
|
37574
|
+
isVertexChanged ||
|
|
37575
|
+
isTransformChanged ||
|
|
37576
|
+
isTextureChanged ||
|
|
37577
|
+
isPointChanged) {
|
|
37578
|
+
this.inited |= BuilderFlag.VERTEX_STEP_AND_UV;
|
|
37477
37579
|
this.sizeX = sizeX;
|
|
37478
37580
|
this.sizeY = sizeY;
|
|
37479
37581
|
this.transformLocalId = transformLocalId;
|
|
@@ -37488,11 +37590,11 @@
|
|
|
37488
37590
|
internalTransform.copyFrom(marker.transform).prepend(shape.transform.internalTransform);
|
|
37489
37591
|
buffer.updateVertices();
|
|
37490
37592
|
buildTriangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, TRIANGLE_WORLD_SIZE);
|
|
37491
|
-
if (isVertexChanged || isTransformChanged) {
|
|
37593
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
37492
37594
|
buffer.updateSteps();
|
|
37493
37595
|
buildTriangleStep(buffer.steps, buffer.clippings, voffset, TRIANGLE_VERTEX_COUNT, strokeWidth, strokeStyle, TRIANGLE_WORLD_SIZE);
|
|
37494
37596
|
}
|
|
37495
|
-
if (isVertexChanged || isTextureChanged) {
|
|
37597
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
37496
37598
|
buffer.updateUvs();
|
|
37497
37599
|
buildTriangleUv(buffer.uvs, toTextureUvs(texture), voffset, TRIANGLE_WORLD_SIZE);
|
|
37498
37600
|
}
|
|
@@ -37548,6 +37650,7 @@
|
|
|
37548
37650
|
var vertexOffset = this.vertexOffset;
|
|
37549
37651
|
buildCircleClipping(buffer.clippings, vertexOffset);
|
|
37550
37652
|
buildCircleIndex(buffer.indices, vertexOffset, this.indexOffset);
|
|
37653
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
37551
37654
|
};
|
|
37552
37655
|
BuilderMarkerCircle.prototype.update = function (buffer, shape) {
|
|
37553
37656
|
this.updateVertexAndStep(buffer, shape);
|
|
@@ -37581,7 +37684,13 @@
|
|
|
37581
37684
|
this.strokeStyle !== strokeStyle;
|
|
37582
37685
|
var pointId = points.id;
|
|
37583
37686
|
var isPointChanged = pointId !== this.pointId;
|
|
37584
|
-
|
|
37687
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
|
|
37688
|
+
if (isNotInited ||
|
|
37689
|
+
isSizeChanged ||
|
|
37690
|
+
isTransformChanged ||
|
|
37691
|
+
isStrokeChanged ||
|
|
37692
|
+
isPointChanged) {
|
|
37693
|
+
this.inited |= BuilderFlag.VERTEX_AND_STEP;
|
|
37585
37694
|
this.sizeX = sizeX;
|
|
37586
37695
|
this.sizeY = sizeY;
|
|
37587
37696
|
this.transformLocalId = transformLocalId;
|
|
@@ -37601,7 +37710,11 @@
|
|
|
37601
37710
|
BuilderMarkerCircle.prototype.updateUv = function (buffer, shape) {
|
|
37602
37711
|
var texture = toTexture(shape);
|
|
37603
37712
|
var textureTransformId = toTextureTransformId(texture);
|
|
37604
|
-
|
|
37713
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
37714
|
+
if (isNotInited ||
|
|
37715
|
+
texture !== this.texture ||
|
|
37716
|
+
textureTransformId !== this.textureTransformId) {
|
|
37717
|
+
this.inited |= BuilderFlag.UV;
|
|
37605
37718
|
this.texture = texture;
|
|
37606
37719
|
this.textureTransformId = textureTransformId;
|
|
37607
37720
|
buffer.updateUvs();
|
|
@@ -38098,6 +38211,7 @@
|
|
|
38098
38211
|
BuilderMarkerRectangle.prototype.init = function (buffer) {
|
|
38099
38212
|
buffer.updateIndices();
|
|
38100
38213
|
buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
38214
|
+
this.inited |= BuilderFlag.INDEX;
|
|
38101
38215
|
};
|
|
38102
38216
|
BuilderMarkerRectangle.prototype.update = function (buffer, shape) {
|
|
38103
38217
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
@@ -38136,7 +38250,13 @@
|
|
|
38136
38250
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
38137
38251
|
var pointId = points.id;
|
|
38138
38252
|
var isPointChanged = pointId !== this.pointId;
|
|
38139
|
-
|
|
38253
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
38254
|
+
if (isNotInited ||
|
|
38255
|
+
isVertexChanged ||
|
|
38256
|
+
isTransformChanged ||
|
|
38257
|
+
isTextureChanged ||
|
|
38258
|
+
isPointChanged) {
|
|
38259
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
38140
38260
|
this.sizeX = sizeX;
|
|
38141
38261
|
this.sizeY = sizeY;
|
|
38142
38262
|
this.transformLocalId = transformLocalId;
|
|
@@ -38153,17 +38273,17 @@
|
|
|
38153
38273
|
buffer.updateVertices();
|
|
38154
38274
|
buildRectangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_WORLD_SIZE);
|
|
38155
38275
|
// Steps
|
|
38156
|
-
if (isVertexChanged || isTransformChanged) {
|
|
38276
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
38157
38277
|
buffer.updateSteps();
|
|
38158
38278
|
buildRectangleStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
|
|
38159
38279
|
}
|
|
38160
38280
|
// Clippings
|
|
38161
|
-
if (isVertexChanged) {
|
|
38281
|
+
if (isNotInited || isVertexChanged) {
|
|
38162
38282
|
buffer.updateClippings();
|
|
38163
38283
|
buildRectangleClipping(buffer.clippings, voffset, RECTANGLE_WORLD_SIZE);
|
|
38164
38284
|
}
|
|
38165
38285
|
// UVs
|
|
38166
|
-
if (isVertexChanged || isTextureChanged) {
|
|
38286
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
38167
38287
|
buffer.updateUvs();
|
|
38168
38288
|
buildRectangleUv(buffer.uvs, voffset, toTextureUvs(texture), RECTANGLE_WORLD_SIZE);
|
|
38169
38289
|
}
|
|
@@ -38284,8 +38404,8 @@
|
|
|
38284
38404
|
var mhioffset = mtioffset + mticount;
|
|
38285
38405
|
// Text
|
|
38286
38406
|
var tcount = toTextBufferCount(shape);
|
|
38287
|
-
var tvcount = tcount
|
|
38288
|
-
var ticount = tcount
|
|
38407
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
38408
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
38289
38409
|
var tvoffset = mhvoffset + mhvcount;
|
|
38290
38410
|
var tioffset = mhioffset + mhicount;
|
|
38291
38411
|
// Uploaded
|
|
@@ -38801,6 +38921,7 @@
|
|
|
38801
38921
|
BuilderRectanglePivoted.prototype.init = function (buffer) {
|
|
38802
38922
|
buffer.updateIndices();
|
|
38803
38923
|
buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
38924
|
+
this.inited |= BuilderFlag.INDEX;
|
|
38804
38925
|
};
|
|
38805
38926
|
BuilderRectanglePivoted.prototype.update = function (buffer, shape) {
|
|
38806
38927
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
@@ -38827,7 +38948,9 @@
|
|
|
38827
38948
|
var textureTransformId = toTextureTransformId(texture);
|
|
38828
38949
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
38829
38950
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
38830
|
-
|
|
38951
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
38952
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
|
|
38953
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
38831
38954
|
this.sizeX = sizeX;
|
|
38832
38955
|
this.sizeY = sizeY;
|
|
38833
38956
|
this.transformLocalId = transformLocalId;
|
|
@@ -38842,17 +38965,17 @@
|
|
|
38842
38965
|
buffer.updateVertices();
|
|
38843
38966
|
buildRectangleVertex(buffer.vertices, voffset, 0.5 * sizeX, 0.5 * sizeY, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, RECTANGLE_WORLD_SIZE);
|
|
38844
38967
|
// Steps
|
|
38845
|
-
if (isVertexChanged || isTransformChanged) {
|
|
38968
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
38846
38969
|
buffer.updateSteps();
|
|
38847
38970
|
buildRectangleStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
|
|
38848
38971
|
}
|
|
38849
38972
|
// Clippings
|
|
38850
|
-
if (isVertexChanged) {
|
|
38973
|
+
if (isNotInited || isVertexChanged) {
|
|
38851
38974
|
buffer.updateClippings();
|
|
38852
38975
|
buildRectangleClipping(buffer.clippings, voffset, RECTANGLE_WORLD_SIZE);
|
|
38853
38976
|
}
|
|
38854
38977
|
// UVs
|
|
38855
|
-
if (isVertexChanged || isTextureChanged) {
|
|
38978
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
38856
38979
|
buffer.updateUvs();
|
|
38857
38980
|
buildRectangleUv(buffer.uvs, voffset, toTextureUvs(texture), RECTANGLE_WORLD_SIZE);
|
|
38858
38981
|
}
|
|
@@ -38867,8 +38990,8 @@
|
|
|
38867
38990
|
*/
|
|
38868
38991
|
var createRectanglePivotedUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
38869
38992
|
var tcount = toTextBufferCount(shape);
|
|
38870
|
-
var tvcount = tcount
|
|
38871
|
-
var ticount = tcount
|
|
38993
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
38994
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
38872
38995
|
var vcount = RECTANGLE_VERTEX_COUNT + tvcount;
|
|
38873
38996
|
var icount = RECTANGLE_INDEX_COUNT + ticount;
|
|
38874
38997
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -38886,8 +39009,8 @@
|
|
|
38886
39009
|
*/
|
|
38887
39010
|
var createGroupUploaded = function (buffer, shape, voffset, ioffset) {
|
|
38888
39011
|
var tcount = toTextBufferCount(shape);
|
|
38889
|
-
var tvcount = tcount
|
|
38890
|
-
var ticount = tcount
|
|
39012
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
39013
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
38891
39014
|
var vcount = tvcount;
|
|
38892
39015
|
var icount = ticount;
|
|
38893
39016
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -39887,6 +40010,7 @@
|
|
|
39887
40010
|
BuilderRectangle.prototype.init = function (buffer) {
|
|
39888
40011
|
buffer.updateIndices();
|
|
39889
40012
|
buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
40013
|
+
this.inited |= BuilderFlag.INDEX;
|
|
39890
40014
|
};
|
|
39891
40015
|
BuilderRectangle.prototype.update = function (buffer, shape) {
|
|
39892
40016
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
@@ -39913,7 +40037,9 @@
|
|
|
39913
40037
|
var textureTransformId = toTextureTransformId(texture);
|
|
39914
40038
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
39915
40039
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
39916
|
-
|
|
40040
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
40041
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
|
|
40042
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
39917
40043
|
this.sizeX = sizeX;
|
|
39918
40044
|
this.sizeY = sizeY;
|
|
39919
40045
|
this.transformLocalId = transformLocalId;
|
|
@@ -39928,17 +40054,17 @@
|
|
|
39928
40054
|
buffer.updateVertices();
|
|
39929
40055
|
buildRectangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, RECTANGLE_WORLD_SIZE);
|
|
39930
40056
|
// Steps
|
|
39931
|
-
if (isVertexChanged || isTransformChanged) {
|
|
40057
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
39932
40058
|
buffer.updateSteps();
|
|
39933
40059
|
buildRectangleStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
|
|
39934
40060
|
}
|
|
39935
40061
|
// Clippings
|
|
39936
|
-
if (isVertexChanged) {
|
|
40062
|
+
if (isNotInited || isVertexChanged) {
|
|
39937
40063
|
buffer.updateClippings();
|
|
39938
40064
|
buildRectangleClipping(buffer.clippings, voffset, RECTANGLE_WORLD_SIZE);
|
|
39939
40065
|
}
|
|
39940
40066
|
// UVs
|
|
39941
|
-
if (isVertexChanged || isTextureChanged) {
|
|
40067
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
39942
40068
|
buffer.updateUvs();
|
|
39943
40069
|
buildRectangleUv(buffer.uvs, voffset, toTextureUvs(texture), RECTANGLE_WORLD_SIZE);
|
|
39944
40070
|
}
|
|
@@ -39953,8 +40079,8 @@
|
|
|
39953
40079
|
*/
|
|
39954
40080
|
var createRectangleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
39955
40081
|
var tcount = toTextBufferCount(shape);
|
|
39956
|
-
var tvcount = tcount
|
|
39957
|
-
var ticount = tcount
|
|
40082
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
40083
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
39958
40084
|
var vcount = RECTANGLE_VERTEX_COUNT + tvcount;
|
|
39959
40085
|
var icount = RECTANGLE_INDEX_COUNT + ticount;
|
|
39960
40086
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -40207,6 +40333,7 @@
|
|
|
40207
40333
|
buffer.updateIndices();
|
|
40208
40334
|
buildImageSdfClipping(buffer.clippings, voffset);
|
|
40209
40335
|
buildImageSdfIndex(buffer.indices, voffset, this.indexOffset);
|
|
40336
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
40210
40337
|
};
|
|
40211
40338
|
BuilderImageSdf.prototype.update = function (buffer, shape) {
|
|
40212
40339
|
this.updateVertexAndStep(buffer, shape);
|
|
@@ -40232,7 +40359,13 @@
|
|
|
40232
40359
|
var textureWidth = texture.width * texture.resolution;
|
|
40233
40360
|
var textureHeight = texture.height * texture.resolution;
|
|
40234
40361
|
var isTextureSizeChanged = this.textureWidth !== textureWidth || this.textureHeight !== textureHeight;
|
|
40235
|
-
|
|
40362
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
|
|
40363
|
+
if (isNotInited ||
|
|
40364
|
+
isSizeChanged ||
|
|
40365
|
+
isTransformChanged ||
|
|
40366
|
+
isStrokeChanged ||
|
|
40367
|
+
isTextureSizeChanged) {
|
|
40368
|
+
this.inited |= BuilderFlag.VERTEX_AND_STEP;
|
|
40236
40369
|
this.sizeX = sizeX;
|
|
40237
40370
|
this.sizeY = sizeY;
|
|
40238
40371
|
this.transformLocalId = transformLocalId;
|
|
@@ -40252,7 +40385,11 @@
|
|
|
40252
40385
|
BuilderImageSdf.prototype.updateUv = function (buffer, shape) {
|
|
40253
40386
|
var texture = toTexture(shape);
|
|
40254
40387
|
var textureTransformId = toTextureTransformId(texture);
|
|
40255
|
-
|
|
40388
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
40389
|
+
if (isNotInited ||
|
|
40390
|
+
texture !== this.texture ||
|
|
40391
|
+
textureTransformId !== this.textureTransformId) {
|
|
40392
|
+
this.inited |= BuilderFlag.UV;
|
|
40256
40393
|
this.texture = texture;
|
|
40257
40394
|
this.textureTransformId = textureTransformId;
|
|
40258
40395
|
buffer.updateUvs();
|
|
@@ -40268,8 +40405,8 @@
|
|
|
40268
40405
|
*/
|
|
40269
40406
|
var createImageSdfUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
40270
40407
|
var tcount = toTextBufferCount(shape);
|
|
40271
|
-
var tvcount = tcount
|
|
40272
|
-
var ticount = tcount
|
|
40408
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
40409
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
40273
40410
|
var vcount = IMAGE_SDF_VERTEX_COUNT + tvcount;
|
|
40274
40411
|
var icount = IMAGE_SDF_INDEX_COUNT + ticount;
|
|
40275
40412
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -40353,8 +40490,8 @@
|
|
|
40353
40490
|
*/
|
|
40354
40491
|
var createLabelUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
40355
40492
|
var tcount = toTextBufferCount(shape);
|
|
40356
|
-
var tvcount = tcount
|
|
40357
|
-
var ticount = tcount
|
|
40493
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
40494
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
40358
40495
|
var vcount = tvcount;
|
|
40359
40496
|
var icount = ticount;
|
|
40360
40497
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -40591,7 +40728,9 @@
|
|
|
40591
40728
|
var colorStroke = stroke.color;
|
|
40592
40729
|
var alphaStroke = isStrokeEnabled ? stroke.alpha : 0;
|
|
40593
40730
|
var isStrokeChanged = colorStroke !== this.colorStroke || alphaStroke !== this.alphaStroke;
|
|
40594
|
-
|
|
40731
|
+
var isNotInited = !(this.inited & BuilderFlag.COLOR_STROKE);
|
|
40732
|
+
if (isNotInited || isPointStrokeChanged || isStrokeChanged) {
|
|
40733
|
+
this.inited |= BuilderFlag.COLOR_STROKE;
|
|
40595
40734
|
this.colorStroke = colorStroke;
|
|
40596
40735
|
this.alphaStroke = alphaStroke;
|
|
40597
40736
|
this.pointStrokeId = pointStrokeId;
|
|
@@ -41300,6 +41439,7 @@
|
|
|
41300
41439
|
buildCircleIndex(indices, voffset, ioffset);
|
|
41301
41440
|
copyIndex(indices, CIRCLE_VERTEX_COUNT, ioffset, CIRCLE_INDEX_COUNT, pointCountReserved);
|
|
41302
41441
|
}
|
|
41442
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
41303
41443
|
};
|
|
41304
41444
|
BuilderLineOfCircles.prototype.update = function (buffer, shape) {
|
|
41305
41445
|
var points = shape.points;
|
|
@@ -41331,11 +41471,14 @@
|
|
|
41331
41471
|
var isStrokeChanged = this.strokeAlign !== strokeAlign ||
|
|
41332
41472
|
this.strokeWidth !== strokeWidth ||
|
|
41333
41473
|
this.strokeStyle !== strokeStyle;
|
|
41334
|
-
|
|
41474
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
|
|
41475
|
+
if (isNotInited ||
|
|
41476
|
+
isPointChanged ||
|
|
41335
41477
|
isPointSizeChanged ||
|
|
41336
41478
|
isSizeChanged ||
|
|
41337
41479
|
isTransformChanged ||
|
|
41338
41480
|
isStrokeChanged) {
|
|
41481
|
+
this.inited |= BuilderFlag.VERTEX_AND_STEP;
|
|
41339
41482
|
this.pointId = pointId;
|
|
41340
41483
|
var formatted = points.formatted;
|
|
41341
41484
|
this.pointCount = formatted.length;
|
|
@@ -41388,7 +41531,11 @@
|
|
|
41388
41531
|
BuilderLineOfCircles.prototype.updateUv = function (buffer, shape) {
|
|
41389
41532
|
var texture = toTexture(shape);
|
|
41390
41533
|
var textureTransformId = toTextureTransformId(texture);
|
|
41391
|
-
|
|
41534
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
41535
|
+
if (isNotInited ||
|
|
41536
|
+
texture !== this.texture ||
|
|
41537
|
+
textureTransformId !== this.textureTransformId) {
|
|
41538
|
+
this.inited |= BuilderFlag.UV;
|
|
41392
41539
|
this.texture = texture;
|
|
41393
41540
|
this.textureTransformId = textureTransformId;
|
|
41394
41541
|
buffer.updateUvs();
|
|
@@ -41411,8 +41558,8 @@
|
|
|
41411
41558
|
*/
|
|
41412
41559
|
var createLineOfAnyUploaded = function (buffer, shape, voffset, vcountPerPoint, ioffset, icountPerPoint, antialiasWeight, constructor) {
|
|
41413
41560
|
var tcount = toTextBufferCount(shape);
|
|
41414
|
-
var tvcount = tcount
|
|
41415
|
-
var ticount = tcount
|
|
41561
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
41562
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
41416
41563
|
var points = shape.points;
|
|
41417
41564
|
var pointCount = toLineOfAnyPointCount(toPointsCount(points));
|
|
41418
41565
|
var pvcount = pointCount * vcountPerPoint;
|
|
@@ -41507,8 +41654,8 @@
|
|
|
41507
41654
|
__extends(BuilderLineOfRectangleRoundeds, _super);
|
|
41508
41655
|
function BuilderLineOfRectangleRoundeds(vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) {
|
|
41509
41656
|
var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) || this;
|
|
41510
|
-
_this.radius =
|
|
41511
|
-
_this.corner =
|
|
41657
|
+
_this.radius = 0;
|
|
41658
|
+
_this.corner = 0;
|
|
41512
41659
|
return _this;
|
|
41513
41660
|
}
|
|
41514
41661
|
BuilderLineOfRectangleRoundeds.prototype.init = function (buffer) {
|
|
@@ -41521,6 +41668,7 @@
|
|
|
41521
41668
|
buildRectangleRoundedIndex(indices, voffset, ioffset);
|
|
41522
41669
|
copyIndex(indices, RECTANGLE_ROUNDED_VERTEX_COUNT, ioffset, RECTANGLE_ROUNDED_INDEX_COUNT, pointCountReserved);
|
|
41523
41670
|
}
|
|
41671
|
+
this.inited |= BuilderFlag.INDEX;
|
|
41524
41672
|
};
|
|
41525
41673
|
BuilderLineOfRectangleRoundeds.prototype.update = function (buffer, shape) {
|
|
41526
41674
|
var points = shape.points;
|
|
@@ -41560,7 +41708,13 @@
|
|
|
41560
41708
|
var textureTransformId = toTextureTransformId(texture);
|
|
41561
41709
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
41562
41710
|
var isVertexChanged = isPointChanged || isPointSizeChanged || isSizeChanged || isStrokeChanged;
|
|
41563
|
-
|
|
41711
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
41712
|
+
if (isNotInited ||
|
|
41713
|
+
isVertexChanged ||
|
|
41714
|
+
isTransformChanged ||
|
|
41715
|
+
isCornerChanged ||
|
|
41716
|
+
isTextureChanged) {
|
|
41717
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
41564
41718
|
this.pointId = pointId;
|
|
41565
41719
|
var formatted = points.formatted;
|
|
41566
41720
|
this.pointCount = formatted.length;
|
|
@@ -41579,13 +41733,13 @@
|
|
|
41579
41733
|
this.textureTransformId = textureTransformId;
|
|
41580
41734
|
// Buffer
|
|
41581
41735
|
buffer.updateVertices();
|
|
41582
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41736
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41583
41737
|
buffer.updateSteps();
|
|
41584
41738
|
}
|
|
41585
|
-
if (isVertexChanged || isCornerChanged) {
|
|
41739
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
41586
41740
|
buffer.updateClippings();
|
|
41587
41741
|
}
|
|
41588
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41742
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41589
41743
|
buffer.updateUvs();
|
|
41590
41744
|
}
|
|
41591
41745
|
var pointCount = this.pointCount;
|
|
@@ -41604,17 +41758,17 @@
|
|
|
41604
41758
|
buildRectangleRoundedVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41605
41759
|
copyVertex(vertices, internalTransform, voffset, RECTANGLE_ROUNDED_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
|
|
41606
41760
|
// Steps
|
|
41607
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41761
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41608
41762
|
buildRectangleRoundedStep(steps, voffset, strokeWidth, strokeSide, strokeStyle, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41609
41763
|
copyStep(steps, voffset, RECTANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
41610
41764
|
}
|
|
41611
41765
|
// Clippings
|
|
41612
|
-
if (isVertexChanged || isCornerChanged) {
|
|
41766
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
41613
41767
|
buildRectangleRoundedClipping(clippings, voffset, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41614
41768
|
copyClipping(clippings, voffset, RECTANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
41615
41769
|
}
|
|
41616
41770
|
// UVs
|
|
41617
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41771
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41618
41772
|
buildRectangleRoundedUv(uvs, voffset, textureUvs, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41619
41773
|
copyUvs(uvs, voffset, RECTANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
41620
41774
|
}
|
|
@@ -41630,15 +41784,15 @@
|
|
|
41630
41784
|
// Vertices
|
|
41631
41785
|
buildRectangleRoundedVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41632
41786
|
// Steps
|
|
41633
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41787
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41634
41788
|
buildRectangleRoundedStep(steps, iv, strokeWidth, strokeSide, strokeStyle, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41635
41789
|
}
|
|
41636
41790
|
// Clippings
|
|
41637
|
-
if (isVertexChanged || isCornerChanged) {
|
|
41791
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
41638
41792
|
buildRectangleRoundedClipping(clippings, iv, corner, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41639
41793
|
}
|
|
41640
41794
|
// UVs
|
|
41641
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41795
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41642
41796
|
buildRectangleRoundedUv(uvs, iv, textureUvs, RECTANGLE_ROUNDED_WORLD_SIZE);
|
|
41643
41797
|
}
|
|
41644
41798
|
}
|
|
@@ -41747,6 +41901,7 @@
|
|
|
41747
41901
|
buildRectangleIndex(indices, voffset, ioffset);
|
|
41748
41902
|
copyIndex(indices, RECTANGLE_VERTEX_COUNT, ioffset, RECTANGLE_INDEX_COUNT, pointCountReserved);
|
|
41749
41903
|
}
|
|
41904
|
+
this.inited |= BuilderFlag.INDEX;
|
|
41750
41905
|
};
|
|
41751
41906
|
BuilderLineOfRectangles.prototype.update = function (buffer, shape) {
|
|
41752
41907
|
var points = shape.points;
|
|
@@ -41783,7 +41938,9 @@
|
|
|
41783
41938
|
var textureTransformId = toTextureTransformId(texture);
|
|
41784
41939
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
41785
41940
|
var isVertexChanged = isPointChanged || isPointSizeChanged || isSizeChanged || isStrokeChanged;
|
|
41786
|
-
|
|
41941
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
41942
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
|
|
41943
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
41787
41944
|
this.pointId = pointId;
|
|
41788
41945
|
var formatted = points.formatted;
|
|
41789
41946
|
this.pointCount = formatted.length;
|
|
@@ -41798,13 +41955,13 @@
|
|
|
41798
41955
|
this.textureTransformId = textureTransformId;
|
|
41799
41956
|
// Buffer
|
|
41800
41957
|
buffer.updateVertices();
|
|
41801
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41958
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41802
41959
|
buffer.updateSteps();
|
|
41803
41960
|
}
|
|
41804
|
-
if (isVertexChanged) {
|
|
41961
|
+
if (isNotInited || isVertexChanged) {
|
|
41805
41962
|
buffer.updateClippings();
|
|
41806
41963
|
}
|
|
41807
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41964
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41808
41965
|
buffer.updateUvs();
|
|
41809
41966
|
}
|
|
41810
41967
|
var pointCount = this.pointCount;
|
|
@@ -41823,17 +41980,17 @@
|
|
|
41823
41980
|
buildRectangleVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_WORLD_SIZE);
|
|
41824
41981
|
copyVertex(vertices, internalTransform, voffset, RECTANGLE_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
|
|
41825
41982
|
// Steps
|
|
41826
|
-
if (isVertexChanged || isTransformChanged) {
|
|
41983
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41827
41984
|
buildRectangleStep(voffset, steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
|
|
41828
41985
|
copyStep(steps, voffset, RECTANGLE_VERTEX_COUNT, pointCount);
|
|
41829
41986
|
}
|
|
41830
41987
|
// Clippings
|
|
41831
|
-
if (isVertexChanged) {
|
|
41988
|
+
if (isNotInited || isVertexChanged) {
|
|
41832
41989
|
buildRectangleClipping(clippings, voffset, RECTANGLE_WORLD_SIZE);
|
|
41833
41990
|
copyClipping(clippings, voffset, RECTANGLE_VERTEX_COUNT, pointCount);
|
|
41834
41991
|
}
|
|
41835
41992
|
// UVs
|
|
41836
|
-
if (isVertexChanged || isTextureChanged) {
|
|
41993
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41837
41994
|
buildRectangleUv(uvs, voffset, textureUvs, RECTANGLE_WORLD_SIZE);
|
|
41838
41995
|
copyUvs(uvs, voffset, RECTANGLE_VERTEX_COUNT, pointCount);
|
|
41839
41996
|
}
|
|
@@ -41849,15 +42006,15 @@
|
|
|
41849
42006
|
// Vertices
|
|
41850
42007
|
buildRectangleVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_WORLD_SIZE);
|
|
41851
42008
|
// Steps
|
|
41852
|
-
if (isVertexChanged || isTransformChanged) {
|
|
42009
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
41853
42010
|
buildRectangleStep(iv, steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_WORLD_SIZE);
|
|
41854
42011
|
}
|
|
41855
42012
|
// Clippings
|
|
41856
|
-
if (isVertexChanged) {
|
|
42013
|
+
if (isNotInited || isVertexChanged) {
|
|
41857
42014
|
buildRectangleClipping(clippings, iv, RECTANGLE_WORLD_SIZE);
|
|
41858
42015
|
}
|
|
41859
42016
|
// UVs
|
|
41860
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42017
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
41861
42018
|
buildRectangleUv(uvs, iv, textureUvs, RECTANGLE_WORLD_SIZE);
|
|
41862
42019
|
}
|
|
41863
42020
|
}
|
|
@@ -42361,8 +42518,8 @@
|
|
|
42361
42518
|
__extends(BuilderLineOfTriangleRoundeds, _super);
|
|
42362
42519
|
function BuilderLineOfTriangleRoundeds(vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) {
|
|
42363
42520
|
var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) || this;
|
|
42364
|
-
_this.radius =
|
|
42365
|
-
_this.corner =
|
|
42521
|
+
_this.radius = 0;
|
|
42522
|
+
_this.corner = 0;
|
|
42366
42523
|
return _this;
|
|
42367
42524
|
}
|
|
42368
42525
|
BuilderLineOfTriangleRoundeds.prototype.init = function (buffer) {
|
|
@@ -42374,6 +42531,7 @@
|
|
|
42374
42531
|
buildTriangleRoundedIndex(buffer.indices, voffset, ioffset);
|
|
42375
42532
|
copyIndex(buffer.indices, TRIANGLE_ROUNDED_VERTEX_COUNT, ioffset, TRIANGLE_ROUNDED_INDEX_COUNT, pointCountReserved);
|
|
42376
42533
|
}
|
|
42534
|
+
this.inited |= BuilderFlag.INDEX;
|
|
42377
42535
|
};
|
|
42378
42536
|
BuilderLineOfTriangleRoundeds.prototype.update = function (buffer, shape) {
|
|
42379
42537
|
var points = shape.points;
|
|
@@ -42416,7 +42574,13 @@
|
|
|
42416
42574
|
isSizeChanged ||
|
|
42417
42575
|
isRadiusChanged ||
|
|
42418
42576
|
isStrokeChanged;
|
|
42419
|
-
|
|
42577
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
42578
|
+
if (isNotInited ||
|
|
42579
|
+
isVertexChanged ||
|
|
42580
|
+
isTransformChanged ||
|
|
42581
|
+
isCornerChanged ||
|
|
42582
|
+
isTextureChanged) {
|
|
42583
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
42420
42584
|
this.pointId = pointId;
|
|
42421
42585
|
var formatted = points.formatted;
|
|
42422
42586
|
this.pointCount = formatted.length;
|
|
@@ -42434,13 +42598,13 @@
|
|
|
42434
42598
|
this.textureTransformId = textureTransformId;
|
|
42435
42599
|
// Buffer
|
|
42436
42600
|
buffer.updateVertices();
|
|
42437
|
-
if (isVertexChanged || isCornerChanged) {
|
|
42601
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
42438
42602
|
buffer.updateClippings();
|
|
42439
42603
|
}
|
|
42440
|
-
if (isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42604
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42441
42605
|
buffer.updateSteps();
|
|
42442
42606
|
}
|
|
42443
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42607
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42444
42608
|
buffer.updateUvs();
|
|
42445
42609
|
}
|
|
42446
42610
|
var pointCount = this.pointCount;
|
|
@@ -42459,17 +42623,17 @@
|
|
|
42459
42623
|
buildTriangleRoundedVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42460
42624
|
copyVertex(vertices, internalTransform, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
|
|
42461
42625
|
// Clippings
|
|
42462
|
-
if (isVertexChanged || isCornerChanged) {
|
|
42626
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
42463
42627
|
buildTriangleRoundedClipping(clippings, voffset, corner, radius);
|
|
42464
42628
|
copyClipping(clippings, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
42465
42629
|
}
|
|
42466
42630
|
// Steps
|
|
42467
|
-
if (isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42631
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42468
42632
|
buildTriangleRoundedStep(steps, clippings, voffset, strokeWidth, strokeStyle, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42469
42633
|
copyStep(steps, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
42470
42634
|
}
|
|
42471
42635
|
// UVs
|
|
42472
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42636
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42473
42637
|
buildTriangleRoundedUv(uvs, voffset, textureUvs, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42474
42638
|
copyUvs(uvs, voffset, TRIANGLE_ROUNDED_VERTEX_COUNT, pointCount);
|
|
42475
42639
|
}
|
|
@@ -42485,15 +42649,15 @@
|
|
|
42485
42649
|
// Vertices
|
|
42486
42650
|
buildTriangleRoundedVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, radius, internalTransform, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42487
42651
|
// Clippings
|
|
42488
|
-
if (isVertexChanged || isCornerChanged) {
|
|
42652
|
+
if (isNotInited || isVertexChanged || isCornerChanged) {
|
|
42489
42653
|
buildTriangleRoundedClipping(clippings, iv, corner, radius);
|
|
42490
42654
|
}
|
|
42491
42655
|
// Steps
|
|
42492
|
-
if (isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42656
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
42493
42657
|
buildTriangleRoundedStep(steps, clippings, iv, strokeWidth, strokeStyle, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42494
42658
|
}
|
|
42495
42659
|
// UVs
|
|
42496
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42660
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42497
42661
|
buildTriangleRoundedUv(uvs, iv, textureUvs, radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
42498
42662
|
}
|
|
42499
42663
|
}
|
|
@@ -42748,6 +42912,7 @@
|
|
|
42748
42912
|
buildTriangleIndex(indices, voffset, ioffset);
|
|
42749
42913
|
copyIndex(indices, TRIANGLE_VERTEX_COUNT, ioffset, TRIANGLE_INDEX_COUNT, pointCountReserved);
|
|
42750
42914
|
}
|
|
42915
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
42751
42916
|
};
|
|
42752
42917
|
BuilderLineOfTriangles.prototype.update = function (buffer, shape) {
|
|
42753
42918
|
var points = shape.points;
|
|
@@ -42782,7 +42947,9 @@
|
|
|
42782
42947
|
var textureTransformId = toTextureTransformId(texture);
|
|
42783
42948
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
42784
42949
|
var isVertexChanged = isPointChanged || isPointSizeChanged || isSizeChanged || isStrokeChanged;
|
|
42785
|
-
|
|
42950
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_UV);
|
|
42951
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
|
|
42952
|
+
this.inited |= BuilderFlag.VERTEX_STEP_AND_UV;
|
|
42786
42953
|
this.pointId = pointId;
|
|
42787
42954
|
var formatted = points.formatted;
|
|
42788
42955
|
this.pointCount = formatted.length;
|
|
@@ -42794,12 +42961,14 @@
|
|
|
42794
42961
|
this.strokeAlign = strokeAlign;
|
|
42795
42962
|
this.strokeWidth = strokeWidth;
|
|
42796
42963
|
this.strokeStyle = strokeStyle;
|
|
42964
|
+
this.texture = texture;
|
|
42965
|
+
this.textureTransformId = textureTransformId;
|
|
42797
42966
|
// Buffer
|
|
42798
42967
|
buffer.updateVertices();
|
|
42799
|
-
if (isVertexChanged || isTransformChanged) {
|
|
42968
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
42800
42969
|
buffer.updateSteps();
|
|
42801
42970
|
}
|
|
42802
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42971
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42803
42972
|
buffer.updateUvs();
|
|
42804
42973
|
}
|
|
42805
42974
|
var pointCount = this.pointCount;
|
|
@@ -42816,11 +42985,11 @@
|
|
|
42816
42985
|
var pointSizeY = pointSize.getY(0);
|
|
42817
42986
|
buildTriangleVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, TRIANGLE_WORLD_SIZE);
|
|
42818
42987
|
copyVertex(vertices, internalTransform, voffset, TRIANGLE_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
|
|
42819
|
-
if (isVertexChanged || isTransformChanged) {
|
|
42988
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
42820
42989
|
buildTriangleStep(steps, clippings, voffset, TRIANGLE_VERTEX_COUNT, strokeWidth, strokeStyle, TRIANGLE_WORLD_SIZE);
|
|
42821
42990
|
copyStep(steps, voffset, TRIANGLE_VERTEX_COUNT, pointCount);
|
|
42822
42991
|
}
|
|
42823
|
-
if (isVertexChanged || isTextureChanged) {
|
|
42992
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42824
42993
|
buildTriangleUv(uvs, textureUvs, voffset, TRIANGLE_WORLD_SIZE);
|
|
42825
42994
|
copyUvs(uvs, voffset, TRIANGLE_VERTEX_COUNT, pointCount);
|
|
42826
42995
|
}
|
|
@@ -42834,10 +43003,10 @@
|
|
|
42834
43003
|
var pointSizeY = pointSize.getY(i);
|
|
42835
43004
|
var iv = voffset + i * TRIANGLE_VERTEX_COUNT;
|
|
42836
43005
|
buildTriangleVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, TRIANGLE_WORLD_SIZE);
|
|
42837
|
-
if (isVertexChanged || isTransformChanged) {
|
|
43006
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
42838
43007
|
buildTriangleStep(steps, clippings, iv, TRIANGLE_VERTEX_COUNT, strokeWidth, strokeStyle, TRIANGLE_WORLD_SIZE);
|
|
42839
43008
|
}
|
|
42840
|
-
if (isVertexChanged || isTextureChanged) {
|
|
43009
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
42841
43010
|
buildTriangleUv(uvs, textureUvs, iv, TRIANGLE_WORLD_SIZE);
|
|
42842
43011
|
}
|
|
42843
43012
|
}
|
|
@@ -43182,6 +43351,7 @@
|
|
|
43182
43351
|
var voffset = this.vertexOffset;
|
|
43183
43352
|
buildSemicircleClipping(buffer.clippings, voffset);
|
|
43184
43353
|
buildSemicircleIndex(buffer.indices, voffset, this.indexOffset);
|
|
43354
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
43185
43355
|
};
|
|
43186
43356
|
BuilderSemicircle.prototype.update = function (buffer, shape) {
|
|
43187
43357
|
this.updateVertexAndStep(buffer, shape);
|
|
@@ -43203,7 +43373,9 @@
|
|
|
43203
43373
|
var isStrokeChanged = this.strokeAlign !== strokeAlign ||
|
|
43204
43374
|
this.strokeWidth !== strokeWidth ||
|
|
43205
43375
|
this.strokeStyle !== strokeStyle;
|
|
43206
|
-
|
|
43376
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
|
|
43377
|
+
if (isNotInited || isSizeChanged || isTransformChanged || isStrokeChanged) {
|
|
43378
|
+
this.inited |= BuilderFlag.VERTEX_AND_STEP;
|
|
43207
43379
|
this.sizeX = sizeX;
|
|
43208
43380
|
this.sizeY = sizeY;
|
|
43209
43381
|
this.transformLocalId = transformLocalId;
|
|
@@ -43220,7 +43392,11 @@
|
|
|
43220
43392
|
BuilderSemicircle.prototype.updateUv = function (buffer, shape) {
|
|
43221
43393
|
var texture = toTexture(shape);
|
|
43222
43394
|
var textureTransformId = toTextureTransformId(texture);
|
|
43223
|
-
|
|
43395
|
+
var isNotInited = !(this.inited & BuilderFlag.UV);
|
|
43396
|
+
if (isNotInited ||
|
|
43397
|
+
texture !== this.texture ||
|
|
43398
|
+
textureTransformId !== this.textureTransformId) {
|
|
43399
|
+
this.inited |= BuilderFlag.UV;
|
|
43224
43400
|
this.texture = texture;
|
|
43225
43401
|
this.textureTransformId = textureTransformId;
|
|
43226
43402
|
buffer.updateUvs();
|
|
@@ -43237,8 +43413,8 @@
|
|
|
43237
43413
|
*/
|
|
43238
43414
|
var createSemicircleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
43239
43415
|
var tcount = toTextBufferCount(shape);
|
|
43240
|
-
var tvcount = tcount
|
|
43241
|
-
var ticount = tcount
|
|
43416
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
43417
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
43242
43418
|
var vcount = SEMICIRCLE_VERTEX_COUNT + tvcount;
|
|
43243
43419
|
var icount = SEMICIRCLE_INDEX_COUNT + ticount;
|
|
43244
43420
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -43321,6 +43497,7 @@
|
|
|
43321
43497
|
buffer.updateIndices();
|
|
43322
43498
|
buildTriangleClipping(buffer.clippings, this.vertexOffset);
|
|
43323
43499
|
buildTriangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
43500
|
+
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
43324
43501
|
};
|
|
43325
43502
|
BuilderTriangle.prototype.update = function (buffer, shape) {
|
|
43326
43503
|
this.updateVertexStepAndUv(buffer, shape);
|
|
@@ -43345,7 +43522,9 @@
|
|
|
43345
43522
|
var textureTransformId = toTextureTransformId(texture);
|
|
43346
43523
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
43347
43524
|
var isVertexChanged = isSizeChanged || isStrokeChanged;
|
|
43348
|
-
|
|
43525
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_UV);
|
|
43526
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isTextureChanged) {
|
|
43527
|
+
this.inited |= BuilderFlag.VERTEX_STEP_AND_UV;
|
|
43349
43528
|
this.sizeX = sizeX;
|
|
43350
43529
|
this.sizeY = sizeY;
|
|
43351
43530
|
this.transformLocalId = transformLocalId;
|
|
@@ -43357,11 +43536,11 @@
|
|
|
43357
43536
|
var voffset = this.vertexOffset;
|
|
43358
43537
|
buffer.updateVertices();
|
|
43359
43538
|
buildTriangleVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, TRIANGLE_WORLD_SIZE);
|
|
43360
|
-
if (isVertexChanged || isTransformChanged) {
|
|
43539
|
+
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
43361
43540
|
buffer.updateSteps();
|
|
43362
43541
|
buildTriangleStep(buffer.steps, buffer.clippings, voffset, TRIANGLE_VERTEX_COUNT, strokeWidth, strokeStyle, TRIANGLE_WORLD_SIZE);
|
|
43363
43542
|
}
|
|
43364
|
-
if (isVertexChanged || isTextureChanged) {
|
|
43543
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
43365
43544
|
buffer.updateUvs();
|
|
43366
43545
|
buildTriangleUv(buffer.uvs, toTextureUvs(texture), voffset, TRIANGLE_WORLD_SIZE);
|
|
43367
43546
|
}
|
|
@@ -43376,8 +43555,8 @@
|
|
|
43376
43555
|
*/
|
|
43377
43556
|
var createTriangleUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
43378
43557
|
var tcount = toTextBufferCount(shape);
|
|
43379
|
-
var tvcount = tcount
|
|
43380
|
-
var ticount = tcount
|
|
43558
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
43559
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
43381
43560
|
var vcount = TRIANGLE_VERTEX_COUNT + tvcount;
|
|
43382
43561
|
var icount = TRIANGLE_INDEX_COUNT + ticount;
|
|
43383
43562
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -43414,13 +43593,14 @@
|
|
|
43414
43593
|
__extends(BuilderTriangleRounded, _super);
|
|
43415
43594
|
function BuilderTriangleRounded(vertexOffset, indexOffset, vertexCount, indexCount) {
|
|
43416
43595
|
var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount) || this;
|
|
43417
|
-
_this.radius =
|
|
43418
|
-
_this.corner =
|
|
43596
|
+
_this.radius = 0;
|
|
43597
|
+
_this.corner = 0;
|
|
43419
43598
|
return _this;
|
|
43420
43599
|
}
|
|
43421
43600
|
BuilderTriangleRounded.prototype.init = function (buffer) {
|
|
43422
43601
|
buffer.updateIndices();
|
|
43423
43602
|
buildTriangleRoundedIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
43603
|
+
this.inited |= BuilderFlag.INDEX;
|
|
43424
43604
|
};
|
|
43425
43605
|
BuilderTriangleRounded.prototype.update = function (buffer, shape) {
|
|
43426
43606
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
@@ -43449,7 +43629,13 @@
|
|
|
43449
43629
|
var textureTransformId = toTextureTransformId(texture);
|
|
43450
43630
|
var isTextureChanged = texture !== this.texture || textureTransformId !== this.textureTransformId;
|
|
43451
43631
|
var isVertexChanged = isSizeChanged || isRadiusChanged || isStrokeChanged;
|
|
43452
|
-
|
|
43632
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV);
|
|
43633
|
+
if (isNotInited ||
|
|
43634
|
+
isVertexChanged ||
|
|
43635
|
+
isTransformChanged ||
|
|
43636
|
+
isCornerChanged ||
|
|
43637
|
+
isTextureChanged) {
|
|
43638
|
+
this.inited |= BuilderFlag.VERTEX_CLIPPING_STEP_AND_UV;
|
|
43453
43639
|
this.sizeX = sizeX;
|
|
43454
43640
|
this.sizeY = sizeY;
|
|
43455
43641
|
this.radius = radius;
|
|
@@ -43463,15 +43649,15 @@
|
|
|
43463
43649
|
var voffset = this.vertexOffset;
|
|
43464
43650
|
buffer.updateVertices();
|
|
43465
43651
|
buildTriangleRoundedVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, radius, shape.transform.internalTransform, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
43466
|
-
if (isRadiusChanged || isCornerChanged) {
|
|
43652
|
+
if (isNotInited || isRadiusChanged || isCornerChanged) {
|
|
43467
43653
|
buffer.updateClippings();
|
|
43468
43654
|
buildTriangleRoundedClipping(buffer.clippings, voffset, corner, radius);
|
|
43469
43655
|
}
|
|
43470
|
-
if (isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
43656
|
+
if (isNotInited || isVertexChanged || isTransformChanged || isCornerChanged) {
|
|
43471
43657
|
buffer.updateSteps();
|
|
43472
43658
|
buildTriangleRoundedStep(buffer.steps, buffer.clippings, voffset, strokeWidth, strokeStyle, shape.radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
43473
43659
|
}
|
|
43474
|
-
if (isVertexChanged || isTextureChanged) {
|
|
43660
|
+
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
43475
43661
|
buffer.updateUvs();
|
|
43476
43662
|
buildTriangleRoundedUv(buffer.uvs, voffset, toTextureUvs(texture), radius, TRIANGLE_ROUNDED_WORLD_SIZE);
|
|
43477
43663
|
}
|
|
@@ -43486,8 +43672,8 @@
|
|
|
43486
43672
|
*/
|
|
43487
43673
|
var createTriangleRoundedUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
43488
43674
|
var tcount = toTextBufferCount(shape);
|
|
43489
|
-
var tvcount = tcount
|
|
43490
|
-
var ticount = tcount
|
|
43675
|
+
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
43676
|
+
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
43491
43677
|
var vcount = TRIANGLE_ROUNDED_VERTEX_COUNT + tvcount;
|
|
43492
43678
|
var icount = TRIANGLE_ROUNDED_INDEX_COUNT + ticount;
|
|
43493
43679
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
@@ -63993,7 +64179,7 @@
|
|
|
63993
64179
|
var runtime = actionable.runtime;
|
|
63994
64180
|
if (runtime) {
|
|
63995
64181
|
var runtimeEffect = runtime.effect;
|
|
63996
|
-
if (time < runtimeEffect) {
|
|
64182
|
+
if (0 <= runtimeEffect && time < runtimeEffect) {
|
|
63997
64183
|
effect = effect < 0 ? runtimeEffect : Math.min(effect, runtimeEffect);
|
|
63998
64184
|
}
|
|
63999
64185
|
}
|
|
@@ -64014,7 +64200,7 @@
|
|
|
64014
64200
|
var runtime = actionable.runtime;
|
|
64015
64201
|
if (runtime) {
|
|
64016
64202
|
var runtimeEffect = runtime.effect;
|
|
64017
|
-
if (time < runtimeEffect) {
|
|
64203
|
+
if (0 <= runtimeEffect && time < runtimeEffect) {
|
|
64018
64204
|
effect = effect < 0 ? runtimeEffect : Math.min(effect, runtimeEffect);
|
|
64019
64205
|
}
|
|
64020
64206
|
}
|
|
@@ -70983,9 +71169,9 @@
|
|
|
70983
71169
|
get: function () {
|
|
70984
71170
|
var indices = this._indices;
|
|
70985
71171
|
if (0 < indices.size) {
|
|
70986
|
-
var result_1 =
|
|
71172
|
+
var result_1 = -1;
|
|
70987
71173
|
indices.forEach(function (index) {
|
|
70988
|
-
if (result_1
|
|
71174
|
+
if (result_1 < 0) {
|
|
70989
71175
|
result_1 = index;
|
|
70990
71176
|
}
|
|
70991
71177
|
});
|
|
@@ -75953,7 +76139,9 @@
|
|
|
75953
76139
|
buildSemicircleStep: buildSemicircleStep,
|
|
75954
76140
|
buildSemicircleUv: buildSemicircleUv,
|
|
75955
76141
|
TEXT_VERTEX_COUNT: TEXT_VERTEX_COUNT,
|
|
76142
|
+
TEXT_VERTEX_COUNT_SHIFT: TEXT_VERTEX_COUNT_SHIFT,
|
|
75956
76143
|
TEXT_INDEX_COUNT: TEXT_INDEX_COUNT,
|
|
76144
|
+
TEXT_INDEX_COUNT_SHIFT: TEXT_INDEX_COUNT_SHIFT,
|
|
75957
76145
|
TEXT_FMIN: TEXT_FMIN,
|
|
75958
76146
|
toTextBufferCount: toTextBufferCount,
|
|
75959
76147
|
buildTextClipping: buildTextClipping,
|
|
@@ -76005,6 +76193,7 @@
|
|
|
76005
76193
|
BuilderText: BuilderText,
|
|
76006
76194
|
BuilderTriangleRounded: BuilderTriangleRounded,
|
|
76007
76195
|
BuilderTriangle: BuilderTriangle,
|
|
76196
|
+
BuilderFlag: BuilderFlag,
|
|
76008
76197
|
toTransformLocalId: toTransformLocalId,
|
|
76009
76198
|
toTexture: toTexture,
|
|
76010
76199
|
toTextureTransformId: toTextureTransformId,
|