@wcardinal/wcardinal-ui 0.465.1 → 0.466.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/types/wcardinal/ui/shape/e-shape-stroke-side.d.ts +6 -0
  2. package/dist/types/wcardinal/ui/shape/e-shape-type.d.ts +1 -0
  3. package/dist/types/wcardinal/ui/shape/load/index.d.ts +2 -0
  4. package/dist/types/wcardinal/ui/shape/load/load-shape-rectangle-legacy.d.ts +1 -0
  5. package/dist/types/wcardinal/ui/shape/variant/build-rectangle-legacy.d.ts +10 -0
  6. package/dist/types/wcardinal/ui/shape/variant/build-rectangle.d.ts +1 -10
  7. package/dist/types/wcardinal/ui/shape/variant/builder-rectangle-legacy.d.ts +9 -0
  8. package/dist/types/wcardinal/ui/shape/variant/builder-rectangle.d.ts +1 -9
  9. package/dist/types/wcardinal/ui/shape/variant/create-rectangle-legacy-uploaded.d.ts +4 -0
  10. package/dist/types/wcardinal/ui/shape/variant/create-rectangle-uploaded.d.ts +1 -4
  11. package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle-legacy.d.ts +4 -0
  12. package/dist/types/wcardinal/ui/shape/variant/e-shape-line-of-rectangles.d.ts +2 -2
  13. package/dist/types/wcardinal/ui/shape/variant/e-shape-rectangle-legacy.d.ts +7 -0
  14. package/dist/types/wcardinal/ui/shape/variant/e-shape-rectangle-pivoted.d.ts +2 -2
  15. package/dist/types/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated-impl.d.ts +85 -0
  16. package/dist/types/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated.d.ts +3 -0
  17. package/dist/types/wcardinal/ui/shape/variant/e-shape-rectangle.d.ts +4 -0
  18. package/dist/types/wcardinal/ui/shape/variant/index.d.ts +7 -0
  19. package/dist/wcardinal/ui/shape/e-shape-stroke-side.js +6 -0
  20. package/dist/wcardinal/ui/shape/e-shape-stroke-side.js.map +1 -1
  21. package/dist/wcardinal/ui/shape/e-shape-type.js +1 -0
  22. package/dist/wcardinal/ui/shape/e-shape-type.js.map +1 -1
  23. package/dist/wcardinal/ui/shape/load/index.js +2 -0
  24. package/dist/wcardinal/ui/shape/load/index.js.map +1 -1
  25. package/dist/wcardinal/ui/shape/load/load-shape-all.js +2 -0
  26. package/dist/wcardinal/ui/shape/load/load-shape-all.js.map +1 -1
  27. package/dist/wcardinal/ui/shape/load/load-shape-image.js +2 -2
  28. package/dist/wcardinal/ui/shape/load/load-shape-image.js.map +1 -1
  29. package/dist/wcardinal/ui/shape/load/load-shape-rectangle-legacy.js +17 -0
  30. package/dist/wcardinal/ui/shape/load/load-shape-rectangle-legacy.js.map +1 -0
  31. package/dist/wcardinal/ui/shape/load/load-shape-rectangle.js +2 -2
  32. package/dist/wcardinal/ui/shape/load/load-shape-rectangle.js.map +1 -1
  33. package/dist/wcardinal/ui/shape/variant/build-polygon.js +1 -1
  34. package/dist/wcardinal/ui/shape/variant/build-polygon.js.map +1 -1
  35. package/dist/wcardinal/ui/shape/variant/build-rectangle-legacy.js +336 -0
  36. package/dist/wcardinal/ui/shape/variant/build-rectangle-legacy.js.map +1 -0
  37. package/dist/wcardinal/ui/shape/variant/build-rectangle.js +5 -338
  38. package/dist/wcardinal/ui/shape/variant/build-rectangle.js.map +1 -1
  39. package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangles.js +16 -16
  40. package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangles.js.map +1 -1
  41. package/dist/wcardinal/ui/shape/variant/builder-marker-rectangle.js +6 -6
  42. package/dist/wcardinal/ui/shape/variant/builder-marker-rectangle.js.map +1 -1
  43. package/dist/wcardinal/ui/shape/variant/builder-rectangle-legacy.js +77 -0
  44. package/dist/wcardinal/ui/shape/variant/builder-rectangle-legacy.js.map +1 -0
  45. package/dist/wcardinal/ui/shape/variant/builder-rectangle-pivoted.js +6 -6
  46. package/dist/wcardinal/ui/shape/variant/builder-rectangle-pivoted.js.map +1 -1
  47. package/dist/wcardinal/ui/shape/variant/builder-rectangle.js +1 -72
  48. package/dist/wcardinal/ui/shape/variant/builder-rectangle.js.map +1 -1
  49. package/dist/wcardinal/ui/shape/variant/create-line-of-rectangles-uploaded.js +2 -2
  50. package/dist/wcardinal/ui/shape/variant/create-line-of-rectangles-uploaded.js.map +1 -1
  51. package/dist/wcardinal/ui/shape/variant/create-line-uploaded.js +3 -3
  52. package/dist/wcardinal/ui/shape/variant/create-line-uploaded.js.map +1 -1
  53. package/dist/wcardinal/ui/shape/variant/create-rectangle-legacy-uploaded.js +24 -0
  54. package/dist/wcardinal/ui/shape/variant/create-rectangle-legacy-uploaded.js.map +1 -0
  55. package/dist/wcardinal/ui/shape/variant/create-rectangle-pivoted-uploaded.js +4 -4
  56. package/dist/wcardinal/ui/shape/variant/create-rectangle-pivoted-uploaded.js.map +1 -1
  57. package/dist/wcardinal/ui/shape/variant/create-rectangle-uploaded.js +1 -19
  58. package/dist/wcardinal/ui/shape/variant/create-rectangle-uploaded.js.map +1 -1
  59. package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-legacy.js +10 -0
  60. package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-legacy.js.map +1 -0
  61. package/dist/wcardinal/ui/shape/variant/e-shape-line-of-rectangles.js +2 -2
  62. package/dist/wcardinal/ui/shape/variant/e-shape-line-of-rectangles.js.map +1 -1
  63. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-legacy.js +27 -0
  64. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-legacy.js.map +1 -0
  65. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-pivoted.js +2 -2
  66. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-pivoted.js.map +1 -1
  67. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated-impl.js +796 -0
  68. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated-impl.js.map +1 -0
  69. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated.js +6 -0
  70. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-triangulated.js.map +1 -0
  71. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle.js +14 -1
  72. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle.js.map +1 -1
  73. package/dist/wcardinal/ui/shape/variant/index.js +7 -0
  74. package/dist/wcardinal/ui/shape/variant/index.js.map +1 -1
  75. package/dist/wcardinal-ui-theme-dark-en-us.js +1 -1
  76. package/dist/wcardinal-ui-theme-dark-en-us.min.js +1 -1
  77. package/dist/wcardinal-ui-theme-dark-ja-jp.js +1 -1
  78. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +1 -1
  79. package/dist/wcardinal-ui-theme-dark.js +1 -1
  80. package/dist/wcardinal-ui-theme-dark.min.js +1 -1
  81. package/dist/wcardinal-ui-theme-white-en-us.js +1 -1
  82. package/dist/wcardinal-ui-theme-white-en-us.min.js +1 -1
  83. package/dist/wcardinal-ui-theme-white-ja-jp.js +1 -1
  84. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +1 -1
  85. package/dist/wcardinal-ui-theme-white.js +1 -1
  86. package/dist/wcardinal-ui-theme-white.min.js +1 -1
  87. package/dist/wcardinal-ui.cjs.js +967 -101
  88. package/dist/wcardinal-ui.js +967 -101
  89. package/dist/wcardinal-ui.min.js +2 -2
  90. package/dist/wcardinal-ui.min.js.map +1 -1
  91. package/package.json +1 -1
