@openglobus/og 0.11.5 → 0.11.6

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 (145) hide show
  1. package/package.json +5 -7
  2. package/src/og/Clock.js +6 -10
  3. package/src/og/Events.js +5 -7
  4. package/src/og/Extent.js +73 -32
  5. package/src/og/ImageCanvas.js +18 -15
  6. package/src/og/LonLat.js +13 -10
  7. package/src/og/Popup.js +18 -17
  8. package/src/og/QueueArray.js +3 -4
  9. package/src/og/Rectangle.js +4 -6
  10. package/src/og/Stack.js +2 -4
  11. package/src/og/ajax.js +20 -14
  12. package/src/og/astro/earth.js +21 -15
  13. package/src/og/bv/Box.js +2 -3
  14. package/src/og/bv/Sphere.js +10 -7
  15. package/src/og/camera/Frustum.js +19 -12
  16. package/src/og/camera/PlanetCamera.js +0 -1
  17. package/src/og/control/CompassButton.js +1 -2
  18. package/src/og/control/Control.js +7 -9
  19. package/src/og/control/DebugInfo.js +0 -1
  20. package/src/og/control/KeyboardNavigation.js +9 -9
  21. package/src/og/control/LayerSwitcher.js +21 -20
  22. package/src/og/control/SegmentBoundVisualization.js +5 -6
  23. package/src/og/control/ShowFps.js +12 -7
  24. package/src/og/control/SimpleNavigation.js +5 -7
  25. package/src/og/control/Sun.js +22 -12
  26. package/src/og/control/ToggleWireframe.js +3 -3
  27. package/src/og/control/TouchNavigation.js +43 -32
  28. package/src/og/control/ZoomControl.js +40 -24
  29. package/src/og/ellipsoid/Ellipsoid.js +148 -56
  30. package/src/og/ellipsoid/wgs84.js +3 -3
  31. package/src/og/entity/BaseBillboard.js +65 -14
  32. package/src/og/entity/Billboard.js +9 -5
  33. package/src/og/entity/BillboardHandler.js +310 -64
  34. package/src/og/entity/Entity.js +39 -1
  35. package/src/og/entity/EntityCollection.js +47 -24
  36. package/src/og/entity/GeoObject.js +228 -0
  37. package/src/og/entity/GeoObjectHandler.js +910 -0
  38. package/src/og/entity/GeometryHandler.js +595 -123
  39. package/src/og/entity/Label.js +53 -18
  40. package/src/og/entity/LabelHandler.js +42 -244
  41. package/src/og/entity/LabelWorker.js +213 -0
  42. package/src/og/entity/Object3d.js +504 -0
  43. package/src/og/entity/PointCloud.js +76 -28
  44. package/src/og/entity/PointCloudHandler.js +5 -5
  45. package/src/og/entity/Ray.js +49 -16
  46. package/src/og/entity/Strip.js +72 -43
  47. package/src/og/entity/StripHandler.js +23 -23
  48. package/src/og/layer/BaseGeoImage.js +50 -19
  49. package/src/og/layer/CanvasTiles.js +16 -16
  50. package/src/og/layer/GeoImage.js +6 -6
  51. package/src/og/layer/KML.js +55 -33
  52. package/src/og/layer/Layer.js +3 -3
  53. package/src/og/layer/Vector.js +94 -48
  54. package/src/og/layer/WMS.js +33 -16
  55. package/src/og/light/LightSource.js +19 -12
  56. package/src/og/math/Mat3.js +24 -12
  57. package/src/og/math/Mat4.js +603 -603
  58. package/src/og/math/Plane.js +19 -18
  59. package/src/og/math/Ray.js +17 -12
  60. package/src/og/math/Vec2.js +24 -14
  61. package/src/og/math/Vec3.js +60 -30
  62. package/src/og/math/coder.js +7 -7
  63. package/src/og/proj/EPSG3857.js +3 -3
  64. package/src/og/proj/EPSG4326.js +3 -3
  65. package/src/og/proj/Proj.js +2 -4
  66. package/src/og/quadTree/Node.js +31 -17
  67. package/src/og/renderer/Renderer.js +23 -6
  68. package/src/og/renderer/RendererEvents.js +1 -1
  69. package/src/og/scene/BaseNode.js +2 -3
  70. package/src/og/scene/Planet.js +2 -2
  71. package/src/og/scene/RenderNode.js +15 -8
  72. package/src/og/shaders/geoObject.js +211 -0
  73. package/src/og/shaders/pointCloud.js +41 -41
  74. package/src/og/shaders/shape.js +12 -18
  75. package/src/og/shaders/skybox.js +36 -36
  76. package/src/og/shapes/BaseShape.js +107 -35
  77. package/src/og/shapes/Icosphere.js +25 -10
  78. package/src/og/shapes/Sphere.js +8 -11
  79. package/src/og/utils/TextureAtlas.js +16 -18
  80. package/src/og/utils/shared.js +1 -1
  81. package/src/og/webgl/Handler.js +68 -49
  82. package/src/og/webgl/Multisample.js +44 -16
  83. package/src/og/webgl/Program.js +78 -33
  84. package/src/og/webgl/callbacks.js +3 -3
  85. package/types/Deferred.d.ts +1 -1
  86. package/types/Events.d.ts +2 -2
  87. package/types/Extent.d.ts +1 -1
  88. package/types/Rectangle.d.ts +1 -1
  89. package/types/ajax.d.ts +1 -1
  90. package/types/bv/Box.d.ts +1 -1
  91. package/types/bv/Sphere.d.ts +1 -1
  92. package/types/camera/Camera.d.ts +5 -5
  93. package/types/camera/Frustum.d.ts +6 -6
  94. package/types/camera/PlanetCamera.d.ts +8 -8
  95. package/types/control/Control.d.ts +1 -1
  96. package/types/control/EarthCoordinates.d.ts +1 -1
  97. package/types/control/Sun.d.ts +1 -1
  98. package/types/entity/BaseBillboard.d.ts +15 -8
  99. package/types/entity/Entity.d.ts +24 -9
  100. package/types/entity/EntityCollection.d.ts +15 -9
  101. package/types/entity/GeoObject.d.ts +111 -0
  102. package/types/entity/GeoObjectHandler.d.ts +77 -0
  103. package/types/entity/Geometry.d.ts +1 -1
  104. package/types/entity/GeometryHandler.d.ts +1 -1
  105. package/types/entity/Label.d.ts +3 -3
  106. package/types/entity/LabelHandler.d.ts +2 -0
  107. package/types/entity/LabelWorker.d.ts +9 -0
  108. package/types/entity/PointCloud.d.ts +1 -1
  109. package/types/entity/Polyline.d.ts +5 -5
  110. package/types/entity/Ray.d.ts +1 -1
  111. package/types/entity/Strip.d.ts +1 -1
  112. package/types/layer/BaseGeoImage.d.ts +3 -3
  113. package/types/layer/CanvasTiles.d.ts +5 -5
  114. package/types/layer/GeoImage.d.ts +1 -1
  115. package/types/layer/GeoVideo.d.ts +1 -1
  116. package/types/layer/Layer.d.ts +5 -5
  117. package/types/layer/Vector.d.ts +9 -9
  118. package/types/layer/XYZ.d.ts +3 -3
  119. package/types/light/LightSource.d.ts +7 -7
  120. package/types/math/Plane.d.ts +1 -1
  121. package/types/math/Ray.d.ts +1 -1
  122. package/types/math/Vec2.d.ts +34 -34
  123. package/types/math/Vec3.d.ts +1 -1
  124. package/types/math/Vec4.d.ts +1 -1
  125. package/types/math/coder.d.ts +1 -1
  126. package/types/math.d.ts +1 -1
  127. package/types/proj/Proj.d.ts +2 -2
  128. package/types/quadTree/Node.d.ts +1 -1
  129. package/types/renderer/Renderer.d.ts +12 -10
  130. package/types/renderer/RendererEvents.d.ts +1 -1
  131. package/types/scene/BaseNode.d.ts +4 -4
  132. package/types/scene/Planet.d.ts +40 -40
  133. package/types/scene/RenderNode.d.ts +9 -9
  134. package/types/segment/Segment.d.ts +9 -9
  135. package/types/shaders/geoObject.d.ts +3 -0
  136. package/types/shapes/BaseShape.d.ts +5 -5
  137. package/types/terrain/EmptyTerrain.d.ts +2 -2
  138. package/types/terrain/GlobusTerrain.d.ts +4 -4
  139. package/types/utils/TextureAtlas.d.ts +4 -4
  140. package/types/utils/shared.d.ts +9 -9
  141. package/types/webgl/Framebuffer.d.ts +1 -1
  142. package/types/webgl/Handler.d.ts +16 -7
  143. package/types/webgl/Multisample.d.ts +2 -2
  144. package/types/webgl/Program.d.ts +6 -0
  145. package/types/webgl/ProgramController.d.ts +1 -1
