@loaders.gl/i3s 4.0.0-alpha.1 → 4.0.0-alpha.10
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/arcgis-webscene-loader.d.ts +7 -0
- package/dist/arcgis-webscene-loader.d.ts.map +1 -0
- package/dist/arcgis-webscene-loader.js +28 -0
- package/dist/bundle.d.ts +2 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/bundle.js +2 -2
- package/dist/dist.min.js +11262 -0
- package/dist/es5/arcgis-webscene-loader.js +40 -0
- package/dist/es5/arcgis-webscene-loader.js.map +1 -0
- package/dist/es5/bundle.js +6 -0
- package/dist/es5/bundle.js.map +1 -0
- package/dist/es5/i3s-attribute-loader.js +195 -0
- package/dist/es5/i3s-attribute-loader.js.map +1 -0
- package/dist/es5/i3s-building-scene-layer-loader.js +46 -0
- package/dist/es5/i3s-building-scene-layer-loader.js.map +1 -0
- package/dist/es5/i3s-content-loader.js +56 -0
- package/dist/es5/i3s-content-loader.js.map +1 -0
- package/dist/es5/i3s-loader.js +193 -0
- package/dist/es5/i3s-loader.js.map +1 -0
- package/dist/es5/i3s-node-page-loader.js +39 -0
- package/dist/es5/i3s-node-page-loader.js.map +1 -0
- package/dist/es5/i3s-slpk-loader.js +20 -0
- package/dist/es5/i3s-slpk-loader.js.map +1 -0
- package/dist/es5/index.js +68 -0
- package/dist/es5/index.js.map +1 -0
- package/dist/es5/lib/helpers/i3s-nodepages-tiles.js +312 -0
- package/dist/es5/lib/helpers/i3s-nodepages-tiles.js.map +1 -0
- package/dist/es5/lib/parsers/constants.js +72 -0
- package/dist/es5/lib/parsers/constants.js.map +1 -0
- package/dist/es5/lib/parsers/parse-arcgis-webscene.js +158 -0
- package/dist/es5/lib/parsers/parse-arcgis-webscene.js.map +1 -0
- package/dist/es5/lib/parsers/parse-i3s-attribute.js +76 -0
- package/dist/es5/lib/parsers/parse-i3s-attribute.js.map +1 -0
- package/dist/es5/lib/parsers/parse-i3s-building-scene-layer.js +65 -0
- package/dist/es5/lib/parsers/parse-i3s-building-scene-layer.js.map +1 -0
- package/dist/es5/lib/parsers/parse-i3s-tile-content.js +510 -0
- package/dist/es5/lib/parsers/parse-i3s-tile-content.js.map +1 -0
- package/dist/es5/lib/parsers/parse-i3s.js +116 -0
- package/dist/es5/lib/parsers/parse-i3s.js.map +1 -0
- package/dist/es5/lib/parsers/parse-slpk/parse-slpk.js +94 -0
- package/dist/es5/lib/parsers/parse-slpk/parse-slpk.js.map +1 -0
- package/dist/es5/lib/parsers/parse-slpk/slpk-archieve.js +229 -0
- package/dist/es5/lib/parsers/parse-slpk/slpk-archieve.js.map +1 -0
- package/dist/es5/lib/parsers/parse-zip/cd-file-header.js +44 -0
- package/dist/es5/lib/parsers/parse-zip/cd-file-header.js.map +1 -0
- package/dist/es5/lib/parsers/parse-zip/local-file-header.js +26 -0
- package/dist/es5/lib/parsers/parse-zip/local-file-header.js.map +1 -0
- package/dist/es5/lib/utils/convert-i3s-obb-to-mbs.js +17 -0
- package/dist/es5/lib/utils/convert-i3s-obb-to-mbs.js.map +1 -0
- package/dist/es5/lib/utils/customize-/321/201olors.js +184 -0
- package/dist/es5/lib/utils/customize-/321/201olors.js.map +1 -0
- package/dist/es5/lib/utils/url-utils.js +33 -0
- package/dist/es5/lib/utils/url-utils.js.map +1 -0
- package/dist/es5/types.js +26 -0
- package/dist/es5/types.js.map +1 -0
- package/dist/es5/workers/i3s-content-worker-node.js +7 -0
- package/dist/es5/workers/i3s-content-worker-node.js.map +1 -0
- package/dist/es5/workers/i3s-content-worker.js +6 -0
- package/dist/es5/workers/i3s-content-worker.js.map +1 -0
- package/dist/esm/arcgis-webscene-loader.js +16 -0
- package/dist/esm/arcgis-webscene-loader.js.map +1 -0
- package/dist/esm/bundle.js +4 -0
- package/dist/esm/bundle.js.map +1 -0
- package/dist/esm/i3s-attribute-loader.js +119 -0
- package/dist/esm/i3s-attribute-loader.js.map +1 -0
- package/dist/esm/i3s-building-scene-layer-loader.js +19 -0
- package/dist/esm/i3s-building-scene-layer-loader.js.map +1 -0
- package/dist/esm/i3s-content-loader.js +30 -0
- package/dist/esm/i3s-content-loader.js.map +1 -0
- package/dist/esm/i3s-loader.js +87 -0
- package/dist/esm/i3s-loader.js.map +1 -0
- package/dist/esm/i3s-node-page-loader.js +15 -0
- package/dist/esm/i3s-node-page-loader.js.map +1 -0
- package/dist/esm/i3s-slpk-loader.js +13 -0
- package/dist/esm/i3s-slpk-loader.js.map +1 -0
- package/dist/esm/index.js +9 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/helpers/i3s-nodepages-tiles.js +198 -0
- package/dist/esm/lib/helpers/i3s-nodepages-tiles.js.map +1 -0
- package/dist/esm/lib/parsers/constants.js +57 -0
- package/dist/esm/lib/parsers/constants.js.map +1 -0
- package/dist/esm/lib/parsers/parse-arcgis-webscene.js +70 -0
- package/dist/esm/lib/parsers/parse-arcgis-webscene.js.map +1 -0
- package/dist/esm/lib/parsers/parse-i3s-attribute.js +60 -0
- package/dist/esm/lib/parsers/parse-i3s-attribute.js.map +1 -0
- package/dist/esm/lib/parsers/parse-i3s-building-scene-layer.js +39 -0
- package/dist/esm/lib/parsers/parse-i3s-building-scene-layer.js.map +1 -0
- package/dist/esm/lib/parsers/parse-i3s-tile-content.js +435 -0
- package/dist/esm/lib/parsers/parse-i3s-tile-content.js.map +1 -0
- package/dist/esm/lib/parsers/parse-i3s.js +83 -0
- package/dist/esm/lib/parsers/parse-i3s.js.map +1 -0
- package/dist/esm/lib/parsers/parse-slpk/parse-slpk.js +37 -0
- package/dist/esm/lib/parsers/parse-slpk/parse-slpk.js.map +1 -0
- package/dist/esm/lib/parsers/parse-slpk/slpk-archieve.js +108 -0
- package/dist/esm/lib/parsers/parse-slpk/slpk-archieve.js.map +1 -0
- package/dist/esm/lib/parsers/parse-zip/cd-file-header.js +37 -0
- package/dist/esm/lib/parsers/parse-zip/cd-file-header.js.map +1 -0
- package/dist/esm/lib/parsers/parse-zip/local-file-header.js +19 -0
- package/dist/esm/lib/parsers/parse-zip/local-file-header.js.map +1 -0
- package/dist/esm/lib/utils/convert-i3s-obb-to-mbs.js +9 -0
- package/dist/esm/lib/utils/convert-i3s-obb-to-mbs.js.map +1 -0
- package/dist/esm/lib/utils/customize-/321/201olors.js +98 -0
- package/dist/esm/lib/utils/customize-/321/201olors.js.map +1 -0
- package/dist/esm/lib/utils/url-utils.js +28 -0
- package/dist/esm/lib/utils/url-utils.js.map +1 -0
- package/dist/esm/types.js +18 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/workers/i3s-content-worker-node.js +5 -0
- package/dist/esm/workers/i3s-content-worker-node.js.map +1 -0
- package/dist/esm/workers/i3s-content-worker.js +4 -0
- package/dist/esm/workers/i3s-content-worker.js.map +1 -0
- package/dist/i3s-attribute-loader.d.ts +21 -0
- package/dist/i3s-attribute-loader.d.ts.map +1 -0
- package/dist/i3s-attribute-loader.js +155 -132
- package/dist/i3s-building-scene-layer-loader.d.ts +6 -0
- package/dist/i3s-building-scene-layer-loader.d.ts.map +1 -0
- package/dist/i3s-building-scene-layer-loader.js +23 -18
- package/dist/i3s-content-loader.d.ts +6 -0
- package/dist/i3s-content-loader.d.ts.map +1 -0
- package/dist/i3s-content-loader.js +29 -22
- package/dist/i3s-content-worker-node.js +197 -0
- package/dist/i3s-content-worker-node.js.map +7 -0
- package/dist/i3s-content-worker.js +2308 -1376
- package/dist/i3s-loader.d.ts +11 -0
- package/dist/i3s-loader.d.ts.map +1 -0
- package/dist/i3s-loader.js +88 -81
- package/dist/i3s-node-page-loader.d.ts +7 -0
- package/dist/i3s-node-page-loader.d.ts.map +1 -0
- package/dist/i3s-node-page-loader.js +20 -20
- package/dist/i3s-slpk-loader.d.ts +13 -0
- package/dist/i3s-slpk-loader.d.ts.map +1 -0
- package/dist/i3s-slpk-loader.js +20 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -5
- package/dist/lib/helpers/i3s-nodepages-tiles.d.ts +74 -0
- package/dist/lib/helpers/i3s-nodepages-tiles.d.ts.map +1 -0
- package/dist/lib/helpers/i3s-nodepages-tiles.js +232 -219
- package/dist/lib/parsers/constants.d.ts +40 -0
- package/dist/lib/parsers/constants.d.ts.map +1 -0
- package/dist/lib/parsers/constants.js +87 -42
- package/dist/lib/parsers/parse-arcgis-webscene.d.ts +7 -0
- package/dist/lib/parsers/parse-arcgis-webscene.d.ts.map +1 -0
- package/dist/lib/parsers/parse-arcgis-webscene.js +88 -0
- package/dist/lib/parsers/parse-i3s-attribute.d.ts +12 -0
- package/dist/lib/parsers/parse-i3s-attribute.d.ts.map +1 -0
- package/dist/lib/parsers/parse-i3s-attribute.js +87 -62
- package/dist/lib/parsers/parse-i3s-building-scene-layer.d.ts +9 -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 +41 -38
- package/dist/lib/parsers/parse-i3s-tile-content.d.ts +4 -0
- package/dist/lib/parsers/parse-i3s-tile-content.d.ts.map +1 -0
- package/dist/lib/parsers/parse-i3s-tile-content.js +460 -415
- package/dist/lib/parsers/parse-i3s.d.ts +6 -0
- package/dist/lib/parsers/parse-i3s.d.ts.map +1 -0
- package/dist/lib/parsers/parse-i3s.js +92 -73
- package/dist/lib/parsers/parse-slpk/parse-slpk.d.ts +4 -0
- package/dist/lib/parsers/parse-slpk/parse-slpk.d.ts.map +1 -0
- package/dist/lib/parsers/parse-slpk/parse-slpk.js +50 -0
- package/dist/lib/parsers/parse-slpk/slpk-archieve.d.ts +38 -0
- package/dist/lib/parsers/parse-slpk/slpk-archieve.d.ts.map +1 -0
- package/dist/lib/parsers/parse-slpk/slpk-archieve.js +142 -0
- package/dist/lib/parsers/parse-zip/cd-file-header.d.ts +38 -0
- package/dist/lib/parsers/parse-zip/cd-file-header.d.ts.map +1 -0
- package/dist/lib/parsers/parse-zip/cd-file-header.js +48 -0
- package/dist/lib/parsers/parse-zip/local-file-header.d.ts +30 -0
- package/dist/lib/parsers/parse-zip/local-file-header.d.ts.map +1 -0
- package/dist/lib/parsers/parse-zip/local-file-header.js +28 -0
- package/dist/lib/utils/convert-i3s-obb-to-mbs.d.ts +2 -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 +19 -8
- package/dist/lib/utils/customize-/321/201olors.d.ts +14 -0
- package/dist/lib/utils/customize-/321/201olors.d.ts.map +1 -0
- package/dist/lib/utils/customize-/321/201olors.js +104 -0
- package/dist/lib/utils/url-utils.d.ts +22 -0
- package/dist/lib/utils/url-utils.d.ts.map +1 -0
- package/dist/lib/utils/url-utils.js +41 -29
- package/dist/types.d.ts +1065 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +20 -2
- package/dist/workers/i3s-content-worker-node.d.ts +2 -0
- package/dist/workers/i3s-content-worker-node.d.ts.map +1 -0
- package/dist/workers/i3s-content-worker-node.js +7 -0
- package/dist/workers/i3s-content-worker.d.ts +2 -0
- package/dist/workers/i3s-content-worker.d.ts.map +1 -0
- package/dist/workers/i3s-content-worker.js +5 -4
- package/package.json +18 -16
- package/src/arcgis-webscene-loader.ts +31 -0
- package/src/i3s-attribute-loader.ts +9 -9
- package/src/i3s-content-loader.ts +17 -5
- package/src/i3s-loader.ts +24 -13
- package/src/i3s-node-page-loader.ts +6 -10
- package/src/i3s-slpk-loader.ts +27 -0
- package/src/index.ts +26 -7
- package/src/lib/helpers/i3s-nodepages-tiles.ts +84 -57
- package/src/lib/parsers/constants.ts +71 -37
- package/src/lib/parsers/parse-arcgis-webscene.ts +102 -0
- package/src/lib/parsers/parse-i3s-attribute.ts +21 -14
- package/src/lib/parsers/parse-i3s-building-scene-layer.ts +2 -1
- package/src/lib/parsers/parse-i3s-tile-content.ts +278 -194
- package/src/lib/parsers/parse-i3s.ts +55 -39
- package/src/lib/parsers/parse-slpk/parse-slpk.ts +64 -0
- package/src/lib/parsers/parse-slpk/slpk-archieve.ts +172 -0
- package/src/lib/parsers/parse-zip/cd-file-header.ts +93 -0
- package/src/lib/parsers/parse-zip/local-file-header.ts +56 -0
- package/src/lib/utils/customize-/321/201olors.ts +144 -0
- package/src/lib/utils/url-utils.ts +7 -7
- package/src/types.ts +875 -86
- package/src/workers/i3s-content-worker-node.ts +6 -0
- package/dist/bundle.js.map +0 -1
- package/dist/i3s-attribute-loader.js.map +0 -1
- package/dist/i3s-building-scene-layer-loader.js.map +0 -1
- package/dist/i3s-content-loader.js.map +0 -1
- package/dist/i3s-loader.js.map +0 -1
- package/dist/i3s-node-page-loader.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/helpers/i3s-nodepages-tiles.js.map +0 -1
- package/dist/lib/parsers/constants.js.map +0 -1
- package/dist/lib/parsers/parse-i3s-attribute.js.map +0 -1
- package/dist/lib/parsers/parse-i3s-building-scene-layer.js.map +0 -1
- package/dist/lib/parsers/parse-i3s-tile-content.js.map +0 -1
- package/dist/lib/parsers/parse-i3s.js.map +0 -1
- package/dist/lib/utils/convert-i3s-obb-to-mbs.js.map +0 -1
- package/dist/lib/utils/url-utils.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/workers/i3s-content-worker.js.map +0 -1
package/src/types.ts
CHANGED
|
@@ -1,10 +1,168 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import
|
|
1
|
+
import type {Matrix4, Quaternion, Vector3} from '@math.gl/core';
|
|
2
|
+
import type {TypedArray, MeshAttribute, TextureLevel} from '@loaders.gl/schema';
|
|
3
|
+
import {Tile3D, Tileset3D} from '@loaders.gl/tiles';
|
|
4
4
|
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export 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
|
+
export type COLOR = [number, number, number, number];
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/3DSceneLayer.cmn.md
|
|
21
|
+
*/
|
|
22
|
+
// TODO Replace "[key: string]: any" with actual defenition
|
|
23
|
+
export interface I3STilesetHeader extends SceneLayer3D {
|
|
24
|
+
/** Not in spec, but is necessary for woking */
|
|
25
|
+
url?: string;
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}
|
|
28
|
+
/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/nodePage.cmn.md */
|
|
29
|
+
export type NodePage = {
|
|
30
|
+
/** Array of nodes. */
|
|
31
|
+
nodes: NodeInPage[];
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/mesh.cmn.md
|
|
35
|
+
*/
|
|
36
|
+
type NodeMesh = {
|
|
37
|
+
/**
|
|
38
|
+
* The material definition.
|
|
39
|
+
*/
|
|
40
|
+
material: MeshMaterial;
|
|
41
|
+
/** The geometry definition. */
|
|
42
|
+
geometry: MeshGeometry;
|
|
43
|
+
/** The attribute set definition. */
|
|
44
|
+
attribute: meshAttribute;
|
|
45
|
+
};
|
|
46
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/meshMaterial.cmn.md */
|
|
47
|
+
export type MeshMaterial = {
|
|
48
|
+
/** The index in layer.materialDefinitions array. */
|
|
49
|
+
definition: number;
|
|
50
|
+
/** Resource id for the material textures. i.e: layers/0/nodes/{material.resource}/textures/{tex_name}. Is required if material declares any textures. */
|
|
51
|
+
resource?: number;
|
|
52
|
+
/** Estimated number of texel for the highest resolution base color texture. */
|
|
53
|
+
texelCountHint?: number;
|
|
54
|
+
};
|
|
55
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/meshGeometry.cmn.md */
|
|
56
|
+
export type MeshGeometry = {
|
|
57
|
+
/** The index in layer.geometryDefinitions array */
|
|
58
|
+
definition: number;
|
|
59
|
+
/** The resource locator to be used to query geometry resources: layers/0/nodes/{this.resource}/geometries/{layer.geometryDefinitions[this.definition].geometryBuffers[0 or 1]}. */
|
|
60
|
+
resource: number;
|
|
61
|
+
/** Number of vertices in the geometry buffer of this mesh for the umcompressed mesh buffer. Please note that Draco compressed meshes may have less vertices due to de-duplication (actual number of vertices is part of the Draco binary blob). Default=0 */
|
|
62
|
+
vertexCount?: number;
|
|
63
|
+
/** Number of features for this mesh. Default=0. (Must omit or set to 0 if mesh doesn't use features.) */
|
|
64
|
+
featureCount?: number;
|
|
65
|
+
};
|
|
66
|
+
/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/meshAttribute.cmn.md */
|
|
67
|
+
type meshAttribute = {
|
|
68
|
+
/** The resource identifier to be used to locate attribute resources of this mesh. i.e. layers/0/nodes/<resource id>/attributes/... */
|
|
69
|
+
resource: number;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export type I3STextureFormat = 'jpg' | 'png' | 'ktx-etc2' | 'dds' | 'ktx2';
|
|
73
|
+
|
|
74
|
+
// TODO Replace "[key: string]: any" with actual defenition
|
|
75
|
+
export type I3STileHeader = {
|
|
76
|
+
isDracoGeometry: boolean;
|
|
77
|
+
textureUrl?: string;
|
|
78
|
+
url?: string;
|
|
79
|
+
textureFormat?: I3STextureFormat;
|
|
80
|
+
textureLoaderOptions?: any;
|
|
81
|
+
materialDefinition?: I3SMaterialDefinition;
|
|
82
|
+
mbs: Mbs;
|
|
83
|
+
obb?: Obb;
|
|
84
|
+
lodSelection?: LodSelection[];
|
|
85
|
+
[key: string]: any;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export type I3SParseOptions = {
|
|
89
|
+
/** ArcGIS access token */
|
|
90
|
+
token?: string;
|
|
91
|
+
/** Is 3DSceneLayer json expected in response */
|
|
92
|
+
isTileset?: string;
|
|
93
|
+
/** Is 3DNodeIndexDocument json expected in response */
|
|
94
|
+
isTileHeader?: string;
|
|
95
|
+
/** Tile3D instance. This property used only to load tile content */
|
|
96
|
+
/** Tile-specific options */
|
|
97
|
+
_tileOptions?: I3STileOptions;
|
|
98
|
+
/** Tileset-specific options */
|
|
99
|
+
_tilesetOptions?: I3STilesetOptions;
|
|
100
|
+
/** Load Draco Compressed geometry if available */
|
|
101
|
+
useDracoGeometry?: boolean;
|
|
102
|
+
/** Load compressed textures if available */
|
|
103
|
+
useCompressedTextures?: boolean;
|
|
104
|
+
/** Set false if don't need to parse textures */
|
|
105
|
+
decodeTextures?: boolean;
|
|
106
|
+
/** deck.gl compatible coordinate system.
|
|
107
|
+
* https://github.com/visgl/deck.gl/blob/master/docs/developer-guide/coordinate-systems.md
|
|
108
|
+
* Supported coordinate systems: METER_OFFSETS, LNGLAT_OFFSETS
|
|
109
|
+
*/
|
|
110
|
+
coordinateSystem?: number;
|
|
111
|
+
colorsByAttribute?: {
|
|
112
|
+
attributeName: string;
|
|
113
|
+
minValue: number;
|
|
114
|
+
maxValue: number;
|
|
115
|
+
minColor: COLOR;
|
|
116
|
+
maxColor: COLOR;
|
|
117
|
+
mode: string;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/** @deprecated */
|
|
121
|
+
tile?: Tile3D | I3STileOptions;
|
|
122
|
+
/** Tileset3D instance. This property used only to load tile content */
|
|
123
|
+
/** @deprecated */
|
|
124
|
+
tileset?: Tileset3D | I3STilesetOptions;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export type I3STileOptions = {
|
|
128
|
+
isDracoGeometry: boolean;
|
|
129
|
+
textureUrl?: string;
|
|
130
|
+
textureFormat?: I3STextureFormat;
|
|
131
|
+
textureLoaderOptions?: any;
|
|
132
|
+
materialDefinition?: I3SMaterialDefinition;
|
|
133
|
+
attributeUrls: string[];
|
|
134
|
+
mbs: Mbs;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export type I3STilesetOptions = {
|
|
138
|
+
store: Store;
|
|
139
|
+
attributeStorageInfo: AttributeStorageInfo[];
|
|
140
|
+
fields: Field[];
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
// TODO Replace "[key: string]: any" with actual defenition
|
|
144
|
+
export type I3STileContent = {
|
|
145
|
+
attributes: I3SMeshAttributes;
|
|
146
|
+
indices: TypedArray | null;
|
|
147
|
+
featureIds: number[] | TypedArray;
|
|
148
|
+
vertexCount: number;
|
|
149
|
+
modelMatrix: Matrix4;
|
|
150
|
+
coordinateSystem: number;
|
|
151
|
+
byteLength: number;
|
|
152
|
+
texture: TileContentTexture;
|
|
153
|
+
[key: string]: any;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export type TileContentTexture =
|
|
157
|
+
| ArrayBuffer
|
|
158
|
+
| {
|
|
159
|
+
compressed: boolean;
|
|
160
|
+
mipmaps: boolean;
|
|
161
|
+
width: number;
|
|
162
|
+
height: number;
|
|
163
|
+
data: TextureLevel[];
|
|
164
|
+
}
|
|
165
|
+
| null;
|
|
8
166
|
|
|
9
167
|
export type BoundingVolumes = {
|
|
10
168
|
mbs: Mbs;
|
|
@@ -14,33 +172,154 @@ export type BoundingVolumes = {
|
|
|
14
172
|
export type Obb = {
|
|
15
173
|
center: number[] | Vector3;
|
|
16
174
|
halfSize: number[] | Vector3;
|
|
17
|
-
quaternion: Quaternion;
|
|
175
|
+
quaternion: number[] | Quaternion;
|
|
18
176
|
};
|
|
19
177
|
|
|
20
178
|
export type Mbs = [number, number, number, number];
|
|
21
179
|
|
|
22
|
-
|
|
23
|
-
// TODO Add description for each property
|
|
24
|
-
|
|
180
|
+
/** SceneLayer3D based on I3S specification - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/3DSceneLayer.cmn.md */
|
|
25
181
|
export type SceneLayer3D = {
|
|
182
|
+
/** Unique numeric ID of the layer. */
|
|
26
183
|
id: number;
|
|
184
|
+
/** The relative URL to the 3DSceneLayerResource. Only present as part of the SceneServiceInfo resource. */
|
|
27
185
|
href?: string;
|
|
28
|
-
|
|
186
|
+
/** The user-visible layer type */
|
|
187
|
+
layerType: '3DObject' | 'IntegratedMesh';
|
|
188
|
+
/** The spatialReference of the layer including the vertical coordinate reference system (CRS). Well Known Text (WKT) for CRS is included to support custom CRS. */
|
|
29
189
|
spatialReference?: SpatialReference;
|
|
190
|
+
/** Enables consuming clients to quickly determine whether this layer is compatible (with respect to its horizontal and vertical coordinate system) with existing content. */
|
|
30
191
|
heightModelInfo?: HeightModelInfo;
|
|
192
|
+
/** The ID of the last update session in which any resource belonging to this layer has been updated. */
|
|
31
193
|
version: string;
|
|
194
|
+
/** The name of this layer. */
|
|
32
195
|
name?: string;
|
|
196
|
+
/** The time of the last update. */
|
|
197
|
+
serviceUpdateTimeStamp?: {lastUpdate: number};
|
|
198
|
+
/** The display alias to be used for this layer. */
|
|
199
|
+
alias?: string;
|
|
200
|
+
/** Description string for this layer. */
|
|
201
|
+
description?: string;
|
|
202
|
+
/** Copyright and usage information for the data in this layer. */
|
|
203
|
+
copyrightText?: string;
|
|
204
|
+
/** Capabilities supported by this layer. */
|
|
33
205
|
capabilities: string[];
|
|
206
|
+
/** ZFactor to define conversion factor for elevation unit. */
|
|
207
|
+
ZFactor?: number;
|
|
208
|
+
/** Indicates if any styling information represented as drawingInfo is captured as part of the binary mesh representation. */
|
|
209
|
+
cachedDrawingInfo?: CachedDrawingInfo;
|
|
210
|
+
/** An object containing drawing information. */
|
|
211
|
+
drawingInfo?: DrawingInfo;
|
|
212
|
+
/** An object containing elevation drawing information. If absent, any content of the scene layer is drawn at its z coordinate. */
|
|
213
|
+
elevationInfo?: ElevationInfo;
|
|
214
|
+
/** PopupInfo of the scene layer. */
|
|
215
|
+
popupInfo?: PopupInfo;
|
|
216
|
+
/** Indicates if client application will show the popup information. Default is FALSE. */
|
|
217
|
+
disablePopup: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* The store object describes the exact physical storage of a layer and
|
|
220
|
+
* enables the client to detect when multiple layers are served from
|
|
221
|
+
* the same store.
|
|
222
|
+
*/
|
|
34
223
|
store: Store;
|
|
35
|
-
|
|
36
|
-
materialDefinitions?: GLTFMaterial[];
|
|
37
|
-
textureSetDefinitions?: TextureSetDefinition[];
|
|
38
|
-
geometryDefinitions?: GeometryDefinitions;
|
|
39
|
-
attributeStorageInfo?: AttributeStorageInfo[];
|
|
224
|
+
/** A collection of objects that describe each attribute field regarding its field name, datatype, and a user friendly name {name,type,alias}. */
|
|
40
225
|
fields?: Field[];
|
|
41
|
-
|
|
226
|
+
/** Provides the schema and layout used for storing attribute content in binary format in I3S. */
|
|
227
|
+
attributeStorageInfo?: AttributeStorageInfo[];
|
|
228
|
+
/** Contains the statistical information for a layer. */
|
|
229
|
+
statisticsInfo?: StatisticsInfo[];
|
|
230
|
+
/** The paged-access index description. */
|
|
231
|
+
nodePages?: NodePageDefinition;
|
|
232
|
+
/** List of materials classes used in this layer. */
|
|
233
|
+
materialDefinitions?: I3SMaterialDefinition[];
|
|
234
|
+
/** Defines the set of textures that can be referenced by meshes. */
|
|
235
|
+
textureSetDefinitions?: TextureSetDefinition[];
|
|
236
|
+
/** Define the layouts of mesh geometry and its attributes */
|
|
237
|
+
geometryDefinitions?: GeometryDefinition[];
|
|
238
|
+
/** 3D extent. */
|
|
239
|
+
fullExtent?: FullExtent;
|
|
42
240
|
};
|
|
43
|
-
|
|
241
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/cachedDrawingInfo.cmn.md */
|
|
242
|
+
export type CachedDrawingInfo = {
|
|
243
|
+
/** If true, the drawingInfo is captured as part of the binary scene layer representation. */
|
|
244
|
+
color: boolean;
|
|
245
|
+
};
|
|
246
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/drawingInfo.cmn.md */
|
|
247
|
+
export type DrawingInfo = {
|
|
248
|
+
/** An object defining the symbology for the layer. See more information about supported renderer types in ArcGIS clients. */
|
|
249
|
+
renderer: any;
|
|
250
|
+
/** Scale symbols for the layer. */
|
|
251
|
+
scaleSymbols: boolean;
|
|
252
|
+
};
|
|
253
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/elevationInfo.cmn.md */
|
|
254
|
+
export type ElevationInfo = {
|
|
255
|
+
mode: 'relativeToGround' | 'absoluteHeight' | 'onTheGround' | 'relativeToScene';
|
|
256
|
+
/** Offset is always added to the result of the above logic except for onTheGround where offset is ignored. */
|
|
257
|
+
offset: number;
|
|
258
|
+
/** A string value indicating the unit for the values in elevationInfo */
|
|
259
|
+
unit: string;
|
|
260
|
+
};
|
|
261
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/statisticsInfo.cmn.md */
|
|
262
|
+
export type StatisticsInfo = {
|
|
263
|
+
/** Key indicating the resource of the statistics. */
|
|
264
|
+
key: string;
|
|
265
|
+
/** Name of the field of the statistical information. */
|
|
266
|
+
name: string;
|
|
267
|
+
/** The URL to the statistics information. */
|
|
268
|
+
href: string;
|
|
269
|
+
};
|
|
270
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/nodePageDefinition.cmn.md */
|
|
271
|
+
export type NodePageDefinition = {
|
|
272
|
+
/** Number of nodes per page for this layer. Must be a power-of-two less than 4096 */
|
|
273
|
+
nodesPerPage: number;
|
|
274
|
+
/** Index of the root node. Default = 0. */
|
|
275
|
+
rootIndex?: number;
|
|
276
|
+
/** Defines the meaning of nodes[].lodThreshold for this layer. */
|
|
277
|
+
lodSelectionMetricType: 'maxScreenThresholdSQ';
|
|
278
|
+
};
|
|
279
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialDefinitions.cmn.md */
|
|
280
|
+
export type I3SMaterialDefinition = {
|
|
281
|
+
/** A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology. When not specified, all the default values of pbrMetallicRoughness apply. */
|
|
282
|
+
pbrMetallicRoughness: I3SPbrMetallicRoughness;
|
|
283
|
+
/** The normal texture map. */
|
|
284
|
+
normalTexture?: I3SMaterialTexture;
|
|
285
|
+
/** The occlusion texture map. */
|
|
286
|
+
occlusionTexture?: I3SMaterialTexture;
|
|
287
|
+
/** The emissive texture map. */
|
|
288
|
+
emissiveTexture?: I3SMaterialTexture;
|
|
289
|
+
/** The emissive color of the material. */
|
|
290
|
+
emissiveFactor?: [number, number, number];
|
|
291
|
+
/** Defines the meaning of the alpha-channel/alpha-mask. */
|
|
292
|
+
alphaMode: 'opaque' | 'mask' | 'blend';
|
|
293
|
+
/** The alpha cutoff value of the material. */
|
|
294
|
+
alphaCutoff?: number;
|
|
295
|
+
/** Specifies whether the material is double sided. */
|
|
296
|
+
doubleSided?: boolean;
|
|
297
|
+
/** Winding order is counterclockwise. */
|
|
298
|
+
cullFace?: 'none' | 'front' | 'back';
|
|
299
|
+
};
|
|
300
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/pbrMetallicRoughness.cmn.md */
|
|
301
|
+
export type I3SPbrMetallicRoughness = {
|
|
302
|
+
/** The material's base color factor. default=[1,1,1,1] */
|
|
303
|
+
baseColorFactor?: [number, number, number, number];
|
|
304
|
+
/** The base color texture. */
|
|
305
|
+
baseColorTexture?: I3SMaterialTexture;
|
|
306
|
+
/** the metalness of the material. default=1.0 */
|
|
307
|
+
metallicFactor: number;
|
|
308
|
+
/** the roughness of the material. default=1.0 */
|
|
309
|
+
roughnessFactor: number;
|
|
310
|
+
/** the metallic-roughness texture. */
|
|
311
|
+
metallicRoughnessTexture?: I3SMaterialTexture;
|
|
312
|
+
};
|
|
313
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialTexture.cmn.md */
|
|
314
|
+
export type I3SMaterialTexture = {
|
|
315
|
+
/** The index in layer.textureSetDefinitions. */
|
|
316
|
+
textureSetDefinitionId: number;
|
|
317
|
+
/** The set index of texture's TEXCOORD attribute used for texture coordinate mapping. Default is 0. Deprecated. */
|
|
318
|
+
texCoord?: number;
|
|
319
|
+
/** The normal texture: scalar multiplier applied to each normal vector of the normal texture. For occlusion texture,scalar multiplier controlling the amount of occlusion applied. Default=1 */
|
|
320
|
+
factor?: number;
|
|
321
|
+
};
|
|
322
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/attributeStorageInfo.cmn.md */
|
|
44
323
|
export type AttributeStorageInfo = {
|
|
45
324
|
key: string;
|
|
46
325
|
name: string;
|
|
@@ -51,6 +330,7 @@ export type AttributeStorageInfo = {
|
|
|
51
330
|
objectIds?: AttributeValue;
|
|
52
331
|
};
|
|
53
332
|
|
|
333
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/field.cmn.md */
|
|
54
334
|
export type Field = {
|
|
55
335
|
name: string;
|
|
56
336
|
type: ESRIField;
|
|
@@ -69,6 +349,7 @@ export type ESRIField =
|
|
|
69
349
|
| 'esriFieldTypeSmallInteger'
|
|
70
350
|
| 'esriFieldTypeString';
|
|
71
351
|
|
|
352
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/popupInfo.cmn.md */
|
|
72
353
|
export type PopupInfo = {
|
|
73
354
|
title?: string;
|
|
74
355
|
description?: string;
|
|
@@ -78,15 +359,16 @@ export type PopupInfo = {
|
|
|
78
359
|
popupElements?: {text?: string; type?: string; fieldInfos?: FieldInfo[]}[];
|
|
79
360
|
};
|
|
80
361
|
|
|
81
|
-
|
|
362
|
+
/**
|
|
363
|
+
* Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.7/3DNodeIndexDocument.cmn.md
|
|
364
|
+
*/
|
|
82
365
|
export type Node3DIndexDocument = {
|
|
83
366
|
id: string;
|
|
84
367
|
version?: string;
|
|
85
|
-
path?: string;
|
|
86
368
|
level?: number;
|
|
87
369
|
mbs?: Mbs;
|
|
88
370
|
obb?: Obb;
|
|
89
|
-
lodSelection?: LodSelection;
|
|
371
|
+
lodSelection?: LodSelection[];
|
|
90
372
|
children?: NodeReference[];
|
|
91
373
|
neighbors?: NodeReference[];
|
|
92
374
|
parentNode?: NodeReference;
|
|
@@ -99,6 +381,26 @@ export type Node3DIndexDocument = {
|
|
|
99
381
|
expires?: string;
|
|
100
382
|
};
|
|
101
383
|
|
|
384
|
+
/**
|
|
385
|
+
* Minimal I3S node data is needed for loading
|
|
386
|
+
*/
|
|
387
|
+
export type I3SMinimalNodeData = {
|
|
388
|
+
id: string;
|
|
389
|
+
url?: string;
|
|
390
|
+
transform?: number[];
|
|
391
|
+
lodSelection?: LodSelection[];
|
|
392
|
+
obb?: Obb;
|
|
393
|
+
mbs?: Mbs;
|
|
394
|
+
contentUrl?: string;
|
|
395
|
+
textureUrl?: string;
|
|
396
|
+
attributeUrls?: string[];
|
|
397
|
+
materialDefinition?: I3SMaterialDefinition;
|
|
398
|
+
textureFormat?: I3STextureFormat;
|
|
399
|
+
textureLoaderOptions?: {[key: string]: any};
|
|
400
|
+
children?: NodeReference[];
|
|
401
|
+
isDracoGeometry: boolean;
|
|
402
|
+
};
|
|
403
|
+
|
|
102
404
|
export type LodSelection = {
|
|
103
405
|
metricType?: string;
|
|
104
406
|
maxError: number;
|
|
@@ -122,58 +424,125 @@ export type Resource = {
|
|
|
122
424
|
nodePath?: string;
|
|
123
425
|
};
|
|
124
426
|
|
|
125
|
-
export type I3SGeometry = {
|
|
126
|
-
geometry: ArrayBuffer | null;
|
|
127
|
-
compressedGeometry?: ArrayBuffer | null;
|
|
128
|
-
texture: any | null;
|
|
129
|
-
sharedResources: SharedResources | null;
|
|
130
|
-
meshMaterial?: GLTFMaterial | null;
|
|
131
|
-
vertexCount: number | null;
|
|
132
|
-
attributes: any | null;
|
|
133
|
-
featureCount: number | null;
|
|
134
|
-
geometryBuffer?: ArrayBuffer;
|
|
135
|
-
};
|
|
136
|
-
|
|
137
427
|
export type MaxScreenThresholdSQ = {
|
|
138
428
|
maxError: number;
|
|
139
429
|
};
|
|
140
430
|
|
|
431
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/node.cmn.md */
|
|
141
432
|
export type NodeInPage = {
|
|
142
|
-
|
|
143
|
-
|
|
433
|
+
/**
|
|
434
|
+
* The index in the node array. May be different than material, geometry and attribute resource id. See mesh for more information.
|
|
435
|
+
*/
|
|
436
|
+
index: number;
|
|
437
|
+
/**
|
|
438
|
+
* The index of the parent node in the node array.
|
|
439
|
+
*/
|
|
440
|
+
parentIndex?: number;
|
|
441
|
+
/**
|
|
442
|
+
* When to switch LoD. See https://github.com/Esri/i3s-spec/blob/master/docs/1.8/nodePageDefinition.cmn.md for more information.
|
|
443
|
+
*/
|
|
444
|
+
lodThreshold?: number;
|
|
445
|
+
/**
|
|
446
|
+
* Oriented bounding box for this node.
|
|
447
|
+
*/
|
|
144
448
|
obb: Obb;
|
|
145
|
-
|
|
146
|
-
|
|
449
|
+
/**
|
|
450
|
+
* index of the children nodes indices.
|
|
451
|
+
*/
|
|
452
|
+
children?: number[];
|
|
453
|
+
/**
|
|
454
|
+
* The mesh for this node. WARNING: only SINGLE mesh is supported at version 1.7 (i.e. length must be 0 or 1).
|
|
455
|
+
*/
|
|
456
|
+
mesh?: NodeMesh;
|
|
147
457
|
};
|
|
148
458
|
|
|
459
|
+
/**
|
|
460
|
+
* https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialDefinitionInfo.cmn.md
|
|
461
|
+
*/
|
|
462
|
+
export type MaterialDefinitionInfo = {
|
|
463
|
+
/** A name for the material as assigned in the creating application. */
|
|
464
|
+
name?: string;
|
|
465
|
+
/** Indicates the material type, chosen from the supported values. */
|
|
466
|
+
type?: 'standard' | 'water' | 'billboard' | 'leafcard' | 'reference';
|
|
467
|
+
/** The href that resolves to the shared resource bundle in which the material definition is contained. */
|
|
468
|
+
$ref?: string;
|
|
469
|
+
/** Parameter defined for the material.
|
|
470
|
+
* https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialParams.cmn.md
|
|
471
|
+
*/
|
|
472
|
+
params: {
|
|
473
|
+
/** Indicates transparency of this material; 0 = opaque, 1 = fully transparent. */
|
|
474
|
+
transparency?: number;
|
|
475
|
+
/** Indicates reflectivity of this material. */
|
|
476
|
+
reflectivity?: number;
|
|
477
|
+
/** Indicates shininess of this material. */
|
|
478
|
+
shininess?: number;
|
|
479
|
+
/** Ambient color of this material. Ambient color is the color of an object where it is in shadow.
|
|
480
|
+
* This color is what the object reflects when illuminated by ambient light rather than direct light. */
|
|
481
|
+
ambient?: number[];
|
|
482
|
+
/** Diffuse color of this material. Diffuse color is the most instinctive meaning of the color of an object.
|
|
483
|
+
* It is that essential color that the object reveals under pure white light. It is perceived as the color
|
|
484
|
+
* of the object itself rather than a reflection of the light. */
|
|
485
|
+
diffuse?: number[];
|
|
486
|
+
/** Specular color of this material. Specular color is the color of the light of a specular reflection
|
|
487
|
+
* (specular reflection is the type of reflection that is characteristic of light reflected from a shiny
|
|
488
|
+
* surface). */
|
|
489
|
+
specular?: number[];
|
|
490
|
+
/** Rendering mode. */
|
|
491
|
+
renderMode: 'textured' | 'solid' | 'untextured' | 'wireframe';
|
|
492
|
+
/** TRUE if features with this material should cast shadows. */
|
|
493
|
+
castShadows?: boolean;
|
|
494
|
+
/** TRUE if features with this material should receive shadows */
|
|
495
|
+
receiveShadows?: boolean;
|
|
496
|
+
/** Indicates the material culling options {back, front, none}. */
|
|
497
|
+
cullFace?: string;
|
|
498
|
+
/** This flag indicates that the vertex color attribute of the geometry should be used to color the geometry
|
|
499
|
+
* for rendering. If texture is present, the vertex colors are multiplied by this color.
|
|
500
|
+
* e.g. pixel_color = [interpolated]vertex_color * texel_color. Default is false. */
|
|
501
|
+
vertexColors?: boolean;
|
|
502
|
+
/** This flag indicates that the geometry has uv region vertex attributes. These are used for adressing
|
|
503
|
+
* subtextures in a texture atlas. The uv coordinates are relative to this subtexture in this case.
|
|
504
|
+
* This is mostly useful for repeated textures in a texture atlas. Default is false. */
|
|
505
|
+
vertexRegions?: boolean;
|
|
506
|
+
/** Indicates whether Vertex Colors also contain a transparency channel. Default is false. */
|
|
507
|
+
useVertexColorAlpha?: boolean;
|
|
508
|
+
};
|
|
509
|
+
};
|
|
510
|
+
|
|
511
|
+
/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/sharedResource.cmn.md */
|
|
149
512
|
export type SharedResources = {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
513
|
+
/** Materials describe how a Feature or a set of Features is to be rendered. */
|
|
514
|
+
materialDefinitions?: {[key: string]: MaterialDefinitionInfo};
|
|
515
|
+
/** A Texture is a set of images, with some parameters specific to the texture/uv mapping to geometries. */
|
|
516
|
+
textureDefinitions?: {[key: string]: TextureDefinitionInfo};
|
|
153
517
|
};
|
|
154
518
|
|
|
155
|
-
|
|
519
|
+
/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/image.cmn.md */
|
|
520
|
+
type TextureImage = {
|
|
521
|
+
/** A unique ID for each image. Generated using the BuildID function. */
|
|
156
522
|
id: string;
|
|
523
|
+
/** width of this image, in pixels. */
|
|
157
524
|
size?: number;
|
|
525
|
+
/** The maximum size of a single pixel in world units.
|
|
526
|
+
* This property is used by the client to pick the image to load and render. */
|
|
158
527
|
pixelInWorldUnits?: number;
|
|
528
|
+
/** The href to the image(s), one per encoding, in the same order as the encodings. */
|
|
159
529
|
href?: string[];
|
|
530
|
+
/** The byte offset of this image's encodings. There is one per encoding,
|
|
531
|
+
* in the same order as the encodings, in the block in which this texture image resides. */
|
|
160
532
|
byteOffset?: string[];
|
|
533
|
+
/** The length in bytes of this image's encodings. There is one per encoding,
|
|
534
|
+
* in the same order as the encodings. */
|
|
161
535
|
length?: number[];
|
|
162
|
-
mimeType?: string;
|
|
163
|
-
bufferView?: {
|
|
164
|
-
data: ArrayBuffer;
|
|
165
|
-
};
|
|
166
|
-
image?: {
|
|
167
|
-
height: number;
|
|
168
|
-
width: number;
|
|
169
|
-
};
|
|
170
536
|
};
|
|
171
537
|
|
|
172
538
|
export type Attribute = 'OBJECTID' | 'string' | 'double' | 'Int32' | string;
|
|
173
539
|
|
|
174
540
|
export type Extent = [number, number, number, number];
|
|
175
541
|
|
|
176
|
-
export type FeatureAttribute = {
|
|
542
|
+
export type FeatureAttribute = {
|
|
543
|
+
id: AttributeValue;
|
|
544
|
+
faceRange: AttributeValue;
|
|
545
|
+
};
|
|
177
546
|
|
|
178
547
|
export type BuildingSceneLayerTileset = {
|
|
179
548
|
header: BuildingSceneLayer;
|
|
@@ -257,33 +626,56 @@ type FilterModeWireFrame = {
|
|
|
257
626
|
edges: Edges;
|
|
258
627
|
};
|
|
259
628
|
|
|
260
|
-
|
|
261
|
-
|
|
629
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/spatialReference.cmn.md */
|
|
630
|
+
export type SpatialReference = {
|
|
631
|
+
/** The current WKID value of the vertical coordinate system. */
|
|
632
|
+
latestVcsWkid: number;
|
|
633
|
+
/** dentifies the current WKID value associated with the same spatial reference. */
|
|
262
634
|
latestWkid: number;
|
|
635
|
+
/** The WKID value of the vertical coordinate system. */
|
|
263
636
|
vcsWkid: number;
|
|
264
|
-
|
|
637
|
+
/** WKID, or Well-Known ID, of the CRS. Specify either WKID or WKT of the CRS. */
|
|
638
|
+
wkid: number;
|
|
639
|
+
/** WKT, or Well-Known Text, of the CRS. Specify either WKT or WKID of the CRS but not both. */
|
|
265
640
|
wkt?: string;
|
|
266
641
|
};
|
|
267
642
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
643
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/fullExtent.cmn.md */
|
|
644
|
+
export type FullExtent = {
|
|
645
|
+
/** left longitude in decimal degrees */
|
|
646
|
+
xmin: number;
|
|
647
|
+
/** right longitude in decimal degrees */
|
|
648
|
+
xmax: number;
|
|
649
|
+
/** bottom latitude in decimal degrees*/
|
|
650
|
+
ymin: number;
|
|
651
|
+
/** top latitude in decimal degrees*/
|
|
652
|
+
ymax: number;
|
|
653
|
+
/** lowest elevation in meters */
|
|
654
|
+
zmin: number;
|
|
655
|
+
/** highest elevation in meters */
|
|
656
|
+
zmax: number;
|
|
275
657
|
spatialReference?: SpatialReference;
|
|
276
658
|
};
|
|
277
659
|
|
|
278
|
-
|
|
279
|
-
|
|
660
|
+
/**
|
|
661
|
+
* https://github.com/Esri/i3s-spec/blob/master/docs/1.8/textureDefinitionInfo.cmn.md
|
|
662
|
+
*/
|
|
663
|
+
export type TextureDefinitionInfo = {
|
|
664
|
+
/** MIMEtype - The encoding/content type that is used by all images in this map */
|
|
665
|
+
encoding?: string[];
|
|
666
|
+
/** UV wrapping modes, from {none, repeat, mirror}. */
|
|
280
667
|
wrap?: string[];
|
|
668
|
+
/** TRUE if the Map represents a texture atlas. */
|
|
281
669
|
atlas?: boolean;
|
|
670
|
+
/** The name of the UV set to be used as texture coordinates. */
|
|
282
671
|
uvSet?: string;
|
|
672
|
+
/** Indicates channels description. */
|
|
283
673
|
channels?: 'rbg' | 'rgba' | string;
|
|
674
|
+
/** An image is a binary resource, containing a single raster that can be used to texture a feature or symbol. */
|
|
284
675
|
images: TextureImage[];
|
|
285
676
|
};
|
|
286
677
|
|
|
678
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/domain.cmn.md */
|
|
287
679
|
type Domain = {
|
|
288
680
|
type: string;
|
|
289
681
|
name: string;
|
|
@@ -294,7 +686,9 @@ type Domain = {
|
|
|
294
686
|
mergePolicy?: string;
|
|
295
687
|
splitPolicy?: string;
|
|
296
688
|
};
|
|
297
|
-
|
|
689
|
+
/**
|
|
690
|
+
* spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/store.cmn.md
|
|
691
|
+
*/
|
|
298
692
|
type Store = {
|
|
299
693
|
id: string | number;
|
|
300
694
|
profile: string;
|
|
@@ -311,41 +705,109 @@ type Store = {
|
|
|
311
705
|
lodModel: string;
|
|
312
706
|
defaultGeometrySchema: DefaultGeometrySchema;
|
|
313
707
|
};
|
|
314
|
-
|
|
708
|
+
/**
|
|
709
|
+
* Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/defaultGeometrySchema.cmn.md
|
|
710
|
+
*/
|
|
315
711
|
type DefaultGeometrySchema = {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
712
|
+
geometryType?: 'triangles';
|
|
713
|
+
topology: 'PerAttributeArray' | 'Indexed';
|
|
714
|
+
header: HeaderAttribute[];
|
|
715
|
+
ordering: string[];
|
|
716
|
+
vertexAttributes: VertexAttribute;
|
|
717
|
+
faces?: VertexAttribute;
|
|
718
|
+
featureAttributeOrder: string[];
|
|
719
|
+
featureAttributes: FeatureAttribute;
|
|
720
|
+
// TODO Do we realy need this Property?
|
|
721
|
+
attributesOrder?: string[];
|
|
722
|
+
};
|
|
723
|
+
/**
|
|
724
|
+
* spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/headerAttribute.cmn.md
|
|
725
|
+
*/
|
|
726
|
+
export type HeaderAttribute = {
|
|
727
|
+
property: HeaderAttributeProperty.vertexCount | HeaderAttributeProperty.featureCount | string;
|
|
728
|
+
type:
|
|
729
|
+
| DATA_TYPE.UInt8
|
|
730
|
+
| DATA_TYPE.UInt16
|
|
731
|
+
| DATA_TYPE.UInt32
|
|
732
|
+
| DATA_TYPE.UInt64
|
|
733
|
+
| DATA_TYPE.Int16
|
|
734
|
+
| DATA_TYPE.Int32
|
|
735
|
+
| DATA_TYPE.Int64
|
|
736
|
+
| DATA_TYPE.Float32
|
|
737
|
+
| DATA_TYPE.Float64;
|
|
738
|
+
};
|
|
739
|
+
export enum HeaderAttributeProperty {
|
|
740
|
+
vertexCount = 'vertexCount',
|
|
741
|
+
featureCount = 'featureCount'
|
|
742
|
+
}
|
|
743
|
+
export type VertexAttribute = {
|
|
744
|
+
position: GeometryAttribute;
|
|
745
|
+
normal: GeometryAttribute;
|
|
746
|
+
uv0: GeometryAttribute;
|
|
747
|
+
color: GeometryAttribute;
|
|
748
|
+
region?: GeometryAttribute;
|
|
749
|
+
};
|
|
750
|
+
export type GeometryAttribute = {
|
|
751
|
+
byteOffset?: number;
|
|
752
|
+
valueType:
|
|
753
|
+
| DATA_TYPE.UInt8
|
|
754
|
+
| DATA_TYPE.UInt16
|
|
755
|
+
| DATA_TYPE.Int16
|
|
756
|
+
| DATA_TYPE.Int32
|
|
757
|
+
| DATA_TYPE.Int64
|
|
758
|
+
| DATA_TYPE.Float32
|
|
759
|
+
| DATA_TYPE.Float64;
|
|
760
|
+
valuesPerElement: number;
|
|
761
|
+
};
|
|
762
|
+
export type I3SMeshAttributes = {
|
|
763
|
+
[key: string]: I3SMeshAttribute;
|
|
764
|
+
};
|
|
765
|
+
export interface I3SMeshAttribute extends MeshAttribute {
|
|
766
|
+
type?: number;
|
|
767
|
+
metadata?: any;
|
|
768
|
+
}
|
|
769
|
+
/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/heightModelInfo.cmn.md */
|
|
328
770
|
type HeightModelInfo = {
|
|
329
|
-
heightModel:
|
|
771
|
+
heightModel: 'gravity_related_height' | 'ellipsoidal';
|
|
330
772
|
vertCRS: string;
|
|
331
|
-
heightUnit:
|
|
773
|
+
heightUnit:
|
|
774
|
+
| 'meter'
|
|
775
|
+
| 'us-foot'
|
|
776
|
+
| 'foot'
|
|
777
|
+
| 'clarke-foot'
|
|
778
|
+
| 'clarke-yard'
|
|
779
|
+
| 'clarke-link'
|
|
780
|
+
| 'sears-yard'
|
|
781
|
+
| 'sears-foot'
|
|
782
|
+
| 'sears-chain'
|
|
783
|
+
| 'benoit-1895-b-chain'
|
|
784
|
+
| 'indian-yard'
|
|
785
|
+
| 'indian-1937-yard'
|
|
786
|
+
| 'gold-coast-foot'
|
|
787
|
+
| 'sears-1922-truncated-chain'
|
|
788
|
+
| 'us-inch'
|
|
789
|
+
| 'us-mile'
|
|
790
|
+
| 'us-yard'
|
|
791
|
+
| 'millimeter'
|
|
792
|
+
| 'decimeter'
|
|
793
|
+
| 'centimeter'
|
|
794
|
+
| 'kilometer';
|
|
332
795
|
};
|
|
333
796
|
|
|
334
|
-
type
|
|
335
|
-
nodesPerPage: number;
|
|
336
|
-
lodSelectionMetricType: string;
|
|
337
|
-
};
|
|
797
|
+
export type TextureSetDefinitionFormats = {name: string; format: I3STextureFormat}[];
|
|
338
798
|
|
|
799
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/textureSetDefinition.cmn.md */
|
|
339
800
|
type TextureSetDefinition = {
|
|
340
|
-
formats:
|
|
801
|
+
formats: TextureSetDefinitionFormats;
|
|
341
802
|
atlas?: boolean;
|
|
342
803
|
};
|
|
343
804
|
|
|
344
|
-
|
|
805
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/geometryDefinition.cmn.md */
|
|
806
|
+
type GeometryDefinition = {
|
|
345
807
|
topology: 'triangle' | string;
|
|
346
808
|
geometryBuffers: GeometryBuffer[];
|
|
347
809
|
};
|
|
348
|
-
|
|
810
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/geometryBuffer.cmn.md */
|
|
349
811
|
type GeometryBuffer = {
|
|
350
812
|
offset?: number;
|
|
351
813
|
position?: GeometryBufferItem;
|
|
@@ -362,9 +824,336 @@ type GeometryBufferItem = {type: string; component: number; encoding?: string; b
|
|
|
362
824
|
|
|
363
825
|
type AttributeValue = {valueType: string; encoding?: string; valuesPerElement?: number};
|
|
364
826
|
|
|
365
|
-
type FieldInfo = {
|
|
827
|
+
export type FieldInfo = {
|
|
366
828
|
fieldName: string;
|
|
367
829
|
visible: boolean;
|
|
368
830
|
isEditable: boolean;
|
|
369
831
|
label: string;
|
|
370
832
|
};
|
|
833
|
+
|
|
834
|
+
export type ArcGisWebSceneData = {
|
|
835
|
+
header: ArcGisWebScene;
|
|
836
|
+
layers: OperationalLayer[];
|
|
837
|
+
unsupportedLayers: OperationalLayer[];
|
|
838
|
+
};
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* ArcGis WebScene spec - https://developers.arcgis.com/web-scene-specification/objects/webscene/
|
|
842
|
+
*/
|
|
843
|
+
export type ArcGisWebScene = {
|
|
844
|
+
/**
|
|
845
|
+
* @todo add type.
|
|
846
|
+
* Spec - https://developers.arcgis.com/web-scene-specification/objects/applicationProperties/
|
|
847
|
+
* Configuration of application and UI elements.
|
|
848
|
+
*/
|
|
849
|
+
applicationProperties?: any;
|
|
850
|
+
/**
|
|
851
|
+
* Operational layers contain business data which are used to make thematic scenes.
|
|
852
|
+
*/
|
|
853
|
+
operationalLayers: OperationalLayer[];
|
|
854
|
+
/**
|
|
855
|
+
* Basemaps give the web scene a geographic context.
|
|
856
|
+
*/
|
|
857
|
+
baseMap: BaseMap;
|
|
858
|
+
/**
|
|
859
|
+
* Ground defines the main surface of the web scene, based on elevation layers.
|
|
860
|
+
*/
|
|
861
|
+
ground: Ground;
|
|
862
|
+
/**
|
|
863
|
+
* An object that defines the characteristics of the vertical coordinate system used by the web scene.
|
|
864
|
+
*/
|
|
865
|
+
heightModelInfo: HeightModelInfo;
|
|
866
|
+
/**
|
|
867
|
+
* Root element in the web scene specifying a string value indicating the web scene version.
|
|
868
|
+
* Valid values: 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, 1.21, 1.22, 1.23, 1.24, 1.25, 1.26, 1.27
|
|
869
|
+
*/
|
|
870
|
+
version: string;
|
|
871
|
+
/**
|
|
872
|
+
* String value indicating the application which authored the webmap
|
|
873
|
+
*/
|
|
874
|
+
authoringApp: string;
|
|
875
|
+
/**
|
|
876
|
+
* String value indicating the authoring App's version number.
|
|
877
|
+
*/
|
|
878
|
+
authoringAppVersion: string;
|
|
879
|
+
/**
|
|
880
|
+
* A presentation consists of multiple slides, where each slide is a specific view into the web scene.
|
|
881
|
+
* Spec - https://developers.arcgis.com/web-scene-specification/objects/presentation/
|
|
882
|
+
* @todo Add presentation type.
|
|
883
|
+
*/
|
|
884
|
+
presentation: ArcGisPresentation;
|
|
885
|
+
/**
|
|
886
|
+
* An object that provides information about the initial environment settings and viewpoint of the web scene.
|
|
887
|
+
*/
|
|
888
|
+
initialState: InitialState;
|
|
889
|
+
/**
|
|
890
|
+
* An object used to specify the spatial reference of the given geometry.
|
|
891
|
+
*/
|
|
892
|
+
spatialReference: SpatialReference;
|
|
893
|
+
viewingMode: 'global' | 'local';
|
|
894
|
+
/**
|
|
895
|
+
* @todo add type.
|
|
896
|
+
* Defines area to be clipped for display.
|
|
897
|
+
*/
|
|
898
|
+
clippingArea?: any;
|
|
899
|
+
/**
|
|
900
|
+
* @todo add type.
|
|
901
|
+
* Spec - https://developers.arcgis.com/web-scene-specification/objects/mapFloorInfo/
|
|
902
|
+
* Contains floor-awareness information for the web scene.
|
|
903
|
+
*/
|
|
904
|
+
mapFloorInfo?: any;
|
|
905
|
+
/**
|
|
906
|
+
* @todo add type.
|
|
907
|
+
* Spec - https://developers.arcgis.com/web-scene-specification/objects/mapRangeInfo/
|
|
908
|
+
* Map Range Information
|
|
909
|
+
*/
|
|
910
|
+
mapRangeInfo?: any;
|
|
911
|
+
/**
|
|
912
|
+
* @todo add type.
|
|
913
|
+
* Spec - https://developers.arcgis.com/web-scene-specification/objects/table/
|
|
914
|
+
* An array of table objects.
|
|
915
|
+
*/
|
|
916
|
+
tables?: any;
|
|
917
|
+
/**
|
|
918
|
+
* @todo add type.
|
|
919
|
+
* Spec - https://developers.arcgis.com/web-scene-specification/objects/transportationNetwork/
|
|
920
|
+
* Used to specify the transportation networks of the scene.
|
|
921
|
+
*/
|
|
922
|
+
transportationNetworks?: any;
|
|
923
|
+
/**
|
|
924
|
+
* @todo add type.
|
|
925
|
+
* Spec - https://developers.arcgis.com/web-scene-specification/objects/widgets/
|
|
926
|
+
* The widgets object contains widgets that should be exposed to the user.
|
|
927
|
+
*/
|
|
928
|
+
widgets?: any;
|
|
929
|
+
};
|
|
930
|
+
|
|
931
|
+
/**
|
|
932
|
+
* Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Presentation.html
|
|
933
|
+
*/
|
|
934
|
+
type ArcGisPresentation = {
|
|
935
|
+
slides: Slide[];
|
|
936
|
+
};
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* A slide stores a snapshot of several pre-set properties of the WebScene and SceneView,
|
|
940
|
+
* such as the basemap, viewpoint and visible layers.
|
|
941
|
+
* Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html
|
|
942
|
+
*/
|
|
943
|
+
type Slide = {
|
|
944
|
+
id: string;
|
|
945
|
+
title: {
|
|
946
|
+
text: string;
|
|
947
|
+
};
|
|
948
|
+
thumbnail: {
|
|
949
|
+
url: string;
|
|
950
|
+
};
|
|
951
|
+
description: {
|
|
952
|
+
text: string;
|
|
953
|
+
};
|
|
954
|
+
ground: {
|
|
955
|
+
transparency: number;
|
|
956
|
+
};
|
|
957
|
+
baseMap: ArcGisBaseMap;
|
|
958
|
+
visibleLayers: ArcGisVisibleLayer[];
|
|
959
|
+
viewpoint: ArcGisViewPoint;
|
|
960
|
+
};
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* The basemap of the scene. Only the base and reference layers of the basemap are stored in a slide.
|
|
964
|
+
* Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html
|
|
965
|
+
*/
|
|
966
|
+
type ArcGisBaseMap = {
|
|
967
|
+
id: string;
|
|
968
|
+
title: string;
|
|
969
|
+
baseMapLayers: ArcGisBaseMapLayer[];
|
|
970
|
+
};
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* The visible layers of the scene.
|
|
974
|
+
* Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#visibleLayers
|
|
975
|
+
*/
|
|
976
|
+
type ArcGisVisibleLayer = {
|
|
977
|
+
id: string;
|
|
978
|
+
sublayerIds: number[];
|
|
979
|
+
};
|
|
980
|
+
/**
|
|
981
|
+
* The basemap of the scene.
|
|
982
|
+
* Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html
|
|
983
|
+
*/
|
|
984
|
+
type ArcGisBaseMapLayer = {
|
|
985
|
+
id: string;
|
|
986
|
+
title: string;
|
|
987
|
+
url: string;
|
|
988
|
+
layerType: string;
|
|
989
|
+
visibility: boolean;
|
|
990
|
+
};
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* The viewpoint of the slide. This acts like a bookmark, saving a predefined location or point of view from which to view the scene.
|
|
994
|
+
* Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html
|
|
995
|
+
*/
|
|
996
|
+
type ArcGisViewPoint = {
|
|
997
|
+
scale: number;
|
|
998
|
+
rotation?: number;
|
|
999
|
+
/**
|
|
1000
|
+
* Spec - https://developers.arcgis.com/web-scene-specification/objects/viewpoint/
|
|
1001
|
+
*/
|
|
1002
|
+
targetGeometry: any;
|
|
1003
|
+
camera: ArcGisCamera;
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* The camera defines the position, tilt, and heading of the point from which the SceneView's visible extent is observed.
|
|
1008
|
+
* It is not associated with device hardware. This class only applies to 3D SceneViews.
|
|
1009
|
+
* Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html
|
|
1010
|
+
*/
|
|
1011
|
+
export type ArcGisCamera = {
|
|
1012
|
+
position: {
|
|
1013
|
+
x: number;
|
|
1014
|
+
y: number;
|
|
1015
|
+
z: number;
|
|
1016
|
+
};
|
|
1017
|
+
spatialReference: {
|
|
1018
|
+
wkid: number;
|
|
1019
|
+
latestWkid: number;
|
|
1020
|
+
};
|
|
1021
|
+
heading: number;
|
|
1022
|
+
tilt: number;
|
|
1023
|
+
};
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* Operational layers contain your data. Usually, a basemap sits beneath your operational layers to give them geographic context.
|
|
1027
|
+
* Spec- https://developers.arcgis.com/web-scene-specification/objects/operationalLayers/
|
|
1028
|
+
*/
|
|
1029
|
+
export type OperationalLayer = {
|
|
1030
|
+
id: string;
|
|
1031
|
+
opacity: number;
|
|
1032
|
+
title: string;
|
|
1033
|
+
url: string;
|
|
1034
|
+
visibility: boolean;
|
|
1035
|
+
itemId: string;
|
|
1036
|
+
layerType: string;
|
|
1037
|
+
LayerDefinition: LayerDefinition;
|
|
1038
|
+
screenSizePerspective: boolean;
|
|
1039
|
+
showLabels?: boolean;
|
|
1040
|
+
disablePopup?: boolean;
|
|
1041
|
+
showLegend?: boolean;
|
|
1042
|
+
layers?: OperationalLayer[];
|
|
1043
|
+
};
|
|
1044
|
+
|
|
1045
|
+
type LayerDefinition = {
|
|
1046
|
+
elevationInfo: ElevationInfo;
|
|
1047
|
+
drawingInfo: DrawingInfo;
|
|
1048
|
+
};
|
|
1049
|
+
|
|
1050
|
+
type BaseMap = {
|
|
1051
|
+
id: string;
|
|
1052
|
+
title: string;
|
|
1053
|
+
baseMapLayers: BaseMapLayer[];
|
|
1054
|
+
elevationLayers: ElevationLayer[];
|
|
1055
|
+
};
|
|
1056
|
+
|
|
1057
|
+
type BaseMapLayer = {
|
|
1058
|
+
id: string;
|
|
1059
|
+
opacity: number;
|
|
1060
|
+
title: string;
|
|
1061
|
+
url: string;
|
|
1062
|
+
visibility: boolean;
|
|
1063
|
+
layerType: string;
|
|
1064
|
+
};
|
|
1065
|
+
|
|
1066
|
+
type ElevationLayer = {
|
|
1067
|
+
id: string;
|
|
1068
|
+
listMode: string;
|
|
1069
|
+
title: string;
|
|
1070
|
+
url: string;
|
|
1071
|
+
visibility: boolean;
|
|
1072
|
+
layerType: string;
|
|
1073
|
+
};
|
|
1074
|
+
|
|
1075
|
+
type Ground = {
|
|
1076
|
+
layers: ElevationLayer[];
|
|
1077
|
+
transparency: number;
|
|
1078
|
+
navigationConstraint: NavigationConstraint;
|
|
1079
|
+
};
|
|
1080
|
+
|
|
1081
|
+
type NavigationConstraint = {
|
|
1082
|
+
type: string;
|
|
1083
|
+
};
|
|
1084
|
+
|
|
1085
|
+
type InitialState = {
|
|
1086
|
+
environment: Enviroment;
|
|
1087
|
+
viewpoint: ViewPoint;
|
|
1088
|
+
};
|
|
1089
|
+
|
|
1090
|
+
type Enviroment = {
|
|
1091
|
+
lighting: Lighting;
|
|
1092
|
+
atmosphereEnabled?: string;
|
|
1093
|
+
starsEnabled?: string;
|
|
1094
|
+
};
|
|
1095
|
+
|
|
1096
|
+
type Lighting = {
|
|
1097
|
+
datetime?: number;
|
|
1098
|
+
displayUTCOffset?: number;
|
|
1099
|
+
};
|
|
1100
|
+
|
|
1101
|
+
type ViewPoint = {
|
|
1102
|
+
camera: Camera;
|
|
1103
|
+
};
|
|
1104
|
+
|
|
1105
|
+
type Camera = {
|
|
1106
|
+
position: CameraPosition;
|
|
1107
|
+
heading: number;
|
|
1108
|
+
tilt: number;
|
|
1109
|
+
};
|
|
1110
|
+
|
|
1111
|
+
type CameraPosition = {
|
|
1112
|
+
spatialReference: SpatialReference;
|
|
1113
|
+
x: number;
|
|
1114
|
+
y: number;
|
|
1115
|
+
z: number;
|
|
1116
|
+
};
|
|
1117
|
+
|
|
1118
|
+
/**
|
|
1119
|
+
* Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/statsInfo.cmn.md
|
|
1120
|
+
*/
|
|
1121
|
+
export type StatsInfo = {
|
|
1122
|
+
/** Represents the count of the value. */
|
|
1123
|
+
totalValuesCount?: number;
|
|
1124
|
+
/** Minimum attribute value for the entire layer. */
|
|
1125
|
+
min?: number;
|
|
1126
|
+
/** Maximum attribute value for the entire layer. */
|
|
1127
|
+
max?: number;
|
|
1128
|
+
/** Count for the entire layer. */
|
|
1129
|
+
count?: number;
|
|
1130
|
+
/** Sum of the attribute values over the entire layer. */
|
|
1131
|
+
sum?: number;
|
|
1132
|
+
/** Representing average or mean value. For example, sum/count. */
|
|
1133
|
+
avg?: number;
|
|
1134
|
+
/** Representing the standard deviation. */
|
|
1135
|
+
stddev?: number;
|
|
1136
|
+
/** Representing variance. For example, stats.stddev *stats.stddev. */
|
|
1137
|
+
variance?: number;
|
|
1138
|
+
/** Represents the histogram. */
|
|
1139
|
+
histogram?: Histogram;
|
|
1140
|
+
/** An array of most frequently used values within the point cloud scene layer. */
|
|
1141
|
+
mostFrequentValues?: ValueCount[];
|
|
1142
|
+
};
|
|
1143
|
+
|
|
1144
|
+
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/histogram.cmn.md */
|
|
1145
|
+
export type Histogram = {
|
|
1146
|
+
/** Minimum attribute value for the entire layer. */
|
|
1147
|
+
minimum: number;
|
|
1148
|
+
/** Maximum attribute value for the entire layer. Maximum array size for stats.histo.counts is 256. */
|
|
1149
|
+
maximum: number;
|
|
1150
|
+
/** Count for the entire layer. */
|
|
1151
|
+
counts: number[];
|
|
1152
|
+
};
|
|
1153
|
+
|
|
1154
|
+
export type ValueCount = {
|
|
1155
|
+
/** Type of the attribute values after decompression, if applicable. Please note that string is not supported for point cloud scene layer attributes. */
|
|
1156
|
+
value: number | string;
|
|
1157
|
+
/** Count of the number of values. May exceed 32 bits. */
|
|
1158
|
+
count: number;
|
|
1159
|
+
};
|