@loaders.gl/tile-converter 3.1.6 → 3.2.0-alpha.1
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-converter/3d-tiles-converter.d.ts +78 -0
- package/dist/3d-tiles-converter/3d-tiles-converter.d.ts.map +1 -0
- package/dist/3d-tiles-converter/3d-tiles-converter.js +242 -0
- package/dist/3d-tiles-converter/helpers/b3dm-converter.d.ts +83 -0
- package/dist/3d-tiles-converter/helpers/b3dm-converter.d.ts.map +1 -0
- package/dist/3d-tiles-converter/helpers/b3dm-converter.js +278 -0
- package/dist/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.d.ts +13 -0
- package/dist/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.d.ts.map +1 -0
- package/dist/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.js +23 -0
- package/dist/3d-tiles-converter/helpers/texture-atlas.d.ts +9 -0
- package/dist/3d-tiles-converter/helpers/texture-atlas.d.ts.map +1 -0
- package/dist/3d-tiles-converter/helpers/texture-atlas.js +52 -0
- package/dist/3d-tiles-converter/json-templates/tileset.d.ts +15 -0
- package/dist/3d-tiles-converter/json-templates/tileset.d.ts.map +1 -0
- package/dist/3d-tiles-converter/json-templates/tileset.js +43 -0
- package/dist/bundle.d.ts +2 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/bundle.js +5 -0
- package/dist/converter.min.js +21 -21
- package/dist/deps-installer/deps-installer.d.ts +4 -0
- package/dist/deps-installer/deps-installer.d.ts.map +1 -0
- package/dist/deps-installer/deps-installer.js +21 -0
- package/dist/dist.min.js +1913 -908
- package/dist/es5/3d-tiles-converter/3d-tiles-converter.js +2 -1
- package/dist/es5/3d-tiles-converter/3d-tiles-converter.js.map +1 -1
- package/dist/es5/3d-tiles-converter/helpers/b3dm-converter.js +14 -21
- package/dist/es5/3d-tiles-converter/helpers/b3dm-converter.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/node-pages.js +78 -35
- package/dist/es5/i3s-converter/helpers/node-pages.js.map +1 -1
- package/dist/es5/i3s-converter/i3s-converter.js +35 -25
- package/dist/es5/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/es5/pgm-loader.js +1 -1
- package/dist/es5/pgm-loader.js.map +1 -1
- package/dist/esm/3d-tiles-converter/3d-tiles-converter.js +2 -1
- package/dist/esm/3d-tiles-converter/3d-tiles-converter.js.map +1 -1
- package/dist/esm/3d-tiles-converter/helpers/b3dm-converter.js +7 -5
- package/dist/esm/3d-tiles-converter/helpers/b3dm-converter.js.map +1 -1
- package/dist/esm/i3s-converter/helpers/node-pages.js +2 -7
- package/dist/esm/i3s-converter/helpers/node-pages.js.map +1 -1
- package/dist/esm/i3s-converter/i3s-converter.js +10 -0
- package/dist/esm/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/esm/pgm-loader.js +1 -1
- package/dist/esm/pgm-loader.js.map +1 -1
- package/dist/i3s-converter/helpers/coordinate-converter.d.ts +41 -0
- package/dist/i3s-converter/helpers/coordinate-converter.d.ts.map +1 -0
- package/dist/i3s-converter/helpers/coordinate-converter.js +118 -0
- package/dist/i3s-converter/helpers/create-scene-server-path.d.ts +9 -0
- package/dist/i3s-converter/helpers/create-scene-server-path.d.ts.map +1 -0
- package/dist/i3s-converter/helpers/create-scene-server-path.js +28 -0
- package/dist/i3s-converter/helpers/geometry-attributes.d.ts +8 -0
- package/dist/i3s-converter/helpers/geometry-attributes.d.ts.map +1 -0
- package/dist/i3s-converter/helpers/geometry-attributes.js +176 -0
- package/dist/i3s-converter/helpers/geometry-converter.d.ts +12 -0
- package/dist/i3s-converter/helpers/geometry-converter.d.ts.map +1 -0
- package/dist/i3s-converter/helpers/geometry-converter.js +791 -0
- package/dist/i3s-converter/helpers/node-debug.d.ts +8 -0
- package/dist/i3s-converter/helpers/node-debug.d.ts.map +1 -0
- package/dist/i3s-converter/helpers/node-debug.js +114 -0
- package/dist/i3s-converter/helpers/node-pages.d.ts +116 -0
- package/dist/i3s-converter/helpers/node-pages.d.ts.map +1 -0
- package/dist/i3s-converter/helpers/node-pages.js +203 -0
- package/dist/i3s-converter/i3s-converter.d.ts +321 -0
- package/dist/i3s-converter/i3s-converter.d.ts.map +1 -0
- package/dist/i3s-converter/i3s-converter.js +994 -0
- package/dist/i3s-converter/json-templates/layers.d.ts +95 -0
- package/dist/i3s-converter/json-templates/layers.d.ts.map +1 -0
- package/dist/i3s-converter/json-templates/layers.js +199 -0
- package/dist/i3s-converter/json-templates/metadata.d.ts +22 -0
- package/dist/i3s-converter/json-templates/metadata.d.ts.map +1 -0
- package/dist/i3s-converter/json-templates/metadata.js +25 -0
- package/dist/i3s-converter/json-templates/node.d.ts +61 -0
- package/dist/i3s-converter/json-templates/node.d.ts.map +1 -0
- package/dist/i3s-converter/json-templates/node.js +89 -0
- package/dist/i3s-converter/json-templates/scene-server.d.ts +28 -0
- package/dist/i3s-converter/json-templates/scene-server.d.ts.map +1 -0
- package/dist/i3s-converter/json-templates/scene-server.js +31 -0
- package/dist/i3s-converter/json-templates/shared-resources.d.ts +14 -0
- package/dist/i3s-converter/json-templates/shared-resources.d.ts.map +1 -0
- package/dist/i3s-converter/json-templates/shared-resources.js +129 -0
- package/dist/i3s-converter/json-templates/store.d.ts +95 -0
- package/dist/i3s-converter/json-templates/store.d.ts.map +1 -0
- package/dist/i3s-converter/json-templates/store.js +103 -0
- package/dist/i3s-converter/types.d.ts +39 -0
- package/dist/i3s-converter/types.d.ts.map +1 -0
- package/dist/i3s-converter/types.js +2 -0
- package/dist/i3s-server/app.d.ts +3 -0
- package/dist/i3s-server/app.d.ts.map +1 -0
- package/dist/i3s-server/app.js +14 -0
- package/dist/i3s-server/controllers/index-controller.d.ts +2 -0
- package/dist/i3s-server/controllers/index-controller.d.ts.map +1 -0
- package/dist/i3s-server/controllers/index-controller.js +23 -0
- package/dist/i3s-server/routes/index.d.ts +3 -0
- package/dist/i3s-server/routes/index.d.ts.map +1 -0
- package/dist/i3s-server/routes/index.js +16 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/lib/utils/compress-util.d.ts +6 -0
- package/dist/lib/utils/compress-util.d.ts.map +1 -0
- package/dist/lib/utils/compress-util.js +190 -0
- package/dist/lib/utils/file-utils.d.ts +6 -0
- package/dist/lib/utils/file-utils.d.ts.map +1 -0
- package/dist/lib/utils/file-utils.js +42 -0
- package/dist/lib/utils/lod-conversion-utils.d.ts +20 -0
- package/dist/lib/utils/lod-conversion-utils.d.ts.map +1 -0
- package/dist/lib/utils/lod-conversion-utils.js +57 -0
- package/dist/lib/utils/statistic-utills.d.ts +3 -0
- package/dist/lib/utils/statistic-utills.d.ts.map +1 -0
- package/dist/lib/utils/statistic-utills.js +64 -0
- package/dist/pgm-loader.d.ts +6 -0
- package/dist/pgm-loader.d.ts.map +1 -0
- package/dist/pgm-loader.js +23 -0
- package/package.json +16 -17
- package/src/3d-tiles-converter/3d-tiles-converter.ts +4 -1
- package/src/3d-tiles-converter/helpers/b3dm-converter.ts +6 -5
- package/src/i3s-converter/helpers/node-pages.ts +6 -6
- package/src/i3s-converter/i3s-converter.ts +12 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SHARED_RESOURCES = void 0;
|
|
7
|
+
const json_map_transform_1 = __importDefault(require("json-map-transform"));
|
|
8
|
+
const MATERIAL_DEFINITION_INFO_PARAMS = () => ({
|
|
9
|
+
renderMode: {
|
|
10
|
+
path: 'renderMode',
|
|
11
|
+
default: 'solid'
|
|
12
|
+
},
|
|
13
|
+
shininess: {
|
|
14
|
+
path: 'shininess',
|
|
15
|
+
default: 1
|
|
16
|
+
},
|
|
17
|
+
reflectivity: {
|
|
18
|
+
path: 'reflectivity',
|
|
19
|
+
default: 0
|
|
20
|
+
},
|
|
21
|
+
ambient: {
|
|
22
|
+
path: 'ambient',
|
|
23
|
+
default: [1, 1, 1, 1]
|
|
24
|
+
},
|
|
25
|
+
diffuse: {
|
|
26
|
+
path: 'diffuse',
|
|
27
|
+
default: [1, 1, 1, 1]
|
|
28
|
+
},
|
|
29
|
+
specular: {
|
|
30
|
+
path: 'specular',
|
|
31
|
+
default: [0, 0, 0, 0]
|
|
32
|
+
},
|
|
33
|
+
useVertexColorAlpha: {
|
|
34
|
+
path: 'useVertexColorAlpha',
|
|
35
|
+
default: false
|
|
36
|
+
},
|
|
37
|
+
vertexRegions: {
|
|
38
|
+
path: 'vertexRegions',
|
|
39
|
+
default: false
|
|
40
|
+
},
|
|
41
|
+
vertexColors: {
|
|
42
|
+
path: 'vertexColors',
|
|
43
|
+
default: true
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const MATERIAL_DEFINITION_INFO = () => ({
|
|
47
|
+
name: {
|
|
48
|
+
path: 'name',
|
|
49
|
+
default: 'standard'
|
|
50
|
+
},
|
|
51
|
+
type: {
|
|
52
|
+
path: 'type',
|
|
53
|
+
default: 'standard'
|
|
54
|
+
},
|
|
55
|
+
params: {
|
|
56
|
+
path: 'params',
|
|
57
|
+
transform: (val, thisObject, originalObject) => (0, json_map_transform_1.default)(originalObject, MATERIAL_DEFINITION_INFO_PARAMS())
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
const TEXTURE_DEFINITION_IMAGE = () => ({
|
|
61
|
+
id: {
|
|
62
|
+
path: 'id'
|
|
63
|
+
},
|
|
64
|
+
size: {
|
|
65
|
+
path: 'size'
|
|
66
|
+
},
|
|
67
|
+
href: {
|
|
68
|
+
path: 'href',
|
|
69
|
+
default: ['../textures/0']
|
|
70
|
+
},
|
|
71
|
+
length: {
|
|
72
|
+
path: 'length'
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
const TEXTURE_DEFINITION_INFO = () => ({
|
|
76
|
+
encoding: {
|
|
77
|
+
path: 'encoding'
|
|
78
|
+
},
|
|
79
|
+
wrap: {
|
|
80
|
+
path: 'wrap',
|
|
81
|
+
default: ['none']
|
|
82
|
+
},
|
|
83
|
+
atlas: {
|
|
84
|
+
path: 'atlas',
|
|
85
|
+
default: false
|
|
86
|
+
},
|
|
87
|
+
uvSet: {
|
|
88
|
+
path: 'uvSet',
|
|
89
|
+
default: 'uv0'
|
|
90
|
+
},
|
|
91
|
+
channels: {
|
|
92
|
+
path: 'channels',
|
|
93
|
+
default: 'rgb'
|
|
94
|
+
},
|
|
95
|
+
images: {
|
|
96
|
+
path: 'images',
|
|
97
|
+
transform: (val, thisObject, originalObject) => val.map((image) => (0, json_map_transform_1.default)(image, TEXTURE_DEFINITION_IMAGE()))
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
const SHARED_RESOURCES = () => ({
|
|
101
|
+
materialDefinitions: {
|
|
102
|
+
path: 'materialDefinitionInfos',
|
|
103
|
+
transform: transfromMaterialDefinitions
|
|
104
|
+
},
|
|
105
|
+
textureDefinitions: {
|
|
106
|
+
path: 'textureDefinitionInfos',
|
|
107
|
+
transform: transfromTextureDefinitions
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
exports.SHARED_RESOURCES = SHARED_RESOURCES;
|
|
111
|
+
function transfromMaterialDefinitions(materialDefinitionInfos, thisObject, originalObject) {
|
|
112
|
+
const result = {};
|
|
113
|
+
for (const [index, materialDefinitionInfo] of materialDefinitionInfos.entries()) {
|
|
114
|
+
result[`Mat${originalObject.nodePath}${index}`] = (0, json_map_transform_1.default)(materialDefinitionInfo, MATERIAL_DEFINITION_INFO());
|
|
115
|
+
}
|
|
116
|
+
return result;
|
|
117
|
+
}
|
|
118
|
+
function transfromTextureDefinitions(textureDefinitionInfos, thisObject, originalObject) {
|
|
119
|
+
if (!textureDefinitionInfos) {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
const result = {};
|
|
123
|
+
for (const [index, textureDefinitionInfo] of textureDefinitionInfos.entries()) {
|
|
124
|
+
const imageIndex = `${originalObject.nodePath}${index}`;
|
|
125
|
+
textureDefinitionInfo.imageIndex = imageIndex;
|
|
126
|
+
result[imageIndex] = (0, json_map_transform_1.default)(textureDefinitionInfo, TEXTURE_DEFINITION_INFO());
|
|
127
|
+
}
|
|
128
|
+
return result;
|
|
129
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export declare const STORE: {
|
|
2
|
+
id: {
|
|
3
|
+
path: string;
|
|
4
|
+
transform: (val: any) => any;
|
|
5
|
+
};
|
|
6
|
+
profile: {
|
|
7
|
+
path: string;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
version: {
|
|
11
|
+
path: string;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
resourcePattern: {
|
|
15
|
+
path: string;
|
|
16
|
+
default: string[];
|
|
17
|
+
};
|
|
18
|
+
rootNode: {
|
|
19
|
+
path: string;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
extent: {
|
|
23
|
+
path: string;
|
|
24
|
+
};
|
|
25
|
+
indexCRS: {
|
|
26
|
+
path: string;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
vertexCRS: {
|
|
30
|
+
path: string;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
normalReferenceFrame: {
|
|
34
|
+
path: string;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
attributeEncoding: {
|
|
38
|
+
path: string;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
textureEncoding: {
|
|
42
|
+
path: string;
|
|
43
|
+
default: string[];
|
|
44
|
+
};
|
|
45
|
+
lodType: {
|
|
46
|
+
path: string;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
lodModel: {
|
|
50
|
+
path: string;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
defaultGeometrySchema: {
|
|
54
|
+
path: string;
|
|
55
|
+
default: {
|
|
56
|
+
geometryType: string;
|
|
57
|
+
header: {
|
|
58
|
+
property: string;
|
|
59
|
+
type: string;
|
|
60
|
+
}[];
|
|
61
|
+
topology: string;
|
|
62
|
+
ordering: string[];
|
|
63
|
+
vertexAttributes: {
|
|
64
|
+
position: {
|
|
65
|
+
valueType: string;
|
|
66
|
+
valuesPerElement: number;
|
|
67
|
+
};
|
|
68
|
+
normal: {
|
|
69
|
+
valueType: string;
|
|
70
|
+
valuesPerElement: number;
|
|
71
|
+
};
|
|
72
|
+
uv0: {
|
|
73
|
+
valueType: string;
|
|
74
|
+
valuesPerElement: number;
|
|
75
|
+
};
|
|
76
|
+
color: {
|
|
77
|
+
valueType: string;
|
|
78
|
+
valuesPerElement: number;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
featureAttributeOrder: string[];
|
|
82
|
+
featureAttributes: {
|
|
83
|
+
id: {
|
|
84
|
+
valueType: string;
|
|
85
|
+
valuesPerElement: number;
|
|
86
|
+
};
|
|
87
|
+
faceRange: {
|
|
88
|
+
valueType: string;
|
|
89
|
+
valuesPerElement: number;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/i3s-converter/json-templates/store.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmGjB,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.STORE = void 0;
|
|
4
|
+
exports.STORE = {
|
|
5
|
+
id: {
|
|
6
|
+
path: 'id',
|
|
7
|
+
transform: (val) => val.toUpperCase()
|
|
8
|
+
},
|
|
9
|
+
profile: {
|
|
10
|
+
path: 'profile',
|
|
11
|
+
default: 'meshpyramids'
|
|
12
|
+
},
|
|
13
|
+
version: {
|
|
14
|
+
path: 'version',
|
|
15
|
+
default: '1.8'
|
|
16
|
+
},
|
|
17
|
+
resourcePattern: {
|
|
18
|
+
path: 'resourcePattern',
|
|
19
|
+
default: ['3dNodeIndexDocument', 'Attributes', 'SharedResource', 'Geometry']
|
|
20
|
+
},
|
|
21
|
+
rootNode: {
|
|
22
|
+
path: 'rootNode',
|
|
23
|
+
default: './nodes/root'
|
|
24
|
+
},
|
|
25
|
+
extent: {
|
|
26
|
+
path: 'extent'
|
|
27
|
+
},
|
|
28
|
+
indexCRS: {
|
|
29
|
+
path: 'indexCRS',
|
|
30
|
+
default: 'http://www.opengis.net/def/crs/EPSG/0/4326'
|
|
31
|
+
},
|
|
32
|
+
vertexCRS: {
|
|
33
|
+
path: 'vertexCRS',
|
|
34
|
+
default: 'http://www.opengis.net/def/crs/EPSG/0/4326'
|
|
35
|
+
},
|
|
36
|
+
normalReferenceFrame: {
|
|
37
|
+
path: 'normalReferenceFrame',
|
|
38
|
+
default: 'east-north-up'
|
|
39
|
+
},
|
|
40
|
+
attributeEncoding: {
|
|
41
|
+
path: 'attributeEncoding',
|
|
42
|
+
default: 'application/octet-stream; version=1.6'
|
|
43
|
+
},
|
|
44
|
+
textureEncoding: {
|
|
45
|
+
path: 'textureEncoding',
|
|
46
|
+
default: ['image/jpeg', 'image/ktx2']
|
|
47
|
+
},
|
|
48
|
+
lodType: {
|
|
49
|
+
path: 'lodType',
|
|
50
|
+
default: 'MeshPyramid'
|
|
51
|
+
},
|
|
52
|
+
lodModel: {
|
|
53
|
+
path: 'lodModel',
|
|
54
|
+
default: 'node-switching'
|
|
55
|
+
},
|
|
56
|
+
defaultGeometrySchema: {
|
|
57
|
+
path: 'defaultGeometrySchema',
|
|
58
|
+
default: {
|
|
59
|
+
geometryType: 'triangles',
|
|
60
|
+
header: [
|
|
61
|
+
{
|
|
62
|
+
property: 'vertexCount',
|
|
63
|
+
type: 'UInt32'
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
property: 'featureCount',
|
|
67
|
+
type: 'UInt32'
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
topology: 'PerAttributeArray',
|
|
71
|
+
ordering: ['position', 'normal', 'uv0', 'color'],
|
|
72
|
+
vertexAttributes: {
|
|
73
|
+
position: {
|
|
74
|
+
valueType: 'Float32',
|
|
75
|
+
valuesPerElement: 3
|
|
76
|
+
},
|
|
77
|
+
normal: {
|
|
78
|
+
valueType: 'Float32',
|
|
79
|
+
valuesPerElement: 3
|
|
80
|
+
},
|
|
81
|
+
uv0: {
|
|
82
|
+
valueType: 'Float32',
|
|
83
|
+
valuesPerElement: 2
|
|
84
|
+
},
|
|
85
|
+
color: {
|
|
86
|
+
valueType: 'UInt8',
|
|
87
|
+
valuesPerElement: 4
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
featureAttributeOrder: ['id', 'faceRange'],
|
|
91
|
+
featureAttributes: {
|
|
92
|
+
id: {
|
|
93
|
+
valueType: 'UInt64',
|
|
94
|
+
valuesPerElement: 1
|
|
95
|
+
},
|
|
96
|
+
faceRange: {
|
|
97
|
+
valueType: 'UInt32',
|
|
98
|
+
valuesPerElement: 2
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { BoundingVolumes, I3SMaterialDefinition, SharedResources } from '@loaders.gl/i3s';
|
|
2
|
+
export declare type I3SConvertedResources = {
|
|
3
|
+
geometry: ArrayBuffer | null;
|
|
4
|
+
compressedGeometry?: ArrayBuffer | null;
|
|
5
|
+
texture: any | null;
|
|
6
|
+
sharedResources: SharedResources | null;
|
|
7
|
+
meshMaterial?: I3SMaterialDefinition | null;
|
|
8
|
+
vertexCount: number | null;
|
|
9
|
+
attributes: any | null;
|
|
10
|
+
featureCount: number | null;
|
|
11
|
+
geometryBuffer?: ArrayBuffer;
|
|
12
|
+
boundingVolumes: BoundingVolumes | null;
|
|
13
|
+
};
|
|
14
|
+
export declare type AttributesData = {
|
|
15
|
+
positions: Float32Array;
|
|
16
|
+
normals: Float32Array;
|
|
17
|
+
texCoords: Float32Array;
|
|
18
|
+
colors: Uint8Array;
|
|
19
|
+
featureIndices: number[];
|
|
20
|
+
triangleCount: number;
|
|
21
|
+
boundingVolumes?: BoundingVolumes | null;
|
|
22
|
+
};
|
|
23
|
+
export declare type GeometryAttributes = {
|
|
24
|
+
positions: Float32Array;
|
|
25
|
+
normals: Float32Array;
|
|
26
|
+
texCoords: Float32Array;
|
|
27
|
+
colors: Uint8Array;
|
|
28
|
+
faceRange: Uint32Array;
|
|
29
|
+
featureIds: number[];
|
|
30
|
+
featureCount: number;
|
|
31
|
+
};
|
|
32
|
+
export declare type GroupedByFeatureIdAttributes = {
|
|
33
|
+
featureId: number;
|
|
34
|
+
positions: Float32Array;
|
|
35
|
+
normals: Float32Array;
|
|
36
|
+
colors: Uint8Array;
|
|
37
|
+
texCoords: Float32Array;
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/i3s-converter/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAE,qBAAqB,EAAE,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAExF,oBAAY,qBAAqB,GAAG;IAClC,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,kBAAkB,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACxC,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC;IACpB,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC5C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,GAAG,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;CACzC,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC3B,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,EAAE,YAAY,CAAC;IACxB,MAAM,EAAE,UAAU,CAAC;IACnB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CAC1C,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,EAAE,YAAY,CAAC;IACxB,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oBAAY,4BAA4B,GAAG;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,EAAE,YAAY,CAAC;CACzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/i3s-server/app.js"],"names":[],"mappings":";AAOA,uBAAsB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const express = require('express');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const logger = require('morgan');
|
|
5
|
+
const cors = require('cors');
|
|
6
|
+
const indexRouter = require('./routes/index');
|
|
7
|
+
const app = express();
|
|
8
|
+
app.use(logger('dev'));
|
|
9
|
+
app.use(express.json());
|
|
10
|
+
app.use(express.urlencoded({ extended: false }));
|
|
11
|
+
app.use(express.static(path.join(__dirname, 'public')));
|
|
12
|
+
app.use(cors());
|
|
13
|
+
app.use('/', indexRouter);
|
|
14
|
+
module.exports = app;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-controller.d.ts","sourceRoot":"","sources":["../../../src/i3s-server/controllers/index-controller.js"],"names":[],"mappings":"AAQA,mEAYC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const { promises } = fs;
|
|
5
|
+
const I3S_LAYER_PATH = process.env.I3sLayerPath || ''; // eslint-disable-line no-process-env, no-undef
|
|
6
|
+
const FULL_LAYER_PATH = path.join(process.cwd(), I3S_LAYER_PATH); // eslint-disable-line no-undef
|
|
7
|
+
async function getFileNameByUrl(url) {
|
|
8
|
+
const extensions = ['json', 'bin', 'jpg', 'jpeg', 'png', 'bin.dds', 'ktx2'];
|
|
9
|
+
for (const ext of extensions) {
|
|
10
|
+
const fileName = `${FULL_LAYER_PATH}${url}/index.${ext}`;
|
|
11
|
+
try {
|
|
12
|
+
await promises.access(fileName);
|
|
13
|
+
return fileName;
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
continue; // eslint-disable-line no-continue
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
module.exports = {
|
|
22
|
+
getFileNameByUrl
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i3s-server/routes/index.js"],"names":[],"mappings":";AACA,0BAAgC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const express = require('express');
|
|
3
|
+
const router = express.Router();
|
|
4
|
+
const { getFileNameByUrl } = require('../controllers/index-controller');
|
|
5
|
+
/* GET home page. */
|
|
6
|
+
router.get('*', async function (req, res, next) {
|
|
7
|
+
const fileName = await getFileNameByUrl(req.path);
|
|
8
|
+
if (fileName) {
|
|
9
|
+
res.sendFile(fileName);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
res.status(404);
|
|
13
|
+
res.send('File not found');
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
module.exports = router;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as I3SConverter } from './i3s-converter/i3s-converter';
|
|
2
|
+
export { default as NodePages } from './i3s-converter/helpers/node-pages';
|
|
3
|
+
export { default as Tiles3DConverter } from './3d-tiles-converter/3d-tiles-converter';
|
|
4
|
+
export { DepsInstaller } from './deps-installer/deps-installer';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,oCAAoC,CAAC;AAExE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,yCAAyC,CAAC;AAEpF,OAAO,EAAC,aAAa,EAAC,MAAM,iCAAiC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DepsInstaller = exports.Tiles3DConverter = exports.NodePages = exports.I3SConverter = void 0;
|
|
7
|
+
var i3s_converter_1 = require("./i3s-converter/i3s-converter");
|
|
8
|
+
Object.defineProperty(exports, "I3SConverter", { enumerable: true, get: function () { return __importDefault(i3s_converter_1).default; } });
|
|
9
|
+
var node_pages_1 = require("./i3s-converter/helpers/node-pages");
|
|
10
|
+
Object.defineProperty(exports, "NodePages", { enumerable: true, get: function () { return __importDefault(node_pages_1).default; } });
|
|
11
|
+
var _3d_tiles_converter_1 = require("./3d-tiles-converter/3d-tiles-converter");
|
|
12
|
+
Object.defineProperty(exports, "Tiles3DConverter", { enumerable: true, get: function () { return __importDefault(_3d_tiles_converter_1).default; } });
|
|
13
|
+
var deps_installer_1 = require("./deps-installer/deps-installer");
|
|
14
|
+
Object.defineProperty(exports, "DepsInstaller", { enumerable: true, get: function () { return deps_installer_1.DepsInstaller; } });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export function compressFileWithGzip(pathFile: any): Promise<any>;
|
|
2
|
+
export function compressFilesWithZip(fileMap: any, outputFile: any, level?: number): Promise<any>;
|
|
3
|
+
export function compressWithChildProcess(...args: any[]): Promise<void>;
|
|
4
|
+
export function generateHash128FromZip(inputZipFile: any, outputFile: any): Promise<any>;
|
|
5
|
+
export function addFileToZip(inputFolder: any, fileName: any, zipFile: any, sevenZipExe: any): Promise<void>;
|
|
6
|
+
//# sourceMappingURL=compress-util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compress-util.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/compress-util.js"],"names":[],"mappings":"AAWA,kEAiBC;AAED,kGAoDC;AAED,wEAOC;AA0CD,yFA6CC;AASD,6GAGC"}
|