itowns 2.44.3-next.2 → 2.44.3-next.20

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 (44) hide show
  1. package/CODING.md +1 -1
  2. package/CONTRIBUTORS.md +1 -0
  3. package/dist/debug.js +1 -1
  4. package/dist/debug.js.map +1 -1
  5. package/dist/itowns.js +1 -1
  6. package/dist/itowns.js.map +1 -1
  7. package/dist/itowns_widgets.js +1 -1
  8. package/dist/itowns_widgets.js.map +1 -1
  9. package/examples/3dtiles_loader.html +105 -44
  10. package/examples/config.json +2 -10
  11. package/examples/images/itowns_logo.svg +123 -0
  12. package/examples/js/plugins/COGParser.js +1 -1
  13. package/lib/Controls/GlobeControls.js +38 -21
  14. package/lib/Controls/StateControl.js +5 -2
  15. package/lib/Converter/Feature2Mesh.js +9 -2
  16. package/lib/Converter/textureConverter.js +3 -3
  17. package/lib/Core/Geographic/Extent.js +74 -266
  18. package/lib/Core/Prefab/Globe/GlobeLayer.js +1 -1
  19. package/lib/Core/Prefab/GlobeView.js +0 -4
  20. package/lib/Core/Prefab/Planar/PlanarLayer.js +1 -1
  21. package/lib/Core/Tile/Tile.js +219 -0
  22. package/lib/Core/Tile/TileGrid.js +46 -0
  23. package/lib/Core/TileMesh.js +2 -1
  24. package/lib/Core/View.js +13 -6
  25. package/lib/Layer/C3DTilesLayer.js +15 -14
  26. package/lib/Layer/LabelLayer.js +8 -4
  27. package/lib/Layer/OGC3DTilesLayer.js +62 -31
  28. package/lib/Parser/GeoJsonParser.js +1 -1
  29. package/lib/Parser/VectorTileParser.js +1 -1
  30. package/lib/Parser/XbilParser.js +14 -2
  31. package/lib/Provider/URLBuilder.js +22 -11
  32. package/lib/Renderer/PointsMaterial.js +1 -1
  33. package/lib/Source/TMSSource.js +9 -7
  34. package/lib/Source/VectorTilesSource.js +2 -2
  35. package/lib/Source/WFSSource.js +14 -8
  36. package/lib/Source/WMSSource.js +20 -10
  37. package/lib/Source/WMTSSource.js +13 -7
  38. package/lib/Utils/gui/C3DTilesStyle.js +2 -3
  39. package/package.json +9 -3
  40. package/examples/3dtiles_25d.html +0 -120
  41. package/examples/3dtiles_basic.html +0 -94
  42. package/examples/3dtiles_batch_table.html +0 -86
  43. package/examples/3dtiles_ion.html +0 -126
  44. package/examples/3dtiles_pointcloud.html +0 -95
@@ -9,101 +9,49 @@ import CRS from "./Crs.js";
9
9
 
10
10
  const _dim = new THREE.Vector2();
11
11
  const _dim2 = new THREE.Vector2();
12
- const _countTiles = new THREE.Vector2();
13
12
  const _box = new THREE.Box3();
14
- const tmsCoord = new THREE.Vector2();
15
- const dimensionTile = new THREE.Vector2();
16
13
  const defaultScheme = new THREE.Vector2(2, 2);
17
- const r = {
18
- row: 0,
19
- col: 0,
20
- invDiff: 0
21
- };
22
14
  const cNorthWest = new Coordinates('EPSG:4326', 0, 0, 0);
23
15
  const cSouthWest = new Coordinates('EPSG:4326', 0, 0, 0);
24
16
  const cNorthEast = new Coordinates('EPSG:4326', 0, 0, 0);
25
17
  const southWest = new THREE.Vector3();
26
18
  const northEast = new THREE.Vector3();
