@wcardinal/wcardinal-ui 0.461.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 (61) 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/e-shape-runtime-drag-state.d.ts +5 -0
  7. package/dist/types/wcardinal/ui/shape/index.d.ts +1 -0
  8. package/dist/types/wcardinal/ui/shape/variant/build-line.d.ts +1 -1
  9. package/dist/types/wcardinal/ui/shape/variant/builder-line.d.ts +1 -1
  10. package/dist/types/wcardinal/ui/shape/variant/builder.d.ts +1 -0
  11. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-base.d.ts +2 -0
  12. package/dist/types/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-base.d.ts +2 -0
  13. package/dist/wcardinal/ui/d-diagram-base.js +17 -5
  14. package/dist/wcardinal/ui/d-diagram-base.js.map +1 -1
  15. package/dist/wcardinal/ui/d-diagram-canvas-base.js +6 -6
  16. package/dist/wcardinal/ui/d-diagram-canvas-base.js.map +1 -1
  17. package/dist/wcardinal/ui/d-diagram-layer-container.js +4 -3
  18. package/dist/wcardinal/ui/d-diagram-layer-container.js.map +1 -1
  19. package/dist/wcardinal/ui/d-diagram-layer.js +4 -3
  20. package/dist/wcardinal/ui/d-diagram-layer.js.map +1 -1
  21. package/dist/wcardinal/ui/shape/e-shape-container.js +6 -3
  22. package/dist/wcardinal/ui/shape/e-shape-container.js.map +1 -1
  23. package/dist/wcardinal/ui/shape/e-shape-renderer.js +2 -2
  24. package/dist/wcardinal/ui/shape/e-shape-renderer.js.map +1 -1
  25. package/dist/wcardinal/ui/shape/e-shape-runtime-drag-state.js +19 -0
  26. package/dist/wcardinal/ui/shape/e-shape-runtime-drag-state.js.map +1 -0
  27. package/dist/wcardinal/ui/shape/e-shape-runtime-impl.js +5 -3
  28. package/dist/wcardinal/ui/shape/e-shape-runtime-impl.js.map +1 -1
  29. package/dist/wcardinal/ui/shape/index.js +1 -0
  30. package/dist/wcardinal/ui/shape/index.js.map +1 -1
  31. package/dist/wcardinal/ui/shape/variant/build-line.js +82 -17
  32. package/dist/wcardinal/ui/shape/variant/build-line.js.map +1 -1
  33. package/dist/wcardinal/ui/shape/variant/builder-line.js +8 -12
  34. package/dist/wcardinal/ui/shape/variant/builder-line.js.map +1 -1
  35. package/dist/wcardinal/ui/shape/variant/builder.js +2 -0
  36. package/dist/wcardinal/ui/shape/variant/builder.js.map +1 -1
  37. package/dist/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-base.js +6 -0
  38. package/dist/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-base.js.map +1 -1
  39. package/dist/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-base.js +6 -0
  40. package/dist/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-base.js.map +1 -1
  41. package/dist/wcardinal-ui-theme-dark-en-us.js +7 -1
  42. package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
  43. package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
  44. package/dist/wcardinal-ui-theme-dark-ja-jp.js +7 -1
  45. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
  46. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
  47. package/dist/wcardinal-ui-theme-dark.js +7 -1
  48. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  49. package/dist/wcardinal-ui-theme-white-en-us.js +7 -1
  50. package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
  51. package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
  52. package/dist/wcardinal-ui-theme-white-ja-jp.js +7 -1
  53. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
  54. package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
  55. package/dist/wcardinal-ui-theme-white.js +7 -1
  56. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  57. package/dist/wcardinal-ui.cjs.js +166 -55
  58. package/dist/wcardinal-ui.js +154 -55
  59. package/dist/wcardinal-ui.min.js +2 -2
  60. package/dist/wcardinal-ui.min.js.map +1 -1
  61. 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) {
@@ -24919,6 +24936,23 @@
24919
24936
  return DDiagramCanvasTile;
24920
24937
  }());
24921
24938
 
