@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.
Files changed (53) hide show
  1. package/dist/types/wcardinal/ui/d-diagram-base.d.ts +6 -1
  2. package/dist/types/wcardinal/ui/d-diagram-canvas-base.d.ts +6 -0
  3. package/dist/types/wcardinal/ui/d-diagram-layer-container.d.ts +2 -1
  4. package/dist/types/wcardinal/ui/d-diagram-layer.d.ts +2 -2
  5. package/dist/types/wcardinal/ui/shape/e-shape-container.d.ts +3 -1
  6. package/dist/types/wcardinal/ui/shape/variant/build-line.d.ts +1 -1
  7. package/dist/types/wcardinal/ui/shape/variant/builder-line.d.ts +1 -1
  8. package/dist/types/wcardinal/ui/shape/variant/builder.d.ts +1 -0
  9. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-base.d.ts +2 -0
  10. package/dist/types/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-base.d.ts +2 -0
  11. package/dist/wcardinal/ui/d-diagram-base.js +17 -5
  12. package/dist/wcardinal/ui/d-diagram-base.js.map +1 -1
  13. package/dist/wcardinal/ui/d-diagram-canvas-base.js +6 -6
  14. package/dist/wcardinal/ui/d-diagram-canvas-base.js.map +1 -1
  15. package/dist/wcardinal/ui/d-diagram-layer-container.js +4 -3
  16. package/dist/wcardinal/ui/d-diagram-layer-container.js.map +1 -1
  17. package/dist/wcardinal/ui/d-diagram-layer.js +4 -3
  18. package/dist/wcardinal/ui/d-diagram-layer.js.map +1 -1
  19. package/dist/wcardinal/ui/shape/e-shape-container.js +6 -3
  20. package/dist/wcardinal/ui/shape/e-shape-container.js.map +1 -1
  21. package/dist/wcardinal/ui/shape/e-shape-renderer.js +2 -2
  22. package/dist/wcardinal/ui/shape/e-shape-renderer.js.map +1 -1
  23. package/dist/wcardinal/ui/shape/variant/build-line.js +82 -17
  24. package/dist/wcardinal/ui/shape/variant/build-line.js.map +1 -1
  25. package/dist/wcardinal/ui/shape/variant/builder-line.js +8 -12
  26. package/dist/wcardinal/ui/shape/variant/builder-line.js.map +1 -1
  27. package/dist/wcardinal/ui/shape/variant/builder.js +2 -0
  28. package/dist/wcardinal/ui/shape/variant/builder.js.map +1 -1
  29. package/dist/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-base.js +6 -0
  30. package/dist/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-base.js.map +1 -1
  31. package/dist/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-base.js +6 -0
  32. package/dist/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-base.js.map +1 -1
  33. package/dist/wcardinal-ui-theme-dark-en-us.js +7 -1
  34. package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
  35. package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
  36. package/dist/wcardinal-ui-theme-dark-ja-jp.js +7 -1
  37. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
  38. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
  39. package/dist/wcardinal-ui-theme-dark.js +7 -1
  40. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  41. package/dist/wcardinal-ui-theme-white-en-us.js +7 -1
  42. package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
  43. package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
  44. package/dist/wcardinal-ui-theme-white-ja-jp.js +7 -1
  45. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
  46. package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
  47. package/dist/wcardinal-ui-theme-white.js +7 -1
  48. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  49. package/dist/wcardinal-ui.cjs.js +144 -52
  50. package/dist/wcardinal-ui.js +132 -52
  51. package/dist/wcardinal-ui.min.js +2 -2
  52. package/dist/wcardinal-ui.min.js.map +1 -1
  53. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.461.0
2
+ Winter Cardinal UI v0.462.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1416,6 +1416,7 @@
1416
1416
  var INDEX = 16;
1417
1417
  var VERTEX_AND_STEP = VERTEX | STEP;
1418
1418
  var VERTEX_STEP_AND_UV = VERTEX_AND_STEP | UV;
1419
+ var VERTEX_STEP_AND_INDEX = VERTEX | STEP | INDEX;
1419
1420
  var VERTEX_STEP_UV_AND_INDEX = VERTEX_STEP_AND_UV | INDEX;
1420
1421
  var ALL$1 = VERTEX | STEP | COLOR | UV | INDEX;