@@ -2,14 +2,14 @@
2
2
  * @module og/entity/GeometryHandler
3
3
  */
4
4
 
5
- 'use strict';
5
+ "use strict";
6
6
 
7
- import * as mercator from '../mercator.js';
8
- import * as quadTree from '../quadTree/quadTree.js';
9
- import { earcut, flatten } from '../utils/earcut.js';
10
- import { GeometryType } from './Geometry.js';
11
- import { Vec2 } from '../math/Vec2.js';
12
- import { doubleToTwoFloatsV2 } from '../math/coder.js';
7
+ import * as mercator from "../mercator.js";
8
+ import * as quadTree from "../quadTree/quadTree.js";
9
+ import { earcut, flatten } from "../utils/earcut.js";
10
+ import { GeometryType } from "./Geometry.js";
11
+ import { Vec2 } from "../math/Vec2.js";
12
+ import { doubleToTwoFloatsV2 } from "../math/coder.js";
13
13
 
14
14
  const POLYVERTICES_BUFFER = 0;
15
15
  const POLYINDEXES_BUFFER = 1;
@@ -25,8 +25,8 @@ const POLYPICKINGCOLORS_BUFFER = 10;
25
25
  const LINEPICKINGCOLORS_BUFFER = 11;
26
26
 
27
27
  function doubleToTwoFloats(v, high, low) {
28
-
29
- let x = v[0], y = v[1];
28
+ let x = v[0],
29
+ y = v[1];
30
30
 
31
31
  if (x >= 0.0) {
32
32
  let doubleHigh = Math.floor(x / 65536.0) * 65536.0;
@@ -132,9 +132,26 @@ class GeometryHandler {
132
132
  this._counter = n;
133
133
  }
134
134
 
135
- static appendLineData(pathArr, isClosed, color, pickingColor, thickness, strokeColor, strokeSize,
136
- outVerticesHigh, outVerticesLow, outOrders, outIndexes, outColors, outPickingColors, outThickness, outStrokeColors, outStrokes,
137
- outVerticesHigh2, outVerticesLow2) {
135
+ static appendLineData(
136
+ pathArr,
137
+ isClosed,
138
+ color,
139
+ pickingColor,
140
+ thickness,
141
+ strokeColor,
142
+ strokeSize,
143
+ outVerticesHigh,
144
+ outVerticesLow,
145
+ outOrders,
146
+ outIndexes,
147
+ outColors,
148
+ outPickingColors,
149
+ outThickness,
150
+ outStrokeColors,
151
+ outStrokes,
152
+ outVerticesHigh2,
153
+ outVerticesLow2
154
+ ) {
138
155
  var index = 0;
139
156
 
140
157
  if (outIndexes.length > 0) {
@@ -174,37 +191,211 @@ class GeometryHandler {
174
191
 
175
192
  doubleToTwoFloats(last, tempHigh, tempLow);
176
193
 
177
- outVerticesHigh.push(tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y);
178
- outVerticesLow.push(tempLow.x, tempLow.y, tempLow.x, tempLow.y, tempLow.x, tempLow.y, tempLow.x, tempLow.y);
179
-
180
- outVerticesHigh2.push(tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y);
181
- outVerticesLow2.push(tempLow.x, tempLow.y, tempLow.x, tempLow.y, tempLow.x, tempLow.y, tempLow.x, tempLow.y);
194
+ outVerticesHigh.push(
195
+ tempHigh.x,
196
+ tempHigh.y,
197
+ tempHigh.x,
198
+ tempHigh.y,
199
+ tempHigh.x,
200
+ tempHigh.y,
201
+ tempHigh.x,
202
+ tempHigh.y
203
+ );
204
+ outVerticesLow.push(
205
+ tempLow.x,
206
+ tempLow.y,
207
+ tempLow.x,
208
+ tempLow.y,
209
+ tempLow.x,
210
+ tempLow.y,
211
+ tempLow.x,
212
+ tempLow.y
213
+ );
214
+
215
+ outVerticesHigh2.push(
216
+ tempHigh.x,
217
+ tempHigh.y,
218
+ tempHigh.x,
219
+ tempHigh.y,
220
+ tempHigh.x,
221
+ tempHigh.y,
222
+ tempHigh.x,
223
+ tempHigh.y
224
+ );
225
+ outVerticesLow2.push(
226
+ tempLow.x,
227
+ tempLow.y,
228
+ tempLow.x,
229
+ tempLow.y,
230
+ tempLow.x,
231
+ tempLow.y,
232
+ tempLow.x,
233
+ tempLow.y
234
+ );
182
235
 
183
236
  outOrders.push(1, -1, 2, -2);
184
237
 
185
238
  outThickness.push(t, t, t, t);
186
239
  outStrokes.push(s, s, s, s);
187
- outColors.push(c[0], c[1], c[2], c[3], c[0], c[1], c[2], c[3], c[0], c[1], c[2], c[3], c[0], c[1], c[2], c[3]);
188
- outStrokeColors.push(sc[0], sc[1], sc[2], sc[3], sc[0], sc[1], sc[2], sc[3], sc[0], sc[1], sc[2], sc[3], sc[0], sc[1], sc[2], sc[3]);
189
- outPickingColors.push(p[0], p[1], p[2], p[3], p[0], p[1], p[2], p[3], p[0], p[1], p[2], p[3], p[0], p[1], p[2], p[3]);
240
+ outColors.push(
241
+ c[0],
242
+ c[1],
243
+ c[2],
244
+ c[3],
245
+ c[0],
246
+ c[1],
247
+ c[2],
248
+ c[3],
249
+ c[0],
250
+ c[1],
251
+ c[2],
252
+ c[3],
253
+ c[0],
254
+ c[1],
255
+ c[2],
256
+ c[3]
257
+ );
258
+ outStrokeColors.push(
259
+ sc[0],
260
+ sc[1],
261
+ sc[2],
262
+ sc[3],
263
+ sc[0],
264
+ sc[1],
265
+ sc[2],
266
+ sc[3],
267
+ sc[0],
268
+ sc[1],
269
+ sc[2],
270
+ sc[3],
271
+ sc[0],
272
+ sc[1],
273
+ sc[2],
274
+ sc[3]
275
+ );
276
+ outPickingColors.push(
277
+ p[0],
278
+ p[1],
279
+ p[2],
280
+ p[3],
281
+ p[0],
282
+ p[1],
283
+ p[2],
284
+ p[3],
285
+ p[0],
286
+ p[1],
287
+ p[2],
288
+ p[3],
289
+ p[0],
290
+ p[1],
291
+ p[2],
292
+ p[3]
293
+ );
190
294
 
191
295
  for (var i = 0; i < path.length; i++) {
192
296
  var cur = path[i];
193
297
 
194
298
  doubleToTwoFloats(cur, tempHigh, tempLow);
195
299
 
196
- outVerticesHigh.push(tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y);
197
- outVerticesLow.push(tempLow.x, tempLow.y, tempLow.x, tempLow.y, tempLow.x, tempLow.y, tempLow.x, tempLow.y);
198
-
199
- outVerticesHigh2.push(tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y);
200
- outVerticesLow2.push(tempLow.x, tempLow.y, tempLow.x, tempLow.y, tempLow.x, tempLow.y, tempLow.x, tempLow.y);
300
+ outVerticesHigh.push(
301
+ tempHigh.x,
302
+ tempHigh.y,
303
+ tempHigh.x,
304
+ tempHigh.y,
305
+ tempHigh.x,
306
+ tempHigh.y,
307
+ tempHigh.x,
308
+ tempHigh.y
309
+ );
310
+ outVerticesLow.push(
311
+ tempLow.x,
312
+ tempLow.y,
313
+ tempLow.x,
314
+ tempLow.y,
315
+ tempLow.x,
316
+ tempLow.y,
317
+ tempLow.x,
318
+ tempLow.y
319
+ );
320
+
321
+ outVerticesHigh2.push(
322
+ tempHigh.x,
323
+ tempHigh.y,
324
+ tempHigh.x,
325
+ tempHigh.y,
326
+ tempHigh.x,
327
+ tempHigh.y,
328
+ tempHigh.x,
329
+ tempHigh.y
330
+ );
331
+ outVerticesLow2.push(
332
+ tempLow.x,
333
+ tempLow.y,
334
+ tempLow.x,
335
+ tempLow.y,
336
+ tempLow.x,
337
+ tempLow.y,
338
+ tempLow.x,
339
+ tempLow.y
340
+ );
201
341
 
202
342
  outOrders.push(1, -1, 2, -2);
203
343
  outThickness.push(t, t, t, t);
204
344
  outStrokes.push(s, s, s, s);
205
- outColors.push(c[0], c[1], c[2], c[3], c[0], c[1], c[2], c[3], c[0], c[1], c[2], c[3], c[0], c[1], c[2], c[3]);
206
- outStrokeColors.push(sc[0], sc[1], sc[2], sc[3], sc[0], sc[1], sc[2], sc[3], sc[0], sc[1], sc[2], sc[3], sc[0], sc[1], sc[2], sc[3]);
207
- outPickingColors.push(p[0], p[1], p[2], p[3], p[0], p[1], p[2], p[3], p[0], p[1], p[2], p[3], p[0], p[1], p[2], p[3]);
345
+ outColors.push(
346
+ c[0],
347
+ c[1],
348
+ c[2],
349
+ c[3],
350
+ c[0],
351
+ c[1],
352
+ c[2],
353
+ c[3],
354
+ c[0],
355
+ c[1],
356
+ c[2],
357
+ c[3],
358
+ c[0],
359
+ c[1],
360
+ c[2],
361
+ c[3]
362
+ );
363
+ outStrokeColors.push(
364
+ sc[0],
365
+ sc[1],
366
+ sc[2],
367
+ sc[3],
368
+ sc[0],
369
+ sc[1],
370
+ sc[2],
371
+ sc[3],
372
+ sc[0],
373
+ sc[1],
374
+ sc[2],
375
+ sc[3],
376
+ sc[0],
377
+ sc[1],
378
+ sc[2],
379
+ sc[3]
380
+ );
381
+ outPickingColors.push(
382
+ p[0],
383
+ p[1],
384
+ p[2],
385
+ p[3],
386
+ p[0],
387
+ p[1],
388
+ p[2],
389
+ p[3],
390
+ p[0],
391
+ p[1],
392
+ p[2],
393
+ p[3],
394
+ p[0],
395
+ p[1],
396
+ p[2],
397
+ p[3]
398
+ );
208
399
  outIndexes.push(index++, index++, index++, index++);
209
400
  }
210
401
 
@@ -226,18 +417,105 @@ class GeometryHandler {
226
417
 
227
418
  doubleToTwoFloats(first, tempHigh, tempLow);
228
419
 
229
- outVerticesHigh.push(tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y);
230
- outVerticesLow.push(tempLow.x, tempLow.y, tempLow.x, tempLow.y, tempLow.x, tempLow.y, tempLow.x, tempLow.y);
231
-
232
- outVerticesHigh2.push(tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y, tempHigh.x, tempHigh.y);
233
- outVerticesLow2.push(tempLow.x, tempLow.y, tempLow.x, tempLow.y, tempLow.x, tempLow.y, tempLow.x, tempLow.y);
420
+ outVerticesHigh.push(
421
+ tempHigh.x,
422
+ tempHigh.y,
423
+ tempHigh.x,
424
+ tempHigh.y,
425
+ tempHigh.x,
426
+ tempHigh.y,
427
+ tempHigh.x,
428
+ tempHigh.y
429
+ );
430
+ outVerticesLow.push(
431
+ tempLow.x,
432
+ tempLow.y,
433
+ tempLow.x,
434
+ tempLow.y,
435
+ tempLow.x,
436
+ tempLow.y,
437
+ tempLow.x,
438
+ tempLow.y
439
+ );
440
+
441
+ outVerticesHigh2.push(
442
+ tempHigh.x,
443
+ tempHigh.y,
444
+ tempHigh.x,
445
+ tempHigh.y,
446
+ tempHigh.x,
447
+ tempHigh.y,
448
+ tempHigh.x,
449
+ tempHigh.y
450
+ );
451
+ outVerticesLow2.push(
452
+ tempLow.x,
453
+ tempLow.y,
454
+ tempLow.x,
455
+ tempLow.y,
456
+ tempLow.x,
457
+ tempLow.y,
458
+ tempLow.x,
459
+ tempLow.y
460
+ );
234
461
 
235
462
  outOrders.push(1, -1, 2, -2);
236
463
  outThickness.push(t, t, t, t);
237
464
  outStrokes.push(s, s, s, s);
238
- outColors.push(c[0], c[1], c[2], c[3], c[0], c[1], c[2], c[3], c[0], c[1], c[2], c[3], c[0], c[1], c[2], c[3]);
239
- outStrokeColors.push(sc[0], sc[1], sc[2], sc[3], sc[0], sc[1], sc[2], sc[3], sc[0], sc[1], sc[2], sc[3], sc[0], sc[1], sc[2], sc[3]);
240
- outPickingColors.push(p[0], p[1], p[2], p[3], p[0], p[1], p[2], p[3], p[0], p[1], p[2], p[3], p[0], p[1], p[2], p[3]);
465
+ outColors.push(
466
+ c[0],
467
+ c[1],
468
+ c[2],
469
+ c[3],
470
+ c[0],
471
+ c[1],
472
+ c[2],
473
+ c[3],
474
+ c[0],
475
+ c[1],
476
+ c[2],
477
+ c[3],
478
+ c[0],
479
+ c[1],
480
+ c[2],
481
+ c[3]
482
+ );
483
+ outStrokeColors.push(
484
+ sc[0],
485
+ sc[1],
486
+ sc[2],
487
+ sc[3],
488
+ sc[0],
489
+ sc[1],
490
+ sc[2],
491
+ sc[3],
492
+ sc[0],
493
+ sc[1],
494
+ sc[2],
495
+ sc[3],
496
+ sc[0],
497
+ sc[1],
498
+ sc[2],
499
+ sc[3]
500
+ );
501
+ outPickingColors.push(
502
+ p[0],
503
+ p[1],
504
+ p[2],
505
+ p[3],
506
+ p[0],
507
+ p[1],
508
+ p[2],
509
+ p[3],
510
+ p[0],
511
+ p[1],
512
+ p[2],
513
+ p[3],
514
+ p[0],
515
+ p[1],
516
+ p[2],
517
+ p[3]
518
+ );
241
519
 
242
520
  if (j < pathArr.length - 1) {
243
521
  index += 8;
@@ -271,13 +549,15 @@ class GeometryHandler {
271
549
  geometry._lineVerticesLowMerc = [];
272
550
 
273
551
  if (geometry._type === GeometryType.POLYGON) {
274
-
275
552
  let coordinates = geometry._coordinates;
276
553
  let ci = [];
277
554
  for (let j = 0; j < coordinates.length; j++) {
278
555
  ci[j] = [];
279
556
  for (var k = 0; k < coordinates[j].length; k++) {
280
- ci[j][k] = [mercator.forward_lon(coordinates[j][k][0]), mercator.forward_lat(coordinates[j][k][1])];
557
+ ci[j][k] = [
558
+ mercator.forward_lon(coordinates[j][k][0]),
559
+ mercator.forward_lat(coordinates[j][k][1])
560
+ ];
281
561
  }
282
562
  }
283
563
 
@@ -298,7 +578,12 @@ class GeometryHandler {
298
578
 
299
579
  for (let i = 0; i < data.vertices.length * 0.5; i++) {
300
580
  this._polyColors.push(color.x, color.y, color.z, color.w);
301
- this._polyPickingColors.push(pickingColor.x, pickingColor.y, pickingColor.z, 1.0);
581
+ this._polyPickingColors.push(
582
+ pickingColor.x,
583
+ pickingColor.y,
584
+ pickingColor.z,
585
+ 1.0
586
+ );
302
587
  }
303
588
 
304
589
  for (let i = 0; i < data.vertices.length; i++) {
@@ -323,20 +608,38 @@ class GeometryHandler {
323
608
  geometry._lineColorsHandlerIndex = this._lineColors.length;
324
609
  geometry._lineThicknessHandlerIndex = this._lineThickness.length;
325
610
 
326
- GeometryHandler.appendLineData(ci, true,
327
- geometry._style.lineColor, pickingColor, geometry._style.lineWidth,
328
- geometry._style.strokeColor, geometry._style.strokeWidth,
329
- this._lineVerticesHighMerc, this._lineVerticesLowMerc, this._lineOrders, this._lineIndexes, this._lineColors, this._linePickingColors,
330
- this._lineThickness, this._lineStrokeColors, this._lineStrokes, geometry._lineVerticesHighMerc, geometry._lineVerticesLowMerc);
331
-
332
- geometry._lineVerticesLength = this._lineVerticesHighMerc.length - geometry._lineVerticesHandlerIndex;
333
- geometry._lineOrdersLength = this._lineOrders.length - geometry._lineOrdersHandlerIndex;
334
- geometry._lineIndexesLength = this._lineIndexes.length - geometry._lineIndexesHandlerIndex;
335
- geometry._lineColorsLength = this._lineColors.length - geometry._lineColorsHandlerIndex;
336
- geometry._lineThicknessLength = this._lineThickness.length - geometry._lineThicknessHandlerIndex;
337
-
611
+ GeometryHandler.appendLineData(
612
+ ci,
613
+ true,
614
+ geometry._style.lineColor,
615
+ pickingColor,
616
+ geometry._style.lineWidth,
617
+ geometry._style.strokeColor,
618
+ geometry._style.strokeWidth,
619
+ this._lineVerticesHighMerc,
620
+ this._lineVerticesLowMerc,
621
+ this._lineOrders,
622
+ this._lineIndexes,
623
+ this._lineColors,
624
+ this._linePickingColors,
625
+ this._lineThickness,
626
+ this._lineStrokeColors,
627
+ this._lineStrokes,
628
+ geometry._lineVerticesHighMerc,
629
+ geometry._lineVerticesLowMerc
630
+ );
631
+
632
+ geometry._lineVerticesLength =
633
+ this._lineVerticesHighMerc.length - geometry._lineVerticesHandlerIndex;
634
+ geometry._lineOrdersLength =
635
+ this._lineOrders.length - geometry._lineOrdersHandlerIndex;
636
+ geometry._lineIndexesLength =
637
+ this._lineIndexes.length - geometry._lineIndexesHandlerIndex;
638
+ geometry._lineColorsLength =
639
+ this._lineColors.length - geometry._lineColorsHandlerIndex;
640
+ geometry._lineThicknessLength =
641
+ this._lineThickness.length - geometry._lineThicknessHandlerIndex;
338
642
  } else if (geometry._type === GeometryType.MULTIPOLYGON) {
339
-
340
643
  let coordinates = geometry._coordinates;
341
644
  let vertices = [],
342
645
  indexes = [];
@@ -354,7 +657,10 @@ class GeometryHandler {
354
657
  for (let j = 0; j < cci.length; j++) {
355
658
  ci[j] = [];
356
659
  for (let k = 0; k < coordinates[i][j].length; k++) {
357
- ci[j][k] = [mercator.forward_lon(cci[j][k][0]), mercator.forward_lat(cci[j][k][1])];
660
+ ci[j][k] = [
661
+ mercator.forward_lon(cci[j][k][0]),
662
+ mercator.forward_lat(cci[j][k][1])
663
+ ];
358
664
  }
359
665
  }
360
666
  let data = flatten(ci);
@@ -366,11 +672,26 @@ class GeometryHandler {
366
672
 
367
673
  vertices.push.apply(vertices, data.vertices);
368
674
 
369
- GeometryHandler.appendLineData(ci, true,
370
- geometry._style.lineColor, pickingColor, geometry._style.lineWidth,
371
- geometry._style.strokeColor, geometry._style.strokeWidth,
372
- this._lineVerticesHighMerc, this._lineVerticesLowMerc, this._lineOrders, this._lineIndexes, this._lineColors, this._linePickingColors,
373
- this._lineThickness, this._lineStrokeColors, this._lineStrokes, geometry._lineVerticesHighMerc, geometry._lineVerticesLowMerc);
675
+ GeometryHandler.appendLineData(
676
+ ci,
677
+ true,
678
+ geometry._style.lineColor,
679
+ pickingColor,
680
+ geometry._style.lineWidth,
681
+ geometry._style.strokeColor,
682
+ geometry._style.strokeWidth,
683
+ this._lineVerticesHighMerc,
684
+ this._lineVerticesLowMerc,
685
+ this._lineOrders,
686
+ this._lineIndexes,
687
+ this._lineColors,
688
+ this._linePickingColors,
689
+ this._lineThickness,
690
+ this._lineStrokeColors,
691
+ this._lineStrokes,
692
+ geometry._lineVerticesHighMerc,
693
+ geometry._lineVerticesLowMerc
694
+ );
374
695
  }
375
696
 
376
697
  geometry._polyVerticesHandlerIndex = this._polyVerticesHighMerc.length;
@@ -387,7 +708,12 @@ class GeometryHandler {
387
708
 
388
709
  for (let i = 0; i < vertices.length * 0.5; i++) {
389
710
  this._polyColors.push(color.x, color.y, color.z, color.w);
390
- this._polyPickingColors.push(pickingColor.x, pickingColor.y, pickingColor.z, 1.0);
711
+ this._polyPickingColors.push(
712
+ pickingColor.x,
713
+ pickingColor.y,
714
+ pickingColor.z,
715
+ 1.0
716
+ );
391
717
  }
392
718
 
393
719
  for (let i = 0; i < vertices.length; i++) {
@@ -405,18 +731,24 @@ class GeometryHandler {
405
731
  geometry._polyVerticesLength = vertices.length;
406
732
  geometry._polyIndexesLength = indexes.length;
407
733
 
408
- geometry._lineVerticesLength = this._lineVerticesHighMerc.length - geometry._lineVerticesHandlerIndex;
409
- geometry._lineOrdersLength = this._lineOrders.length - geometry._lineOrdersHandlerIndex;
410
- geometry._lineIndexesLength = this._lineIndexes.length - geometry._lineIndexesHandlerIndex;
411
- geometry._lineColorsLength = this._lineColors.length - geometry._lineColorsHandlerIndex;
412
- geometry._lineThicknessLength = this._lineThickness.length - geometry._lineThicknessHandlerIndex;
413
-
734
+ geometry._lineVerticesLength =
735
+ this._lineVerticesHighMerc.length - geometry._lineVerticesHandlerIndex;
736
+ geometry._lineOrdersLength =
737
+ this._lineOrders.length - geometry._lineOrdersHandlerIndex;
738
+ geometry._lineIndexesLength =
739
+ this._lineIndexes.length - geometry._lineIndexesHandlerIndex;
740
+ geometry._lineColorsLength =
741
+ this._lineColors.length - geometry._lineColorsHandlerIndex;
742
+ geometry._lineThicknessLength =
743
+ this._lineThickness.length - geometry._lineThicknessHandlerIndex;
414
744
  } else if (geometry._type === GeometryType.LINESTRING) {
415
-
416
745
  let coordinates = geometry._coordinates;
417
746
  let ci = new Array(coordinates.length);
418
747
  for (let j = 0; j < coordinates.length; j++) {
419
- ci[j] = [mercator.forward_lon(coordinates[j][0]), mercator.forward_lat(coordinates[j][1])];
748
+ ci[j] = [
749
+ mercator.forward_lon(coordinates[j][0]),
750
+ mercator.forward_lat(coordinates[j][1])
751
+ ];
420
752
  }
421
753
 
422
754
  // Creates polygon stroke data
@@ -426,25 +758,47 @@ class GeometryHandler {
426
758
  geometry._lineColorsHandlerIndex = this._lineColors.length;
427
759
  geometry._lineThicknessHandlerIndex = this._lineThickness.length;
428
760
 
429
- GeometryHandler.appendLineData([ci], false,
430
- geometry._style.lineColor, pickingColor, geometry._style.lineWidth,
431
- geometry._style.strokeColor, geometry._style.strokeWidth,
432
- this._lineVerticesHighMerc, this._lineVerticesLowMerc, this._lineOrders, this._lineIndexes, this._lineColors, this._linePickingColors,
433
- this._lineThickness, this._lineStrokeColors, this._lineStrokes, geometry._lineVerticesHighMerc, geometry._lineVerticesLowMerc);
434
-
435
- geometry._lineVerticesLength = this._lineVerticesHighMerc.length - geometry._lineVerticesHandlerIndex;
436
- geometry._lineOrdersLength = this._lineOrders.length - geometry._lineOrdersHandlerIndex;
437
- geometry._lineIndexesLength = this._lineIndexes.length - geometry._lineIndexesHandlerIndex;
438
- geometry._lineColorsLength = this._lineColors.length - geometry._lineColorsHandlerIndex;
439
- geometry._lineThicknessLength = this._lineThickness.length - geometry._lineThicknessHandlerIndex;
440
-
761
+ GeometryHandler.appendLineData(
762
+ [ci],
763
+ false,
764
+ geometry._style.lineColor,
765
+ pickingColor,
766
+ geometry._style.lineWidth,
767
+ geometry._style.strokeColor,
768
+ geometry._style.strokeWidth,
769
+ this._lineVerticesHighMerc,
770
+ this._lineVerticesLowMerc,
771
+ this._lineOrders,
772
+ this._lineIndexes,
773
+ this._lineColors,
774
+ this._linePickingColors,
775
+ this._lineThickness,
776
+ this._lineStrokeColors,
777
+ this._lineStrokes,
778
+ geometry._lineVerticesHighMerc,
779
+ geometry._lineVerticesLowMerc
780
+ );
781
+
782
+ geometry._lineVerticesLength =
783
+ this._lineVerticesHighMerc.length - geometry._lineVerticesHandlerIndex;
784
+ geometry._lineOrdersLength =
785
+ this._lineOrders.length - geometry._lineOrdersHandlerIndex;
786
+ geometry._lineIndexesLength =
787
+ this._lineIndexes.length - geometry._lineIndexesHandlerIndex;
788
+ geometry._lineColorsLength =
789
+ this._lineColors.length - geometry._lineColorsHandlerIndex;
790
+ geometry._lineThicknessLength =
791
+ this._lineThickness.length - geometry._lineThicknessHandlerIndex;
441
792
  } else if (geometry._type === GeometryType.MULTILINESTRING) {
442
793
  let coordinates = geometry._coordinates;
443
794
  let ci = [];
444
795
  for (let j = 0; j < coordinates.length; j++) {
445
796
  ci[j] = [];
446
797
  for (let k = 0; k < coordinates[j].length; k++) {
447
- ci[j][k] = [mercator.forward_lon(coordinates[j][k][0]), mercator.forward_lat(coordinates[j][k][1])];
798
+ ci[j][k] = [
799
+ mercator.forward_lon(coordinates[j][k][0]),
800
+ mercator.forward_lat(coordinates[j][k][1])
801
+ ];
448
802
  }
449
803
  }
450
804
 
@@ -455,17 +809,37 @@ class GeometryHandler {
455
809
  geometry._lineColorsHandlerIndex = this._lineColors.length;
456
810
  geometry._lineThicknessHandlerIndex = this._lineThickness.length;
457
811
 
458
- GeometryHandler.appendLineData(ci, false,
459
- geometry._style.lineColor, pickingColor, geometry._style.lineWidth,
460
- geometry._style.strokeColor, geometry._style.strokeWidth,
461
- this._lineVerticesHighMerc, this._lineVerticesLowMerc, this._lineOrders, this._lineIndexes, this._lineColors, this._linePickingColors,
462
- this._lineThickness, this._lineStrokeColors, this._lineStrokes, geometry._lineVerticesHighMerc, geometry._lineVerticesLowMerc);
463
-
464
- geometry._lineVerticesLength = this._lineVerticesHighMerc.length - geometry._lineVerticesHandlerIndex;
465
- geometry._lineOrdersLength = this._lineOrders.length - geometry._lineOrdersHandlerIndex;
466
- geometry._lineIndexesLength = this._lineIndexes.length - geometry._lineIndexesHandlerIndex;
467
- geometry._lineColorsLength = this._lineColors.length - geometry._lineColorsHandlerIndex;
468
- geometry._lineThicknessLength = this._lineThickness.length - geometry._lineThicknessHandlerIndex;
812
+ GeometryHandler.appendLineData(
813
+ ci,
814
+ false,
815
+ geometry._style.lineColor,
816
+ pickingColor,
817
+ geometry._style.lineWidth,
818
+ geometry._style.strokeColor,
819
+ geometry._style.strokeWidth,
820
+ this._lineVerticesHighMerc,
821
+ this._lineVerticesLowMerc,
822
+ this._lineOrders,
823
+ this._lineIndexes,
824
+ this._lineColors,
825
+ this._linePickingColors,
826
+ this._lineThickness,
827
+ this._lineStrokeColors,
828
+ this._lineStrokes,
829
+ geometry._lineVerticesHighMerc,
830
+ geometry._lineVerticesLowMerc
831
+ );
832
+
833
+ geometry._lineVerticesLength =
834
+ this._lineVerticesHighMerc.length - geometry._lineVerticesHandlerIndex;
835
+ geometry._lineOrdersLength =
836
+ this._lineOrders.length - geometry._lineOrdersHandlerIndex;
837
+ geometry._lineIndexesLength =
838
+ this._lineIndexes.length - geometry._lineIndexesHandlerIndex;
839
+ geometry._lineColorsLength =
840
+ this._lineColors.length - geometry._lineColorsHandlerIndex;
841
+ geometry._lineThicknessLength =
842
+ this._lineThickness.length - geometry._lineThicknessHandlerIndex;
469
843
  }
470
844
 
471
845
  // Refresh visibility
@@ -484,12 +858,27 @@ class GeometryHandler {
484
858
 
485
859
  // polygon
486
860
  // this._polyVerticesLonLat.splice(geometry._polyVerticesHandlerIndex, geometry._polyVerticesLength);
487
- this._polyVerticesHighMerc.splice(geometry._polyVerticesHandlerIndex, geometry._polyVerticesLength);
488
- this._polyVerticesLowMerc.splice(geometry._polyVerticesHandlerIndex, geometry._polyVerticesLength);
489
-
490
- this._polyColors.splice(geometry._polyVerticesHandlerIndex * 2, geometry._polyVerticesLength * 2);
491
- this._polyPickingColors.splice(geometry._polyVerticesHandlerIndex * 2, geometry._polyVerticesLength * 2);
492
- this._polyIndexes.splice(geometry._polyIndexesHandlerIndex, geometry._polyIndexesLength);
861
+ this._polyVerticesHighMerc.splice(
862
+ geometry._polyVerticesHandlerIndex,
863
+ geometry._polyVerticesLength
864
+ );
865
+ this._polyVerticesLowMerc.splice(
866
+ geometry._polyVerticesHandlerIndex,
867
+ geometry._polyVerticesLength
868
+ );
869
+
870
+ this._polyColors.splice(
871
+ geometry._polyVerticesHandlerIndex * 2,
872
+ geometry._polyVerticesLength * 2
873
+ );
874
+ this._polyPickingColors.splice(
875
+ geometry._polyVerticesHandlerIndex * 2,
876
+ geometry._polyVerticesLength * 2
877
+ );
878
+ this._polyIndexes.splice(
879
+ geometry._polyIndexesHandlerIndex,
880
+ geometry._polyIndexesLength
881
+ );
493
882
  var di = geometry._polyVerticesLength * 0.5;
494
883
  for (var i = geometry._polyIndexesHandlerIndex; i < this._polyIndexes.length; i++) {
495
884
  this._polyIndexes[i] -= di;
@@ -497,15 +886,36 @@ class GeometryHandler {
497
886
 
498
887
  // line
499
888
  // this._lineVerticesLonLat.splice(geometry._lineVerticesHandlerIndex, geometry._lineVerticesLength);
500
- this._lineVerticesHighMerc.splice(geometry._lineVerticesHandlerIndex, geometry._lineVerticesLength);
501
- this._lineVerticesLowMerc.splice(geometry._lineVerticesHandlerIndex, geometry._lineVerticesLength);
889
+ this._lineVerticesHighMerc.splice(
890
+ geometry._lineVerticesHandlerIndex,
891
+ geometry._lineVerticesLength
892
+ );
893
+ this._lineVerticesLowMerc.splice(
894
+ geometry._lineVerticesHandlerIndex,
895
+ geometry._lineVerticesLength
896
+ );
502
897
  this._lineOrders.splice(geometry._lineOrdersHandlerIndex, geometry._lineOrdersLength);
503
898
  this._lineColors.splice(geometry._lineColorsHandlerIndex, geometry._lineColorsLength);
504
- this._linePickingColors.splice(geometry._lineColorsHandlerIndex, geometry._lineColorsLength);
505
- this._lineStrokeColors.splice(geometry._lineColorsHandlerIndex, geometry._lineColorsLength);
506
- this._lineThickness.splice(geometry._lineThicknessHandlerIndex, geometry._lineThicknessLength);
507
- this._lineStrokes.splice(geometry._lineThicknessHandlerIndex, geometry._lineThicknessLength);
508
- this._lineIndexes.splice(geometry._lineIndexesHandlerIndex, geometry._lineIndexesLength);
899
+ this._linePickingColors.splice(
900
+ geometry._lineColorsHandlerIndex,
901
+ geometry._lineColorsLength
902
+ );
903
+ this._lineStrokeColors.splice(
904
+ geometry._lineColorsHandlerIndex,
905
+ geometry._lineColorsLength
906
+ );
907
+ this._lineThickness.splice(
908
+ geometry._lineThicknessHandlerIndex,
909
+ geometry._lineThicknessLength
910
+ );
911
+ this._lineStrokes.splice(
912
+ geometry._lineThicknessHandlerIndex,
913
+ geometry._lineThicknessLength
914
+ );
915
+ this._lineIndexes.splice(
916
+ geometry._lineIndexesHandlerIndex,
917
+ geometry._lineIndexesLength
918
+ );
509
919
  di = geometry._lineVerticesLength * 0.5;
510
920
  for (let i = geometry._lineIndexesHandlerIndex; i < this._lineIndexes.length; i++) {
511
921
  this._lineIndexes[i] -= di;
@@ -551,7 +961,8 @@ class GeometryHandler {
551
961
  geometry._lineThicknessHandlerIndex = -1;
552
962
  geometry._lineColorsHandlerIndex = -1;
553
963
 
554
- !this._removeGeometryExtents[geometry._id] && this._removeGeometryExtentArr.push(geometry.getExtent());
964
+ !this._removeGeometryExtents[geometry._id] &&
965
+ this._removeGeometryExtentArr.push(geometry.getExtent());
555
966
  this._removeGeometryExtents[geometry._id] = true;
556
967
 
557
968
  this.refresh();
@@ -753,9 +1164,14 @@ class GeometryHandler {
753
1164
  }
754
1165
 
755
1166
  bringToFront(geometry) {
756
-
757
- var polyIndexes = this._polyIndexes.splice(geometry._polyIndexesHandlerIndex, geometry._polyIndexesLength);
758
- var lineIndexes = this._lineIndexes.splice(geometry._lineIndexesHandlerIndex, geometry._lineIndexesLength);
1167
+ var polyIndexes = this._polyIndexes.splice(
1168
+ geometry._polyIndexesHandlerIndex,
1169
+ geometry._polyIndexesLength
1170
+ );
1171
+ var lineIndexes = this._lineIndexes.splice(
1172
+ geometry._lineIndexesHandlerIndex,
1173
+ geometry._lineIndexesLength
1174
+ );
759
1175
 
760
1176
  this._geometries.splice(geometry._handlerIndex, 1);
761
1177
 
@@ -786,80 +1202,136 @@ class GeometryHandler {
786
1202
  createPolyVerticesBuffer() {
787
1203
  var h = this._handler;
788
1204
  h.gl.deleteBuffer(this._polyVerticesHighBufferMerc);
789
- this._polyVerticesHighBufferMerc = h.createArrayBuffer(new Float32Array(this._polyVerticesHighMerc), 2, this._polyVerticesHighMerc.length / 2);
1205
+ this._polyVerticesHighBufferMerc = h.createArrayBuffer(
1206
+ new Float32Array(this._polyVerticesHighMerc),
1207
+ 2,
1208
+ this._polyVerticesHighMerc.length / 2
1209
+ );
790
1210
 
791
1211
  h.gl.deleteBuffer(this._polyVerticesLowBufferMerc);
792
- this._polyVerticesLowBufferMerc = h.createArrayBuffer(new Float32Array(this._polyVerticesLowMerc), 2, this._polyVerticesLowMerc.length / 2);
1212
+ this._polyVerticesLowBufferMerc = h.createArrayBuffer(
1213
+ new Float32Array(this._polyVerticesLowMerc),
1214
+ 2,
1215
+ this._polyVerticesLowMerc.length / 2
1216
+ );
793
1217
  }
794
1218
 
795
1219
  createPolyIndexesBuffer() {
796
1220
  var h = this._handler;
797
1221
  h.gl.deleteBuffer(this._polyIndexesBuffer);
798
- this._polyIndexesBuffer = h.createElementArrayBuffer(new Uint32Array(this._polyIndexes), 1, this._polyIndexes.length);
1222
+ this._polyIndexesBuffer = h.createElementArrayBuffer(
1223
+ new Uint32Array(this._polyIndexes),
1224
+ 1,
1225
+ this._polyIndexes.length
1226
+ );
799
1227
  }
800
1228
 
801
1229
  createPolyColorsBuffer() {
802
1230
  var h = this._handler;
803
1231
  h.gl.deleteBuffer(this._polyColorsBuffer);
804
- this._polyColorsBuffer = h.createArrayBuffer(new Float32Array(this._polyColors), 4, this._polyColors.length / 4);
1232
+ this._polyColorsBuffer = h.createArrayBuffer(
1233
+ new Float32Array(this._polyColors),
1234
+ 4,
1235
+ this._polyColors.length / 4
1236
+ );
805
1237
  }
806
1238
 
807
1239
  createPolyPickingColorsBuffer() {
808
1240
  var h = this._handler;
809
1241
  h.gl.deleteBuffer(this._polyPickingColorsBuffer);
810
- this._polyPickingColorsBuffer = h.createArrayBuffer(new Float32Array(this._polyPickingColors), 4, this._polyPickingColors.length / 4);
1242
+ this._polyPickingColorsBuffer = h.createArrayBuffer(
1243
+ new Float32Array(this._polyPickingColors),
1244
+ 4,
1245
+ this._polyPickingColors.length / 4
1246
+ );
811
1247
  }
812
1248
 
813
1249
  createLineVerticesBuffer() {
814
1250
  var h = this._handler;
815
1251
  h.gl.deleteBuffer(this._lineVerticesHighBufferMerc);
816
- this._lineVerticesHighBufferMerc = h.createArrayBuffer(new Float32Array(this._lineVerticesHighMerc), 2, this._lineVerticesHighMerc.length / 2);
1252
+ this._lineVerticesHighBufferMerc = h.createArrayBuffer(
1253
+ new Float32Array(this._lineVerticesHighMerc),
1254
+ 2,
1255
+ this._lineVerticesHighMerc.length / 2
1256
+ );
817
1257
 
818
1258
  h.gl.deleteBuffer(this._lineVerticesLowBufferMerc);
819
- this._lineVerticesLowBufferMerc = h.createArrayBuffer(new Float32Array(this._lineVerticesLowMerc), 2, this._lineVerticesLowMerc.length / 2);
1259
+ this._lineVerticesLowBufferMerc = h.createArrayBuffer(
1260
+ new Float32Array(this._lineVerticesLowMerc),
1261
+ 2,
1262
+ this._lineVerticesLowMerc.length / 2
1263
+ );
820
1264
  }
821
1265
 
822
1266
  createLineIndexesBuffer() {
823
1267
  var h = this._handler;
824
1268
  h.gl.deleteBuffer(this._lineIndexesBuffer);
825
- this._lineIndexesBuffer = h.createElementArrayBuffer(new Uint32Array(this._lineIndexes), 1, this._lineIndexes.length);
1269
+ this._lineIndexesBuffer = h.createElementArrayBuffer(
1270
+ new Uint32Array(this._lineIndexes),
1271
+ 1,
1272
+ this._lineIndexes.length
1273
+ );
826
1274
  }
827
1275
 
828
1276
  createLineOrdersBuffer() {
829
1277
  var h = this._handler;
830
1278
  h.gl.deleteBuffer(this._lineOrdersBuffer);
831
- this._lineOrdersBuffer = h.createArrayBuffer(new Float32Array(this._lineOrders), 1, this._lineOrders.length / 2);
1279
+ this._lineOrdersBuffer = h.createArrayBuffer(
1280
+ new Float32Array(this._lineOrders),
1281
+ 1,
1282
+ this._lineOrders.length / 2
1283
+ );
832
1284
  }
833
1285
 
834
1286
  createLineColorsBuffer() {
835
1287
  var h = this._handler;
836
1288
  h.gl.deleteBuffer(this._lineColorsBuffer);
837
- this._lineColorsBuffer = h.createArrayBuffer(new Float32Array(this._lineColors), 4, this._lineColors.length / 4);
1289
+ this._lineColorsBuffer = h.createArrayBuffer(
1290
+ new Float32Array(this._lineColors),
1291
+ 4,
1292
+ this._lineColors.length / 4
1293
+ );
838
1294
  }
839
1295
 
840
1296
  createLinePickingColorsBuffer() {
841
1297
  var h = this._handler;
842
1298
  h.gl.deleteBuffer(this._linePickingColorsBuffer);
843
- this._linePickingColorsBuffer = h.createArrayBuffer(new Float32Array(this._linePickingColors), 4, this._linePickingColors.length / 4);
1299
+ this._linePickingColorsBuffer = h.createArrayBuffer(
1300
+ new Float32Array(this._linePickingColors),
1301
+ 4,
1302
+ this._linePickingColors.length / 4
1303
+ );
844
1304
  }
845
1305
 
846
1306
  createLineThicknessBuffer() {
847
1307
  var h = this._handler;
848
1308
  h.gl.deleteBuffer(this._lineThicknessBuffer);
849
- this._lineThicknessBuffer = h.createArrayBuffer(new Float32Array(this._lineThickness), 1, this._lineThickness.length);
1309
+ this._lineThicknessBuffer = h.createArrayBuffer(
1310
+ new Float32Array(this._lineThickness),
1311
+ 1,
1312
+ this._lineThickness.length
1313
+ );
850
1314
  }
851
1315
 
852
1316
  createLineStrokesBuffer() {
853
1317
  var h = this._handler;
854
1318
  h.gl.deleteBuffer(this._lineStrokesBuffer);
855
- this._lineStrokesBuffer = h.createArrayBuffer(new Float32Array(this._lineStrokes), 1, this._lineStrokes.length);
1319
+ this._lineStrokesBuffer = h.createArrayBuffer(
1320
+ new Float32Array(this._lineStrokes),
1321
+ 1,
1322
+ this._lineStrokes.length
1323
+ );
856
1324
  }
857
1325
 
858
1326
  createLineStrokeColorsBuffer() {
859
1327
  var h = this._handler;
860
1328
  h.gl.deleteBuffer(this._lineStrokeColorsBuffer);
861
- this._lineStrokeColorsBuffer = h.createArrayBuffer(new Float32Array(this._lineStrokeColors), 4, this._lineStrokeColors.length / 4);
1329
+ this._lineStrokeColorsBuffer = h.createArrayBuffer(
1330
+ new Float32Array(this._lineStrokeColors),
1331
+ 4,
1332
+ this._lineStrokeColors.length / 4
1333
+ );
862
1334
  }
863
1335
  }
864
1336
 
865
- export { GeometryHandler };
1337
+ export { GeometryHandler };