@wcardinal/wcardinal-ui 0.465.1 → 0.466.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/wcardinal/ui/shape/e-shape-stroke-side.d.ts +6 -0
- package/dist/types/wcardinal/ui/shape/e-shape-type.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/load/index.d.ts +2 -0
- package/dist/types/wcardinal/ui/shape/load/load-shape-rectangle-legacy.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/variant/build-rectangle-legacy.d.ts +10 -0
- package/dist/types/wcardinal/ui/shape/variant/build-rectangle.d.ts +1 -10
- package/dist/types/wcardinal/ui/shape/variant/builder-rectangle-legacy.d.ts +9 -0
- package/dist/types/wcardinal/ui/shape/variant/builder-rectangle.d.ts +1 -9
- package/dist/types/wcardinal/ui/shape/variant/create-rectangle-legacy-uploaded.d.ts +4 -0
- package/dist/types/wcardinal/ui/shape/variant/create-rectangle-uploaded.d.ts +1 -4
- package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle-legacy.d.ts +4 -0
- package/dist/types/wcardinal/ui/shape/variant/e-shape-line-of-rectangles.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/variant/e-shape-rectangle-legacy.d.ts +7 -0
- package/dist/types/wcardinal/ui/shape/variant/e-shape-rectangle-pivoted.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated-impl.d.ts +85 -0
- package/dist/types/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/variant/e-shape-rectangle.d.ts +4 -0
- package/dist/types/wcardinal/ui/shape/variant/index.d.ts +7 -0
- package/dist/wcardinal/ui/shape/e-shape-renderer.js +1 -1
- package/dist/wcardinal/ui/shape/e-shape-renderer.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-stroke-side.js +6 -0
- package/dist/wcardinal/ui/shape/e-shape-stroke-side.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-type.js +1 -0
- package/dist/wcardinal/ui/shape/e-shape-type.js.map +1 -1
- package/dist/wcardinal/ui/shape/load/index.js +2 -0
- package/dist/wcardinal/ui/shape/load/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/load/load-shape-all.js +2 -0
- package/dist/wcardinal/ui/shape/load/load-shape-all.js.map +1 -1
- package/dist/wcardinal/ui/shape/load/load-shape-image.js +2 -2
- package/dist/wcardinal/ui/shape/load/load-shape-image.js.map +1 -1
- package/dist/wcardinal/ui/shape/load/load-shape-rectangle-legacy.js +17 -0
- package/dist/wcardinal/ui/shape/load/load-shape-rectangle-legacy.js.map +1 -0
- package/dist/wcardinal/ui/shape/load/load-shape-rectangle.js +2 -2
- package/dist/wcardinal/ui/shape/load/load-shape-rectangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-polygon.js +1 -1
- package/dist/wcardinal/ui/shape/variant/build-polygon.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-rectangle-legacy.js +336 -0
- package/dist/wcardinal/ui/shape/variant/build-rectangle-legacy.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/build-rectangle.js +5 -338
- package/dist/wcardinal/ui/shape/variant/build-rectangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangles.js +16 -16
- package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-marker-rectangle.js +6 -6
- package/dist/wcardinal/ui/shape/variant/builder-marker-rectangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-rectangle-legacy.js +77 -0
- package/dist/wcardinal/ui/shape/variant/builder-rectangle-legacy.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/builder-rectangle-pivoted.js +6 -6
- package/dist/wcardinal/ui/shape/variant/builder-rectangle-pivoted.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-rectangle.js +1 -72
- package/dist/wcardinal/ui/shape/variant/builder-rectangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-line-of-rectangles-uploaded.js +2 -2
- package/dist/wcardinal/ui/shape/variant/create-line-of-rectangles-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-line-uploaded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/create-line-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-rectangle-legacy-uploaded.js +24 -0
- package/dist/wcardinal/ui/shape/variant/create-rectangle-legacy-uploaded.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/create-rectangle-pivoted-uploaded.js +4 -4
- package/dist/wcardinal/ui/shape/variant/create-rectangle-pivoted-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-rectangle-uploaded.js +1 -19
- package/dist/wcardinal/ui/shape/variant/create-rectangle-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-legacy.js +10 -0
- package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-legacy.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-line-of-rectangles.js +2 -2
- package/dist/wcardinal/ui/shape/variant/e-shape-line-of-rectangles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-legacy.js +27 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-legacy.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-pivoted.js +2 -2
- package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-pivoted.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated-impl.js +796 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated-impl.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated.js +6 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-rectangle.js +14 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-rectangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/index.js +7 -0
- package/dist/wcardinal/ui/shape/variant/index.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white-en-us.js +1 -1
- package/dist/wcardinal-ui-theme-white-en-us.min.js +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +968 -102
- package/dist/wcardinal-ui.js +968 -102
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
package/dist/wcardinal-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.466.1
|
|
3
3
|
Copyright (C) 2019-2026 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
EMBEDDED_ACCEPTOR_EDGE: 25,
|
|
56
56
|
POLYGON: 26,
|
|
57
57
|
CIRCLE_LEGACY: 27,
|
|
58
|
+
RECTANGLE_LEGACY: 28,
|
|
58
59
|
EXTENSION: 1000
|
|
59
60
|
};
|
|
60
61
|
|
|
@@ -1466,8 +1467,14 @@
|
|
|
1466
1467
|
LEFT: LEFT$1,
|
|
1467
1468
|
TOP_OR_LEFT: TOP$1 | LEFT$1,
|
|
1468
1469
|
TOP_OR_RIGHT: TOP$1 | RIGHT$1,
|
|
1470
|
+
TOP_OR_BOTTOM: TOP$1 | BOTTOM$1,
|
|
1469
1471
|
BOTTOM_OR_LEFT: BOTTOM$1 | LEFT$1,
|
|
1470
1472
|
BOTTOM_OR_RIGHT: BOTTOM$1 | RIGHT$1,
|
|
1473
|
+
LEFT_OR_RIGHT: LEFT$1 | RIGHT$1,
|
|
1474
|
+
NOT_TOP: RIGHT$1 | BOTTOM$1 | LEFT$1,
|
|
1475
|
+
NOT_RIGHT: TOP$1 | BOTTOM$1 | LEFT$1,
|
|
1476
|
+
NOT_BOTTOM: TOP$1 | RIGHT$1 | LEFT$1,
|
|
1477
|
+
NOT_LEFT: TOP$1 | RIGHT$1 | BOTTOM$1,
|
|
1471
1478
|
ALL: TOP$1 | RIGHT$1 | BOTTOM$1 | LEFT$1
|
|
1472
1479
|
};
|
|
1473
1480
|
|
|
@@ -16703,7 +16710,7 @@
|
|
|
16703
16710
|
* SPDX-License-Identifier: Apache-2.0
|
|
16704
16711
|
*/
|
|
16705
16712
|
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 toUnpackedClippings(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(930.0, 930.0);\n\treturn c;\n}\n\nvec2 toUnpackedAlphas(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, toUnpackedClippings(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 = toUnpackedAlphas(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}";
|
|
16706
|
-
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}";
|
|
16713
|
+
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\tvec2 zero = vec2(0.0);\n\tfloat s0 = smoothstep(length(c/clamp(one + awd, zero, one)), length(c/clamp(one - awd, zero, one)), 1.0);\n\tfloat s1 = smoothstep(length(c/clamp(one - swd + awd, 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 = 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}";
|
|
16707
16714
|
var EShapeRenderer = /** @class */ (function (_super) {
|
|
16708
16715
|
__extends(EShapeRenderer, _super);
|
|
16709
16716
|
function EShapeRenderer(renderer) {
|
|
@@ -25467,22 +25474,22 @@
|
|
|
25467
25474
|
* Copyright (C) 2019 Toshiba Corporation
|
|
25468
25475
|
* SPDX-License-Identifier: Apache-2.0
|
|
25469
25476
|
*/
|
|
25470
|
-
var
|
|
25471
|
-
__extends(
|
|
25472
|
-
function
|
|
25473
|
-
if (type === void 0) { type = EShapeType.
|
|
25477
|
+
var EShapeRectangleLegacy = /** @class */ (function (_super) {
|
|
25478
|
+
__extends(EShapeRectangleLegacy, _super);
|
|
25479
|
+
function EShapeRectangleLegacy(type) {
|
|
25480
|
+
if (type === void 0) { type = EShapeType.RECTANGLE_LEGACY; }
|
|
25474
25481
|
return _super.call(this, type) || this;
|
|
25475
25482
|
}
|
|
25476
|
-
|
|
25477
|
-
return new
|
|
25483
|
+
EShapeRectangleLegacy.prototype.clone = function () {
|
|
25484
|
+
return new EShapeRectangleLegacy(this.type).copy(this);
|
|
25478
25485
|
};
|
|
25479
|
-
|
|
25486
|
+
EShapeRectangleLegacy.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
|
|
25480
25487
|
if (_super.prototype.containsAbsBBox.call(this, x, y, ax, ay)) {
|
|
25481
25488
|
return hitTestRectangle(this, x, y, ax, ay, sw, ss);
|
|
25482
25489
|
}
|
|
25483
25490
|
return false;
|
|
25484
25491
|
};
|
|
25485
|
-
return
|
|
25492
|
+
return EShapeRectangleLegacy;
|
|
25486
25493
|
}(EShapePrimitive));
|
|
25487
25494
|
|
|
25488
25495
|
/*
|
|
@@ -25502,7 +25509,7 @@
|
|
|
25502
25509
|
return result;
|
|
25503
25510
|
};
|
|
25504
25511
|
return EShapeRectanglePivoted;
|
|
25505
|
-
}(
|
|
25512
|
+
}(EShapeRectangleLegacy));
|
|
25506
25513
|
|
|
25507
25514
|
/*
|
|
25508
25515
|
* Copyright (C) 2019 Toshiba Corporation
|
|
@@ -41983,7 +41990,7 @@
|
|
|
41983
41990
|
var buildPolygonStep = function (steps, polygonDistances, polygonLengths, polygonClippings, polygonUvs, polygonBoundary, voffset, vertexCount, fillDirection, fillPercent, strokeWidth, strokeSide, strokeStyle) {
|
|
41984
41991
|
var scaleInvariant = toScaleInvariant(strokeStyle);
|
|
41985
41992
|
var dash = toDash(strokeStyle);
|
|
41986
|
-
var w =
|
|
41993
|
+
var w = strokeSide !== EShapeStrokeSide.NONE ? 1 : 0;
|
|
41987
41994
|
var e = toPackedI4x64(7 + dash, scaleInvariant, w, 0);
|
|
41988
41995
|
var fp = Math.max(0, Math.min(1, fillPercent));
|
|
41989
41996
|
switch (fillDirection) {
|
|
@@ -43977,11 +43984,10 @@
|
|
|
43977
43984
|
}
|
|
43978
43985
|
};
|
|
43979
43986
|
|
|
43980
|
-
var
|
|
43981
|
-
var
|
|
43982
|
-
var
|
|
43983
|
-
var
|
|
43984
|
-
var buildRectangleIndex = function (indices, voffset, ioffset) {
|
|
43987
|
+
var RECTANGLE_LEGACY_VERTEX_COUNT = 16;
|
|
43988
|
+
var RECTANGLE_LEGACY_INDEX_COUNT = 8;
|
|
43989
|
+
var RECTANGLE_LEGACY_WORLD_SIZE = [0, 0];
|
|
43990
|
+
var buildRectangleLegacyIndex = function (indices, voffset, ioffset) {
|
|
43985
43991
|
// c0 c1 c4 c5
|
|
43986
43992
|
// |-----| |-----|
|
|
43987
43993
|
// | | | |
|
|
@@ -44019,7 +44025,7 @@
|
|
|
44019
44025
|
indices[++ii] = voffset + 13;
|
|
44020
44026
|
indices[++ii] = voffset + 15;
|
|
44021
44027
|
};
|
|
44022
|
-
var
|
|
44028
|
+
var buildRectangleLegacyVertex = function (vertices, voffset, originX, originY, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, worldSize) {
|
|
44023
44029
|
// b0 b1 b2
|
|
44024
44030
|
// |-------|-------|
|
|
44025
44031
|
// | | |
|
|
@@ -44027,22 +44033,21 @@
|
|
|
44027
44033
|
// | | |
|
|
44028
44034
|
// |-------|-------|
|
|
44029
44035
|
// b6 b7 b8
|
|
44036
|
+
var a = internalTransform.a;
|
|
44037
|
+
var b = internalTransform.b;
|
|
44038
|
+
var c = internalTransform.c;
|
|
44039
|
+
var d = internalTransform.d;
|
|
44040
|
+
var tx = internalTransform.tx;
|
|
44041
|
+
var ty = internalTransform.ty;
|
|
44030
44042
|
var s = strokeAlign * strokeWidth;
|
|
44031
44043
|
var sx = sizeX * 0.5 + (0 <= sizeX ? +s : -s);
|
|
44032
44044
|
var sy = sizeY * 0.5 + (0 <= sizeY ? +s : -s);
|
|
44033
|
-
var
|
|
44034
|
-
|
|
44035
|
-
|
|
44036
|
-
var
|
|
44037
|
-
var
|
|
44038
|
-
|
|
44039
|
-
internalTransform.apply(work, work);
|
|
44040
|
-
var b1x = work.x;
|
|
44041
|
-
var b1y = work.y;
|
|
44042
|
-
work.set(originX - sx, originY);
|
|
44043
|
-
internalTransform.apply(work, work);
|
|
44044
|
-
var b3x = work.x;
|
|
44045
|
-
var b3y = work.y;
|
|
44045
|
+
var b0x = a * (originX - sx) + c * (originY - sy) + tx;
|
|
44046
|
+
var b0y = b * (originX - sx) + d * (originY - sy) + ty;
|
|
44047
|
+
var b1x = a * originX + c * (originY - sy) + tx;
|
|
44048
|
+
var b1y = b * originX + d * (originY - sy) + ty;
|
|
44049
|
+
var b3x = a * (originX - sx) + c * originY + tx;
|
|
44050
|
+
var b3y = b * (originX - sx) + d * originY + ty;
|
|
44046
44051
|
var d01x = b1x - b0x;
|
|
44047
44052
|
var d01y = b1y - b0y;
|
|
44048
44053
|
var d03x = b3x - b0x;
|
|
@@ -44107,7 +44112,7 @@
|
|
|
44107
44112
|
worldSize[0] = toLength(b0x, b0y, b1x, b1y);
|
|
44108
44113
|
worldSize[1] = toLength(b0x, b0y, b3x, b3y);
|
|
44109
44114
|
};
|
|
44110
|
-
var
|
|
44115
|
+
var buildRectangleLegacyStep = function (voffset, steps, strokeWidth, strokeSide, strokeStyle, worldSize) {
|
|
44111
44116
|
var scaleInvariant = toScaleInvariant(strokeStyle);
|
|
44112
44117
|
var ax = worldSize[0];
|
|
44113
44118
|
var ay = worldSize[1];
|
|
@@ -44235,7 +44240,7 @@
|
|
|
44235
44240
|
steps[++is] = c11;
|
|
44236
44241
|
steps[++is] = 0;
|
|
44237
44242
|
};
|
|
44238
|
-
var
|
|
44243
|
+
var buildRectangleLegacyUv = function (uvs, voffset, textureUvs) {
|
|
44239
44244
|
// b0 b1 b2
|
|
44240
44245
|
// |-------|-------|
|
|
44241
44246
|
// | | |
|
|
@@ -46383,8 +46388,8 @@
|
|
|
46383
46388
|
var ioffset = this.indexOffset;
|
|
46384
46389
|
var pointCountReserved = this.pointCountReserved;
|
|
46385
46390
|
if (0 < pointCountReserved) {
|
|
46386
|
-
|
|
46387
|
-
copyIndex(indices,
|
|
46391
|
+
buildRectangleLegacyIndex(indices, voffset, ioffset);
|
|
46392
|
+
copyIndex(indices, RECTANGLE_LEGACY_VERTEX_COUNT, ioffset, RECTANGLE_LEGACY_INDEX_COUNT, pointCountReserved);
|
|
46388
46393
|
}
|
|
46389
46394
|
this.inited |= BuilderFlag.INDEX;
|
|
46390
46395
|
};
|
|
@@ -46393,7 +46398,7 @@
|
|
|
46393
46398
|
if (points instanceof EShapeLineOfAnyPointsImpl) {
|
|
46394
46399
|
var buffer = this.buffer;
|
|
46395
46400
|
this.updateVertexStepAndUv(buffer, shape, points);
|
|
46396
|
-
this.updateLineOfAnyColor(buffer, shape, points,
|
|
46401
|
+
this.updateLineOfAnyColor(buffer, shape, points, RECTANGLE_LEGACY_VERTEX_COUNT);
|
|
46397
46402
|
}
|
|
46398
46403
|
};
|
|
46399
46404
|
BuilderLineOfRectangles.prototype.updateVertexStepAndUv = function (buffer, shape, points) {
|
|
@@ -46458,17 +46463,17 @@
|
|
|
46458
46463
|
var pointSizeX = pointSize.getX(0);
|
|
46459
46464
|
var pointSizeY = pointSize.getY(0);
|
|
46460
46465
|
// Vertices
|
|
46461
|
-
|
|
46462
|
-
copyVertex(vertices, internalTransform, voffset,
|
|
46466
|
+
buildRectangleLegacyVertex(vertices, voffset, 0, 0, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_LEGACY_WORLD_SIZE);
|
|
46467
|
+
copyVertex(vertices, internalTransform, voffset, RECTANGLE_LEGACY_VERTEX_COUNT, pointCount, pointsValues, pointOffset);
|
|
46463
46468
|
// Steps
|
|
46464
46469
|
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
46465
|
-
|
|
46466
|
-
copyStep(steps, voffset,
|
|
46470
|
+
buildRectangleLegacyStep(voffset, steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_LEGACY_WORLD_SIZE);
|
|
46471
|
+
copyStep(steps, voffset, RECTANGLE_LEGACY_VERTEX_COUNT, pointCount);
|
|
46467
46472
|
}
|
|
46468
46473
|
// UVs
|
|
46469
46474
|
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
46470
|
-
|
|
46471
|
-
copyUvs(uvs, voffset,
|
|
46475
|
+
buildRectangleLegacyUv(uvs, voffset, textureUvs);
|
|
46476
|
+
copyUvs(uvs, voffset, RECTANGLE_LEGACY_VERTEX_COUNT, pointCount);
|
|
46472
46477
|
}
|
|
46473
46478
|
}
|
|
46474
46479
|
else {
|
|
@@ -46478,23 +46483,23 @@
|
|
|
46478
46483
|
var py = pointsValues[ip + 1] + pointOffset.getY(i);
|
|
46479
46484
|
var pointSizeX = pointSize.getX(i);
|
|
46480
46485
|
var pointSizeY = pointSize.getY(i);
|
|
46481
|
-
var iv = voffset + i *
|
|
46486
|
+
var iv = voffset + i * RECTANGLE_LEGACY_VERTEX_COUNT;
|
|
46482
46487
|
// Vertices
|
|
46483
|
-
|
|
46488
|
+
buildRectangleLegacyVertex(vertices, iv, px, py, pointSizeX, pointSizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_LEGACY_WORLD_SIZE);
|
|
46484
46489
|
// Steps
|
|
46485
46490
|
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
46486
|
-
|
|
46491
|
+
buildRectangleLegacyStep(iv, steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_LEGACY_WORLD_SIZE);
|
|
46487
46492
|
}
|
|
46488
46493
|
// UVs
|
|
46489
46494
|
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
46490
|
-
|
|
46495
|
+
buildRectangleLegacyUv(uvs, iv, textureUvs);
|
|
46491
46496
|
}
|
|
46492
46497
|
}
|
|
46493
46498
|
}
|
|
46494
46499
|
// Fill the rest
|
|
46495
46500
|
var pointCountReserved = this.pointCountReserved;
|
|
46496
|
-
var voffsetReserved = voffset + pointCount *
|
|
46497
|
-
var vcountReserved =
|
|
46501
|
+
var voffsetReserved = voffset + pointCount * RECTANGLE_LEGACY_VERTEX_COUNT;
|
|
46502
|
+
var vcountReserved = RECTANGLE_LEGACY_VERTEX_COUNT * (pointCountReserved - pointCount);
|
|
46498
46503
|
buildNullVertex(vertices, voffsetReserved, vcountReserved);
|
|
46499
46504
|
buildNullStep(steps, voffsetReserved, vcountReserved);
|
|
46500
46505
|
buildNullUv(uvs, voffsetReserved, vcountReserved);
|
|
@@ -47061,14 +47066,14 @@
|
|
|
47061
47066
|
var BuilderMarkerRectangle = /** @class */ (function (_super) {
|
|
47062
47067
|
__extends(BuilderMarkerRectangle, _super);
|
|
47063
47068
|
function BuilderMarkerRectangle(buffer, vertexOffset, indexOffset) {
|
|
47064
|
-
var _this = _super.call(this, buffer, vertexOffset, indexOffset,
|
|
47069
|
+
var _this = _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_LEGACY_VERTEX_COUNT, RECTANGLE_LEGACY_INDEX_COUNT) || this;
|
|
47065
47070
|
_this.pointId = -1;
|
|
47066
47071
|
return _this;
|
|
47067
47072
|
}
|
|
47068
47073
|
BuilderMarkerRectangle.prototype.init = function () {
|
|
47069
47074
|
var buffer = this.buffer;
|
|
47070
47075
|
buffer.updateIndices();
|
|
47071
|
-
|
|
47076
|
+
buildRectangleLegacyIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
47072
47077
|
this.inited |= BuilderFlag.INDEX;
|
|
47073
47078
|
};
|
|
47074
47079
|
BuilderMarkerRectangle.prototype.update = function (shape) {
|
|
@@ -47129,16 +47134,16 @@
|
|
|
47129
47134
|
var internalTransform = ((_a = BuilderMarkerRectangle.WORK) !== null && _a !== void 0 ? _a : (BuilderMarkerRectangle.WORK = new pixi_js.Matrix()));
|
|
47130
47135
|
internalTransform.copyFrom(marker.transform).prepend(shape.transform.internalTransform);
|
|
47131
47136
|
buffer.updateVertices();
|
|
47132
|
-
|
|
47137
|
+
buildRectangleLegacyVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, internalTransform, RECTANGLE_LEGACY_WORLD_SIZE);
|
|
47133
47138
|
// Steps
|
|
47134
47139
|
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
47135
47140
|
buffer.updateSteps();
|
|
47136
|
-
|
|
47141
|
+
buildRectangleLegacyStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_LEGACY_WORLD_SIZE);
|
|
47137
47142
|
}
|
|
47138
47143
|
// UVs
|
|
47139
47144
|
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
47140
47145
|
buffer.updateUvs();
|
|
47141
|
-
|
|
47146
|
+
buildRectangleLegacyUv(buffer.uvs, voffset, toTextureUvs(texture));
|
|
47142
47147
|
}
|
|
47143
47148
|
}
|
|
47144
47149
|
};
|
|
@@ -47335,23 +47340,23 @@
|
|
|
47335
47340
|
* Copyright (C) 2019 Toshiba Corporation
|
|
47336
47341
|
* SPDX-License-Identifier: Apache-2.0
|
|
47337
47342
|
*/
|
|
47338
|
-
var
|
|
47339
|
-
__extends(
|
|
47340
|
-
function
|
|
47341
|
-
return _super.call(this, buffer, vertexOffset, indexOffset,
|
|
47343
|
+
var BuilderRectangleLegacy = /** @class */ (function (_super) {
|
|
47344
|
+
__extends(BuilderRectangleLegacy, _super);
|
|
47345
|
+
function BuilderRectangleLegacy(buffer, vertexOffset, indexOffset) {
|
|
47346
|
+
return _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_LEGACY_VERTEX_COUNT, RECTANGLE_LEGACY_INDEX_COUNT) || this;
|
|
47342
47347
|
}
|
|
47343
|
-
|
|
47348
|
+
BuilderRectangleLegacy.prototype.init = function () {
|
|
47344
47349
|
var buffer = this.buffer;
|
|
47345
47350
|
buffer.updateIndices();
|
|
47346
|
-
|
|
47351
|
+
buildRectangleLegacyIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
47347
47352
|
this.inited |= BuilderFlag.INDEX;
|
|
47348
47353
|
};
|
|
47349
|
-
|
|
47354
|
+
BuilderRectangleLegacy.prototype.update = function (shape) {
|
|
47350
47355
|
var buffer = this.buffer;
|
|
47351
47356
|
this.updateVertexStepAndUv(buffer, shape);
|
|
47352
47357
|
this.updateColor(buffer, shape);
|
|
47353
47358
|
};
|
|
47354
|
-
|
|
47359
|
+
BuilderRectangleLegacy.prototype.updateVertexStepAndUv = function (buffer, shape) {
|
|
47355
47360
|
var size = shape.size;
|
|
47356
47361
|
var sizeX = size.x;
|
|
47357
47362
|
var sizeY = size.y;
|
|
@@ -47386,43 +47391,43 @@
|
|
|
47386
47391
|
// Vertices
|
|
47387
47392
|
var voffset = this.vertexOffset;
|
|
47388
47393
|
buffer.updateVertices();
|
|
47389
|
-
|
|
47394
|
+
buildRectangleLegacyVertex(buffer.vertices, voffset, 0, 0, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, RECTANGLE_LEGACY_WORLD_SIZE);
|
|
47390
47395
|
// Steps
|
|
47391
47396
|
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
47392
47397
|
buffer.updateSteps();
|
|
47393
|
-
|
|
47398
|
+
buildRectangleLegacyStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_LEGACY_WORLD_SIZE);
|
|
47394
47399
|
}
|
|
47395
47400
|
// UVs
|
|
47396
47401
|
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
47397
47402
|
buffer.updateUvs();
|
|
47398
|
-
|
|
47403
|
+
buildRectangleLegacyUv(buffer.uvs, voffset, toTextureUvs(texture));
|
|
47399
47404
|
}
|
|
47400
47405
|
}
|
|
47401
47406
|
};
|
|
47402
|
-
return
|
|
47407
|
+
return BuilderRectangleLegacy;
|
|
47403
47408
|
}(BuilderBase));
|
|
47404
47409
|
|
|
47405
47410
|
/*
|
|
47406
47411
|
* Copyright (C) 2019 Toshiba Corporation
|
|
47407
47412
|
* SPDX-License-Identifier: Apache-2.0
|
|
47408
47413
|
*/
|
|
47409
|
-
var
|
|
47410
|
-
__extends(
|
|
47411
|
-
function
|
|
47412
|
-
return _super.call(this, buffer, vertexOffset, indexOffset,
|
|
47414
|
+
var BuilderRectanglePivoted = /** @class */ (function (_super) {
|
|
47415
|
+
__extends(BuilderRectanglePivoted, _super);
|
|
47416
|
+
function BuilderRectanglePivoted(buffer, vertexOffset, indexOffset) {
|
|
47417
|
+
return _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_LEGACY_VERTEX_COUNT, RECTANGLE_LEGACY_INDEX_COUNT) || this;
|
|
47413
47418
|
}
|
|
47414
|
-
|
|
47419
|
+
BuilderRectanglePivoted.prototype.init = function () {
|
|
47415
47420
|
var buffer = this.buffer;
|
|
47416
47421
|
buffer.updateIndices();
|
|
47417
|
-
|
|
47422
|
+
buildRectangleLegacyIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
47418
47423
|
this.inited |= BuilderFlag.INDEX;
|
|
47419
47424
|
};
|
|
47420
|
-
|
|
47425
|
+
BuilderRectanglePivoted.prototype.update = function (shape) {
|
|
47421
47426
|
var buffer = this.buffer;
|
|
47422
47427
|
this.updateVertexStepAndUv(buffer, shape);
|
|
47423
47428
|
this.updateColor(buffer, shape);
|
|
47424
47429
|
};
|
|
47425
|
-
|
|
47430
|
+
BuilderRectanglePivoted.prototype.updateVertexStepAndUv = function (buffer, shape) {
|
|
47426
47431
|
var size = shape.size;
|
|
47427
47432
|
var sizeX = size.x;
|
|
47428
47433
|
var sizeY = size.y;
|
|
@@ -47457,20 +47462,20 @@
|
|
|
47457
47462
|
// Vertices
|
|
47458
47463
|
var voffset = this.vertexOffset;
|
|
47459
47464
|
buffer.updateVertices();
|
|
47460
|
-
|
|
47465
|
+
buildRectangleLegacyVertex(buffer.vertices, voffset, 0.5 * sizeX, 0.5 * sizeY, sizeX, sizeY, strokeAlign, strokeWidth, shape.transform.internalTransform, RECTANGLE_LEGACY_WORLD_SIZE);
|
|
47461
47466
|
// Steps
|
|
47462
47467
|
if (isNotInited || isVertexChanged || isTransformChanged) {
|
|
47463
47468
|
buffer.updateSteps();
|
|
47464
|
-
|
|
47469
|
+
buildRectangleLegacyStep(voffset, buffer.steps, strokeWidth, strokeSide, strokeStyle, RECTANGLE_LEGACY_WORLD_SIZE);
|
|
47465
47470
|
}
|
|
47466
47471
|
// UVs
|
|
47467
47472
|
if (isNotInited || isVertexChanged || isTextureChanged) {
|
|
47468
47473
|
buffer.updateUvs();
|
|
47469
|
-
|
|
47474
|
+
buildRectangleLegacyUv(buffer.uvs, voffset, toTextureUvs(texture));
|
|
47470
47475
|
}
|
|
47471
47476
|
}
|
|
47472
47477
|
};
|
|
47473
|
-
return
|
|
47478
|
+
return BuilderRectanglePivoted;
|
|
47474
47479
|
}(BuilderBase));
|
|
47475
47480
|
|
|
47476
47481
|
/*
|
|
@@ -47742,6 +47747,834 @@
|
|
|
47742
47747
|
return null;
|
|
47743
47748
|
};
|
|
47744
47749
|
|
|
47750
|
+
/*
|
|
47751
|
+
* Copyright (C) 2019-2026 Toshiba Corporation
|
|
47752
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
47753
|
+
*/
|
|
47754
|
+
var EShapeRectangleTriangulatedImpl = /** @class */ (function () {
|
|
47755
|
+
function EShapeRectangleTriangulatedImpl(parent) {
|
|
47756
|
+
this._id = 0;
|
|
47757
|
+
this._parent = parent;
|
|
47758
|
+
this._width = 0;
|
|
47759
|
+
this._height = 0;
|
|
47760
|
+
this._strokeAlign = 0;
|
|
47761
|
+
this._strokeWidth = 0;
|
|
47762
|
+
this._strokeSide = EShapeStrokeSide.NONE;
|
|
47763
|
+
this._sizeX = 0;
|
|
47764
|
+
this._sizeY = 0;
|
|
47765
|
+
this._vertices = [];
|
|
47766
|
+
this._nvertices = 0;
|
|
47767
|
+
this._distances = [];
|
|
47768
|
+
this._lengths = [];
|
|
47769
|
+
this._clippings = [];
|
|
47770
|
+
this._uvs = [];
|
|
47771
|
+
this._indices = [];
|
|
47772
|
+
this._nindices = 0;
|
|
47773
|
+
this._boundary = [0, 0, 0, 0];
|
|
47774
|
+
}
|
|
47775
|
+
Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "id", {
|
|
47776
|
+
get: function () {
|
|
47777
|
+
this.triangulate();
|
|
47778
|
+
return this._id;
|
|
47779
|
+
},
|
|
47780
|
+
enumerable: false,
|
|
47781
|
+
configurable: true
|
|
47782
|
+
});
|
|
47783
|
+
Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "vertices", {
|
|
47784
|
+
get: function () {
|
|
47785
|
+
this.triangulate();
|
|
47786
|
+
return this._vertices;
|
|
47787
|
+
},
|
|
47788
|
+
enumerable: false,
|
|
47789
|
+
configurable: true
|
|
47790
|
+
});
|
|
47791
|
+
Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "nvertices", {
|
|
47792
|
+
get: function () {
|
|
47793
|
+
this.triangulate();
|
|
47794
|
+
return this._nvertices;
|
|
47795
|
+
},
|
|
47796
|
+
enumerable: false,
|
|
47797
|
+
configurable: true
|
|
47798
|
+
});
|
|
47799
|
+
Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "distances", {
|
|
47800
|
+
get: function () {
|
|
47801
|
+
this.triangulate();
|
|
47802
|
+
return this._distances;
|
|
47803
|
+
},
|
|
47804
|
+
enumerable: false,
|
|
47805
|
+
configurable: true
|
|
47806
|
+
});
|
|
47807
|
+
Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "lengths", {
|
|
47808
|
+
get: function () {
|
|
47809
|
+
this.triangulate();
|
|
47810
|
+
return this._lengths;
|
|
47811
|
+
},
|
|
47812
|
+
enumerable: false,
|
|
47813
|
+
configurable: true
|
|
47814
|
+
});
|
|
47815
|
+
Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "clippings", {
|
|
47816
|
+
get: function () {
|
|
47817
|
+
this.triangulate();
|
|
47818
|
+
return this._clippings;
|
|
47819
|
+
},
|
|
47820
|
+
enumerable: false,
|
|
47821
|
+
configurable: true
|
|
47822
|
+
});
|
|
47823
|
+
Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "uvs", {
|
|
47824
|
+
get: function () {
|
|
47825
|
+
this.triangulate();
|
|
47826
|
+
return this._uvs;
|
|
47827
|
+
},
|
|
47828
|
+
enumerable: false,
|
|
47829
|
+
configurable: true
|
|
47830
|
+
});
|
|
47831
|
+
Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "indices", {
|
|
47832
|
+
get: function () {
|
|
47833
|
+
this.triangulate();
|
|
47834
|
+
return this._indices;
|
|
47835
|
+
},
|
|
47836
|
+
enumerable: false,
|
|
47837
|
+
configurable: true
|
|
47838
|
+
});
|
|
47839
|
+
Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "nindices", {
|
|
47840
|
+
get: function () {
|
|
47841
|
+
this.triangulate();
|
|
47842
|
+
return this._nindices;
|
|
47843
|
+
},
|
|
47844
|
+
enumerable: false,
|
|
47845
|
+
configurable: true
|
|
47846
|
+
});
|
|
47847
|
+
Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "boundary", {
|
|
47848
|
+
get: function () {
|
|
47849
|
+
this.triangulate();
|
|
47850
|
+
return this._boundary;
|
|
47851
|
+
},
|
|
47852
|
+
enumerable: false,
|
|
47853
|
+
configurable: true
|
|
47854
|
+
});
|
|
47855
|
+
EShapeRectangleTriangulatedImpl.prototype.triangulate = function () {
|
|
47856
|
+
var isNotInitialized = this._id === 0;
|
|
47857
|
+
var parent = this._parent;
|
|
47858
|
+
var size = parent.size;
|
|
47859
|
+
var width = size.x;
|
|
47860
|
+
var height = size.y;
|
|
47861
|
+
var isRectChanged = this._width !== width || this._height !== height;
|
|
47862
|
+
var stroke = parent.stroke;
|
|
47863
|
+
var strokeAlign = stroke.align;
|
|
47864
|
+
var strokeWidth = stroke.enable ? stroke.width : 0;
|
|
47865
|
+
var strokeSide = stroke.side;
|
|
47866
|
+
var isStrokeChanged = this._strokeAlign !== strokeAlign ||
|
|
47867
|
+
this._strokeWidth !== strokeWidth ||
|
|
47868
|
+
this._strokeSide !== strokeSide;
|
|
47869
|
+
var isSizeChanged = false;
|
|
47870
|
+
var sizeX = this._sizeX;
|
|
47871
|
+
var sizeY = this._sizeY;
|
|
47872
|
+
if (isRectChanged || isStrokeChanged) {
|
|
47873
|
+
this._width = width;
|
|
47874
|
+
this._height = height;
|
|
47875
|
+
this._strokeAlign = strokeAlign;
|
|
47876
|
+
this._strokeWidth = strokeWidth;
|
|
47877
|
+
this._strokeSide = strokeSide;
|
|
47878
|
+
var s = strokeAlign * strokeWidth;
|
|
47879
|
+
sizeX = width * 0.5 + (0 <= width ? +s : -s);
|
|
47880
|
+
sizeY = height * 0.5 + (0 <= height ? +s : -s);
|
|
47881
|
+
isSizeChanged = this._sizeX !== sizeX || this._sizeY !== sizeY;
|
|
47882
|
+
}
|
|
47883
|
+
if (isNotInitialized || isSizeChanged || isStrokeChanged) {
|
|
47884
|
+
this._sizeX = sizeX;
|
|
47885
|
+
this._sizeY = sizeY;
|
|
47886
|
+
this.update(sizeX, sizeY, 1.1);
|
|
47887
|
+
}
|
|
47888
|
+
};
|
|
47889
|
+
EShapeRectangleTriangulatedImpl.prototype.update = function (sizeX, sizeY, scale) {
|
|
47890
|
+
// Boundary
|
|
47891
|
+
var ax = Math.abs(sizeX);
|
|
47892
|
+
var ay = Math.abs(sizeY);
|
|
47893
|
+
var boundary = this._boundary;
|
|
47894
|
+
boundary[0] = -ax;
|
|
47895
|
+
boundary[1] = -ay;
|
|
47896
|
+
boundary[2] = +ax;
|
|
47897
|
+
boundary[3] = +ay;
|
|
47898
|
+
// # of vertices and # of indices
|
|
47899
|
+
var nv = 14;
|
|
47900
|
+
var ni = 6;
|
|
47901
|
+
this._nvertices = nv;
|
|
47902
|
+
this._nindices = ni;
|
|
47903
|
+
// ID
|
|
47904
|
+
this._id += 1;
|
|
47905
|
+
//
|
|
47906
|
+
if (sizeX === 0 || sizeY === 0) {
|
|
47907
|
+
this.pad(0, 0, nv, ni, 0);
|
|
47908
|
+
}
|
|
47909
|
+
else {
|
|
47910
|
+
var fx = 1 / sizeX;
|
|
47911
|
+
var fy = 1 / sizeY;
|
|
47912
|
+
switch (this._parent.stroke.side) {
|
|
47913
|
+
case EShapeStrokeSide.NONE:
|
|
47914
|
+
this.updateNone(fx, fy, ax, ay, scale, nv, ni);
|
|
47915
|
+
break;
|
|
47916
|
+
case EShapeStrokeSide.ALL:
|
|
47917
|
+
if (ay <= ax) {
|
|
47918
|
+
this.updateAll0(fx, fy, ax, ay, scale, nv, ni);
|
|
47919
|
+
}
|
|
47920
|
+
else {
|
|
47921
|
+
this.updateAll1(fx, fy, ax, ay, scale, nv, ni);
|
|
47922
|
+
}
|
|
47923
|
+
break;
|
|
47924
|
+
case EShapeStrokeSide.TOP:
|
|
47925
|
+
this.updateTop(fx, fy, ax, ay, scale, nv, ni);
|
|
47926
|
+
break;
|
|
47927
|
+
case EShapeStrokeSide.RIGHT:
|
|
47928
|
+
this.updateRight(fx, fy, ax, ay, scale, nv, ni);
|
|
47929
|
+
break;
|
|
47930
|
+
case EShapeStrokeSide.BOTTOM:
|
|
47931
|
+
this.updateBottom(fx, fy, ax, ay, scale, nv, ni);
|
|
47932
|
+
break;
|
|
47933
|
+
case EShapeStrokeSide.LEFT:
|
|
47934
|
+
this.updateLeft(fx, fy, ax, ay, scale, nv, ni);
|
|
47935
|
+
break;
|
|
47936
|
+
case EShapeStrokeSide.TOP_OR_BOTTOM:
|
|
47937
|
+
this.updateTopBottom(fx, fy, ax, ay, scale, nv, ni);
|
|
47938
|
+
break;
|
|
47939
|
+
case EShapeStrokeSide.LEFT_OR_RIGHT:
|
|
47940
|
+
this.updateLeftRight(fx, fy, ax, ay, scale, nv, ni);
|
|
47941
|
+
break;
|
|
47942
|
+
case EShapeStrokeSide.TOP_OR_RIGHT:
|
|
47943
|
+
if (ay <= ax) {
|
|
47944
|
+
this.updateTopRight0(fx, fy, ax, ay, scale, nv, ni);
|
|
47945
|
+
}
|
|
47946
|
+
else {
|
|
47947
|
+
this.updateTopRight1(fx, fy, ax, ay, scale, nv, ni);
|
|
47948
|
+
}
|
|
47949
|
+
break;
|
|
47950
|
+
case EShapeStrokeSide.TOP_OR_LEFT:
|
|
47951
|
+
if (ay <= ax) {
|
|
47952
|
+
this.updateTopLeft0(fx, fy, ax, ay, scale, nv, ni);
|
|
47953
|
+
}
|
|
47954
|
+
else {
|
|
47955
|
+
this.updateTopLeft1(fx, fy, ax, ay, scale, nv, ni);
|
|
47956
|
+
}
|
|
47957
|
+
break;
|
|
47958
|
+
case EShapeStrokeSide.BOTTOM_OR_RIGHT:
|
|
47959
|
+
if (ay <= ax) {
|
|
47960
|
+
this.updateBottomRight0(fx, fy, ax, ay, scale, nv, ni);
|
|
47961
|
+
}
|
|
47962
|
+
else {
|
|
47963
|
+
this.updateBottomRight1(fx, fy, ax, ay, scale, nv, ni);
|
|
47964
|
+
}
|
|
47965
|
+
break;
|
|
47966
|
+
case EShapeStrokeSide.BOTTOM_OR_LEFT:
|
|
47967
|
+
if (ay <= ax) {
|
|
47968
|
+
this.updateBottomLeft0(fx, fy, ax, ay, scale, nv, ni);
|
|
47969
|
+
}
|
|
47970
|
+
else {
|
|
47971
|
+
this.updateBottomLeft1(fx, fy, ax, ay, scale, nv, ni);
|
|
47972
|
+
}
|
|
47973
|
+
break;
|
|
47974
|
+
case EShapeStrokeSide.NOT_TOP:
|
|
47975
|
+
if (2 * ay <= ax) {
|
|
47976
|
+
this.updateNotTop0(fx, fy, ax, ay, scale, nv, ni);
|
|
47977
|
+
}
|
|
47978
|
+
else {
|
|
47979
|
+
this.updateNotTop1(fx, fy, ax, ay, scale, nv, ni);
|
|
47980
|
+
}
|
|
47981
|
+
break;
|
|
47982
|
+
case EShapeStrokeSide.NOT_RIGHT:
|
|
47983
|
+
if (2 * ax <= ay) {
|
|
47984
|
+
this.updateNotRight0(fx, fy, ax, ay, scale, nv, ni);
|
|
47985
|
+
}
|
|
47986
|
+
else {
|
|
47987
|
+
this.updateNotRight1(fx, fy, ax, ay, scale, nv, ni);
|
|
47988
|
+
}
|
|
47989
|
+
break;
|
|
47990
|
+
case EShapeStrokeSide.NOT_BOTTOM:
|
|
47991
|
+
if (2 * ay <= ax) {
|
|
47992
|
+
this.updateNotBottom0(fx, fy, ax, ay, scale, nv, ni);
|
|
47993
|
+
}
|
|
47994
|
+
else {
|
|
47995
|
+
this.updateNotBottom1(fx, fy, ax, ay, scale, nv, ni);
|
|
47996
|
+
}
|
|
47997
|
+
break;
|
|
47998
|
+
case EShapeStrokeSide.NOT_LEFT:
|
|
47999
|
+
if (2 * ax <= ay) {
|
|
48000
|
+
this.updateNotLeft0(fx, fy, ax, ay, scale, nv, ni);
|
|
48001
|
+
}
|
|
48002
|
+
else {
|
|
48003
|
+
this.updateNotLeft1(fx, fy, ax, ay, scale, nv, ni);
|
|
48004
|
+
}
|
|
48005
|
+
break;
|
|
48006
|
+
}
|
|
48007
|
+
}
|
|
48008
|
+
};
|
|
48009
|
+
/**
|
|
48010
|
+
* Fills the unused tail with degenerated triangles and trims the arrays
|
|
48011
|
+
* so that the buffers always hold exactly `nv` vertices and `ni` triangles.
|
|
48012
|
+
*/
|
|
48013
|
+
EShapeRectangleTriangulatedImpl.prototype.pad = function (iv, ii, nv, ni, fd) {
|
|
48014
|
+
var vertices = this._vertices;
|
|
48015
|
+
var distances = this._distances;
|
|
48016
|
+
var lengths = this._lengths;
|
|
48017
|
+
var clippings = this._clippings;
|
|
48018
|
+
var uvs = this._uvs;
|
|
48019
|
+
var indices = this._indices;
|
|
48020
|
+
for (var i = iv; i < nv; ++i) {
|
|
48021
|
+
var i2 = i << 1;
|
|
48022
|
+
vertices[i2] = 0;
|
|
48023
|
+
vertices[i2 + 1] = 0;
|
|
48024
|
+
distances[i] = fd;
|
|
48025
|
+
lengths[i] = 0;
|
|
48026
|
+
clippings[i] = 0;
|
|
48027
|
+
uvs[i2] = 0.5;
|
|
48028
|
+
uvs[i2 + 1] = 0.5;
|
|
48029
|
+
}
|
|
48030
|
+
for (var i = ii, imax = ni * 3; i < imax; ++i) {
|
|
48031
|
+
indices[i] = 0;
|
|
48032
|
+
}
|
|
48033
|
+
var nv2 = nv << 1;
|
|
48034
|
+
vertices.length = nv2;
|
|
48035
|
+
distances.length = nv;
|
|
48036
|
+
lengths.length = nv;
|
|
48037
|
+
clippings.length = nv;
|
|
48038
|
+
uvs.length = nv2;
|
|
48039
|
+
indices.length = ni * 3;
|
|
48040
|
+
};
|
|
48041
|
+
EShapeRectangleTriangulatedImpl.prototype.updateTop = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48042
|
+
var fdistance = 1 / (2 * ay);
|
|
48043
|
+
this.updateCellTop(-ax, -ay - (scale - 1) / fdistance, +ax, +ay, fdistance, scale, fx, fy, ax, ay, 0);
|
|
48044
|
+
this.pad(4, 6, nv, ni, fdistance);
|
|
48045
|
+
};
|
|
48046
|
+
EShapeRectangleTriangulatedImpl.prototype.updateRight = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48047
|
+
var fdistance = 1 / (2 * ax);
|
|
48048
|
+
this.updateCellRight(-ax, -ay, +ax + (scale - 1) / fdistance, +ay, fdistance, scale, fx, fy, ax, ay, 0);
|
|
48049
|
+
this.pad(4, 6, nv, ni, fdistance);
|
|
48050
|
+
};
|
|
48051
|
+
EShapeRectangleTriangulatedImpl.prototype.updateBottom = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48052
|
+
var fdistance = 1 / (2 * ay);
|
|
48053
|
+
this.updateCellBottom(-ax, -ay, +ax, +ay + (scale - 1) / fdistance, fdistance, scale, fx, fy, ax, ay, 0);
|
|
48054
|
+
this.pad(4, 6, nv, ni, fdistance);
|
|
48055
|
+
};
|
|
48056
|
+
EShapeRectangleTriangulatedImpl.prototype.updateLeft = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48057
|
+
var fdistance = 1 / (2 * ax);
|
|
48058
|
+
this.updateCellLeft(-ax - (scale - 1) / fdistance, -ay, +ax, +ay, fdistance, scale, fx, fy, ax, ay, 0);
|
|
48059
|
+
this.pad(4, 6, nv, ni, fdistance);
|
|
48060
|
+
};
|
|
48061
|
+
EShapeRectangleTriangulatedImpl.prototype.updateLeftRight = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48062
|
+
var fdistance = 1 / ax;
|
|
48063
|
+
var shift = (scale - 1) / fdistance;
|
|
48064
|
+
this.updateCellLeft(-ax - shift, -ay, 0, +ay, fdistance, scale, fx, fy, ax, ay, 0);
|
|
48065
|
+
this.updateCellRight(0, -ay, +ax + shift, +ay, fdistance, scale, fx, fy, ax, ay, 4);
|
|
48066
|
+
this.pad(8, 12, nv, ni, fdistance);
|
|
48067
|
+
};
|
|
48068
|
+
EShapeRectangleTriangulatedImpl.prototype.updateTopBottom = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48069
|
+
var fdistance = 1 / ay;
|
|
48070
|
+
var shift = (scale - 1) / fdistance;
|
|
48071
|
+
this.updateCellTop(-ax, -ay - shift, +ax, 0, fdistance, scale, fx, fy, ax, ay, 0);
|
|
48072
|
+
this.updateCellBottom(-ax, 0, +ax, +ay + shift, fdistance, scale, fx, fy, ax, ay, 4);
|
|
48073
|
+
this.pad(8, 12, nv, ni, fdistance);
|
|
48074
|
+
};
|
|
48075
|
+
EShapeRectangleTriangulatedImpl.prototype.updateTopRight0 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48076
|
+
var distance = 2 * ay;
|
|
48077
|
+
var fdistance = 1 / distance;
|
|
48078
|
+
var shift = (scale - 1) * distance;
|
|
48079
|
+
var left = -ax;
|
|
48080
|
+
var right = +ax + shift;
|
|
48081
|
+
var top = -ay - shift;
|
|
48082
|
+
var bottom = +ay;
|
|
48083
|
+
var indices = this._indices;
|
|
48084
|
+
var splitX = ax - 2 * ay;
|
|
48085
|
+
this.updateVertexTop(0, left, top, fdistance, scale, fx, fy, ax, ay);
|
|
48086
|
+
this.updateVertexTop(1, right, top, fdistance, scale, fx, fy, ax, ay);
|
|
48087
|
+
this.updateVertexTop(2, splitX, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48088
|
+
this.updateVertexTop(3, left, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48089
|
+
this.updateVertexRight(4, right, top, fdistance, scale, fx, fy, ax, ay);
|
|
48090
|
+
this.updateVertexRight(5, right, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48091
|
+
this.updateVertexRight(6, splitX, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48092
|
+
indices[0] = 0;
|
|
48093
|
+
indices[1] = 1;
|
|
48094
|
+
indices[2] = 2;
|
|
48095
|
+
indices[3] = 0;
|
|
48096
|
+
indices[4] = 2;
|
|
48097
|
+
indices[5] = 3;
|
|
48098
|
+
indices[6] = 4;
|
|
48099
|
+
indices[7] = 5;
|
|
48100
|
+
indices[8] = 6;
|
|
48101
|
+
this.pad(7, 9, nv, ni, fdistance);
|
|
48102
|
+
};
|
|
48103
|
+
EShapeRectangleTriangulatedImpl.prototype.updateTopRight1 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48104
|
+
var distance = 2 * ax;
|
|
48105
|
+
var fdistance = 1 / distance;
|
|
48106
|
+
var shift = (scale - 1) * distance;
|
|
48107
|
+
var left = -ax;
|
|
48108
|
+
var right = +ax + shift;
|
|
48109
|
+
var top = -ay - shift;
|
|
48110
|
+
var bottom = +ay;
|
|
48111
|
+
var indices = this._indices;
|
|
48112
|
+
var splitY = 2 * ax - ay;
|
|
48113
|
+
this.updateVertexTop(0, left, top, fdistance, scale, fx, fy, ax, ay);
|
|
48114
|
+
this.updateVertexTop(1, right, top, fdistance, scale, fx, fy, ax, ay);
|
|
48115
|
+
this.updateVertexTop(2, left, splitY, fdistance, scale, fx, fy, ax, ay);
|
|
48116
|
+
this.updateVertexRight(3, right, top, fdistance, scale, fx, fy, ax, ay);
|
|
48117
|
+
this.updateVertexRight(4, right, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48118
|
+
this.updateVertexRight(5, left, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48119
|
+
this.updateVertexRight(6, left, splitY, fdistance, scale, fx, fy, ax, ay);
|
|
48120
|
+
indices[0] = 0;
|
|
48121
|
+
indices[1] = 1;
|
|
48122
|
+
indices[2] = 2;
|
|
48123
|
+
indices[3] = 3;
|
|
48124
|
+
indices[4] = 4;
|
|
48125
|
+
indices[5] = 5;
|
|
48126
|
+
indices[6] = 3;
|
|
48127
|
+
indices[7] = 5;
|
|
48128
|
+
indices[8] = 6;
|
|
48129
|
+
this.pad(7, 9, nv, ni, fdistance);
|
|
48130
|
+
};
|
|
48131
|
+
EShapeRectangleTriangulatedImpl.prototype.updateBottomLeft0 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48132
|
+
var distance = 2 * ay;
|
|
48133
|
+
var fdistance = 1 / distance;
|
|
48134
|
+
var shift = (scale - 1) * distance;
|
|
48135
|
+
var left = -ax - shift;
|
|
48136
|
+
var right = +ax;
|
|
48137
|
+
var top = -ay;
|
|
48138
|
+
var bottom = +ay + shift;
|
|
48139
|
+
var splitX = 2 * ay - ax;
|
|
48140
|
+
this.updateQuadBottom(0, 0, right, bottom, left, bottom, splitX, top, right, top, fdistance, scale, fx, fy, ax, ay);
|
|
48141
|
+
this.updateTriLeft(4, 6, left, bottom, left, top, splitX, top, fdistance, scale, fx, fy, ax, ay);
|
|
48142
|
+
this.pad(7, 9, nv, ni, fdistance);
|
|
48143
|
+
};
|
|
48144
|
+
EShapeRectangleTriangulatedImpl.prototype.updateBottomLeft1 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48145
|
+
var distance = 2 * ax;
|
|
48146
|
+
var fdistance = 1 / distance;
|
|
48147
|
+
var shift = (scale - 1) * distance;
|
|
48148
|
+
var left = -ax - shift;
|
|
48149
|
+
var right = +ax;
|
|
48150
|
+
var top = -ay;
|
|
48151
|
+
var bottom = +ay + shift;
|
|
48152
|
+
var splitY = ay - 2 * ax;
|
|
48153
|
+
this.updateTriBottom(0, 0, right, bottom, left, bottom, right, splitY, fdistance, scale, fx, fy, ax, ay);
|
|
48154
|
+
this.updateQuadLeft(3, 3, left, bottom, left, top, right, top, right, splitY, fdistance, scale, fx, fy, ax, ay);
|
|
48155
|
+
this.pad(7, 9, nv, ni, fdistance);
|
|
48156
|
+
};
|
|
48157
|
+
EShapeRectangleTriangulatedImpl.prototype.updateTopLeft0 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48158
|
+
var distance = 2 * ay;
|
|
48159
|
+
var fdistance = 1 / distance;
|
|
48160
|
+
var shift = (scale - 1) * distance;
|
|
48161
|
+
var left = -ax - shift;
|
|
48162
|
+
var right = +ax;
|
|
48163
|
+
var top = -ay - shift;
|
|
48164
|
+
var bottom = +ay;
|
|
48165
|
+
var splitX = 2 * ay - ax;
|
|
48166
|
+
this.updateQuadTop(0, 0, right, top, left, top, splitX, bottom, right, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48167
|
+
this.updateTriLeft(4, 6, left, top, left, bottom, splitX, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48168
|
+
this.pad(7, 9, nv, ni, fdistance);
|
|
48169
|
+
};
|
|
48170
|
+
EShapeRectangleTriangulatedImpl.prototype.updateTopLeft1 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48171
|
+
var distance = 2 * ax;
|
|
48172
|
+
var fdistance = 1 / distance;
|
|
48173
|
+
var shift = (scale - 1) * distance;
|
|
48174
|
+
var left = -ax - shift;
|
|
48175
|
+
var right = +ax;
|
|
48176
|
+
var top = -ay - shift;
|
|
48177
|
+
var bottom = +ay;
|
|
48178
|
+
var splitY = 2 * ax - ay;
|
|
48179
|
+
this.updateTriTop(0, 0, right, top, left, top, right, splitY, fdistance, scale, fx, fy, ax, ay);
|
|
48180
|
+
this.updateQuadLeft(3, 3, left, top, left, bottom, right, bottom, right, splitY, fdistance, scale, fx, fy, ax, ay);
|
|
48181
|
+
this.pad(7, 9, nv, ni, fdistance);
|
|
48182
|
+
};
|
|
48183
|
+
EShapeRectangleTriangulatedImpl.prototype.updateBottomRight0 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48184
|
+
var distance = 2 * ay;
|
|
48185
|
+
var fdistance = 1 / distance;
|
|
48186
|
+
var shift = (scale - 1) * distance;
|
|
48187
|
+
var left = -ax;
|
|
48188
|
+
var right = +ax + shift;
|
|
48189
|
+
var top = -ay;
|
|
48190
|
+
var bottom = +ay + shift;
|
|
48191
|
+
var splitX = ax - 2 * ay;
|
|
48192
|
+
this.updateQuadBottom(0, 0, left, bottom, right, bottom, splitX, top, left, top, fdistance, scale, fx, fy, ax, ay);
|
|
48193
|
+
this.updateTriRight(4, 6, right, bottom, right, top, splitX, top, fdistance, scale, fx, fy, ax, ay);
|
|
48194
|
+
this.pad(7, 9, nv, ni, fdistance);
|
|
48195
|
+
};
|
|
48196
|
+
EShapeRectangleTriangulatedImpl.prototype.updateBottomRight1 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48197
|
+
var distance = 2 * ax;
|
|
48198
|
+
var fdistance = 1 / distance;
|
|
48199
|
+
var shift = (scale - 1) * distance;
|
|
48200
|
+
var left = -ax;
|
|
48201
|
+
var right = +ax + shift;
|
|
48202
|
+
var top = -ay;
|
|
48203
|
+
var bottom = +ay + shift;
|
|
48204
|
+
var splitY = ay - 2 * ax;
|
|
48205
|
+
this.updateTriBottom(0, 0, left, bottom, right, bottom, left, splitY, fdistance, scale, fx, fy, ax, ay);
|
|
48206
|
+
this.updateQuadRight(3, 3, right, bottom, right, top, left, top, left, splitY, fdistance, scale, fx, fy, ax, ay);
|
|
48207
|
+
this.pad(7, 9, nv, ni, fdistance);
|
|
48208
|
+
};
|
|
48209
|
+
EShapeRectangleTriangulatedImpl.prototype.updateNotTop0 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48210
|
+
var distance = 2 * ay;
|
|
48211
|
+
var fdistance = 1 / distance;
|
|
48212
|
+
var shift = (scale - 1) * distance;
|
|
48213
|
+
var left = -ax - shift;
|
|
48214
|
+
var right = +ax + shift;
|
|
48215
|
+
var top = -ay;
|
|
48216
|
+
var bottom = +ay + shift;
|
|
48217
|
+
var splitLeft = 2 * ay - ax;
|
|
48218
|
+
var splitRight = ax - 2 * ay;
|
|
48219
|
+
this.updateTriLeft(0, 0, left, top, splitLeft, top, left, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48220
|
+
this.updateQuadBottom(3, 3, splitLeft, top, splitRight, top, right, bottom, left, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48221
|
+
this.updateTriRight(7, 9, splitRight, top, right, top, right, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48222
|
+
this.pad(10, 12, nv, ni, fdistance);
|
|
48223
|
+
};
|
|
48224
|
+
EShapeRectangleTriangulatedImpl.prototype.updateNotTop1 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48225
|
+
var distance = ax;
|
|
48226
|
+
var fdistance = 1 / distance;
|
|
48227
|
+
var shift = (scale - 1) * distance;
|
|
48228
|
+
var left = -ax - shift;
|
|
48229
|
+
var right = +ax + shift;
|
|
48230
|
+
var top = -ay;
|
|
48231
|
+
var bottom = +ay + shift;
|
|
48232
|
+
var splitY = ay - ax;
|
|
48233
|
+
this.updateQuadLeft(0, 0, left, top, 0, top, 0, splitY, left, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48234
|
+
this.updateQuadRight(4, 6, 0, top, right, top, right, bottom, 0, splitY, fdistance, scale, fx, fy, ax, ay);
|
|
48235
|
+
this.updateTriBottom(8, 12, 0, splitY, right, bottom, left, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48236
|
+
this.pad(11, 15, nv, ni, fdistance);
|
|
48237
|
+
};
|
|
48238
|
+
EShapeRectangleTriangulatedImpl.prototype.updateNotBottom0 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48239
|
+
var distance = 2 * ay;
|
|
48240
|
+
var fdistance = 1 / distance;
|
|
48241
|
+
var shift = (scale - 1) * distance;
|
|
48242
|
+
var left = -ax - shift;
|
|
48243
|
+
var right = +ax + shift;
|
|
48244
|
+
var top = -ay - shift;
|
|
48245
|
+
var bottom = +ay;
|
|
48246
|
+
var splitLeft = 2 * ay - ax;
|
|
48247
|
+
var splitRight = ax - 2 * ay;
|
|
48248
|
+
this.updateTriLeft(0, 0, left, bottom, splitLeft, bottom, left, top, fdistance, scale, fx, fy, ax, ay);
|
|
48249
|
+
this.updateQuadTop(3, 3, splitLeft, bottom, splitRight, bottom, right, top, left, top, fdistance, scale, fx, fy, ax, ay);
|
|
48250
|
+
this.updateTriRight(7, 9, splitRight, bottom, right, bottom, right, top, fdistance, scale, fx, fy, ax, ay);
|
|
48251
|
+
this.pad(10, 12, nv, ni, fdistance);
|
|
48252
|
+
};
|
|
48253
|
+
EShapeRectangleTriangulatedImpl.prototype.updateNotBottom1 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48254
|
+
var distance = ax;
|
|
48255
|
+
var fdistance = 1 / distance;
|
|
48256
|
+
var shift = (scale - 1) * distance;
|
|
48257
|
+
var left = -ax - shift;
|
|
48258
|
+
var right = +ax + shift;
|
|
48259
|
+
var top = -ay - shift;
|
|
48260
|
+
var bottom = +ay;
|
|
48261
|
+
var splitY = ay - ax;
|
|
48262
|
+
this.updateQuadLeft(0, 0, left, bottom, 0, bottom, 0, -splitY, left, top, fdistance, scale, fx, fy, ax, ay);
|
|
48263
|
+
this.updateQuadRight(4, 6, 0, bottom, right, bottom, right, top, 0, -splitY, fdistance, scale, fx, fy, ax, ay);
|
|
48264
|
+
this.updateTriTop(8, 12, 0, -splitY, right, top, left, top, fdistance, scale, fx, fy, ax, ay);
|
|
48265
|
+
this.pad(11, 15, nv, ni, fdistance);
|
|
48266
|
+
};
|
|
48267
|
+
EShapeRectangleTriangulatedImpl.prototype.updateNotLeft0 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48268
|
+
var distance = 2 * ax;
|
|
48269
|
+
var fdistance = 1 / distance;
|
|
48270
|
+
var shift = (scale - 1) * distance;
|
|
48271
|
+
var left = -ax;
|
|
48272
|
+
var right = +ax + shift;
|
|
48273
|
+
var top = -ay - shift;
|
|
48274
|
+
var bottom = +ay + shift;
|
|
48275
|
+
var splitTop = 2 * ax - ay;
|
|
48276
|
+
var splitBottom = ay - 2 * ax;
|
|
48277
|
+
this.updateTriBottom(0, 0, left, bottom, left, splitBottom, right, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48278
|
+
this.updateQuadRight(3, 3, left, splitBottom, left, splitTop, right, top, right, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48279
|
+
this.updateTriTop(7, 9, left, splitTop, left, top, right, top, fdistance, scale, fx, fy, ax, ay);
|
|
48280
|
+
this.pad(10, 12, nv, ni, fdistance);
|
|
48281
|
+
};
|
|
48282
|
+
EShapeRectangleTriangulatedImpl.prototype.updateNotLeft1 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48283
|
+
var distance = ay;
|
|
48284
|
+
var fdistance = 1 / distance;
|
|
48285
|
+
var shift = (scale - 1) * distance;
|
|
48286
|
+
var left = -ax;
|
|
48287
|
+
var right = +ax + shift;
|
|
48288
|
+
var top = -ay - shift;
|
|
48289
|
+
var bottom = +ay + shift;
|
|
48290
|
+
var splitX = ax - ay;
|
|
48291
|
+
this.updateQuadBottom(0, 0, left, bottom, left, 0, splitX, 0, right, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48292
|
+
this.updateQuadTop(4, 6, left, 0, left, top, right, top, splitX, 0, fdistance, scale, fx, fy, ax, ay);
|
|
48293
|
+
this.updateTriRight(8, 12, splitX, 0, right, top, right, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48294
|
+
this.pad(11, 15, nv, ni, fdistance);
|
|
48295
|
+
};
|
|
48296
|
+
EShapeRectangleTriangulatedImpl.prototype.updateNotRight0 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48297
|
+
var distance = 2 * ax;
|
|
48298
|
+
var fdistance = 1 / distance;
|
|
48299
|
+
var shift = (scale - 1) * distance;
|
|
48300
|
+
var left = -ax - shift;
|
|
48301
|
+
var right = +ax;
|
|
48302
|
+
var top = -ay - shift;
|
|
48303
|
+
var bottom = +ay + shift;
|
|
48304
|
+
var stop = 2 * ax - ay;
|
|
48305
|
+
var sbottom = ay - 2 * ax;
|
|
48306
|
+
this.updateTriBottom(0, 0, right, bottom, right, sbottom, left, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48307
|
+
this.updateQuadLeft(3, 3, right, sbottom, right, stop, left, top, left, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48308
|
+
this.updateTriTop(7, 9, right, stop, right, top, left, top, fdistance, scale, fx, fy, ax, ay);
|
|
48309
|
+
this.pad(10, 12, nv, ni, fdistance);
|
|
48310
|
+
};
|
|
48311
|
+
EShapeRectangleTriangulatedImpl.prototype.updateNotRight1 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48312
|
+
var distance = ay;
|
|
48313
|
+
var fdistance = 1 / distance;
|
|
48314
|
+
var shift = (scale - 1) * distance;
|
|
48315
|
+
var left = -ax - shift;
|
|
48316
|
+
var right = +ax;
|
|
48317
|
+
var top = -ay - shift;
|
|
48318
|
+
var bottom = +ay + shift;
|
|
48319
|
+
var splitX = ay - ax;
|
|
48320
|
+
this.updateQuadBottom(0, 0, right, bottom, right, 0, splitX, 0, left, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48321
|
+
this.updateQuadTop(4, 6, right, 0, right, top, left, top, splitX, 0, fdistance, scale, fx, fy, ax, ay);
|
|
48322
|
+
this.updateTriLeft(8, 12, splitX, 0, left, top, left, bottom, fdistance, scale, fx, fy, ax, ay);
|
|
48323
|
+
this.pad(11, 15, nv, ni, fdistance);
|
|
48324
|
+
};
|
|
48325
|
+
EShapeRectangleTriangulatedImpl.prototype.updateTriTop = function (iv, ii, x0, y0, x1, y1, x2, y2, fdistance, scale, fx, fy, ax, ay, reverse) {
|
|
48326
|
+
if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
|
|
48327
|
+
this.updateVertexTop(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
|
|
48328
|
+
this.updateVertexTop(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
|
|
48329
|
+
this.updateVertexTop(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
|
|
48330
|
+
this._indices[ii] = iv;
|
|
48331
|
+
this._indices[ii + 1] = iv + (reverse ? 2 : 1);
|
|
48332
|
+
this._indices[ii + 2] = iv + (reverse ? 1 : 2);
|
|
48333
|
+
};
|
|
48334
|
+
EShapeRectangleTriangulatedImpl.prototype.updateTriRight = function (iv, ii, x0, y0, x1, y1, x2, y2, fdistance, scale, fx, fy, ax, ay, reverse) {
|
|
48335
|
+
if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
|
|
48336
|
+
this.updateVertexRight(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
|
|
48337
|
+
this.updateVertexRight(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
|
|
48338
|
+
this.updateVertexRight(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
|
|
48339
|
+
this._indices[ii] = iv;
|
|
48340
|
+
this._indices[ii + 1] = iv + (reverse ? 2 : 1);
|
|
48341
|
+
this._indices[ii + 2] = iv + (reverse ? 1 : 2);
|
|
48342
|
+
};
|
|
48343
|
+
EShapeRectangleTriangulatedImpl.prototype.updateTriBottom = function (iv, ii, x0, y0, x1, y1, x2, y2, fdistance, scale, fx, fy, ax, ay, reverse) {
|
|
48344
|
+
if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
|
|
48345
|
+
this.updateVertexBottom(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
|
|
48346
|
+
this.updateVertexBottom(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
|
|
48347
|
+
this.updateVertexBottom(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
|
|
48348
|
+
this._indices[ii] = iv;
|
|
48349
|
+
this._indices[ii + 1] = iv + (reverse ? 2 : 1);
|
|
48350
|
+
this._indices[ii + 2] = iv + (reverse ? 1 : 2);
|
|
48351
|
+
};
|
|
48352
|
+
EShapeRectangleTriangulatedImpl.prototype.updateTriLeft = function (iv, ii, x0, y0, x1, y1, x2, y2, fdistance, scale, fx, fy, ax, ay, reverse) {
|
|
48353
|
+
if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
|
|
48354
|
+
this.updateVertexLeft(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
|
|
48355
|
+
this.updateVertexLeft(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
|
|
48356
|
+
this.updateVertexLeft(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
|
|
48357
|
+
this._indices[ii] = iv;
|
|
48358
|
+
this._indices[ii + 1] = iv + (reverse ? 2 : 1);
|
|
48359
|
+
this._indices[ii + 2] = iv + (reverse ? 1 : 2);
|
|
48360
|
+
};
|
|
48361
|
+
EShapeRectangleTriangulatedImpl.prototype.updateQuadTop = function (iv, ii, x0, y0, x1, y1, x2, y2, x3, y3, fdistance, scale, fx, fy, ax, ay, reverse) {
|
|
48362
|
+
if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
|
|
48363
|
+
this.updateVertexTop(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
|
|
48364
|
+
this.updateVertexTop(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
|
|
48365
|
+
this.updateVertexTop(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
|
|
48366
|
+
this.updateVertexTop(iv + 3, x3, y3, fdistance, scale, fx, fy, ax, ay);
|
|
48367
|
+
this._indices[ii] = iv;
|
|
48368
|
+
this._indices[ii + 1] = iv + (reverse ? 2 : 1);
|
|
48369
|
+
this._indices[ii + 2] = iv + (reverse ? 1 : 2);
|
|
48370
|
+
this._indices[ii + 3] = iv;
|
|
48371
|
+
this._indices[ii + 4] = iv + (reverse ? 3 : 2);
|
|
48372
|
+
this._indices[ii + 5] = iv + (reverse ? 2 : 3);
|
|
48373
|
+
};
|
|
48374
|
+
EShapeRectangleTriangulatedImpl.prototype.updateQuadRight = function (iv, ii, x0, y0, x1, y1, x2, y2, x3, y3, fdistance, scale, fx, fy, ax, ay, reverse) {
|
|
48375
|
+
if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
|
|
48376
|
+
this.updateVertexRight(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
|
|
48377
|
+
this.updateVertexRight(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
|
|
48378
|
+
this.updateVertexRight(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
|
|
48379
|
+
this.updateVertexRight(iv + 3, x3, y3, fdistance, scale, fx, fy, ax, ay);
|
|
48380
|
+
this._indices[ii] = iv;
|
|
48381
|
+
this._indices[ii + 1] = iv + (reverse ? 2 : 1);
|
|
48382
|
+
this._indices[ii + 2] = iv + (reverse ? 1 : 2);
|
|
48383
|
+
this._indices[ii + 3] = iv;
|
|
48384
|
+
this._indices[ii + 4] = iv + (reverse ? 3 : 2);
|
|
48385
|
+
this._indices[ii + 5] = iv + (reverse ? 2 : 3);
|
|
48386
|
+
};
|
|
48387
|
+
EShapeRectangleTriangulatedImpl.prototype.updateQuadBottom = function (iv, ii, x0, y0, x1, y1, x2, y2, x3, y3, fdistance, scale, fx, fy, ax, ay, reverse) {
|
|
48388
|
+
if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
|
|
48389
|
+
this.updateVertexBottom(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
|
|
48390
|
+
this.updateVertexBottom(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
|
|
48391
|
+
this.updateVertexBottom(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
|
|
48392
|
+
this.updateVertexBottom(iv + 3, x3, y3, fdistance, scale, fx, fy, ax, ay);
|
|
48393
|
+
this._indices[ii] = iv;
|
|
48394
|
+
this._indices[ii + 1] = iv + (reverse ? 2 : 1);
|
|
48395
|
+
this._indices[ii + 2] = iv + (reverse ? 1 : 2);
|
|
48396
|
+
this._indices[ii + 3] = iv;
|
|
48397
|
+
this._indices[ii + 4] = iv + (reverse ? 3 : 2);
|
|
48398
|
+
this._indices[ii + 5] = iv + (reverse ? 2 : 3);
|
|
48399
|
+
};
|
|
48400
|
+
EShapeRectangleTriangulatedImpl.prototype.updateQuadLeft = function (iv, ii, x0, y0, x1, y1, x2, y2, x3, y3, fdistance, scale, fx, fy, ax, ay, reverse) {
|
|
48401
|
+
if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
|
|
48402
|
+
this.updateVertexLeft(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
|
|
48403
|
+
this.updateVertexLeft(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
|
|
48404
|
+
this.updateVertexLeft(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
|
|
48405
|
+
this.updateVertexLeft(iv + 3, x3, y3, fdistance, scale, fx, fy, ax, ay);
|
|
48406
|
+
this._indices[ii] = iv;
|
|
48407
|
+
this._indices[ii + 1] = iv + (reverse ? 2 : 1);
|
|
48408
|
+
this._indices[ii + 2] = iv + (reverse ? 1 : 2);
|
|
48409
|
+
this._indices[ii + 3] = iv;
|
|
48410
|
+
this._indices[ii + 4] = iv + (reverse ? 3 : 2);
|
|
48411
|
+
this._indices[ii + 5] = iv + (reverse ? 2 : 3);
|
|
48412
|
+
};
|
|
48413
|
+
EShapeRectangleTriangulatedImpl.prototype.updateNone = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48414
|
+
this.updateCellNone(-ax, -ay, +ax, +ay, 0, scale, fx, fy, ax, ay, 0);
|
|
48415
|
+
this.pad(4, 6, nv, ni, 0);
|
|
48416
|
+
};
|
|
48417
|
+
EShapeRectangleTriangulatedImpl.prototype.updateAll0 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48418
|
+
var distance = ay;
|
|
48419
|
+
var fdistance = 1 / distance;
|
|
48420
|
+
var shift = (scale - 1) * distance;
|
|
48421
|
+
var outerLeft = -ax - shift;
|
|
48422
|
+
var outerRight = +ax + shift;
|
|
48423
|
+
var outerTop = -ay - shift;
|
|
48424
|
+
var outerBottom = +ay + shift;
|
|
48425
|
+
var innerLeft = -ax + ay;
|
|
48426
|
+
var innerRight = +ax - ay;
|
|
48427
|
+
this.updateQuadTop(0, 0, outerLeft, outerTop, outerRight, outerTop, innerRight, 0, innerLeft, 0, fdistance, scale, fx, fy, ax, ay);
|
|
48428
|
+
this.updateTriRight(4, 6, outerRight, outerTop, outerRight, outerBottom, innerRight, 0, fdistance, scale, fx, fy, ax, ay);
|
|
48429
|
+
this.updateQuadBottom(7, 9, outerRight, outerBottom, outerLeft, outerBottom, innerLeft, 0, innerRight, 0, fdistance, scale, fx, fy, ax, ay);
|
|
48430
|
+
this.updateTriLeft(11, 15, outerLeft, outerBottom, outerLeft, outerTop, innerLeft, 0, fdistance, scale, fx, fy, ax, ay);
|
|
48431
|
+
this.pad(14, 18, nv, ni, fdistance);
|
|
48432
|
+
};
|
|
48433
|
+
EShapeRectangleTriangulatedImpl.prototype.updateAll1 = function (fx, fy, ax, ay, scale, nv, ni) {
|
|
48434
|
+
var distance = ax;
|
|
48435
|
+
var fdistance = 1 / distance;
|
|
48436
|
+
var shift = (scale - 1) * distance;
|
|
48437
|
+
var outerLeft = -ax - shift;
|
|
48438
|
+
var outerRight = +ax + shift;
|
|
48439
|
+
var outerTop = -ay - shift;
|
|
48440
|
+
var outerBottom = +ay + shift;
|
|
48441
|
+
var innerTop = -ay + ax;
|
|
48442
|
+
var innerBottom = +ay - ax;
|
|
48443
|
+
this.updateTriTop(0, 0, outerLeft, outerTop, outerRight, outerTop, 0, innerTop, fdistance, scale, fx, fy, ax, ay);
|
|
48444
|
+
this.updateQuadRight(3, 3, outerRight, outerTop, outerRight, outerBottom, 0, innerBottom, 0, innerTop, fdistance, scale, fx, fy, ax, ay);
|
|
48445
|
+
this.updateTriBottom(7, 9, outerRight, outerBottom, outerLeft, outerBottom, 0, innerBottom, fdistance, scale, fx, fy, ax, ay);
|
|
48446
|
+
this.updateQuadLeft(10, 12, outerLeft, outerBottom, outerLeft, outerTop, 0, innerTop, 0, innerBottom, fdistance, scale, fx, fy, ax, ay);
|
|
48447
|
+
this.pad(14, 18, nv, ni, fdistance);
|
|
48448
|
+
};
|
|
48449
|
+
EShapeRectangleTriangulatedImpl.prototype.updateCellNone = function (x0, y0, x1, y1, fdistance, scale, fx, fy, ax, ay, iv) {
|
|
48450
|
+
this.updateVertex(iv, x0, y0, 0, 0, 0, fx, fy);
|
|
48451
|
+
this.updateVertex(iv + 1, x1, y0, 0, 0, 0, fx, fy);
|
|
48452
|
+
this.updateVertex(iv + 2, x1, y1, 0, 0, 0, fx, fy);
|
|
48453
|
+
this.updateVertex(iv + 3, x0, y1, 0, 0, 0, fx, fy);
|
|
48454
|
+
var ii = (iv >> 1) * 3;
|
|
48455
|
+
var indices = this._indices;
|
|
48456
|
+
indices[ii++] = iv;
|
|
48457
|
+
indices[ii++] = iv + 1;
|
|
48458
|
+
indices[ii++] = iv + 2;
|
|
48459
|
+
indices[ii++] = iv;
|
|
48460
|
+
indices[ii++] = iv + 2;
|
|
48461
|
+
indices[ii++] = iv + 3;
|
|
48462
|
+
};
|
|
48463
|
+
EShapeRectangleTriangulatedImpl.prototype.updateCellTop = function (x0, y0, x1, y1, fdistance, scale, fx, fy, ax, ay, iv) {
|
|
48464
|
+
this.updateVertexTop(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
|
|
48465
|
+
this.updateVertexTop(iv + 1, x1, y0, fdistance, scale, fx, fy, ax, ay);
|
|
48466
|
+
this.updateVertexTop(iv + 2, x1, y1, fdistance, scale, fx, fy, ax, ay);
|
|
48467
|
+
this.updateVertexTop(iv + 3, x0, y1, fdistance, scale, fx, fy, ax, ay);
|
|
48468
|
+
var ii = (iv >> 1) * 3;
|
|
48469
|
+
var indices = this._indices;
|
|
48470
|
+
indices[ii++] = iv;
|
|
48471
|
+
indices[ii++] = iv + 1;
|
|
48472
|
+
indices[ii++] = iv + 2;
|
|
48473
|
+
indices[ii++] = iv;
|
|
48474
|
+
indices[ii++] = iv + 2;
|
|
48475
|
+
indices[ii++] = iv + 3;
|
|
48476
|
+
};
|
|
48477
|
+
EShapeRectangleTriangulatedImpl.prototype.updateCellRight = function (x0, y0, x1, y1, fdistance, scale, fx, fy, ax, ay, iv) {
|
|
48478
|
+
this.updateVertexRight(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
|
|
48479
|
+
this.updateVertexRight(iv + 1, x1, y0, fdistance, scale, fx, fy, ax, ay);
|
|
48480
|
+
this.updateVertexRight(iv + 2, x1, y1, fdistance, scale, fx, fy, ax, ay);
|
|
48481
|
+
this.updateVertexRight(iv + 3, x0, y1, fdistance, scale, fx, fy, ax, ay);
|
|
48482
|
+
var ii = (iv >> 1) * 3;
|
|
48483
|
+
var indices = this._indices;
|
|
48484
|
+
indices[ii++] = iv;
|
|
48485
|
+
indices[ii++] = iv + 1;
|
|
48486
|
+
indices[ii++] = iv + 2;
|
|
48487
|
+
indices[ii++] = iv;
|
|
48488
|
+
indices[ii++] = iv + 2;
|
|
48489
|
+
indices[ii++] = iv + 3;
|
|
48490
|
+
};
|
|
48491
|
+
EShapeRectangleTriangulatedImpl.prototype.updateCellBottom = function (x0, y0, x1, y1, fdistance, scale, fx, fy, ax, ay, iv) {
|
|
48492
|
+
this.updateVertexBottom(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
|
|
48493
|
+
this.updateVertexBottom(iv + 1, x1, y0, fdistance, scale, fx, fy, ax, ay);
|
|
48494
|
+
this.updateVertexBottom(iv + 2, x1, y1, fdistance, scale, fx, fy, ax, ay);
|
|
48495
|
+
this.updateVertexBottom(iv + 3, x0, y1, fdistance, scale, fx, fy, ax, ay);
|
|
48496
|
+
var ii = (iv >> 1) * 3;
|
|
48497
|
+
var indices = this._indices;
|
|
48498
|
+
indices[ii++] = iv;
|
|
48499
|
+
indices[ii++] = iv + 1;
|
|
48500
|
+
indices[ii++] = iv + 2;
|
|
48501
|
+
indices[ii++] = iv;
|
|
48502
|
+
indices[ii++] = iv + 2;
|
|
48503
|
+
indices[ii++] = iv + 3;
|
|
48504
|
+
};
|
|
48505
|
+
EShapeRectangleTriangulatedImpl.prototype.updateCellLeft = function (x0, y0, x1, y1, fdistance, scale, fx, fy, ax, ay, iv) {
|
|
48506
|
+
this.updateVertexLeft(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
|
|
48507
|
+
this.updateVertexLeft(iv + 1, x1, y0, fdistance, scale, fx, fy, ax, ay);
|
|
48508
|
+
this.updateVertexLeft(iv + 2, x1, y1, fdistance, scale, fx, fy, ax, ay);
|
|
48509
|
+
this.updateVertexLeft(iv + 3, x0, y1, fdistance, scale, fx, fy, ax, ay);
|
|
48510
|
+
var ii = (iv >> 1) * 3;
|
|
48511
|
+
var indices = this._indices;
|
|
48512
|
+
indices[ii++] = iv;
|
|
48513
|
+
indices[ii++] = iv + 1;
|
|
48514
|
+
indices[ii++] = iv + 2;
|
|
48515
|
+
indices[ii++] = iv;
|
|
48516
|
+
indices[ii++] = iv + 2;
|
|
48517
|
+
indices[ii++] = iv + 3;
|
|
48518
|
+
};
|
|
48519
|
+
EShapeRectangleTriangulatedImpl.prototype.updateVertexTop = function (vertex, x, y, fdistance, scale, fx, fy, ax, ay) {
|
|
48520
|
+
this.updateVertex(vertex, x, y, fdistance, x + ax, Math.min(scale, (y + ay) * -fdistance + 1), fx, fy);
|
|
48521
|
+
};
|
|
48522
|
+
EShapeRectangleTriangulatedImpl.prototype.updateVertexRight = function (vertex, x, y, fdistance, scale, fx, fy, ax, ay) {
|
|
48523
|
+
this.updateVertex(vertex, x, y, fdistance, 2 * ax + y + ay, Math.min(scale, (x - ax) * fdistance + 1), fx, fy);
|
|
48524
|
+
};
|
|
48525
|
+
EShapeRectangleTriangulatedImpl.prototype.updateVertexBottom = function (vertex, x, y, fdistance, scale, fx, fy, ax, ay) {
|
|
48526
|
+
this.updateVertex(vertex, x, y, fdistance, 3 * ax + 2 * ay - x, Math.min(scale, (y - ay) * fdistance + 1), fx, fy);
|
|
48527
|
+
};
|
|
48528
|
+
EShapeRectangleTriangulatedImpl.prototype.updateVertexLeft = function (vertex, x, y, fdistance, scale, fx, fy, ax, ay) {
|
|
48529
|
+
this.updateVertex(vertex, x, y, fdistance, 4 * ax + 3 * ay - y, Math.min(scale, (x + ax) * -fdistance + 1), fx, fy);
|
|
48530
|
+
};
|
|
48531
|
+
EShapeRectangleTriangulatedImpl.prototype.updateVertex = function (vertex, x, y, distance, length, clipping, fx, fy) {
|
|
48532
|
+
var vertex2 = vertex << 1;
|
|
48533
|
+
this._vertices[vertex2] = x;
|
|
48534
|
+
this._vertices[vertex2 + 1] = y;
|
|
48535
|
+
this._distances[vertex] = distance;
|
|
48536
|
+
this._lengths[vertex] = length;
|
|
48537
|
+
this._clippings[vertex] = clipping;
|
|
48538
|
+
this._uvs[vertex2] = 0.5 * (x * fx + 1);
|
|
48539
|
+
this._uvs[vertex2 + 1] = 0.5 * (y * fy + 1);
|
|
48540
|
+
};
|
|
48541
|
+
return EShapeRectangleTriangulatedImpl;
|
|
48542
|
+
}());
|
|
48543
|
+
|
|
48544
|
+
/*
|
|
48545
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
48546
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
48547
|
+
*/
|
|
48548
|
+
var EShapeRectangle = /** @class */ (function (_super) {
|
|
48549
|
+
__extends(EShapeRectangle, _super);
|
|
48550
|
+
function EShapeRectangle(type) {
|
|
48551
|
+
if (type === void 0) { type = EShapeType.RECTANGLE; }
|
|
48552
|
+
var _this = _super.call(this, type) || this;
|
|
48553
|
+
_this._triangulated = _this.newTriangulated();
|
|
48554
|
+
return _this;
|
|
48555
|
+
}
|
|
48556
|
+
EShapeRectangle.prototype.newTriangulated = function () {
|
|
48557
|
+
return new EShapeRectangleTriangulatedImpl(this);
|
|
48558
|
+
};
|
|
48559
|
+
Object.defineProperty(EShapeRectangle.prototype, "triangulated", {
|
|
48560
|
+
get: function () {
|
|
48561
|
+
return this._triangulated;
|
|
48562
|
+
},
|
|
48563
|
+
enumerable: false,
|
|
48564
|
+
configurable: true
|
|
48565
|
+
});
|
|
48566
|
+
EShapeRectangle.prototype.clone = function () {
|
|
48567
|
+
return new EShapeRectangle(this.type).copy(this);
|
|
48568
|
+
};
|
|
48569
|
+
EShapeRectangle.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
|
|
48570
|
+
if (_super.prototype.containsAbsBBox.call(this, x, y, ax, ay)) {
|
|
48571
|
+
return hitTestRectangle(this, x, y, ax, ay, sw, ss);
|
|
48572
|
+
}
|
|
48573
|
+
return false;
|
|
48574
|
+
};
|
|
48575
|
+
return EShapeRectangle;
|
|
48576
|
+
}(EShapePrimitive));
|
|
48577
|
+
|
|
47745
48578
|
/*
|
|
47746
48579
|
* Copyright (C) 2019 Toshiba Corporation
|
|
47747
48580
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -47875,7 +48708,7 @@
|
|
|
47875
48708
|
* SPDX-License-Identifier: Apache-2.0
|
|
47876
48709
|
*/
|
|
47877
48710
|
var createLineOfRectanglesUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
47878
|
-
return createLineOfAnyUploaded(buffer, shape, voffset,
|
|
48711
|
+
return createLineOfAnyUploaded(buffer, shape, voffset, RECTANGLE_LEGACY_VERTEX_COUNT, ioffset, RECTANGLE_LEGACY_INDEX_COUNT, antialiasWeight, BuilderLineOfRectangles);
|
|
47879
48712
|
};
|
|
47880
48713
|
|
|
47881
48714
|
/*
|
|
@@ -47907,7 +48740,7 @@
|
|
|
47907
48740
|
case EShapePointsMarkerType.TRIANGLE:
|
|
47908
48741
|
return TRIANGLE_VERTEX_COUNT;
|
|
47909
48742
|
case EShapePointsMarkerType.RECTANGLE:
|
|
47910
|
-
return
|
|
48743
|
+
return RECTANGLE_LEGACY_VERTEX_COUNT;
|
|
47911
48744
|
}
|
|
47912
48745
|
return 0;
|
|
47913
48746
|
};
|
|
@@ -47920,7 +48753,7 @@
|
|
|
47920
48753
|
case EShapePointsMarkerType.TRIANGLE:
|
|
47921
48754
|
return TRIANGLE_INDEX_COUNT;
|
|
47922
48755
|
case EShapePointsMarkerType.RECTANGLE:
|
|
47923
|
-
return
|
|
48756
|
+
return RECTANGLE_LEGACY_INDEX_COUNT;
|
|
47924
48757
|
}
|
|
47925
48758
|
return 0;
|
|
47926
48759
|
};
|
|
@@ -49995,16 +50828,16 @@
|
|
|
49995
50828
|
* Copyright (C) 2019 Toshiba Corporation
|
|
49996
50829
|
* SPDX-License-Identifier: Apache-2.0
|
|
49997
50830
|
*/
|
|
49998
|
-
var
|
|
50831
|
+
var createRectangleLegacyUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
49999
50832
|
var tcount = toTextBufferCount(shape);
|
|
50000
50833
|
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
50001
50834
|
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
50002
|
-
var vcount =
|
|
50003
|
-
var icount =
|
|
50835
|
+
var vcount = RECTANGLE_LEGACY_VERTEX_COUNT + tvcount;
|
|
50836
|
+
var icount = RECTANGLE_LEGACY_INDEX_COUNT + ticount;
|
|
50004
50837
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
50005
50838
|
return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
|
|
50006
|
-
new
|
|
50007
|
-
new BuilderText(buffer, voffset +
|
|
50839
|
+
new BuilderRectangleLegacy(buffer, voffset, ioffset),
|
|
50840
|
+
new BuilderText(buffer, voffset + RECTANGLE_LEGACY_VERTEX_COUNT, ioffset + RECTANGLE_LEGACY_INDEX_COUNT, tvcount, ticount)
|
|
50008
50841
|
]).init(shape);
|
|
50009
50842
|
}
|
|
50010
50843
|
return null;
|
|
@@ -50014,16 +50847,16 @@
|
|
|
50014
50847
|
* Copyright (C) 2019 Toshiba Corporation
|
|
50015
50848
|
* SPDX-License-Identifier: Apache-2.0
|
|
50016
50849
|
*/
|
|
50017
|
-
var
|
|
50850
|
+
var createRectanglePivotedUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
50018
50851
|
var tcount = toTextBufferCount(shape);
|
|
50019
50852
|
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
50020
50853
|
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
50021
|
-
var vcount =
|
|
50022
|
-
var icount =
|
|
50854
|
+
var vcount = RECTANGLE_LEGACY_VERTEX_COUNT + tvcount;
|
|
50855
|
+
var icount = RECTANGLE_LEGACY_INDEX_COUNT + ticount;
|
|
50023
50856
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
50024
50857
|
return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
|
|
50025
|
-
new
|
|
50026
|
-
new BuilderText(buffer, voffset +
|
|
50858
|
+
new BuilderRectanglePivoted(buffer, voffset, ioffset),
|
|
50859
|
+
new BuilderText(buffer, voffset + RECTANGLE_LEGACY_VERTEX_COUNT, ioffset + RECTANGLE_LEGACY_INDEX_COUNT, tvcount, ticount)
|
|
50027
50860
|
]).init(shape);
|
|
50028
50861
|
}
|
|
50029
50862
|
return null;
|
|
@@ -51752,7 +52585,7 @@
|
|
|
51752
52585
|
return false;
|
|
51753
52586
|
};
|
|
51754
52587
|
return EShapeLineOfRectangles;
|
|
51755
|
-
}(
|
|
52588
|
+
}(EShapeRectangleLegacy));
|
|
51756
52589
|
|
|
51757
52590
|
/*
|
|
51758
52591
|
* Copyright (C) 2019 Toshiba Corporation
|
|
@@ -52089,6 +52922,14 @@
|
|
|
52089
52922
|
return shape;
|
|
52090
52923
|
};
|
|
52091
52924
|
|
|
52925
|
+
/*
|
|
52926
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
52927
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
52928
|
+
*/
|
|
52929
|
+
var deserializeRectangleLegacy = function (item, manager, shape) {
|
|
52930
|
+
return deserializeBase(item, manager, shape || new EShapeRectangleLegacy());
|
|
52931
|
+
};
|
|
52932
|
+
|
|
52092
52933
|
/*
|
|
52093
52934
|
* Copyright (C) 2019 Toshiba Corporation
|
|
52094
52935
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -52442,7 +53283,7 @@
|
|
|
52442
53283
|
* SPDX-License-Identifier: Apache-2.0
|
|
52443
53284
|
*/
|
|
52444
53285
|
var loadShapeImage = function () {
|
|
52445
|
-
EShapeUploadeds[EShapeType.IMAGE] =
|
|
53286
|
+
EShapeUploadeds[EShapeType.IMAGE] = createPolygonUploaded;
|
|
52446
53287
|
EShapeDeserializers[EShapeType.IMAGE] = deserializeImage;
|
|
52447
53288
|
};
|
|
52448
53289
|
|
|
@@ -52545,11 +53386,21 @@
|
|
|
52545
53386
|
* SPDX-License-Identifier: Apache-2.0
|
|
52546
53387
|
*/
|
|
52547
53388
|
var loadShapeRectangle = function () {
|
|
52548
|
-
EShapeUploadeds[EShapeType.RECTANGLE] =
|
|
53389
|
+
EShapeUploadeds[EShapeType.RECTANGLE] = createPolygonUploaded;
|
|
52549
53390
|
EShapeDeserializers[EShapeType.RECTANGLE] = deserializeRectangle;
|
|
52550
53391
|
EShapeCapabilities.set(EShapeType.RECTANGLE, EShapeCapability.PRIMITIVE | EShapeCapability.STROKE_SIDE);
|
|
52551
53392
|
};
|
|
52552
53393
|
|
|
53394
|
+
/*
|
|
53395
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
53396
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
53397
|
+
*/
|
|
53398
|
+
var loadShapeRectangleLegacy = function () {
|
|
53399
|
+
EShapeUploadeds[EShapeType.RECTANGLE_LEGACY] = createRectangleLegacyUploaded;
|
|
53400
|
+
EShapeDeserializers[EShapeType.RECTANGLE_LEGACY] = deserializeRectangleLegacy;
|
|
53401
|
+
EShapeCapabilities.set(EShapeType.RECTANGLE_LEGACY, EShapeCapability.PRIMITIVE | EShapeCapability.STROKE_SIDE);
|
|
53402
|
+
};
|
|
53403
|
+
|
|
52553
53404
|
/*
|
|
52554
53405
|
* Copyright (C) 2019 Toshiba Corporation
|
|
52555
53406
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -52618,6 +53469,7 @@
|
|
|
52618
53469
|
loadShapeLine();
|
|
52619
53470
|
loadShapeNull();
|
|
52620
53471
|
loadShapePolygon();
|
|
53472
|
+
loadShapeRectangleLegacy();
|
|
52621
53473
|
loadShapeRectanglePivoted();
|
|
52622
53474
|
loadShapeRectangleRounded();
|
|
52623
53475
|
loadShapeRectangle();
|
|
@@ -84409,6 +85261,8 @@
|
|
|
84409
85261
|
loadShapeLine: loadShapeLine,
|
|
84410
85262
|
loadShapeNull: loadShapeNull,
|
|
84411
85263
|
loadShapePolygon: loadShapePolygon,
|
|
85264
|
+
loadShapeRectangleLegacy: loadShapeRectangleLegacy,
|
|
85265
|
+
loadShapeRectanglePivoted: loadShapeRectanglePivoted,
|
|
84412
85266
|
loadShapeRectangleRounded: loadShapeRectangleRounded,
|
|
84413
85267
|
loadShapeRectangle: loadShapeRectangle,
|
|
84414
85268
|
loadShapeSemicircle: loadShapeSemicircle,
|
|
@@ -84460,6 +85314,13 @@
|
|
|
84460
85314
|
buildPolygonStepX: buildPolygonStepX,
|
|
84461
85315
|
buildPolygonStepY: buildPolygonStepY,
|
|
84462
85316
|
buildPolygonUv: buildPolygonUv,
|
|
85317
|
+
RECTANGLE_LEGACY_VERTEX_COUNT: RECTANGLE_LEGACY_VERTEX_COUNT,
|
|
85318
|
+
RECTANGLE_LEGACY_INDEX_COUNT: RECTANGLE_LEGACY_INDEX_COUNT,
|
|
85319
|
+
RECTANGLE_LEGACY_WORLD_SIZE: RECTANGLE_LEGACY_WORLD_SIZE,
|
|
85320
|
+
buildRectangleLegacyIndex: buildRectangleLegacyIndex,
|
|
85321
|
+
buildRectangleLegacyVertex: buildRectangleLegacyVertex,
|
|
85322
|
+
buildRectangleLegacyStep: buildRectangleLegacyStep,
|
|
85323
|
+
buildRectangleLegacyUv: buildRectangleLegacyUv,
|
|
84463
85324
|
RECTANGLE_ROUNDED_VERTEX_COUNT: RECTANGLE_ROUNDED_VERTEX_COUNT,
|
|
84464
85325
|
RECTANGLE_ROUNDED_INDEX_COUNT: RECTANGLE_ROUNDED_INDEX_COUNT,
|
|
84465
85326
|
RECTANGLE_ROUNDED_WORLD_SIZE: RECTANGLE_ROUNDED_WORLD_SIZE,
|
|
@@ -84467,13 +85328,13 @@
|
|
|
84467
85328
|
buildRectangleRoundedVertex: buildRectangleRoundedVertex,
|
|
84468
85329
|
buildRectangleRoundedStep: buildRectangleRoundedStep,
|
|
84469
85330
|
buildRectangleRoundedUv: buildRectangleRoundedUv,
|
|
84470
|
-
|
|
84471
|
-
|
|
84472
|
-
|
|
84473
|
-
|
|
84474
|
-
|
|
84475
|
-
|
|
84476
|
-
|
|
85331
|
+
buildRectangleIndex: buildRectangleLegacyIndex,
|
|
85332
|
+
buildRectangleStep: buildRectangleLegacyStep,
|
|
85333
|
+
buildRectangleUv: buildRectangleLegacyUv,
|
|
85334
|
+
buildRectangleVertex: buildRectangleLegacyVertex,
|
|
85335
|
+
RECTANGLE_INDEX_COUNT: RECTANGLE_LEGACY_INDEX_COUNT,
|
|
85336
|
+
RECTANGLE_VERTEX_COUNT: RECTANGLE_LEGACY_VERTEX_COUNT,
|
|
85337
|
+
RECTANGLE_WORLD_SIZE: RECTANGLE_LEGACY_WORLD_SIZE,
|
|
84477
85338
|
SEMICIRCLE_VERTEX_COUNT: SEMICIRCLE_VERTEX_COUNT,
|
|
84478
85339
|
SEMICIRCLE_INDEX_COUNT: SEMICIRCLE_INDEX_COUNT,
|
|
84479
85340
|
SEMICIRCLE_WORLD_SIZE: SEMICIRCLE_WORLD_SIZE,
|
|
@@ -84528,9 +85389,10 @@
|
|
|
84528
85389
|
BuilderMarkerTriangle: BuilderMarkerTriangle,
|
|
84529
85390
|
BuilderNull: BuilderNull,
|
|
84530
85391
|
BuilderPolygon: BuilderPolygon,
|
|
85392
|
+
BuilderRectangleLegacy: BuilderRectangleLegacy,
|
|
84531
85393
|
BuilderRectanglePivoted: BuilderRectanglePivoted,
|
|
84532
85394
|
BuilderRectangleRounded: BuilderRectangleRounded,
|
|
84533
|
-
BuilderRectangle:
|
|
85395
|
+
BuilderRectangle: BuilderRectangleLegacy,
|
|
84534
85396
|
BuilderSemicircle: BuilderSemicircle,
|
|
84535
85397
|
BuilderText: BuilderText,
|
|
84536
85398
|
BuilderTriangleRounded: BuilderTriangleRounded,
|
|
@@ -84564,9 +85426,10 @@
|
|
|
84564
85426
|
createNullUploaded: createNullUploaded,
|
|
84565
85427
|
createPolygonUploaded: createPolygonUploaded,
|
|
84566
85428
|
createPolygon: createPolygon,
|
|
85429
|
+
createRectangleLegacyUploaded: createRectangleLegacyUploaded,
|
|
84567
85430
|
createRectanglePivotedUploaded: createRectanglePivotedUploaded,
|
|
84568
85431
|
createRectangleRoundedUploaded: createRectangleRoundedUploaded,
|
|
84569
|
-
createRectangleUploaded:
|
|
85432
|
+
createRectangleUploaded: createRectangleLegacyUploaded,
|
|
84570
85433
|
createSemicircleUploaded: createSemicircleUploaded,
|
|
84571
85434
|
createTriangleRoundedUploaded: createTriangleRoundedUploaded,
|
|
84572
85435
|
createTriangleUploaded: createTriangleUploaded,
|
|
@@ -84596,6 +85459,7 @@
|
|
|
84596
85459
|
deserializeLine: deserializeLine,
|
|
84597
85460
|
deserializeNull: deserializeNull,
|
|
84598
85461
|
deserializePolygon: deserializePolygon,
|
|
85462
|
+
deserializeRectangleLegacy: deserializeRectangleLegacy,
|
|
84599
85463
|
deserializeRectanglePivoted: deserializeRectanglePivoted,
|
|
84600
85464
|
deserializeRectangleRounded: deserializeRectangleRounded,
|
|
84601
85465
|
deserializeRectangle: deserializeRectangle,
|
|
@@ -84661,8 +85525,10 @@
|
|
|
84661
85525
|
EShapePolygonTriangulatedImpl: EShapePolygonTriangulatedImpl,
|
|
84662
85526
|
EShapePolygon: EShapePolygon,
|
|
84663
85527
|
EShapePrimitive: EShapePrimitive,
|
|
85528
|
+
EShapeRectangleLegacy: EShapeRectangleLegacy,
|
|
84664
85529
|
EShapeRectanglePivoted: EShapeRectanglePivoted,
|
|
84665
85530
|
EShapeRectangleRounded: EShapeRectangleRounded,
|
|
85531
|
+
EShapeRectangleTriangulatedImpl: EShapeRectangleTriangulatedImpl,
|
|
84666
85532
|
EShapeRectangle: EShapeRectangle,
|
|
84667
85533
|
EShapeSemicircle: EShapeSemicircle,
|
|
84668
85534
|
EShapeStrokeImpl: EShapeStrokeImpl,
|