@loaders.gl/i3s 3.3.0-alpha.1 → 3.3.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.
Files changed (124) hide show
  1. package/dist/dist.min.js +1215 -1478
  2. package/dist/es5/arcgis-webscene-loader.js +2 -8
  3. package/dist/es5/arcgis-webscene-loader.js.map +1 -1
  4. package/dist/es5/bundle.js +0 -1
  5. package/dist/es5/bundle.js.map +1 -1
  6. package/dist/es5/i3s-attribute-loader.js +19 -59
  7. package/dist/es5/i3s-attribute-loader.js.map +1 -1
  8. package/dist/es5/i3s-building-scene-layer-loader.js +1 -10
  9. package/dist/es5/i3s-building-scene-layer-loader.js.map +1 -1
  10. package/dist/es5/i3s-content-loader.js +18 -18
  11. package/dist/es5/i3s-content-loader.js.map +1 -1
  12. package/dist/es5/i3s-loader.js +48 -80
  13. package/dist/es5/i3s-loader.js.map +1 -1
  14. package/dist/es5/i3s-node-page-loader.js +1 -12
  15. package/dist/es5/i3s-node-page-loader.js.map +1 -1
  16. package/dist/es5/index.js +12 -18
  17. package/dist/es5/index.js.map +1 -1
  18. package/dist/es5/lib/helpers/i3s-nodepages-tiles.js +18 -78
  19. package/dist/es5/lib/helpers/i3s-nodepages-tiles.js.map +1 -1
  20. package/dist/es5/lib/parsers/constants.js +3 -19
  21. package/dist/es5/lib/parsers/constants.js.map +1 -1
  22. package/dist/es5/lib/parsers/parse-arcgis-webscene.js +128 -30
  23. package/dist/es5/lib/parsers/parse-arcgis-webscene.js.map +1 -1
  24. package/dist/es5/lib/parsers/parse-i3s-attribute.js +1 -23
  25. package/dist/es5/lib/parsers/parse-i3s-attribute.js.map +1 -1
  26. package/dist/es5/lib/parsers/parse-i3s-building-scene-layer.js +8 -25
  27. package/dist/es5/lib/parsers/parse-i3s-building-scene-layer.js.map +1 -1
  28. package/dist/es5/lib/parsers/parse-i3s-tile-content.js +90 -199
  29. package/dist/es5/lib/parsers/parse-i3s-tile-content.js.map +1 -1
  30. package/dist/es5/lib/parsers/parse-i3s.js +6 -37
  31. package/dist/es5/lib/parsers/parse-i3s.js.map +1 -1
  32. package/dist/es5/lib/utils/convert-i3s-obb-to-mbs.js +0 -7
  33. package/dist/es5/lib/utils/convert-i3s-obb-to-mbs.js.map +1 -1
  34. package/dist/es5/lib/utils/customizeColors.js +164 -0
  35. package/dist/es5/lib/utils/customizeColors.js.map +1 -0
  36. package/dist/es5/lib/utils/url-utils.js +3 -8
  37. package/dist/es5/lib/utils/url-utils.js.map +1 -1
  38. package/dist/es5/types.js +0 -3
  39. package/dist/es5/types.js.map +1 -1
  40. package/dist/es5/workers/i3s-content-nodejs-worker.js +7 -0
  41. package/dist/es5/workers/i3s-content-nodejs-worker.js.map +1 -0
  42. package/dist/es5/workers/i3s-content-worker.js +0 -2
  43. package/dist/es5/workers/i3s-content-worker.js.map +1 -1
  44. package/dist/esm/arcgis-webscene-loader.js +3 -1
  45. package/dist/esm/arcgis-webscene-loader.js.map +1 -1
  46. package/dist/esm/bundle.js +1 -1
  47. package/dist/esm/bundle.js.map +1 -1
  48. package/dist/esm/i3s-attribute-loader.js +9 -26
  49. package/dist/esm/i3s-attribute-loader.js.map +1 -1
  50. package/dist/esm/i3s-building-scene-layer-loader.js +2 -3
  51. package/dist/esm/i3s-building-scene-layer-loader.js.map +1 -1
  52. package/dist/esm/i3s-content-loader.js +13 -6
  53. package/dist/esm/i3s-content-loader.js.map +1 -1
  54. package/dist/esm/i3s-loader.js +16 -24
  55. package/dist/esm/i3s-loader.js.map +1 -1
  56. package/dist/esm/i3s-node-page-loader.js +1 -2
  57. package/dist/esm/i3s-node-page-loader.js.map +1 -1
  58. package/dist/esm/index.js.map +1 -1
  59. package/dist/esm/lib/helpers/i3s-nodepages-tiles.js +2 -45
  60. package/dist/esm/lib/helpers/i3s-nodepages-tiles.js.map +1 -1
  61. package/dist/esm/lib/parsers/constants.js +2 -11
  62. package/dist/esm/lib/parsers/constants.js.map +1 -1
  63. package/dist/esm/lib/parsers/parse-arcgis-webscene.js +50 -11
  64. package/dist/esm/lib/parsers/parse-arcgis-webscene.js.map +1 -1
  65. package/dist/esm/lib/parsers/parse-i3s-attribute.js +1 -8
  66. package/dist/esm/lib/parsers/parse-i3s-attribute.js.map +1 -1
  67. package/dist/esm/lib/parsers/parse-i3s-building-scene-layer.js +1 -4
  68. package/dist/esm/lib/parsers/parse-i3s-building-scene-layer.js.map +1 -1
  69. package/dist/esm/lib/parsers/parse-i3s-tile-content.js +60 -104
  70. package/dist/esm/lib/parsers/parse-i3s-tile-content.js.map +1 -1
  71. package/dist/esm/lib/parsers/parse-i3s.js +16 -18
  72. package/dist/esm/lib/parsers/parse-i3s.js.map +1 -1
  73. package/dist/esm/lib/utils/convert-i3s-obb-to-mbs.js.map +1 -1
  74. package/dist/esm/lib/utils/customizeColors.js +96 -0
  75. package/dist/esm/lib/utils/customizeColors.js.map +1 -0
  76. package/dist/esm/lib/utils/url-utils.js +5 -5
  77. package/dist/esm/lib/utils/url-utils.js.map +1 -1
  78. package/dist/esm/types.js +0 -3
  79. package/dist/esm/types.js.map +1 -1
  80. package/dist/esm/workers/i3s-content-nodejs-worker.js +5 -0
  81. package/dist/esm/workers/i3s-content-nodejs-worker.js.map +1 -0
  82. package/dist/esm/workers/i3s-content-worker.js.map +1 -1
  83. package/dist/i3s-attribute-loader.d.ts +6 -0
  84. package/dist/i3s-attribute-loader.d.ts.map +1 -1
  85. package/dist/i3s-attribute-loader.js +2 -1
  86. package/dist/i3s-content-loader.d.ts.map +1 -1
  87. package/dist/i3s-content-loader.js +9 -4
  88. package/dist/i3s-content-nodejs-worker.js +201 -0
  89. package/dist/i3s-content-nodejs-worker.js.map +7 -0
  90. package/dist/i3s-content-worker.js +672 -1045
  91. package/dist/i3s-loader.d.ts +5 -0
  92. package/dist/i3s-loader.d.ts.map +1 -1
  93. package/dist/i3s-loader.js +12 -10
  94. package/dist/index.d.ts +1 -1
  95. package/dist/index.d.ts.map +1 -1
  96. package/dist/lib/parsers/constants.js +1 -1
  97. package/dist/lib/parsers/parse-arcgis-webscene.d.ts.map +1 -1
  98. package/dist/lib/parsers/parse-arcgis-webscene.js +49 -7
  99. package/dist/lib/parsers/parse-i3s-tile-content.d.ts +2 -2
  100. package/dist/lib/parsers/parse-i3s-tile-content.d.ts.map +1 -1
  101. package/dist/lib/parsers/parse-i3s-tile-content.js +38 -33
  102. package/dist/lib/parsers/parse-i3s.d.ts +1 -1
  103. package/dist/lib/parsers/parse-i3s.d.ts.map +1 -1
  104. package/dist/lib/parsers/parse-i3s.js +1 -1
  105. package/dist/lib/utils/customizeColors.d.ts +14 -0
  106. package/dist/lib/utils/customizeColors.d.ts.map +1 -0
  107. package/dist/lib/utils/customizeColors.js +89 -0
  108. package/dist/types.d.ts +265 -85
  109. package/dist/types.d.ts.map +1 -1
  110. package/dist/workers/i3s-content-nodejs-worker.d.ts +2 -0
  111. package/dist/workers/i3s-content-nodejs-worker.d.ts.map +1 -0
  112. package/dist/workers/i3s-content-nodejs-worker.js +6 -0
  113. package/package.json +12 -12
  114. package/src/i3s-attribute-loader.ts +1 -1
  115. package/src/i3s-content-loader.ts +19 -6
  116. package/src/i3s-loader.ts +22 -13
  117. package/src/index.ts +8 -1
  118. package/src/lib/parsers/constants.ts +1 -1
  119. package/src/lib/parsers/parse-arcgis-webscene.ts +57 -7
  120. package/src/lib/parsers/parse-i3s-tile-content.ts +56 -43
  121. package/src/lib/parsers/parse-i3s.ts +1 -1
  122. package/src/lib/utils/customizeColors.ts +129 -0
  123. package/src/types.ts +198 -3
  124. package/src/workers/i3s-content-nodejs-worker.ts +5 -0