27
- function _rowColfromParent(extent, zoom) {
28
- const diffLevel = extent.zoom - zoom;
29
- const diff = 2 ** diffLevel;
30
- r.invDiff = 1 / diff;
31
- r.row = (extent.row - extent.row % diff) * r.invDiff;
32
- r.col = (extent.col - extent.col % diff) * r.invDiff;
33
- return r;
34
- }
19
+
20
+ /** @type {Extent} */
35
21
  let _extent;
36
- let _extent2;
37
22
  const cardinals = new Array(8);
38
23
  for (let i = cardinals.length - 1; i >= 0; i--) {
39
- cardinals[i] = new Coordinates('EPSG:4326', 0, 0, 0, 0);
24
+ cardinals[i] = new Coordinates('EPSG:4326', 0, 0, 0);
40
25
  }
41
26
  const _c = new Coordinates('EPSG:4326', 0, 0);
42
-
43
- /** @private */
44
- export const globalExtentTMS = new Map();
45
- /** @private */
46
- export const schemeTiles = new Map();
47
- function getInfoTms(crs) {
48
- const epsg = CRS.formatToEPSG(crs);
49
- const globalExtent = globalExtentTMS.get(epsg);
50
- const globalDimension = globalExtent.planarDimensions(_dim2);
51
- const tms = CRS.formatToTms(crs);
52
- const sTs = schemeTiles.get(tms) || schemeTiles.get('default');
53
- // The isInverted parameter is to be set to the correct value, true or false
54
- // (default being false) if the computation of the coordinates needs to be
55
- // inverted to match the same scheme as OSM, Google Maps or other system.
56
- // See link below for more information
57
- // https://alastaira.wordpress.com/2011/07/06/converting-tms-tile-coordinates-to-googlebingosm-tile-coordinates/
58
- // in crs includes ':NI' => tms isn't inverted (NOT INVERTED)
59
- const isInverted = !tms.includes(':NI');
60
- return {
61
- epsg,
62
- globalExtent,
63
- globalDimension,
64
- sTs,
65
- isInverted
66
- };
67
- }
68
- function getCountTiles(crs, zoom) {
69
- const sTs = schemeTiles.get(CRS.formatToTms(crs)) || schemeTiles.get('default');
70
- const count = 2 ** zoom;
71
- _countTiles.set(count, count).multiply(sTs);
72
- return _countTiles;
73
- }
74
27
  class Extent {
75
28
  /**
76
29
  * Extent is geographical bounding rectangle defined by 4 limits: west, east, south and north.
77
- * If crs is tiled projection (WMTS or TMS), the extent is defined by zoom, row and column.
78
30
  *
79
31
  * Warning, using geocentric projection isn't consistent with geographical extent.
80
32
  *
81
33
  * @param {String} crs projection of limit values.
82
- * @param {number|Array.<number>|Coordinates|Object} v0 west value, zoom
83
- * value, Array of values [west, east, south and north], Coordinates of
84
- * west-south corner or object {west, east, south and north}
85
- * @param {number|Coordinates} [v1] east value, row value or Coordinates of
34
+ * @param {number|Array.<number>|Coordinates|Object} v0 west value, Array
35
+ * of values [west, east, south and north], Coordinates of west-south
36
+ * corner or object {west, east, south and north}
37
+ * @param {number|Coordinates} [v1] east value or Coordinates of
86
38
  * east-north corner
87
- * @param {number} [v2] south value or column value
39
+ * @param {number} [v2] south value
88
40
  * @param {number} [v3] north value
89
41
  */
90
42
  constructor(crs, v0, v1, v2, v3) {
91
43
  if (CRS.isGeocentric(crs)) {
92
44
  throw new Error(`${crs} is a geocentric projection, it doesn't make sense with a geographical extent`);
93
45
  }
46
+ if (CRS.isTms(crs)) {
47
+ throw new Error(`${crs} is a tiled projection, use Tile instead`);
48
+ }
94
49
  this.isExtent = true;
95
50
  this.crs = crs;
96
- // Scale/zoom
97
- this.zoom = 0;
98
- if (CRS.isTms(this.crs)) {
99
- this.row = 0;
100
- this.col = 0;
101
- } else {
102
- this.west = 0;
103
- this.east = 0;
104
- this.south = 0;
105
- this.north = 0;
106
- }
51
+ this.west = 0;
52
+ this.east = 0;
53
+ this.south = 0;
54
+ this.north = 0;
107
55
  this.set(v0, v1, v2, v3);
108
56
  }
109
57
 
@@ -112,126 +60,48 @@ class Extent {
112
60
  * @return {Extent} cloned extent
113
61
  */
114
62
  clone() {
115
- if (CRS.isTms(this.crs)) {
116
- return new Extent(this.crs, this.zoom, this.row, this.col);
117
- } else {
118
- return new Extent(this.crs, this.west, this.east, this.south, this.north);
119
- }
120
- }
121
-
122
- /**
123
- * get tiled extents convering this extent
124
- *
125
- * @param {string} crs WMTS, TMS crs
126
- * @return {Array<Extent>} array of extents covering
127
- */
128
- tiledCovering(crs) {
129
- if (this.crs == 'EPSG:4326' && crs == CRS.tms_3857) {
130
- const extents_WMTS_PM = [];
131
- const extent = _extent.copy(this).as(CRS.formatToEPSG(crs), _extent2);
132
- const {
133
- globalExtent,
134
- globalDimension,
135
- sTs
136
- } = getInfoTms(CRS.formatToEPSG(crs));
137
- extent.clampByExtent(globalExtent);
138
- extent.planarDimensions(dimensionTile);
139
- const zoom = this.zoom + 1 || Math.floor(Math.log2(Math.round(globalDimension.x / (dimensionTile.x * sTs.x))));
140
- const countTiles = getCountTiles(crs, zoom);
141
- const center = extent.center(_c);
142
- tmsCoord.x = center.x - globalExtent.west;
143
- tmsCoord.y = globalExtent.north - extent.north;
144
- tmsCoord.divide(globalDimension).multiply(countTiles).floor();
145
-
146
- // ]N; N+1] => N
147
- const maxRow = Math.ceil((globalExtent.north - extent.south) / globalDimension.x * countTiles.y) - 1;
148
- for (let r = maxRow; r >= tmsCoord.y; r--) {
149
- extents_WMTS_PM.push(new Extent(crs, zoom, r, tmsCoord.x));
150
- }
151
- return extents_WMTS_PM;
152
- } else {
153
- const target = new Extent(crs, 0, 0, 0);
154
- const {
155
- globalExtent,
156
- globalDimension,
157
- sTs,
158
- isInverted
159
- } = getInfoTms(this.crs);
160
- const center = this.center(_c);
161
- this.planarDimensions(dimensionTile);
162
- // Each level has 2^n * 2^n tiles...
163
- // ... so we count how many tiles of the same width as tile we can fit in the layer
164
- // ... 2^zoom = tilecount => zoom = log2(tilecount)
165
- const zoom = Math.floor(Math.log2(Math.round(globalDimension.x / (dimensionTile.x * sTs.x))));
166
- const countTiles = getCountTiles(crs, zoom);
167
-
168
- // Now that we have computed zoom, we can deduce x and y (or row / column)
169
- tmsCoord.x = center.x - globalExtent.west;
170
- tmsCoord.y = isInverted ? globalExtent.north - center.y : center.y - globalExtent.south;
171
- tmsCoord.divide(globalDimension).multiply(countTiles).floor();
172
- target.set(zoom, tmsCoord.y, tmsCoord.x);
173
- return [target];
174
- }
63
+ return new Extent(this.crs, this.west, this.east, this.south, this.north);
175
64
  }
176
65
 
177
66
  /**
178
67
  * Convert Extent to the specified projection.
179
68
  * @param {string} crs the projection of destination.
180
- * @param {Extent} target copy the destination to target.
69
+ * @param {Extent} [target] copy the destination to target.
181
70
  * @return {Extent}
182
71
  */
183
72
  as(crs, target) {
184
73
  CRS.isValid(crs);
185
74
  target = target || new Extent('EPSG:4326', [0, 0, 0, 0]);
186
- if (CRS.isTms(this.crs)) {
187
- const {
188
- epsg,
189
- globalExtent,
190
- globalDimension
191
- } = getInfoTms(this.crs);
192
- const countTiles = getCountTiles(this.crs, this.zoom);
193
- dimensionTile.set(1, 1).divide(countTiles).multiply(globalDimension);
194
- target.west = globalExtent.west + (globalDimension.x - dimensionTile.x * (countTiles.x - this.col));
195
- target.east = target.west + dimensionTile.x;
196
- target.south = globalExtent.south + dimensionTile.y * (countTiles.y - this.row - 1);
197
- target.north = target.south + dimensionTile.y;
198
- target.crs = epsg;
199
- target.zoom = this.zoom;
200
- return crs == epsg ? target : target.as(crs, target);
201
- } else if (CRS.isEpsg(crs)) {
202
- if (this.crs != crs) {
203
- // Compute min/max in x/y by projecting 8 cardinal points,
204
- // and then taking the min/max of each coordinates.
205
- const center = this.center(_c);
206
- cardinals[0].setFromValues(this.west, this.north);
207
- cardinals[1].setFromValues(center.x, this.north);
208
- cardinals[2].setFromValues(this.east, this.north);
209
- cardinals[3].setFromValues(this.east, center.y);
210
- cardinals[4].setFromValues(this.east, this.south);
211
- cardinals[5].setFromValues(center.x, this.south);
212
- cardinals[6].setFromValues(this.west, this.south);
213
- cardinals[7].setFromValues(this.west, center.y);
214
- target.set(Infinity, -Infinity, Infinity, -Infinity);
215
-
216
- // loop over the coordinates
217
- for (let i = 0; i < cardinals.length; i++) {
218
- // convert the coordinate.
219
- cardinals[i].crs = this.crs;
220
- cardinals[i].as(crs, _c);
221
- target.north = Math.max(target.north, _c.y);
222
- target.south = Math.min(target.south, _c.y);
223
- target.east = Math.max(target.east, _c.x);
224
- target.west = Math.min(target.west, _c.x);
225
- }
226
- target.zoom = this.zoom;
227
- target.crs = crs;
228
- return target;
75
+ if (this.crs != crs) {
76
+ // Compute min/max in x/y by projecting 8 cardinal points,
77
+ // and then taking the min/max of each coordinates.
78
+ const center = this.center(_c);
79
+ cardinals[0].setFromValues(this.west, this.north);
80
+ cardinals[1].setFromValues(center.x, this.north);
81
+ cardinals[2].setFromValues(this.east, this.north);
82
+ cardinals[3].setFromValues(this.east, center.y);
83
+ cardinals[4].setFromValues(this.east, this.south);
84
+ cardinals[5].setFromValues(center.x, this.south);
85
+ cardinals[6].setFromValues(this.west, this.south);
86
+ cardinals[7].setFromValues(this.west, center.y);
87
+ target.set(Infinity, -Infinity, Infinity, -Infinity);
88
+
89
+ // loop over the coordinates
90
+ for (let i = 0; i < cardinals.length; i++) {
91
+ // convert the coordinate.
92
+ cardinals[i].crs = this.crs;
93
+ cardinals[i].as(crs, _c);
94
+ target.north = Math.max(target.north, _c.y);
95
+ target.south = Math.min(target.south, _c.y);
96
+ target.east = Math.max(target.east, _c.x);
97
+ target.west = Math.min(target.west, _c.x);
229
98
  }
230
99
  target.crs = crs;
231
- target.zoom = this.zoom;
232
- target.set(this.west, this.east, this.south, this.north);
233
100
  return target;
234
101
  }
102
+ target.crs = crs;
103
+ target.set(this.west, this.east, this.south, this.north);
104
+ return target;
235
105
  }
236
106
 
237
107
  /**
@@ -241,9 +111,6 @@ class Extent {
241
111
  */
242
112
  center() {
243
113
  let target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Coordinates(this.crs);
244
- if (CRS.isTms(this.crs)) {
245
- throw new Error('Invalid operation for WMTS bbox');
246
- }
247
114
  this.planarDimensions(_dim);
248
115
  target.crs = this.crs;
249
116
  target.setFromValues(this.west + _dim.x * 0.5, this.south + _dim.y * 0.5);
@@ -352,20 +219,9 @@ class Extent {
352
219
  * @return {boolean}
353
220
  */
354
221
  isInside(extent, epsilon) {
355
- if (CRS.isTms(this.crs)) {
356
- if (this.zoom == extent.zoom) {
357
- return this.row == extent.row && this.col == extent.col;
358
- } else if (this.zoom < extent.zoom) {
359
- return false;
360
- } else {
361
- _rowColfromParent(this, extent.zoom);
362
- return r.row == extent.row && r.col == extent.col;
363
- }
364
- } else {
365
- extent.as(this.crs, _extent);
366
- epsilon = epsilon == undefined ? CRS.reasonnableEpsilon(this.crs) : epsilon;
367
- return this.east - _extent.east <= epsilon && _extent.west - this.west <= epsilon && this.north - _extent.north <= epsilon && _extent.south - this.south <= epsilon;
368
- }
222
+ extent.as(this.crs, _extent);
223
+ epsilon = epsilon == undefined ? CRS.reasonnableEpsilon(this.crs) : epsilon;
224
+ return this.east - _extent.east <= epsilon && _extent.west - this.west <= epsilon && this.north - _extent.north <= epsilon && _extent.south - this.south <= epsilon;
369
225
  }
370
226
 
371
227
  /**
@@ -380,10 +236,6 @@ class Extent {
380
236
  if (this.crs != extent.crs) {
381
237
  throw new Error('unsupported mix');
382
238
  }
383
- if (CRS.isTms(this.crs)) {
384
- _rowColfromParent(this, extent.zoom);
385
- return target.set(this.col * r.invDiff - r.col, this.row * r.invDiff - r.row, r.invDiff, r.invDiff);
386
- }
387
239
  extent.planarDimensions(_dim);
388
240
  this.planarDimensions(_dim2);
389
241
  const originX = (this.west - extent.west) / _dim.x;
@@ -393,21 +245,6 @@ class Extent {
393
245
  return target.set(originX, originY, scaleX, scaleY);
394
246
  }
395
247
 
396
- /**
397
- * Return parent tiled extent with input level
398
- *
399
- * @param {number} levelParent level of parent.
400
- * @return {Extent}
401
- */
402
- tiledExtentParent(levelParent) {
403
- if (levelParent && levelParent < this.zoom) {
404
- _rowColfromParent(this, levelParent);
405
- return new Extent(this.crs, levelParent, r.row, r.col);
406
- } else {
407
- return this;
408
- }
409
- }
410
-
411
248
  /**
412
249
  * Return true if this bounding box intersect with the bouding box parameter
413
250
  * @param {Extent} extent
@@ -416,7 +253,7 @@ class Extent {
416
253
  intersectsExtent(extent) {
417
254
  return Extent.intersectsExtent(this, extent);
418
255
  }
419
- static intersectsExtent(extentA, extentB) {
256
+ static intersectsExtent(/** @type {Extent} */extentA, /** @type {Extent} */extentB) {
420
257
  // TODO don't work when is on limit
421
258
  const other = extentB.crs == extentA.crs ? extentB : extentB.as(extentA.crs, _extent);
422
259
  return !(extentA.west >= other.east || extentA.east <= other.west || extentA.south >= other.north || extentA.north <= other.south);
@@ -425,7 +262,7 @@ class Extent {
425
262
  /**
426
263
  * Return the intersection of this extent with another one
427
264
  * @param {Extent} extent
428
- * @returns {Boolean}
265
+ * @returns {Extent}
429
266
  */
430
267
  intersect(extent) {
431
268
  if (!this.intersectsExtent(extent)) {
@@ -439,12 +276,11 @@ class Extent {
439
276
 
440
277
  /**
441
278
  * Set west, east, south and north values.
442
- * Or if tiled extent, set zoom, row and column values
443
279
  *
444
280
  * @param {number|Array.<number>|Coordinates|Object|Extent} v0 west value,
445
- * zoom value, Array of values [west, east, south and north], Extent of same
446
- * type (tiled or not), Coordinates of west-south corner or object {west,
447
- * east, south and north}
281
+ * Array of values [west, east, south and north], Extent of same type (tiled
282
+ * or not), Coordinates of west-south corner or object {west, east, south
283
+ * and north}
448
284
  * @param {number|Coordinates} [v1] east value, row value or Coordinates of
449
285
  * east-north corner
450
286
  * @param {number} [v2] south value or column value
@@ -457,22 +293,12 @@ class Extent {
457
293
  throw new Error('No values to set in the extent');
458
294
  }
459
295
  if (v0.isExtent) {
460
- if (CRS.isTms(v0.crs)) {
461
- v1 = v0.row;
462
- v2 = v0.col;
463
- v0 = v0.zoom;
464
- } else {
465
- v1 = v0.east;
466
- v2 = v0.south;
467
- v3 = v0.north;
468
- v0 = v0.west;
469
- }
296
+ v1 = v0.east;
297
+ v2 = v0.south;
298
+ v3 = v0.north;
299
+ v0 = v0.west;
470
300
  }
471
- if (CRS.isTms(this.crs)) {
472
- this.zoom = v0;
473
- this.row = v1;
474
- this.col = v2;
475
- } else if (v0.isCoordinates) {
301
+ if (v0.isCoordinates) {
476
302
  // seem never used
477
303
  this.west = v0.x;
478
304
  this.east = v1.x;
@@ -605,11 +431,7 @@ class Extent {
605
431
  */
606
432
  toString() {
607
433
  let separator = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
608
- if (CRS.isTms(this.crs)) {
609
- return `${this.zoom}${separator}${this.row}${separator}${this.col}`;
610
- } else {
611
- return `${this.east}${separator}${this.north}${separator}${this.west}${separator}${this.south}`;
612
- }
434
+ return `${this.east}${separator}${this.north}${separator}${this.west}${separator}${this.south}`;
613
435
  }
614
436
 
615
437
  /**
@@ -625,7 +447,7 @@ class Extent {
625
447
  /**
626
448
  * subdivise extent by scheme.x on west-east and scheme.y on south-north.
627
449
  *
628
- * @param {Vector2} [scheme=Vector2(2,2)] The scheme to subdivise.
450
+ * @param {THREE.Vector2} [scheme=Vector2(2,2)] The scheme to subdivise.
629
451
  * @return {Array<Extent>} subdivised extents.
630
452
  */
631
453
  subdivisionByScheme() {
@@ -649,25 +471,23 @@ class Extent {
649
471
  * @return {Extent} return this extent instance.
650
472
  */
651
473
  applyMatrix4(matrix) {
652
- if (!CRS.isTms(this.crs)) {
653
- southWest.set(this.west, this.south, 0).applyMatrix4(matrix);
654
- northEast.set(this.east, this.north, 0).applyMatrix4(matrix);
655
- this.west = southWest.x;
656
- this.east = northEast.x;
657
- this.south = southWest.y;
658
- this.north = northEast.y;
659
- if (this.west > this.east) {
660
- const temp = this.west;
661
- this.west = this.east;
662
- this.east = temp;
663
- }
664
- if (this.south > this.north) {
665
- const temp = this.south;
666
- this.south = this.north;
667
- this.north = temp;
668
- }
669
- return this;
474
+ southWest.set(this.west, this.south, 0).applyMatrix4(matrix);
475
+ northEast.set(this.east, this.north, 0).applyMatrix4(matrix);
476
+ this.west = southWest.x;
477
+ this.east = northEast.x;
478
+ this.south = southWest.y;
479
+ this.north = northEast.y;
480
+ if (this.west > this.east) {
481
+ const temp = this.west;
482
+ this.west = this.east;
483
+ this.east = temp;
670
484
  }
485
+ if (this.south > this.north) {
486
+ const temp = this.south;
487
+ this.south = this.north;
488
+ this.north = temp;
489
+ }
490
+ return this;
671
491
  }
672
492
 
673
493
  /**
@@ -711,16 +531,4 @@ class Extent {
711
531
  }
712
532
  }
713
533
  _extent = new Extent('EPSG:4326', [0, 0, 0, 0]);
714
- _extent2 = new Extent('EPSG:4326', [0, 0, 0, 0]);
715
- globalExtentTMS.set('EPSG:4326', new Extent('EPSG:4326', -180, 180, -90, 90));
716
-
717
- // Compute global extent of TMS in EPSG:3857
718
- // It's square whose a side is between -180° to 180°.
719
- // So, west extent, it's 180 convert in EPSG:3857
720
- const extent3857 = globalExtentTMS.get('EPSG:4326').as('EPSG:3857');
721
- extent3857.clampSouthNorth(extent3857.west, extent3857.east);
722
- globalExtentTMS.set('EPSG:3857', extent3857);
723
- schemeTiles.set('default', new THREE.Vector2(1, 1));
724
- schemeTiles.set(CRS.tms_3857, schemeTiles.get('default'));
725
- schemeTiles.set(CRS.tms_4326, new THREE.Vector2(2, 1));
726
534
  export default Extent;
@@ -1,7 +1,7 @@
1
1
  import * as THREE from 'three';
2
2
  import TiledGeometryLayer from "../../../Layer/TiledGeometryLayer.js";
3
3
  import { ellipsoidSizes } from "../../Math/Ellipsoid.js";
4
- import { globalExtentTMS, schemeTiles } from "../../Geographic/Extent.js";
4
+ import { globalExtentTMS, schemeTiles } from "../../Tile/TileGrid.js";
5
5
  import BuilderEllipsoidTile from "./BuilderEllipsoidTile.js";
6
6
  import CRS from "../../Geographic/Crs.js";
7
7
 
@@ -90,10 +90,6 @@ class GlobeView extends View {
90
90
  this.camera3D.far = ellipsoidSizes.x * 10;
91
91
  const tileLayer = new GlobeLayer('globe', options.object3d, options);
92
92
  this.mainLoop.gfxEngine.label2dRenderer.infoTileLayer = tileLayer.info;
93
- const sun = new THREE.DirectionalLight();
94
- sun.position.set(-0.5, 0, 1);
95
- sun.updateMatrixWorld(true);
96
- this.scene.add(sun);
97
93
  this.addLayer(tileLayer);
98
94
  this.tileLayer = tileLayer;
99
95
  if (!placement.isExtent) {
@@ -1,6 +1,6 @@
1
1
  import * as THREE from 'three';
2
2
  import TiledGeometryLayer from "../../../Layer/TiledGeometryLayer.js";
3
- import { globalExtentTMS } from "../../Geographic/Extent.js";
3
+ import { globalExtentTMS } from "../../Tile/TileGrid.js";
4
4
  import CRS from "../../Geographic/Crs.js";
5
5
  import PlanarTileBuilder from "./PlanarTileBuilder.js";
6
6