24939
+ /*
24940
+ * Copyright (C) 2026 Toshiba Corporation
24941
+ * SPDX-License-Identifier: Apache-2.0
24942
+ */
24943
+ var EShapeRuntimeDragStates = /** @class */ (function () {
24944
+ function EShapeRuntimeDragStates() {
24945
+ }
24946
+ EShapeRuntimeDragStates.get = function () {
24947
+ return this._STATE;
24948
+ };
24949
+ EShapeRuntimeDragStates.set = function (state) {
24950
+ this._STATE = state;
24951
+ };
24952
+ EShapeRuntimeDragStates._STATE = EShapeState.DRAGGED;
24953
+ return EShapeRuntimeDragStates;
24954
+ }());
24955
+
24922
24956
  /*
24923
24957
  * Copyright (C) 2019 Toshiba Corporation
24924
24958
  * SPDX-License-Identifier: Apache-2.0
@@ -24990,11 +25024,12 @@
24990
25024
  };
24991
25025
  EShapeRuntimeImpl.prototype.isDraggable = function (shape, e) {
24992
25026
  var state = shape.state;
24993
- var wasDragged = state.isDragged;
25027
+ var dragState = EShapeRuntimeDragStates.get();
25028
+ var wasDragged = state.is(dragState);
24994
25029
  try {
24995
25030
  // State
24996
25031
  if (state.isActionable) {
24997
- state.isDragged = true;
25032
+ state.add(dragState);
24998
25033
  }
24999
25034
  // Actions
25000
25035
  var actions = this.actions;
@@ -25007,7 +25042,7 @@
25007
25042
  return false;
25008
25043
  }
25009
25044
  finally {
25010
- state.isDragged = wasDragged;
25045
+ state.set(dragState, wasDragged);
25011
25046
  }
25012
25047
  };
25013
25048
  EShapeRuntimeImpl.prototype.onDragStart = function (shape, e, interactionManager) {
@@ -25447,7 +25482,7 @@
25447
25482
  */
