@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,10 +2,10 @@
2
2
  * @module og/entity/PointCloud
3
3
  */
4
4
 
5
- 'use strict';
5
+ "use strict";
6
6
 
7
- import { Vec3 } from '../math/Vec3.js';
8
- import { Vec4 } from '../math/Vec4.js';
7
+ import { Vec3 } from "../math/Vec3.js";
8
+ import { Vec4 } from "../math/Vec4.js";
9
9
 
10
10
  const COORDINATES_BUFFER = 0;
11
11
  const COLOR_BUFFER = 1;
@@ -15,7 +15,7 @@ const PICKING_COLOR_BUFFER = 2;
15
15
  * PointCloud object.
16
16
  * @class
17
17
  * @param {*} [options] - Point cloud options:
18
- * @param {Array.<Array.<number>>} [options.points] - Points cartesian coordinates array,
18
+ * @param {Array.<Array.<number>>} [options.points] - Points cartesian coordinates array,
19
19
  * where first three is cartesian coordinates, next fourth is a RGBA color, and last is an point properties.
20
20
  * @param {number} [options.pointSize] - Point screen size in pixels.
21
21
  * @param {number} [options.pickingDistance] - Point border picking size in screen pixels.
@@ -33,7 +33,6 @@ const PICKING_COLOR_BUFFER = 2;
33
33
  */