package/dist/types.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { Matrix4, Quaternion, Vector3 } from '@math.gl/core';
2
2
  import type { TypedArray, MeshAttribute, TextureLevel } from '@loaders.gl/schema';
3
+ import { Tile3D, Tileset3D } from '@loaders.gl/tiles';
3
4
  export declare enum DATA_TYPE {
4
5
  UInt8 = "UInt8",
5
6
  UInt16 = "UInt16",
@@ -11,6 +12,7 @@ export declare enum DATA_TYPE {
11
12
  Float32 = "Float32",
12
13
  Float64 = "Float64"
13
14
  }
15
+ export type COLOR = [number, number, number, number];
14
16
  /**
15
17
  * spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/3DSceneLayer.cmn.md
16
18
  */
@@ -20,14 +22,14 @@ export interface I3STilesetHeader extends SceneLayer3D {
20
22
  [key: string]: any;
21
23
  }
22
24
  /** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/nodePage.cmn.md */
23
- export declare type NodePage = {
25
+ export type NodePage = {
24
26
  /** Array of nodes. */
25
27
  nodes: NodeInPage[];
26
28
  };
27
29
  /**
28
30
  * Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/mesh.cmn.md
29
31
  */
30
- declare type NodeMesh = {
32
+ type NodeMesh = {
31
33
  /**
32
34
  * The material definition.
33
35
  */
@@ -38,7 +40,7 @@ declare type NodeMesh = {
38
40
  attribute: meshAttribute;
39
41
  };
40
42
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/meshMaterial.cmn.md */
41
- export declare type MeshMaterial = {
43
+ export type MeshMaterial = {
42
44
  /** The index in layer.materialDefinitions array. */
43
45
  definition: number;
44
46
  /** Resource id for the material textures. i.e: layers/0/nodes/{material.resource}/textures/{tex_name}. Is required if material declares any textures. */
@@ -47,7 +49,7 @@ export declare type MeshMaterial = {
47
49
  texelCountHint?: number;
48
50
  };
49
51
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/meshGeometry.cmn.md */
50
- export declare type MeshGeometry = {
52
+ export type MeshGeometry = {
51
53
  /** The index in layer.geometryDefinitions array */
52
54
  definition: number;
53
55
  /** The resource locator to be used to query geometry resources: layers/0/nodes/{this.resource}/geometries/{layer.geometryDefinitions[this.definition].geometryBuffers[0 or 1]}. */
@@ -58,12 +60,12 @@ export declare type MeshGeometry = {
58
60
  featureCount?: number;
59
61
  };
60
62
  /** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/meshAttribute.cmn.md */
61
- declare type meshAttribute = {
63
+ type meshAttribute = {
62
64
  /** The resource identifier to be used to locate attribute resources of this mesh. i.e. layers/0/nodes/<resource id>/attributes/... */
63
65
  resource: number;
64
66
  };
65
- export declare type I3STextureFormat = 'jpg' | 'png' | 'ktx-etc2' | 'dds' | 'ktx2';
66
- export declare type I3STileHeader = {
67
+ export type I3STextureFormat = 'jpg' | 'png' | 'ktx-etc2' | 'dds' | 'ktx2';
68
+ export type I3STileHeader = {
67
69
  isDracoGeometry: boolean;
68
70
  textureUrl?: string;
69
71
  url?: string;
@@ -75,7 +77,57 @@ export declare type I3STileHeader = {
75
77
  lodSelection?: LodSelection[];
76
78
  [key: string]: any;
77
79
  };
78
- export declare type I3STileContent = {
80
+ export type I3SParseOptions = {
81
+ /** ArcGIS access token */
82
+ token?: string;
83
+ /** Is 3DSceneLayer json expected in response */
84
+ isTileset?: string;
85
+ /** Is 3DNodeIndexDocument json expected in response */
86
+ isTileHeader?: string;
87
+ /** Tile3D instance. This property used only to load tile content */
88
+ /** @deprecated */
89
+ tile?: Tile3D | I3STileOptions;
90
+ /** Tileset3D instance. This property used only to load tile content */
91
+ /** @deprecated */
92
+ tileset?: Tileset3D | I3STilesetOptions;
93
+ /** Tile-specific options */
94
+ _tileOptions?: I3STileOptions;
95
+ /** Tileset-specific options */
96
+ _tilesetOptions?: I3STilesetOptions;
97
+ /** Load Draco Compressed geometry if available */
98
+ useDracoGeometry?: boolean;
99
+ /** Load compressed textures if available */
100
+ useCompressedTextures?: boolean;
101
+ /** Set false if don't need to parse textures */
102
+ decodeTextures?: boolean;
103
+ /** deck.gl compatible coordinate system.
104
+ * https://github.com/visgl/deck.gl/blob/master/docs/developer-guide/coordinate-systems.md
105
+ * Supported coordinate systems: METER_OFFSETS, LNGLAT_OFFSETS
106
+ */
107
+ coordinateSystem?: number;
108
+ colorsByAttribute?: {
109
+ attributeName: string;
110
+ minValue: number;
111
+ maxValue: number;
112
+ minColor: COLOR;
113
+ maxColor: COLOR;
114
+ };
115
+ };
116
+ export type I3STileOptions = {
117
+ isDracoGeometry: boolean;
118
+ textureUrl?: string;
119
+ textureFormat?: I3STextureFormat;
120
+ textureLoaderOptions?: any;
121
+ materialDefinition?: I3SMaterialDefinition;
122
+ attributeUrls: string[];
123
+ mbs: Mbs;
124
+ };
125
+ export type I3STilesetOptions = {
126
+ store: Store;
127
+ attributeStorageInfo: AttributeStorageInfo[];
128
+ fields: Field[];
129
+ };
130
+ export type I3STileContent = {
79
131
  attributes: I3SMeshAttributes;
80
132
  indices: TypedArray | null;
81
133
  featureIds: number[] | TypedArray;
@@ -86,25 +138,25 @@ export declare type I3STileContent = {
86
138
  texture: TileContentTexture;
87
139
  [key: string]: any;
88
140
  };
89
- export declare type TileContentTexture = ArrayBuffer | {
141
+ export type TileContentTexture = ArrayBuffer | {
90
142
  compressed: boolean;
91
143
  mipmaps: boolean;
92
144
  width: number;
93
145
  height: number;
94
146
  data: TextureLevel[];
95
147
  } | null;
96
- export declare type BoundingVolumes = {
148
+ export type BoundingVolumes = {
97
149
  mbs: Mbs;
98
150
  obb: Obb;
99
151
  };
100
- export declare type Obb = {
152
+ export type Obb = {
101
153
  center: number[] | Vector3;
102
154
  halfSize: number[] | Vector3;
103
- quaternion: Quaternion;
155
+ quaternion: number[] | Quaternion;
104
156
  };
105
- export declare type Mbs = [number, number, number, number];
157
+ export type Mbs = [number, number, number, number];
106
158
  /** SceneLayer3D based on I3S specification - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/3DSceneLayer.cmn.md */
107
- export declare type SceneLayer3D = {
159
+ export type SceneLayer3D = {
108
160
  /** Unique numeric ID of the layer. */
109
161
  id: number;
110
162
  /** The relative URL to the 3DSceneLayerResource. Only present as part of the SceneServiceInfo resource. */
@@ -167,19 +219,19 @@ export declare type SceneLayer3D = {
167
219
  fullExtent?: FullExtent;
168
220
  };
169
221
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/cachedDrawingInfo.cmn.md */
170
- export declare type CachedDrawingInfo = {
222
+ export type CachedDrawingInfo = {
171
223
  /** If true, the drawingInfo is captured as part of the binary scene layer representation. */
172
224
  color: boolean;
173
225
  };
174
226
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/drawingInfo.cmn.md */
175
- export declare type DrawingInfo = {
227
+ export type DrawingInfo = {
176
228
  /** An object defining the symbology for the layer. See more information about supported renderer types in ArcGIS clients. */
177
229
  renderer: any;
178
230
  /** Scale symbols for the layer. */
179
231
  scaleSymbols: boolean;
180
232
  };
181
233
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/elevationInfo.cmn.md */
182
- export declare type ElevationInfo = {
234
+ export type ElevationInfo = {
183
235
  mode: 'relativeToGround' | 'absoluteHeight' | 'onTheGround' | 'relativeToScene';
184
236
  /** Offset is always added to the result of the above logic except for onTheGround where offset is ignored. */
185
237
  offset: number;
@@ -187,7 +239,7 @@ export declare type ElevationInfo = {
187
239
  unit: string;
188
240
  };
189
241
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/statisticsInfo.cmn.md */
190
- export declare type StatisticsInfo = {
242
+ export type StatisticsInfo = {
191
243
  /** Key indicating the resource of the statistics. */
192
244
  key: string;
193
245
  /** Name of the field of the statistical information. */
@@ -196,7 +248,7 @@ export declare type StatisticsInfo = {
196
248
  href: string;
197
249
  };
198
250
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/nodePageDefinition.cmn.md */
199
- export declare type NodePageDefinition = {
251
+ export type NodePageDefinition = {
200
252
  /** Number of nodes per page for this layer. Must be a power-of-two less than 4096 */
201
253
  nodesPerPage: number;
202
254
  /** Index of the root node. Default = 0. */
@@ -205,7 +257,7 @@ export declare type NodePageDefinition = {
205
257
  lodSelectionMetricType: 'maxScreenThresholdSQ';
206
258
  };
207
259
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialDefinitions.cmn.md */
208
- export declare type I3SMaterialDefinition = {
260
+ export type I3SMaterialDefinition = {
209
261
  /** 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. */
210
262
  pbrMetallicRoughness: I3SPbrMetallicRoughness;
211
263
  /** The normal texture map. */
@@ -226,7 +278,7 @@ export declare type I3SMaterialDefinition = {
226
278
  cullFace?: 'none' | 'front' | 'back';
227
279
  };
228
280
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/pbrMetallicRoughness.cmn.md */
229
- export declare type I3SPbrMetallicRoughness = {
281
+ export type I3SPbrMetallicRoughness = {
230
282
  /** The material's base color factor. default=[1,1,1,1] */
231
283
  baseColorFactor?: [number, number, number, number];
232
284
  /** The base color texture. */
@@ -239,7 +291,7 @@ export declare type I3SPbrMetallicRoughness = {
239
291
  metallicRoughnessTexture?: I3SMaterialTexture;
240
292
  };
241
293
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialTexture.cmn.md */
242
- export declare type I3SMaterialTexture = {
294
+ export type I3SMaterialTexture = {
243
295
  /** The index in layer.textureSetDefinitions. */
244
296
  textureSetDefinitionId: number;
245
297
  /** The set index of texture's TEXCOORD attribute used for texture coordinate mapping. Default is 0. Deprecated. */
@@ -248,7 +300,7 @@ export declare type I3SMaterialTexture = {
248
300
  factor?: number;
249
301
  };
250
302
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/attributeStorageInfo.cmn.md */
251
- export declare type AttributeStorageInfo = {
303
+ export type AttributeStorageInfo = {
252
304
  key: string;
253
305
  name: string;
254
306
  header: {
@@ -261,15 +313,15 @@ export declare type AttributeStorageInfo = {
261
313
  objectIds?: AttributeValue;
262
314
  };
263
315
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/field.cmn.md */
264
- export declare type Field = {
316
+ export type Field = {
265
317
  name: string;
266
318
  type: ESRIField;
267
319
  alias?: string;
268
320
  domain?: Domain;
269
321
  };
270
- export declare type ESRIField = 'esriFieldTypeDate' | 'esriFieldTypeSingle' | 'esriFieldTypeDouble' | 'esriFieldTypeGUID' | 'esriFieldTypeGlobalID' | 'esriFieldTypeInteger' | 'esriFieldTypeOID' | 'esriFieldTypeSmallInteger' | 'esriFieldTypeString';
322
+ export type ESRIField = 'esriFieldTypeDate' | 'esriFieldTypeSingle' | 'esriFieldTypeDouble' | 'esriFieldTypeGUID' | 'esriFieldTypeGlobalID' | 'esriFieldTypeInteger' | 'esriFieldTypeOID' | 'esriFieldTypeSmallInteger' | 'esriFieldTypeString';
271
323
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/popupInfo.cmn.md */
272
- export declare type PopupInfo = {
324
+ export type PopupInfo = {
273
325
  title?: string;
274
326
  description?: string;
275
327
  expressionInfos?: any[];
@@ -284,10 +336,9 @@ export declare type PopupInfo = {
284
336
  /**
285
337
  * Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.7/3DNodeIndexDocument.cmn.md
286
338
  */
287
- export declare type Node3DIndexDocument = {
339
+ export type Node3DIndexDocument = {
288
340
  id: string;
289
341
  version?: string;
290
- path?: string;
291
342
  level?: number;
292
343
  mbs?: Mbs;
293
344
  obb?: Obb;
@@ -306,7 +357,7 @@ export declare type Node3DIndexDocument = {
306
357
  /**
307
358
  * Minimal I3S node data is needed for loading
308
359
  */
309
- export declare type I3SMinimalNodeData = {
360
+ export type I3SMinimalNodeData = {
310
361
  id: string;
311
362
  url?: string;
312
363
  transform?: number[];
@@ -324,18 +375,18 @@ export declare type I3SMinimalNodeData = {
324
375
  children?: NodeReference[];
325
376
  isDracoGeometry: boolean;
326
377
  };
327
- export declare type LodSelection = {
378
+ export type LodSelection = {
328
379
  metricType?: string;
329
380
  maxError: number;
330
381
  };
331
- export declare type NodeReference = {
382
+ export type NodeReference = {
332
383
  id: string;
333
384
  version?: string;
334
385
  mbs?: Mbs;
335
386
  obb?: Obb;
336
387
  href?: string;
337
388
  };
338
- export declare type Resource = {
389
+ export type Resource = {
339
390
  href: string;
340
391
  layerContent?: string[];
341
392
  featureRange?: number[];
@@ -344,11 +395,11 @@ export declare type Resource = {
344
395
  faceElements?: number[];
345
396
  nodePath?: string;
346
397
  };
347
- export declare type MaxScreenThresholdSQ = {
398
+ export type MaxScreenThresholdSQ = {
348
399
  maxError: number;
349
400
  };
350
401
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/node.cmn.md */
351
- export declare type NodeInPage = {
402
+ export type NodeInPage = {
352
403
  /**
353
404
  * The index in the node array. May be different than material, geometry and attribute resource id. See mesh for more information.
354
405
  */
@@ -377,7 +428,7 @@ export declare type NodeInPage = {
377
428
  /**
378
429
  * https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialDefinitionInfo.cmn.md
379
430
  */
380
- export declare type MaterialDefinitionInfo = {
431
+ export type MaterialDefinitionInfo = {
381
432
  /** A name for the material as assigned in the creating application. */
382
433
  name?: string;
383
434
  /** Indicates the material type, chosen from the supported values. */
@@ -426,7 +477,7 @@ export declare type MaterialDefinitionInfo = {
426
477
  };
427
478
  };
428
479
  /** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/sharedResource.cmn.md */
429
- export declare type SharedResources = {
480
+ export type SharedResources = {
430
481
  /** Materials describe how a Feature or a set of Features is to be rendered. */
431
482
  materialDefinitions?: {
432
483
  [key: string]: MaterialDefinitionInfo;
@@ -437,7 +488,7 @@ export declare type SharedResources = {
437
488
  };
438
489
  };
439
490
  /** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/image.cmn.md */
440
- declare type TextureImage = {
491
+ type TextureImage = {
441
492
  /** A unique ID for each image. Generated using the BuildID function. */
442
493
  id: string;
443
494
  /** width of this image, in pixels. */
@@ -454,17 +505,17 @@ declare type TextureImage = {
454
505
  * in the same order as the encodings. */
455
506
  length?: number[];
456
507
  };
457
- export declare type Attribute = 'OBJECTID' | 'string' | 'double' | 'Int32' | string;
458
- export declare type Extent = [number, number, number, number];
459
- export declare type FeatureAttribute = {
508
+ export type Attribute = 'OBJECTID' | 'string' | 'double' | 'Int32' | string;
509
+ export type Extent = [number, number, number, number];
510
+ export type FeatureAttribute = {
460
511
  id: AttributeValue;
461
512
  faceRange: AttributeValue;
462
513
  };
463
- export declare type BuildingSceneLayerTileset = {
514
+ export type BuildingSceneLayerTileset = {
464
515
  header: BuildingSceneLayer;
465
516
  sublayers: BuildingSceneSublayer[];
466
517
  };
467
- export declare type BuildingSceneLayer = {
518
+ export type BuildingSceneLayer = {
468
519
  id: number;
469
520
  name: string;
470
521
  version: string;
@@ -480,7 +531,7 @@ export declare type BuildingSceneLayer = {
480
531
  activeFilterID?: string;
481
532
  statisticsHRef?: string;
482
533
  };
483
- export declare type BuildingSceneSublayer = {
534
+ export type BuildingSceneSublayer = {
484
535
  id: number;
485
536
  name: string;
486
537
  alias?: string;
@@ -492,7 +543,7 @@ export declare type BuildingSceneSublayer = {
492
543
  isEmpty?: boolean;
493
544
  url?: string;
494
545
  };
495
- declare type Filter = {
546
+ type Filter = {
496
547
  id: string;
497
548
  name: string;
498
549
  description: string;
@@ -501,38 +552,38 @@ declare type Filter = {
501
552
  filterBlocks: FilterBlock[];
502
553
  filterAuthoringInfo?: FilterAuthoringInfo;
503
554
  };
504
- declare type FilterAuthoringInfo = {
555
+ type FilterAuthoringInfo = {
505
556
  type: string;
506
557
  filterBlocks: FilterBlockAuthoringInfo[];
507
558
  };
508
- declare type FilterBlockAuthoringInfo = {
559
+ type FilterBlockAuthoringInfo = {
509
560
  filterTypes: FilterType[];
510
561
  };
511
- declare type FilterType = {
562
+ type FilterType = {
512
563
  filterType: string;
513
564
  filterValues: string[];
514
565
  };
515
- declare type FilterBlock = {
566
+ type FilterBlock = {
516
567
  title: string;
517
568
  filterMode: FilterModeSolid | FilterModeWireFrame;
518
569
  filterExpression: string;
519
570
  };
520
- declare type Edges = {
571
+ type Edges = {
521
572
  type: string;
522
573
  color: number[];
523
574
  size: number;
524
575
  transparency: number;
525
576
  extensionLength: number;
526
577
  };
527
- declare type FilterModeSolid = {
578
+ type FilterModeSolid = {
528
579
  type: 'solid';
529
580
  };
530
- declare type FilterModeWireFrame = {
581
+ type FilterModeWireFrame = {
531
582
  type: 'wireFrame';
532
583
  edges: Edges;
533
584
  };
534
585
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/spatialReference.cmn.md */
535
- export declare type SpatialReference = {
586
+ export type SpatialReference = {
536
587
  /** The current WKID value of the vertical coordinate system. */
537
588
  latestVcsWkid: number;
538
589
  /** dentifies the current WKID value associated with the same spatial reference. */
@@ -545,7 +596,7 @@ export declare type SpatialReference = {
545
596
  wkt?: string;
546
597
  };
547
598
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/fullExtent.cmn.md */
548
- export declare type FullExtent = {
599
+ export type FullExtent = {
549
600
  /** left longitude in decimal degrees */
550
601
  xmin: number;
551
602
  /** right longitude in decimal degrees */
@@ -563,7 +614,7 @@ export declare type FullExtent = {
563
614
  /**
564
615
  * https://github.com/Esri/i3s-spec/blob/master/docs/1.8/textureDefinitionInfo.cmn.md
565
616
  */
566
- export declare type TextureDefinitionInfo = {
617
+ export type TextureDefinitionInfo = {
567
618
  /** MIMEtype - The encoding/content type that is used by all images in this map */
568
619
  encoding?: string[];
569
620
  /** UV wrapping modes, from {none, repeat, mirror}. */
@@ -578,7 +629,7 @@ export declare type TextureDefinitionInfo = {
578
629
  images: TextureImage[];
579
630
  };
580
631
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/domain.cmn.md */
581
- declare type Domain = {
632
+ type Domain = {
582
633
  type: string;
583
634
  name: string;
584
635
  description?: string;
@@ -594,7 +645,7 @@ declare type Domain = {
594
645
  /**
595
646
  * spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/store.cmn.md
596
647
  */
597
- declare type Store = {
648
+ type Store = {
598
649
  id: string | number;
599
650
  profile: string;
600
651
  version: number | string;
@@ -613,7 +664,7 @@ declare type Store = {
613
664
  /**
614
665
  * Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/defaultGeometrySchema.cmn.md
615
666
  */
616
- declare type DefaultGeometrySchema = {
667
+ type DefaultGeometrySchema = {
617
668
  geometryType?: 'triangles';
618
669
  topology: 'PerAttributeArray' | 'Indexed';
619
670
  header: HeaderAttribute[];
@@ -627,7 +678,7 @@ declare type DefaultGeometrySchema = {
627
678
  /**
628
679
  * spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/headerAttribute.cmn.md
629
680
  */
630
- export declare type HeaderAttribute = {
681
+ export type HeaderAttribute = {
631
682
  property: HeaderAttributeProperty.vertexCount | HeaderAttributeProperty.featureCount | string;
632
683
  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;
633
684
  };
@@ -635,19 +686,19 @@ export declare enum HeaderAttributeProperty {
635
686
  vertexCount = "vertexCount",
636
687
  featureCount = "featureCount"
637
688
  }
638
- export declare type VertexAttribute = {
689
+ export type VertexAttribute = {
639
690
  position: GeometryAttribute;
640
691
  normal: GeometryAttribute;
641
692
  uv0: GeometryAttribute;
642
693
  color: GeometryAttribute;
643
694
  region?: GeometryAttribute;
644
695
  };
645
- export declare type GeometryAttribute = {
696
+ export type GeometryAttribute = {
646
697
  byteOffset?: number;
647
698
  valueType: DATA_TYPE.UInt8 | DATA_TYPE.UInt16 | DATA_TYPE.Int16 | DATA_TYPE.Int32 | DATA_TYPE.Int64 | DATA_TYPE.Float32 | DATA_TYPE.Float64;
648
699
  valuesPerElement: number;
649
700
  };
650
- export declare type I3SMeshAttributes = {
701
+ export type I3SMeshAttributes = {
651
702
  [key: string]: I3SMeshAttribute;
652
703
  };
653
704
  export interface I3SMeshAttribute extends MeshAttribute {
@@ -655,27 +706,27 @@ export interface I3SMeshAttribute extends MeshAttribute {
655
706
  metadata?: any;
656
707
  }
657
708
  /** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/heightModelInfo.cmn.md */
658
- declare type HeightModelInfo = {
709
+ type HeightModelInfo = {
659
710
  heightModel: 'gravity_related_height' | 'ellipsoidal';
660
711
  vertCRS: string;
661
712
  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';
662
713
  };
663
- export declare type TextureSetDefinitionFormats = {
714
+ export type TextureSetDefinitionFormats = {
664
715
  name: string;
665
716
  format: I3STextureFormat;
666
717
  }[];
667
718
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/textureSetDefinition.cmn.md */
668
- declare type TextureSetDefinition = {
719
+ type TextureSetDefinition = {
669
720
  formats: TextureSetDefinitionFormats;
670
721
  atlas?: boolean;
671
722
  };
672
723
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/geometryDefinition.cmn.md */
673
- declare type GeometryDefinition = {
724
+ type GeometryDefinition = {
674
725
  topology: 'triangle' | string;
675
726
  geometryBuffers: GeometryBuffer[];
676
727
  };
677
728
  /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/geometryBuffer.cmn.md */
678
- declare type GeometryBuffer = {
729
+ type GeometryBuffer = {
679
730
  offset?: number;
680
731
  position?: GeometryBufferItem;
681
732
  normal?: GeometryBufferItem;
@@ -689,31 +740,32 @@ declare type GeometryBuffer = {
689
740
  attributes: string[];
690
741
  };
691
742
  };
692
- declare type GeometryBufferItem = {
743
+ type GeometryBufferItem = {
693
744
  type: string;
694
745
  component: number;
695
746
  encoding?: string;
696
747
  binding: string;
697
748
  };
698
- declare type AttributeValue = {
749
+ type AttributeValue = {
699
750
  valueType: string;
700
751
  encoding?: string;
701
752
  valuesPerElement?: number;
702
753
  };
703
- export declare type FieldInfo = {
754
+ export type FieldInfo = {
704
755
  fieldName: string;
705
756
  visible: boolean;
706
757
  isEditable: boolean;
707
758
  label: string;
708
759
  };
709
- export declare type ArcGisWebSceneData = {
760
+ export type ArcGisWebSceneData = {
710
761
  header: ArcGisWebScene;
711
762
  layers: OperationalLayer[];
763
+ unsupportedLayers: OperationalLayer[];
712
764
  };
713
765
  /**
714
766
  * ArcGis WebScene spec - https://developers.arcgis.com/web-scene-specification/objects/webscene/
715
767
  */
716
- export declare type ArcGisWebScene = {
768
+ export type ArcGisWebScene = {
717
769
  /**
718
770
  * @todo add type.
719
771
  * Spec - https://developers.arcgis.com/web-scene-specification/objects/applicationProperties/
@@ -754,7 +806,7 @@ export declare type ArcGisWebScene = {
754
806
  * Spec - https://developers.arcgis.com/web-scene-specification/objects/presentation/
755
807
  * @todo Add presentation type.
756
808
  */
757
- presentation: any;
809
+ presentation: ArcGisPresentation;
758
810
  /**
759
811
  * An object that provides information about the initial environment settings and viewpoint of the web scene.
760
812
  */
@@ -800,11 +852,99 @@ export declare type ArcGisWebScene = {
800
852
  */
801
853
  widgets?: any;
802
854
  };
855
+ /**
856
+ * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Presentation.html
857
+ */
858
+ type ArcGisPresentation = {
859
+ slides: Slide[];
860
+ };
861
+ /**
862
+ * A slide stores a snapshot of several pre-set properties of the WebScene and SceneView,
863
+ * such as the basemap, viewpoint and visible layers.
864
+ * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html
865
+ */
866
+ type Slide = {
867
+ id: string;
868
+ title: {
869
+ text: string;
870
+ };
871
+ thumbnail: {
872
+ url: string;
873
+ };
874
+ description: {
875
+ text: string;
876
+ };
877
+ ground: {
878
+ transparency: number;
879
+ };
880
+ baseMap: ArcGisBaseMap;
881
+ visibleLayers: ArcGisVisibleLayer[];
882
+ viewpoint: ArcGisViewPoint;
883
+ };
884
+ /**
885
+ * The basemap of the scene. Only the base and reference layers of the basemap are stored in a slide.
886
+ * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html
887
+ */
888
+ type ArcGisBaseMap = {
889
+ id: string;
890
+ title: string;
891
+ baseMapLayers: ArcGisBaseMapLayer[];
892
+ };
893
+ /**
894
+ * The visible layers of the scene.
895
+ * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#visibleLayers
896
+ */
897
+ type ArcGisVisibleLayer = {
898
+ id: string;
899
+ sublayerIds: number[];
900
+ };
901
+ /**
902
+ * The basemap of the scene.
903
+ * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html
904
+ */
905
+ type ArcGisBaseMapLayer = {
906
+ id: string;
907
+ title: string;
908
+ url: string;
909
+ layerType: string;
910
+ visibility: boolean;
911
+ };
912
+ /**
913
+ * The viewpoint of the slide. This acts like a bookmark, saving a predefined location or point of view from which to view the scene.
914
+ * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html
915
+ */
916
+ type ArcGisViewPoint = {
917
+ scale: number;
918
+ rotation?: number;
919
+ /**
920
+ * Spec - https://developers.arcgis.com/web-scene-specification/objects/viewpoint/
921
+ */
922
+ targetGeometry: any;
923
+ camera: ArcGisCamera;
924
+ };
925
+ /**
926
+ * The camera defines the position, tilt, and heading of the point from which the SceneView's visible extent is observed.
927
+ * It is not associated with device hardware. This class only applies to 3D SceneViews.
928
+ * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html
929
+ */
930
+ export type ArcGisCamera = {
931
+ position: {
932
+ x: number;
933
+ y: number;
934
+ z: number;
935
+ };
936
+ spatialReference: {
937
+ wkid: number;
938
+ latestWkid: number;
939
+ };
940
+ heading: number;
941
+ tilt: number;
942
+ };
803
943
  /**
804
944
  * Operational layers contain your data. Usually, a basemap sits beneath your operational layers to give them geographic context.
805
945
  * Spec- https://developers.arcgis.com/web-scene-specification/objects/operationalLayers/
806
946
  */
807
- export declare type OperationalLayer = {
947
+ export type OperationalLayer = {
808
948
  id: string;
809
949
  opacity: number;
810
950
  title: string;
@@ -819,17 +959,17 @@ export declare type OperationalLayer = {
819
959
  showLegend?: boolean;
820
960
  layers?: OperationalLayer[];
821
961
  };
822
- declare type LayerDefinition = {
962
+ type LayerDefinition = {
823
963
  elevationInfo: ElevationInfo;
824
964
  drawingInfo: DrawingInfo;
825
965
  };
826
- declare type BaseMap = {
966
+ type BaseMap = {
827
967
  id: string;
828
968
  title: string;
829
969
  baseMapLayers: BaseMapLayer[];
830
970
  elevationLayers: ElevationLayer[];
831
971
  };
832
- declare type BaseMapLayer = {
972
+ type BaseMapLayer = {
833
973
  id: string;
834
974
  opacity: number;
835
975
  title: string;
@@ -837,7 +977,7 @@ declare type BaseMapLayer = {
837
977
  visibility: boolean;
838
978
  layerType: string;
839
979
  };
840
- declare type ElevationLayer = {
980
+ type ElevationLayer = {
841
981
  id: string;
842
982
  listMode: string;
843
983
  title: string;
@@ -845,40 +985,80 @@ declare type ElevationLayer = {
845
985
  visibility: boolean;
846
986
  layerType: string;
847
987
  };
848
- declare type Ground = {
988
+ type Ground = {
849
989
  layers: ElevationLayer[];
850
990
  transparency: number;
851
991
  navigationConstraint: NavigationConstraint;
852
992
  };
853
- declare type NavigationConstraint = {
993
+ type NavigationConstraint = {
854
994
  type: string;
855
995
  };
856
- declare type InitialState = {
996
+ type InitialState = {
857
997
  environment: Enviroment;
858
998
  viewpoint: ViewPoint;
859
999
  };
860
- declare type Enviroment = {
1000
+ type Enviroment = {
861
1001
  lighting: Lighting;
862
1002
  atmosphereEnabled?: string;
863
1003
  starsEnabled?: string;
864
1004
  };
865
- declare type Lighting = {
1005
+ type Lighting = {
866
1006
  datetime?: number;
867
1007
  displayUTCOffset?: number;
868
1008
  };
869
- declare type ViewPoint = {
1009
+ type ViewPoint = {
870
1010
  camera: Camera;
871
1011
  };
872
- declare type Camera = {
1012
+ type Camera = {
873
1013
  position: CameraPosition;
874
1014
  heading: number;
875
1015
  tilt: number;
876
1016
  };
877
- declare type CameraPosition = {
1017
+ type CameraPosition = {
878
1018
  spatialReference: SpatialReference;
879
1019
  x: number;
880
1020
  y: number;
881
1021
  z: number;
882
1022
  };
1023
+ /**
1024
+ * Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/statsInfo.cmn.md
1025
+ */
1026
+ export type StatsInfo = {
1027
+ /** Represents the count of the value. */
1028
+ totalValuesCount?: number;
1029
+ /** Minimum attribute value for the entire layer. */
1030
+ min?: number;
1031
+ /** Maximum attribute value for the entire layer. */
1032
+ max?: number;
1033
+ /** Count for the entire layer. */
1034
+ count?: number;
1035
+ /** Sum of the attribute values over the entire layer. */
1036
+ sum?: number;
1037
+ /** Representing average or mean value. For example, sum/count. */
1038
+ avg?: number;
1039
+ /** Representing the standard deviation. */
1040
+ stddev?: number;
1041
+ /** Representing variance. For example, stats.stddev *stats.stddev. */
1042
+ variance?: number;
1043
+ /** Represents the histogram. */
1044
+ histogram?: Histogram;
1045
+ /** An array of most frequently used values within the point cloud scene layer. */
1046
+ mostFrequentValues?: ValueCount[];
1047
+ };
1048
+ /** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/histogram.cmn.md */
1049
+ export type Histogram = {
1050
+ /** Minimum attribute value for the entire layer. */
1051
+ minimum: number;
1052
+ /** Maximum attribute value for the entire layer. Maximum array size for stats.histo.counts is 256. */
1053
+ maximum: number;
1054
+ /** Count for the entire layer. */
1055
+ counts: number[];
1056
+ };
1057
+ export type ValueCount = {
1058
+ /** Type of the attribute values after decompression, if applicable. Please note that string is not supported for point cloud scene layer attributes. */
1059
+ value: number | string;
1060
+ /** Count of the number of values. May exceed 32 bits. */
1061
+ count: number;
1062
+ };
883
1063
  export {};
884
1064
  //# sourceMappingURL=types.d.ts.map