25448
25483
  var DDiagramLayer = /** @class */ (function (_super) {
25449
25484
  __extends(DDiagramLayer, _super);
25450
- function DDiagramLayer(name) {
25485
+ function DDiagramLayer(name, antialiasWeight) {
25451
25486
  var _this = _super.call(this) || this;
25452
25487
  _this.name = name;
25453
25488
  _this.interactive = false;
@@ -25456,6 +25491,7 @@
25456
25491
  shape.parent = _this;
25457
25492
  _this._shape = shape;
25458
25493
  _this.interactives = [];
25494
+ _this._antialiasWeight = antialiasWeight;
25459
25495
  return _this;
25460
25496
  }
25461
25497
  Object.defineProperty(DDiagramLayer.prototype, "width", {
@@ -25627,9 +25663,9 @@
25627
25663
  isInteractive | isDraggable | isPinchable
25628
25664
  ];
25629
25665
  };
25630
- DDiagramLayer.deserialize = function (serialized, manager, width, height) {
25666
+ DDiagramLayer.deserialize = function (serialized, manager, width, height, antialiasWeight) {
25631
25667
  var _a, _b, _c;
25632
- var result = new DDiagramLayer(this.deserializeName(serialized[0], manager));
25668
+ var result = new DDiagramLayer(this.deserializeName(serialized[0], manager), antialiasWeight);
25633
25669
  var shape = result._shape;
25634
25670
  var visibility = serialized[1];
25635
25671
  if (visibility != null) {
@@ -25681,11 +25717,12 @@
25681
25717
  */
25682
25718
  var DDiagramLayerContainer = /** @class */ (function (_super) {
25683
25719
  __extends(DDiagramLayerContainer, _super);
25684
- function DDiagramLayerContainer(width, height) {
25720
+ function DDiagramLayerContainer(width, height, antialiasWeight) {
25685
25721
  var _this = _super.call(this) || this;
25686
25722
  _this._active = null;
25687
25723
  _this._width = width;
25688
25724
  _this._height = height;
25725
+ _this._antialiasWeight = antialiasWeight;
25689
25726
  _this.interactive = false;
25690
25727
  _this.interactiveChildren = false;
25691
25728
  return _this;
@@ -25713,7 +25750,7 @@
25713
25750
  configurable: true
25714
25751
  });
25715
25752
  DDiagramLayerContainer.prototype.create = function (name, activate) {
25716
- var result = new DDiagramLayer(name);
25753
+ var result = new DDiagramLayer(name, this._antialiasWeight);
25717
25754
  this.attach(result, activate);
25718
25755
  return result;
25719
25756
  };
@@ -25842,7 +25879,7 @@
25842
25879
  var width = this._width;
25843
25880
  var height = this._height;
25844
25881
  for (var i = 0; i < serializedLayersLength; ++i) {
25845
- this.addChild(DDiagramLayer.deserialize(serializedLayers[i], manager, width, height));
25882
+ this.addChild(DDiagramLayer.deserialize(serializedLayers[i], manager, width, height, this._antialiasWeight));
25846
25883
  }
25847
25884
  this.onLayerChange();
25848
25885
  DApplications.update(this);
@@ -25858,7 +25895,7 @@
25858
25895
  var DDiagramCanvasBase = /** @class */ (function (_super) {
25859
25896
  __extends(DDiagramCanvasBase, _super);
25860
25897
  function DDiagramCanvasBase(options) {
25861
- var _a, _b, _c, _d;
25898
+ var _a, _b, _c, _d, _e, _f;
25862
25899
  var _this = _super.call(this, options) || this;
25863
25900
  // Background
25864
25901
  var theme = _this.theme;
@@ -25866,15 +25903,15 @@
25866
25903
  _this._background = new DDiagramCanvasEditorBackground(_this._background, _this.toBackgroundBase(theme, options));
25867
25904
  }
25868
25905
  // Layer
25869
- 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()));
25870
25907
  _this._layer = layer;
25871
25908
  _this.addChild(layer);
25872
25909
  // Label, Category, Summary and Description
25873
25910
  if (options != null) {
25874
- _this._label = (_a = options.label) !== null && _a !== void 0 ? _a : "";
25875
- _this._category = (_b = options.category) !== null && _b !== void 0 ? _b : null;
25876
- _this._summary = (_c = options.summary) !== null && _c !== void 0 ? _c : "";
25877
- _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 : "";
25878
25915
  }
25879
25916
  else {
25880
25917
  _this._label = "";
@@ -42176,6 +42213,11 @@
42176
42213
  var LINE_FMIN = 0.00001;
42177
42214
  var LINE_NPREV = [0, 1];
42178
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;
42179
42221
  var toPointCount = function (points) {
42180
42222
  if (points) {
42181
42223
  return points.formatted.plength;
@@ -42202,7 +42244,7 @@
42202
42244
  var iimax = (ioffset + icount) * 3 - 1;
42203
42245
  var io = voffset;
42204
42246
  for (; ii < iimax;) {
42205
- indices[++ii] = io + 0;
42247
+ indices[++ii] = io;
42206
42248
  indices[++ii] = io + 2;
42207
42249
  indices[++ii] = io + 1;
42208
42250
  indices[++ii] = io + 1;
@@ -42211,6 +42253,40 @@
42211
42253
  io += 2;
42212
42254
  }
42213
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
+ };
42214
42290
  var buildLineUv = function (uvs, steps, voffset, vcount, textureUvs, length) {
42215
42291
  var lengthInverse = 1 / Math.max(LINE_FMIN, length);
42216
42292
  var x0 = textureUvs.x0;
@@ -42237,7 +42313,7 @@
42237
42313
  }
42238
42314
  };
42239
42315
  var TRANSFORMED_POINT_VALUES;
42240
- 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) {
42241
42317
  var transformedPointValues = TRANSFORMED_POINT_VALUES;
42242
42318
  if (transformedPointValues == null) {
42243
42319
  transformedPointValues = [];
@@ -42256,7 +42332,7 @@
42256
42332
  transformedPointValues[iv] = a * x + c * y + tx;
42257
42333
  transformedPointValues[iv + 1] = b * x + d * y + ty;
42258
42334
  }
42259
- 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);
42260
42336
  };
42261
42337
  var fillTransformedLineVertexStep = function (iv, vertices, is, steps, px, py, strokeWidth, nprev, nnext, lprev, lnext, llo, e0, e1) {
42262
42338
  var d = toNormalPacked(nprev, nnext);
@@ -42278,13 +42354,14 @@
42278
42354
  steps[++is] = llo;
42279
42355
  steps[++is] = l;
42280
42356
  };
42281
- 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) {
42282
42358
  var lineSegmentsLength = lineSegments.length;
42283
42359
  if (0 < lineSegmentsLength) {
42284
42360
  if (lineIsClosed) {
42285
42361
  var lmax = 0;
42286
42362
  var lprev = 0;
42287
42363
  var ivoffset = voffset;
42364
+ var ii = ioffset * 3 - 1;
42288
42365
  var iseg = 0;
42289
42366
  var iprevseg = lineSegments[0];
42290
42367
  for (var i = 1; i < lineSegmentsLength; ++i) {
@@ -42292,7 +42369,9 @@
42292
42369
  if (2 <= iseg - iprevseg) {
42293
42370
  lprev = buildTransformedLineOpenSegmentVertexStep(vertices, steps, ivoffset, -1, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
42294
42371
  lmax = Math.max(lmax, lprev);
42295
- ivoffset += toLineVertexCount(iseg - iprevseg, false);
42372
+ var lvcount = toLineVertexCount(iseg - iprevseg, false);
42373
+ ii = buildLineSegmentIndex(indices, ii, ivoffset, lvcount);
42374
+ ivoffset += lvcount;
42296
42375
  }
42297
42376
  iprevseg = iseg;
42298
42377
  }
@@ -42301,23 +42380,33 @@
42301
42380
  if (2 <= iseg - iprevseg) {
42302
42381
  lprev = buildTransformedLineOpenSegmentVertexStep(vertices, steps, ivoffset, voffset + vcount - ivoffset, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
42303
42382
  lmax = Math.max(lmax, lprev);
42304
- ivoffset += toLineVertexCount(iseg - iprevseg, false);
42383
+ var lvcount = toLineVertexCount(iseg - iprevseg, false);
42384
+ ii = buildLineSegmentIndex(indices, ii, ivoffset, lvcount);
42385
+ ivoffset += lvcount;
42305
42386
  }
42306
42387
  else {
42307
42388
  buildTransformedLineEmptyVertexStep(vertices, steps, ivoffset, voffset + vcount - ivoffset, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
42308
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
+ }
42309
42395
  return lmax;
42310
42396
  }
42311
42397
  else {
42312
42398
  var lmax = 0;
42313
42399
  var lprev = 0;
42314
42400
  var ivoffset = voffset;
42401
+ var ii = ioffset * 3 - 1;
42315
42402
  // First
42316
42403
  var iseg = lineSegments[0];
42317
42404
  if (2 <= iseg) {
42318
42405
  lprev = buildTransformedLineOpenSegmentVertexStep(vertices, steps, ivoffset, -1, lineVertices, 0, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
42319
42406
  lmax = Math.max(lmax, lprev);
42320
- ivoffset += toLineVertexCount(iseg, false);
42407
+ var lvcount = toLineVertexCount(iseg, false);
42408
+ ii = buildLineSegmentIndex(indices, ii, ivoffset, lvcount);
42409
+ ivoffset += lvcount;
42321
42410
  }
42322
42411
  // Middle
42323
42412
  var iprevseg = iseg;
@@ -42326,7 +42415,9 @@
42326
42415
  if (2 <= iseg - iprevseg) {
42327
42416
  lprev = buildTransformedLineOpenSegmentVertexStep(vertices, steps, ivoffset, -1, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
42328
42417
  lmax = Math.max(lmax, lprev);
42329
- ivoffset += toLineVertexCount(iseg - iprevseg, false);
42418
+ var lvcount = toLineVertexCount(iseg - iprevseg, false);
42419
+ ii = buildLineSegmentIndex(indices, ii, ivoffset, lvcount);
42420
+ ivoffset += lvcount;
42330
42421
  }
42331
42422
  iprevseg = iseg;
42332
42423
  }
@@ -42335,15 +42426,23 @@
42335
42426
  if (2 <= iseg - iprevseg) {
42336
42427
  lprev = buildTransformedLineOpenSegmentVertexStep(vertices, steps, ivoffset, voffset + vcount - ivoffset, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
42337
42428
  lmax = Math.max(lmax, lprev);
42338
- ivoffset += toLineVertexCount(iseg - iprevseg, false);
42429
+ var lvcount = toLineVertexCount(iseg - iprevseg, false);
42430
+ ii = buildLineSegmentIndex(indices, ii, ivoffset, lvcount);
42431
+ ivoffset += lvcount;
42339
42432
  }
42340
42433
  else {
42341
42434
  buildTransformedLineEmptyVertexStep(vertices, steps, ivoffset, voffset + vcount - ivoffset, lineVertices, iprevseg, iseg, lineVertexCount, strokeWidth, strokeStyle, lprev);
42342
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
+ }
42343
42441
  return lmax;
42344
42442
  }
42345
42443
  }
42346
42444
  else {
42445
+ buildLineIndex(indices, voffset, ioffset, icount);
42347
42446
  if (lineIsClosed) {
42348
42447
  return buildTransformedLineClosedSegmentVertexStep(vertices, steps, voffset, vcount, lineVertices, 0, lineVertexCount, lineVertexCount, strokeWidth, strokeStyle);
42349
42448
  }
@@ -42412,10 +42511,13 @@
42412
42511
  var iv = (voffset << 1) - 1;
42413
42512
  var is = voffset * 6 - 1;
42414
42513
  var l = 0;
42415
- 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);
42416
42518
  iv += 4;
42417
42519
  is += 12;
42418
- 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);
42419
42521
  iv += 4;
42420
42522
  is += 12;
42421
42523
  // Middle segments
@@ -42454,18 +42556,18 @@
42454
42556
  toVector(px, py, pnextx, pnexty, nnext);
42455
42557
  toNormal(nnext, lnext);
42456
42558
  l += lprev;
42457
- 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);
42458
42563
  iv += 4;
42459
42564
  is += 12;
42460
- 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);
42461
42566
  iv += 4;
42462
42567
  is += 12;
42463
42568
  // Total length
42464
42569
  var is0 = voffset * 6 - 1;
42465
- for (var i = is0, imax = is0 + 12; i < imax; i += 6) {
42466
- steps[i + 5] = length;
42467
- }
42468
- for (var i = is0 + 12; i < is; i += 6) {
42570
+ for (var i = is0; i < is; i += 6) {
42469
42571
  steps[i + 5] = l;
42470
42572
  }
42471
42573
  // Fill the rest
@@ -42603,12 +42705,7 @@
42603
42705
  _this.length = 1;
42604
42706
  return _this;
42605
42707
  }
42606
- BuilderLine.prototype.init = function () {
42607
- var buffer = this.buffer;
42608
- buffer.updateIndices();
42609
- buildLineIndex(buffer.indices, this.vertexOffset, this.indexOffset, this.indexCount);
42610
- this.inited |= BuilderFlag.INDEX;
42611
- };
42708
+ BuilderLine.prototype.init = function () { };
42612
42709
  BuilderLine.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
42613
42710
  var pointCount = toLinePointCount(shape.points);
42614
42711
  var vertexCount = toLineVertexCount(pointCount, true);
@@ -42642,11 +42739,11 @@
42642
42739
  };
42643
42740
  BuilderLine.prototype.update = function (shape) {
42644
42741
  var buffer = this.buffer;
42645
- this.updateLineVertexStep(buffer, shape);
42742
+ this.updateLineVertexStepAndIndex(buffer, shape);
42646
42743
  this.updateColor(buffer, shape);
42647
42744
  this.updateLineUv(buffer, shape);
42648
42745
  };
42649
- BuilderLine.prototype.updateLineVertexStep = function (buffer, shape) {
42746
+ BuilderLine.prototype.updateLineVertexStepAndIndex = function (buffer, shape) {
42650
42747
  var points = shape.points;
42651
42748
  if (points) {
42652
42749
  var pointId = points.id;
@@ -42662,9 +42759,9 @@
42662
42759
  var isStrokeWidthChanged = this.strokeWidth !== strokeWidth || this.strokeStyle !== strokeStyle;
42663
42760
  var transformLocalId = toTransformLocalId(shape);
42664
42761
  var isTransformChanged = this.transformLocalId !== transformLocalId;
42665
- var isNotInited = !(this.inited & BuilderFlag.VERTEX_AND_STEP);
42762
+ var isNotInited = !(this.inited & BuilderFlag.VERTEX_STEP_AND_INDEX);
42666
42763
  if (isNotInited || isPointChanged || isTransformChanged || isStrokeWidthChanged) {
42667
- this.inited |= BuilderFlag.VERTEX_AND_STEP;
42764
+ this.inited |= BuilderFlag.VERTEX_STEP_AND_INDEX;
42668
42765
  this.pointId = pointId;
42669
42766
  this.pointCount = pointCount;
42670
42767
  this.pointsClosed = pointsClosed;
@@ -42677,7 +42774,8 @@
42677
42774
  }
42678
42775
  buffer.updateVertices();
42679
42776
  buffer.updateSteps();
42680
- 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);
42681
42779
  }
42682
42780
  }
42683
42781
  };
@@ -83631,7 +83729,7 @@
83631
83729
  toLineIndexCount: toLineIndexCount,
83632
83730
  buildLineIndex: buildLineIndex,
83633
83731
  buildLineUv: buildLineUv,
83634
- buildLineVertexStep: buildLineVertexStep,
83732
+ buildLineVertexStepAndIndex: buildLineVertexStepAndIndex,
83635
83733
  buildNullIndex: buildNullIndex,
83636
83734
  buildNullVertex: buildNullVertex,
83637
83735
  buildNullStep: buildNullStep,
@@ -83927,6 +84025,7 @@
83927
84025
  EShapeResourceManagerDeserializationMode: EShapeResourceManagerDeserializationMode,
83928
84026
  EShapeResourceManagerDeserialization: EShapeResourceManagerDeserialization,
83929
84027
  EShapeResourceManagerSerialization: EShapeResourceManagerSerialization,
84028
+ EShapeRuntimeDragStates: EShapeRuntimeDragStates,
83930
84029
  EShapeRuntimeImpl: EShapeRuntimeImpl,
83931
84030
  EShapeRuntimeReset: EShapeRuntimeReset,
83932
84031
  EShapeRuntimes: EShapeRuntimes,