34
34
  class PointCloud {
35
35
  constructor(options) {
36
-
37
36
  options = options || {};
38
37
 
39
38
  /**
@@ -49,7 +48,7 @@ class PointCloud {
49
48
  * @public
50
49
  * @type {boolean}
51
50
  */
52
- this.visibility = (options.visibility != undefined ? options.visibility : true);
51
+ this.visibility = options.visibility != undefined ? options.visibility : true;
53
52
 
54
53
  /**
55
54
  * Point screen size in pixels.
@@ -145,7 +144,6 @@ class PointCloud {
145
144
  * @public
146
145
  */
147
146
  clear() {
148
-
149
147
  this._points.length = 0;
150
148
  this._points = [];
151
149
 
@@ -217,7 +215,7 @@ class PointCloud {
217
215
  for (var i = 0; i < points.length; i++) {
218
216
  var pi = points[i];
219
217
  var pos = new Vec3(pi[0], pi[1], pi[2]),
220
- col = new Vec4(pi[3], pi[4], pi[5], (pi[6] == undefined ? 255.0 : pi[6]));
218
+ col = new Vec4(pi[3], pi[4], pi[5], pi[6] == undefined ? 255.0 : pi[6]);
221
219
  this._coordinatesData.push(pos.x, pos.y, pos.z);
222
220
  this._colorData.push(col.x / 255.0, col.y / 255.0, col.z / 255.0, col.w / 255.0);
223
221
  var p = {
@@ -233,7 +231,12 @@ class PointCloud {
233
231
 
234
232
  if (this._renderNode) {
235
233
  this._renderNode.renderer.assignPickingColor(p);
236
- this._pickingColorData.push(p._pickingColor.x / 255.0, p._pickingColor.y / 255.0, p._pickingColor.z / 255.0, 1.0);
234
+ this._pickingColorData.push(
235
+ p._pickingColor.x / 255.0,
236
+ p._pickingColor.y / 255.0,
237
+ p._pickingColor.z / 255.0,
238
+ 1.0
239
+ );
237
240
  }
238
241
  }
239
242
 
@@ -243,21 +246,18 @@ class PointCloud {
243
246
  }
244
247
 
245
248
  setPointPosition(index, x, y, z) {
246
-
247
249
  // TODO: ...
248
250
 
249
251
  this._changedBuffers[COORDINATES_BUFFER] = true;
250
252
  }
251
253
 
252
254
  setPointColor(index, r, g, b, a) {
253
-
254
255
  // TODO: ...
255
256
 
256
257
  this._changedBuffers[COLOR_BUFFER] = true;
257
258
  }
258
259
 
259
260
  addPoints(points) {
260
-
261
261
  // TODO: ...
262
262
 
263
263
  this._changedBuffers[COORDINATES_BUFFER] = true;
@@ -266,7 +266,6 @@ class PointCloud {
266
266
  }
267
267
 
268
268
  addPoint(index, point) {
269
-
270
269
  // TODO: ...
271
270
 
272
271
  this._changedBuffers[COORDINATES_BUFFER] = true;
@@ -285,7 +284,6 @@ class PointCloud {
285
284
  }
286
285
 
287
286
  removePoint(index) {
288
-
289
287
  // TODO: ...
290
288
 
291
289
  this._changedBuffers[COORDINATES_BUFFER] = true;
@@ -294,7 +292,6 @@ class PointCloud {
294
292
  }
295
293
 
296
294
  insertPoint(index, point) {
297
-
298
295
  // TODO: ...
299
296
 
300
297
  this._changedBuffers[COORDINATES_BUFFER] = true;
@@ -316,7 +313,6 @@ class PointCloud {
316
313
 
317
314
  draw() {
318
315
  if (this.visibility && this._coordinatesData.length) {
319
-
320
316
  this._update();
321
317
 
322
318
  var rn = this._renderNode;
@@ -327,18 +323,32 @@ class PointCloud {
327
323
  sha = p.attributes,
328
324
  shu = p.uniforms;
329
325
 
330
- gl.polygonOffset(this._handler._entityCollection.polygonOffsetFactor, this._handler._entityCollection.polygonOffsetUnits);
326
+ gl.polygonOffset(
327
+ this._handler._entityCollection.polygonOffsetFactor,
328
+ this._handler._entityCollection.polygonOffsetUnits
329
+ );
331
330
 
332
331
  sh.activate();
333
332
 
334
- gl.uniformMatrix4fv(shu.projectionViewMatrix, false, r.activeCamera._projectionViewMatrix._m);
333
+ gl.uniformMatrix4fv(
334
+ shu.projectionViewMatrix,
335
+ false,
336
+ r.activeCamera._projectionViewMatrix._m
337
+ );
335
338
 
336
339
  gl.uniform1f(shu.opacity, this._handler._entityCollection._fadingOpacity);
337
340
 
338
341
  gl.uniform1f(shu.pointSize, this.pointSize);
339
342
 
340
343
  gl.bindBuffer(gl.ARRAY_BUFFER, this._coordinatesBuffer);
341
- gl.vertexAttribPointer(sha.coordinates, this._coordinatesBuffer.itemSize, gl.FLOAT, false, 0, 0);
344
+ gl.vertexAttribPointer(
345
+ sha.coordinates,
346
+ this._coordinatesBuffer.itemSize,
347
+ gl.FLOAT,
348
+ false,
349
+ 0,
350
+ 0
351
+ );
342
352
 
343
353
  gl.bindBuffer(gl.ARRAY_BUFFER, this._colorBuffer);
344
354
  gl.vertexAttribPointer(sha.colors, this._colorBuffer.itemSize, gl.FLOAT, false, 0, 0);
@@ -359,19 +369,40 @@ class PointCloud {
359
369
 
360
370
  sh.activate();
361
371
 
362
- gl.polygonOffset(this._handler._entityCollection.polygonOffsetFactor, this._handler._entityCollection.polygonOffsetUnits);
372
+ gl.polygonOffset(
373
+ this._handler._entityCollection.polygonOffsetFactor,
374
+ this._handler._entityCollection.polygonOffsetUnits
375
+ );
363
376
 
364
- gl.uniformMatrix4fv(shu.projectionViewMatrix, false, r.activeCamera._projectionViewMatrix._m);
377
+ gl.uniformMatrix4fv(
378
+ shu.projectionViewMatrix,
379
+ false,
380
+ r.activeCamera._projectionViewMatrix._m
381
+ );
365
382
 
366
383
  gl.uniform1f(shu.opacity, this._handler._entityCollection._fadingOpacity);
367
384
 
368
385
  gl.uniform1f(shu.pointSize, this.pointSize + this.pickingDistance);
369
386
 
370
387
  gl.bindBuffer(gl.ARRAY_BUFFER, this._coordinatesBuffer);
371
- gl.vertexAttribPointer(sha.coordinates, this._coordinatesBuffer.itemSize, gl.FLOAT, false, 0, 0);
388
+ gl.vertexAttribPointer(
389
+ sha.coordinates,
390
+ this._coordinatesBuffer.itemSize,
391
+ gl.FLOAT,
392
+ false,
393
+ 0,
394
+ 0
395
+ );
372
396
 
373
397
  gl.bindBuffer(gl.ARRAY_BUFFER, this._pickingColorBuffer);
374
- gl.vertexAttribPointer(sha.colors, this._pickingColorBuffer.itemSize, gl.FLOAT, false, 0, 0);
398
+ gl.vertexAttribPointer(
399
+ sha.colors,
400
+ this._pickingColorBuffer.itemSize,
401
+ gl.FLOAT,
402
+ false,
403
+ 0,
404
+ 0
405
+ );
375
406
 
376
407
  gl.drawArrays(gl.POINTS, 0, this._coordinatesBuffer.numItems);
377
408
  }
@@ -415,19 +446,31 @@ class PointCloud {
415
446
  _createCoordinatesBuffer() {
416
447
  var h = this._renderNode.renderer.handler;
417
448
  h.gl.deleteBuffer(this._coordinatesBuffer);
418
- this._coordinatesBuffer = h.createArrayBuffer(new Float32Array(this._coordinatesData), 3, (this._coordinatesData.length) / 3);
449
+ this._coordinatesBuffer = h.createArrayBuffer(
450
+ new Float32Array(this._coordinatesData),
451
+ 3,
452
+ this._coordinatesData.length / 3
453
+ );
419
454
  }
420
455
 
421
456
  _createColorBuffer() {
422
457
  var h = this._renderNode.renderer.handler;
423
458
  h.gl.deleteBuffer(this._colorBuffer);
424
- this._colorBuffer = h.createArrayBuffer(new Float32Array(this._colorData), 4, (this._colorData.length) / 4);
459
+ this._colorBuffer = h.createArrayBuffer(
460
+ new Float32Array(this._colorData),
461
+ 4,
462
+ this._colorData.length / 4
463
+ );
425
464
  }
426
465
 
427
466
  _createPickingColorBuffer() {
428
467
  var h = this._renderNode.renderer.handler;
429
468
  h.gl.deleteBuffer(this._pickingColorBuffer);
430
- this._pickingColorBuffer = h.createArrayBuffer(new Float32Array(this._pickingColorData), 4, (this._pickingColorData.length) / 4);
469
+ this._pickingColorBuffer = h.createArrayBuffer(
470
+ new Float32Array(this._pickingColorData),
471
+ 4,
472
+ this._pickingColorData.length / 4
473
+ );
431
474
  }
432
475
 
433
476
  _setPickingColors() {
@@ -437,11 +480,16 @@ class PointCloud {
437
480
  p._entity = this._entity;
438
481
  p._entityCollection = this._entity._entityCollection;
439
482
  this._renderNode.renderer.assignPickingColor(p);
440
- this._pickingColorData.push(p._pickingColor.x / 255.0, p._pickingColor.y / 255.0, p._pickingColor.z / 255.0, 1.0);
483
+ this._pickingColorData.push(
484
+ p._pickingColor.x / 255.0,
485
+ p._pickingColor.y / 255.0,
486
+ p._pickingColor.z / 255.0,
487
+ 1.0
488
+ );
441
489
  }
442
490
  this._changedBuffers[PICKING_COLOR_BUFFER] = true;
443
491
  }
444
492
  }
445
493
  }
446
494
 
447
- export { PointCloud };
495
+ export { PointCloud };
@@ -2,13 +2,12 @@
2
2
  * @module og/entity/PointCloudHandler
3
3
  */
4
4
 
5
- 'use strict';
5
+ "use strict";
6
6
 
7
- import * as shaders from '../shaders/pointCloud.js';
7
+ import * as shaders from "../shaders/pointCloud.js";
8
8
 
9
9
  class PointCloudHandler {
10
10
  constructor(entityCollection) {
11
-
12
11
  /**
13
12
  * Picking rendering option.
14
13
  * @public
@@ -72,7 +71,8 @@ class PointCloudHandler {
72
71
  pointCloud._handler = this;
73
72
  pointCloud._handlerIndex = this._pointClouds.length;
74
73
  this._pointClouds.push(pointCloud);
75
- this._entityCollection && this._entityCollection.renderNode &&
74
+ this._entityCollection &&
75
+ this._entityCollection.renderNode &&
76
76
  pointCloud.setRenderNode(this._entityCollection.renderNode);
77
77
  }
78
78
  }
@@ -123,4 +123,4 @@ class PointCloudHandler {
123
123
  }
124
124
  }
125
125
 
126
- export { PointCloudHandler };
126
+ export { PointCloudHandler };
@@ -2,12 +2,12 @@
2
2
  * @module og/entity/BaseBillboard
3
3
  */
4
4
 
5
- 'use strict';
5
+ "use strict";
6
6
 
7
- import * as utils from '../utils/shared.js';
8
- import { Vec3 } from '../math/Vec3.js';
9
- import { Entity } from './Entity.js';
10
- import { doubleToTwoFloats2 } from '../math/coder.js';
7
+ import * as utils from "../utils/shared.js";
8
+ import { Vec3 } from "../math/Vec3.js";
9
+ import { Entity } from "./Entity.js";
10
+ import { doubleToTwoFloats2 } from "../math/coder.js";
11
11
 
12
12
  /**
13
13
  * Ray class.
@@ -43,7 +43,11 @@ class Ray {
43
43
  this._startPosition = utils.createVector3(options.startPosition);
44
44
  this._startPositionHigh = new Vec3();
45
45
  this._startPositionLow = new Vec3();
46
- Vec3.doubleToTwoFloats(this._startPosition, this._startPositionHigh, this._startPositionLow);
46
+ Vec3.doubleToTwoFloats(
47
+ this._startPosition,
48
+ this._startPositionHigh,
49
+ this._startPositionLow
50
+ );
47
51
 
48
52
  // RTE end position
49
53
  this._endPosition = utils.createVector3(options.endPosition);
@@ -95,8 +99,17 @@ class Ray {
95
99
  this._startPosition.x = x;
96
100
  this._startPosition.y = y;
97
101
  this._startPosition.z = z;
98
- Vec3.doubleToTwoFloats(this._startPosition, this._startPositionHigh, this._startPositionLow);
99
- this._handler && this._handler.setStartPositionArr(this._handlerIndex, this._startPositionHigh, this._startPositionLow);
102
+ Vec3.doubleToTwoFloats(
103
+ this._startPosition,
104
+ this._startPositionHigh,
105
+ this._startPositionLow
106
+ );
107
+ this._handler &&
108
+ this._handler.setStartPositionArr(
109
+ this._handlerIndex,
110
+ this._startPositionHigh,
111
+ this._startPositionLow
112
+ );
100
113
  }
101
114
 
102
115
  /**
@@ -108,8 +121,17 @@ class Ray {
108
121
  this._startPosition.x = position.x;
109
122
  this._startPosition.y = position.y;
110
123
  this._startPosition.z = position.z;
111
- Vec3.doubleToTwoFloats(this._startPosition, this._startPositionHigh, this._startPositionLow);
112
- this._handler && this._handler.setStartPositionArr(this._handlerIndex, this._startPositionHigh, this._startPositionLow);
124
+ Vec3.doubleToTwoFloats(
125
+ this._startPosition,
126
+ this._startPositionHigh,
127
+ this._startPositionLow
128
+ );
129
+ this._handler &&
130
+ this._handler.setStartPositionArr(
131
+ this._handlerIndex,
132
+ this._startPositionHigh,
133
+ this._startPositionLow
134
+ );
113
135
  }
114
136
 
115
137
  /**
@@ -124,7 +146,12 @@ class Ray {
124
146
  this._endPosition.y = y;
125
147
  this._endPosition.z = z;
126
148
  Vec3.doubleToTwoFloats(this._endPosition, this._endPositionHigh, this._endPositionLow);
127
- this._handler && this._handler.setEndPositionArr(this._handlerIndex, this._endPositionHigh, this._endPositionLow);
149
+ this._handler &&
150
+ this._handler.setEndPositionArr(
151
+ this._handlerIndex,
152
+ this._endPositionHigh,
153
+ this._endPositionLow
154
+ );
128
155
  }
129
156
 
130
157
  /**
@@ -137,7 +164,12 @@ class Ray {
137
164
  this._endPosition.y = position.y;
138
165
  this._endPosition.z = position.z;
139
166
  Vec3.doubleToTwoFloats(this._endPosition, this._endPositionHigh, this._endPositionLow);
140
- this._handler && this._handler.setEndPositionArr(this._handlerIndex, this._endPositionHigh, this._endPositionLow);
167
+ this._handler &&
168
+ this._handler.setEndPositionArr(
169
+ this._handlerIndex,
170
+ this._endPositionHigh,
171
+ this._endPositionLow
172
+ );
141
173
  }
142
174
 
143
175
  setLength(length) {
@@ -165,11 +197,11 @@ class Ray {
165
197
  this._endColor.w = endColor.w;
166
198
  }
167
199
 
168
- this._handler && this._handler.setRgbaArr(this._handlerIndex, this._startColor, this._endColor);
200
+ this._handler &&
201
+ this._handler.setRgbaArr(this._handlerIndex, this._startColor, this._endColor);
169
202
  }
170
203
 
171
204
  setColorsHTML(startColor, endColor) {
172
-
173
205
  if (startColor) {
174
206
  this._startColor = utils.htmlColorToRgba(startColor);
175
207
  }
@@ -178,7 +210,8 @@ class Ray {
178
210
  this._endColor = utils.htmlColorToRgba(endColor);
179
211
  }
180
212
 
181
- this._handler && this._handler.setRgbaArr(this._handlerIndex, this._startColor, this._endColor);
213
+ this._handler &&
214
+ this._handler.setRgbaArr(this._handlerIndex, this._startColor, this._endColor);
182
215
  }
183
216
 
184
217
  /**
@@ -237,4 +270,4 @@ class Ray {
237
270
  }
238
271
  }
239
272
 
240
- export { Ray };
273
+ export { Ray };