@wcardinal/wcardinal-ui 0.462.0 → 0.463.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/d-diagram-base.d.ts +6 -1
- package/dist/types/wcardinal/ui/d-diagram-canvas-base.d.ts +6 -0
- package/dist/types/wcardinal/ui/d-diagram-layer-container.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-diagram-layer.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/e-shape-container.d.ts +3 -1
- package/dist/types/wcardinal/ui/shape/variant/build-line.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/builder-line.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/builder.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-base.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-base.d.ts +2 -0
- package/dist/wcardinal/ui/d-diagram-base.js +17 -5
- package/dist/wcardinal/ui/d-diagram-base.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-canvas-base.js +6 -6
- package/dist/wcardinal/ui/d-diagram-canvas-base.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-layer-container.js +4 -3
- package/dist/wcardinal/ui/d-diagram-layer-container.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-layer.js +4 -3
- package/dist/wcardinal/ui/d-diagram-layer.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-container.js +6 -3
- package/dist/wcardinal/ui/shape/e-shape-container.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-renderer.js +2 -2
- package/dist/wcardinal/ui/shape/e-shape-renderer.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-line.js +82 -17
- package/dist/wcardinal/ui/shape/variant/build-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line.js +8 -12
- package/dist/wcardinal/ui/shape/variant/builder-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder.js +2 -0
- package/dist/wcardinal/ui/shape/variant/builder.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-base.js +6 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-base.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-base.js +6 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-base.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +7 -1
- 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 +7 -1
- 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 +7 -1
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.js +7 -1
- 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 +7 -1
- 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 +7 -1
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui.cjs.js +144 -52
- package/dist/wcardinal-ui.js +132 -52
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
package/dist/wcardinal-ui.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.462.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -1419,6 +1419,7 @@ var UV = 8;
|
|
|
1419
1419
|
var INDEX = 16;
|
|
1420
1420
|
var VERTEX_AND_STEP = VERTEX | STEP;
|
|
1421
1421
|
var VERTEX_STEP_AND_UV = VERTEX_AND_STEP | UV;
|
|
1422
|
+
var VERTEX_STEP_AND_INDEX = VERTEX | STEP | INDEX;
|
|
1422
1423
|
var VERTEX_STEP_UV_AND_INDEX = VERTEX_STEP_AND_UV | INDEX;
|
|
1423
1424
|
var ALL$1 = VERTEX | STEP | COLOR | UV | INDEX;
|
|
1424
1425
|
var BuilderFlag = {
|
|
@@ -1430,6 +1431,7 @@ var BuilderFlag = {
|
|
|
1430
1431
|
INDEX: INDEX,
|
|
1431
1432
|
VERTEX_AND_STEP: VERTEX_AND_STEP,
|
|
1432
1433
|
VERTEX_STEP_AND_UV: VERTEX_STEP_AND_UV,
|
|
1434
|
+
VERTEX_STEP_AND_INDEX: VERTEX_STEP_AND_INDEX,
|
|
1433
1435
|
VERTEX_STEP_UV_AND_INDEX: VERTEX_STEP_UV_AND_INDEX,
|
|
1434
1436
|
ALL: ALL$1
|
|
1435
1437
|
};
|
|
@@ -16676,7 +16678,7 @@ var EShapeRendererIterator = /** @class */ (function () {
|
|
|
16676
16678
|
* SPDX-License-Identifier: Apache-2.0
|
|
16677
16679
|
*/
|
|
16678
16680
|
var VERTEX_SHADER$1 = "\nattribute highp vec2 aPosition;\nattribute highp vec2 aStepA;\nattribute highp vec4 aStepB;\nattribute highp vec3 aColor;\nattribute highp vec2 aUv;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mediump float shapeScale;\nuniform mediump float antialiasWeight;\n\nvarying mediump float vType;\nvarying mediump vec2 vStepA;\nvarying mediump vec4 vStepB;\nvarying mediump vec4 vLength;\nvarying mediump vec4 vColorFill;\nvarying mediump vec4 vColorStroke;\nvarying mediump vec2 vUv;\n\nvec2 toInverse(in vec2 v) {\n\treturn vec2(-v.y, v.x);\n}\n\nvec4 toGeneral(in float v) {\n\tvec4 c = vec4(1.0, 1.0/64.0, 1.0/64.0/64.0, 1.0/64.0/64.0/64.0) * v;\n\tc -= fract(c);\n\tc -= c.yzwx * vec4(64.0, 64.0, 64.0, 0.0);\n\treturn c;\n}\n\nfloat toStrokeWidthScale(in float scale) {\n\treturn (\n\t\tscale == 3.0 || scale == 7.0 ?\n\t\tshapeScale : (\n\t\t\tscale == 1.0 || scale == 5.0 ?\n\t\t\tmin(1.0, shapeScale) : (\n\t\t\t\tscale == 2.0 || scale == 6.0 ?\n\t\t\t\tmax(1.0, shapeScale) : 1.0\n\t\t\t)\n\t\t)\n\t);\n}\n\nvec2 toUnpackedF2x1024(in float v) {\n\tvec2 c = vec2(1.0, 1.0/1024.0) * v;\n\tc -= fract(c);\n\tc -= c.yx * vec2(1024.0, 0.0);\n\tc /= vec2(1023.0, 1023.0);\n\treturn c;\n}\n\nvec3 toUnpackedF3x256(in float v) {\n\tvec3 c = vec3(1.0, 1.0/256.0, 1.0/256.0/256.0) * v;\n\tc -= fract(c);\n\tc -= c.yzx * vec3(256.0, 256.0, 0.0);\n\tc /= 255.0;\n\treturn c;\n}\n\nvec2 toPosition012(in vec2 v) {\n\treturn (projectionMatrix * translationMatrix * vec3(v, 1.0)).xy;\n}\n\nvec4 toStepB01(in vec4 sb) {\n\treturn vec4(sb.xy, toUnpackedF2x1024(sb.z));\n}\n\nvec4 toStepB2(in vec4 sb, in float strokeWidth) {\n\tfloat x = min(0.4, 0.4 / 12.0 * sb.x * antialiasWeight);\n\tfloat w = clamp(strokeWidth, 0.0, 1.0) * 0.4;\n\tfloat p = w * sb.y + sb.z;\n\tfloat y = 0.5 - p;\n\tfloat z = 0.5 - p - w;\n\treturn vec4(y, z, y - max(0.01, y - x), z - max(0.01, z - x));\n}\n\nvec2 toPosition3(in float type, in vec2 p, in float npacked, in float length, in float strokeWidth, out float shift) {\n\tvec3 t = vec3(1.0, 1.0/1024.0, 1.0/1024.0/1024.0) * npacked;\n\tt -= fract(t);\n\tt -= t.yzx * vec3(1024.0, 1024.0, 0.0);\n\tt *= vec3(1.0/511.5, 1.0/511.5, 1.0);\n\tt -= vec3(1.0, 1.0, 0.0);\n\tvec2 n0 = vec2(t.x, ((0.5 < t.z && t.z < 1.5) || 2.5 < t.z ? +1.0 : -1.0) * sqrt(max(0.0, 1.0 - t.x * t.x)));\n\tvec2 n1 = vec2(t.y, (1.5 < t.z ? +1.0 : -1.0) * sqrt(max(0.0, 1.0 - t.y * t.y)));\n\n\tvec2 n0i = toInverse(n0);\n\tvec2 n1i = toInverse(n1);\n\tfloat direction = sign(4.5 - type);\n\n\t// Offset\n\tfloat cross = dot(n0i, n1);\n\tbool bcross = 0.00001 < abs(cross);\n\tfloat crossi = (bcross ? 1.0 / cross : 0.0);\n\tfloat b = dot(n1 - n0, n0) * crossi;\n\tfloat offsetSize = direction * strokeWidth * 0.5;\n\tvec2 offset = n1 + n1i * b;\n\n\t// Miter\n\tvec2 pmiter = p + offsetSize * offset;\n\tfloat miterAngle0 = dot( n0i, offsetSize * offset - length * n0i );\n\tfloat miterAngle1 = dot( n1i, offsetSize * offset + length * n1i );\n\tfloat miterLength = dot( offset, offset );\n\tfloat miterSide = direction * cross;\n\n\t// Bevel\n\tvec2 n = (type == 4.0 || type == 6.0 ? n1 : n0);\n\tvec2 pbevel = p + offsetSize * n;\n\n\t//\n\tvec2 presult = (\n\t\t0.0 <= miterSide ?\n\t\t(miterAngle0 < 0.0 && 0.0 <= miterAngle1 && bcross ? pmiter : pbevel) :\n\t\t(miterLength < 6.0 && bcross ? pmiter : pbevel)\n\t);\n\tvec2 ni = (type == 4.0 || type == 6.0 ? n1i : n0i);\n\tshift = dot(ni, p - presult);\n\treturn toPosition012(presult);\n}\n\nvec2 toStepA3(in float type, in float strokeWidth) {\n\treturn vec2(type < 4.5 ? 1.0 : 0.0, strokeWidth);\n}\n\nfloat toDotWidth(in float strokeScaling, in float strokeWidthScale) {\n\treturn aStepA.x * (\n\t\tstrokeScaling == 4.0 || strokeScaling == 5.0 ||\n\t\tstrokeScaling == 6.0 || strokeScaling == 7.0 ?\n\t\tstrokeWidthScale : 1.0\n\t);\n}\n\nvec2 toDotPattern(in float dash) {\n\treturn (dash < 0.5 ?\n\t\tvec2(1.0, 0.0) :\n\t\t(dash < 3.5 ?\n\t\t\t(dash < 1.5 ?\n\t\t\t\tvec2(1.0, 1.0) :\n\t\t\t\t(2.5 < dash ?\n\t\t\t\t\tvec2(1.0, 2.0) :\n\t\t\t\t\tvec2(1.0, 0.5)\n\t\t\t\t)\n\t\t\t) :\n\t\t\t(dash < 4.5 ?\n\t\t\t\tvec2(2.0, 1.0) :\n\t\t\t\t(5.5 < dash ?\n\t\t\t\t\tvec2(2.0, 2.0) :\n\t\t\t\t\tvec2(2.0, 0.5)\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t);\n}\n\nvec4 toLength3(in float shift, in float dash, in float strokeScaling, in float strokeWidthScale) {\n\tfloat width = toDotWidth(strokeScaling, strokeWidthScale);\n\tvec2 pattern = toDotPattern(dash);\n\treturn vec4(aStepB.y + shift, pattern.x * width, pattern.y * width, aStepB.z);\n}\n\nvec4 toLength7(in float type, in float strokeScaling, in float strokeWidthScale) {\n\tfloat width = toDotWidth(strokeScaling, strokeWidthScale);\n\tvec2 pattern = toDotPattern(type - 7.0);\n\treturn vec4(aStepB.w, pattern.x * width, pattern.y * width, -1.0);\n}\n\nvoid toColors(in vec3 source, out vec4 fillColor, out vec4 strokeColor) {\n\tvec2 a = toUnpackedF2x1024(source.z);\n\tfillColor.xyz = toUnpackedF3x256(source.x).zyx * a.x;\n\tfillColor.w = a.x;\n\tstrokeColor.xyz = toUnpackedF3x256(source.y).zyx * a.y;\n\tstrokeColor.w = a.y;\n}\n\nvoid main(void) {\n\tvec4 general = toGeneral(aStepA.y);\n\tfloat type = general.x;\n\tfloat strokeScaling = general.y;\n\tfloat strokeWidthScale = toStrokeWidthScale(strokeScaling);\n\tfloat strokeWidth = strokeWidthScale * aStepA.x;\n\n\tvType = type;\n\tif (type < 2.5 || 6.5 < type) {\n\t\tgl_Position = vec4(toPosition012(aPosition), 0.0, 1.0);\n\t\tvStepA = strokeWidth * general.zw;\n\t\tif (type < 1.5) {\n\t\t\tvStepB = toStepB01(aStepB);\n\t\t\tvLength = vec4(-1.0, 0.0, 0.0, -1.0);\n\t\t} else if (type < 2.5) {\n\t\t\tvStepB = toStepB2(aStepB, strokeWidth);\n\t\t\tvLength = vec4(-1.0, 0.0, 0.0, -1.0);\n\t\t} else {\n\t\t\tvStepB = toStepB01(aStepB);\n\t\t\tvLength = toLength7(type, strokeScaling, strokeWidthScale);\n\t\t}\n\t} else {\n\t\tfloat shift3 = 0.0;\n\t\tgl_Position = vec4(toPosition3(type, aPosition, aStepB.x, aStepB.w, strokeWidth, shift3), 0.0, 1.0);\n\t\tvStepA = toStepA3(type, strokeWidth);\n\t\tvStepB = vec4(0.0);\n\t\tvLength = toLength3(shift3, general.z, strokeScaling, strokeWidthScale);\n\t}\n\ttoColors(aColor, vColorFill, vColorStroke);\n\tvUv = aUv;\n}";
|
|
16679
|
-
var FRAGMENT_SHADER$1 = "\nvarying mediump float vType;\nvarying mediump vec2 vStepA;\nvarying mediump vec4 vStepB;\nvarying mediump vec4 vLength;\nvarying mediump vec4 vColorFill;\nvarying mediump vec4 vColorStroke;\nvarying mediump vec2 vUv;\n\nuniform sampler2D sampler;\nuniform mediump float antialiasWeight;\n\nvec4 toColor0(in vec4 texture) {\n\tvec2 f = vec2(1.0) / vStepB.xy;\n\tvec2 c = vStepB.zw;\n\tvec2 awd = antialiasWeight * f;\n\tvec2 swd = vStepA * f;\n\tvec2 one = vec2(1.0);\n\tvec2
|
|
16681
|
+
var FRAGMENT_SHADER$1 = "\nvarying mediump float vType;\nvarying mediump vec2 vStepA;\nvarying mediump vec4 vStepB;\nvarying mediump vec4 vLength;\nvarying mediump vec4 vColorFill;\nvarying mediump vec4 vColorStroke;\nvarying mediump vec2 vUv;\n\nuniform sampler2D sampler;\nuniform mediump float antialiasWeight;\n\nvec4 toColor0(in vec4 texture) {\n\tvec2 f = vec2(1.0) / vStepB.xy;\n\tvec2 c = vStepB.zw;\n\tvec2 awd = 0.5 * antialiasWeight * f;\n\tvec2 swd = vStepA * f;\n\tvec2 one = vec2(1.0);\n\tvec2 s0 = smoothstep(one - awd, one + awd, c);\n\tvec2 s1 = smoothstep(one - swd - awd, one - swd + awd, c);\n\tfloat s2 = max(s0.x, s0.y);\n\tfloat s3 = max(s1.x, s1.y);\n\n\treturn texture * (\n\t\tvColorStroke * (s3 - s2) +\n\t\tvColorFill * (1.0 - s3)\n\t);\n}\n\nvec4 toColor1(in vec4 texture) {\n\tvec2 d = vStepB.xy;\n\tvec2 c = vStepB.zw;\n\tvec2 awd = 0.5 * antialiasWeight / d;\n\tvec2 swd = vStepA / d;\n\tvec2 one = vec2(1.0);\n\tfloat s0 = smoothstep(length(c/(one + awd)), length(c/(one - awd)), 1.0);\n\tfloat s1 = smoothstep(length(c/(one - swd + awd)), length(c/(one - swd - awd)), 1.0);\n\treturn texture * (\n\t\tvColorStroke * (s0 - s1) +\n\t\tvColorFill * s1\n\t);\n}\n\nvec4 toColor2(in vec4 texture) {\n\tvec2 p0 = vStepB.xy;\n\tvec2 p1 = vStepB.zw;\n\tvec2 d = vec2(dot(texture, vec4(1.0, 1.0/255.0, 1.0/255.0/255.0, 0.0)));\n\tvec2 s = smoothstep(p0 - p1, p0 + p1, d);\n\treturn vColorStroke * (s.y - s.x) + vColorFill * s.x;\n}\n\nfloat toLineStep(in vec4 parameters) {\n\tfloat l = parameters.x;\n\tfloat lp0 = parameters.y;\n\tfloat lp1 = parameters.z;\n\tfloat lt = parameters.w;\n\tfloat ld = 0.5 * antialiasWeight;\n\tfloat lm = mod(l, lp0 + lp1);\n\tfloat s0 = (0.0 < lp1 ? smoothstep(-ld, ld, lm) - smoothstep(lp0 - ld, lp0 + ld, lm) : 1.0);\n\tfloat s1 = (0.0 <= lt ? smoothstep(-ld, ld, l) - smoothstep(lt - ld, lt + ld, l) : 1.0);\n\treturn s0 * s1;\n}\n\nvec4 toColor3(in vec4 texture) {\n\tfloat c = vStepA.x;\n\tfloat awd = 0.5 * antialiasWeight / vStepA.y;\n\tfloat s0 = smoothstep(-awd, awd, c);\n\tfloat s1 = smoothstep(1.0 - awd, 1.0 + awd, c);\n\treturn texture * vColorStroke * (s0 - s1) * toLineStep(vLength);\n}\n\nvec4 toColor7(in vec4 texture) {\n\tfloat aw = 0.5 * antialiasWeight;\n\tfloat awd = aw * vStepB.x;\n\tfloat swd = vStepA.x * vStepB.x;\n\tfloat s0 = smoothstep(1.0 - awd, 1.0 + awd, vStepB.z);\n\tfloat s1 = smoothstep(1.0 - swd - awd, 1.0 - swd + awd, vStepB.z) * toLineStep(vLength);\n\tfloat s2 = smoothstep(-aw, +aw, vStepB.y);\n\treturn texture * (\n\t\tvColorStroke * (s1 - s0) +\n\t\tvColorFill * (1.0 - s1) * s2\n\t);\n}\n\nvoid main(void) {\n\tvec4 texture = texture2D(sampler, vUv);\n\tif (vType < 0.5) {\n\t\tgl_FragColor = toColor0(texture);\n\t} else if (vType < 1.5) {\n\t\tgl_FragColor = toColor1(texture);\n\t} else if (vType < 2.5) {\n\t\tgl_FragColor = toColor2(texture);\n\t} else if (vType < 6.5) {\n\t\tgl_FragColor = toColor3(texture);\n\t} else {\n\t\tgl_FragColor = toColor7(texture);\n\t}\n}";
|
|
16680
16682
|
var EShapeRenderer = /** @class */ (function (_super) {
|
|
16681
16683
|
__extends(EShapeRenderer, _super);
|
|
16682
16684
|
function EShapeRenderer(renderer) {
|
|
@@ -16771,7 +16773,7 @@ var EShapeRenderer = /** @class */ (function (_super) {
|
|
|
16771
16773
|
if (shader != null && (shape != null || 0 < shapes.length)) {
|
|
16772
16774
|
var resolution = renderer.resolution;
|
|
16773
16775
|
var buffers = container.getBuffers();
|
|
16774
|
-
var antialiasWeight = container.
|
|
16776
|
+
var antialiasWeight = container.getAntialiasWeight();
|
|
16775
16777
|
// Update textures
|
|
16776
16778
|
if (isDirty) {
|
|
16777
16779
|
// Atlases
|
|
@@ -16875,8 +16877,10 @@ var EShapeContainer = /** @class */ (function (_super) {
|
|
|
16875
16877
|
_this._fontAtlases = new DynamicSDFFontAtlases();
|
|
16876
16878
|
_this._pixelScale = 1;
|
|
16877
16879
|
_this._pixelScaleId = -2; // Since this._shapeScaleId starts from -1.
|
|
16880
|
+
_this._pixelScaleResolution = 1;
|
|
16878
16881
|
_this._shapeScale = 1;
|
|
16879
16882
|
_this._shapeScaleId = -1; // Since Transform._worldID starts from zero.
|
|
16883
|
+
_this._antialiasWeight = 1;
|
|
16880
16884
|
_this._work = new pixi_js.Point();
|
|
16881
16885
|
_this._buffers = [];
|
|
16882
16886
|
return _this;
|
|
@@ -16954,8 +16958,9 @@ var EShapeContainer = /** @class */ (function (_super) {
|
|
|
16954
16958
|
EShapeContainer.prototype.toPixelScale = function (resolution) {
|
|
16955
16959
|
var shapeScale = this.toShapeScale();
|
|
16956
16960
|
var shapeScaleId = this._shapeScaleId;
|
|
16957
|
-
if (this._pixelScaleId !== shapeScaleId) {
|
|
16961
|
+
if (this._pixelScaleId !== shapeScaleId || this._pixelScaleResolution !== resolution) {
|
|
16958
16962
|
this._pixelScaleId = shapeScaleId;
|
|
16963
|
+
this._pixelScaleResolution = resolution;
|
|
16959
16964
|
this._pixelScale = (1 / resolution) * shapeScale;
|
|
16960
16965
|
}
|
|
16961
16966
|
return this._pixelScale;
|
|
@@ -16963,8 +16968,8 @@ var EShapeContainer = /** @class */ (function (_super) {
|
|
|
16963
16968
|
EShapeContainer.prototype.getPixelScale = function () {
|
|
16964
16969
|
return this._pixelScale;
|
|
16965
16970
|
};
|
|
16966
|
-
EShapeContainer.prototype.
|
|
16967
|
-
return
|
|
16971
|
+
EShapeContainer.prototype.getAntialiasWeight = function () {
|
|
16972
|
+
return this._antialiasWeight;
|
|
16968
16973
|
};
|
|
16969
16974
|
EShapeContainer.prototype.hitTest = function (global, onHit) {
|
|
16970
16975
|
var local = this._work;
|
|
@@ -24535,10 +24540,21 @@ var DDiagramBase = /** @class */ (function (_super) {
|
|
|
24535
24540
|
var _a;
|
|
24536
24541
|
var _this = _super.call(this, options) || this;
|
|
24537
24542
|
_this._serialized = null;
|
|
24538
|
-
|
|
24539
|
-
|
|
24540
|
-
|
|
24541
|
-
|
|
24543
|
+
var theme = _this.theme;
|
|
24544
|
+
if (options != null) {
|
|
24545
|
+
_this._tileFactory = options.tile;
|
|
24546
|
+
_this._controller = options.controller;
|
|
24547
|
+
_this._isAmbient = (_a = options.ambient) !== null && _a !== void 0 ? _a : theme.isAmbient();
|
|
24548
|
+
_this._antialias = options.antialias;
|
|
24549
|
+
_this._snapshot = new DDiagramSnapshot(_this, options.snapshot);
|
|
24550
|
+
}
|
|
24551
|
+
else {
|
|
24552
|
+
_this._tileFactory = undefined;
|
|
24553
|
+
_this._controller = undefined;
|
|
24554
|
+
_this._isAmbient = theme.isAmbient();
|
|
24555
|
+
_this._antialias = undefined;
|
|
24556
|
+
_this._snapshot = new DDiagramSnapshot(_this);
|
|
24557
|
+
}
|
|
24542
24558
|
_this._mode = _this.toMode(options);
|
|
24543
24559
|
return _this;
|
|
24544
24560
|
}
|
|
@@ -24631,7 +24647,8 @@ var DDiagramBase = /** @class */ (function (_super) {
|
|
|
24631
24647
|
factory: this._tileFactory,
|
|
24632
24648
|
mapping: (_a = serialized.tile) === null || _a === void 0 ? void 0 : _a.mapping
|
|
24633
24649
|
},
|
|
24634
|
-
ambient: isAmbient
|
|
24650
|
+
ambient: isAmbient,
|
|
24651
|
+
antialias: this._antialias
|
|
24635
24652
|
};
|
|
24636
24653
|
};
|
|
24637
24654
|
DDiagramBase.prototype.toCanvasBaseBackgroundOptions = function (serialized, theme, isAmbient) {
|
|
@@ -25468,7 +25485,7 @@ var EShapeRectanglePivoted = /** @class */ (function (_super) {
|
|
|
25468
25485
|
*/
|
|
25469
25486
|
var DDiagramLayer = /** @class */ (function (_super) {
|
|
25470
25487
|
__extends(DDiagramLayer, _super);
|
|
25471
|
-
function DDiagramLayer(name) {
|
|
25488
|
+
function DDiagramLayer(name, antialiasWeight) {
|
|
25472
25489
|
var _this = _super.call(this) || this;
|
|
25473
25490
|
_this.name = name;
|
|
25474
25491
|
_this.interactive = false;
|
|
@@ -25477,6 +25494,7 @@ var DDiagramLayer = /** @class */ (function (_super) {
|
|
|
25477
25494
|
shape.parent = _this;
|
|
25478
25495
|
_this._shape = shape;
|
|
25479
25496
|
_this.interactives = [];
|
|
25497
|
+
_this._antialiasWeight = antialiasWeight;
|
|
25480
25498
|
return _this;
|
|
25481
25499
|
}
|
|
25482
25500
|
Object.defineProperty(DDiagramLayer.prototype, "width", {
|
|
@@ -25648,9 +25666,9 @@ var DDiagramLayer = /** @class */ (function (_super) {
|
|
|
25648
25666
|
isInteractive | isDraggable | isPinchable
|
|
25649
25667
|
];
|
|
25650
25668
|
};
|
|
25651
|
-
DDiagramLayer.deserialize = function (serialized, manager, width, height) {
|
|
25669
|
+
DDiagramLayer.deserialize = function (serialized, manager, width, height, antialiasWeight) {
|
|
25652
25670
|
var _a, _b, _c;
|
|
25653
|
-
var result = new DDiagramLayer(this.deserializeName(serialized[0], manager));
|
|
25671
|
+
var result = new DDiagramLayer(this.deserializeName(serialized[0], manager), antialiasWeight);
|
|
25654
25672
|
var shape = result._shape;
|
|
25655
25673
|
var visibility = serialized[1];
|
|
25656
25674
|
if (visibility != null) {
|
|
@@ -25702,11 +25720,12 @@ var DDiagramLayer = /** @class */ (function (_super) {
|
|
|
25702
25720
|
*/
|
|
25703
25721
|
var DDiagramLayerContainer = /** @class */ (function (_super) {
|
|
25704
25722
|
__extends(DDiagramLayerContainer, _super);
|
|
25705
|
-
function DDiagramLayerContainer(width, height) {
|
|
25723
|
+
function DDiagramLayerContainer(width, height, antialiasWeight) {
|
|
25706
25724
|
var _this = _super.call(this) || this;
|
|
25707
25725
|
_this._active = null;
|
|
25708
25726
|
_this._width = width;
|
|
25709
25727
|
_this._height = height;
|
|
25728
|
+
_this._antialiasWeight = antialiasWeight;
|
|
25710
25729
|
_this.interactive = false;
|
|
25711
25730
|
_this.interactiveChildren = false;
|
|
25712
25731
|
return _this;
|
|
@@ -25734,7 +25753,7 @@ var DDiagramLayerContainer = /** @class */ (function (_super) {
|
|
|
25734
25753
|
configurable: true
|
|
25735
25754
|
});
|
|
25736
25755
|
DDiagramLayerContainer.prototype.create = function (name, activate) {
|
|
25737
|
-
var result = new DDiagramLayer(name);
|
|
25756
|
+
var result = new DDiagramLayer(name, this._antialiasWeight);
|
|
25738
25757
|
this.attach(result, activate);
|
|
25739
25758
|
return result;
|
|
25740
25759
|
};
|
|
@@ -25863,7 +25882,7 @@ var DDiagramLayerContainer = /** @class */ (function (_super) {
|
|
|
25863
25882
|
var width = this._width;
|
|
25864
25883
|
var height = this._height;
|
|
25865
25884
|
for (var i = 0; i < serializedLayersLength; ++i) {
|
|
25866
|
-
this.addChild(DDiagramLayer.deserialize(serializedLayers[i], manager, width, height));
|
|
25885
|
+
this.addChild(DDiagramLayer.deserialize(serializedLayers[i], manager, width, height, this._antialiasWeight));
|
|
25867
25886
|
}
|
|
25868
25887
|
this.onLayerChange();
|
|
25869
25888
|
DApplications.update(this);
|
|
@@ -25879,7 +25898,7 @@ var DDiagramLayerContainer = /** @class */ (function (_super) {
|
|
|
25879
25898
|
var DDiagramCanvasBase = /** @class */ (function (_super) {
|
|
25880
25899
|
__extends(DDiagramCanvasBase, _super);
|
|
25881
25900
|
function DDiagramCanvasBase(options) {
|
|
25882
|
-
var _a, _b, _c, _d;
|
|
25901
|
+
var _a, _b, _c, _d, _e, _f;
|
|
25883
25902
|
var _this = _super.call(this, options) || this;
|
|
25884
25903
|
// Background
|
|
25885
25904
|
var theme = _this.theme;
|
|
@@ -25887,15 +25906,15 @@ var DDiagramCanvasBase = /** @class */ (function (_super) {
|
|
|
25887
25906
|
_this._background = new DDiagramCanvasEditorBackground(_this._background, _this.toBackgroundBase(theme, options));
|
|
25888
25907
|
}
|
|
25889
25908
|
// Layer
|
|
25890
|
-
var layer = new DDiagramLayerContainer(_this.width, _this.height);
|
|
25909
|
+
var layer = new DDiagramLayerContainer(_this.width, _this.height, Math.max(theme.getAntialiasWeightLowerBound(), (_b = (_a = options === null || options === void 0 ? void 0 : options.antialias) === null || _a === void 0 ? void 0 : _a.weight) !== null && _b !== void 0 ? _b : theme.getAntialiasWeight()));
|
|
25891
25910
|
_this._layer = layer;
|
|
25892
25911
|
_this.addChild(layer);
|
|
25893
25912
|
// Label, Category, Summary and Description
|
|
25894
25913
|
if (options != null) {
|
|
25895
|
-
_this._label = (
|
|
25896
|
-
_this._category = (
|
|
25897
|
-
_this._summary = (
|
|
25898
|
-
_this._description = (
|
|
25914
|
+
_this._label = (_c = options.label) !== null && _c !== void 0 ? _c : "";
|
|
25915
|
+
_this._category = (_d = options.category) !== null && _d !== void 0 ? _d : null;
|
|
25916
|
+
_this._summary = (_e = options.summary) !== null && _e !== void 0 ? _e : "";
|
|
25917
|
+
_this._description = (_f = options.description) !== null && _f !== void 0 ? _f : "";
|
|
25899
25918
|
}
|
|
25900
25919
|
else {
|
|
25901
25920
|
_this._label = "";
|
|
@@ -38753,6 +38772,12 @@ var DThemeWhiteDiagramCanvasBase = /** @class */ (function (_super) {
|
|
|
38753
38772
|
DThemeWhiteDiagramCanvasBase.prototype.getLocalBoundsLimit = function () {
|
|
38754
38773
|
return 0;
|
|
38755
38774
|
};
|
|
38775
|
+
DThemeWhiteDiagramCanvasBase.prototype.getAntialiasWeight = function () {
|
|
38776
|
+
return 1;
|
|
38777
|
+
};
|
|
38778
|
+
DThemeWhiteDiagramCanvasBase.prototype.getAntialiasWeightLowerBound = function () {
|
|
38779
|
+
return 1e-5;
|
|
38780
|
+
};
|
|
38756
38781
|
return DThemeWhiteDiagramCanvasBase;
|
|
38757
38782
|
}(DThemeWhiteCanvas));
|
|
38758
38783
|
|
|
@@ -49375,6 +49400,12 @@ var DThemeDarkDiagramCanvasBase = /** @class */ (function (_super) {
|
|
|
49375
49400
|
DThemeDarkDiagramCanvasBase.prototype.getLocalBoundsLimit = function () {
|
|
49376
49401
|
return 0;
|
|
49377
49402
|
};
|
|
49403
|
+
DThemeDarkDiagramCanvasBase.prototype.getAntialiasWeight = function () {
|
|
49404
|
+
return 1;
|
|
49405
|
+
};
|
|
49406
|
+
DThemeDarkDiagramCanvasBase.prototype.getAntialiasWeightLowerBound = function () {
|
|
49407
|
+
return 1e-5;
|
|
49408
|
+
};
|
|
49378
49409
|
return DThemeDarkDiagramCanvasBase;
|
|
49379
49410
|
}(DThemeDarkCanvas));
|
|
49380
49411
|
|
|
@@ -64279,6 +64310,11 @@ var toVectorLength = function (v) {
|
|
|
64279
64310
|
var LINE_FMIN = 0.00001;
|
|
64280
64311
|
var LINE_NPREV = [0, 1];
|
|
64281
64312
|
var LINE_NNEXT = [0, 1];
|
|
64313
|
+
/**
|
|
64314
|
+
* Extends line segments at the start and the end a little bit
|
|
64315
|
+
* to apply the antialiasing at the start and the end.
|
|
64316
|
+
*/
|
|
64317
|
+
var LINE_EXTRA_LENGTH = 5;
|
|
64282
64318
|
var toPointCount = function (points) {
|
|
64283
64319
|
if (points) {
|
|
64284
64320
|
return points.formatted.plength;
|
|
@@ -64305,7 +64341,7 @@ var buildLineIndex = function (indices, voffset, ioffset, icount) {
|
|
|
64305
64341
|
var iimax = (ioffset + icount) * 3 - 1;
|
|
64306
64342
|
var io = voffset;
|
|
64307
64343
|
for (; ii < iimax;) {
|
|
64308
|
-
indices[++ii] = io
|
|
64344
|
+
indices[++ii] = io;
|
|
64309
64345
|
indices[++ii] = io + 2;
|
|
64310
64346
|
indices[++ii] = io + 1;
|
|
64311
64347
|
indices[++ii] = io + 1;
|
|
@@ -64314,6 +64350,40 @@ var buildLineIndex = function (indices, voffset, ioffset, icount) {
|
|
|
64314
64350
|
io += 2;
|
|
64315
64351
|
}
|
|
64316
64352
|
};
|
|
64353
|
+
/**
|
|
64354
|
+
* Builds normal (non-degenerate) triangle indices for a contiguous vertex range.
|
|
64355
|
+
* vcount is the number of vertices in the segment.
|
|
64356
|
+
* Returns the updated index write position.
|
|
64357
|
+
*/
|
|
64358
|
+
var buildLineSegmentIndex = function (indices, ii, vstart, vcount) {
|
|
64359
|
+
var io = vstart;
|
|
64360
|
+
var iomax = vstart + vcount - 2;
|
|
64361
|
+
for (; io < iomax; io += 2) {
|
|
64362
|
+
indices[++ii] = io;
|
|
64363
|
+
indices[++ii] = io + 2;
|
|
64364
|
+
indices[++ii] = io + 1;
|
|
64365
|
+
indices[++ii] = io + 1;
|
|
64366
|
+
indices[++ii] = io + 2;
|
|
64367
|
+
indices[++ii] = io + 3;
|
|
64368
|
+
}
|
|
64369
|
+
return ii;
|
|
64370
|
+
};
|
|
64371
|
+
/**
|
|
64372
|
+
* Fills degenerate triangles for a given number of index pairs.
|
|
64373
|
+
* qcount is the number of quads (each produces 2 triangles = 6 indices).
|
|
64374
|
+
* Returns the updated index write position.
|
|
64375
|
+
*/
|
|
64376
|
+
var buildLineDegenerateIndex = function (indices, ii, vertex, qcount) {
|
|
64377
|
+
for (var i = 0; i < qcount; ++i) {
|
|
64378
|
+
indices[++ii] = vertex;
|
|
64379
|
+
indices[++ii] = vertex;
|
|
64380
|
+
indices[++ii] = vertex;
|
|
64381
|
+
indices[++ii] = vertex;
|
|
64382
|
+
indices[++ii] = vertex;
|
|
64383
|
+
indices[++ii] = vertex;
|
|
64384
|
+
}
|
|
64385
|
+
return ii;
|
|
64386
|
+
};
|
|
64317
64387
|
var buildLineUv = function (uvs, steps, voffset, vcount, textureUvs, length) {
|
|
64318
64388
|
var lengthInverse = 1 / Math.max(LINE_FMIN, length);
|
|
64319
64389
|
var x0 = textureUvs.x0;
|
|
@@ -64340,7 +64410,7 @@ var buildLineUv = function (uvs, steps, voffset, vcount, textureUvs, length) {
|
|
|
64340
64410
|
}
|
|
64341
64411
|
};
|
|
64342
64412
|
var TRANSFORMED_POINT_VALUES;
|
|
64343
|
-
var
|
|
64413
|
+
var buildLineVertexStepAndIndex = function (vertices, steps, indices, ioffset, icount, voffset, vcount, pointCount, pointsClosed, pointValues, pointSegments, strokeWidth, strokeStyle, internalTransform) {
|
|
64344
64414
|
var transformedPointValues = TRANSFORMED_POINT_VALUES;
|
|
64345
64415
|
if (transformedPointValues == null) {
|
|
64346
64416
|
transformedPointValues = [];
|
|
@@ -64359,7 +64429,7 @@ var buildLineVertexStep = function (vertices, steps, voffset, vcount, pointCount
|
|
|
64359
64429
|
transformedPointValues[iv] = a * x + c * y + tx;
|
|
64360
64430
|
transformedPointValues[iv + 1] = b * x + d * y + ty;
|
|
64361
64431
|
}
|
|
64362
|
-
return
|
|
64432
|
+
return buildTransformedLineVertexStepAndIndex(vertices, steps, indices, ioffset, icount, voffset, vcount, pointCount, pointsClosed, transformedPointValues, pointSegments, strokeWidth, strokeStyle);
|
|
64363
64433
|
};
|
|
64364
64434
|
var fillTransformedLineVertexStep = function (iv, vertices, is, steps, px, py, strokeWidth, nprev, nnext, lprev, lnext, llo, e0, e1) {
|
|
64365
64435
|
var d = toNormalPacked(nprev, nnext);
|
|
@@ -64381,13 +64451,14 @@ var fillTransformedLineVertexStep = function (iv, vertices, is, steps, px, py, s
|
|
|
64381
64451
|
steps[++is] = llo;
|
|
64382
64452
|
steps[++is] = l;
|
|
64383
64453
|
};
|
|
64384
|
-
var
|
|
64454
|
+
var buildTransformedLineVertexStepAndIndex = function (vertices, steps, indices, ioffset, icount, voffset, vcount, lineVertexCount, lineIsClosed, lineVertices, lineSegments, strokeWidth, strokeStyle) {
|
|
64385
64455
|
var lineSegmentsLength = lineSegments.length;
|
|
64386
64456
|
if (0 < lineSegmentsLength) {
|
|
64387
64457
|
if (lineIsClosed) {
|
|
64388
64458
|
var lmax = 0;
|
|
64389
64459
|
var lprev = 0;
|
|
64390
64460
|
var ivoffset = voffset;
|
|
64461
|
+
var ii = ioffset * 3 - 1;
|
|
64391
64462
|
var iseg = 0;
|
|
64392
64463
|
var iprevseg = lineSegments[0];
|
|
64393
64464
|
for (var i = 1; i < lineSegmentsLength; ++i) {
|
|
@@ -64395,7 +64466,9 @@ var buildTransformedLineVertexStep = function (vertices, steps, voffset, vcount,
|
|
|
64395
64466
|
if (2 <= iseg - iprevseg) {
|
|
64396
64467
|
lprev = buildTransformedLineOpenSegmentVertexStep(vertices, steps, ivoffset, -1, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
|
|
64397
64468
|
lmax = Math.max(lmax, lprev);
|
|
64398
|
-
|
|
64469
|
+
var lvcount = toLineVertexCount(iseg - iprevseg, false);
|
|
64470
|
+
ii = buildLineSegmentIndex(indices, ii, ivoffset, lvcount);
|
|
64471
|
+
ivoffset += lvcount;
|
|
64399
64472
|
}
|
|
64400
64473
|
iprevseg = iseg;
|
|
64401
64474
|
}
|
|
@@ -64404,23 +64477,33 @@ var buildTransformedLineVertexStep = function (vertices, steps, voffset, vcount,
|
|
|
64404
64477
|
if (2 <= iseg - iprevseg) {
|
|
64405
64478
|
lprev = buildTransformedLineOpenSegmentVertexStep(vertices, steps, ivoffset, voffset + vcount - ivoffset, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
|
|
64406
64479
|
lmax = Math.max(lmax, lprev);
|
|
64407
|
-
|
|
64480
|
+
var lvcount = toLineVertexCount(iseg - iprevseg, false);
|
|
64481
|
+
ii = buildLineSegmentIndex(indices, ii, ivoffset, lvcount);
|
|
64482
|
+
ivoffset += lvcount;
|
|
64408
64483
|
}
|
|
64409
64484
|
else {
|
|
64410
64485
|
buildTransformedLineEmptyVertexStep(vertices, steps, ivoffset, voffset + vcount - ivoffset, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
|
|
64411
64486
|
}
|
|
64487
|
+
// Fill remaining indices with degenerate triangles
|
|
64488
|
+
var rvcount = ((ioffset + icount) * 3 - 1 - ii) / 6;
|
|
64489
|
+
if (0 < rvcount) {
|
|
64490
|
+
ii = buildLineDegenerateIndex(indices, ii, Math.max(ivoffset - 1, voffset), rvcount);
|
|
64491
|
+
}
|
|
64412
64492
|
return lmax;
|
|
64413
64493
|
}
|
|
64414
64494
|
else {
|
|
64415
64495
|
var lmax = 0;
|
|
64416
64496
|
var lprev = 0;
|
|
64417
64497
|
var ivoffset = voffset;
|
|
64498
|
+
var ii = ioffset * 3 - 1;
|
|
64418
64499
|
// First
|
|
64419
64500
|
var iseg = lineSegments[0];
|
|
64420
64501
|
if (2 <= iseg) {
|
|
64421
64502
|
lprev = buildTransformedLineOpenSegmentVertexStep(vertices, steps, ivoffset, -1, lineVertices, 0, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
|
|
64422
64503
|
lmax = Math.max(lmax, lprev);
|
|
64423
|
-
|
|
64504
|
+
var lvcount = toLineVertexCount(iseg, false);
|
|
64505
|
+
ii = buildLineSegmentIndex(indices, ii, ivoffset, lvcount);
|
|
64506
|
+
ivoffset += lvcount;
|
|
64424
64507
|
}
|
|
64425
64508
|
// Middle
|
|
64426
64509
|
var iprevseg = iseg;
|
|
@@ -64429,7 +64512,9 @@ var buildTransformedLineVertexStep = function (vertices, steps, voffset, vcount,
|
|
|
64429
64512
|
if (2 <= iseg - iprevseg) {
|
|
64430
64513
|
lprev = buildTransformedLineOpenSegmentVertexStep(vertices, steps, ivoffset, -1, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
|
|
64431
64514
|
lmax = Math.max(lmax, lprev);
|
|
64432
|
-
|
|
64515
|
+
var lvcount = toLineVertexCount(iseg - iprevseg, false);
|
|
64516
|
+
ii = buildLineSegmentIndex(indices, ii, ivoffset, lvcount);
|
|
64517
|
+
ivoffset += lvcount;
|
|
64433
64518
|
}
|
|
64434
64519
|
iprevseg = iseg;
|
|
64435
64520
|
}
|
|
@@ -64438,15 +64523,23 @@ var buildTransformedLineVertexStep = function (vertices, steps, voffset, vcount,
|
|
|
64438
64523
|
if (2 <= iseg - iprevseg) {
|
|
64439
64524
|
lprev = buildTransformedLineOpenSegmentVertexStep(vertices, steps, ivoffset, voffset + vcount - ivoffset, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
|
|
64440
64525
|
lmax = Math.max(lmax, lprev);
|
|
64441
|
-
|
|
64526
|
+
var lvcount = toLineVertexCount(iseg - iprevseg, false);
|
|
64527
|
+
ii = buildLineSegmentIndex(indices, ii, ivoffset, lvcount);
|
|
64528
|
+
ivoffset += lvcount;
|
|
64442
64529
|
}
|
|
64443
64530
|
else {
|
|
64444
64531
|
buildTransformedLineEmptyVertexStep(vertices, steps, ivoffset, voffset + vcount - ivoffset, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
|
|
64445
64532
|
}
|
|
64533
|
+
// Fill remaining indices with degenerate triangles
|
|
64534
|
+
var rvcount = ((ioffset + icount) * 3 - 1 - ii) / 6;
|
|
64535
|
+
if (0 < rvcount) {
|
|
64536
|
+
ii = buildLineDegenerateIndex(indices, ii, Math.max(ivoffset - 1, voffset), rvcount);
|
|
64537
|
+
}
|
|
64446
64538
|
return lmax;
|
|
64447
64539
|
}
|
|
64448
64540
|
}
|
|
64449
64541
|
else {
|
|
64542
|
+
buildLineIndex(indices, voffset, ioffset, icount);
|
|
64450
64543
|
if (lineIsClosed) {
|
|
64451
64544
|
return buildTransformedLineClosedSegmentVertexStep(vertices, steps, voffset, vcount, lineVertices, 0, lineVertexCount, lineVertexCount, strokeWidth, strokeStyle);
|
|
64452
64545
|
}
|
|
@@ -64515,10 +64608,13 @@ var buildTransformedLineOpenSegmentVertexStep = function (vertices, steps, voffs
|
|
|
64515
64608
|
var iv = (voffset << 1) - 1;
|
|
64516
64609
|
var is = voffset * 6 - 1;
|
|
64517
64610
|
var l = 0;
|
|
64518
|
-
|
|
64611
|
+
var headx = px - nprev[1] * LINE_EXTRA_LENGTH;
|
|
64612
|
+
var heady = py + nprev[0] * LINE_EXTRA_LENGTH;
|
|
64613
|
+
var lhead = -LINE_EXTRA_LENGTH;
|
|
64614
|
+
fillTransformedLineVertexStep(iv, vertices, is, steps, headx, heady, strokeWidth, nprev, nnext, lprev, lnext, lhead, e3, e5);
|
|
64519
64615
|
iv += 4;
|
|
64520
64616
|
is += 12;
|
|
64521
|
-
fillTransformedLineVertexStep(iv, vertices, is, steps,
|
|
64617
|
+
fillTransformedLineVertexStep(iv, vertices, is, steps, headx, heady, strokeWidth, nprev, nnext, lprev, lnext, lhead, e4, e6);
|
|
64522
64618
|
iv += 4;
|
|
64523
64619
|
is += 12;
|
|
64524
64620
|
// Middle segments
|
|
@@ -64557,18 +64653,18 @@ var buildTransformedLineOpenSegmentVertexStep = function (vertices, steps, voffs
|
|
|
64557
64653
|
toVector(px, py, pnextx, pnexty, nnext);
|
|
64558
64654
|
toNormal(nnext, lnext);
|
|
64559
64655
|
l += lprev;
|
|
64560
|
-
|
|
64656
|
+
var tailx = px + nnext[1] * LINE_EXTRA_LENGTH;
|
|
64657
|
+
var taily = py - nnext[0] * LINE_EXTRA_LENGTH;
|
|
64658
|
+
var ltrail = l + LINE_EXTRA_LENGTH;
|
|
64659
|
+
fillTransformedLineVertexStep(iv, vertices, is, steps, tailx, taily, strokeWidth, nprev, nnext, lprev, lnext, ltrail, e3, e5);
|
|
64561
64660
|
iv += 4;
|
|
64562
64661
|
is += 12;
|
|
64563
|
-
fillTransformedLineVertexStep(iv, vertices, is, steps,
|
|
64662
|
+
fillTransformedLineVertexStep(iv, vertices, is, steps, tailx, taily, strokeWidth, nprev, nnext, lprev, lnext, ltrail, e4, e6);
|
|
64564
64663
|
iv += 4;
|
|
64565
64664
|
is += 12;
|
|
64566
64665
|
// Total length
|
|
64567
64666
|
var is0 = voffset * 6 - 1;
|
|
64568
|
-
for (var i = is0
|
|
64569
|
-
steps[i + 5] = length;
|
|
64570
|
-
}
|
|
64571
|
-
for (var i = is0 + 12; i < is; i += 6) {
|
|
64667
|
+
for (var i = is0; i < is; i += 6) {
|
|
64572
64668
|
steps[i + 5] = l;
|
|
64573
64669
|
}
|
|
64574
64670
|
// Fill the rest
|
|
@@ -64706,12 +64802,7 @@ var BuilderLine = /** @class */ (function (_super) {
|
|
|
64706
64802
|
_this.length = 1;
|
|
64707
64803
|
return _this;
|
|
64708
64804
|
}
|
|
64709
|
-
BuilderLine.prototype.init = function () {
|
|
64710
|
-
var buffer = this.buffer;
|
|
64711
|
-
buffer.updateIndices();
|
|
64712
|
-
buildLineIndex(buffer.indices, this.vertexOffset, this.indexOffset, this.indexCount);
|
|
64713
|
-
this.inited |= BuilderFlag.INDEX;
|
|
64714
|
-
};
|
|
64805
|
+
BuilderLine.prototype.init = function () { };
|
|
64715
64806
|
BuilderLine.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
|
|
64716
64807
|
var pointCount = toLinePointCount(shape.points);
|
|
64717
64808
|
var vertexCount = toLineVertexCount(pointCount, true);
|
|
@@ -64745,11 +64836,11 @@ var BuilderLine = /** @class */ (function (_super) {
|
|
|
64745
64836
|
};
|
|
64746
64837
|
BuilderLine.prototype.update = function (shape) {
|
|
64747
64838
|
var buffer = this.buffer;
|
|
64748
|
-
this.
|
|
64839
|
+
this.updateLineVertexStepAndIndex(buffer, shape);
|
|
64749
64840
|
this.updateColor(buffer, shape);
|
|
64750
64841
|
this.updateLineUv(buffer, shape);
|
|
64751
64842
|
};
|
|
64752
|
-
BuilderLine.prototype.
|
|
64843
|
+
BuilderLine.prototype.updateLineVertexStepAndIndex = function (buffer, shape) {
|
|
64753
64844
|
var points = shape.points;
|
|
64754
64845
|
if (points) {
|
|
64755
64846
|
var pointId = points.id;
|
|
@@ -64765,9 +64856,9 @@ var BuilderLine = /** @class */ (function (_super) {
|
|
|
64765
64856
|
var isStrokeWidthChanged = this.strokeWidth !== strokeWidth || this.strokeStyle !== strokeStyle;
|
|
64766
64857
|
var transformLocalId = toTransformLocalId(shape);
|
|
64767
64858
|
var isTransformChanged = this.transformLocalId !== transformLocalId;
|
|
64768
|
-
var isNotInited = !(this.inited & BuilderFlag.
|
|
64859
|
+
var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_INDEX);
|
|
64769
64860
|
if (isNotInited || isPointChanged || isTransformChanged || isStrokeWidthChanged) {
|
|
64770
|
-
this.inited |= BuilderFlag.
|
|
64861
|
+
this.inited |= BuilderFlag.VERTEX_STEP_AND_INDEX;
|
|
64771
64862
|
this.pointId = pointId;
|
|
64772
64863
|
this.pointCount = pointCount;
|
|
64773
64864
|
this.pointsClosed = pointsClosed;
|
|
@@ -64780,7 +64871,8 @@ var BuilderLine = /** @class */ (function (_super) {
|
|
|
64780
64871
|
}
|
|
64781
64872
|
buffer.updateVertices();
|
|
64782
64873
|
buffer.updateSteps();
|
|
64783
|
-
|
|
64874
|
+
buffer.updateIndices();
|
|
64875
|
+
this.length = buildLineVertexStepAndIndex(buffer.vertices, buffer.steps, buffer.indices, this.indexOffset, this.indexCount, this.vertexOffset, this.vertexCount, this.pointCount, this.pointsClosed, formatted.values, formatted.segments, strokeWidth, strokeStyle, shape.transform.internalTransform);
|
|
64784
64876
|
}
|
|
64785
64877
|
}
|
|
64786
64878
|
};
|
|
@@ -106255,7 +106347,7 @@ exports.buildImageSdfVertex = buildImageSdfVertex;
|
|
|
106255
106347
|
exports.buildLineIndex = buildLineIndex;
|
|
106256
106348
|
exports.buildLineOfAnyColor = buildLineOfAnyColor;
|
|
106257
106349
|
exports.buildLineUv = buildLineUv;
|
|
106258
|
-
exports.
|
|
106350
|
+
exports.buildLineVertexStepAndIndex = buildLineVertexStepAndIndex;
|
|
106259
106351
|
exports.buildNullIndex = buildNullIndex;
|
|
106260
106352
|
exports.buildNullStep = buildNullStep;
|
|
106261
106353
|
exports.buildNullUv = buildNullUv;
|