@loaders.gl/i3s 4.0.0-alpha.7 → 4.0.0-alpha.8
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/dist/dist.min.js +99 -31
- package/dist/es5/arcgis-webscene-loader.js +1 -1
- package/dist/es5/i3s-attribute-loader.js +1 -1
- package/dist/es5/i3s-building-scene-layer-loader.js +1 -1
- package/dist/es5/i3s-content-loader.js +1 -1
- package/dist/es5/i3s-loader.js +1 -1
- package/dist/es5/i3s-node-page-loader.js +1 -1
- package/dist/es5/i3s-slpk-loader.js +1 -1
- package/dist/es5/i3s-slpk-loader.js.map +1 -1
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/lib/parsers/parse-i3s-tile-content.js +2 -2
- package/dist/es5/lib/parsers/parse-i3s-tile-content.js.map +1 -1
- package/dist/es5/lib/parsers/parse-slpk/parse-slpk.js +2 -2
- package/dist/es5/lib/parsers/parse-slpk/parse-slpk.js.map +1 -1
- package/dist/es5/lib/parsers/parse-slpk/slpk-archieve.js +140 -23
- package/dist/es5/lib/parsers/parse-slpk/slpk-archieve.js.map +1 -1
- package/dist/es5/lib/utils/{customizeColors.js → customize-/321/201olors.js} +65 -40
- package/dist/es5/lib/utils/customize-/321/201olors.js.map +1 -0
- package/dist/es5/types.js.map +1 -1
- package/dist/esm/arcgis-webscene-loader.js +1 -1
- package/dist/esm/i3s-attribute-loader.js +1 -1
- package/dist/esm/i3s-building-scene-layer-loader.js +1 -1
- package/dist/esm/i3s-content-loader.js +1 -1
- package/dist/esm/i3s-loader.js +1 -1
- package/dist/esm/i3s-node-page-loader.js +1 -1
- package/dist/esm/i3s-slpk-loader.js +1 -1
- package/dist/esm/i3s-slpk-loader.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/parsers/parse-i3s-tile-content.js +1 -1
- package/dist/esm/lib/parsers/parse-i3s-tile-content.js.map +1 -1
- package/dist/esm/lib/parsers/parse-slpk/parse-slpk.js +2 -2
- package/dist/esm/lib/parsers/parse-slpk/parse-slpk.js.map +1 -1
- package/dist/esm/lib/parsers/parse-slpk/slpk-archieve.js +59 -9
- package/dist/esm/lib/parsers/parse-slpk/slpk-archieve.js.map +1 -1
- package/dist/esm/lib/utils/{customizeColors.js → customize-/321/201olors.js} +9 -3
- package/dist/esm/lib/utils/customize-/321/201olors.js.map +1 -0
- package/dist/esm/types.js.map +1 -1
- package/dist/i3s-content-worker-node.js +2 -2
- package/dist/i3s-content-worker-node.js.map +3 -3
- package/dist/i3s-content-worker.js +16 -10
- package/dist/i3s-slpk-loader.d.ts +6 -3
- package/dist/i3s-slpk-loader.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/lib/parsers/parse-i3s-tile-content.js +2 -2
- package/dist/lib/parsers/parse-slpk/parse-slpk.d.ts.map +1 -1
- package/dist/lib/parsers/parse-slpk/parse-slpk.js +1 -1
- package/dist/lib/parsers/parse-slpk/slpk-archieve.d.ts +6 -0
- package/dist/lib/parsers/parse-slpk/slpk-archieve.d.ts.map +1 -1
- package/dist/lib/parsers/parse-slpk/slpk-archieve.js +72 -9
- package/dist/lib/utils/{customizeColors.d.ts → customize-/321/201olors.d.ts} +1 -1
- package/dist/lib/utils/customize-/321/201olors.d.ts.map +1 -0
- package/dist/lib/utils/{customizeColors.js → customize-/321/201olors.js} +12 -2
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/i3s-slpk-loader.ts +5 -3
- package/src/index.ts +2 -1
- package/src/lib/parsers/parse-i3s-tile-content.ts +1 -1
- package/src/lib/parsers/parse-slpk/parse-slpk.ts +4 -1
- package/src/lib/parsers/parse-slpk/slpk-archieve.ts +73 -9
- package/src/lib/utils/{customizeColors.ts → customize-/321/201olors.ts} +12 -2
- package/src/types.ts +1 -0
- package/dist/es5/lib/utils/customizeColors.js.map +0 -1
- package/dist/esm/lib/utils/customizeColors.js.map +0 -1
- package/dist/lib/utils/customizeColors.d.ts.map +0 -1
package/dist/dist.min.js
CHANGED
|
@@ -9096,7 +9096,7 @@
|
|
|
9096
9096
|
}
|
|
9097
9097
|
});
|
|
9098
9098
|
|
|
9099
|
-
// src/lib/utils/
|
|
9099
|
+
// src/lib/utils/customize-сolors.ts
|
|
9100
9100
|
async function customizeColors(colors, featureIds, tileOptions, tilesetOptions, options) {
|
|
9101
9101
|
if (!options?.i3s?.colorsByAttribute) {
|
|
9102
9102
|
return colors;
|
|
@@ -9126,7 +9126,13 @@
|
|
|
9126
9126
|
if (!color) {
|
|
9127
9127
|
continue;
|
|
9128
9128
|
}
|
|
9129
|
-
|
|
9129
|
+
if (options.i3s.colorsByAttribute.mode === "multiply") {
|
|
9130
|
+
color.forEach((colorItem, index) => {
|
|
9131
|
+
colors.value[i2 * 4 + index] = colors.value[i2 * 4 + index] * colorItem / 255;
|
|
9132
|
+
});
|
|
9133
|
+
} else {
|
|
9134
|
+
colors.value.set(color, i2 * 4);
|
|
9135
|
+
}
|
|
9130
9136
|
}
|
|
9131
9137
|
return colors;
|
|
9132
9138
|
}
|
|
@@ -9155,8 +9161,8 @@
|
|
|
9155
9161
|
});
|
|
9156
9162
|
return objectIdAttributeData;
|
|
9157
9163
|
}
|
|
9158
|
-
var
|
|
9159
|
-
"src/lib/utils/
|
|
9164
|
+
var init_customize_olors = __esm({
|
|
9165
|
+
"src/lib/utils/customize-\u0441olors.ts"() {
|
|
9160
9166
|
init_src3();
|
|
9161
9167
|
init_i3s_attribute_loader();
|
|
9162
9168
|
init_url_utils2();
|
|
@@ -9547,7 +9553,7 @@
|
|
|
9547
9553
|
init_types();
|
|
9548
9554
|
init_url_utils2();
|
|
9549
9555
|
init_constants();
|
|
9550
|
-
|
|
9556
|
+
init_customize_olors();
|
|
9551
9557
|
scratchVector5 = new Vector3([0, 0, 0]);
|
|
9552
9558
|
I3S_ATTRIBUTE_TYPE = "i3s-attribute-type";
|
|
9553
9559
|
}
|
|
@@ -10142,23 +10148,27 @@
|
|
|
10142
10148
|
});
|
|
10143
10149
|
|
|
10144
10150
|
// ../tiles/src/constants.ts
|
|
10145
|
-
var TILE_REFINEMENT, TILE_TYPE, TILESET_TYPE;
|
|
10151
|
+
var TILE_REFINEMENT, TILE_TYPE, TILESET_TYPE, LOD_METRIC_TYPE;
|
|
10146
10152
|
var init_constants4 = __esm({
|
|
10147
10153
|
"../tiles/src/constants.ts"() {
|
|
10148
|
-
|
|
10149
|
-
ADD
|
|
10150
|
-
REPLACE
|
|
10151
|
-
};
|
|
10152
|
-
|
|
10153
|
-
EMPTY
|
|
10154
|
-
SCENEGRAPH
|
|
10155
|
-
POINTCLOUD
|
|
10156
|
-
MESH
|
|
10157
|
-
};
|
|
10158
|
-
|
|
10159
|
-
I3S
|
|
10160
|
-
TILES3D
|
|
10161
|
-
};
|
|
10154
|
+
(function(TILE_REFINEMENT2) {
|
|
10155
|
+
TILE_REFINEMENT2[TILE_REFINEMENT2["ADD"] = 1] = "ADD";
|
|
10156
|
+
TILE_REFINEMENT2[TILE_REFINEMENT2["REPLACE"] = 2] = "REPLACE";
|
|
10157
|
+
})(TILE_REFINEMENT || (TILE_REFINEMENT = {}));
|
|
10158
|
+
(function(TILE_TYPE2) {
|
|
10159
|
+
TILE_TYPE2["EMPTY"] = "empty";
|
|
10160
|
+
TILE_TYPE2["SCENEGRAPH"] = "scenegraph";
|
|
10161
|
+
TILE_TYPE2["POINTCLOUD"] = "pointcloud";
|
|
10162
|
+
TILE_TYPE2["MESH"] = "mesh";
|
|
10163
|
+
})(TILE_TYPE || (TILE_TYPE = {}));
|
|
10164
|
+
(function(TILESET_TYPE2) {
|
|
10165
|
+
TILESET_TYPE2["I3S"] = "I3S";
|
|
10166
|
+
TILESET_TYPE2["TILES3D"] = "TILES3D";
|
|
10167
|
+
})(TILESET_TYPE || (TILESET_TYPE = {}));
|
|
10168
|
+
(function(LOD_METRIC_TYPE2) {
|
|
10169
|
+
LOD_METRIC_TYPE2["GEOMETRIC_ERROR"] = "geometricError";
|
|
10170
|
+
LOD_METRIC_TYPE2["MAX_SCREEN_THRESHOLD"] = "maxScreenThreshold";
|
|
10171
|
+
})(LOD_METRIC_TYPE || (LOD_METRIC_TYPE = {}));
|
|
10162
10172
|
}
|
|
10163
10173
|
});
|
|
10164
10174
|
|
|
@@ -10874,13 +10884,47 @@
|
|
|
10874
10884
|
});
|
|
10875
10885
|
|
|
10876
10886
|
// src/lib/parsers/parse-slpk/slpk-archieve.ts
|
|
10877
|
-
var import_md5, SLPKArchive;
|
|
10887
|
+
var import_md5, PATH_DESCRIPTIONS, SLPKArchive;
|
|
10878
10888
|
var init_slpk_archieve = __esm({
|
|
10879
10889
|
"src/lib/parsers/parse-slpk/slpk-archieve.ts"() {
|
|
10880
10890
|
init_src();
|
|
10881
10891
|
import_md5 = __toModule(require_md5());
|
|
10882
10892
|
init_src9();
|
|
10883
10893
|
init_local_file_header();
|
|
10894
|
+
PATH_DESCRIPTIONS = [
|
|
10895
|
+
{
|
|
10896
|
+
test: /^$/,
|
|
10897
|
+
extensions: ["3dSceneLayer.json.gz"]
|
|
10898
|
+
},
|
|
10899
|
+
{
|
|
10900
|
+
test: /^nodepages\/\d+$/,
|
|
10901
|
+
extensions: [".json.gz"]
|
|
10902
|
+
},
|
|
10903
|
+
{
|
|
10904
|
+
test: /^nodes\/\d+$/,
|
|
10905
|
+
extensions: ["/3dNodeIndexDocument.json.gz"]
|
|
10906
|
+
},
|
|
10907
|
+
{
|
|
10908
|
+
test: /^nodes\/\d+\/textures\/.+$/,
|
|
10909
|
+
extensions: [".jpg", ".png", ".bin.dds.gz", ".ktx"]
|
|
10910
|
+
},
|
|
10911
|
+
{
|
|
10912
|
+
test: /^nodes\/\d+\/geometries\/\d+$/,
|
|
10913
|
+
extensions: [".bin.gz", ".draco.gz"]
|
|
10914
|
+
},
|
|
10915
|
+
{
|
|
10916
|
+
test: /^nodes\/\d+\/attributes\/f_\d+\/\d+$/,
|
|
10917
|
+
extensions: [".bin.gz"]
|
|
10918
|
+
},
|
|
10919
|
+
{
|
|
10920
|
+
test: /^statistics\/f_\d+\/\d+$/,
|
|
10921
|
+
extensions: [".json.gz"]
|
|
10922
|
+
},
|
|
10923
|
+
{
|
|
10924
|
+
test: /^nodes\/\d+\/shared$/,
|
|
10925
|
+
extensions: ["/sharedResource.json.gz"]
|
|
10926
|
+
}
|
|
10927
|
+
];
|
|
10884
10928
|
SLPKArchive = class {
|
|
10885
10929
|
constructor(slpkArchiveBuffer, hashFile) {
|
|
10886
10930
|
this.slpkArchive = new DataView(slpkArchiveBuffer);
|
|
@@ -10901,11 +10945,39 @@
|
|
|
10901
10945
|
}
|
|
10902
10946
|
async getFile(path, mode = "raw") {
|
|
10903
10947
|
if (mode === "http") {
|
|
10904
|
-
|
|
10948
|
+
const extensions = PATH_DESCRIPTIONS.find((val) => val.test.test(path))?.extensions;
|
|
10949
|
+
if (extensions) {
|
|
10950
|
+
let data;
|
|
10951
|
+
for (const ext of extensions) {
|
|
10952
|
+
data = await this.getDataByPath(`${path}${ext}`);
|
|
10953
|
+
if (data) {
|
|
10954
|
+
break;
|
|
10955
|
+
}
|
|
10956
|
+
}
|
|
10957
|
+
if (data) {
|
|
10958
|
+
return Buffer.from(data);
|
|
10959
|
+
}
|
|
10960
|
+
}
|
|
10961
|
+
}
|
|
10962
|
+
if (mode === "raw") {
|
|
10963
|
+
const decompressedFile = await this.getDataByPath(`${path}.gz`);
|
|
10964
|
+
if (decompressedFile) {
|
|
10965
|
+
return Buffer.from(decompressedFile);
|
|
10966
|
+
}
|
|
10967
|
+
const fileWithoutCompression = this.getFileBytes(path);
|
|
10968
|
+
if (fileWithoutCompression) {
|
|
10969
|
+
return Buffer.from(fileWithoutCompression);
|
|
10970
|
+
}
|
|
10905
10971
|
}
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10972
|
+
throw new Error("No such file in the archieve");
|
|
10973
|
+
}
|
|
10974
|
+
async getDataByPath(path) {
|
|
10975
|
+
const data = this.getFileBytes(path);
|
|
10976
|
+
if (!data) {
|
|
10977
|
+
return void 0;
|
|
10978
|
+
}
|
|
10979
|
+
if (/\.gz$/.test(path)) {
|
|
10980
|
+
const decompressedData = await processOnWorker(CompressionWorker, data, {
|
|
10909
10981
|
compression: "gzip",
|
|
10910
10982
|
operation: "decompress",
|
|
10911
10983
|
_workerType: "test",
|
|
@@ -10913,11 +10985,7 @@
|
|
|
10913
10985
|
});
|
|
10914
10986
|
return decompressedData;
|
|
10915
10987
|
}
|
|
10916
|
-
|
|
10917
|
-
if (fileWithoutCompression) {
|
|
10918
|
-
return Promise.resolve(Buffer.from(fileWithoutCompression));
|
|
10919
|
-
}
|
|
10920
|
-
throw new Error("No such file in the archieve");
|
|
10988
|
+
return Buffer.from(data);
|
|
10921
10989
|
}
|
|
10922
10990
|
getFileBytes(path) {
|
|
10923
10991
|
const nameHash = Buffer.from((0, import_md5.default)(path), "hex");
|
|
@@ -10965,7 +11033,7 @@
|
|
|
10965
11033
|
if (!hashFile) {
|
|
10966
11034
|
throw new Error("No hash file in slpk");
|
|
10967
11035
|
}
|
|
10968
|
-
return await new SLPKArchive(data, hashFile).getFile(options.path ?? "");
|
|
11036
|
+
return await new SLPKArchive(data, hashFile).getFile(options.slpk?.path ?? "", options.slpk?.pathMode);
|
|
10969
11037
|
}
|
|
10970
11038
|
var getByteAt;
|
|
10971
11039
|
var init_parse_slpk = __esm({
|
|
@@ -8,7 +8,7 @@ exports.ArcGisWebSceneLoader = void 0;
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _parseArcgisWebscene = require("./lib/parsers/parse-arcgis-webscene");
|
|
11
|
-
var VERSION = typeof "4.0.0-alpha.
|
|
11
|
+
var VERSION = typeof "4.0.0-alpha.8" !== 'undefined' ? "4.0.0-alpha.8" : 'beta';
|
|
12
12
|
var ArcGisWebSceneLoader = {
|
|
13
13
|
name: 'ArcGIS Web Scene Loader',
|
|
14
14
|
id: 'arcgis-web-scene',
|
|
@@ -15,7 +15,7 @@ var _parseI3sAttribute = require("./lib/parsers/parse-i3s-attribute");
|
|
|
15
15
|
var _urlUtils = require("./lib/utils/url-utils");
|
|
16
16
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
17
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
18
|
-
var VERSION = typeof "4.0.0-alpha.
|
|
18
|
+
var VERSION = typeof "4.0.0-alpha.8" !== 'undefined' ? "4.0.0-alpha.8" : 'latest';
|
|
19
19
|
var EMPTY_VALUE = '';
|
|
20
20
|
var REJECTED_STATUS = 'rejected';
|
|
21
21
|
var I3SAttributeLoader = {
|
|
@@ -8,7 +8,7 @@ exports.I3SBuildingSceneLayerLoader = void 0;
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _parseI3sBuildingSceneLayer = require("./lib/parsers/parse-i3s-building-scene-layer");
|
|
11
|
-
var VERSION = typeof "4.0.0-alpha.
|
|
11
|
+
var VERSION = typeof "4.0.0-alpha.8" !== 'undefined' ? "4.0.0-alpha.8" : 'beta';
|
|
12
12
|
var I3SBuildingSceneLayerLoader = {
|
|
13
13
|
name: 'I3S Building Scene Layer',
|
|
14
14
|
id: 'i3s-building-scene-layer',
|
|
@@ -8,7 +8,7 @@ exports.I3SContentLoader = void 0;
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _parseI3sTileContent = require("./lib/parsers/parse-i3s-tile-content");
|
|
11
|
-
var VERSION = typeof "4.0.0-alpha.
|
|
11
|
+
var VERSION = typeof "4.0.0-alpha.8" !== 'undefined' ? "4.0.0-alpha.8" : 'beta';
|
|
12
12
|
var I3SContentLoader = {
|
|
13
13
|
name: 'I3S Content (Indexed Scene Layers)',
|
|
14
14
|
id: 'i3s-content',
|
package/dist/es5/i3s-loader.js
CHANGED
|
@@ -12,7 +12,7 @@ var _core = require("@loaders.gl/core");
|
|
|
12
12
|
var _i3sContentLoader = require("./i3s-content-loader");
|
|
13
13
|
var _parseI3s = require("./lib/parsers/parse-i3s");
|
|
14
14
|
var _constants = require("./lib/parsers/constants");
|
|
15
|
-
var VERSION = typeof "4.0.0-alpha.
|
|
15
|
+
var VERSION = typeof "4.0.0-alpha.8" !== 'undefined' ? "4.0.0-alpha.8" : 'latest';
|
|
16
16
|
var TILESET_REGEX = /layers\/[0-9]+$/;
|
|
17
17
|
var TILE_HEADER_REGEX = /nodes\/([0-9-]+|root)$/;
|
|
18
18
|
var SLPK_HEX = '504b0304';
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.I3SNodePageLoader = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
-
var VERSION = typeof "4.0.0-alpha.
|
|
10
|
+
var VERSION = typeof "4.0.0-alpha.8" !== 'undefined' ? "4.0.0-alpha.8" : 'latest';
|
|
11
11
|
function parseNodePage(_x, _x2) {
|
|
12
12
|
return _parseNodePage.apply(this, arguments);
|
|
13
13
|
}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.SLPKLoader = void 0;
|
|
7
7
|
var _parseSlpk = require("./lib/parsers/parse-slpk/parse-slpk");
|
|
8
|
-
var VERSION = typeof "4.0.0-alpha.
|
|
8
|
+
var VERSION = typeof "4.0.0-alpha.8" !== 'undefined' ? "4.0.0-alpha.8" : 'latest';
|
|
9
9
|
var SLPKLoader = {
|
|
10
10
|
name: 'I3S SLPK (Scene Layer Package)',
|
|
11
11
|
id: 'slpk',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i3s-slpk-loader.js","names":["_parseSlpk","require","VERSION","SLPKLoader","name","id","module","version","mimeTypes","parse","parseSLPK","extensions","options","exports"],"sources":["../../src/i3s-slpk-loader.ts"],"sourcesContent":["import {LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {parseSLPK} from './lib/parsers/parse-slpk/parse-slpk';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type SLPKLoaderOptions = LoaderOptions & {\n path?: string;\n
|
|
1
|
+
{"version":3,"file":"i3s-slpk-loader.js","names":["_parseSlpk","require","VERSION","SLPKLoader","name","id","module","version","mimeTypes","parse","parseSLPK","extensions","options","exports"],"sources":["../../src/i3s-slpk-loader.ts"],"sourcesContent":["import {LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {parseSLPK} from './lib/parsers/parse-slpk/parse-slpk';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type SLPKLoaderOptions = LoaderOptions & {\n slpk?: {\n path?: string;\n pathMode?: 'http' | 'raw';\n };\n};\n\n/**\n * Loader for SLPK - Scene Layer Package\n */\nexport const SLPKLoader: LoaderWithParser<Buffer, never, SLPKLoaderOptions> = {\n name: 'I3S SLPK (Scene Layer Package)',\n id: 'slpk',\n module: 'i3s',\n version: VERSION,\n mimeTypes: ['application/octet-stream'],\n parse: parseSLPK,\n extensions: ['slpk'],\n options: {}\n};\n"],"mappings":";;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAIA,IAAMC,OAAO,GAAG,sBAAkB,KAAK,WAAW,qBAAiB,QAAQ;AAYpE,IAAMC,UAA8D,GAAG;EAC5EC,IAAI,EAAE,gCAAgC;EACtCC,EAAE,EAAE,MAAM;EACVC,MAAM,EAAE,KAAK;EACbC,OAAO,EAAEL,OAAO;EAChBM,SAAS,EAAE,CAAC,0BAA0B,CAAC;EACvCC,KAAK,EAAEC,oBAAS;EAChBC,UAAU,EAAE,CAAC,MAAM,CAAC;EACpBC,OAAO,EAAE,CAAC;AACZ,CAAC;AAACC,OAAA,CAAAV,UAAA,GAAAA,UAAA"}
|
package/dist/es5/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_constants","require","_i3sLoader","_i3sSlpkLoader","_i3sContentLoader","_i3sAttributeLoader","_i3sBuildingSceneLayerLoader","_i3sNodePageLoader","_arcgisWebsceneLoader"],"sources":["../../src/index.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nexport type {\n BoundingVolumes,\n Mbs,\n Obb,\n SceneLayer3D,\n AttributeStorageInfo,\n Field,\n ESRIField,\n PopupInfo,\n Node3DIndexDocument,\n LodSelection,\n NodeReference,\n Resource,\n MaxScreenThresholdSQ,\n NodeInPage,\n SharedResources,\n Attribute,\n Extent,\n FeatureAttribute,\n FieldInfo,\n I3SMaterialDefinition,\n TextureDefinitionInfo,\n MaterialDefinitionInfo,\n FullExtent,\n StatisticsInfo,\n StatsInfo,\n Histogram,\n ValueCount,\n BuildingSceneSublayer,\n DATA_TYPE,\n OperationalLayer\n} from './types';\n\nexport {COORDINATE_SYSTEM} from './lib/parsers/constants';\n\nexport {I3SLoader} from './i3s-loader';\nexport {SLPKLoader} from './i3s-slpk-loader';\nexport {I3SContentLoader} from './i3s-content-loader';\nexport {I3SAttributeLoader, loadFeatureAttributes} from './i3s-attribute-loader';\nexport {I3SBuildingSceneLayerLoader} from './i3s-building-scene-layer-loader';\nexport {I3SNodePageLoader} from './i3s-node-page-loader';\nexport {ArcGisWebSceneLoader} from './arcgis-webscene-loader';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","names":["_constants","require","_i3sLoader","_i3sSlpkLoader","_i3sContentLoader","_i3sAttributeLoader","_i3sBuildingSceneLayerLoader","_i3sNodePageLoader","_arcgisWebsceneLoader"],"sources":["../../src/index.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nexport type {\n BoundingVolumes,\n Mbs,\n Obb,\n SceneLayer3D,\n AttributeStorageInfo,\n Field,\n ESRIField,\n PopupInfo,\n Node3DIndexDocument,\n LodSelection,\n NodeReference,\n Resource,\n MaxScreenThresholdSQ,\n NodeInPage,\n SharedResources,\n Attribute,\n Extent,\n FeatureAttribute,\n FieldInfo,\n I3SMaterialDefinition,\n TextureDefinitionInfo,\n MaterialDefinitionInfo,\n FullExtent,\n StatisticsInfo,\n StatsInfo,\n Histogram,\n ValueCount,\n BuildingSceneSublayer,\n DATA_TYPE,\n OperationalLayer,\n TextureSetDefinitionFormats\n} from './types';\n\nexport {COORDINATE_SYSTEM} from './lib/parsers/constants';\n\nexport {I3SLoader} from './i3s-loader';\nexport {SLPKLoader} from './i3s-slpk-loader';\nexport {I3SContentLoader} from './i3s-content-loader';\nexport {I3SAttributeLoader, loadFeatureAttributes} from './i3s-attribute-loader';\nexport {I3SBuildingSceneLayerLoader} from './i3s-building-scene-layer-loader';\nexport {I3SNodePageLoader} from './i3s-node-page-loader';\nexport {ArcGisWebSceneLoader} from './arcgis-webscene-loader';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AACA,IAAAK,4BAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AACA,IAAAO,qBAAA,GAAAP,OAAA"}
|
|
@@ -18,7 +18,7 @@ var _textures = require("@loaders.gl/textures");
|
|
|
18
18
|
var _types = require("../../types");
|
|
19
19
|
var _urlUtils = require("../utils/url-utils");
|
|
20
20
|
var _constants = require("./constants");
|
|
21
|
-
var
|
|
21
|
+
var _customizeСolors = require("../utils/customize-\u0441olors");
|
|
22
22
|
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; } } }; }
|
|
23
23
|
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); }
|
|
24
24
|
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; }
|
|
@@ -206,7 +206,7 @@ function _parseI3SNodeGeometry() {
|
|
|
206
206
|
content.coordinateSystem = _constants.COORDINATE_SYSTEM.LNGLAT_OFFSETS;
|
|
207
207
|
}
|
|
208
208
|
_context2.next = 28;
|
|
209
|
-
return (0,
|
|
209
|
+
return (0, _customizeСolors.customizeColors)(attributes.color, attributes.id, tileOptions, tilesetOptions, options);
|
|
210
210
|
case 28:
|
|
211
211
|
attributes.color = _context2.sent;
|
|
212
212
|
content.attributes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-i3s-tile-content.js","names":["_core","require","_core2","_geospatial","_images","_draco","_textures","_types","_urlUtils","_constants","_customizeColors","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","call","step","next","_e2","return","minLen","_arrayLikeToArray","Object","prototype","toString","slice","constructor","name","from","test","arr","len","arr2","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","arguments","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","scratchVector","Vector3","getLoaderForTextureFormat","textureFormat","CompressedTextureLoader","BasisLoader","ImageLoader","I3S_ATTRIBUTE_TYPE","parseI3STileContent","_x","_x2","_x3","_x4","_x5","_parseI3STileContent","_asyncToGenerator2","_regenerator","mark","_callee","arrayBuffer","tileOptions","tilesetOptions","options","context","content","_options$i3s","url","loader","response","_arrayBuffer","_options","texture","wrap","_callee$","_context","prev","attributes","indices","featureIds","vertexCount","modelMatrix","Matrix4","coordinateSystem","byteLength","textureUrl","getUrlWithToken","i3s","token","fetch","sent","decodeTextures","textureLoaderOptions","image","type","parse","t0","load","compressed","mipmaps","width","height","data","material","makePbrMaterial","materialDefinition","parseI3SNodeGeometry","abrupt","stop","_x6","_x7","_x8","_x9","_x10","_parseI3SNodeGeometry","_callee2","_options$i3s2","contentByteLength","byteOffset","featureCount","_decompressedGeometry","decompressedGeometry","_decompressedGeometry2","POSITION","NORMAL","COLOR_0","TEXCOORD_0","featureIndex","uvRegion","_tilesetOptions$store","vertexAttributes","attributesOrder","featureAttributes","featureAttributeOrder","headers","_normalizeAttributes","normalizedVertexAttributes","offset","_normalizeAttributes2","normalizedFeatureAttributes","enuMatrix","attributeIndex","_callee2$","_context2","isDracoGeometry","DracoLoader","draco","attributeNameEntry","header","position","normal","color","uv0","id","updateAttributesMetadata","getFeatureIdsFromFeatureIndexMetadata","flattenFeatureIdsByFeatureIndices","store","defaultGeometrySchema","ordering","parseHeaders","normalizeAttributes","flattenFeatureIdsByFaceRanges","concatAttributes","COORDINATE_SYSTEM","METER_OFFSETS","parsePositions","invert","getModelMatrix","LNGLAT_OFFSETS","customizeColors","positions","normals","colors","normalizeAttribute","texCoords","uvRegions","region","loaderData","dracoAttribute","metadata","attribute","normalized","_iterator","_step","_step$value","property","TypedArrayTypeHeader","getConstructorForDataFormat","HeaderAttributeProperty","sizeOf","attributeCount","_iterator2","_step2","_vertexAttributes$att","valueType","valuesPerElement","buffer","parseUint64Values","TypedArrayType","GL_TYPE_MAP","size","elementsCount","attributeSize","values","dataView","DataView","index","left","getUint32","right","Math","pow","Uint32Array","mbs","cartographicOrigin","cartesianOrigin","Ellipsoid","WGS84","cartographicToCartesian","eastNorthUpToFixedFrame","offsetsToCartesians","vertices","undefined","Float64Array","scaleX","double","scaleY","x","y","z","subarray","_metadata$i3sScale_x","_metadata$i3sScale_y","pbrMaterial","pbrMetallicRoughness","baseColorFactor","baseColorTexture","texCoord","alphaCutoff","alphaMode","toUpperCase","emissiveFactor","convertColorFormat","setMaterialTexture","colorFactor","normalizedColor","_toConsumableArray2","emissiveTexture","metallicRoughnessTexture","normalTexture","occlusionTexture","faceRange","range","featureIdsLength","orderedFeatureIndices","startIndex","fillId","Number","endValue","prevValue","trianglesCount","endIndex","fill","featureIndices","result","Float32Array","_featureIndex$metadat","_featureIndex$metadat2","intArray"],"sources":["../../../../src/lib/parsers/parse-i3s-tile-content.ts"],"sourcesContent":["import type {TypedArray} from '@loaders.gl/schema';\nimport {load, parse} from '@loaders.gl/core';\nimport {Vector3, Matrix4} from '@math.gl/core';\nimport {Ellipsoid} from '@math.gl/geospatial';\nimport type {LoaderOptions, LoaderContext} from '@loaders.gl/loader-utils';\nimport {ImageLoader} from '@loaders.gl/images';\nimport {DracoLoader, DracoMesh} from '@loaders.gl/draco';\nimport {BasisLoader, CompressedTextureLoader} from '@loaders.gl/textures';\n\nimport {\n FeatureAttribute,\n VertexAttribute,\n I3SMeshAttributes,\n I3SMeshAttribute,\n TileContentTexture,\n HeaderAttributeProperty,\n I3SMaterialDefinition,\n I3STileContent,\n I3STileOptions,\n I3STilesetOptions\n} from '../../types';\nimport {getUrlWithToken} from '../utils/url-utils';\n\nimport {GL_TYPE_MAP, getConstructorForDataFormat, sizeOf, COORDINATE_SYSTEM} from './constants';\nimport {I3SLoaderOptions} from '../../i3s-loader';\nimport {customizeColors} from '../utils/customizeColors';\n\nconst scratchVector = new Vector3([0, 0, 0]);\n\nfunction getLoaderForTextureFormat(textureFormat?: 'jpg' | 'png' | 'ktx-etc2' | 'dds' | 'ktx2') {\n switch (textureFormat) {\n case 'ktx-etc2':\n case 'dds':\n return CompressedTextureLoader;\n case 'ktx2':\n return BasisLoader;\n case 'jpg':\n case 'png':\n default:\n return ImageLoader;\n }\n}\n\nconst I3S_ATTRIBUTE_TYPE = 'i3s-attribute-type';\n\nexport async function parseI3STileContent(\n arrayBuffer: ArrayBuffer,\n tileOptions: I3STileOptions,\n tilesetOptions: I3STilesetOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n): Promise<I3STileContent> {\n const content: I3STileContent = {\n attributes: {},\n indices: null,\n featureIds: [],\n vertexCount: 0,\n modelMatrix: new Matrix4(),\n coordinateSystem: 0,\n byteLength: 0,\n texture: null\n };\n\n if (tileOptions.textureUrl) {\n // @ts-expect-error options is not properly typed\n const url = getUrlWithToken(tileOptions.textureUrl, options?.i3s?.token);\n const loader = getLoaderForTextureFormat(tileOptions.textureFormat);\n const response = await fetch(url, options?.fetch as RequestInit);\n const arrayBuffer = await response.arrayBuffer();\n\n // @ts-expect-error options is not properly typed\n if (options?.i3s.decodeTextures) {\n if (loader === ImageLoader) {\n const options = {...tileOptions.textureLoaderOptions, image: {type: 'data'}};\n try {\n // @ts-ignore context must be defined\n // Image constructor is not supported in worker thread.\n // Do parsing image data on the main thread by using context to avoid worker issues.\n content.texture = await context.parse(arrayBuffer, options);\n } catch (e) {\n // context object is different between worker and node.js conversion script.\n // To prevent error we parse data in ordinary way if it is not parsed by using context.\n // @ts-expect-error\n content.texture = await parse(arrayBuffer, loader, options);\n }\n } else if (loader === CompressedTextureLoader || loader === BasisLoader) {\n let texture = await load(arrayBuffer, loader, tileOptions.textureLoaderOptions);\n if (loader === BasisLoader) {\n // @ts-expect-error\n texture = texture[0];\n }\n content.texture = {\n compressed: true,\n mipmaps: false,\n // @ts-expect-error\n width: texture[0].width,\n // @ts-expect-error\n height: texture[0].height,\n // @ts-expect-error\n data: texture\n };\n }\n } else {\n content.texture = arrayBuffer;\n }\n }\n\n content.material = makePbrMaterial(tileOptions.materialDefinition, content.texture);\n if (content.material) {\n content.texture = null;\n }\n\n return await parseI3SNodeGeometry(arrayBuffer, content, tileOptions, tilesetOptions, options);\n}\n\n/* eslint-disable max-statements */\nasync function parseI3SNodeGeometry(\n arrayBuffer: ArrayBuffer,\n content: I3STileContent,\n tileOptions: I3STileOptions,\n tilesetOptions: I3STilesetOptions,\n options?: I3SLoaderOptions\n): Promise<I3STileContent> {\n const contentByteLength = arrayBuffer.byteLength;\n let attributes: I3SMeshAttributes;\n let vertexCount: number;\n let byteOffset: number = 0;\n let featureCount: number = 0;\n let indices: TypedArray | undefined;\n\n if (tileOptions.isDracoGeometry) {\n const decompressedGeometry: DracoMesh = await parse(arrayBuffer, DracoLoader, {\n draco: {\n attributeNameEntry: I3S_ATTRIBUTE_TYPE\n }\n });\n // @ts-expect-error\n vertexCount = decompressedGeometry.header.vertexCount;\n indices = decompressedGeometry.indices?.value;\n const {\n POSITION,\n NORMAL,\n COLOR_0,\n TEXCOORD_0,\n ['feature-index']: featureIndex,\n ['uv-region']: uvRegion\n } = decompressedGeometry.attributes;\n\n attributes = {\n position: POSITION,\n normal: NORMAL,\n color: COLOR_0,\n uv0: TEXCOORD_0,\n uvRegion,\n id: featureIndex\n };\n\n updateAttributesMetadata(attributes, decompressedGeometry);\n\n const featureIds = getFeatureIdsFromFeatureIndexMetadata(featureIndex);\n\n if (featureIds) {\n flattenFeatureIdsByFeatureIndices(attributes, featureIds);\n }\n } else {\n const {\n vertexAttributes,\n ordering: attributesOrder,\n featureAttributes,\n featureAttributeOrder\n } = tilesetOptions.store.defaultGeometrySchema;\n // First 8 bytes reserved for header (vertexCount and featureCount)\n const headers = parseHeaders(arrayBuffer, tilesetOptions);\n byteOffset = headers.byteOffset;\n vertexCount = headers.vertexCount;\n featureCount = headers.featureCount;\n // Getting vertex attributes such as positions, normals, colors, etc...\n const {attributes: normalizedVertexAttributes, byteOffset: offset} = normalizeAttributes(\n arrayBuffer,\n byteOffset,\n vertexAttributes,\n vertexCount,\n attributesOrder\n );\n\n // Getting feature attributes such as featureIds and faceRange\n const {attributes: normalizedFeatureAttributes} = normalizeAttributes(\n arrayBuffer,\n offset,\n featureAttributes,\n featureCount,\n featureAttributeOrder\n );\n\n flattenFeatureIdsByFaceRanges(normalizedFeatureAttributes);\n attributes = concatAttributes(normalizedVertexAttributes, normalizedFeatureAttributes);\n }\n\n if (\n !options?.i3s?.coordinateSystem ||\n options.i3s.coordinateSystem === COORDINATE_SYSTEM.METER_OFFSETS\n ) {\n const enuMatrix = parsePositions(attributes.position, tileOptions);\n content.modelMatrix = enuMatrix.invert();\n content.coordinateSystem = COORDINATE_SYSTEM.METER_OFFSETS;\n } else {\n content.modelMatrix = getModelMatrix(attributes.position);\n content.coordinateSystem = COORDINATE_SYSTEM.LNGLAT_OFFSETS;\n }\n\n attributes.color = await customizeColors(\n attributes.color,\n attributes.id,\n tileOptions,\n tilesetOptions,\n options\n );\n\n content.attributes = {\n positions: attributes.position,\n normals: attributes.normal,\n colors: normalizeAttribute(attributes.color), // Normalize from UInt8\n texCoords: attributes.uv0,\n uvRegions: normalizeAttribute(attributes.uvRegion || attributes.region) // Normalize from UInt16\n };\n content.indices = indices || null;\n\n if (attributes.id && attributes.id.value) {\n content.featureIds = attributes.id.value;\n }\n\n // Remove undefined attributes\n for (const attributeIndex in content.attributes) {\n if (!content.attributes[attributeIndex]) {\n delete content.attributes[attributeIndex];\n }\n }\n\n content.vertexCount = vertexCount;\n content.byteLength = contentByteLength;\n\n return content;\n}\n\n/**\n * Update attributes with metadata from decompressed geometry.\n * @param decompressedGeometry\n * @param attributes\n */\nfunction updateAttributesMetadata(\n attributes: I3SMeshAttributes,\n decompressedGeometry: DracoMesh\n): void {\n for (const key in decompressedGeometry.loaderData.attributes) {\n const dracoAttribute = decompressedGeometry.loaderData.attributes[key];\n\n switch (dracoAttribute.name) {\n case 'POSITION':\n attributes.position.metadata = dracoAttribute.metadata;\n break;\n case 'feature-index':\n attributes.id.metadata = dracoAttribute.metadata;\n break;\n default:\n break;\n }\n }\n}\n\n/**\n * Do concatenation of attribute objects.\n * Done as separate fucntion to avoid ts errors.\n * @param normalizedVertexAttributes\n * @param normalizedFeatureAttributes\n * @returns - result of attributes concatenation.\n */\nfunction concatAttributes(\n normalizedVertexAttributes: I3SMeshAttributes,\n normalizedFeatureAttributes: I3SMeshAttributes\n): I3SMeshAttributes {\n return {...normalizedVertexAttributes, ...normalizedFeatureAttributes};\n}\n\n/**\n * Normalize attribute to range [0..1] . Eg. convert colors buffer from [255,255,255,255] to [1,1,1,1]\n * @param attribute - geometry attribute\n * @returns - geometry attribute in right format\n */\nfunction normalizeAttribute(attribute: I3SMeshAttribute): I3SMeshAttribute {\n if (!attribute) {\n return attribute;\n }\n attribute.normalized = true;\n return attribute;\n}\n\nfunction parseHeaders(arrayBuffer: ArrayBuffer, options: I3STilesetOptions) {\n let byteOffset = 0;\n // First 8 bytes reserved for header (vertexCount and featurecount)\n let vertexCount = 0;\n let featureCount = 0;\n for (const {property, type} of options.store.defaultGeometrySchema.header) {\n const TypedArrayTypeHeader = getConstructorForDataFormat(type);\n switch (property) {\n case HeaderAttributeProperty.vertexCount:\n vertexCount = new TypedArrayTypeHeader(arrayBuffer, 0, 4)[0];\n byteOffset += sizeOf(type);\n break;\n case HeaderAttributeProperty.featureCount:\n featureCount = new TypedArrayTypeHeader(arrayBuffer, 4, 4)[0];\n byteOffset += sizeOf(type);\n break;\n default:\n break;\n }\n }\n\n return {\n vertexCount,\n featureCount,\n byteOffset\n };\n}\n\n/* eslint-enable max-statements */\n\nfunction normalizeAttributes(\n arrayBuffer: ArrayBuffer,\n byteOffset: number,\n vertexAttributes: VertexAttribute | FeatureAttribute,\n attributeCount: number,\n attributesOrder: string[]\n) {\n const attributes: I3SMeshAttributes = {};\n\n // the order of attributes depend on the order being added to the vertexAttributes object\n for (const attribute of attributesOrder) {\n if (vertexAttributes[attribute]) {\n const {valueType, valuesPerElement}: {valueType: string; valuesPerElement: number} =\n vertexAttributes[attribute];\n // protect from arrayBuffer read overunns by NOT assuming node has regions always even though its declared in defaultGeometrySchema.\n // In i3s 1.6: client is required to decide that based on ./shared resource of the node (materialDefinitions.[Mat_id].params.vertexRegions == true)\n // In i3s 1.7 the property has been rolled into the 3d scene layer json/node pages.\n // Code below does not account when the bytelength is actually bigger than\n // the calculated value (b\\c the tile potentially could have mesh segmentation information).\n // In those cases tiles without regions could fail or have garbage values.\n if (\n byteOffset + attributeCount * valuesPerElement * sizeOf(valueType) <=\n arrayBuffer.byteLength\n ) {\n const buffer = arrayBuffer.slice(byteOffset);\n let value: TypedArray;\n\n if (valueType === 'UInt64') {\n value = parseUint64Values(buffer, attributeCount * valuesPerElement, sizeOf(valueType));\n } else {\n const TypedArrayType = getConstructorForDataFormat(valueType);\n value = new TypedArrayType(buffer, 0, attributeCount * valuesPerElement);\n }\n\n attributes[attribute] = {\n value,\n type: GL_TYPE_MAP[valueType],\n size: valuesPerElement\n };\n\n switch (attribute) {\n case 'color':\n attributes.color.normalized = true;\n break;\n case 'position':\n case 'region':\n case 'normal':\n default:\n }\n\n byteOffset = byteOffset + attributeCount * valuesPerElement * sizeOf(valueType);\n } else if (attribute !== 'uv0') {\n break;\n }\n }\n }\n\n return {attributes, byteOffset};\n}\n\n/**\n * Parse buffer to return array of uint64 values\n *\n * @param buffer\n * @param elementsCount\n * @returns 64-bit array of values until precision is lost after Number.MAX_SAFE_INTEGER\n */\nfunction parseUint64Values(\n buffer: ArrayBuffer,\n elementsCount: number,\n attributeSize: number\n): Uint32Array {\n const values: number[] = [];\n const dataView = new DataView(buffer);\n let offset = 0;\n\n for (let index = 0; index < elementsCount; index++) {\n // split 64-bit number into two 32-bit parts\n const left = dataView.getUint32(offset, true);\n const right = dataView.getUint32(offset + 4, true);\n // combine the two 32-bit values\n const value = left + 2 ** 32 * right;\n\n values.push(value);\n offset += attributeSize;\n }\n\n return new Uint32Array(values);\n}\n\nfunction parsePositions(attribute: I3SMeshAttribute, options: I3STileOptions): Matrix4 {\n const mbs = options.mbs;\n const value = attribute.value;\n const metadata = attribute.metadata;\n const enuMatrix = new Matrix4();\n const cartographicOrigin = new Vector3(mbs[0], mbs[1], mbs[2]);\n const cartesianOrigin = new Vector3();\n Ellipsoid.WGS84.cartographicToCartesian(cartographicOrigin, cartesianOrigin);\n Ellipsoid.WGS84.eastNorthUpToFixedFrame(cartesianOrigin, enuMatrix);\n attribute.value = offsetsToCartesians(value, metadata, cartographicOrigin);\n\n return enuMatrix;\n}\n\n/**\n * Converts position coordinates to absolute cartesian coordinates\n * @param vertices - \"position\" attribute data\n * @param metadata - When the geometry is DRACO compressed, contain position attribute's metadata\n * https://github.com/Esri/i3s-spec/blob/master/docs/1.7/compressedAttributes.cmn.md\n * @param cartographicOrigin - Cartographic origin coordinates\n * @returns - converted \"position\" data\n */\nfunction offsetsToCartesians(\n vertices: number[] | TypedArray,\n metadata: any = {},\n cartographicOrigin: Vector3\n): Float64Array {\n const positions = new Float64Array(vertices.length);\n const scaleX = (metadata['i3s-scale_x'] && metadata['i3s-scale_x'].double) || 1;\n const scaleY = (metadata['i3s-scale_y'] && metadata['i3s-scale_y'].double) || 1;\n for (let i = 0; i < positions.length; i += 3) {\n positions[i] = vertices[i] * scaleX + cartographicOrigin.x;\n positions[i + 1] = vertices[i + 1] * scaleY + cartographicOrigin.y;\n positions[i + 2] = vertices[i + 2] + cartographicOrigin.z;\n }\n\n for (let i = 0; i < positions.length; i += 3) {\n // @ts-ignore\n Ellipsoid.WGS84.cartographicToCartesian(positions.subarray(i, i + 3), scratchVector);\n positions[i] = scratchVector.x;\n positions[i + 1] = scratchVector.y;\n positions[i + 2] = scratchVector.z;\n }\n\n return positions;\n}\n\n/**\n * Get model matrix for loaded vertices\n * @param positions positions attribute\n * @returns Matrix4 - model matrix for geometry transformation\n */\nfunction getModelMatrix(positions: I3SMeshAttribute): Matrix4 {\n const metadata = positions.metadata;\n const scaleX: number = metadata?.['i3s-scale_x']?.double || 1;\n const scaleY: number = metadata?.['i3s-scale_y']?.double || 1;\n const modelMatrix = new Matrix4();\n modelMatrix[0] = scaleX;\n modelMatrix[5] = scaleY;\n return modelMatrix;\n}\n\n/**\n * Makes a glTF-compatible PBR material from an I3S material definition\n * @param materialDefinition - i3s material definition\n * https://github.com/Esri/i3s-spec/blob/master/docs/1.7/materialDefinitions.cmn.md\n * @param texture - texture image\n * @returns {object}\n */\nfunction makePbrMaterial(materialDefinition?: I3SMaterialDefinition, texture?: TileContentTexture) {\n let pbrMaterial;\n if (materialDefinition) {\n pbrMaterial = {\n ...materialDefinition,\n pbrMetallicRoughness: materialDefinition.pbrMetallicRoughness\n ? {...materialDefinition.pbrMetallicRoughness}\n : {baseColorFactor: [255, 255, 255, 255]}\n };\n } else {\n pbrMaterial = {\n pbrMetallicRoughness: {}\n };\n if (texture) {\n pbrMaterial.pbrMetallicRoughness.baseColorTexture = {texCoord: 0};\n } else {\n pbrMaterial.pbrMetallicRoughness.baseColorFactor = [255, 255, 255, 255];\n }\n }\n\n // Set default 0.25 per spec https://github.com/Esri/i3s-spec/blob/master/docs/1.7/materialDefinitions.cmn.md\n pbrMaterial.alphaCutoff = pbrMaterial.alphaCutoff || 0.25;\n\n if (pbrMaterial.alphaMode) {\n // I3S contain alphaMode in lowerCase\n pbrMaterial.alphaMode = pbrMaterial.alphaMode.toUpperCase();\n }\n\n // Convert colors from [255,255,255,255] to [1,1,1,1]\n if (pbrMaterial.emissiveFactor) {\n pbrMaterial.emissiveFactor = convertColorFormat(pbrMaterial.emissiveFactor);\n }\n if (pbrMaterial.pbrMetallicRoughness && pbrMaterial.pbrMetallicRoughness.baseColorFactor) {\n pbrMaterial.pbrMetallicRoughness.baseColorFactor = convertColorFormat(\n pbrMaterial.pbrMetallicRoughness.baseColorFactor\n );\n }\n\n if (texture) {\n setMaterialTexture(pbrMaterial, texture);\n }\n\n return pbrMaterial;\n}\n\n/**\n * Convert color from [255,255,255,255] to [1,1,1,1]\n * @param colorFactor - color array\n * @returns - new color array\n */\nfunction convertColorFormat(colorFactor: number[]): number[] {\n const normalizedColor = [...colorFactor];\n for (let index = 0; index < colorFactor.length; index++) {\n normalizedColor[index] = colorFactor[index] / 255;\n }\n return normalizedColor;\n}\n\n/**\n * Set texture in PBR material\n * @param {object} material - i3s material definition\n * @param image - texture image\n * @returns\n */\nfunction setMaterialTexture(material, image: TileContentTexture): void {\n const texture = {source: {image}};\n // I3SLoader now support loading only one texture. This elseif sequence will assign this texture to one of\n // properties defined in materialDefinition\n if (material.pbrMetallicRoughness && material.pbrMetallicRoughness.baseColorTexture) {\n material.pbrMetallicRoughness.baseColorTexture = {\n ...material.pbrMetallicRoughness.baseColorTexture,\n texture\n };\n } else if (material.emissiveTexture) {\n material.emissiveTexture = {...material.emissiveTexture, texture};\n } else if (\n material.pbrMetallicRoughness &&\n material.pbrMetallicRoughness.metallicRoughnessTexture\n ) {\n material.pbrMetallicRoughness.metallicRoughnessTexture = {\n ...material.pbrMetallicRoughness.metallicRoughnessTexture,\n texture\n };\n } else if (material.normalTexture) {\n material.normalTexture = {...material.normalTexture, texture};\n } else if (material.occlusionTexture) {\n material.occlusionTexture = {...material.occlusionTexture, texture};\n }\n}\n\n/**\n * Flatten feature ids using face ranges\n * @param normalizedFeatureAttributes\n * @returns\n */\nfunction flattenFeatureIdsByFaceRanges(normalizedFeatureAttributes: I3SMeshAttributes): void {\n const {id, faceRange} = normalizedFeatureAttributes;\n\n if (!id || !faceRange) {\n return;\n }\n\n const featureIds = id.value;\n const range = faceRange.value;\n const featureIdsLength = range[range.length - 1] + 1;\n const orderedFeatureIndices = new Uint32Array(featureIdsLength * 3);\n\n let featureIndex = 0;\n let startIndex = 0;\n\n for (let index = 1; index < range.length; index += 2) {\n const fillId = Number(featureIds[featureIndex]);\n const endValue = range[index];\n const prevValue = range[index - 1];\n const trianglesCount = endValue - prevValue + 1;\n const endIndex = startIndex + trianglesCount * 3;\n\n orderedFeatureIndices.fill(fillId, startIndex, endIndex);\n\n featureIndex++;\n startIndex = endIndex;\n }\n\n normalizedFeatureAttributes.id.value = orderedFeatureIndices;\n}\n\n/**\n * Flatten feature ids using featureIndices\n * @param attributes\n * @param featureIds\n * @returns\n */\nfunction flattenFeatureIdsByFeatureIndices(\n attributes: I3SMeshAttributes,\n featureIds: Int32Array\n): void {\n const featureIndices = attributes.id.value;\n const result = new Float32Array(featureIndices.length);\n\n for (let index = 0; index < featureIndices.length; index++) {\n result[index] = featureIds[featureIndices[index]];\n }\n\n attributes.id.value = result;\n}\n\n/**\n * Flatten feature ids using featureIndices\n * @param featureIndex\n * @returns\n */\nfunction getFeatureIdsFromFeatureIndexMetadata(\n featureIndex: I3SMeshAttribute\n): Int32Array | undefined {\n return featureIndex?.metadata?.['i3s-feature-ids']?.intArray;\n}\n"],"mappings":";;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AAYA,IAAAO,SAAA,GAAAP,OAAA;AAEA,IAAAQ,UAAA,GAAAR,OAAA;AAEA,IAAAS,gBAAA,GAAAT,OAAA;AAAyD,SAAAU,2BAAAC,CAAA,EAAAC,cAAA,QAAAC,EAAA,UAAAC,MAAA,oBAAAH,CAAA,CAAAG,MAAA,CAAAC,QAAA,KAAAJ,CAAA,qBAAAE,EAAA,QAAAG,KAAA,CAAAC,OAAA,CAAAN,CAAA,MAAAE,EAAA,GAAAK,2BAAA,CAAAP,CAAA,MAAAC,cAAA,IAAAD,CAAA,WAAAA,CAAA,CAAAQ,MAAA,qBAAAN,EAAA,EAAAF,CAAA,GAAAE,EAAA,MAAAO,CAAA,UAAAC,CAAA,YAAAA,EAAA,eAAAC,CAAA,EAAAD,CAAA,EAAAE,CAAA,WAAAA,EAAA,QAAAH,CAAA,IAAAT,CAAA,CAAAQ,MAAA,WAAAK,IAAA,mBAAAA,IAAA,SAAAC,KAAA,EAAAd,CAAA,CAAAS,CAAA,UAAAM,CAAA,WAAAA,EAAAC,EAAA,UAAAA,EAAA,KAAAC,CAAA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AqB;AAC9D;AAQA,SAASnG,iCAAiCA,CACxC/E,UAA6B,EAC7BE,UAAsB,EAChB;EACN,IAAMyL,cAAc,GAAG3L,UAAU,CAAC4E,EAAE,CAACjK,KAAK;EAC1C,IAAMiR,MAAM,GAAG,IAAIC,YAAY,CAACF,cAAc,CAACtR,MAAM,CAAC;EAEtD,KAAK,IAAI6N,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGyD,cAAc,CAACtR,MAAM,EAAE6N,KAAK,EAAE,EAAE;IAC1D0D,MAAM,CAAC1D,KAAK,CAAC,GAAGhI,UAAU,CAACyL,cAAc,CAACzD,KAAK,CAAC,CAAC;EACnD;EAEAlI,UAAU,CAAC4E,EAAE,CAACjK,KAAK,GAAGiR,MAAM;AAC9B;AAOA,SAAS9G,qCAAqCA,CAC5C5B,YAA8B,EACN;EAAA,IAAA4I,qBAAA,EAAAC,sBAAA;EACxB,OAAO7I,YAAY,aAAZA,YAAY,wBAAA4I,qBAAA,GAAZ5I,YAAY,CAAEqD,QAAQ,cAAAuF,qBAAA,wBAAAC,sBAAA,GAAtBD,qBAAA,CAAyB,iBAAiB,CAAC,cAAAC,sBAAA,uBAA3CA,sBAAA,CAA6CC,QAAQ;AAC9D"}
|
|
1
|
+
{"version":3,"file":"parse-i3s-tile-content.js","names":["_core","require","_core2","_geospatial","_images","_draco","_textures","_types","_urlUtils","_constants","_customizeСolors","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","call","step","next","_e2","return","minLen","_arrayLikeToArray","Object","prototype","toString","slice","constructor","name","from","test","arr","len","arr2","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","arguments","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","scratchVector","Vector3","getLoaderForTextureFormat","textureFormat","CompressedTextureLoader","BasisLoader","ImageLoader","I3S_ATTRIBUTE_TYPE","parseI3STileContent","_x","_x2","_x3","_x4","_x5","_parseI3STileContent","_asyncToGenerator2","_regenerator","mark","_callee","arrayBuffer","tileOptions","tilesetOptions","options","context","content","_options$i3s","url","loader","response","_arrayBuffer","_options","texture","wrap","_callee$","_context","prev","attributes","indices","featureIds","vertexCount","modelMatrix","Matrix4","coordinateSystem","byteLength","textureUrl","getUrlWithToken","i3s","token","fetch","sent","decodeTextures","textureLoaderOptions","image","type","parse","t0","load","compressed","mipmaps","width","height","data","material","makePbrMaterial","materialDefinition","parseI3SNodeGeometry","abrupt","stop","_x6","_x7","_x8","_x9","_x10","_parseI3SNodeGeometry","_callee2","_options$i3s2","contentByteLength","byteOffset","featureCount","_decompressedGeometry","decompressedGeometry","_decompressedGeometry2","POSITION","NORMAL","COLOR_0","TEXCOORD_0","featureIndex","uvRegion","_tilesetOptions$store","vertexAttributes","attributesOrder","featureAttributes","featureAttributeOrder","headers","_normalizeAttributes","normalizedVertexAttributes","offset","_normalizeAttributes2","normalizedFeatureAttributes","enuMatrix","attributeIndex","_callee2$","_context2","isDracoGeometry","DracoLoader","draco","attributeNameEntry","header","position","normal","color","uv0","id","updateAttributesMetadata","getFeatureIdsFromFeatureIndexMetadata","flattenFeatureIdsByFeatureIndices","store","defaultGeometrySchema","ordering","parseHeaders","normalizeAttributes","flattenFeatureIdsByFaceRanges","concatAttributes","COORDINATE_SYSTEM","METER_OFFSETS","parsePositions","invert","getModelMatrix","LNGLAT_OFFSETS","customizeColors","positions","normals","colors","normalizeAttribute","texCoords","uvRegions","region","loaderData","dracoAttribute","metadata","attribute","normalized","_iterator","_step","_step$value","property","TypedArrayTypeHeader","getConstructorForDataFormat","HeaderAttributeProperty","sizeOf","attributeCount","_iterator2","_step2","_vertexAttributes$att","valueType","valuesPerElement","buffer","parseUint64Values","TypedArrayType","GL_TYPE_MAP","size","elementsCount","attributeSize","values","dataView","DataView","index","left","getUint32","right","Math","pow","Uint32Array","mbs","cartographicOrigin","cartesianOrigin","Ellipsoid","WGS84","cartographicToCartesian","eastNorthUpToFixedFrame","offsetsToCartesians","vertices","undefined","Float64Array","scaleX","double","scaleY","x","y","z","subarray","_metadata$i3sScale_x","_metadata$i3sScale_y","pbrMaterial","pbrMetallicRoughness","baseColorFactor","baseColorTexture","texCoord","alphaCutoff","alphaMode","toUpperCase","emissiveFactor","convertColorFormat","setMaterialTexture","colorFactor","normalizedColor","_toConsumableArray2","emissiveTexture","metallicRoughnessTexture","normalTexture","occlusionTexture","faceRange","range","featureIdsLength","orderedFeatureIndices","startIndex","fillId","Number","endValue","prevValue","trianglesCount","endIndex","fill","featureIndices","result","Float32Array","_featureIndex$metadat","_featureIndex$metadat2","intArray"],"sources":["../../../../src/lib/parsers/parse-i3s-tile-content.ts"],"sourcesContent":["import type {TypedArray} from '@loaders.gl/schema';\nimport {load, parse} from '@loaders.gl/core';\nimport {Vector3, Matrix4} from '@math.gl/core';\nimport {Ellipsoid} from '@math.gl/geospatial';\nimport type {LoaderOptions, LoaderContext} from '@loaders.gl/loader-utils';\nimport {ImageLoader} from '@loaders.gl/images';\nimport {DracoLoader, DracoMesh} from '@loaders.gl/draco';\nimport {BasisLoader, CompressedTextureLoader} from '@loaders.gl/textures';\n\nimport {\n FeatureAttribute,\n VertexAttribute,\n I3SMeshAttributes,\n I3SMeshAttribute,\n TileContentTexture,\n HeaderAttributeProperty,\n I3SMaterialDefinition,\n I3STileContent,\n I3STileOptions,\n I3STilesetOptions\n} from '../../types';\nimport {getUrlWithToken} from '../utils/url-utils';\n\nimport {GL_TYPE_MAP, getConstructorForDataFormat, sizeOf, COORDINATE_SYSTEM} from './constants';\nimport {I3SLoaderOptions} from '../../i3s-loader';\nimport {customizeColors} from '../utils/customize-сolors';\n\nconst scratchVector = new Vector3([0, 0, 0]);\n\nfunction getLoaderForTextureFormat(textureFormat?: 'jpg' | 'png' | 'ktx-etc2' | 'dds' | 'ktx2') {\n switch (textureFormat) {\n case 'ktx-etc2':\n case 'dds':\n return CompressedTextureLoader;\n case 'ktx2':\n return BasisLoader;\n case 'jpg':\n case 'png':\n default:\n return ImageLoader;\n }\n}\n\nconst I3S_ATTRIBUTE_TYPE = 'i3s-attribute-type';\n\nexport async function parseI3STileContent(\n arrayBuffer: ArrayBuffer,\n tileOptions: I3STileOptions,\n tilesetOptions: I3STilesetOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n): Promise<I3STileContent> {\n const content: I3STileContent = {\n attributes: {},\n indices: null,\n featureIds: [],\n vertexCount: 0,\n modelMatrix: new Matrix4(),\n coordinateSystem: 0,\n byteLength: 0,\n texture: null\n };\n\n if (tileOptions.textureUrl) {\n // @ts-expect-error options is not properly typed\n const url = getUrlWithToken(tileOptions.textureUrl, options?.i3s?.token);\n const loader = getLoaderForTextureFormat(tileOptions.textureFormat);\n const response = await fetch(url, options?.fetch as RequestInit);\n const arrayBuffer = await response.arrayBuffer();\n\n // @ts-expect-error options is not properly typed\n if (options?.i3s.decodeTextures) {\n if (loader === ImageLoader) {\n const options = {...tileOptions.textureLoaderOptions, image: {type: 'data'}};\n try {\n // @ts-ignore context must be defined\n // Image constructor is not supported in worker thread.\n // Do parsing image data on the main thread by using context to avoid worker issues.\n content.texture = await context.parse(arrayBuffer, options);\n } catch (e) {\n // context object is different between worker and node.js conversion script.\n // To prevent error we parse data in ordinary way if it is not parsed by using context.\n // @ts-expect-error\n content.texture = await parse(arrayBuffer, loader, options);\n }\n } else if (loader === CompressedTextureLoader || loader === BasisLoader) {\n let texture = await load(arrayBuffer, loader, tileOptions.textureLoaderOptions);\n if (loader === BasisLoader) {\n // @ts-expect-error\n texture = texture[0];\n }\n content.texture = {\n compressed: true,\n mipmaps: false,\n // @ts-expect-error\n width: texture[0].width,\n // @ts-expect-error\n height: texture[0].height,\n // @ts-expect-error\n data: texture\n };\n }\n } else {\n content.texture = arrayBuffer;\n }\n }\n\n content.material = makePbrMaterial(tileOptions.materialDefinition, content.texture);\n if (content.material) {\n content.texture = null;\n }\n\n return await parseI3SNodeGeometry(arrayBuffer, content, tileOptions, tilesetOptions, options);\n}\n\n/* eslint-disable max-statements */\nasync function parseI3SNodeGeometry(\n arrayBuffer: ArrayBuffer,\n content: I3STileContent,\n tileOptions: I3STileOptions,\n tilesetOptions: I3STilesetOptions,\n options?: I3SLoaderOptions\n): Promise<I3STileContent> {\n const contentByteLength = arrayBuffer.byteLength;\n let attributes: I3SMeshAttributes;\n let vertexCount: number;\n let byteOffset: number = 0;\n let featureCount: number = 0;\n let indices: TypedArray | undefined;\n\n if (tileOptions.isDracoGeometry) {\n const decompressedGeometry: DracoMesh = await parse(arrayBuffer, DracoLoader, {\n draco: {\n attributeNameEntry: I3S_ATTRIBUTE_TYPE\n }\n });\n // @ts-expect-error\n vertexCount = decompressedGeometry.header.vertexCount;\n indices = decompressedGeometry.indices?.value;\n const {\n POSITION,\n NORMAL,\n COLOR_0,\n TEXCOORD_0,\n ['feature-index']: featureIndex,\n ['uv-region']: uvRegion\n } = decompressedGeometry.attributes;\n\n attributes = {\n position: POSITION,\n normal: NORMAL,\n color: COLOR_0,\n uv0: TEXCOORD_0,\n uvRegion,\n id: featureIndex\n };\n\n updateAttributesMetadata(attributes, decompressedGeometry);\n\n const featureIds = getFeatureIdsFromFeatureIndexMetadata(featureIndex);\n\n if (featureIds) {\n flattenFeatureIdsByFeatureIndices(attributes, featureIds);\n }\n } else {\n const {\n vertexAttributes,\n ordering: attributesOrder,\n featureAttributes,\n featureAttributeOrder\n } = tilesetOptions.store.defaultGeometrySchema;\n // First 8 bytes reserved for header (vertexCount and featureCount)\n const headers = parseHeaders(arrayBuffer, tilesetOptions);\n byteOffset = headers.byteOffset;\n vertexCount = headers.vertexCount;\n featureCount = headers.featureCount;\n // Getting vertex attributes such as positions, normals, colors, etc...\n const {attributes: normalizedVertexAttributes, byteOffset: offset} = normalizeAttributes(\n arrayBuffer,\n byteOffset,\n vertexAttributes,\n vertexCount,\n attributesOrder\n );\n\n // Getting feature attributes such as featureIds and faceRange\n const {attributes: normalizedFeatureAttributes} = normalizeAttributes(\n arrayBuffer,\n offset,\n featureAttributes,\n featureCount,\n featureAttributeOrder\n );\n\n flattenFeatureIdsByFaceRanges(normalizedFeatureAttributes);\n attributes = concatAttributes(normalizedVertexAttributes, normalizedFeatureAttributes);\n }\n\n if (\n !options?.i3s?.coordinateSystem ||\n options.i3s.coordinateSystem === COORDINATE_SYSTEM.METER_OFFSETS\n ) {\n const enuMatrix = parsePositions(attributes.position, tileOptions);\n content.modelMatrix = enuMatrix.invert();\n content.coordinateSystem = COORDINATE_SYSTEM.METER_OFFSETS;\n } else {\n content.modelMatrix = getModelMatrix(attributes.position);\n content.coordinateSystem = COORDINATE_SYSTEM.LNGLAT_OFFSETS;\n }\n\n attributes.color = await customizeColors(\n attributes.color,\n attributes.id,\n tileOptions,\n tilesetOptions,\n options\n );\n\n content.attributes = {\n positions: attributes.position,\n normals: attributes.normal,\n colors: normalizeAttribute(attributes.color), // Normalize from UInt8\n texCoords: attributes.uv0,\n uvRegions: normalizeAttribute(attributes.uvRegion || attributes.region) // Normalize from UInt16\n };\n content.indices = indices || null;\n\n if (attributes.id && attributes.id.value) {\n content.featureIds = attributes.id.value;\n }\n\n // Remove undefined attributes\n for (const attributeIndex in content.attributes) {\n if (!content.attributes[attributeIndex]) {\n delete content.attributes[attributeIndex];\n }\n }\n\n content.vertexCount = vertexCount;\n content.byteLength = contentByteLength;\n\n return content;\n}\n\n/**\n * Update attributes with metadata from decompressed geometry.\n * @param decompressedGeometry\n * @param attributes\n */\nfunction updateAttributesMetadata(\n attributes: I3SMeshAttributes,\n decompressedGeometry: DracoMesh\n): void {\n for (const key in decompressedGeometry.loaderData.attributes) {\n const dracoAttribute = decompressedGeometry.loaderData.attributes[key];\n\n switch (dracoAttribute.name) {\n case 'POSITION':\n attributes.position.metadata = dracoAttribute.metadata;\n break;\n case 'feature-index':\n attributes.id.metadata = dracoAttribute.metadata;\n break;\n default:\n break;\n }\n }\n}\n\n/**\n * Do concatenation of attribute objects.\n * Done as separate fucntion to avoid ts errors.\n * @param normalizedVertexAttributes\n * @param normalizedFeatureAttributes\n * @returns - result of attributes concatenation.\n */\nfunction concatAttributes(\n normalizedVertexAttributes: I3SMeshAttributes,\n normalizedFeatureAttributes: I3SMeshAttributes\n): I3SMeshAttributes {\n return {...normalizedVertexAttributes, ...normalizedFeatureAttributes};\n}\n\n/**\n * Normalize attribute to range [0..1] . Eg. convert colors buffer from [255,255,255,255] to [1,1,1,1]\n * @param attribute - geometry attribute\n * @returns - geometry attribute in right format\n */\nfunction normalizeAttribute(attribute: I3SMeshAttribute): I3SMeshAttribute {\n if (!attribute) {\n return attribute;\n }\n attribute.normalized = true;\n return attribute;\n}\n\nfunction parseHeaders(arrayBuffer: ArrayBuffer, options: I3STilesetOptions) {\n let byteOffset = 0;\n // First 8 bytes reserved for header (vertexCount and featurecount)\n let vertexCount = 0;\n let featureCount = 0;\n for (const {property, type} of options.store.defaultGeometrySchema.header) {\n const TypedArrayTypeHeader = getConstructorForDataFormat(type);\n switch (property) {\n case HeaderAttributeProperty.vertexCount:\n vertexCount = new TypedArrayTypeHeader(arrayBuffer, 0, 4)[0];\n byteOffset += sizeOf(type);\n break;\n case HeaderAttributeProperty.featureCount:\n featureCount = new TypedArrayTypeHeader(arrayBuffer, 4, 4)[0];\n byteOffset += sizeOf(type);\n break;\n default:\n break;\n }\n }\n\n return {\n vertexCount,\n featureCount,\n byteOffset\n };\n}\n\n/* eslint-enable max-statements */\n\nfunction normalizeAttributes(\n arrayBuffer: ArrayBuffer,\n byteOffset: number,\n vertexAttributes: VertexAttribute | FeatureAttribute,\n attributeCount: number,\n attributesOrder: string[]\n) {\n const attributes: I3SMeshAttributes = {};\n\n // the order of attributes depend on the order being added to the vertexAttributes object\n for (const attribute of attributesOrder) {\n if (vertexAttributes[attribute]) {\n const {valueType, valuesPerElement}: {valueType: string; valuesPerElement: number} =\n vertexAttributes[attribute];\n // protect from arrayBuffer read overunns by NOT assuming node has regions always even though its declared in defaultGeometrySchema.\n // In i3s 1.6: client is required to decide that based on ./shared resource of the node (materialDefinitions.[Mat_id].params.vertexRegions == true)\n // In i3s 1.7 the property has been rolled into the 3d scene layer json/node pages.\n // Code below does not account when the bytelength is actually bigger than\n // the calculated value (b\\c the tile potentially could have mesh segmentation information).\n // In those cases tiles without regions could fail or have garbage values.\n if (\n byteOffset + attributeCount * valuesPerElement * sizeOf(valueType) <=\n arrayBuffer.byteLength\n ) {\n const buffer = arrayBuffer.slice(byteOffset);\n let value: TypedArray;\n\n if (valueType === 'UInt64') {\n value = parseUint64Values(buffer, attributeCount * valuesPerElement, sizeOf(valueType));\n } else {\n const TypedArrayType = getConstructorForDataFormat(valueType);\n value = new TypedArrayType(buffer, 0, attributeCount * valuesPerElement);\n }\n\n attributes[attribute] = {\n value,\n type: GL_TYPE_MAP[valueType],\n size: valuesPerElement\n };\n\n switch (attribute) {\n case 'color':\n attributes.color.normalized = true;\n break;\n case 'position':\n case 'region':\n case 'normal':\n default:\n }\n\n byteOffset = byteOffset + attributeCount * valuesPerElement * sizeOf(valueType);\n } else if (attribute !== 'uv0') {\n break;\n }\n }\n }\n\n return {attributes, byteOffset};\n}\n\n/**\n * Parse buffer to return array of uint64 values\n *\n * @param buffer\n * @param elementsCount\n * @returns 64-bit array of values until precision is lost after Number.MAX_SAFE_INTEGER\n */\nfunction parseUint64Values(\n buffer: ArrayBuffer,\n elementsCount: number,\n attributeSize: number\n): Uint32Array {\n const values: number[] = [];\n const dataView = new DataView(buffer);\n let offset = 0;\n\n for (let index = 0; index < elementsCount; index++) {\n // split 64-bit number into two 32-bit parts\n const left = dataView.getUint32(offset, true);\n const right = dataView.getUint32(offset + 4, true);\n // combine the two 32-bit values\n const value = left + 2 ** 32 * right;\n\n values.push(value);\n offset += attributeSize;\n }\n\n return new Uint32Array(values);\n}\n\nfunction parsePositions(attribute: I3SMeshAttribute, options: I3STileOptions): Matrix4 {\n const mbs = options.mbs;\n const value = attribute.value;\n const metadata = attribute.metadata;\n const enuMatrix = new Matrix4();\n const cartographicOrigin = new Vector3(mbs[0], mbs[1], mbs[2]);\n const cartesianOrigin = new Vector3();\n Ellipsoid.WGS84.cartographicToCartesian(cartographicOrigin, cartesianOrigin);\n Ellipsoid.WGS84.eastNorthUpToFixedFrame(cartesianOrigin, enuMatrix);\n attribute.value = offsetsToCartesians(value, metadata, cartographicOrigin);\n\n return enuMatrix;\n}\n\n/**\n * Converts position coordinates to absolute cartesian coordinates\n * @param vertices - \"position\" attribute data\n * @param metadata - When the geometry is DRACO compressed, contain position attribute's metadata\n * https://github.com/Esri/i3s-spec/blob/master/docs/1.7/compressedAttributes.cmn.md\n * @param cartographicOrigin - Cartographic origin coordinates\n * @returns - converted \"position\" data\n */\nfunction offsetsToCartesians(\n vertices: number[] | TypedArray,\n metadata: any = {},\n cartographicOrigin: Vector3\n): Float64Array {\n const positions = new Float64Array(vertices.length);\n const scaleX = (metadata['i3s-scale_x'] && metadata['i3s-scale_x'].double) || 1;\n const scaleY = (metadata['i3s-scale_y'] && metadata['i3s-scale_y'].double) || 1;\n for (let i = 0; i < positions.length; i += 3) {\n positions[i] = vertices[i] * scaleX + cartographicOrigin.x;\n positions[i + 1] = vertices[i + 1] * scaleY + cartographicOrigin.y;\n positions[i + 2] = vertices[i + 2] + cartographicOrigin.z;\n }\n\n for (let i = 0; i < positions.length; i += 3) {\n // @ts-ignore\n Ellipsoid.WGS84.cartographicToCartesian(positions.subarray(i, i + 3), scratchVector);\n positions[i] = scratchVector.x;\n positions[i + 1] = scratchVector.y;\n positions[i + 2] = scratchVector.z;\n }\n\n return positions;\n}\n\n/**\n * Get model matrix for loaded vertices\n * @param positions positions attribute\n * @returns Matrix4 - model matrix for geometry transformation\n */\nfunction getModelMatrix(positions: I3SMeshAttribute): Matrix4 {\n const metadata = positions.metadata;\n const scaleX: number = metadata?.['i3s-scale_x']?.double || 1;\n const scaleY: number = metadata?.['i3s-scale_y']?.double || 1;\n const modelMatrix = new Matrix4();\n modelMatrix[0] = scaleX;\n modelMatrix[5] = scaleY;\n return modelMatrix;\n}\n\n/**\n * Makes a glTF-compatible PBR material from an I3S material definition\n * @param materialDefinition - i3s material definition\n * https://github.com/Esri/i3s-spec/blob/master/docs/1.7/materialDefinitions.cmn.md\n * @param texture - texture image\n * @returns {object}\n */\nfunction makePbrMaterial(materialDefinition?: I3SMaterialDefinition, texture?: TileContentTexture) {\n let pbrMaterial;\n if (materialDefinition) {\n pbrMaterial = {\n ...materialDefinition,\n pbrMetallicRoughness: materialDefinition.pbrMetallicRoughness\n ? {...materialDefinition.pbrMetallicRoughness}\n : {baseColorFactor: [255, 255, 255, 255]}\n };\n } else {\n pbrMaterial = {\n pbrMetallicRoughness: {}\n };\n if (texture) {\n pbrMaterial.pbrMetallicRoughness.baseColorTexture = {texCoord: 0};\n } else {\n pbrMaterial.pbrMetallicRoughness.baseColorFactor = [255, 255, 255, 255];\n }\n }\n\n // Set default 0.25 per spec https://github.com/Esri/i3s-spec/blob/master/docs/1.7/materialDefinitions.cmn.md\n pbrMaterial.alphaCutoff = pbrMaterial.alphaCutoff || 0.25;\n\n if (pbrMaterial.alphaMode) {\n // I3S contain alphaMode in lowerCase\n pbrMaterial.alphaMode = pbrMaterial.alphaMode.toUpperCase();\n }\n\n // Convert colors from [255,255,255,255] to [1,1,1,1]\n if (pbrMaterial.emissiveFactor) {\n pbrMaterial.emissiveFactor = convertColorFormat(pbrMaterial.emissiveFactor);\n }\n if (pbrMaterial.pbrMetallicRoughness && pbrMaterial.pbrMetallicRoughness.baseColorFactor) {\n pbrMaterial.pbrMetallicRoughness.baseColorFactor = convertColorFormat(\n pbrMaterial.pbrMetallicRoughness.baseColorFactor\n );\n }\n\n if (texture) {\n setMaterialTexture(pbrMaterial, texture);\n }\n\n return pbrMaterial;\n}\n\n/**\n * Convert color from [255,255,255,255] to [1,1,1,1]\n * @param colorFactor - color array\n * @returns - new color array\n */\nfunction convertColorFormat(colorFactor: number[]): number[] {\n const normalizedColor = [...colorFactor];\n for (let index = 0; index < colorFactor.length; index++) {\n normalizedColor[index] = colorFactor[index] / 255;\n }\n return normalizedColor;\n}\n\n/**\n * Set texture in PBR material\n * @param {object} material - i3s material definition\n * @param image - texture image\n * @returns\n */\nfunction setMaterialTexture(material, image: TileContentTexture): void {\n const texture = {source: {image}};\n // I3SLoader now support loading only one texture. This elseif sequence will assign this texture to one of\n // properties defined in materialDefinition\n if (material.pbrMetallicRoughness && material.pbrMetallicRoughness.baseColorTexture) {\n material.pbrMetallicRoughness.baseColorTexture = {\n ...material.pbrMetallicRoughness.baseColorTexture,\n texture\n };\n } else if (material.emissiveTexture) {\n material.emissiveTexture = {...material.emissiveTexture, texture};\n } else if (\n material.pbrMetallicRoughness &&\n material.pbrMetallicRoughness.metallicRoughnessTexture\n ) {\n material.pbrMetallicRoughness.metallicRoughnessTexture = {\n ...material.pbrMetallicRoughness.metallicRoughnessTexture,\n texture\n };\n } else if (material.normalTexture) {\n material.normalTexture = {...material.normalTexture, texture};\n } else if (material.occlusionTexture) {\n material.occlusionTexture = {...material.occlusionTexture, texture};\n }\n}\n\n/**\n * Flatten feature ids using face ranges\n * @param normalizedFeatureAttributes\n * @returns\n */\nfunction flattenFeatureIdsByFaceRanges(normalizedFeatureAttributes: I3SMeshAttributes): void {\n const {id, faceRange} = normalizedFeatureAttributes;\n\n if (!id || !faceRange) {\n return;\n }\n\n const featureIds = id.value;\n const range = faceRange.value;\n const featureIdsLength = range[range.length - 1] + 1;\n const orderedFeatureIndices = new Uint32Array(featureIdsLength * 3);\n\n let featureIndex = 0;\n let startIndex = 0;\n\n for (let index = 1; index < range.length; index += 2) {\n const fillId = Number(featureIds[featureIndex]);\n const endValue = range[index];\n const prevValue = range[index - 1];\n const trianglesCount = endValue - prevValue + 1;\n const endIndex = startIndex + trianglesCount * 3;\n\n orderedFeatureIndices.fill(fillId, startIndex, endIndex);\n\n featureIndex++;\n startIndex = endIndex;\n }\n\n normalizedFeatureAttributes.id.value = orderedFeatureIndices;\n}\n\n/**\n * Flatten feature ids using featureIndices\n * @param attributes\n * @param featureIds\n * @returns\n */\nfunction flattenFeatureIdsByFeatureIndices(\n attributes: I3SMeshAttributes,\n featureIds: Int32Array\n): void {\n const featureIndices = attributes.id.value;\n const result = new Float32Array(featureIndices.length);\n\n for (let index = 0; index < featureIndices.length; index++) {\n result[index] = featureIds[featureIndices[index]];\n }\n\n attributes.id.value = result;\n}\n\n/**\n * Flatten feature ids using featureIndices\n * @param featureIndex\n * @returns\n */\nfunction getFeatureIdsFromFeatureIndexMetadata(\n featureIndex: I3SMeshAttribute\n): Int32Array | undefined {\n return featureIndex?.metadata?.['i3s-feature-ids']?.intArray;\n}\n"],"mappings":";;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AAYA,IAAAO,SAAA,GAAAP,OAAA;AAEA,IAAAQ,UAAA,GAAAR,OAAA;AAEA,IAAAS,gBAAA,GAAAT,OAAA;AAA0D,SAAAU,2BAAAC,CAAA,EAAAC,cAAA,QAAAC,EAAA,UAAAC,MAAA,oBAAAH,CAAA,CAAAG,MAAA,CAAAC,QAAA,KAAAJ,CAAA,qBAAAE,EAAA,QAAAG,KAAA,CAAAC,OAAA,CAAAN,CAAA,MAAAE,EAAA,GAAAK,2BAAA,CAAAP,CAAA,MAAAC,cAAA,IAAAD,CAAA,WAAAA,CAAA,CAAAQ,MAAA,qBAAAN,EAAA,EAAAF,CAAA,GAAAE,EAAA,MAAAO,CAAA,UAAAC,CAAA,YAAAA,EAAA,eAAAC,CAAA,EAAAD,CAAA,EAAAE,CAAA,WAAAA,EAAA,QAAAH,CAAA,IAAAT,CAAA,CAAAQ,MAAA,WAAAK,IAAA,m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C;IAExDvI,YAAY,EAAE;IACdiI,UAAU,GAAGM,QAAQ;EACvB;EAEA3H,2BAA2B,CAACc,EAAE,CAACjK,KAAK,GAAGuQ,qBAAqB;AAC9D;AAQA,SAASnG,iCAAiCA,CACxC/E,UAA6B,EAC7BE,UAAsB,EAChB;EACN,IAAMyL,cAAc,GAAG3L,UAAU,CAAC4E,EAAE,CAACjK,KAAK;EAC1C,IAAMiR,MAAM,GAAG,IAAIC,YAAY,CAACF,cAAc,CAACtR,MAAM,CAAC;EAEtD,KAAK,IAAI6N,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGyD,cAAc,CAACtR,MAAM,EAAE6N,KAAK,EAAE,EAAE;IAC1D0D,MAAM,CAAC1D,KAAK,CAAC,GAAGhI,UAAU,CAACyL,cAAc,CAACzD,KAAK,CAAC,CAAC;EACnD;EAEAlI,UAAU,CAAC4E,EAAE,CAACjK,KAAK,GAAGiR,MAAM;AAC9B;AAOA,SAAS9G,qCAAqCA,CAC5C5B,YAA8B,EACN;EAAA,IAAA4I,qBAAA,EAAAC,sBAAA;EACxB,OAAO7I,YAAY,aAAZA,YAAY,wBAAA4I,qBAAA,GAAZ5I,YAAY,CAAEqD,QAAQ,cAAAuF,qBAAA,wBAAAC,sBAAA,GAAtBD,qBAAA,CAAyB,iBAAiB,CAAC,cAAAC,sBAAA,uBAA3CA,sBAAA,CAA6CC,QAAQ;AAC9D"}
|
|
@@ -18,7 +18,7 @@ function parseSLPK(_x) {
|
|
|
18
18
|
}
|
|
19
19
|
function _parseSLPK() {
|
|
20
20
|
_parseSLPK = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee(data) {
|
|
21
|
-
var _options$path;
|
|
21
|
+
var _options$slpk$path, _options$slpk, _options$slpk2;
|
|
22
22
|
var options,
|
|
23
23
|
archive,
|
|
24
24
|
cdFileHeaderSignature,
|
|
@@ -80,7 +80,7 @@ function _parseSLPK() {
|
|
|
80
80
|
throw new Error('No hash file in slpk');
|
|
81
81
|
case 26:
|
|
82
82
|
_context.next = 28;
|
|
83
|
-
return new _slpkArchieve.SLPKArchive(data, hashFile).getFile((_options$path = options.path) !== null && _options$path !== void 0 ? _options$path : '');
|
|
83
|
+
return new _slpkArchieve.SLPKArchive(data, hashFile).getFile((_options$slpk$path = (_options$slpk = options.slpk) === null || _options$slpk === void 0 ? void 0 : _options$slpk.path) !== null && _options$slpk$path !== void 0 ? _options$slpk$path : '', (_options$slpk2 = options.slpk) === null || _options$slpk2 === void 0 ? void 0 : _options$slpk2.pathMode);
|
|
84
84
|
case 28:
|
|
85
85
|
return _context.abrupt("return", _context.sent);
|
|
86
86
|
case 29:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-slpk.js","names":["_cdFileHeader","require","_localFileHeader","_slpkArchieve","getByteAt","offset","buffer","getUint8","byteOffset","parseSLPK","_x","_parseSLPK","apply","arguments","_asyncToGenerator2","default","_regenerator","mark","_callee","data","_options$path","options","archive","cdFileHeaderSignature","searchWindow","hashCDOffset","i","cdFileHeader","textDecoder","localFileHeader","fileDataOffset","hashFile","_args","wrap","_callee$","_context","prev","next","length","undefined","DataView","byteLength","every","val","index","abrupt","parseZipCDFileHeader","TextDecoder","decode","fileName","Error","parseZipLocalFileHeader","localHeaderOffset","slice","compressedSize","SLPKArchive","getFile","path","sent","stop"],"sources":["../../../../../src/lib/parsers/parse-slpk/parse-slpk.ts"],"sourcesContent":["import type {SLPKLoaderOptions} from '../../../i3s-slpk-loader';\nimport {parseZipCDFileHeader} from '../parse-zip/cd-file-header';\nimport {parseZipLocalFileHeader} from '../parse-zip/local-file-header';\nimport {SLPKArchive} from './slpk-archieve';\n\n/**\n * Returns one byte from the provided buffer at the provided position\n * @param offset - position where to read\n * @param buffer - buffer to read\n * @returns one byte from the provided buffer at the provided position\n */\nconst getByteAt = (offset: number, buffer: DataView): number => {\n return buffer.getUint8(buffer.byteOffset + offset);\n};\n\nexport async function parseSLPK(data: ArrayBuffer, options: SLPKLoaderOptions = {}) {\n const archive = new DataView(data);\n const cdFileHeaderSignature = [80, 75, 1, 2];\n\n const searchWindow = [\n getByteAt(archive.byteLength - 1, archive),\n getByteAt(archive.byteLength - 2, archive),\n getByteAt(archive.byteLength - 3, archive),\n undefined\n ];\n\n let hashCDOffset = 0;\n\n // looking for the last record in the central directory\n for (let i = archive.byteLength - 4; i > -1; i--) {\n searchWindow[3] = searchWindow[2];\n searchWindow[2] = searchWindow[1];\n searchWindow[1] = searchWindow[0];\n searchWindow[0] = getByteAt(i, archive);\n if (searchWindow.every((val, index) => val === cdFileHeaderSignature[index])) {\n hashCDOffset = i;\n break;\n }\n }\n\n const cdFileHeader = parseZipCDFileHeader(hashCDOffset, archive);\n\n const textDecoder = new TextDecoder();\n if (textDecoder.decode(cdFileHeader.fileName) !== '@specialIndexFileHASH128@') {\n throw new Error('No hash file in slpk');\n }\n\n const localFileHeader = parseZipLocalFileHeader(cdFileHeader.localHeaderOffset, archive);\n\n const fileDataOffset = localFileHeader.fileDataOffset;\n const hashFile = archive.buffer.slice(\n fileDataOffset,\n fileDataOffset + localFileHeader.compressedSize\n );\n\n if (!hashFile) {\n throw new Error('No hash file in slpk');\n }\n\n return await new SLPKArchive(data, hashFile).getFile(options.path ?? '');\n}\n"],"mappings":";;;;;;;;;AACA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAQA,IAAMG,SAAS,GAAG,SAAZA,SAASA,CAAIC,MAAc,EAAEC,MAAgB,EAAa;EAC9D,OAAOA,MAAM,CAACC,QAAQ,CAACD,MAAM,CAACE,UAAU,GAAGH,MAAM,CAAC;AACpD,CAAC;AAAC,SAEoBI,SAASA,CAAAC,EAAA;EAAA,OAAAC,UAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAAA,SAAAF,WAAA;EAAAA,UAAA,OAAAG,kBAAA,CAAAC,OAAA,EAAAC,YAAA,CAAAD,OAAA,CAAAE,IAAA,CAAxB,SAAAC,QAAyBC,IAAiB;IAAA,IAAAC,aAAA;IAAA,IAAAC,OAAA;MAAAC,OAAA;MAAAC,qBAAA;MAAAC,YAAA;MAAAC,YAAA;MAAAC,CAAA;MAAAC,YAAA;MAAAC,WAAA;MAAAC,eAAA;MAAAC,cAAA;MAAAC,QAAA;MAAAC,KAAA,
|
|
1
|
+
{"version":3,"file":"parse-slpk.js","names":["_cdFileHeader","require","_localFileHeader","_slpkArchieve","getByteAt","offset","buffer","getUint8","byteOffset","parseSLPK","_x","_parseSLPK","apply","arguments","_asyncToGenerator2","default","_regenerator","mark","_callee","data","_options$slpk$path","_options$slpk","_options$slpk2","options","archive","cdFileHeaderSignature","searchWindow","hashCDOffset","i","cdFileHeader","textDecoder","localFileHeader","fileDataOffset","hashFile","_args","wrap","_callee$","_context","prev","next","length","undefined","DataView","byteLength","every","val","index","abrupt","parseZipCDFileHeader","TextDecoder","decode","fileName","Error","parseZipLocalFileHeader","localHeaderOffset","slice","compressedSize","SLPKArchive","getFile","slpk","path","pathMode","sent","stop"],"sources":["../../../../../src/lib/parsers/parse-slpk/parse-slpk.ts"],"sourcesContent":["import type {SLPKLoaderOptions} from '../../../i3s-slpk-loader';\nimport {parseZipCDFileHeader} from '../parse-zip/cd-file-header';\nimport {parseZipLocalFileHeader} from '../parse-zip/local-file-header';\nimport {SLPKArchive} from './slpk-archieve';\n\n/**\n * Returns one byte from the provided buffer at the provided position\n * @param offset - position where to read\n * @param buffer - buffer to read\n * @returns one byte from the provided buffer at the provided position\n */\nconst getByteAt = (offset: number, buffer: DataView): number => {\n return buffer.getUint8(buffer.byteOffset + offset);\n};\n\nexport async function parseSLPK(data: ArrayBuffer, options: SLPKLoaderOptions = {}) {\n const archive = new DataView(data);\n const cdFileHeaderSignature = [80, 75, 1, 2];\n\n const searchWindow = [\n getByteAt(archive.byteLength - 1, archive),\n getByteAt(archive.byteLength - 2, archive),\n getByteAt(archive.byteLength - 3, archive),\n undefined\n ];\n\n let hashCDOffset = 0;\n\n // looking for the last record in the central directory\n for (let i = archive.byteLength - 4; i > -1; i--) {\n searchWindow[3] = searchWindow[2];\n searchWindow[2] = searchWindow[1];\n searchWindow[1] = searchWindow[0];\n searchWindow[0] = getByteAt(i, archive);\n if (searchWindow.every((val, index) => val === cdFileHeaderSignature[index])) {\n hashCDOffset = i;\n break;\n }\n }\n\n const cdFileHeader = parseZipCDFileHeader(hashCDOffset, archive);\n\n const textDecoder = new TextDecoder();\n if (textDecoder.decode(cdFileHeader.fileName) !== '@specialIndexFileHASH128@') {\n throw new Error('No hash file in slpk');\n }\n\n const localFileHeader = parseZipLocalFileHeader(cdFileHeader.localHeaderOffset, archive);\n\n const fileDataOffset = localFileHeader.fileDataOffset;\n const hashFile = archive.buffer.slice(\n fileDataOffset,\n fileDataOffset + localFileHeader.compressedSize\n );\n\n if (!hashFile) {\n throw new Error('No hash file in slpk');\n }\n\n return await new SLPKArchive(data, hashFile).getFile(\n options.slpk?.path ?? '',\n options.slpk?.pathMode\n );\n}\n"],"mappings":";;;;;;;;;AACA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAQA,IAAMG,SAAS,GAAG,SAAZA,SAASA,CAAIC,MAAc,EAAEC,MAAgB,EAAa;EAC9D,OAAOA,MAAM,CAACC,QAAQ,CAACD,MAAM,CAACE,UAAU,GAAGH,MAAM,CAAC;AACpD,CAAC;AAAC,SAEoBI,SAASA,CAAAC,EAAA;EAAA,OAAAC,UAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAAA,SAAAF,WAAA;EAAAA,UAAA,OAAAG,kBAAA,CAAAC,OAAA,EAAAC,YAAA,CAAAD,OAAA,CAAAE,IAAA,CAAxB,SAAAC,QAAyBC,IAAiB;IAAA,IAAAC,kBAAA,EAAAC,aAAA,EAAAC,cAAA;IAAA,IAAAC,OAAA;MAAAC,OAAA;MAAAC,qBAAA;MAAAC,YAAA;MAAAC,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