itowns 2.36.2 → 2.37.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.
- package/CONTRIBUTING.md +30 -17
- package/changelog.md +52 -0
- package/dist/debug.js +1 -1
- package/dist/debug.js.LICENSE.txt +1 -1
- package/dist/debug.js.map +1 -1
- package/dist/itowns.js +1 -1
- package/dist/itowns.js.map +1 -1
- package/dist/itowns_widgets.js +2 -0
- package/dist/itowns_widgets.js.map +1 -0
- package/examples/config.json +25 -6
- package/examples/css/widgets.css +248 -0
- package/examples/geoid_geoidLayer.html +102 -0
- package/examples/images/compass.svg +60 -0
- package/examples/images/widget-logo.svg +66 -0
- package/examples/itowns-potree.html +252 -0
- package/examples/js/GUI/GuiTools.js +17 -0
- package/examples/js/Scale.js +1 -0
- package/examples/source_file_from_fetched_data.html +90 -0
- package/examples/source_file_from_format.html +85 -0
- package/examples/source_file_from_methods.html +87 -0
- package/examples/source_file_from_parsed_data.html +104 -0
- package/examples/source_file_geojson_raster.html +21 -45
- package/examples/source_file_gpx_raster.html +28 -36
- package/examples/source_file_kml_raster.html +1 -4
- package/examples/source_file_shapefile.html +39 -34
- package/examples/source_stream_wfs_25d.html +21 -13
- package/examples/source_stream_wfs_3d.html +21 -12
- package/examples/source_stream_wfs_raster.html +20 -20
- package/examples/view_immersive.html +13 -14
- package/examples/widgets_minimap.html +122 -0
- package/examples/widgets_navigation.html +119 -0
- package/lib/Controls/GlobeControls.js +13 -0
- package/lib/Controls/PlanarControls.js +1 -1
- package/lib/Converter/convertToTile.js +5 -1
- package/lib/Core/3DTiles/C3DTBoundingVolume.js +4 -1
- package/lib/Core/Deprecated/Undeprecator.js +1 -1
- package/lib/Core/Feature.js +3 -4
- package/lib/Core/Geographic/Extent.js +1 -1
- package/lib/Core/Geographic/GeoidGrid.js +143 -0
- package/lib/Core/MainLoop.js +1 -1
- package/lib/Core/Math/Ellipsoid.js +1 -1
- package/lib/Core/Prefab/Globe/SkyShader.js +3 -1
- package/lib/Core/Prefab/Planar/PlanarLayer.js +3 -1
- package/lib/Core/Style.js +1 -1
- package/lib/Core/TileGeometry.js +3 -1
- package/lib/Core/TileMesh.js +11 -17
- package/lib/Core/View.js +40 -2
- package/lib/Layer/ElevationLayer.js +6 -2
- package/lib/Layer/FeatureGeometryLayer.js +3 -1
- package/lib/Layer/GeoidLayer.js +131 -0
- package/lib/Layer/InfoLayer.js +1 -1
- package/lib/Layer/Layer.js +1 -1
- package/lib/Layer/LayerUpdateStrategy.js +1 -1
- package/lib/Layer/PotreeLayer.js +3 -1
- package/lib/Layer/TiledGeometryLayer.js +3 -1
- package/lib/Main.js +214 -174
- package/lib/MainBundle.js +1 -1
- package/lib/Parser/B3dmParser.js +2 -1
- package/lib/Parser/GDFParser.js +118 -0
- package/lib/Parser/GTXParser.js +92 -0
- package/lib/Parser/ISGParser.js +121 -0
- package/lib/Parser/LASParser.js +3 -1
- package/lib/Parser/XbilParser.js +1 -1
- package/lib/Process/3dTilesProcessing.js +2 -2
- package/lib/Process/FeatureProcessing.js +3 -1
- package/lib/Process/LayeredMaterialNodeProcessing.js +7 -4
- package/lib/Provider/URLBuilder.js +1 -1
- package/lib/Renderer/LayeredMaterial.js +2 -2
- package/lib/Renderer/OBB.js +18 -25
- package/lib/Renderer/PointsMaterial.js +5 -6
- package/lib/Renderer/RasterTile.js +1 -1
- package/lib/Renderer/Shader/ShaderUtils.js +4 -2
- package/lib/Source/C3DTilesSource.js +3 -1
- package/lib/Source/EntwinePointTileSource.js +3 -1
- package/lib/Source/PotreeSource.js +3 -1
- package/lib/Source/Source.js +15 -10
- package/lib/Source/WMTSSource.js +3 -1
- package/lib/ThreeExtended/loaders/GLTFLoader.js +85 -35
- package/lib/Utils/CameraUtils.js +11 -1
- package/lib/Utils/DEMUtils.js +1 -1
- package/lib/Utils/FeaturesUtils.js +8 -4
- package/package.json +25 -25
package/lib/MainBundle.js
CHANGED
|
@@ -11,13 +11,13 @@ var _exportNames = {
|
|
|
11
11
|
THREE: true,
|
|
12
12
|
proj4: true
|
|
13
13
|
};
|
|
14
|
+
exports.THREE = void 0;
|
|
14
15
|
Object.defineProperty(exports, "proj4", {
|
|
15
16
|
enumerable: true,
|
|
16
17
|
get: function get() {
|
|
17
18
|
return _proj["default"];
|
|
18
19
|
}
|
|
19
20
|
});
|
|
20
|
-
exports.THREE = void 0;
|
|
21
21
|
|
|
22
22
|
var THREE = _interopRequireWildcard(require("three"));
|
|
23
23
|
|
package/lib/Parser/B3dmParser.js
CHANGED
|
@@ -7,8 +7,9 @@ var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
+
exports["default"] = void 0;
|
|
10
11
|
exports.enableDracoLoader = enableDracoLoader;
|
|
11
|
-
exports
|
|
12
|
+
exports.legacyGLTFLoader = exports.glTFLoader = void 0;
|
|
12
13
|
|
|
13
14
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
14
15
|
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = void 0;
|
|
11
|
+
exports.getHeaderAttribute = getHeaderAttribute;
|
|
12
|
+
|
|
13
|
+
var THREE = _interopRequireWildcard(require("three"));
|
|
14
|
+
|
|
15
|
+
var _GeoidGrid = _interopRequireDefault(require("../Core/Geographic/GeoidGrid"));
|
|
16
|
+
|
|
17
|
+
var _Extent = _interopRequireDefault(require("../Core/Geographic/Extent"));
|
|
18
|
+
|
|
19
|
+
var _GTXParser = require("./GTXParser");
|
|
20
|
+
|
|
21
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
|
+
|
|
23
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
|
+
|
|
25
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
26
|
+
|
|
27
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
28
|
+
|
|
29
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
30
|
+
|
|
31
|
+
function getHeaderAttribute(header, attributeName) {
|
|
32
|
+
var attributeRow = header[header.indexOf(header.find(function (element) {
|
|
33
|
+
return element.includes(attributeName);
|
|
34
|
+
}))].split(' ').filter(function (value) {
|
|
35
|
+
return value !== '';
|
|
36
|
+
});
|
|
37
|
+
return parseFloat(attributeRow[attributeRow.length - 1]);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The `GDFParser` module provides a `[parse]{@link module:GDFParser.parse}` method. This method takes the content of a
|
|
41
|
+
* GDF file in, and returns a `{@link GeoidGrid}`. the `{@link GeoidGrid}` contains all the necessary attributes and
|
|
42
|
+
* methods to access the GDF data in iTowns.
|
|
43
|
+
*
|
|
44
|
+
* @module GDFParser
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
var _default = {
|
|
49
|
+
/**
|
|
50
|
+
* Parses a GDF file content and returns a corresponding `{@link GeoidGrid}`.
|
|
51
|
+
*
|
|
52
|
+
* @param {string} gdf The content of the GDF file to parse.
|
|
53
|
+
* @param {Object} options An object gathering the optional parameters to pass to
|
|
54
|
+
* the parser.
|
|
55
|
+
* @param {Object} [options.in={}] Information on the GDF data.
|
|
56
|
+
* @param {string} [options.in.crs='EPSG:4326'] The Coordinates Reference System (CRS) of the GDF data.
|
|
57
|
+
* It must be a geographic CRS, and must be given as an EPSG
|
|
58
|
+
* code.
|
|
59
|
+
*
|
|
60
|
+
* @returns {Promise<GeoidGrid>} A promise resolving with a `{@link GeoidGrid}`, which contains all the necessary
|
|
61
|
+
* attributes and methods to access GDF file data.
|
|
62
|
+
*/
|
|
63
|
+
parse: function parse(gdf) {
|
|
64
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
65
|
+
"in": {}
|
|
66
|
+
};
|
|
67
|
+
var rows = gdf.split('\n');
|
|
68
|
+
var firstMeasureLine = rows.indexOf(rows.find(function (row) {
|
|
69
|
+
return row.includes('end_of_head');
|
|
70
|
+
})) + 1;
|
|
71
|
+
var rawHeaderData = rows.slice(0, firstMeasureLine); // ---------- GET METADATA FROM THE FILE : ----------
|
|
72
|
+
|
|
73
|
+
var metadata = {
|
|
74
|
+
minX: getHeaderAttribute(rawHeaderData, 'longlimit_west'),
|
|
75
|
+
maxX: getHeaderAttribute(rawHeaderData, 'longlimit_east'),
|
|
76
|
+
minY: getHeaderAttribute(rawHeaderData, 'latlimit_south'),
|
|
77
|
+
maxY: getHeaderAttribute(rawHeaderData, 'latlimit_north'),
|
|
78
|
+
stepX: getHeaderAttribute(rawHeaderData, 'gridstep'),
|
|
79
|
+
stepY: getHeaderAttribute(rawHeaderData, 'gridstep'),
|
|
80
|
+
nRows: getHeaderAttribute(rawHeaderData, 'latitude_parallels'),
|
|
81
|
+
nColumns: getHeaderAttribute(rawHeaderData, 'longitude_parallels')
|
|
82
|
+
}; // ---------- BUILD A DATA VIEWER FROM THE TEXT DATA : ----------
|
|
83
|
+
|
|
84
|
+
var data = new DataView(new ArrayBuffer(_GTXParser.BYTES_PER_DOUBLE * metadata.nRows * metadata.nColumns));
|
|
85
|
+
var index = 0;
|
|
86
|
+
|
|
87
|
+
var _iterator = _createForOfIteratorHelper(rows.slice(firstMeasureLine, rows.length)),
|
|
88
|
+
_step;
|
|
89
|
+
|
|
90
|
+
try {
|
|
91
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
92
|
+
var row = _step.value;
|
|
93
|
+
row = row.split(' ').filter(function (value) {
|
|
94
|
+
return value !== '';
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
if (!row.length) {
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
data.setFloat64(index * _GTXParser.BYTES_PER_DOUBLE, parseFloat(row[2]));
|
|
102
|
+
index++;
|
|
103
|
+
} // ---------- CREATE A GeoidGrid FOR THE GIVEN FILE DATA : ----------
|
|
104
|
+
|
|
105
|
+
} catch (err) {
|
|
106
|
+
_iterator.e(err);
|
|
107
|
+
} finally {
|
|
108
|
+
_iterator.f();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
var dataExtent = new _Extent["default"](options["in"].crs || 'EPSG:4326', metadata.minX, metadata.maxX, metadata.minY, metadata.maxY);
|
|
112
|
+
var dataStep = new THREE.Vector2(metadata.stepX, metadata.stepY);
|
|
113
|
+
return Promise.resolve(new _GeoidGrid["default"](dataExtent, dataStep, function getData(verticalIndex, horizontalIndex) {
|
|
114
|
+
return data.getFloat64((metadata.nColumns * (metadata.nRows - verticalIndex - 1) + horizontalIndex) * _GTXParser.BYTES_PER_DOUBLE);
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = exports.BYTES_PER_FLOAT = exports.BYTES_PER_DOUBLE = void 0;
|
|
11
|
+
|
|
12
|
+
var THREE = _interopRequireWildcard(require("three"));
|
|
13
|
+
|
|
14
|
+
var _GeoidGrid = _interopRequireDefault(require("../Core/Geographic/GeoidGrid"));
|
|
15
|
+
|
|
16
|
+
var _Extent = _interopRequireDefault(require("../Core/Geographic/Extent"));
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
var BYTES_PER_DOUBLE = 8;
|
|
23
|
+
exports.BYTES_PER_DOUBLE = BYTES_PER_DOUBLE;
|
|
24
|
+
var BYTES_PER_FLOAT = 4;
|
|
25
|
+
/**
|
|
26
|
+
* The `GTXParser` module provides a `[parse]{@link module:GTXParser.parse}` method. This method takes the content of a
|
|
27
|
+
* GTX file in, and returns a `{@link GeoidGrid}`. The `{@link GeoidGrid}` contains all the necessary attributes and
|
|
28
|
+
* methods to access the GTX data in iTowns.
|
|
29
|
+
*
|
|
30
|
+
* @module GTXParser
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
exports.BYTES_PER_FLOAT = BYTES_PER_FLOAT;
|
|
34
|
+
var _default = {
|
|
35
|
+
/**
|
|
36
|
+
* Parses a GTX file content and returns a corresponding `{@link GeoidGrid}`.
|
|
37
|
+
*
|
|
38
|
+
* @param {ArrayBuffer} gtx The content of the GTX file to parse.
|
|
39
|
+
* @param {Object} options An object gathering the optional parameters to pass to
|
|
40
|
+
* the parser.
|
|
41
|
+
* @param {Object} [options.in={}] Information on the GTX data.
|
|
42
|
+
* @param {string} [options.in.crs='EPSG:4326'] The Coordinates Reference System (CRS) of the GTX data.
|
|
43
|
+
* It must be a geographic CRS, and must be given as an
|
|
44
|
+
* EPSG code.
|
|
45
|
+
* @param {string} [options.in.dataType='float'] The encoding of geoid height data within the GTX file.
|
|
46
|
+
* Must be `'float'` or `'double'`.
|
|
47
|
+
*
|
|
48
|
+
* @returns {Promise<GeoidGrid>} A promise resolving with a `{@link GeoidGrid}`, which contains all the necessary
|
|
49
|
+
* attributes and methods to access GTX file data.
|
|
50
|
+
*/
|
|
51
|
+
parse: function parse(gtx) {
|
|
52
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
53
|
+
"in": {}
|
|
54
|
+
};
|
|
55
|
+
var dataType = options["in"].dataType || 'float';
|
|
56
|
+
|
|
57
|
+
if (!['float', 'double'].includes(dataType)) {
|
|
58
|
+
throw new Error('`dataType` parameter is incorrect for GTXParser.parse method. ' + 'This parameter must be either `double` or `float`.');
|
|
59
|
+
} // ---------- GET METADATA FROM THE FILE : ----------
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
var headerView = new DataView(gtx, 0, 40);
|
|
63
|
+
var metadata = {
|
|
64
|
+
minX: headerView.getFloat64(8),
|
|
65
|
+
minY: headerView.getFloat64(0),
|
|
66
|
+
stepX: headerView.getFloat64(24),
|
|
67
|
+
stepY: headerView.getFloat64(16),
|
|
68
|
+
nColumns: headerView.getInt32(36),
|
|
69
|
+
nRows: headerView.getInt32(32)
|
|
70
|
+
}; // ---------- BUILD A DATA VIEWER : ----------
|
|
71
|
+
|
|
72
|
+
var dataView = new DataView(gtx, 40); // ---------- CREATE A GeoidGrid FOR THE GIVEN FILE DATA : ----------
|
|
73
|
+
// formula for the max longitude : maxLongitude = minLongitude + deltaLongitude * (nColumns - 1)
|
|
74
|
+
|
|
75
|
+
var maxX = metadata.minX + metadata.stepX * (metadata.nColumns - 1); // formula for the max latitude : maxLatitude = minLatitude + deltaLatitude * (nRows - 1)
|
|
76
|
+
|
|
77
|
+
var maxY = metadata.minY + metadata.stepY * (metadata.nRows - 1);
|
|
78
|
+
var dataExtent = new _Extent["default"](options["in"].crs || 'EPSG:4326', metadata.minX, maxX, metadata.minY, maxY);
|
|
79
|
+
var dataStep = new THREE.Vector2(metadata.stepX, metadata.stepY);
|
|
80
|
+
return Promise.resolve(new _GeoidGrid["default"](dataExtent, dataStep, function getData(verticalIndex, horizontalIndex) {
|
|
81
|
+
// formula to get the index of a geoid height from a latitude and longitude indexes is :
|
|
82
|
+
// ``(nColumns * latIndex + lonIndex) * nBytes``, where nBytes stands for the number of bytes geoid
|
|
83
|
+
// height data are encoded on.
|
|
84
|
+
if (dataType === 'float') {
|
|
85
|
+
return dataView.getFloat32((metadata.nColumns * verticalIndex + horizontalIndex) * BYTES_PER_FLOAT);
|
|
86
|
+
} else if (dataType === 'double') {
|
|
87
|
+
return dataView.getFloat64((metadata.nColumns * verticalIndex + horizontalIndex) * BYTES_PER_DOUBLE);
|
|
88
|
+
}
|
|
89
|
+
}));
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = void 0;
|
|
11
|
+
|
|
12
|
+
var THREE = _interopRequireWildcard(require("three"));
|
|
13
|
+
|
|
14
|
+
var _GeoidGrid = _interopRequireDefault(require("../Core/Geographic/GeoidGrid"));
|
|
15
|
+
|
|
16
|
+
var _Extent = _interopRequireDefault(require("../Core/Geographic/Extent"));
|
|
17
|
+
|
|
18
|
+
var _GDFParser = require("./GDFParser");
|
|
19
|
+
|
|
20
|
+
var _GTXParser = require("./GTXParser");
|
|
21
|
+
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
|
|
26
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
27
|
+
|
|
28
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
29
|
+
|
|
30
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The `ISGParser` module provides a `[parse]{@link module:ISGParser.parse}` method. This method takes the content of a
|
|
34
|
+
* ISG file in, and returns a `{@link GeoidGrid}`. the `{@link GeoidGrid}` contains all the necessary attributes and
|
|
35
|
+
* methods to access the ISG data in iTowns.
|
|
36
|
+
*
|
|
37
|
+
* @module ISGParser
|
|
38
|
+
*/
|
|
39
|
+
var _default = {
|
|
40
|
+
/**
|
|
41
|
+
* Parses an ISG file content and returns a corresponding `{@link GeoidGrid}`.
|
|
42
|
+
*
|
|
43
|
+
* @param {string} isg The content of the ISG file to parse.
|
|
44
|
+
* @param {Object} options An object gathering the optional parameters to pass to
|
|
45
|
+
* the parser.
|
|
46
|
+
* @param {Object} [options.in={}] Information on the ISG data.
|
|
47
|
+
* @param {string} [options.in.crs='EPSG:4326'] The Coordinates Reference System (CRS) of the ISG data.
|
|
48
|
+
* It must be a geographic CRS, and must be given as an EPSG
|
|
49
|
+
* code.
|
|
50
|
+
*
|
|
51
|
+
* @returns {Promise<GeoidGrid>} A promise resolving with a `{@link GeoidGrid}`, which contains all the necessary
|
|
52
|
+
* attributes and methods to access ISG file data.
|
|
53
|
+
*/
|
|
54
|
+
parse: function parse(isg) {
|
|
55
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
56
|
+
"in": {}
|
|
57
|
+
};
|
|
58
|
+
var rows = isg.split('\n');
|
|
59
|
+
var firstMeasureLine = rows.indexOf(rows.find(function (row) {
|
|
60
|
+
return row.includes('end_of_head');
|
|
61
|
+
})) + 1;
|
|
62
|
+
var rawHeaderData = rows.slice(0, firstMeasureLine); // ---------- GET METADATA FROM THE FILE : ----------
|
|
63
|
+
|
|
64
|
+
var metadata = {
|
|
65
|
+
minX: (0, _GDFParser.getHeaderAttribute)(rawHeaderData, 'lon min'),
|
|
66
|
+
maxX: (0, _GDFParser.getHeaderAttribute)(rawHeaderData, 'lon max'),
|
|
67
|
+
minY: (0, _GDFParser.getHeaderAttribute)(rawHeaderData, 'lat min'),
|
|
68
|
+
maxY: (0, _GDFParser.getHeaderAttribute)(rawHeaderData, 'lat max'),
|
|
69
|
+
stepX: (0, _GDFParser.getHeaderAttribute)(rawHeaderData, 'delta lon'),
|
|
70
|
+
stepY: (0, _GDFParser.getHeaderAttribute)(rawHeaderData, 'delta lat'),
|
|
71
|
+
nRows: (0, _GDFParser.getHeaderAttribute)(rawHeaderData, 'nrows'),
|
|
72
|
+
nColumns: (0, _GDFParser.getHeaderAttribute)(rawHeaderData, 'ncols')
|
|
73
|
+
}; // ---------- BUILD A DATA VIEWER FROM THE TEXT DATA : ----------
|
|
74
|
+
|
|
75
|
+
var data = new DataView(new ArrayBuffer(_GTXParser.BYTES_PER_DOUBLE * metadata.nRows * metadata.nColumns));
|
|
76
|
+
var index = 0;
|
|
77
|
+
|
|
78
|
+
var _iterator = _createForOfIteratorHelper(rows.slice(firstMeasureLine, rows.length)),
|
|
79
|
+
_step;
|
|
80
|
+
|
|
81
|
+
try {
|
|
82
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
83
|
+
var row = _step.value;
|
|
84
|
+
row = row.split(' ').filter(function (value) {
|
|
85
|
+
return value !== '';
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
if (!row.length) {
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
var _iterator2 = _createForOfIteratorHelper(row),
|
|
93
|
+
_step2;
|
|
94
|
+
|
|
95
|
+
try {
|
|
96
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
97
|
+
var value = _step2.value;
|
|
98
|
+
data.setFloat64(index * _GTXParser.BYTES_PER_DOUBLE, parseFloat(value));
|
|
99
|
+
index++;
|
|
100
|
+
}
|
|
101
|
+
} catch (err) {
|
|
102
|
+
_iterator2.e(err);
|
|
103
|
+
} finally {
|
|
104
|
+
_iterator2.f();
|
|
105
|
+
}
|
|
106
|
+
} // ---------- CREATE A GeoidGrid FOR THE GIVEN FILE DATA : ----------
|
|
107
|
+
|
|
108
|
+
} catch (err) {
|
|
109
|
+
_iterator.e(err);
|
|
110
|
+
} finally {
|
|
111
|
+
_iterator.f();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
var dataExtent = new _Extent["default"](options["in"].crs || 'EPSG:4326', metadata.minX + metadata.stepX / 2, metadata.maxX - metadata.stepX / 2, metadata.minY + metadata.stepY / 2, metadata.maxY - metadata.stepY / 2);
|
|
115
|
+
var dataStep = new THREE.Vector2(metadata.stepX, metadata.stepY);
|
|
116
|
+
return Promise.resolve(new _GeoidGrid["default"](dataExtent, dataStep, function getData(verticalIndex, horizontalIndex) {
|
|
117
|
+
return data.getFloat64((metadata.nColumns * verticalIndex + horizontalIndex) * _GTXParser.BYTES_PER_DOUBLE);
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
exports["default"] = _default;
|
package/lib/Parser/LASParser.js
CHANGED
|
@@ -56,7 +56,9 @@ var _default = {
|
|
|
56
56
|
}
|
|
57
57
|
}).then(function (parsedData) {
|
|
58
58
|
var geometry = new THREE.BufferGeometry();
|
|
59
|
-
geometry.userData = parsedData.loaderData
|
|
59
|
+
geometry.userData = parsedData.loaderData;
|
|
60
|
+
geometry.userData.vertexCount = parsedData.header.vertexCount;
|
|
61
|
+
geometry.userData.boundingBox = parsedData.header.boundingBox;
|
|
60
62
|
var positionBuffer = new THREE.BufferAttribute(parsedData.attributes.POSITION.value, 3, false);
|
|
61
63
|
geometry.setAttribute('position', positionBuffer);
|
|
62
64
|
var intensityBuffer = new THREE.BufferAttribute(parsedData.attributes.intensity.value, 1, true);
|
package/lib/Parser/XbilParser.js
CHANGED
|
@@ -5,8 +5,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.computeMinMaxElevation = computeMinMaxElevation;
|
|
9
8
|
exports.checkNodeElevationTextureValidity = checkNodeElevationTextureValidity;
|
|
9
|
+
exports.computeMinMaxElevation = computeMinMaxElevation;
|
|
10
10
|
exports.insertSignificantValuesFromParent = insertSignificantValuesFromParent;
|
|
11
11
|
|
|
12
12
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
@@ -8,11 +8,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
10
|
exports.$3dTilesCulling = $3dTilesCulling;
|
|
11
|
-
exports
|
|
11
|
+
exports.$3dTilesSubdivisionControl = $3dTilesSubdivisionControl;
|
|
12
12
|
exports.computeNodeSSE = computeNodeSSE;
|
|
13
13
|
exports.init3dTilesLayer = init3dTilesLayer;
|
|
14
|
+
exports.pre3dTilesUpdate = pre3dTilesUpdate;
|
|
14
15
|
exports.process3dTilesNode = process3dTilesNode;
|
|
15
|
-
exports.$3dTilesSubdivisionControl = $3dTilesSubdivisionControl;
|
|
16
16
|
|
|
17
17
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
18
18
|
|
|
@@ -94,7 +94,8 @@ var _default = {
|
|
|
94
94
|
var zoomDest = extentsDestination[0].zoom; // check if it's tile level is equal to display level layer.
|
|
95
95
|
|
|
96
96
|
if (zoomDest != layer.zoom.min || // check if there's data in extent tile.
|
|
97
|
-
!this.source.extentInsideLimit(node.extent, zoomDest) ||
|
|
97
|
+
!this.source.extentInsideLimit(node.extent, zoomDest) || // In FileSource case, check if the feature center is in extent tile.
|
|
98
|
+
layer.source.isFileSource && !node.extent.isPointInside(layer.source.extent.center(coord))) {
|
|
98
99
|
// if not, there's not data to add at this tile.
|
|
99
100
|
node.layerUpdateState[layer.id].noMoreUpdatePossible();
|
|
100
101
|
return;
|
|
@@ -135,6 +136,7 @@ var _default = {
|
|
|
135
136
|
group.layer = layer;
|
|
136
137
|
group.matrixWorld.copy(node.matrixWorld).invert();
|
|
137
138
|
group.matrixWorld.decompose(group.position, group.quaternion, group.scale);
|
|
139
|
+
group.position.z += node.geoidHeight;
|
|
138
140
|
node.add(group.add(result));
|
|
139
141
|
group.updateMatrixWorld(true);
|
|
140
142
|
} else {
|
|
@@ -5,10 +5,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
9
|
-
exports.updateLayeredMaterialNodeElevation = updateLayeredMaterialNodeElevation;
|
|
8
|
+
exports.SIZE_TEXTURE_TILE = exports.SIZE_DIAGONAL_TEXTURE = void 0;
|
|
10
9
|
exports.removeLayeredMaterialNodeLayer = removeLayeredMaterialNodeLayer;
|
|
11
|
-
exports.
|
|
10
|
+
exports.updateLayeredMaterialNodeElevation = updateLayeredMaterialNodeElevation;
|
|
11
|
+
exports.updateLayeredMaterialNodeImagery = updateLayeredMaterialNodeImagery;
|
|
12
12
|
|
|
13
13
|
var _LayerUpdateStrategy = require("../Layer/LayerUpdateStrategy");
|
|
14
14
|
|
|
@@ -263,7 +263,10 @@ function removeLayeredMaterialNodeLayer(layerId) {
|
|
|
263
263
|
node.material.removeLayer(layerId);
|
|
264
264
|
|
|
265
265
|
if (node.material.elevationLayerIds[0] == layerId) {
|
|
266
|
-
node.setBBoxZ(
|
|
266
|
+
node.setBBoxZ({
|
|
267
|
+
min: 0,
|
|
268
|
+
max: 0
|
|
269
|
+
});
|
|
267
270
|
}
|
|
268
271
|
}
|
|
269
272
|
|
|
@@ -98,7 +98,7 @@ var _default = {
|
|
|
98
98
|
*
|
|
99
99
|
* @return {string} the formed url
|
|
100
100
|
*/
|
|
101
|
-
bbox: function
|
|
101
|
+
bbox: function (bbox, source) {
|
|
102
102
|
var precision = source.crs == 'EPSG:4326' ? 9 : 2;
|
|
103
103
|
bbox.as(source.crs, extent);
|
|
104
104
|
var w = extent.west.toFixed(precision);
|
|
@@ -7,9 +7,9 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports["default"] = exports.colorLayerEffects = exports.ELEVATION_MODES = void 0;
|
|
11
11
|
exports.getMaxColorSamplerUnitsCount = getMaxColorSamplerUnitsCount;
|
|
12
|
-
exports
|
|
12
|
+
exports.unpack1K = unpack1K;
|
|
13
13
|
|
|
14
14
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
15
|
|
package/lib/Renderer/OBB.js
CHANGED
|
@@ -13,8 +13,6 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
|
|
|
13
13
|
|
|
14
14
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
15
|
|
|
16
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
17
|
-
|
|
18
16
|
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
19
17
|
|
|
20
18
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
@@ -78,7 +76,7 @@ var OBB = /*#__PURE__*/function (_THREE$Object3D) {
|
|
|
78
76
|
max: 0,
|
|
79
77
|
scale: 1.0
|
|
80
78
|
};
|
|
81
|
-
return
|
|
79
|
+
return _this;
|
|
82
80
|
}
|
|
83
81
|
/**
|
|
84
82
|
* Creates a new instance of the object with same properties than original.
|
|
@@ -121,32 +119,24 @@ var OBB = /*#__PURE__*/function (_THREE$Object3D) {
|
|
|
121
119
|
this.updateMatrixWorld(true);
|
|
122
120
|
}
|
|
123
121
|
/**
|
|
124
|
-
* Update z min and z
|
|
122
|
+
* Update z min, z max and z scale of oriented bounding box
|
|
125
123
|
*
|
|
126
|
-
* @param {
|
|
127
|
-
* @param {number}
|
|
128
|
-
* @param {number}
|
|
124
|
+
* @param {Object} [elevation={}]
|
|
125
|
+
* @param {number} [elevation.min] The minimum of oriented bounding box
|
|
126
|
+
* @param {number} [elevation.max] The maximum of oriented bounding box
|
|
127
|
+
* @param {number} [elevation.scale] The scale of oriented bounding box Z axis
|
|
129
128
|
*/
|
|
130
129
|
|
|
131
130
|
}, {
|
|
132
131
|
key: "updateZ",
|
|
133
|
-
value: function updateZ(
|
|
134
|
-
var
|
|
135
|
-
this.z =
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
this.box3D.min.z = this.natBox.min.z + min * scale;
|
|
142
|
-
this.box3D.max.z = this.natBox.max.z + max * scale;
|
|
143
|
-
}
|
|
144
|
-
}, {
|
|
145
|
-
key: "updateScaleZ",
|
|
146
|
-
value: function updateScaleZ(scale) {
|
|
147
|
-
if (scale > 0) {
|
|
148
|
-
this.updateZ(this.z.min, this.z.max, scale);
|
|
149
|
-
}
|
|
132
|
+
value: function updateZ() {
|
|
133
|
+
var elevation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
134
|
+
this.z.min = elevation.min !== undefined && elevation.min !== null ? elevation.min : this.z.min;
|
|
135
|
+
this.z.max = elevation.max !== undefined && elevation.max !== null ? elevation.max : this.z.max;
|
|
136
|
+
this.z.scale = elevation.scale > 0 ? elevation.scale : this.z.scale;
|
|
137
|
+
this.z.delta = Math.abs(this.z.max - this.z.min) * this.z.scale;
|
|
138
|
+
this.box3D.min.z = this.natBox.min.z + this.z.min * this.z.scale;
|
|
139
|
+
this.box3D.max.z = this.natBox.max.z + this.z.max * this.z.scale;
|
|
150
140
|
}
|
|
151
141
|
/**
|
|
152
142
|
* Determines if the sphere is above the XY space of the box
|
|
@@ -200,7 +190,10 @@ var OBB = /*#__PURE__*/function (_THREE$Object3D) {
|
|
|
200
190
|
obb.box3D.copy(geometry.boundingBox);
|
|
201
191
|
obb.natBox.copy(geometry.boundingBox);
|
|
202
192
|
this.copy(obb);
|
|
203
|
-
this.updateZ(
|
|
193
|
+
this.updateZ({
|
|
194
|
+
min: minHeight,
|
|
195
|
+
max: maxHeight
|
|
196
|
+
});
|
|
204
197
|
this.position.copy(position);
|
|
205
198
|
this.quaternion.copy(quaternion);
|
|
206
199
|
this.updateMatrixWorld(true);
|
|
@@ -7,9 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports["default"] = exports.
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
+
exports["default"] = exports.MODE = exports.ClassificationScheme = void 0;
|
|
13
11
|
|
|
14
12
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
13
|
|
|
@@ -21,6 +19,8 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
21
19
|
|
|
22
20
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
23
21
|
|
|
22
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
23
|
+
|
|
24
24
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
25
25
|
|
|
26
26
|
var THREE = _interopRequireWildcard(require("three"));
|
|
@@ -69,10 +69,9 @@ var white = new THREE.Color(1.0, 1.0, 1.0);
|
|
|
69
69
|
|
|
70
70
|
var
|
|
71
71
|
/* istanbul ignore next */
|
|
72
|
-
Classification = function Classification() {
|
|
72
|
+
Classification = /*#__PURE__*/(0, _createClass2["default"])(function Classification() {
|
|
73
73
|
(0, _classCallCheck2["default"])(this, Classification);
|
|
74
|
-
};
|
|
75
|
-
|
|
74
|
+
});
|
|
76
75
|
var ClassificationScheme = {
|
|
77
76
|
DEFAULT: {
|
|
78
77
|
0: {
|
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports
|
|
10
|
+
exports["default"] = exports.RasterElevationTile = exports.RasterColorTile = exports.EMPTY_TEXTURE_ZOOM = void 0;
|
|
11
11
|
|
|
12
12
|
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
13
13
|
|
|
@@ -4,8 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
var
|
|
8
|
-
var
|
|
7
|
+
var pattern_gl_Position = 'gl_Position.*(?![^]*gl_Position)';
|
|
8
|
+
var pattern_Main = '[^\\w]*main[^\\w]*(void)?[^\\w]*{';
|
|
9
|
+
var rePosition = new RegExp(pattern_gl_Position);
|
|
10
|
+
var reMain = new RegExp(pattern_Main);
|
|
9
11
|
var _default = {
|
|
10
12
|
patchMaterialForLogDepthSupport: function patchMaterialForLogDepthSupport(material) {
|
|
11
13
|
// Check if the shader does not already use the log depth buffer
|
|
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports["default"] = void 0;
|
|
9
9
|
|
|
10
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
+
|
|
10
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
13
|
|
|
12
14
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
@@ -38,7 +40,7 @@ var C3DTilesSource = /*#__PURE__*/function (_Source) {
|
|
|
38
40
|
return _this;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
return C3DTilesSource;
|
|
43
|
+
return (0, _createClass2["default"])(C3DTilesSource);
|
|
42
44
|
}(_Source2["default"]);
|
|
43
45
|
|
|
44
46
|
var _default = C3DTilesSource;
|
|
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports["default"] = void 0;
|
|
9
9
|
|
|
10
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
+
|
|
10
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
13
|
|
|
12
14
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
@@ -98,7 +100,7 @@ var EntwinePointTileSource = /*#__PURE__*/function (_Source) {
|
|
|
98
100
|
return _this;
|
|
99
101
|
}
|
|
100
102
|
|
|
101
|
-
return EntwinePointTileSource;
|
|
103
|
+
return (0, _createClass2["default"])(EntwinePointTileSource);
|
|
102
104
|
}(_Source2["default"]);
|
|
103
105
|
|
|
104
106
|
var _default = EntwinePointTileSource;
|