@loaders.gl/i3s 3.1.0-alpha.5 → 3.1.0-beta.7
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/bundle.d.ts +1 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/bundle.js +10364 -0
- package/dist/es5/i3s-attribute-loader.js +1 -1
- package/dist/es5/i3s-attribute-loader.js.map +1 -1
- package/dist/es5/i3s-building-scene-layer-loader.js +1 -1
- package/dist/es5/i3s-building-scene-layer-loader.js.map +1 -1
- package/dist/es5/i3s-content-loader.js +1 -1
- package/dist/es5/i3s-content-loader.js.map +1 -1
- package/dist/es5/i3s-loader.js +1 -1
- package/dist/es5/i3s-loader.js.map +1 -1
- package/dist/es5/i3s-node-page-loader.js +1 -1
- package/dist/es5/i3s-node-page-loader.js.map +1 -1
- package/dist/es5/lib/parsers/constants.js +61 -25
- package/dist/es5/lib/parsers/constants.js.map +1 -1
- package/dist/es5/lib/parsers/parse-i3s-tile-content.js +42 -36
- package/dist/es5/lib/parsers/parse-i3s-tile-content.js.map +1 -1
- package/dist/es5/lib/utils/url-utils.js.map +1 -1
- package/dist/es5/types.js +19 -0
- package/dist/es5/types.js.map +1 -1
- package/dist/esm/i3s-attribute-loader.js +1 -1
- package/dist/esm/i3s-attribute-loader.js.map +1 -1
- package/dist/esm/i3s-building-scene-layer-loader.js +1 -1
- package/dist/esm/i3s-building-scene-layer-loader.js.map +1 -1
- package/dist/esm/i3s-content-loader.js +1 -1
- package/dist/esm/i3s-content-loader.js.map +1 -1
- package/dist/esm/i3s-loader.js +1 -1
- package/dist/esm/i3s-loader.js.map +1 -1
- package/dist/esm/i3s-node-page-loader.js +1 -1
- package/dist/esm/i3s-node-page-loader.js.map +1 -1
- package/dist/esm/lib/parsers/constants.js +54 -22
- package/dist/esm/lib/parsers/constants.js.map +1 -1
- package/dist/esm/lib/parsers/parse-i3s-tile-content.js +41 -37
- package/dist/esm/lib/parsers/parse-i3s-tile-content.js.map +1 -1
- package/dist/esm/lib/utils/url-utils.js.map +1 -1
- package/dist/esm/types.js +13 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/i3s-attribute-loader.d.ts +1 -0
- package/dist/i3s-attribute-loader.d.ts.map +1 -0
- package/dist/i3s-attribute-loader.js +177 -0
- package/dist/i3s-building-scene-layer-loader.d.ts +1 -0
- package/dist/i3s-building-scene-layer-loader.d.ts.map +1 -0
- package/dist/i3s-building-scene-layer-loader.js +26 -0
- package/dist/i3s-content-loader.d.ts +1 -0
- package/dist/i3s-content-loader.d.ts.map +1 -0
- package/dist/i3s-content-loader.js +28 -0
- package/dist/i3s-content-worker.js +7657 -2
- package/dist/i3s-loader.d.ts +1 -0
- package/dist/i3s-loader.d.ts.map +1 -0
- package/dist/i3s-loader.js +100 -0
- package/dist/i3s-node-page-loader.d.ts +1 -0
- package/dist/i3s-node-page-loader.d.ts.map +1 -0
- package/dist/i3s-node-page-loader.js +26 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/lib/helpers/i3s-nodepages-tiles.d.ts +1 -0
- package/dist/lib/helpers/i3s-nodepages-tiles.d.ts.map +1 -0
- package/dist/lib/helpers/i3s-nodepages-tiles.js +231 -0
- package/dist/lib/parsers/constants.d.ts +34 -27
- package/dist/lib/parsers/constants.d.ts.map +1 -0
- package/dist/lib/parsers/constants.js +107 -0
- package/dist/lib/parsers/parse-i3s-attribute.d.ts +2 -1
- package/dist/lib/parsers/parse-i3s-attribute.d.ts.map +1 -0
- package/dist/lib/parsers/parse-i3s-attribute.js +98 -0
- package/dist/lib/parsers/parse-i3s-building-scene-layer.d.ts +1 -0
- package/dist/lib/parsers/parse-i3s-building-scene-layer.d.ts.map +1 -0
- package/dist/lib/parsers/parse-i3s-building-scene-layer.js +46 -0
- package/dist/lib/parsers/parse-i3s-tile-content.d.ts +2 -1
- package/dist/lib/parsers/parse-i3s-tile-content.d.ts.map +1 -0
- package/dist/lib/parsers/parse-i3s-tile-content.js +508 -0
- package/dist/lib/parsers/parse-i3s.d.ts +1 -0
- package/dist/lib/parsers/parse-i3s.d.ts.map +1 -0
- package/dist/lib/parsers/parse-i3s.js +84 -0
- package/dist/lib/utils/convert-i3s-obb-to-mbs.d.ts +1 -0
- package/dist/lib/utils/convert-i3s-obb-to-mbs.d.ts.map +1 -0
- package/dist/lib/utils/convert-i3s-obb-to-mbs.js +20 -0
- package/dist/lib/utils/url-utils.d.ts +2 -1
- package/dist/lib/utils/url-utils.d.ts.map +1 -0
- package/dist/lib/utils/url-utils.js +44 -0
- package/dist/types.d.ts +98 -13
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +15 -0
- package/dist/workers/i3s-content-worker.d.ts +1 -0
- package/dist/workers/i3s-content-worker.d.ts.map +1 -0
- package/dist/workers/i3s-content-worker.js +5 -0
- package/package.json +11 -12
- package/src/lib/parsers/constants.ts +69 -36
- package/src/lib/parsers/parse-i3s-tile-content.ts +110 -85
- package/src/lib/utils/url-utils.ts +1 -1
- package/src/types.ts +153 -22
- package/dist/dist.min.js +0 -2
- package/dist/dist.min.js.map +0 -1
- package/dist/i3s-content-worker.js.map +0 -1
|
@@ -0,0 +1,84 @@
|
|
|
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.normalizeTilesetData = exports.normalizeTileNonUrlData = exports.normalizeTileData = void 0;
|
|
7
|
+
const culling_1 = require("@math.gl/culling");
|
|
8
|
+
const geospatial_1 = require("@math.gl/geospatial");
|
|
9
|
+
const core_1 = require("@loaders.gl/core");
|
|
10
|
+
const tiles_1 = require("@loaders.gl/tiles");
|
|
11
|
+
const i3s_nodepages_tiles_1 = __importDefault(require("../helpers/i3s-nodepages-tiles"));
|
|
12
|
+
const url_utils_1 = require("../utils/url-utils");
|
|
13
|
+
function normalizeTileData(tile, options, context) {
|
|
14
|
+
tile.url = context.url;
|
|
15
|
+
if (tile.featureData) {
|
|
16
|
+
tile.featureUrl = `${tile.url}/${tile.featureData[0].href}`;
|
|
17
|
+
}
|
|
18
|
+
if (tile.geometryData) {
|
|
19
|
+
tile.contentUrl = `${tile.url}/${tile.geometryData[0].href}`;
|
|
20
|
+
}
|
|
21
|
+
if (tile.textureData) {
|
|
22
|
+
tile.textureUrl = `${tile.url}/${tile.textureData[0].href}`;
|
|
23
|
+
}
|
|
24
|
+
if (tile.attributeData) {
|
|
25
|
+
tile.attributeUrls = (0, url_utils_1.generateTileAttributeUrls)(tile);
|
|
26
|
+
}
|
|
27
|
+
return normalizeTileNonUrlData(tile);
|
|
28
|
+
}
|
|
29
|
+
exports.normalizeTileData = normalizeTileData;
|
|
30
|
+
function normalizeTileNonUrlData(tile) {
|
|
31
|
+
const box = tile.obb
|
|
32
|
+
? [
|
|
33
|
+
...geospatial_1.Ellipsoid.WGS84.cartographicToCartesian(tile.obb.center),
|
|
34
|
+
...tile.obb.halfSize,
|
|
35
|
+
...tile.obb.quaternion // quaternion
|
|
36
|
+
]
|
|
37
|
+
: undefined;
|
|
38
|
+
let sphere;
|
|
39
|
+
if (tile.mbs) {
|
|
40
|
+
sphere = [
|
|
41
|
+
...geospatial_1.Ellipsoid.WGS84.cartographicToCartesian(tile.mbs.slice(0, 3)),
|
|
42
|
+
tile.mbs[3] // radius of sphere
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
else if (box) {
|
|
46
|
+
const obb = new culling_1.OrientedBoundingBox().fromCenterHalfSizeQuaternion(box.slice(0, 3), tile.obb.halfSize, tile.obb.quaternion);
|
|
47
|
+
const boundingSphere = obb.getBoundingSphere();
|
|
48
|
+
sphere = [...boundingSphere.center, boundingSphere.radius];
|
|
49
|
+
tile.mbs = [...tile.obb.center, boundingSphere.radius];
|
|
50
|
+
}
|
|
51
|
+
tile.boundingVolume = {
|
|
52
|
+
sphere,
|
|
53
|
+
box
|
|
54
|
+
};
|
|
55
|
+
tile.lodMetricType = tile.lodSelection[0].metricType;
|
|
56
|
+
tile.lodMetricValue = tile.lodSelection[0].maxError;
|
|
57
|
+
tile.transformMatrix = tile.transform;
|
|
58
|
+
tile.type = tiles_1.TILE_TYPE.MESH;
|
|
59
|
+
// TODO only support replacement for now
|
|
60
|
+
tile.refine = tiles_1.TILE_REFINEMENT.REPLACE;
|
|
61
|
+
return tile;
|
|
62
|
+
}
|
|
63
|
+
exports.normalizeTileNonUrlData = normalizeTileNonUrlData;
|
|
64
|
+
async function normalizeTilesetData(tileset, options, context) {
|
|
65
|
+
tileset.url = context.url;
|
|
66
|
+
if (tileset.nodePages) {
|
|
67
|
+
tileset.nodePagesTile = new i3s_nodepages_tiles_1.default(tileset, options);
|
|
68
|
+
tileset.root = await tileset.nodePagesTile.formTileFromNodePages(0);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
const rootNodeUrl = (0, url_utils_1.getUrlWithToken)(`${tileset.url}/nodes/root`, options.i3s?.token);
|
|
72
|
+
// eslint-disable-next-line no-use-before-define
|
|
73
|
+
tileset.root = await (0, core_1.load)(rootNodeUrl, tileset.loader, {
|
|
74
|
+
i3s: { loadContent: false, isTileHeader: true, isTileset: false }
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
// base path that non-absolute paths in tileset are relative to.
|
|
78
|
+
tileset.basePath = tileset.url;
|
|
79
|
+
tileset.type = tiles_1.TILESET_TYPE.I3S;
|
|
80
|
+
// populate from root node
|
|
81
|
+
tileset.lodMetricType = tileset.root.lodMetricType;
|
|
82
|
+
tileset.lodMetricValue = tileset.root.lodMetricValue;
|
|
83
|
+
}
|
|
84
|
+
exports.normalizeTilesetData = normalizeTilesetData;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert-i3s-obb-to-mbs.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/convert-i3s-obb-to-mbs.ts"],"names":[],"mappings":"AAGA,wBAAgB,kBAAkB,CAAC,GAAG,KAAA,SAgBrC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.convertI3SObbToMbs = void 0;
|
|
4
|
+
const culling_1 = require("@math.gl/culling");
|
|
5
|
+
const geospatial_1 = require("@math.gl/geospatial");
|
|
6
|
+
function convertI3SObbToMbs(obb) {
|
|
7
|
+
const halfSize = obb.halfSize;
|
|
8
|
+
const centerCartesian = geospatial_1.Ellipsoid.WGS84.cartographicToCartesian(obb.center);
|
|
9
|
+
const sphere = new culling_1.BoundingSphere().fromCornerPoints([
|
|
10
|
+
centerCartesian[0] - halfSize[0],
|
|
11
|
+
centerCartesian[1] - halfSize[1],
|
|
12
|
+
centerCartesian[2] - halfSize[2]
|
|
13
|
+
], [
|
|
14
|
+
centerCartesian[0] + halfSize[0],
|
|
15
|
+
centerCartesian[1] + halfSize[1],
|
|
16
|
+
centerCartesian[2] + halfSize[2]
|
|
17
|
+
]);
|
|
18
|
+
return [...obb.center, sphere.radius];
|
|
19
|
+
}
|
|
20
|
+
exports.convertI3SObbToMbs = convertI3SObbToMbs;
|
|
@@ -5,7 +5,7 @@ import { Tile } from '../../types';
|
|
|
5
5
|
* @param {any} token
|
|
6
6
|
* @returns {string}
|
|
7
7
|
*/
|
|
8
|
-
export declare function getUrlWithToken(url:
|
|
8
|
+
export declare function getUrlWithToken(url: string, token?: null): string;
|
|
9
9
|
/**
|
|
10
10
|
* Generates attribute urls for tile.
|
|
11
11
|
* @param tile
|
|
@@ -19,3 +19,4 @@ export declare function generateTileAttributeUrls(tile: Tile): string[];
|
|
|
19
19
|
* @returns {Array}
|
|
20
20
|
*/
|
|
21
21
|
export declare function generateTilesetAttributeUrls(tileset: any, resource: any): string[];
|
|
22
|
+
//# sourceMappingURL=url-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/url-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAEjC;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,OAAO,GAAG,MAAM,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,EAAE,CAU9D;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,KAAA,EAAE,QAAQ,KAAA,YAU7D"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateTilesetAttributeUrls = exports.generateTileAttributeUrls = exports.getUrlWithToken = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Generates url with token if it is exists.
|
|
6
|
+
* @param {String} url
|
|
7
|
+
* @param {any} token
|
|
8
|
+
* @returns {string}
|
|
9
|
+
*/
|
|
10
|
+
function getUrlWithToken(url, token = null) {
|
|
11
|
+
return token ? `${url}?token=${token}` : url;
|
|
12
|
+
}
|
|
13
|
+
exports.getUrlWithToken = getUrlWithToken;
|
|
14
|
+
/**
|
|
15
|
+
* Generates attribute urls for tile.
|
|
16
|
+
* @param tile
|
|
17
|
+
* @returns list of attribute urls
|
|
18
|
+
*/
|
|
19
|
+
function generateTileAttributeUrls(tile) {
|
|
20
|
+
const { url, attributeData } = tile;
|
|
21
|
+
const attributeUrls = [];
|
|
22
|
+
for (let index = 0; index < attributeData.length; index++) {
|
|
23
|
+
const attributeUrl = attributeData[index].href.replace('./', '');
|
|
24
|
+
attributeUrls.push(`${url}/${attributeUrl}`);
|
|
25
|
+
}
|
|
26
|
+
return attributeUrls;
|
|
27
|
+
}
|
|
28
|
+
exports.generateTileAttributeUrls = generateTileAttributeUrls;
|
|
29
|
+
/**
|
|
30
|
+
* Generates attribute urls for tileset based on tileset and resource
|
|
31
|
+
* @param {Object} tileset
|
|
32
|
+
* @param {number} resource
|
|
33
|
+
* @returns {Array}
|
|
34
|
+
*/
|
|
35
|
+
function generateTilesetAttributeUrls(tileset, resource) {
|
|
36
|
+
const attributeUrls = [];
|
|
37
|
+
const { attributeStorageInfo, url } = tileset;
|
|
38
|
+
for (let index = 0; index < attributeStorageInfo.length; index++) {
|
|
39
|
+
const fileName = attributeStorageInfo[index].key;
|
|
40
|
+
attributeUrls.push(`${url}/nodes/${resource}/attributes/${fileName}/0`);
|
|
41
|
+
}
|
|
42
|
+
return attributeUrls;
|
|
43
|
+
}
|
|
44
|
+
exports.generateTilesetAttributeUrls = generateTilesetAttributeUrls;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,15 +1,64 @@
|
|
|
1
1
|
import type { GLTFMaterial } from '@loaders.gl/gltf';
|
|
2
|
-
import type { Quaternion, Vector3 } from '@math.gl/core';
|
|
2
|
+
import type { Matrix4, Quaternion, Vector3 } from '@math.gl/core';
|
|
3
3
|
import type { Mesh } from '@loaders.gl/gltf';
|
|
4
|
+
import type { TypedArray } from '@loaders.gl/schema';
|
|
5
|
+
export declare enum DATA_TYPE {
|
|
6
|
+
UInt8 = "UInt8",
|
|
7
|
+
UInt16 = "UInt16",
|
|
8
|
+
UInt32 = "UInt32",
|
|
9
|
+
UInt64 = "UInt64",
|
|
10
|
+
Int16 = "Int16",
|
|
11
|
+
Int32 = "Int32",
|
|
12
|
+
Int64 = "Int64",
|
|
13
|
+
Float32 = "Float32",
|
|
14
|
+
Float64 = "Float64"
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/3DSceneLayer.cmn.md
|
|
18
|
+
*/
|
|
4
19
|
export declare type Tileset = {
|
|
20
|
+
/**
|
|
21
|
+
* The store object describes the exact physical storage of a layer and enables the client to detect when multiple layers are served from the same store.
|
|
22
|
+
*/
|
|
23
|
+
store: Store;
|
|
5
24
|
[key: string]: any;
|
|
6
25
|
};
|
|
7
26
|
export declare type NodePage = {
|
|
8
27
|
[key: string]: any;
|
|
9
28
|
};
|
|
10
29
|
export declare type Tile = {
|
|
30
|
+
content: TileContent;
|
|
31
|
+
isDracoGeometry: boolean;
|
|
32
|
+
textureUrl: string;
|
|
33
|
+
url: string;
|
|
34
|
+
/**
|
|
35
|
+
* Resource reference describing a featureData document.
|
|
36
|
+
*/
|
|
37
|
+
attributeData: Resource[];
|
|
38
|
+
textureFormat: 'jpeg' | 'png' | 'ktx-etc2' | 'dds' | 'ktx2';
|
|
39
|
+
textureLoaderOptions: any;
|
|
40
|
+
materialDefinition: GLTFMaterial;
|
|
41
|
+
mbs: Mbs;
|
|
42
|
+
};
|
|
43
|
+
export declare type TileContent = {
|
|
44
|
+
featureData: DefaultGeometrySchema;
|
|
45
|
+
attributes: NormalizedAttributes;
|
|
46
|
+
indices: NormalizedAttribute | null;
|
|
47
|
+
featureIds: number[] | TypedArray;
|
|
48
|
+
vertexCount: number;
|
|
49
|
+
modelMatrix: Matrix4;
|
|
50
|
+
coordinateSystem: number;
|
|
51
|
+
byteLength: number;
|
|
52
|
+
texture: TileContentTexture;
|
|
11
53
|
[key: string]: any;
|
|
12
54
|
};
|
|
55
|
+
export declare type TileContentTexture = ArrayBuffer | {
|
|
56
|
+
compressed: boolean;
|
|
57
|
+
mipmaps: boolean;
|
|
58
|
+
width: number;
|
|
59
|
+
height: number;
|
|
60
|
+
data: any;
|
|
61
|
+
} | null;
|
|
13
62
|
export declare type BoundingVolumes = {
|
|
14
63
|
mbs: Mbs;
|
|
15
64
|
obb: Obb;
|
|
@@ -69,6 +118,9 @@ export declare type PopupInfo = {
|
|
|
69
118
|
fieldInfos?: FieldInfo[];
|
|
70
119
|
}[];
|
|
71
120
|
};
|
|
121
|
+
/**
|
|
122
|
+
* Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.7/3DNodeIndexDocument.cmn.md
|
|
123
|
+
*/
|
|
72
124
|
export declare type Node3DIndexDocument = {
|
|
73
125
|
id: string;
|
|
74
126
|
version?: string;
|
|
@@ -153,7 +205,8 @@ export declare type TextureImage = {
|
|
|
153
205
|
export declare type Attribute = 'OBJECTID' | 'string' | 'double' | 'Int32' | string;
|
|
154
206
|
export declare type Extent = [number, number, number, number];
|
|
155
207
|
export declare type FeatureAttribute = {
|
|
156
|
-
|
|
208
|
+
id: AttributeValue;
|
|
209
|
+
faceRange: AttributeValue;
|
|
157
210
|
};
|
|
158
211
|
export declare type BuildingSceneLayerTileset = {
|
|
159
212
|
header: BuildingSceneLayer;
|
|
@@ -263,6 +316,9 @@ declare type Domain = {
|
|
|
263
316
|
mergePolicy?: string;
|
|
264
317
|
splitPolicy?: string;
|
|
265
318
|
};
|
|
319
|
+
/**
|
|
320
|
+
* spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/store.cmn.md
|
|
321
|
+
*/
|
|
266
322
|
declare type Store = {
|
|
267
323
|
id: string | number;
|
|
268
324
|
profile: string;
|
|
@@ -279,21 +335,49 @@ declare type Store = {
|
|
|
279
335
|
lodModel: string;
|
|
280
336
|
defaultGeometrySchema: DefaultGeometrySchema;
|
|
281
337
|
};
|
|
338
|
+
/**
|
|
339
|
+
* Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/defaultGeometrySchema.cmn.md
|
|
340
|
+
*/
|
|
282
341
|
declare type DefaultGeometrySchema = {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
342
|
+
geometryType?: 'triangles';
|
|
343
|
+
topology: 'PerAttributeArray' | 'Indexed';
|
|
344
|
+
header: {
|
|
345
|
+
property: 'vertexCount' | 'featureCount' | string;
|
|
346
|
+
type: DATA_TYPE.UInt8 | DATA_TYPE.UInt16 | DATA_TYPE.UInt32 | DATA_TYPE.UInt64 | DATA_TYPE.Int16 | DATA_TYPE.Int32 | DATA_TYPE.Int64 | DATA_TYPE.Float32 | DATA_TYPE.Float64;
|
|
347
|
+
}[];
|
|
348
|
+
ordering: string[];
|
|
349
|
+
vertexAttributes: VertexAttribute;
|
|
350
|
+
faces?: VertexAttribute;
|
|
351
|
+
featureAttributeOrder: string[];
|
|
352
|
+
featureAttributes: FeatureAttribute;
|
|
353
|
+
attributesOrder?: string[];
|
|
354
|
+
};
|
|
355
|
+
export declare type VertexAttribute = {
|
|
356
|
+
position: GeometryAttribute;
|
|
357
|
+
normal: GeometryAttribute;
|
|
358
|
+
uv0: GeometryAttribute;
|
|
359
|
+
color: GeometryAttribute;
|
|
360
|
+
region?: GeometryAttribute;
|
|
361
|
+
};
|
|
362
|
+
export declare type GeometryAttribute = {
|
|
363
|
+
byteOffset?: number;
|
|
364
|
+
valueType: DATA_TYPE.UInt8 | DATA_TYPE.UInt16 | DATA_TYPE.Int16 | DATA_TYPE.Int32 | DATA_TYPE.Int64 | DATA_TYPE.Float32 | DATA_TYPE.Float64;
|
|
365
|
+
valuesPerElement: number;
|
|
366
|
+
};
|
|
367
|
+
export declare type NormalizedAttributes = {
|
|
368
|
+
[key: string]: NormalizedAttribute;
|
|
369
|
+
};
|
|
370
|
+
export declare type NormalizedAttribute = {
|
|
371
|
+
value: number[] | TypedArray;
|
|
372
|
+
type: number;
|
|
373
|
+
size: number;
|
|
374
|
+
normalized?: boolean;
|
|
375
|
+
metadata?: any;
|
|
292
376
|
};
|
|
293
377
|
declare type HeightModelInfo = {
|
|
294
|
-
heightModel:
|
|
378
|
+
heightModel: 'gravity_related_height' | 'ellipsoidal';
|
|
295
379
|
vertCRS: string;
|
|
296
|
-
heightUnit:
|
|
380
|
+
heightUnit: 'meter' | 'us-foot' | 'foot' | 'clarke-foot' | 'clarke-yard' | 'clarke-link' | 'sears-yard' | 'sears-foot' | 'sears-chain' | 'benoit-1895-b-chain' | 'indian-yard' | 'indian-1937-yard' | 'gold-coast-foot' | 'sears-1922-truncated-chain' | 'us-inch' | 'us-mile' | 'us-yard' | 'millimeter' | 'decimeter' | 'centimeter' | 'kilometer';
|
|
297
381
|
};
|
|
298
382
|
declare type NodePages = {
|
|
299
383
|
nodesPerPage: number;
|
|
@@ -342,3 +426,4 @@ declare type FieldInfo = {
|
|
|
342
426
|
label: string;
|
|
343
427
|
};
|
|
344
428
|
export {};
|
|
429
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AAChE,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAC3C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAEnD,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AACD;;GAEG;AAEH,oBAAY,OAAO,GAAG;IACpB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF,oBAAY,QAAQ,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,CAAC;AAE5C,oBAAY,IAAI,GAAG;IACjB,OAAO,EAAE,WAAW,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,aAAa,EAAE,QAAQ,EAAE,CAAC;IAC1B,aAAa,EAAE,MAAM,G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,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CAAC;AAEhG,aAAK,cAAc,GAAG;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC;AAExF,aAAK,SAAS,GAAG;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DATA_TYPE = void 0;
|
|
4
|
+
var DATA_TYPE;
|
|
5
|
+
(function (DATA_TYPE) {
|
|
6
|
+
DATA_TYPE["UInt8"] = "UInt8";
|
|
7
|
+
DATA_TYPE["UInt16"] = "UInt16";
|
|
8
|
+
DATA_TYPE["UInt32"] = "UInt32";
|
|
9
|
+
DATA_TYPE["UInt64"] = "UInt64";
|
|
10
|
+
DATA_TYPE["Int16"] = "Int16";
|
|
11
|
+
DATA_TYPE["Int32"] = "Int32";
|
|
12
|
+
DATA_TYPE["Int64"] = "Int64";
|
|
13
|
+
DATA_TYPE["Float32"] = "Float32";
|
|
14
|
+
DATA_TYPE["Float64"] = "Float64";
|
|
15
|
+
})(DATA_TYPE = exports.DATA_TYPE || (exports.DATA_TYPE = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i3s-content-worker.d.ts","sourceRoot":"","sources":["../../src/workers/i3s-content-worker.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const loader_utils_1 = require("@loaders.gl/loader-utils");
|
|
4
|
+
const i3s_content_loader_1 = require("../i3s-content-loader");
|
|
5
|
+
(0, loader_utils_1.createLoaderWorker)(i3s_content_loader_1.I3SContentLoader);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/i3s",
|
|
3
|
-
"version": "3.1.0-
|
|
3
|
+
"version": "3.1.0-beta.7",
|
|
4
4
|
"description": "i3s .",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -28,17 +28,16 @@
|
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
30
|
"pre-build": "npm run build-bundle && npm run build-worker",
|
|
31
|
-
"
|
|
32
|
-
"build-
|
|
33
|
-
"build-worker": "webpack --entry ./src/workers/i3s-content-worker.ts --output ./dist/i3s-content-worker.js --config ../../scripts/webpack/worker.js"
|
|
31
|
+
"build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/bundle.js",
|
|
32
|
+
"build-worker": "esbuild src/workers/i3s-content-worker.ts --bundle --outfile=dist/i3s-content-worker.js"
|
|
34
33
|
},
|
|
35
34
|
"dependencies": {
|
|
36
|
-
"@loaders.gl/draco": "3.1.0-
|
|
37
|
-
"@loaders.gl/images": "3.1.0-
|
|
38
|
-
"@loaders.gl/loader-utils": "3.1.0-
|
|
39
|
-
"@loaders.gl/schema": "3.1.0-
|
|
40
|
-
"@loaders.gl/textures": "3.1.0-
|
|
41
|
-
"@loaders.gl/tiles": "3.1.0-
|
|
35
|
+
"@loaders.gl/draco": "3.1.0-beta.7",
|
|
36
|
+
"@loaders.gl/images": "3.1.0-beta.7",
|
|
37
|
+
"@loaders.gl/loader-utils": "3.1.0-beta.7",
|
|
38
|
+
"@loaders.gl/schema": "3.1.0-beta.7",
|
|
39
|
+
"@loaders.gl/textures": "3.1.0-beta.7",
|
|
40
|
+
"@loaders.gl/tiles": "3.1.0-beta.7",
|
|
42
41
|
"@luma.gl/constants": "^8.5.4",
|
|
43
42
|
"@math.gl/core": "^3.5.1",
|
|
44
43
|
"@math.gl/culling": "^3.5.1",
|
|
@@ -46,7 +45,7 @@
|
|
|
46
45
|
"probe.gl": "^3.4.0"
|
|
47
46
|
},
|
|
48
47
|
"peerDependencies": {
|
|
49
|
-
"@loaders.gl/core": "
|
|
48
|
+
"@loaders.gl/core": "3.1.0-beta.1"
|
|
50
49
|
},
|
|
51
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "f3b4d81ac02758398c4e4eef5e556b206ef2dfbe"
|
|
52
51
|
}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import GL from '@luma.gl/constants';
|
|
2
|
+
import {DATA_TYPE} from '../../types';
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
export function getConstructorForDataFormat(dataType: string) {
|
|
5
|
+
switch (dataType) {
|
|
6
|
+
case DATA_TYPE.UInt8:
|
|
7
|
+
return Uint8Array;
|
|
8
|
+
case DATA_TYPE.UInt16:
|
|
9
|
+
return Uint16Array;
|
|
10
|
+
case DATA_TYPE.UInt32:
|
|
11
|
+
return Uint32Array;
|
|
12
|
+
case DATA_TYPE.Float32:
|
|
13
|
+
return Float32Array;
|
|
14
|
+
case DATA_TYPE.UInt64:
|
|
15
|
+
return Float64Array;
|
|
16
|
+
default:
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
10
20
|
|
|
11
|
-
export const GL_TYPE_MAP = {
|
|
21
|
+
export const GL_TYPE_MAP: {[key: string]: number} = {
|
|
12
22
|
UInt8: GL.UNSIGNED_BYTE,
|
|
13
23
|
UInt16: GL.UNSIGNED_INT,
|
|
14
24
|
Float32: GL.FLOAT,
|
|
@@ -29,20 +39,36 @@ export const I3S_NAMED_GEOMETRY_ATTRIBUTES = {
|
|
|
29
39
|
featureAttributeOrder: 'featureAttributeOrder',
|
|
30
40
|
featureAttributes: 'featureAttributes'
|
|
31
41
|
};
|
|
32
|
-
|
|
42
|
+
// TODO Remove Named Attributes and replase with Typescipt types
|
|
33
43
|
export const I3S_NAMED_HEADER_ATTRIBUTES = {
|
|
34
|
-
header: 'header',
|
|
44
|
+
// header: 'header',
|
|
35
45
|
vertexCount: 'vertexCount',
|
|
36
46
|
featureCount: 'featureCount'
|
|
37
47
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Returns how many bytes a type occupies
|
|
50
|
+
* @param dataType
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
53
|
+
export function sizeOf(dataType: string): number {
|
|
54
|
+
switch (dataType) {
|
|
55
|
+
case DATA_TYPE.UInt8:
|
|
56
|
+
return 1;
|
|
57
|
+
case DATA_TYPE.UInt16:
|
|
58
|
+
case DATA_TYPE.Int16:
|
|
59
|
+
return 2;
|
|
60
|
+
case DATA_TYPE.UInt32:
|
|
61
|
+
case DATA_TYPE.Int32:
|
|
62
|
+
case DATA_TYPE.Float32:
|
|
63
|
+
return 4;
|
|
64
|
+
case DATA_TYPE.UInt64:
|
|
65
|
+
case DATA_TYPE.Int64:
|
|
66
|
+
case DATA_TYPE.Float64:
|
|
67
|
+
return 8;
|
|
68
|
+
default:
|
|
69
|
+
return NaN;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
46
72
|
|
|
47
73
|
export const STRING_ATTRIBUTE_TYPE = 'String';
|
|
48
74
|
export const OBJECT_ID_ATTRIBUTE_TYPE = 'Oid32';
|
|
@@ -51,21 +77,28 @@ export const INT_16_ATTRIBUTE_TYPE = 'Int16';
|
|
|
51
77
|
|
|
52
78
|
// https://github.com/visgl/deck.gl/blob/9548f43cba2234a1f4877b6b17f6c88eb35b2e08/modules/core/src/lib/constants.js#L27
|
|
53
79
|
// Describes the format of positions
|
|
54
|
-
export
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
80
|
+
export enum COORDINATE_SYSTEM {
|
|
81
|
+
/**
|
|
82
|
+
* `LNGLAT` if rendering into a geospatial viewport, `CARTESIAN` otherwise
|
|
83
|
+
*/
|
|
84
|
+
DEFAULT = -1,
|
|
85
|
+
/**
|
|
86
|
+
* Positions are interpreted as [lng, lat, elevation]
|
|
87
|
+
* lng lat are degrees, elevation is meters. distances as meters.
|
|
88
|
+
*/
|
|
89
|
+
LNGLAT = 1,
|
|
90
|
+
/**
|
|
91
|
+
* Positions are interpreted as meter offsets, distances as meters
|
|
92
|
+
*/
|
|
93
|
+
METER_OFFSETS = 2,
|
|
94
|
+
/**
|
|
95
|
+
* Positions are interpreted as lng lat offsets: [deltaLng, deltaLat, elevation]
|
|
96
|
+
* deltaLng, deltaLat are delta degrees, elevation is meters.
|
|
97
|
+
* distances as meters.
|
|
98
|
+
*/
|
|
99
|
+
LNGLAT_OFFSETS = 3,
|
|
100
|
+
/**
|
|
101
|
+
* Non-geospatial
|
|
102
|
+
*/
|
|
103
|
+
CARTESIAN = 0
|
|
104
|
+
}
|