1421
1422
  var BuilderFlag = {
@@ -1427,6 +1428,7 @@
1427
1428
  INDEX: INDEX,
1428
1429
  VERTEX_AND_STEP: VERTEX_AND_STEP,
1429
1430
  VERTEX_STEP_AND_UV: VERTEX_STEP_AND_UV,
1431
+ VERTEX_STEP_AND_INDEX: VERTEX_STEP_AND_INDEX,
1430
1432
  VERTEX_STEP_UV_AND_INDEX: VERTEX_STEP_UV_AND_INDEX,
1431
1433
  ALL: ALL$1
1432
1434
  };
@@ -16673,7 +16675,7 @@
16673
16675
  * SPDX-License-Identifier: Apache-2.0
16674
16676
  */
16675
16677
  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}";
16676
- 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 zero = vec2(0.0);\n\tvec2 p0 = clamp(one - awd, zero, one);\n\tvec2 p1 = clamp(one - swd, zero, one);\n\tvec2 p2 = clamp(one - swd - awd, zero, one);\n\tvec2 s0 = smoothstep(p0, one, c);\n\tvec2 s1 = smoothstep(p2, p1, 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 = antialiasWeight / d;\n\tvec2 swd = vStepA / d;\n\tvec2 one = vec2(1.0);\n\tvec2 zero = vec2(0.0);\n\tfloat s0 = smoothstep(length(c), length(c/clamp(one - awd, zero, one)), 1.0);\n\tfloat s1 = smoothstep(length(c/clamp(one - swd, zero, one)), length(c/clamp(one - swd - awd, zero, one)), 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 = antialiasWeight;\n\tfloat lm = mod(l, lp0 + lp1);\n\tfloat s0 = (0.0 < lp1 ? smoothstep(0.0, ld, lm) - smoothstep(lp0, lp0 + ld, lm) : 1.0);\n\tfloat s1 = (0.0 <= lt ? smoothstep(0.0, ld, l) - smoothstep(lt - ld, lt, l) : 1.0);\n\treturn s0 * s1;\n}\n\nvec4 toColor3(in vec4 texture) {\n\tfloat c = vStepA.x;\n\tfloat awd = antialiasWeight / vStepA.y;\n\tfloat p0 = clamp(awd, 0.0, 1.0);\n\tfloat p1 = clamp(1.0 - awd, 0.0, 1.0);\n\tfloat s0 = smoothstep(0.0, p0, c);\n\tfloat s1 = smoothstep(p1, 1.0, c);\n\treturn texture * vColorStroke * (s0 - s1) * toLineStep(vLength);\n}\n\nvec4 toColor7(in vec4 texture) {\n\tfloat awd = antialiasWeight * vStepB.x;\n\tfloat swd = vStepA.x * vStepB.x;\n\tfloat p0 = clamp(1.0 - awd, 0.0, 1.0);\n\tfloat p1 = clamp(1.0 - swd, 0.0, 1.0);\n\tfloat p2 = clamp(1.0 - swd - awd, 0.0, 1.0);\n\tfloat s0 = smoothstep(p0, 1.0, vStepB.z);\n\tfloat s1 = smoothstep(p2, p1, vStepB.z) * toLineStep(vLength);\n\tfloat s2 = smoothstep(-antialiasWeight, 0.0, 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}";
16678
+ 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}";
16677
16679
  var EShapeRenderer = /** @class */ (function (_super) {
16678
16680
  __extends(EShapeRenderer, _super);
16679
16681
  function EShapeRenderer(renderer) {
@@ -16768,7 +16770,7 @@
16768
16770
  if (shader != null && (shape != null || 0 < shapes.length)) {
16769
16771
  var resolution = renderer.resolution;
16770
16772
  var buffers = container.getBuffers();
16771
- var antialiasWeight = container.toAntialiasWeight(resolution);
16773
+ var antialiasWeight = container.getAntialiasWeight();
16772
16774
  // Update textures
16773
16775
  if (isDirty) {
16774
16776
  // Atlases
@@ -16872,8 +16874,10 @@
16872
16874
  _this._fontAtlases = new DynamicSDFFontAtlases();
16873
16875
  _this._pixelScale = 1;
16874
16876
  _this._pixelScaleId = -2; // Since this._shapeScaleId starts from -1.
16877
+ _this._pixelScaleResolution = 1;
16875
16878
  _this._shapeScale = 1;
16876
16879
  _this._shapeScaleId = -1; // Since Transform._worldID starts from zero.
16880
+ _this._antialiasWeight = 1;
16877
16881
  _this._work = new pixi_js.Point();
16878
16882
  _this._buffers = [];
16879
16883
  return _this;
@@ -16951,8 +16955,9 @@
16951
16955
  EShapeContainer.prototype.toPixelScale = function (resolution) {
16952
16956
  var shapeScale = this.toShapeScale();
16953
16957
  var shapeScaleId = this._shapeScaleId;
16954
- if (this._pixelScaleId !== shapeScaleId) {
16958
+ if (this._pixelScaleId !== shapeScaleId || this._pixelScaleResolution !== resolution) {
16955
16959
  this._pixelScaleId = shapeScaleId;
16960
+ this._pixelScaleResolution = resolution;
16956
16961
  this._pixelScale = (1 / resolution) * shapeScale;
16957
16962
  }
16958
16963
  return this._pixelScale;
@@ -16960,8 +16965,8 @@
16960
16965
  EShapeContainer.prototype.getPixelScale = function () {
16961
16966
  return this._pixelScale;
16962
16967
  };
16963
- EShapeContainer.prototype.toAntialiasWeight = function (resolution) {
16964
- return 1.25 / resolution;
16968
+ EShapeContainer.prototype.getAntialiasWeight = function () {
16969
+ return this._antialiasWeight;
16965
16970
  };
16966
16971
  EShapeContainer.prototype.hitTest = function (global, onHit) {
16967
16972
  var local = this._work;
@@ -24532,10 +24537,21 @@
24532
24537
  var _a;
24533
24538
  var _this = _super.call(this, options) || this;
24534
24539
  _this._serialized = null;
24535
- _this._tileFactory = options === null || options === void 0 ? void 0 : options.tile;
24536
- _this._controller = options === null || options === void 0 ? void 0 : options.controller;
24537
- _this._isAmbient = (_a = options === null || options === void 0 ? void 0 : options.ambient) !== null && _a !== void 0 ? _a : _this.theme.isAmbient();
24538
- _this._snapshot = new DDiagramSnapshot(_this, options === null || options === void 0 ? void 0 : options.snapshot);
24540
+ var theme = _this.theme;
24541
+ if (options != null) {
24542
+ _this._tileFactory = options.tile;
24543
+ _this._controller = options.controller;
24544
+ _this._isAmbient = (_a = options.ambient) !== null && _a !== void 0 ? _a : theme.isAmbient();
24545
+ _this._antialias = options.antialias;
24546
+ _this._snapshot = new DDiagramSnapshot(_this, options.snapshot);
24547
+ }
24548
+ else {
24549
+ _this._tileFactory = undefined;
24550
+ _this._controller = undefined;
24551
+ _this._isAmbient = theme.isAmbient();
24552
+ _this._antialias = undefined;
24553
+ _this._snapshot = new DDiagramSnapshot(_this);
24554
+ }
24539
24555
  _this._mode = _this.toMode(options);
24540
24556
  return _this;
24541
24557
  }
@@ -24628,7 +24644,8 @@
24628
24644
  factory: this._tileFactory,
24629
24645
  mapping: (_a = serialized.tile) === null || _a === void 0 ? void 0 : _a.mapping
24630
24646
  },
24631
- ambient: isAmbient
24647
+ ambient: isAmbient,
24648
+ antialias: this._antialias
24632
24649
  };
24633
24650
  };
24634
24651
  DDiagramBase.prototype.toCanvasBaseBackgroundOptions = function (serialized, theme, isAmbient) {
@@ -25465,7 +25482,7 @@
25465
25482
  */
25466
25483
  var DDiagramLayer = /** @class */ (function (_super) {
25467
25484
  __extends(DDiagramLayer, _super);
25468
- function DDiagramLayer(name) {
25485
+ function DDiagramLayer(name, antialiasWeight) {
25469
25486
  var _this = _super.call(this) || this;
25470
25487
  _this.name = name;
25471
25488
  _this.interactive = false;
@@ -25474,6 +25491,7 @@
25474
25491
  shape.parent = _this;
25475
25492
  _this._shape = shape;
25476
25493
  _this.interactives = [];
25494
+ _this._antialiasWeight = antialiasWeight;
25477
25495
  return _this;
25478
25496
  }
25479
25497
  Object.defineProperty(DDiagramLayer.prototype, "width", {
@@ -25645,9 +25663,9 @@
25645
25663
  isInteractive | isDraggable | isPinchable
25646
25664
  ];
25647
25665
  };
25648
- DDiagramLayer.deserialize = function (serialized, manager, width, height) {
25666
+ DDiagramLayer.deserialize = function (serialized, manager, width, height, antialiasWeight) {
25649
25667
  var _a, _b, _c;
25650
- var result = new DDiagramLayer(this.deserializeName(serialized[0], manager));
25668
+ var result = new DDiagramLayer(this.deserializeName(serialized[0], manager), antialiasWeight);
25651
25669
  var shape = result._shape;
25652
25670
  var visibility = serialized[1];
25653
25671
  if (visibility != null) {
@@ -25699,11 +25717,12 @@
25699
25717
  */
25700
25718
  var DDiagramLayerContainer = /** @class */ (function (_super) {
25701
25719
  __extends(DDiagramLayerContainer, _super);
25702
- function DDiagramLayerContainer(width, height) {
25720
+ function DDiagramLayerContainer(width, height, antialiasWeight) {
25703
25721
  var _this = _super.call(this) || this;
25704
25722
  _this._active = null;
25705
25723
  _this._width = width;
25706
25724
  _this._height = height;
25725
+ _this._antialiasWeight = antialiasWeight;
25707
25726
  _this.interactive = false;
25708
25727
  _this.interactiveChildren = false;
25709
25728
  return _this;
@@ -25731,7 +25750,7 @@
25731
25750
  configurable: true
25732
25751
  });
25733
25752
  DDiagramLayerContainer.prototype.create = function (name, activate) {
25734
- var result = new DDiagramLayer(name);
25753
+ var result = new DDiagramLayer(name, this._antialiasWeight);
25735
25754
  this.attach(result, activate);
25736
25755
  return result;
25737
25756
  };
@@ -25860,7 +25879,7 @@
25860
25879
  var width = this._width;
25861
25880
  var height = this._height;
25862
25881
  for (var i = 0; i < serializedLayersLength; ++i) {
25863
- this.addChild(DDiagramLayer.deserialize(serializedLayers[i], manager, width, height));
25882
+ this.addChild(DDiagramLayer.deserialize(serializedLayers[i], manager, width, height, this._antialiasWeight));
25864
25883
  }
25865
25884
  this.onLayerChange();
25866
25885
  DApplications.update(this);
@@ -25876,7 +25895,7 @@
25876
25895
  var DDiagramCanvasBase = /** @class */ (function (_super) {
25877
25896
  __extends(DDiagramCanvasBase, _super);
25878
25897
  function DDiagramCanvasBase(options) {
25879
- var _a, _b, _c, _d;
25898
+ var _a, _b, _c, _d, _e, _f;
25880
25899
  var _this = _super.call(this, options) || this;
25881
25900
  // Background
25882
25901
  var theme = _this.theme;
@@ -25884,15 +25903,15 @@
25884
25903
  _this._background = new DDiagramCanvasEditorBackground(_this._background, _this.toBackgroundBase(theme, options));
25885
25904
  }
25886
25905
  // Layer
25887
- var layer = new DDiagramLayerContainer(_this.width, _this.height);
25906
+ 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()));
25888
25907
  _this._layer = layer;
25889
25908
  _this.addChild(layer);
25890
25909
  // Label, Category, Summary and Description
25891
25910
  if (options != null) {
25892
- _this._label = (_a = options.label) !== null && _a !== void 0 ? _a : "";
25893
- _this._category = (_b = options.category) !== null && _b !== void 0 ? _b : null;
25894
- _this._summary = (_c = options.summary) !== null && _c !== void 0 ? _c : "";
25895
- _this._description = (_d = options.description) !== null && _d !== void 0 ? _d : "";
25911
+ _this._label = (_c = options.label) !== null && _c !== void 0 ? _c : "";
25912
+ _this._category = (_d = options.category) !== null && _d !== void 0 ? _d : null;
25913
+ _this._summary = (_e = options.summary) !== null && _e !== void 0 ? _e : "";
25914
+ _this._description = (_f = options.description) !== null && _f !== void 0 ? _f : "";
25896
25915
  }
25897
25916
  else {
25898
25917
  _this._label = "";
@@ -42194,6 +42213,11 @@
42194
42213
  var LINE_FMIN = 0.00001;
42195
42214
  var LINE_NPREV = [0, 1];
42196
42215
  var LINE_NNEXT = [0, 1];
42216
+ /**
42217
+ * Extends line segments at the start and the end a little bit
42218
+ * to apply the antialiasing at the start and the end.
42219
+ */
42220
+ var LINE_EXTRA_LENGTH = 5;
42197
42221
  var toPointCount = function (points) {
42198
42222
  if (points) {
42199
42223
  return points.formatted.plength;
@@ -42220,7 +42244,7 @@
42220
42244
  var iimax = (ioffset + icount) * 3 - 1;
42221
42245
  var io = voffset;
42222
42246
  for (; ii < iimax;) {
42223
- indices[++ii] = io + 0;
42247
+ indices[++ii] = io;
42224
42248
  indices[++ii] = io + 2;
42225
42249
  indices[++ii] = io + 1;
42226
42250
  indices[++ii] = io + 1;
@@ -42229,6 +42253,40 @@
42229
42253
  io += 2;
42230
42254
  }
42231
42255
  };
42256
+ /**
42257
+ * Builds normal (non-degenerate) triangle indices for a contiguous vertex range.
42258
+ * vcount is the number of vertices in the segment.
42259
+ * Returns the updated index write position.
42260
+ */
42261
+ var buildLineSegmentIndex = function (indices, ii, vstart, vcount) {
42262
+ var io = vstart;
42263
+ var iomax = vstart + vcount - 2;
42264
+ for (; io < iomax; io += 2) {
42265
+ indices[++ii] = io;
42266
+ indices[++ii] = io + 2;
42267
+ indices[++ii] = io + 1;
42268
+ indices[++ii] = io + 1;
42269
+ indices[++ii] = io + 2;
42270
+ indices[++ii] = io + 3;
42271
+ }
42272
+ return ii;
42273
+ };
42274
+ /**
42275
+ * Fills degenerate triangles for a given number of index pairs.
42276
+ * qcount is the number of quads (each produces 2 triangles = 6 indices).
42277
+ * Returns the updated index write position.
42278
+ */
42279
+ var buildLineDegenerateIndex = function (indices, ii, vertex, qcount) {
42280
+ for (var i = 0; i < qcount; ++i) {
42281
+ indices[++ii] = vertex;
42282
+ indices[++ii] = vertex;
42283
+ indices[++ii] = vertex;
42284
+ indices[++ii] = vertex;
42285
+ indices[++ii] = vertex;
42286
+ indices[++ii] = vertex;
42287
+ }
42288
+ return ii;
42289
+ };
42232
42290
  var buildLineUv = function (uvs, steps, voffset, vcount, textureUvs, length) {
42233
42291
  var lengthInverse = 1 / Math.max(LINE_FMIN, length);
42234
42292
  var x0 = textureUvs.x0;
@@ -42255,7 +42313,7 @@
42255
42313
  }
42256
42314
  };
42257
42315
  var TRANSFORMED_POINT_VALUES;
42258
- var buildLineVertexStep = function (vertices, steps, voffset, vcount, pointCount, pointsClosed, pointValues, pointSegments, strokeWidth, strokeStyle, internalTransform) {
42316
+ var buildLineVertexStepAndIndex = function (vertices, steps, indices, ioffset, icount, voffset, vcount, pointCount, pointsClosed, pointValues, pointSegments, strokeWidth, strokeStyle, internalTransform) {
42259
42317
  var transformedPointValues = TRANSFORMED_POINT_VALUES;
42260
42318
  if (transformedPointValues == null) {
42261
42319
  transformedPointValues = [];
@@ -42274,7 +42332,7 @@
42274
42332
  transformedPointValues[iv] = a * x + c * y + tx;
42275
42333
  transformedPointValues[iv + 1] = b * x + d * y + ty;
42276
42334
  }
42277
- return buildTransformedLineVertexStep(vertices, steps, voffset, vcount, pointCount, pointsClosed, transformedPointValues, pointSegments, strokeWidth, strokeStyle);
42335
+ return buildTransformedLineVertexStepAndIndex(vertices, steps, indices, ioffset, icount, voffset, vcount, pointCount, pointsClosed, transformedPointValues, pointSegments, strokeWidth, strokeStyle);
42278
42336
  };
42279
42337
  var fillTransformedLineVertexStep = function (iv, vertices, is, steps, px, py, strokeWidth, nprev, nnext, lprev, lnext, llo, e0, e1) {
42280
42338
  var d = toNormalPacked(nprev, nnext);
@@ -42296,13 +42354,14 @@
42296
42354
  steps[++is] = llo;
42297
42355
  steps[++is] = l;
42298
42356
  };
42299
- var buildTransformedLineVertexStep = function (vertices, steps, voffset, vcount, lineVertexCount, lineIsClosed, lineVertices, lineSegments, strokeWidth, strokeStyle) {
42357
+ var buildTransformedLineVertexStepAndIndex = function (vertices, steps, indices, ioffset, icount, voffset, vcount, lineVertexCount, lineIsClosed, lineVertices, lineSegments, strokeWidth, strokeStyle) {
42300
42358
  var lineSegmentsLength = lineSegments.length;
42301
42359
  if (0 < lineSegmentsLength) {
42302
42360
  if (lineIsClosed) {
42303
42361
  var lmax = 0;
42304
42362
  var lprev = 0;
42305
42363
  var ivoffset = voffset;
42364
+ var ii = ioffset * 3 - 1;
42306
42365
  var iseg = 0;
42307
42366
  var iprevseg = lineSegments[0];
42308
42367
  for (var i = 1; i < lineSegmentsLength; ++i) {
@@ -42310,7 +42369,9 @@
42310
42369
  if (2 <= iseg - iprevseg) {
42311
42370
  lprev = buildTransformedLineOpenSegmentVertexStep(vertices, steps, ivoffset, -1, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
42312
42371
  lmax = Math.max(lmax, lprev);
42313
- ivoffset += toLineVertexCount(iseg - iprevseg, false);
42372
+ var lvcount = toLineVertexCount(iseg - iprevseg, false);
42373
+ ii = buildLineSegmentIndex(indices, ii, ivoffset, lvcount);
42374
+ ivoffset += lvcount;
42314
42375
  }
42315
42376
  iprevseg = iseg;
42316
42377
  }
@@ -42319,23 +42380,33 @@
42319
42380
  if (2 <= iseg - iprevseg) {
42320
42381
  lprev = buildTransformedLineOpenSegmentVertexStep(vertices, steps, ivoffset, voffset + vcount - ivoffset, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
42321
42382
  lmax = Math.max(lmax, lprev);
42322
- ivoffset += toLineVertexCount(iseg - iprevseg, false);
42383
+ var lvcount = toLineVertexCount(iseg - iprevseg, false);
42384
+ ii = buildLineSegmentIndex(indices, ii, ivoffset, lvcount);
42385
+ ivoffset += lvcount;
42323
42386
  }
42324
42387
  else {
42325
42388
  buildTransformedLineEmptyVertexStep(vertices, steps, ivoffset, voffset + vcount - ivoffset, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
42326
42389
  }
42390
+ // Fill remaining indices with degenerate triangles
42391
+ var rvcount = ((ioffset + icount) * 3 - 1 - ii) / 6;
42392
+ if (0 < rvcount) {
42393
+ ii = buildLineDegenerateIndex(indices, ii, Math.max(ivoffset - 1, voffset), rvcount);
42394
+ }
42327
42395
  return lmax;
42328
42396
  }
42329
42397
  else {
42330
42398
  var lmax = 0;
42331
42399
  var lprev = 0;
42332
42400
  var ivoffset = voffset;
42401
+ var ii = ioffset * 3 - 1;
42333
42402
  // First
42334
42403
  var iseg = lineSegments[0];
42335
42404
  if (2 <= iseg) {
42336
42405
  lprev = buildTransformedLineOpenSegmentVertexStep(vertices, steps, ivoffset, -1, lineVertices, 0, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
42337
42406
  lmax = Math.max(lmax, lprev);
42338
- ivoffset += toLineVertexCount(iseg, false);
42407
+ var lvcount = toLineVertexCount(iseg, false);
42408
+ ii = buildLineSegmentIndex(indices, ii, ivoffset, lvcount);
42409
+ ivoffset += lvcount;
42339
42410
  }
42340
42411
  // Middle
42341
42412
  var iprevseg = iseg;
@@ -42344,7 +42415,9 @@
42344
42415
  if (2 <= iseg - iprevseg) {
42345
42416
  lprev = buildTransformedLineOpenSegmentVertexStep(vertices, steps, ivoffset, -1, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
42346
42417
  lmax = Math.max(lmax, lprev);
42347
- ivoffset += toLineVertexCount(iseg - iprevseg, false);
42418
+ var lvcount = toLineVertexCount(iseg - iprevseg, false);
42419
+ ii = buildLineSegmentIndex(indices, ii, ivoffset, lvcount);
42420
+ ivoffset += lvcount;
42348
42421
  }
42349
42422
  iprevseg = iseg;
42350
42423
  }
@@ -42353,15 +42426,23 @@
42353
42426
  if (2 <= iseg - iprevseg) {
42354
42427
  lprev = buildTransformedLineOpenSegmentVertexStep(vertices, steps, ivoffset, voffset + vcount - ivoffset, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
42355
42428
  lmax = Math.max(lmax, lprev);
42356
- ivoffset += toLineVertexCount(iseg - iprevseg, false);
42429
+ var lvcount = toLineVertexCount(iseg - iprevseg, false);
42430
+ ii = buildLineSegmentIndex(indices, ii, ivoffset, lvcount);
42431
+ ivoffset += lvcount;
42357
42432
  }
42358
42433
  else {
42359
42434
  buildTransformedLineEmptyVertexStep(vertices, steps, ivoffset, voffset + vcount - ivoffset, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
42360
42435
  }
42436
+ // Fill remaining indices with degenerate triangles
42437
+ var rvcount = ((ioffset + icount) * 3 - 1 - ii) / 6;
42438
+ if (0 < rvcount) {
42439
+ ii = buildLineDegenerateIndex(indices, ii, Math.max(ivoffset - 1, voffset), rvcount);
42440
+ }
42361
42441
  return lmax;
42362
42442
  }
42363
42443
  }
42364
42444
  else {
42445
+ buildLineIndex(indices, voffset, ioffset, icount);
42365
42446
  if (lineIsClosed) {
42366
42447
  return buildTransformedLineClosedSegmentVertexStep(vertices, steps, voffset, vcount, lineVertices, 0, lineVertexCount, lineVertexCount, strokeWidth, strokeStyle);
42367
42448
  }
@@ -42430,10 +42511,13 @@
42430
42511
  var iv = (voffset << 1) - 1;
42431
42512
  var is = voffset * 6 - 1;
42432
42513
  var l = 0;
42433
- fillTransformedLineVertexStep(iv, vertices, is, steps, px, py, strokeWidth, nprev, nnext, lprev, lnext, length, e3, e5);
42514
+ var headx = px - nprev[1] * LINE_EXTRA_LENGTH;
42515
+ var heady = py + nprev[0] * LINE_EXTRA_LENGTH;
42516
+ var lhead = -LINE_EXTRA_LENGTH;
42517
+ fillTransformedLineVertexStep(iv, vertices, is, steps, headx, heady, strokeWidth, nprev, nnext, lprev, lnext, lhead, e3, e5);
42434
42518
  iv += 4;
42435
42519
  is += 12;
42436
- fillTransformedLineVertexStep(iv, vertices, is, steps, px, py, strokeWidth, nprev, nnext, lprev, lnext, l, e4, e6);
42520
+ fillTransformedLineVertexStep(iv, vertices, is, steps, headx, heady, strokeWidth, nprev, nnext, lprev, lnext, lhead, e4, e6);
42437
42521
  iv += 4;
42438
42522
  is += 12;
42439
42523
  // Middle segments
@@ -42472,18 +42556,18 @@
42472
42556
  toVector(px, py, pnextx, pnexty, nnext);
42473
42557
  toNormal(nnext, lnext);
42474
42558
  l += lprev;
42475
- fillTransformedLineVertexStep(iv, vertices, is, steps, px, py, strokeWidth, nprev, nnext, lprev, lnext, l, e3, e5);
42559
+ var tailx = px + nnext[1] * LINE_EXTRA_LENGTH;
42560
+ var taily = py - nnext[0] * LINE_EXTRA_LENGTH;
42561
+ var ltrail = l + LINE_EXTRA_LENGTH;
42562
+ fillTransformedLineVertexStep(iv, vertices, is, steps, tailx, taily, strokeWidth, nprev, nnext, lprev, lnext, ltrail, e3, e5);
42476
42563
  iv += 4;
42477
42564
  is += 12;
42478
- fillTransformedLineVertexStep(iv, vertices, is, steps, px, py, strokeWidth, nprev, nnext, lprev, lnext, l, e4, e6);
42565
+ fillTransformedLineVertexStep(iv, vertices, is, steps, tailx, taily, strokeWidth, nprev, nnext, lprev, lnext, ltrail, e4, e6);
42479
42566
  iv += 4;
42480
42567
  is += 12;
42481
42568
  // Total length
42482
42569
  var is0 = voffset * 6 - 1;
42483
- for (var i = is0, imax = is0 + 12; i < imax; i += 6) {
42484
- steps[i + 5] = length;
42485
- }
42486
- for (var i = is0 + 12; i < is; i += 6) {
42570
+ for (var i = is0; i < is; i += 6) {
42487
42571
  steps[i + 5] = l;
42488
42572
  }
42489
42573
  // Fill the rest
@@ -42621,12 +42705,7 @@
42621
42705
  _this.length = 1;
42622
42706
  return _this;
42623
42707
  }
42624
- BuilderLine.prototype.init = function () {
42625
- var buffer = this.buffer;
42626
- buffer.updateIndices();
42627
- buildLineIndex(buffer.indices, this.vertexOffset, this.indexOffset, this.indexCount);
42628
- this.inited |= BuilderFlag.INDEX;
42629
- };
42708
+ BuilderLine.prototype.init = function () { };
42630
42709
  BuilderLine.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
42631
42710
  var pointCount = toLinePointCount(shape.points);
42632
42711
  var vertexCount = toLineVertexCount(pointCount, true);
@@ -42660,11 +42739,11 @@
42660
42739
  };
42661
42740
  BuilderLine.prototype.update = function (shape) {
42662
42741
  var buffer = this.buffer;
42663
- this.updateLineVertexStep(buffer, shape);
42742
+ this.updateLineVertexStepAndIndex(buffer, shape);
42664
42743
  this.updateColor(buffer, shape);
42665
42744
  this.updateLineUv(buffer, shape);
42666
42745
  };
42667
- BuilderLine.prototype.updateLineVertexStep = function (buffer, shape) {
42746
+ BuilderLine.prototype.updateLineVertexStepAndIndex = function (buffer, shape) {
42668
42747
  var points = shape.points;
42669
42748
  if (points) {
42670
42749
  var pointId = points.id;
@@ -42680,9 +42759,9 @@
42680
42759
  var isStrokeWidthChanged = this.strokeWidth !== strokeWidth || this.strokeStyle !== strokeStyle;
42681
42760
  var transformLocalId = toTransformLocalId(shape);
42682
42761
  var isTransformChanged = this.transformLocalId !== transformLocalId;
42683
- var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
42762
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_INDEX);
42684
42763
  if (isNotInited || isPointChanged || isTransformChanged || isStrokeWidthChanged) {
42685
- this.inited |= BuilderFlag.VERTEX_AND_STEP;
42764
+ this.inited |= BuilderFlag.VERTEX_STEP_AND_INDEX;
42686
42765
  this.pointId = pointId;
42687
42766
  this.pointCount = pointCount;
42688
42767
  this.pointsClosed = pointsClosed;
@@ -42695,7 +42774,8 @@
42695
42774
  }
42696
42775
  buffer.updateVertices();
42697
42776
  buffer.updateSteps();
42698
- this.length = buildLineVertexStep(buffer.vertices, buffer.steps, this.vertexOffset, this.vertexCount, this.pointCount, this.pointsClosed, formatted.values, formatted.segments, strokeWidth, strokeStyle, shape.transform.internalTransform);
42777
+ buffer.updateIndices();
42778
+ 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);
42699
42779
  }
42700
42780
  }
42701
42781
  };
@@ -83649,7 +83729,7 @@
83649
83729
  toLineIndexCount: toLineIndexCount,
83650
83730
  buildLineIndex: buildLineIndex,
83651
83731
  buildLineUv: buildLineUv,
83652
- buildLineVertexStep: buildLineVertexStep,
83732
+ buildLineVertexStepAndIndex: buildLineVertexStepAndIndex,
83653
83733
  buildNullIndex: buildNullIndex,
83654
83734
  buildNullVertex: buildNullVertex,
83655
83735
  buildNullStep: buildNullStep,