@loaders.gl/tile-converter 3.4.13 → 3.4.15
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/3d-tiles-attributes-worker.js +1 -1
- package/dist/converter.min.js +78 -77
- package/dist/dist.min.js +2081 -1557
- package/dist/es5/3d-tiles-attributes-worker.js +3 -3
- package/dist/es5/3d-tiles-attributes-worker.js.map +1 -1
- package/dist/es5/3d-tiles-converter/3d-tiles-converter.js +203 -417
- package/dist/es5/3d-tiles-converter/3d-tiles-converter.js.map +1 -1
- package/dist/es5/3d-tiles-converter/helpers/b3dm-converter.js +197 -266
- package/dist/es5/3d-tiles-converter/helpers/b3dm-converter.js.map +1 -1
- package/dist/es5/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.js +4 -6
- package/dist/es5/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.js.map +1 -1
- package/dist/es5/3d-tiles-converter/helpers/texture-atlas.js +12 -12
- package/dist/es5/3d-tiles-converter/helpers/texture-atlas.js.map +1 -1
- package/dist/es5/3d-tiles-converter/json-templates/tileset.js +35 -51
- package/dist/es5/3d-tiles-converter/json-templates/tileset.js.map +1 -1
- package/dist/es5/bundle.js +1 -1
- package/dist/es5/bundle.js.map +1 -1
- package/dist/es5/constants.js +1 -1
- package/dist/es5/constants.js.map +1 -1
- package/dist/es5/converter-cli.js +78 -133
- package/dist/es5/converter-cli.js.map +1 -1
- package/dist/es5/deps-installer/deps-installer.js +38 -110
- package/dist/es5/deps-installer/deps-installer.js.map +1 -1
- package/dist/es5/i3s-attributes-worker.js +3 -3
- package/dist/es5/i3s-attributes-worker.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/batch-ids-extensions.js +31 -36
- package/dist/es5/i3s-converter/helpers/batch-ids-extensions.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/coordinate-converter.js +23 -23
- package/dist/es5/i3s-converter/helpers/coordinate-converter.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/create-scene-server-path.js +9 -27
- package/dist/es5/i3s-converter/helpers/create-scene-server-path.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/feature-attributes.js +27 -42
- package/dist/es5/i3s-converter/helpers/feature-attributes.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/geometry-attributes.js +97 -114
- package/dist/es5/i3s-converter/helpers/geometry-attributes.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/geometry-converter.js +524 -799
- package/dist/es5/i3s-converter/helpers/geometry-converter.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/gltf-attributes.js +24 -25
- package/dist/es5/i3s-converter/helpers/gltf-attributes.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/node-debug.js +27 -25
- package/dist/es5/i3s-converter/helpers/node-debug.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/node-index-document.js +165 -461
- package/dist/es5/i3s-converter/helpers/node-index-document.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/node-pages.js +169 -474
- package/dist/es5/i3s-converter/helpers/node-pages.js.map +1 -1
- package/dist/es5/i3s-converter/i3s-converter.js +663 -1401
- package/dist/es5/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/es5/i3s-converter/json-templates/geometry-definitions.js +82 -92
- package/dist/es5/i3s-converter/json-templates/geometry-definitions.js.map +1 -1
- package/dist/es5/i3s-converter/json-templates/layers.js +130 -152
- package/dist/es5/i3s-converter/json-templates/layers.js.map +1 -1
- package/dist/es5/i3s-converter/json-templates/metadata.js +21 -23
- package/dist/es5/i3s-converter/json-templates/metadata.js.map +1 -1
- package/dist/es5/i3s-converter/json-templates/node.js +78 -89
- package/dist/es5/i3s-converter/json-templates/node.js.map +1 -1
- package/dist/es5/i3s-converter/json-templates/scene-server.js +27 -31
- package/dist/es5/i3s-converter/json-templates/scene-server.js.map +1 -1
- package/dist/es5/i3s-converter/json-templates/shared-resources.js +110 -152
- package/dist/es5/i3s-converter/json-templates/shared-resources.js.map +1 -1
- package/dist/es5/i3s-converter/json-templates/store.js +2 -4
- package/dist/es5/i3s-converter/json-templates/store.js.map +1 -1
- package/dist/es5/i3s-server/app.js +6 -6
- package/dist/es5/i3s-server/app.js.map +1 -1
- package/dist/es5/i3s-server/controllers/index-controller.js +20 -49
- package/dist/es5/i3s-server/controllers/index-controller.js.map +1 -1
- package/dist/es5/i3s-server/routes/index.js +14 -33
- package/dist/es5/i3s-server/routes/index.js.map +1 -1
- package/dist/es5/index.js +2 -2
- package/dist/es5/lib/utils/compress-util.js +127 -295
- package/dist/es5/lib/utils/compress-util.js.map +1 -1
- package/dist/es5/lib/utils/file-utils.js +65 -174
- package/dist/es5/lib/utils/file-utils.js.map +1 -1
- package/dist/es5/lib/utils/lod-conversion-utils.js +9 -9
- package/dist/es5/lib/utils/lod-conversion-utils.js.map +1 -1
- package/dist/es5/lib/utils/queue.js +13 -38
- package/dist/es5/lib/utils/queue.js.map +1 -1
- package/dist/es5/lib/utils/statistic-utills.js +39 -117
- package/dist/es5/lib/utils/statistic-utills.js.map +1 -1
- package/dist/es5/lib/utils/write-queue.js +74 -195
- package/dist/es5/lib/utils/write-queue.js.map +1 -1
- package/dist/es5/pgm-loader.js +3 -22
- package/dist/es5/pgm-loader.js.map +1 -1
- package/dist/es5/workers/3d-tiles-attributes-worker.js +5 -22
- package/dist/es5/workers/3d-tiles-attributes-worker.js.map +1 -1
- package/dist/es5/workers/i3s-attributes-worker.js +4 -25
- package/dist/es5/workers/i3s-attributes-worker.js.map +1 -1
- package/dist/esm/3d-tiles-attributes-worker.js +1 -1
- package/dist/esm/deps-installer/deps-installer.js +1 -1
- package/dist/esm/i3s-attributes-worker.js +1 -1
- package/dist/esm/i3s-converter/helpers/batch-ids-extensions.js.map +1 -1
- package/dist/esm/i3s-converter/helpers/geometry-converter.js +1 -1
- package/dist/esm/i3s-converter/helpers/geometry-converter.js.map +1 -1
- package/dist/esm/pgm-loader.js +1 -1
- package/dist/i3s-attributes-worker.js +2 -2
- package/dist/i3s-attributes-worker.js.map +3 -3
- package/dist/i3s-converter/helpers/geometry-converter.d.ts +1 -1
- package/dist/i3s-converter/helpers/geometry-converter.d.ts.map +1 -1
- package/package.json +15 -15
- package/src/i3s-converter/helpers/batch-ids-extensions.ts +1 -1
- package/src/i3s-converter/helpers/geometry-converter.ts +14 -14
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.prepareDataForAttributesConversion = prepareDataForAttributesConversion;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
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; }
|
|
10
|
-
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; }
|
|
11
7
|
function getB3DMAttributesWithoutBufferView(attributes) {
|
|
12
|
-
|
|
13
|
-
for (
|
|
8
|
+
const attributesWithoutBufferView = {};
|
|
9
|
+
for (const attributeName in attributes) {
|
|
14
10
|
attributesWithoutBufferView[attributeName] = {
|
|
15
11
|
value: attributes[attributeName].value
|
|
16
12
|
};
|
|
@@ -19,8 +15,8 @@ function getB3DMAttributesWithoutBufferView(attributes) {
|
|
|
19
15
|
}
|
|
20
16
|
function prepareDataForAttributesConversion(tileContent) {
|
|
21
17
|
var _tileContent$gltf, _tileContent$gltf$sce, _tileContent$gltf2, _tileContent$gltf2$sc, _tileContent$gltf2$sc2, _tileContent$gltf3, _tileContent$gltf4, _tileContent$gltf4$im;
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
let nodes = ((_tileContent$gltf = tileContent.gltf) === null || _tileContent$gltf === void 0 ? void 0 : (_tileContent$gltf$sce = _tileContent$gltf.scene) === null || _tileContent$gltf$sce === void 0 ? void 0 : _tileContent$gltf$sce.nodes) || ((_tileContent$gltf2 = tileContent.gltf) === null || _tileContent$gltf2 === void 0 ? void 0 : (_tileContent$gltf2$sc = _tileContent$gltf2.scenes) === null || _tileContent$gltf2$sc === void 0 ? void 0 : (_tileContent$gltf2$sc2 = _tileContent$gltf2$sc[0]) === null || _tileContent$gltf2$sc2 === void 0 ? void 0 : _tileContent$gltf2$sc2.nodes) || ((_tileContent$gltf3 = tileContent.gltf) === null || _tileContent$gltf3 === void 0 ? void 0 : _tileContent$gltf3.nodes) || [];
|
|
19
|
+
const images = ((_tileContent$gltf4 = tileContent.gltf) === null || _tileContent$gltf4 === void 0 ? void 0 : (_tileContent$gltf4$im = _tileContent$gltf4.images) === null || _tileContent$gltf4$im === void 0 ? void 0 : _tileContent$gltf4$im.map(imageObject => {
|
|
24
20
|
var _imageObject$image;
|
|
25
21
|
if (imageObject !== null && imageObject !== void 0 && (_imageObject$image = imageObject.image) !== null && _imageObject$image !== void 0 && _imageObject$image.compressed) {
|
|
26
22
|
return {
|
|
@@ -29,8 +25,8 @@ function prepareDataForAttributesConversion(tileContent) {
|
|
|
29
25
|
};
|
|
30
26
|
} else {
|
|
31
27
|
var _imageObject$image2;
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
const data = imageObject === null || imageObject === void 0 ? void 0 : (_imageObject$image2 = imageObject.image) === null || _imageObject$image2 === void 0 ? void 0 : _imageObject$image2.data;
|
|
29
|
+
const dataCopy = new Uint8Array(data.length);
|
|
34
30
|
dataCopy.set(data);
|
|
35
31
|
return {
|
|
36
32
|
data: dataCopy,
|
|
@@ -43,25 +39,28 @@ function prepareDataForAttributesConversion(tileContent) {
|
|
|
43
39
|
}
|
|
44
40
|
})) || [];
|
|
45
41
|
prepareNodes(nodes);
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
const cartographicOrigin = tileContent.cartographicOrigin;
|
|
43
|
+
const cartesianModelMatrix = tileContent.cartesianModelMatrix;
|
|
48
44
|
return {
|
|
49
|
-
nodes
|
|
50
|
-
images
|
|
51
|
-
cartographicOrigin
|
|
52
|
-
cartesianModelMatrix
|
|
45
|
+
nodes,
|
|
46
|
+
images,
|
|
47
|
+
cartographicOrigin,
|
|
48
|
+
cartesianModelMatrix
|
|
53
49
|
};
|
|
54
50
|
}
|
|
55
51
|
function prepareNodes(nodes) {
|
|
56
|
-
for (
|
|
57
|
-
|
|
52
|
+
for (let index = 0; index < nodes.length; index++) {
|
|
53
|
+
const node = nodes[index];
|
|
58
54
|
if (node.mesh) {
|
|
59
55
|
var _node$mesh;
|
|
60
|
-
nodes[index] =
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
nodes[index] = {
|
|
57
|
+
...node,
|
|
58
|
+
mesh: {
|
|
59
|
+
...node.mesh,
|
|
60
|
+
primitives: (_node$mesh = node.mesh) === null || _node$mesh === void 0 ? void 0 : _node$mesh.primitives.map(primitive => {
|
|
63
61
|
var _primitive$indices, _primitive$material, _primitive$material2;
|
|
64
|
-
return
|
|
62
|
+
return {
|
|
63
|
+
...primitive,
|
|
65
64
|
indices: {
|
|
66
65
|
value: primitive === null || primitive === void 0 ? void 0 : (_primitive$indices = primitive.indices) === null || _primitive$indices === void 0 ? void 0 : _primitive$indices.value
|
|
67
66
|
},
|
|
@@ -70,10 +69,10 @@ function prepareNodes(nodes) {
|
|
|
70
69
|
id: primitive === null || primitive === void 0 ? void 0 : (_primitive$material = primitive.material) === null || _primitive$material === void 0 ? void 0 : _primitive$material.id,
|
|
71
70
|
uniqueId: primitive === null || primitive === void 0 ? void 0 : (_primitive$material2 = primitive.material) === null || _primitive$material2 === void 0 ? void 0 : _primitive$material2.uniqueId
|
|
72
71
|
}
|
|
73
|
-
}
|
|
72
|
+
};
|
|
74
73
|
})
|
|
75
|
-
}
|
|
76
|
-
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
77
76
|
}
|
|
78
77
|
if (node.children) {
|
|
79
78
|
prepareNodes(node.children);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gltf-attributes.js","names":["getB3DMAttributesWithoutBufferView","attributes","attributesWithoutBufferView","attributeName","value","prepareDataForAttributesConversion","tileContent","_tileContent$gltf","_tileContent$gltf$sce","_tileContent$gltf2","_tileContent$gltf2$sc","_tileContent$gltf2$sc2","_tileContent$gltf3","_tileContent$gltf4","_tileContent$gltf4$im","nodes","gltf","scene","scenes","images","map","imageObject","_imageObject$image","image","compressed","data","_imageObject$image2","dataCopy","Uint8Array","length","set","height","width","components","mimeType","prepareNodes","cartographicOrigin","cartesianModelMatrix","index","node","mesh","_node$mesh","
|
|
1
|
+
{"version":3,"file":"gltf-attributes.js","names":["getB3DMAttributesWithoutBufferView","attributes","attributesWithoutBufferView","attributeName","value","prepareDataForAttributesConversion","tileContent","_tileContent$gltf","_tileContent$gltf$sce","_tileContent$gltf2","_tileContent$gltf2$sc","_tileContent$gltf2$sc2","_tileContent$gltf3","_tileContent$gltf4","_tileContent$gltf4$im","nodes","gltf","scene","scenes","images","map","imageObject","_imageObject$image","image","compressed","data","_imageObject$image2","dataCopy","Uint8Array","length","set","height","width","components","mimeType","prepareNodes","cartographicOrigin","cartesianModelMatrix","index","node","mesh","_node$mesh","primitives","primitive","_primitive$indices","_primitive$material","_primitive$material2","indices","material","id","uniqueId","children"],"sources":["../../../../src/i3s-converter/helpers/gltf-attributes.ts"],"sourcesContent":["import type {B3DMContent} from '@loaders.gl/3d-tiles';\nimport type {GLTFAccessorPostprocessed, GLTFNodePostprocessed} from '@loaders.gl/gltf';\nimport type {B3DMAttributesData} from '../../i3s-attributes-worker';\n\ntype AttributesObject = {\n [k: string]: GLTFAccessorPostprocessed;\n};\n\n/**\n * Keep only values for B3DM attributes to pass data to worker thread.\n * @param attributes\n */\nfunction getB3DMAttributesWithoutBufferView(attributes: AttributesObject): AttributesObject {\n const attributesWithoutBufferView = {};\n\n for (const attributeName in attributes) {\n attributesWithoutBufferView[attributeName] = {\n value: attributes[attributeName].value\n };\n }\n\n return attributesWithoutBufferView;\n}\n\n/**\n * Prepare attributes for conversion to avoid binary data breaking in worker thread.\n * @param tileContent\n * @returns\n */\nexport function prepareDataForAttributesConversion(tileContent: B3DMContent): B3DMAttributesData {\n let nodes =\n tileContent.gltf?.scene?.nodes ||\n tileContent.gltf?.scenes?.[0]?.nodes ||\n tileContent.gltf?.nodes ||\n [];\n\n const images =\n tileContent.gltf?.images?.map((imageObject) => {\n // Need data only for uncompressed images because we can't get batchIds from compressed textures.\n if (imageObject?.image?.compressed) {\n return {\n data: null,\n compressed: true\n };\n } else {\n const data = imageObject?.image?.data;\n const dataCopy = new Uint8Array(data.length);\n dataCopy.set(data);\n return {\n data: dataCopy,\n compressed: false,\n height: imageObject.image.height,\n width: imageObject.image.width,\n components: imageObject.image.components,\n mimeType: imageObject.mimeType\n };\n }\n }) || [];\n\n prepareNodes(nodes);\n\n const cartographicOrigin = tileContent.cartographicOrigin;\n const cartesianModelMatrix = tileContent.cartesianModelMatrix;\n\n return {\n nodes,\n images,\n cartographicOrigin,\n cartesianModelMatrix\n };\n}\n\n/**\n * Traverse all nodes to replace all sensible data with copy to avoid data corruption in worker.\n * @param nodes\n */\nfunction prepareNodes(nodes: GLTFNodePostprocessed[]): void {\n for (let index = 0; index < nodes.length; index++) {\n const node = nodes[index] as any;\n\n if (node.mesh) {\n nodes[index] = {\n ...node,\n mesh: {\n ...node.mesh,\n primitives: node.mesh?.primitives.map((primitive) => ({\n ...primitive,\n indices: {value: primitive?.indices?.value},\n attributes: getB3DMAttributesWithoutBufferView(primitive.attributes),\n material: {\n id: primitive?.material?.id,\n uniqueId: primitive?.material?.uniqueId\n }\n }))\n }\n };\n }\n\n if (node.children) {\n prepareNodes(node.children);\n }\n }\n}\n"],"mappings":";;;;;;AAYA,SAASA,kCAAkCA,CAACC,UAA4B,EAAoB;EAC1F,MAAMC,2BAA2B,GAAG,CAAC,CAAC;EAEtC,KAAK,MAAMC,aAAa,IAAIF,UAAU,EAAE;IACtCC,2BAA2B,CAACC,aAAa,CAAC,GAAG;MAC3CC,KAAK,EAAEH,UAAU,CAACE,aAAa,CAAC,CAACC;IACnC,CAAC;EACH;EAEA,OAAOF,2BAA2B;AACpC;AAOO,SAASG,kCAAkCA,CAACC,WAAwB,EAAsB;EAAA,IAAAC,iBAAA,EAAAC,qBAAA,EAAAC,kBAAA,EAAAC,qBAAA,EAAAC,sBAAA,EAAAC,kBAAA,EAAAC,kBAAA,EAAAC,qBAAA;EAC/F,IAAIC,KAAK,GACP,EAAAR,iBAAA,GAAAD,WAAW,CAACU,IAAI,cAAAT,iBAAA,wBAAAC,qBAAA,GAAhBD,iBAAA,CAAkBU,KAAK,cAAAT,qBAAA,uBAAvBA,qBAAA,CAAyBO,KAAK,OAAAN,kBAAA,GAC9BH,WAAW,CAACU,IAAI,cAAAP,kBAAA,wBAAAC,qBAAA,GAAhBD,kBAAA,CAAkBS,MAAM,cAAAR,qBAAA,wBAAAC,sBAAA,GAAxBD,qBAAA,CAA2B,CAAC,CAAC,cAAAC,sBAAA,uBAA7BA,sBAAA,CAA+BI,KAAK,OAAAH,kBAAA,GACpCN,WAAW,CAACU,IAAI,cAAAJ,kBAAA,uBAAhBA,kBAAA,CAAkBG,KAAK,KACvB,EAAE;EAEJ,MAAMI,MAAM,GACV,EAAAN,kBAAA,GAAAP,WAAW,CAACU,IAAI,cAAAH,kBAAA,wBAAAC,qBAAA,GAAhBD,kBAAA,CAAkBM,MAAM,cAAAL,qBAAA,uBAAxBA,qBAAA,CAA0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AAQ;IAEhC,IAAIC,IAAI,CAACC,IAAI,EAAE;MAAA,IAAAC,UAAA;MACb1B,KAAK,CAACuB,KAAK,CAAC,GAAG;QACb,GAAGC,IAAI;QACPC,IAAI,EAAE;UACJ,GAAGD,IAAI,CAACC,IAAI;UACZE,UAAU,GAAAD,UAAA,GAAEF,IAAI,CAACC,IAAI,cAAAC,UAAA,uBAATA,UAAA,CAAWC,UAAU,CAACtB,GAAG,CAAEuB,SAAS;YAAA,IAAAC,kBAAA,EAAAC,mBAAA,EAAAC,oBAAA;YAAA,OAAM;cACpD,GAAGH,SAAS;cACZI,OAAO,EAAE;gBAAC3C,KAAK,EAAEuC,SAAS,aAATA,SAAS,wBAAAC,kBAAA,GAATD,SAAS,CAAEI,OAAO,cAAAH,kBAAA,uBAAlBA,kBAAA,CAAoBxC;cAAK,CAAC;cAC3CH,UAAU,EAAED,kCAAkC,CAAC2C,SAAS,CAAC1C,UAAU,CAAC;cACpE+C,QAAQ,EAAE;gBACRC,EAAE,EAAEN,SAAS,aAATA,SAAS,wBAAAE,mBAAA,GAATF,SAAS,CAAEK,QAAQ,cAAAH,mBAAA,uBAAnBA,mBAAA,CAAqBI,EAAE;gBAC3BC,QAAQ,EAAEP,SAAS,aAATA,SAAS,wBAAAG,oBAAA,GAATH,SAAS,CAAEK,QAAQ,cAAAF,oBAAA,uBAAnBA,oBAAA,CAAqBI;cACjC;YACF,CAAC;UAAA,CAAC;QACJ;MACF,CAAC;IACH;IAEA,IAAIX,IAAI,CAACY,QAAQ,EAAE;MACjBhB,YAAY,CAACI,IAAI,CAACY,QAAQ,CAAC;IAC7B;EACF;AACF"}
|
|
@@ -7,35 +7,35 @@ exports.validateNodeBoundingVolumes = validateNodeBoundingVolumes;
|
|
|
7
7
|
var _culling = require("@math.gl/culling");
|
|
8
8
|
var _core = require("@math.gl/core");
|
|
9
9
|
var _geospatial = require("@math.gl/geospatial");
|
|
10
|
-
|
|
10
|
+
const CUBE_POSITIONS = new Float32Array([-1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1]);
|
|
11
11
|
function validateNodeBoundingVolumes(node) {
|
|
12
12
|
var _node$parentNode, _node$parentNode2;
|
|
13
13
|
if (!(node !== null && node !== void 0 && (_node$parentNode = node.parentNode) !== null && _node$parentNode !== void 0 && _node$parentNode.obb) || !(node !== null && node !== void 0 && (_node$parentNode2 = node.parentNode) !== null && _node$parentNode2 !== void 0 && _node$parentNode2.mbs)) {
|
|
14
14
|
return [];
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
const tileWarnings = [];
|
|
17
17
|
validateObb(tileWarnings, node);
|
|
18
18
|
validateMbs(tileWarnings, node);
|
|
19
19
|
return tileWarnings;
|
|
20
20
|
}
|
|
21
21
|
function validateObb(tileWarnings, node) {
|
|
22
22
|
var _node$parentNode3;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
const parentObb = createBoundingBoxFromTileObb(node.parentNode.obb);
|
|
24
|
+
const tileVertices = getTileObbVertices(node);
|
|
25
|
+
const isTileObbInsideParentObb = isAllVerticesInsideBoundingVolume(parentObb, tileVertices);
|
|
26
26
|
if (isTileObbInsideParentObb) {
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
const title = "OBB of Tile (".concat(node.id, ") doesn't fit into Parent (").concat((_node$parentNode3 = node.parentNode) === null || _node$parentNode3 === void 0 ? void 0 : _node$parentNode3.id, ") tile OBB");
|
|
30
30
|
tileWarnings.push(title);
|
|
31
31
|
}
|
|
32
32
|
function validateMbs(tileWarnings, node) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
const tileMbs = createBoundingSphereFromTileMbs(node.mbs);
|
|
34
|
+
const parentMbs = createBoundingSphereFromTileMbs(node.parentNode.mbs);
|
|
35
|
+
const distanceBetweenCenters = tileMbs.center.distanceTo(parentMbs.center);
|
|
36
36
|
if (distanceBetweenCenters + tileMbs.radius > parentMbs.radius) {
|
|
37
37
|
var _node$parentNode4;
|
|
38
|
-
|
|
38
|
+
const title = "MBS of Tile (".concat(node.id, ") doesn't fit into Parent (").concat((_node$parentNode4 = node.parentNode) === null || _node$parentNode4 === void 0 ? void 0 : _node$parentNode4.id, ") tile MBS");
|
|
39
39
|
tileWarnings.push(title);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -43,29 +43,31 @@ function createBoundingSphereFromTileMbs(mbs) {
|
|
|
43
43
|
return new _culling.BoundingSphere([mbs[0], mbs[1], mbs[2]], mbs[3]);
|
|
44
44
|
}
|
|
45
45
|
function createBoundingBoxFromTileObb(obb) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
const {
|
|
47
|
+
center,
|
|
48
|
+
halfSize,
|
|
49
|
+
quaternion
|
|
50
|
+
} = obb;
|
|
49
51
|
return new _culling.OrientedBoundingBox().fromCenterHalfSizeQuaternion(center, halfSize, quaternion);
|
|
50
52
|
}
|
|
51
53
|
function getTileObbVertices(node) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
for (
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
const halfSize = node.obb.halfSize;
|
|
55
|
+
const positions = CUBE_POSITIONS;
|
|
56
|
+
const obbCenterCartesian = _geospatial.Ellipsoid.WGS84.cartographicToCartesian(node.obb.center);
|
|
57
|
+
let vertices = [];
|
|
58
|
+
for (let i = 0; i < positions.length; i += 3) {
|
|
59
|
+
const positionsVector = new _core.Vector3(positions[i] *= halfSize[0], positions[i + 1] *= halfSize[1], positions[i + 2] *= halfSize[2]);
|
|
60
|
+
const rotatedPositions = positionsVector.transformByQuaternion(node.obb.quaternion).add(obbCenterCartesian);
|
|
59
61
|
vertices = vertices.concat(rotatedPositions);
|
|
60
62
|
}
|
|
61
63
|
return vertices;
|
|
62
64
|
}
|
|
63
65
|
function isAllVerticesInsideBoundingVolume(boundingVolume, positions) {
|
|
64
|
-
|
|
65
|
-
for (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
let isVerticesInsideObb = true;
|
|
67
|
+
for (let index = 0; index < positions.length / 3; index += 3) {
|
|
68
|
+
const point = [positions[index], positions[index + 1], positions[index + 2]];
|
|
69
|
+
const cartographicPoint = _geospatial.Ellipsoid.WGS84.cartesianToCartographic(point);
|
|
70
|
+
const distance = boundingVolume.distanceTo(cartographicPoint);
|
|
69
71
|
if (distance > 0) {
|
|
70
72
|
isVerticesInsideObb = false;
|
|
71
73
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-debug.js","names":["_culling","require","_core","_geospatial","CUBE_POSITIONS","Float32Array","validateNodeBoundingVolumes","node","_node$parentNode","_node$parentNode2","parentNode","obb","mbs","tileWarnings","validateObb","validateMbs","_node$parentNode3","parentObb","createBoundingBoxFromTileObb","tileVertices","getTileObbVertices","isTileObbInsideParentObb","isAllVerticesInsideBoundingVolume","title","concat","id","push","tileMbs","createBoundingSphereFromTileMbs","parentMbs","distanceBetweenCenters","center","distanceTo","radius","_node$parentNode4","BoundingSphere","halfSize","quaternion","OrientedBoundingBox","fromCenterHalfSizeQuaternion","positions","obbCenterCartesian","Ellipsoid","WGS84","cartographicToCartesian","vertices","i","length","positionsVector","Vector3","rotatedPositions","transformByQuaternion","add","boundingVolume","isVerticesInsideObb","index","point","cartographicPoint","cartesianToCartographic","distance"],"sources":["../../../../src/i3s-converter/helpers/node-debug.ts"],"sourcesContent":["import type {Mbs, Node3DIndexDocument, Obb} from '@loaders.gl/i3s';\nimport {OrientedBoundingBox, BoundingSphere} from '@math.gl/culling';\nimport {Vector3} from '@math.gl/core';\nimport {Ellipsoid} from '@math.gl/geospatial';\n\n// prettier-ignore\nconst CUBE_POSITIONS = new Float32Array([\n -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1,\n -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1,\n -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1,\n -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1,\n 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1,\n -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1\n]);\n\n// TODO Unite Tile validation logic in i3s-17-and-debug with this code.\n\n/**\n * Do validation of bounding volumes for particular node.\n * Generates special warnings if there are some issues.\n * @param node\n */\nexport function validateNodeBoundingVolumes(node: Node3DIndexDocument): string[] {\n if (!node?.parentNode?.obb || !node?.parentNode?.mbs) {\n return [];\n }\n\n const tileWarnings: string[] = [];\n\n validateObb(tileWarnings, node);\n validateMbs(tileWarnings, node);\n\n return tileWarnings;\n}\n\n/**\n * Check if child Obb fit into parent Obb.\n * @param tileWarnings\n * @param node\n */\nfunction validateObb(tileWarnings: string[], node: Node3DIndexDocument): void {\n // @ts-expect-error\n const parentObb = createBoundingBoxFromTileObb(node.parentNode.obb);\n const tileVertices = getTileObbVertices(node);\n const isTileObbInsideParentObb = isAllVerticesInsideBoundingVolume(parentObb, tileVertices);\n\n if (isTileObbInsideParentObb) {\n return;\n }\n\n const title = `OBB of Tile (${node.id}) doesn't fit into Parent (${node.parentNode?.id}) tile OBB`;\n tileWarnings.push(title);\n}\n\n/**\n * Check if child Mbs fit into parent Mbs.\n * @param tileWarnings\n * @param node\n */\nfunction validateMbs(tileWarnings: string[], node: Node3DIndexDocument): void {\n // @ts-expect-error\n const tileMbs = createBoundingSphereFromTileMbs(node.mbs);\n // @ts-expect-error\n const parentMbs = createBoundingSphereFromTileMbs(node.parentNode.mbs);\n const distanceBetweenCenters = tileMbs.center.distanceTo(parentMbs.center);\n\n if (distanceBetweenCenters + tileMbs.radius > parentMbs.radius) {\n const title = `MBS of Tile (${node.id}) doesn't fit into Parent (${node.parentNode?.id}) tile MBS`;\n tileWarnings.push(title);\n }\n}\n\n/**\n * Generates bounding sphere from mbs\n * @param mbs\n */\nfunction createBoundingSphereFromTileMbs(mbs: Mbs): BoundingSphere {\n return new BoundingSphere([mbs[0], mbs[1], mbs[2]], mbs[3]);\n}\n\n/**\n * Generates oriented bounding box from tile obb\n * @param obb\n * @returns\n */\nfunction createBoundingBoxFromTileObb(obb: Obb): OrientedBoundingBox {\n const {center, halfSize, quaternion} = obb;\n return new OrientedBoundingBox().fromCenterHalfSizeQuaternion(center, halfSize, quaternion);\n}\n\n/**\n * Get vertices fromnode obb\n * TODO check if Obb generates properly\n * @param node\n */\nfunction getTileObbVertices(node: Node3DIndexDocument): number[] {\n // @ts-expect-error\n const halfSize = node.obb.halfSize;\n const positions = CUBE_POSITIONS;\n // @ts-expect-error\n const obbCenterCartesian = Ellipsoid.WGS84.cartographicToCartesian(node.obb.center);\n\n let vertices = [];\n\n for (let i = 0; i < positions.length; i += 3) {\n const positionsVector = new Vector3(\n (positions[i] *= halfSize[0]),\n (positions[i + 1] *= halfSize[1]),\n (positions[i + 2] *= halfSize[2])\n );\n const rotatedPositions = positionsVector\n // @ts-expect-error\n .transformByQuaternion(node.obb.quaternion)\n .add(obbCenterCartesian);\n // @ts-expect-error\n vertices = vertices.concat(rotatedPositions);\n }\n\n return vertices;\n}\n\n/**\n * Check if all vertices inside bounding volume\n * @param boundingVolume\n * @param positions\n */\nfunction isAllVerticesInsideBoundingVolume(\n boundingVolume: OrientedBoundingBox,\n positions: number[]\n): boolean {\n let isVerticesInsideObb = true;\n\n for (let index = 0; index < positions.length / 3; index += 3) {\n const point = [positions[index], positions[index + 1], positions[index + 2]];\n const cartographicPoint = Ellipsoid.WGS84.cartesianToCartographic(point);\n\n const distance = boundingVolume.distanceTo(cartographicPoint);\n\n if (distance > 0) {\n isVerticesInsideObb = false;\n break;\n }\n }\n\n return isVerticesInsideObb;\n}\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAGA,
|
|
1
|
+
{"version":3,"file":"node-debug.js","names":["_culling","require","_core","_geospatial","CUBE_POSITIONS","Float32Array","validateNodeBoundingVolumes","node","_node$parentNode","_node$parentNode2","parentNode","obb","mbs","tileWarnings","validateObb","validateMbs","_node$parentNode3","parentObb","createBoundingBoxFromTileObb","tileVertices","getTileObbVertices","isTileObbInsideParentObb","isAllVerticesInsideBoundingVolume","title","concat","id","push","tileMbs","createBoundingSphereFromTileMbs","parentMbs","distanceBetweenCenters","center","distanceTo","radius","_node$parentNode4","BoundingSphere","halfSize","quaternion","OrientedBoundingBox","fromCenterHalfSizeQuaternion","positions","obbCenterCartesian","Ellipsoid","WGS84","cartographicToCartesian","vertices","i","length","positionsVector","Vector3","rotatedPositions","transformByQuaternion","add","boundingVolume","isVerticesInsideObb","index","point","cartographicPoint","cartesianToCartographic","distance"],"sources":["../../../../src/i3s-converter/helpers/node-debug.ts"],"sourcesContent":["import type {Mbs, Node3DIndexDocument, Obb} from '@loaders.gl/i3s';\nimport {OrientedBoundingBox, BoundingSphere} from '@math.gl/culling';\nimport {Vector3} from '@math.gl/core';\nimport {Ellipsoid} from '@math.gl/geospatial';\n\n// prettier-ignore\nconst CUBE_POSITIONS = new Float32Array([\n -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1,\n -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1,\n -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1,\n -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1,\n 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1,\n -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1\n]);\n\n// TODO Unite Tile validation logic in i3s-17-and-debug with this code.\n\n/**\n * Do validation of bounding volumes for particular node.\n * Generates special warnings if there are some issues.\n * @param node\n */\nexport function validateNodeBoundingVolumes(node: Node3DIndexDocument): string[] {\n if (!node?.parentNode?.obb || !node?.parentNode?.mbs) {\n return [];\n }\n\n const tileWarnings: string[] = [];\n\n validateObb(tileWarnings, node);\n validateMbs(tileWarnings, node);\n\n return tileWarnings;\n}\n\n/**\n * Check if child Obb fit into parent Obb.\n * @param tileWarnings\n * @param node\n */\nfunction validateObb(tileWarnings: string[], node: Node3DIndexDocument): void {\n // @ts-expect-error\n const parentObb = createBoundingBoxFromTileObb(node.parentNode.obb);\n const tileVertices = getTileObbVertices(node);\n const isTileObbInsideParentObb = isAllVerticesInsideBoundingVolume(parentObb, tileVertices);\n\n if (isTileObbInsideParentObb) {\n return;\n }\n\n const title = `OBB of Tile (${node.id}) doesn't fit into Parent (${node.parentNode?.id}) tile OBB`;\n tileWarnings.push(title);\n}\n\n/**\n * Check if child Mbs fit into parent Mbs.\n * @param tileWarnings\n * @param node\n */\nfunction validateMbs(tileWarnings: string[], node: Node3DIndexDocument): void {\n // @ts-expect-error\n const tileMbs = createBoundingSphereFromTileMbs(node.mbs);\n // @ts-expect-error\n const parentMbs = createBoundingSphereFromTileMbs(node.parentNode.mbs);\n const distanceBetweenCenters = tileMbs.center.distanceTo(parentMbs.center);\n\n if (distanceBetweenCenters + tileMbs.radius > parentMbs.radius) {\n const title = `MBS of Tile (${node.id}) doesn't fit into Parent (${node.parentNode?.id}) tile MBS`;\n tileWarnings.push(title);\n }\n}\n\n/**\n * Generates bounding sphere from mbs\n * @param mbs\n */\nfunction createBoundingSphereFromTileMbs(mbs: Mbs): BoundingSphere {\n return new BoundingSphere([mbs[0], mbs[1], mbs[2]], mbs[3]);\n}\n\n/**\n * Generates oriented bounding box from tile obb\n * @param obb\n * @returns\n */\nfunction createBoundingBoxFromTileObb(obb: Obb): OrientedBoundingBox {\n const {center, halfSize, quaternion} = obb;\n return new OrientedBoundingBox().fromCenterHalfSizeQuaternion(center, halfSize, quaternion);\n}\n\n/**\n * Get vertices fromnode obb\n * TODO check if Obb generates properly\n * @param node\n */\nfunction getTileObbVertices(node: Node3DIndexDocument): number[] {\n // @ts-expect-error\n const halfSize = node.obb.halfSize;\n const positions = CUBE_POSITIONS;\n // @ts-expect-error\n const obbCenterCartesian = Ellipsoid.WGS84.cartographicToCartesian(node.obb.center);\n\n let vertices = [];\n\n for (let i = 0; i < positions.length; i += 3) {\n const positionsVector = new Vector3(\n (positions[i] *= halfSize[0]),\n (positions[i + 1] *= halfSize[1]),\n (positions[i + 2] *= halfSize[2])\n );\n const rotatedPositions = positionsVector\n // @ts-expect-error\n .transformByQuaternion(node.obb.quaternion)\n .add(obbCenterCartesian);\n // @ts-expect-error\n vertices = vertices.concat(rotatedPositions);\n }\n\n return vertices;\n}\n\n/**\n * Check if all vertices inside bounding volume\n * @param boundingVolume\n * @param positions\n */\nfunction isAllVerticesInsideBoundingVolume(\n boundingVolume: OrientedBoundingBox,\n positions: number[]\n): boolean {\n let isVerticesInsideObb = true;\n\n for (let index = 0; index < positions.length / 3; index += 3) {\n const point = [positions[index], positions[index + 1], positions[index + 2]];\n const cartographicPoint = Ellipsoid.WGS84.cartesianToCartographic(point);\n\n const distance = boundingVolume.distanceTo(cartographicPoint);\n\n if (distance > 0) {\n isVerticesInsideObb = false;\n break;\n }\n }\n\n return isVerticesInsideObb;\n}\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAGA,MAAMG,cAAc,GAAG,IAAIC,YAAY,CAAC,CACtC,CAAC,CAAC,EAAG,CAAC,CAAC,EAAG,CAAC,EAAE,CAAC,EAAG,CAAC,CAAC,EAAG,CAAC,EAAG,CAAC,EAAG,CAAC,EAAG,CAAC,EAAG,CAAC,CAAC,EAAG,CAAC,EAAG,CAAC,EAChD,CAAC,CAAC,EAAG,CAAC,CAAC,EAAG,CAAC,CAAC,EAAG,CAA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