@@ -0,0 +1,796 @@
1
+ /*
2
+ * Copyright (C) 2019-2026 Toshiba Corporation
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { EShapeStrokeSide } from "../e-shape-stroke-side";
6
+ var EShapeRectangleTriangulatedImpl = /** @class */ (function () {
7
+ function EShapeRectangleTriangulatedImpl(parent) {
8
+ this._id = 0;
9
+ this._parent = parent;
10
+ this._width = 0;
11
+ this._height = 0;
12
+ this._strokeAlign = 0;
13
+ this._strokeWidth = 0;
14
+ this._strokeSide = EShapeStrokeSide.NONE;
15
+ this._sizeX = 0;
16
+ this._sizeY = 0;
17
+ this._vertices = [];
18
+ this._nvertices = 0;
19
+ this._distances = [];
20
+ this._lengths = [];
21
+ this._clippings = [];
22
+ this._uvs = [];
23
+ this._indices = [];
24
+ this._nindices = 0;
25
+ this._boundary = [0, 0, 0, 0];
26
+ }
27
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "id", {
28
+ get: function () {
29
+ this.triangulate();
30
+ return this._id;
31
+ },
32
+ enumerable: false,
33
+ configurable: true
34
+ });
35
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "vertices", {
36
+ get: function () {
37
+ this.triangulate();
38
+ return this._vertices;
39
+ },
40
+ enumerable: false,
41
+ configurable: true
42
+ });
43
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "nvertices", {
44
+ get: function () {
45
+ this.triangulate();
46
+ return this._nvertices;
47
+ },
48
+ enumerable: false,
49
+ configurable: true
50
+ });
51
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "distances", {
52
+ get: function () {
53
+ this.triangulate();
54
+ return this._distances;
55
+ },
56
+ enumerable: false,
57
+ configurable: true
58
+ });
59
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "lengths", {
60
+ get: function () {
61
+ this.triangulate();
62
+ return this._lengths;
63
+ },
64
+ enumerable: false,
65
+ configurable: true
66
+ });
67
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "clippings", {
68
+ get: function () {
69
+ this.triangulate();
70
+ return this._clippings;
71
+ },
72
+ enumerable: false,
73
+ configurable: true
74
+ });
75
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "uvs", {
76
+ get: function () {
77
+ this.triangulate();
78
+ return this._uvs;
79
+ },
80
+ enumerable: false,
81
+ configurable: true
82
+ });
83
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "indices", {
84
+ get: function () {
85
+ this.triangulate();
86
+ return this._indices;
87
+ },
88
+ enumerable: false,
89
+ configurable: true
90
+ });
91
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "nindices", {
92
+ get: function () {
93
+ this.triangulate();
94
+ return this._nindices;
95
+ },
96
+ enumerable: false,
97
+ configurable: true
98
+ });
99
+ Object.defineProperty(EShapeRectangleTriangulatedImpl.prototype, "boundary", {
100
+ get: function () {
101
+ this.triangulate();
102
+ return this._boundary;
103
+ },
104
+ enumerable: false,
105
+ configurable: true
106
+ });
107
+ EShapeRectangleTriangulatedImpl.prototype.triangulate = function () {
108
+ var isNotInitialized = this._id === 0;
109
+ var parent = this._parent;
110
+ var size = parent.size;
111
+ var width = size.x;
112
+ var height = size.y;
113
+ var isRectChanged = this._width !== width || this._height !== height;
114
+ var stroke = parent.stroke;
115
+ var strokeAlign = stroke.align;
116
+ var strokeWidth = stroke.enable ? stroke.width : 0;
117
+ var strokeSide = stroke.side;
118
+ var isStrokeChanged = this._strokeAlign !== strokeAlign ||
119
+ this._strokeWidth !== strokeWidth ||
120
+ this._strokeSide !== strokeSide;
121
+ var isSizeChanged = false;
122
+ var sizeX = this._sizeX;
123
+ var sizeY = this._sizeY;
124
+ if (isRectChanged || isStrokeChanged) {
125
+ this._width = width;
126
+ this._height = height;
127
+ this._strokeAlign = strokeAlign;
128
+ this._strokeWidth = strokeWidth;
129
+ this._strokeSide = strokeSide;
130
+ var s = strokeAlign * strokeWidth;
131
+ sizeX = width * 0.5 + (0 <= width ? +s : -s);
132
+ sizeY = height * 0.5 + (0 <= height ? +s : -s);
133
+ isSizeChanged = this._sizeX !== sizeX || this._sizeY !== sizeY;
134
+ }
135
+ if (isNotInitialized || isSizeChanged || isStrokeChanged) {
136
+ this._sizeX = sizeX;
137
+ this._sizeY = sizeY;
138
+ this.update(sizeX, sizeY, 1.1);
139
+ }
140
+ };
141
+ EShapeRectangleTriangulatedImpl.prototype.update = function (sizeX, sizeY, scale) {
142
+ // Boundary
143
+ var ax = Math.abs(sizeX);
144
+ var ay = Math.abs(sizeY);
145
+ var boundary = this._boundary;
146
+ boundary[0] = -ax;
147
+ boundary[1] = -ay;
148
+ boundary[2] = +ax;
149
+ boundary[3] = +ay;
150
+ // # of vertices and # of indices
151
+ var nv = 14;
152
+ var ni = 6;
153
+ this._nvertices = nv;
154
+ this._nindices = ni;
155
+ // ID
156
+ this._id += 1;
157
+ //
158
+ if (sizeX === 0 || sizeY === 0) {
159
+ this.pad(0, 0, nv, ni, 0);
160
+ }
161
+ else {
162
+ var fx = 1 / sizeX;
163
+ var fy = 1 / sizeY;
164
+ switch (this._parent.stroke.side) {
165
+ case EShapeStrokeSide.NONE:
166
+ this.updateNone(fx, fy, ax, ay, scale, nv, ni);
167
+ break;
168
+ case EShapeStrokeSide.ALL:
169
+ if (ay <= ax) {
170
+ this.updateAll0(fx, fy, ax, ay, scale, nv, ni);
171
+ }
172
+ else {
173
+ this.updateAll1(fx, fy, ax, ay, scale, nv, ni);
174
+ }
175
+ break;
176
+ case EShapeStrokeSide.TOP:
177
+ this.updateTop(fx, fy, ax, ay, scale, nv, ni);
178
+ break;
179
+ case EShapeStrokeSide.RIGHT:
180
+ this.updateRight(fx, fy, ax, ay, scale, nv, ni);
181
+ break;
182
+ case EShapeStrokeSide.BOTTOM:
183
+ this.updateBottom(fx, fy, ax, ay, scale, nv, ni);
184
+ break;
185
+ case EShapeStrokeSide.LEFT:
186
+ this.updateLeft(fx, fy, ax, ay, scale, nv, ni);
187
+ break;
188
+ case EShapeStrokeSide.TOP_OR_BOTTOM:
189
+ this.updateTopBottom(fx, fy, ax, ay, scale, nv, ni);
190
+ break;
191
+ case EShapeStrokeSide.LEFT_OR_RIGHT:
192
+ this.updateLeftRight(fx, fy, ax, ay, scale, nv, ni);
193
+ break;
194
+ case EShapeStrokeSide.TOP_OR_RIGHT:
195
+ if (ay <= ax) {
196
+ this.updateTopRight0(fx, fy, ax, ay, scale, nv, ni);
197
+ }
198
+ else {
199
+ this.updateTopRight1(fx, fy, ax, ay, scale, nv, ni);
200
+ }
201
+ break;
202
+ case EShapeStrokeSide.TOP_OR_LEFT:
203
+ if (ay <= ax) {
204
+ this.updateTopLeft0(fx, fy, ax, ay, scale, nv, ni);
205
+ }
206
+ else {
207
+ this.updateTopLeft1(fx, fy, ax, ay, scale, nv, ni);
208
+ }
209
+ break;
210
+ case EShapeStrokeSide.BOTTOM_OR_RIGHT:
211
+ if (ay <= ax) {
212
+ this.updateBottomRight0(fx, fy, ax, ay, scale, nv, ni);
213
+ }
214
+ else {
215
+ this.updateBottomRight1(fx, fy, ax, ay, scale, nv, ni);
216
+ }
217
+ break;
218
+ case EShapeStrokeSide.BOTTOM_OR_LEFT:
219
+ if (ay <= ax) {
220
+ this.updateBottomLeft0(fx, fy, ax, ay, scale, nv, ni);
221
+ }
222
+ else {
223
+ this.updateBottomLeft1(fx, fy, ax, ay, scale, nv, ni);
224
+ }
225
+ break;
226
+ case EShapeStrokeSide.NOT_TOP:
227
+ if (2 * ay <= ax) {
228
+ this.updateNotTop0(fx, fy, ax, ay, scale, nv, ni);
229
+ }
230
+ else {
231
+ this.updateNotTop1(fx, fy, ax, ay, scale, nv, ni);
232
+ }
233
+ break;
234
+ case EShapeStrokeSide.NOT_RIGHT:
235
+ if (2 * ax <= ay) {
236
+ this.updateNotRight0(fx, fy, ax, ay, scale, nv, ni);
237
+ }
238
+ else {
239
+ this.updateNotRight1(fx, fy, ax, ay, scale, nv, ni);
240
+ }
241
+ break;
242
+ case EShapeStrokeSide.NOT_BOTTOM:
243
+ if (2 * ay <= ax) {
244
+ this.updateNotBottom0(fx, fy, ax, ay, scale, nv, ni);
245
+ }
246
+ else {
247
+ this.updateNotBottom1(fx, fy, ax, ay, scale, nv, ni);
248
+ }
249
+ break;
250
+ case EShapeStrokeSide.NOT_LEFT:
251
+ if (2 * ax <= ay) {
252
+ this.updateNotLeft0(fx, fy, ax, ay, scale, nv, ni);
253
+ }
254
+ else {
255
+ this.updateNotLeft1(fx, fy, ax, ay, scale, nv, ni);
256
+ }
257
+ break;
258
+ }
259
+ }
260
+ };
261
+ /**
262
+ * Fills the unused tail with degenerated triangles and trims the arrays
263
+ * so that the buffers always hold exactly `nv` vertices and `ni` triangles.
264
+ */
265
+ EShapeRectangleTriangulatedImpl.prototype.pad = function (iv, ii, nv, ni, fd) {
266
+ var vertices = this._vertices;
267
+ var distances = this._distances;
268
+ var lengths = this._lengths;
269
+ var clippings = this._clippings;
270
+ var uvs = this._uvs;
271
+ var indices = this._indices;
272
+ for (var i = iv; i < nv; ++i) {
273
+ var i2 = i << 1;
274
+ vertices[i2] = 0;
275
+ vertices[i2 + 1] = 0;
276
+ distances[i] = fd;
277
+ lengths[i] = 0;
278
+ clippings[i] = 0;
279
+ uvs[i2] = 0.5;
280
+ uvs[i2 + 1] = 0.5;
281
+ }
282
+ for (var i = ii, imax = ni * 3; i < imax; ++i) {
283
+ indices[i] = 0;
284
+ }
285
+ var nv2 = nv << 1;
286
+ vertices.length = nv2;
287
+ distances.length = nv;
288
+ lengths.length = nv;
289
+ clippings.length = nv;
290
+ uvs.length = nv2;
291
+ indices.length = ni * 3;
292
+ };
293
+ EShapeRectangleTriangulatedImpl.prototype.updateTop = function (fx, fy, ax, ay, scale, nv, ni) {
294
+ var fdistance = 1 / (2 * ay);
295
+ this.updateCellTop(-ax, -ay - (scale - 1) / fdistance, +ax, +ay, fdistance, scale, fx, fy, ax, ay, 0);
296
+ this.pad(4, 6, nv, ni, fdistance);
297
+ };
298
+ EShapeRectangleTriangulatedImpl.prototype.updateRight = function (fx, fy, ax, ay, scale, nv, ni) {
299
+ var fdistance = 1 / (2 * ax);
300
+ this.updateCellRight(-ax, -ay, +ax + (scale - 1) / fdistance, +ay, fdistance, scale, fx, fy, ax, ay, 0);
301
+ this.pad(4, 6, nv, ni, fdistance);
302
+ };
303
+ EShapeRectangleTriangulatedImpl.prototype.updateBottom = function (fx, fy, ax, ay, scale, nv, ni) {
304
+ var fdistance = 1 / (2 * ay);
305
+ this.updateCellBottom(-ax, -ay, +ax, +ay + (scale - 1) / fdistance, fdistance, scale, fx, fy, ax, ay, 0);
306
+ this.pad(4, 6, nv, ni, fdistance);
307
+ };
308
+ EShapeRectangleTriangulatedImpl.prototype.updateLeft = function (fx, fy, ax, ay, scale, nv, ni) {
309
+ var fdistance = 1 / (2 * ax);
310
+ this.updateCellLeft(-ax - (scale - 1) / fdistance, -ay, +ax, +ay, fdistance, scale, fx, fy, ax, ay, 0);
311
+ this.pad(4, 6, nv, ni, fdistance);
312
+ };
313
+ EShapeRectangleTriangulatedImpl.prototype.updateLeftRight = function (fx, fy, ax, ay, scale, nv, ni) {
314
+ var fdistance = 1 / ax;
315
+ var shift = (scale - 1) / fdistance;
316
+ this.updateCellLeft(-ax - shift, -ay, 0, +ay, fdistance, scale, fx, fy, ax, ay, 0);
317
+ this.updateCellRight(0, -ay, +ax + shift, +ay, fdistance, scale, fx, fy, ax, ay, 4);
318
+ this.pad(8, 12, nv, ni, fdistance);
319
+ };
320
+ EShapeRectangleTriangulatedImpl.prototype.updateTopBottom = function (fx, fy, ax, ay, scale, nv, ni) {
321
+ var fdistance = 1 / ay;
322
+ var shift = (scale - 1) / fdistance;
323
+ this.updateCellTop(-ax, -ay - shift, +ax, 0, fdistance, scale, fx, fy, ax, ay, 0);
324
+ this.updateCellBottom(-ax, 0, +ax, +ay + shift, fdistance, scale, fx, fy, ax, ay, 4);
325
+ this.pad(8, 12, nv, ni, fdistance);
326
+ };
327
+ EShapeRectangleTriangulatedImpl.prototype.updateTopRight0 = function (fx, fy, ax, ay, scale, nv, ni) {
328
+ var distance = 2 * ay;
329
+ var fdistance = 1 / distance;
330
+ var shift = (scale - 1) * distance;
331
+ var left = -ax;
332
+ var right = +ax + shift;
333
+ var top = -ay - shift;
334
+ var bottom = +ay;
335
+ var indices = this._indices;
336
+ var splitX = ax - 2 * ay;
337
+ this.updateVertexTop(0, left, top, fdistance, scale, fx, fy, ax, ay);
338
+ this.updateVertexTop(1, right, top, fdistance, scale, fx, fy, ax, ay);
339
+ this.updateVertexTop(2, splitX, bottom, fdistance, scale, fx, fy, ax, ay);
340
+ this.updateVertexTop(3, left, bottom, fdistance, scale, fx, fy, ax, ay);
341
+ this.updateVertexRight(4, right, top, fdistance, scale, fx, fy, ax, ay);
342
+ this.updateVertexRight(5, right, bottom, fdistance, scale, fx, fy, ax, ay);
343
+ this.updateVertexRight(6, splitX, bottom, fdistance, scale, fx, fy, ax, ay);
344
+ indices[0] = 0;
345
+ indices[1] = 1;
346
+ indices[2] = 2;
347
+ indices[3] = 0;
348
+ indices[4] = 2;
349
+ indices[5] = 3;
350
+ indices[6] = 4;
351
+ indices[7] = 5;
352
+ indices[8] = 6;
353
+ this.pad(7, 9, nv, ni, fdistance);
354
+ };
355
+ EShapeRectangleTriangulatedImpl.prototype.updateTopRight1 = function (fx, fy, ax, ay, scale, nv, ni) {
356
+ var distance = 2 * ax;
357
+ var fdistance = 1 / distance;
358
+ var shift = (scale - 1) * distance;
359
+ var left = -ax;
360
+ var right = +ax + shift;
361
+ var top = -ay - shift;
362
+ var bottom = +ay;
363
+ var indices = this._indices;
364
+ var splitY = 2 * ax - ay;
365
+ this.updateVertexTop(0, left, top, fdistance, scale, fx, fy, ax, ay);
366
+ this.updateVertexTop(1, right, top, fdistance, scale, fx, fy, ax, ay);
367
+ this.updateVertexTop(2, left, splitY, fdistance, scale, fx, fy, ax, ay);
368
+ this.updateVertexRight(3, right, top, fdistance, scale, fx, fy, ax, ay);
369
+ this.updateVertexRight(4, right, bottom, fdistance, scale, fx, fy, ax, ay);
370
+ this.updateVertexRight(5, left, bottom, fdistance, scale, fx, fy, ax, ay);
371
+ this.updateVertexRight(6, left, splitY, fdistance, scale, fx, fy, ax, ay);
372
+ indices[0] = 0;
373
+ indices[1] = 1;
374
+ indices[2] = 2;
375
+ indices[3] = 3;
376
+ indices[4] = 4;
377
+ indices[5] = 5;
378
+ indices[6] = 3;
379
+ indices[7] = 5;
380
+ indices[8] = 6;
381
+ this.pad(7, 9, nv, ni, fdistance);
382
+ };
383
+ EShapeRectangleTriangulatedImpl.prototype.updateBottomLeft0 = function (fx, fy, ax, ay, scale, nv, ni) {
384
+ var distance = 2 * ay;
385
+ var fdistance = 1 / distance;
386
+ var shift = (scale - 1) * distance;
387
+ var left = -ax - shift;
388
+ var right = +ax;
389
+ var top = -ay;
390
+ var bottom = +ay + shift;
391
+ var splitX = 2 * ay - ax;
392
+ this.updateQuadBottom(0, 0, right, bottom, left, bottom, splitX, top, right, top, fdistance, scale, fx, fy, ax, ay);
393
+ this.updateTriLeft(4, 6, left, bottom, left, top, splitX, top, fdistance, scale, fx, fy, ax, ay);
394
+ this.pad(7, 9, nv, ni, fdistance);
395
+ };
396
+ EShapeRectangleTriangulatedImpl.prototype.updateBottomLeft1 = function (fx, fy, ax, ay, scale, nv, ni) {
397
+ var distance = 2 * ax;
398
+ var fdistance = 1 / distance;
399
+ var shift = (scale - 1) * distance;
400
+ var left = -ax - shift;
401
+ var right = +ax;
402
+ var top = -ay;
403
+ var bottom = +ay + shift;
404
+ var splitY = ay - 2 * ax;
405
+ this.updateTriBottom(0, 0, right, bottom, left, bottom, right, splitY, fdistance, scale, fx, fy, ax, ay);
406
+ this.updateQuadLeft(3, 3, left, bottom, left, top, right, top, right, splitY, fdistance, scale, fx, fy, ax, ay);
407
+ this.pad(7, 9, nv, ni, fdistance);
408
+ };
409
+ EShapeRectangleTriangulatedImpl.prototype.updateTopLeft0 = function (fx, fy, ax, ay, scale, nv, ni) {
410
+ var distance = 2 * ay;
411
+ var fdistance = 1 / distance;
412
+ var shift = (scale - 1) * distance;
413
+ var left = -ax - shift;
414
+ var right = +ax;
415
+ var top = -ay - shift;
416
+ var bottom = +ay;
417
+ var splitX = 2 * ay - ax;
418
+ this.updateQuadTop(0, 0, right, top, left, top, splitX, bottom, right, bottom, fdistance, scale, fx, fy, ax, ay);
419
+ this.updateTriLeft(4, 6, left, top, left, bottom, splitX, bottom, fdistance, scale, fx, fy, ax, ay);
420
+ this.pad(7, 9, nv, ni, fdistance);
421
+ };
422
+ EShapeRectangleTriangulatedImpl.prototype.updateTopLeft1 = function (fx, fy, ax, ay, scale, nv, ni) {
423
+ var distance = 2 * ax;
424
+ var fdistance = 1 / distance;
425
+ var shift = (scale - 1) * distance;
426
+ var left = -ax - shift;
427
+ var right = +ax;
428
+ var top = -ay - shift;
429
+ var bottom = +ay;
430
+ var splitY = 2 * ax - ay;
431
+ this.updateTriTop(0, 0, right, top, left, top, right, splitY, fdistance, scale, fx, fy, ax, ay);
432
+ this.updateQuadLeft(3, 3, left, top, left, bottom, right, bottom, right, splitY, fdistance, scale, fx, fy, ax, ay);
433
+ this.pad(7, 9, nv, ni, fdistance);
434
+ };
435
+ EShapeRectangleTriangulatedImpl.prototype.updateBottomRight0 = function (fx, fy, ax, ay, scale, nv, ni) {
436
+ var distance = 2 * ay;
437
+ var fdistance = 1 / distance;
438
+ var shift = (scale - 1) * distance;
439
+ var left = -ax;
440
+ var right = +ax + shift;
441
+ var top = -ay;
442
+ var bottom = +ay + shift;
443
+ var splitX = ax - 2 * ay;
444
+ this.updateQuadBottom(0, 0, left, bottom, right, bottom, splitX, top, left, top, fdistance, scale, fx, fy, ax, ay);
445
+ this.updateTriRight(4, 6, right, bottom, right, top, splitX, top, fdistance, scale, fx, fy, ax, ay);
446
+ this.pad(7, 9, nv, ni, fdistance);
447
+ };
448
+ EShapeRectangleTriangulatedImpl.prototype.updateBottomRight1 = function (fx, fy, ax, ay, scale, nv, ni) {
449
+ var distance = 2 * ax;
450
+ var fdistance = 1 / distance;
451
+ var shift = (scale - 1) * distance;
452
+ var left = -ax;
453
+ var right = +ax + shift;
454
+ var top = -ay;
455
+ var bottom = +ay + shift;
456
+ var splitY = ay - 2 * ax;
457
+ this.updateTriBottom(0, 0, left, bottom, right, bottom, left, splitY, fdistance, scale, fx, fy, ax, ay);
458
+ this.updateQuadRight(3, 3, right, bottom, right, top, left, top, left, splitY, fdistance, scale, fx, fy, ax, ay);
459
+ this.pad(7, 9, nv, ni, fdistance);
460
+ };
461
+ EShapeRectangleTriangulatedImpl.prototype.updateNotTop0 = function (fx, fy, ax, ay, scale, nv, ni) {
462
+ var distance = 2 * ay;
463
+ var fdistance = 1 / distance;
464
+ var shift = (scale - 1) * distance;
465
+ var left = -ax - shift;
466
+ var right = +ax + shift;
467
+ var top = -ay;
468
+ var bottom = +ay + shift;
469
+ var splitLeft = 2 * ay - ax;
470
+ var splitRight = ax - 2 * ay;
471
+ this.updateTriLeft(0, 0, left, top, splitLeft, top, left, bottom, fdistance, scale, fx, fy, ax, ay);
472
+ this.updateQuadBottom(3, 3, splitLeft, top, splitRight, top, right, bottom, left, bottom, fdistance, scale, fx, fy, ax, ay);
473
+ this.updateTriRight(7, 9, splitRight, top, right, top, right, bottom, fdistance, scale, fx, fy, ax, ay);
474
+ this.pad(10, 12, nv, ni, fdistance);
475
+ };
476
+ EShapeRectangleTriangulatedImpl.prototype.updateNotTop1 = function (fx, fy, ax, ay, scale, nv, ni) {
477
+ var distance = ax;
478
+ var fdistance = 1 / distance;
479
+ var shift = (scale - 1) * distance;
480
+ var left = -ax - shift;
481
+ var right = +ax + shift;
482
+ var top = -ay;
483
+ var bottom = +ay + shift;
484
+ var splitY = ay - ax;
485
+ this.updateQuadLeft(0, 0, left, top, 0, top, 0, splitY, left, bottom, fdistance, scale, fx, fy, ax, ay);
486
+ this.updateQuadRight(4, 6, 0, top, right, top, right, bottom, 0, splitY, fdistance, scale, fx, fy, ax, ay);
487
+ this.updateTriBottom(8, 12, 0, splitY, right, bottom, left, bottom, fdistance, scale, fx, fy, ax, ay);
488
+ this.pad(11, 15, nv, ni, fdistance);
489
+ };
490
+ EShapeRectangleTriangulatedImpl.prototype.updateNotBottom0 = function (fx, fy, ax, ay, scale, nv, ni) {
491
+ var distance = 2 * ay;
492
+ var fdistance = 1 / distance;
493
+ var shift = (scale - 1) * distance;
494
+ var left = -ax - shift;
495
+ var right = +ax + shift;
496
+ var top = -ay - shift;
497
+ var bottom = +ay;
498
+ var splitLeft = 2 * ay - ax;
499
+ var splitRight = ax - 2 * ay;
500
+ this.updateTriLeft(0, 0, left, bottom, splitLeft, bottom, left, top, fdistance, scale, fx, fy, ax, ay);
501
+ this.updateQuadTop(3, 3, splitLeft, bottom, splitRight, bottom, right, top, left, top, fdistance, scale, fx, fy, ax, ay);
502
+ this.updateTriRight(7, 9, splitRight, bottom, right, bottom, right, top, fdistance, scale, fx, fy, ax, ay);
503
+ this.pad(10, 12, nv, ni, fdistance);
504
+ };
505
+ EShapeRectangleTriangulatedImpl.prototype.updateNotBottom1 = function (fx, fy, ax, ay, scale, nv, ni) {
506
+ var distance = ax;
507
+ var fdistance = 1 / distance;
508
+ var shift = (scale - 1) * distance;
509
+ var left = -ax - shift;
510
+ var right = +ax + shift;
511
+ var top = -ay - shift;
512
+ var bottom = +ay;
513
+ var splitY = ay - ax;
514
+ this.updateQuadLeft(0, 0, left, bottom, 0, bottom, 0, -splitY, left, top, fdistance, scale, fx, fy, ax, ay);
515
+ this.updateQuadRight(4, 6, 0, bottom, right, bottom, right, top, 0, -splitY, fdistance, scale, fx, fy, ax, ay);
516
+ this.updateTriTop(8, 12, 0, -splitY, right, top, left, top, fdistance, scale, fx, fy, ax, ay);
517
+ this.pad(11, 15, nv, ni, fdistance);
518
+ };
519
+ EShapeRectangleTriangulatedImpl.prototype.updateNotLeft0 = function (fx, fy, ax, ay, scale, nv, ni) {
520
+ var distance = 2 * ax;
521
+ var fdistance = 1 / distance;
522
+ var shift = (scale - 1) * distance;
523
+ var left = -ax;
524
+ var right = +ax + shift;
525
+ var top = -ay - shift;
526
+ var bottom = +ay + shift;
527
+ var splitTop = 2 * ax - ay;
528
+ var splitBottom = ay - 2 * ax;
529
+ this.updateTriBottom(0, 0, left, bottom, left, splitBottom, right, bottom, fdistance, scale, fx, fy, ax, ay);
530
+ this.updateQuadRight(3, 3, left, splitBottom, left, splitTop, right, top, right, bottom, fdistance, scale, fx, fy, ax, ay);
531
+ this.updateTriTop(7, 9, left, splitTop, left, top, right, top, fdistance, scale, fx, fy, ax, ay);
532
+ this.pad(10, 12, nv, ni, fdistance);
533
+ };
534
+ EShapeRectangleTriangulatedImpl.prototype.updateNotLeft1 = function (fx, fy, ax, ay, scale, nv, ni) {
535
+ var distance = ay;
536
+ var fdistance = 1 / distance;
537
+ var shift = (scale - 1) * distance;
538
+ var left = -ax;
539
+ var right = +ax + shift;
540
+ var top = -ay - shift;
541
+ var bottom = +ay + shift;
542
+ var splitX = ax - ay;
543
+ this.updateQuadBottom(0, 0, left, bottom, left, 0, splitX, 0, right, bottom, fdistance, scale, fx, fy, ax, ay);
544
+ this.updateQuadTop(4, 6, left, 0, left, top, right, top, splitX, 0, fdistance, scale, fx, fy, ax, ay);
545
+ this.updateTriRight(8, 12, splitX, 0, right, top, right, bottom, fdistance, scale, fx, fy, ax, ay);
546
+ this.pad(11, 15, nv, ni, fdistance);
547
+ };
548
+ EShapeRectangleTriangulatedImpl.prototype.updateNotRight0 = function (fx, fy, ax, ay, scale, nv, ni) {
549
+ var distance = 2 * ax;
550
+ var fdistance = 1 / distance;
551
+ var shift = (scale - 1) * distance;
552
+ var left = -ax - shift;
553
+ var right = +ax;
554
+ var top = -ay - shift;
555
+ var bottom = +ay + shift;
556
+ var stop = 2 * ax - ay;
557
+ var sbottom = ay - 2 * ax;
558
+ this.updateTriBottom(0, 0, right, bottom, right, sbottom, left, bottom, fdistance, scale, fx, fy, ax, ay);
559
+ this.updateQuadLeft(3, 3, right, sbottom, right, stop, left, top, left, bottom, fdistance, scale, fx, fy, ax, ay);
560
+ this.updateTriTop(7, 9, right, stop, right, top, left, top, fdistance, scale, fx, fy, ax, ay);
561
+ this.pad(10, 12, nv, ni, fdistance);
562
+ };
563
+ EShapeRectangleTriangulatedImpl.prototype.updateNotRight1 = function (fx, fy, ax, ay, scale, nv, ni) {
564
+ var distance = ay;
565
+ var fdistance = 1 / distance;
566
+ var shift = (scale - 1) * distance;
567
+ var left = -ax - shift;
568
+ var right = +ax;
569
+ var top = -ay - shift;
570
+ var bottom = +ay + shift;
571
+ var splitX = ay - ax;
572
+ this.updateQuadBottom(0, 0, right, bottom, right, 0, splitX, 0, left, bottom, fdistance, scale, fx, fy, ax, ay);
573
+ this.updateQuadTop(4, 6, right, 0, right, top, left, top, splitX, 0, fdistance, scale, fx, fy, ax, ay);
574
+ this.updateTriLeft(8, 12, splitX, 0, left, top, left, bottom, fdistance, scale, fx, fy, ax, ay);
575
+ this.pad(11, 15, nv, ni, fdistance);
576
+ };
577
+ EShapeRectangleTriangulatedImpl.prototype.updateTriTop = function (iv, ii, x0, y0, x1, y1, x2, y2, fdistance, scale, fx, fy, ax, ay, reverse) {
578
+ if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
579
+ this.updateVertexTop(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
580
+ this.updateVertexTop(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
581
+ this.updateVertexTop(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
582
+ this._indices[ii] = iv;
583
+ this._indices[ii + 1] = iv + (reverse ? 2 : 1);
584
+ this._indices[ii + 2] = iv + (reverse ? 1 : 2);
585
+ };
586
+ EShapeRectangleTriangulatedImpl.prototype.updateTriRight = function (iv, ii, x0, y0, x1, y1, x2, y2, fdistance, scale, fx, fy, ax, ay, reverse) {
587
+ if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
588
+ this.updateVertexRight(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
589
+ this.updateVertexRight(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
590
+ this.updateVertexRight(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
591
+ this._indices[ii] = iv;
592
+ this._indices[ii + 1] = iv + (reverse ? 2 : 1);
593
+ this._indices[ii + 2] = iv + (reverse ? 1 : 2);
594
+ };
595
+ EShapeRectangleTriangulatedImpl.prototype.updateTriBottom = function (iv, ii, x0, y0, x1, y1, x2, y2, fdistance, scale, fx, fy, ax, ay, reverse) {
596
+ if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
597
+ this.updateVertexBottom(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
598
+ this.updateVertexBottom(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
599
+ this.updateVertexBottom(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
600
+ this._indices[ii] = iv;
601
+ this._indices[ii + 1] = iv + (reverse ? 2 : 1);
602
+ this._indices[ii + 2] = iv + (reverse ? 1 : 2);
603
+ };
604
+ EShapeRectangleTriangulatedImpl.prototype.updateTriLeft = function (iv, ii, x0, y0, x1, y1, x2, y2, fdistance, scale, fx, fy, ax, ay, reverse) {
605
+ if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
606
+ this.updateVertexLeft(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
607
+ this.updateVertexLeft(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
608
+ this.updateVertexLeft(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
609
+ this._indices[ii] = iv;
610
+ this._indices[ii + 1] = iv + (reverse ? 2 : 1);
611
+ this._indices[ii + 2] = iv + (reverse ? 1 : 2);
612
+ };
613
+ EShapeRectangleTriangulatedImpl.prototype.updateQuadTop = function (iv, ii, x0, y0, x1, y1, x2, y2, x3, y3, fdistance, scale, fx, fy, ax, ay, reverse) {
614
+ if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
615
+ this.updateVertexTop(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
616
+ this.updateVertexTop(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
617
+ this.updateVertexTop(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
618
+ this.updateVertexTop(iv + 3, x3, y3, fdistance, scale, fx, fy, ax, ay);
619
+ this._indices[ii] = iv;
620
+ this._indices[ii + 1] = iv + (reverse ? 2 : 1);
621
+ this._indices[ii + 2] = iv + (reverse ? 1 : 2);
622
+ this._indices[ii + 3] = iv;
623
+ this._indices[ii + 4] = iv + (reverse ? 3 : 2);
624
+ this._indices[ii + 5] = iv + (reverse ? 2 : 3);
625
+ };
626
+ EShapeRectangleTriangulatedImpl.prototype.updateQuadRight = function (iv, ii, x0, y0, x1, y1, x2, y2, x3, y3, fdistance, scale, fx, fy, ax, ay, reverse) {
627
+ if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
628
+ this.updateVertexRight(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
629
+ this.updateVertexRight(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
630
+ this.updateVertexRight(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
631
+ this.updateVertexRight(iv + 3, x3, y3, fdistance, scale, fx, fy, ax, ay);
632
+ this._indices[ii] = iv;
633
+ this._indices[ii + 1] = iv + (reverse ? 2 : 1);
634
+ this._indices[ii + 2] = iv + (reverse ? 1 : 2);
635
+ this._indices[ii + 3] = iv;
636
+ this._indices[ii + 4] = iv + (reverse ? 3 : 2);
637
+ this._indices[ii + 5] = iv + (reverse ? 2 : 3);
638
+ };
639
+ EShapeRectangleTriangulatedImpl.prototype.updateQuadBottom = function (iv, ii, x0, y0, x1, y1, x2, y2, x3, y3, fdistance, scale, fx, fy, ax, ay, reverse) {
640
+ if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
641
+ this.updateVertexBottom(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
642
+ this.updateVertexBottom(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
643
+ this.updateVertexBottom(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
644
+ this.updateVertexBottom(iv + 3, x3, y3, fdistance, scale, fx, fy, ax, ay);
645
+ this._indices[ii] = iv;
646
+ this._indices[ii + 1] = iv + (reverse ? 2 : 1);
647
+ this._indices[ii + 2] = iv + (reverse ? 1 : 2);
648
+ this._indices[ii + 3] = iv;
649
+ this._indices[ii + 4] = iv + (reverse ? 3 : 2);
650
+ this._indices[ii + 5] = iv + (reverse ? 2 : 3);
651
+ };
652
+ EShapeRectangleTriangulatedImpl.prototype.updateQuadLeft = function (iv, ii, x0, y0, x1, y1, x2, y2, x3, y3, fdistance, scale, fx, fy, ax, ay, reverse) {
653
+ if (reverse === void 0) { reverse = (x1 - x0) * (y2 - y0) < (y1 - y0) * (x2 - x0); }
654
+ this.updateVertexLeft(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
655
+ this.updateVertexLeft(iv + 1, x1, y1, fdistance, scale, fx, fy, ax, ay);
656
+ this.updateVertexLeft(iv + 2, x2, y2, fdistance, scale, fx, fy, ax, ay);
657
+ this.updateVertexLeft(iv + 3, x3, y3, fdistance, scale, fx, fy, ax, ay);
658
+ this._indices[ii] = iv;
659
+ this._indices[ii + 1] = iv + (reverse ? 2 : 1);
660
+ this._indices[ii + 2] = iv + (reverse ? 1 : 2);
661
+ this._indices[ii + 3] = iv;
662
+ this._indices[ii + 4] = iv + (reverse ? 3 : 2);
663
+ this._indices[ii + 5] = iv + (reverse ? 2 : 3);
664
+ };
665
+ EShapeRectangleTriangulatedImpl.prototype.updateNone = function (fx, fy, ax, ay, scale, nv, ni) {
666
+ this.updateCellNone(-ax, -ay, +ax, +ay, 0, scale, fx, fy, ax, ay, 0);
667
+ this.pad(4, 6, nv, ni, 0);
668
+ };
669
+ EShapeRectangleTriangulatedImpl.prototype.updateAll0 = function (fx, fy, ax, ay, scale, nv, ni) {
670
+ var distance = ay;
671
+ var fdistance = 1 / distance;
672
+ var shift = (scale - 1) * distance;
673
+ var outerLeft = -ax - shift;
674
+ var outerRight = +ax + shift;
675
+ var outerTop = -ay - shift;
676
+ var outerBottom = +ay + shift;
677
+ var innerLeft = -ax + ay;
678
+ var innerRight = +ax - ay;
679
+ this.updateQuadTop(0, 0, outerLeft, outerTop, outerRight, outerTop, innerRight, 0, innerLeft, 0, fdistance, scale, fx, fy, ax, ay);
680
+ this.updateTriRight(4, 6, outerRight, outerTop, outerRight, outerBottom, innerRight, 0, fdistance, scale, fx, fy, ax, ay);
681
+ this.updateQuadBottom(7, 9, outerRight, outerBottom, outerLeft, outerBottom, innerLeft, 0, innerRight, 0, fdistance, scale, fx, fy, ax, ay);
682
+ this.updateTriLeft(11, 15, outerLeft, outerBottom, outerLeft, outerTop, innerLeft, 0, fdistance, scale, fx, fy, ax, ay);
683
+ this.pad(14, 18, nv, ni, fdistance);
684
+ };
685
+ EShapeRectangleTriangulatedImpl.prototype.updateAll1 = function (fx, fy, ax, ay, scale, nv, ni) {
686
+ var distance = ax;
687
+ var fdistance = 1 / distance;
688
+ var shift = (scale - 1) * distance;
689
+ var outerLeft = -ax - shift;
690
+ var outerRight = +ax + shift;
691
+ var outerTop = -ay - shift;
692
+ var outerBottom = +ay + shift;
693
+ var innerTop = -ay + ax;
694
+ var innerBottom = +ay - ax;
695
+ this.updateTriTop(0, 0, outerLeft, outerTop, outerRight, outerTop, 0, innerTop, fdistance, scale, fx, fy, ax, ay);
696
+ this.updateQuadRight(3, 3, outerRight, outerTop, outerRight, outerBottom, 0, innerBottom, 0, innerTop, fdistance, scale, fx, fy, ax, ay);
697
+ this.updateTriBottom(7, 9, outerRight, outerBottom, outerLeft, outerBottom, 0, innerBottom, fdistance, scale, fx, fy, ax, ay);
698
+ this.updateQuadLeft(10, 12, outerLeft, outerBottom, outerLeft, outerTop, 0, innerTop, 0, innerBottom, fdistance, scale, fx, fy, ax, ay);
699
+ this.pad(14, 18, nv, ni, fdistance);
700
+ };
701
+ EShapeRectangleTriangulatedImpl.prototype.updateCellNone = function (x0, y0, x1, y1, fdistance, scale, fx, fy, ax, ay, iv) {
702
+ this.updateVertex(iv, x0, y0, 0, 0, 0, fx, fy);
703
+ this.updateVertex(iv + 1, x1, y0, 0, 0, 0, fx, fy);
704
+ this.updateVertex(iv + 2, x1, y1, 0, 0, 0, fx, fy);
705
+ this.updateVertex(iv + 3, x0, y1, 0, 0, 0, fx, fy);
706
+ var ii = (iv >> 1) * 3;
707
+ var indices = this._indices;
708
+ indices[ii++] = iv;
709
+ indices[ii++] = iv + 1;
710
+ indices[ii++] = iv + 2;
711
+ indices[ii++] = iv;
712
+ indices[ii++] = iv + 2;
713
+ indices[ii++] = iv + 3;
714
+ };
715
+ EShapeRectangleTriangulatedImpl.prototype.updateCellTop = function (x0, y0, x1, y1, fdistance, scale, fx, fy, ax, ay, iv) {
716
+ this.updateVertexTop(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
717
+ this.updateVertexTop(iv + 1, x1, y0, fdistance, scale, fx, fy, ax, ay);
718
+ this.updateVertexTop(iv + 2, x1, y1, fdistance, scale, fx, fy, ax, ay);
719
+ this.updateVertexTop(iv + 3, x0, y1, fdistance, scale, fx, fy, ax, ay);
720
+ var ii = (iv >> 1) * 3;
721
+ var indices = this._indices;
722
+ indices[ii++] = iv;
723
+ indices[ii++] = iv + 1;
724
+ indices[ii++] = iv + 2;
725
+ indices[ii++] = iv;
726
+ indices[ii++] = iv + 2;
727
+ indices[ii++] = iv + 3;
728
+ };
729
+ EShapeRectangleTriangulatedImpl.prototype.updateCellRight = function (x0, y0, x1, y1, fdistance, scale, fx, fy, ax, ay, iv) {
730
+ this.updateVertexRight(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
731
+ this.updateVertexRight(iv + 1, x1, y0, fdistance, scale, fx, fy, ax, ay);
732
+ this.updateVertexRight(iv + 2, x1, y1, fdistance, scale, fx, fy, ax, ay);
733
+ this.updateVertexRight(iv + 3, x0, y1, fdistance, scale, fx, fy, ax, ay);
734
+ var ii = (iv >> 1) * 3;
735
+ var indices = this._indices;
736
+ indices[ii++] = iv;
737
+ indices[ii++] = iv + 1;
738
+ indices[ii++] = iv + 2;
739
+ indices[ii++] = iv;
740
+ indices[ii++] = iv + 2;
741
+ indices[ii++] = iv + 3;
742
+ };
743
+ EShapeRectangleTriangulatedImpl.prototype.updateCellBottom = function (x0, y0, x1, y1, fdistance, scale, fx, fy, ax, ay, iv) {
744
+ this.updateVertexBottom(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
745
+ this.updateVertexBottom(iv + 1, x1, y0, fdistance, scale, fx, fy, ax, ay);
746
+ this.updateVertexBottom(iv + 2, x1, y1, fdistance, scale, fx, fy, ax, ay);
747
+ this.updateVertexBottom(iv + 3, x0, y1, fdistance, scale, fx, fy, ax, ay);
748
+ var ii = (iv >> 1) * 3;
749
+ var indices = this._indices;
750
+ indices[ii++] = iv;
751
+ indices[ii++] = iv + 1;
752
+ indices[ii++] = iv + 2;
753
+ indices[ii++] = iv;
754
+ indices[ii++] = iv + 2;
755
+ indices[ii++] = iv + 3;
756
+ };
757
+ EShapeRectangleTriangulatedImpl.prototype.updateCellLeft = function (x0, y0, x1, y1, fdistance, scale, fx, fy, ax, ay, iv) {
758
+ this.updateVertexLeft(iv, x0, y0, fdistance, scale, fx, fy, ax, ay);
759
+ this.updateVertexLeft(iv + 1, x1, y0, fdistance, scale, fx, fy, ax, ay);
760
+ this.updateVertexLeft(iv + 2, x1, y1, fdistance, scale, fx, fy, ax, ay);
761
+ this.updateVertexLeft(iv + 3, x0, y1, fdistance, scale, fx, fy, ax, ay);
762
+ var ii = (iv >> 1) * 3;
763
+ var indices = this._indices;
764
+ indices[ii++] = iv;
765
+ indices[ii++] = iv + 1;
766
+ indices[ii++] = iv + 2;
767
+ indices[ii++] = iv;
768
+ indices[ii++] = iv + 2;
769
+ indices[ii++] = iv + 3;
770
+ };
771
+ EShapeRectangleTriangulatedImpl.prototype.updateVertexTop = function (vertex, x, y, fdistance, scale, fx, fy, ax, ay) {
772
+ this.updateVertex(vertex, x, y, fdistance, x + ax, Math.min(scale, (y + ay) * -fdistance + 1), fx, fy);
773
+ };
774
+ EShapeRectangleTriangulatedImpl.prototype.updateVertexRight = function (vertex, x, y, fdistance, scale, fx, fy, ax, ay) {
775
+ this.updateVertex(vertex, x, y, fdistance, 2 * ax + y + ay, Math.min(scale, (x - ax) * fdistance + 1), fx, fy);
776
+ };
777
+ EShapeRectangleTriangulatedImpl.prototype.updateVertexBottom = function (vertex, x, y, fdistance, scale, fx, fy, ax, ay) {
778
+ this.updateVertex(vertex, x, y, fdistance, 3 * ax + 2 * ay - x, Math.min(scale, (y - ay) * fdistance + 1), fx, fy);
779
+ };
780
+ EShapeRectangleTriangulatedImpl.prototype.updateVertexLeft = function (vertex, x, y, fdistance, scale, fx, fy, ax, ay) {
781
+ this.updateVertex(vertex, x, y, fdistance, 4 * ax + 3 * ay - y, Math.min(scale, (x + ax) * -fdistance + 1), fx, fy);
782
+ };
783
+ EShapeRectangleTriangulatedImpl.prototype.updateVertex = function (vertex, x, y, distance, length, clipping, fx, fy) {
784
+ var vertex2 = vertex << 1;
785
+ this._vertices[vertex2] = x;
786
+ this._vertices[vertex2 + 1] = y;
787
+ this._distances[vertex] = distance;
788
+ this._lengths[vertex] = length;
789
+ this._clippings[vertex] = clipping;
790
+ this._uvs[vertex2] = 0.5 * (x * fx + 1);
791
+ this._uvs[vertex2 + 1] = 0.5 * (y * fy + 1);
792
+ };
793
+ return EShapeRectangleTriangulatedImpl;
794
+ }());
795
+ export { EShapeRectangleTriangulatedImpl };
796
+ //# sourceMappingURL=e-shape-rectangle-triangulated-impl.js.map