@loaders.gl/i3s 3.2.0-alpha.1 → 3.2.0-alpha.4
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/dist.min.js +83 -7
- package/dist/es5/arcgis-webscene-loader.js +50 -0
- package/dist/es5/arcgis-webscene-loader.js.map +1 -0
- package/dist/es5/i3s-attribute-loader.js +1 -1
- package/dist/es5/i3s-building-scene-layer-loader.js +1 -1
- package/dist/es5/i3s-content-loader.js +1 -1
- package/dist/es5/i3s-loader.js +1 -1
- package/dist/es5/i3s-node-page-loader.js +1 -1
- package/dist/es5/index.js +8 -0
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/lib/helpers/i3s-nodepages-tiles.js +53 -59
- package/dist/es5/lib/helpers/i3s-nodepages-tiles.js.map +1 -1
- package/dist/es5/lib/parsers/parse-arcgis-webscene.js +68 -0
- package/dist/es5/lib/parsers/parse-arcgis-webscene.js.map +1 -0
- package/dist/es5/lib/parsers/parse-i3s-tile-content.js +10 -9
- package/dist/es5/lib/parsers/parse-i3s-tile-content.js.map +1 -1
- package/dist/es5/lib/parsers/parse-i3s.js +8 -12
- package/dist/es5/lib/parsers/parse-i3s.js.map +1 -1
- package/dist/es5/types.js.map +1 -1
- package/dist/esm/arcgis-webscene-loader.js +17 -0
- package/dist/esm/arcgis-webscene-loader.js.map +1 -0
- package/dist/esm/i3s-attribute-loader.js +1 -1
- package/dist/esm/i3s-building-scene-layer-loader.js +1 -1
- package/dist/esm/i3s-content-loader.js +1 -1
- package/dist/esm/i3s-loader.js +1 -1
- package/dist/esm/i3s-node-page-loader.js +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/helpers/i3s-nodepages-tiles.js +12 -2
- package/dist/esm/lib/helpers/i3s-nodepages-tiles.js.map +1 -1
- package/dist/esm/lib/parsers/parse-arcgis-webscene.js +35 -0
- package/dist/esm/lib/parsers/parse-arcgis-webscene.js.map +1 -0
- package/dist/esm/lib/parsers/parse-i3s-tile-content.js +2 -1
- package/dist/esm/lib/parsers/parse-i3s-tile-content.js.map +1 -1
- package/dist/esm/lib/parsers/parse-i3s.js +1 -1
- package/dist/esm/lib/parsers/parse-i3s.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/i3s-content-worker.js +23 -13
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/lib/helpers/i3s-nodepages-tiles.d.ts +1 -0
- package/dist/lib/helpers/i3s-nodepages-tiles.d.ts.map +1 -1
- package/dist/lib/helpers/i3s-nodepages-tiles.js +9 -3
- 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 +45 -0
- package/dist/lib/parsers/parse-i3s-tile-content.js +2 -1
- package/dist/lib/parsers/parse-i3s.js +1 -1
- package/dist/types.d.ts +272 -31
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/arcgis-webscene-loader.ts +31 -0
- package/src/index.ts +5 -1
- package/src/lib/helpers/i3s-nodepages-tiles.ts +11 -3
- package/src/lib/parsers/parse-arcgis-webscene.ts +51 -0
- package/src/lib/parsers/parse-i3s-tile-content.ts +2 -1
- package/src/lib/parsers/parse-i3s.ts +1 -1
- package/src/types.ts +284 -31
|
@@ -28,6 +28,7 @@ export default class I3SNodePagesTiles {
|
|
|
28
28
|
options: LoaderOptions;
|
|
29
29
|
lodSelectionMetricType?: string;
|
|
30
30
|
textureDefinitionsSelectedFormats: ({format: I3STextureFormat; name: string} | null)[] = [];
|
|
31
|
+
nodesInNodePages: number;
|
|
31
32
|
private textureLoaderOptions: {[key: string]: any} = {};
|
|
32
33
|
|
|
33
34
|
/**
|
|
@@ -41,6 +42,7 @@ export default class I3SNodePagesTiles {
|
|
|
41
42
|
this.nodesPerPage = tileset.nodePages?.nodesPerPage || 64;
|
|
42
43
|
this.lodSelectionMetricType = tileset.nodePages?.lodSelectionMetricType;
|
|
43
44
|
this.options = options;
|
|
45
|
+
this.nodesInNodePages = 0;
|
|
44
46
|
|
|
45
47
|
this.initSelectedFormatsForTextureDefinitions(tileset);
|
|
46
48
|
}
|
|
@@ -61,6 +63,7 @@ export default class I3SNodePagesTiles {
|
|
|
61
63
|
promise: load(nodePageUrl, I3SNodePageLoader, this.options)
|
|
62
64
|
};
|
|
63
65
|
this.nodePages[pageIndex] = await this.pendingNodePages[pageIndex].promise;
|
|
66
|
+
this.nodesInNodePages += this.nodePages[pageIndex].nodes.length;
|
|
64
67
|
this.pendingNodePages[pageIndex].status = 'Done';
|
|
65
68
|
}
|
|
66
69
|
if (this.pendingNodePages[pageIndex].status === 'Pending') {
|
|
@@ -74,14 +77,19 @@ export default class I3SNodePagesTiles {
|
|
|
74
77
|
* Forms tile header using node and tileset data
|
|
75
78
|
* @param id - id of node through all node pages
|
|
76
79
|
*/
|
|
77
|
-
// eslint-disable-next-line complexity
|
|
80
|
+
// eslint-disable-next-line complexity, max-statements
|
|
78
81
|
async formTileFromNodePages(id: number): Promise<I3STileHeader> {
|
|
79
82
|
const node: NodeInPage = await this.getNodeById(id);
|
|
80
83
|
const children: {id: string; obb: Obb}[] = [];
|
|
84
|
+
const childNodesPromises: Promise<NodeInPage>[] = [];
|
|
81
85
|
for (const child of node.children || []) {
|
|
82
|
-
|
|
86
|
+
childNodesPromises.push(this.getNodeById(child));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const childNodes = await Promise.all(childNodesPromises);
|
|
90
|
+
for (const childNode of childNodes) {
|
|
83
91
|
children.push({
|
|
84
|
-
id:
|
|
92
|
+
id: childNode.index.toString(),
|
|
85
93
|
obb: childNode.obb
|
|
86
94
|
});
|
|
87
95
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type {ArcGisWebSceneData, OperationalLayer} from '../../types';
|
|
2
|
+
|
|
3
|
+
const ARCGIS_SCENE_SERVER_LAYER_TYPE = 'ArcGISSceneServiceLayer';
|
|
4
|
+
const BUILDING_SCENE_LAYER = 'BuildingSceneLayer';
|
|
5
|
+
const INTEGRATED_MESH_LAYER = 'IntegratedMeshLayer';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Supported layers list
|
|
9
|
+
* Possible operational layers in WebScene: https://developers.arcgis.com/web-scene-specification/objects/operationalLayers/
|
|
10
|
+
*/
|
|
11
|
+
const SUPPORTED_LAYERS_TYPES = [
|
|
12
|
+
ARCGIS_SCENE_SERVER_LAYER_TYPE,
|
|
13
|
+
INTEGRATED_MESH_LAYER,
|
|
14
|
+
BUILDING_SCENE_LAYER
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Parses ArcGIS WebScene
|
|
19
|
+
* @param data
|
|
20
|
+
*/
|
|
21
|
+
export async function parseWebscene(data: ArrayBuffer): Promise<ArcGisWebSceneData> {
|
|
22
|
+
const layer0 = JSON.parse(new TextDecoder().decode(data));
|
|
23
|
+
const {operationalLayers} = layer0;
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
header: layer0,
|
|
27
|
+
layers: parseOperationalLayers(operationalLayers)
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Recursively parses WebScene operational layers.
|
|
33
|
+
* @param layersList
|
|
34
|
+
*/
|
|
35
|
+
function parseOperationalLayers(layersList: OperationalLayer[]): OperationalLayer[] {
|
|
36
|
+
let layers: OperationalLayer[] = [];
|
|
37
|
+
|
|
38
|
+
for (let index = 0; index < layersList.length; index++) {
|
|
39
|
+
const layer = layersList[index];
|
|
40
|
+
|
|
41
|
+
if (SUPPORTED_LAYERS_TYPES.includes(layer.layerType)) {
|
|
42
|
+
layers.push(layer);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (layer.layers?.length) {
|
|
46
|
+
layers = [...layers, ...parseOperationalLayers(layer.layers)];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return layers;
|
|
51
|
+
}
|
|
@@ -109,6 +109,7 @@ async function parseI3SNodeGeometry(
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
const content = tile.content;
|
|
112
|
+
const contentByteLength = arrayBuffer.byteLength;
|
|
112
113
|
let attributes: I3SMeshAttributes;
|
|
113
114
|
let vertexCount: number;
|
|
114
115
|
let byteOffset: number = 0;
|
|
@@ -216,7 +217,7 @@ async function parseI3SNodeGeometry(
|
|
|
216
217
|
}
|
|
217
218
|
|
|
218
219
|
content.vertexCount = vertexCount;
|
|
219
|
-
content.byteLength =
|
|
220
|
+
content.byteLength = contentByteLength;
|
|
220
221
|
|
|
221
222
|
return tile;
|
|
222
223
|
}
|
|
@@ -82,7 +82,7 @@ export async function normalizeTilesetData(tileset : I3STilesetHeader, options :
|
|
|
82
82
|
|
|
83
83
|
if (tileset.nodePages) {
|
|
84
84
|
tileset.nodePagesTile = new I3SNodePagesTiles(tileset, options);
|
|
85
|
-
tileset.root =
|
|
85
|
+
tileset.root = tileset.nodePagesTile.formTileFromNodePages(0);
|
|
86
86
|
} else {
|
|
87
87
|
const rootNodeUrl = getUrlWithToken(`${tileset.url}/nodes/root`, options.i3s?.token);
|
|
88
88
|
// eslint-disable-next-line no-use-before-define
|
package/src/types.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type {GLTFMaterial} from '@loaders.gl/gltf';
|
|
2
1
|
import type {Matrix4, Quaternion, Vector3} from '@math.gl/core';
|
|
3
2
|
import type {TypedArray, MeshAttribute, TextureLevel} from '@loaders.gl/schema';
|
|
4
3
|
|
|
@@ -222,34 +221,34 @@ export type I3SMaterialDefinition = {
|
|
|
222
221
|
/** 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. */
|
|
223
222
|
pbrMetallicRoughness: I3SPbrMetallicRoughness;
|
|
224
223
|
/** The normal texture map. */
|
|
225
|
-
normalTexture
|
|
224
|
+
normalTexture?: I3SMaterialTexture;
|
|
226
225
|
/** The occlusion texture map. */
|
|
227
|
-
occlusionTexture
|
|
226
|
+
occlusionTexture?: I3SMaterialTexture;
|
|
228
227
|
/** The emissive texture map. */
|
|
229
|
-
emissiveTexture
|
|
228
|
+
emissiveTexture?: I3SMaterialTexture;
|
|
230
229
|
/** The emissive color of the material. */
|
|
231
|
-
emissiveFactor
|
|
230
|
+
emissiveFactor?: [number, number, number];
|
|
232
231
|
/** Defines the meaning of the alpha-channel/alpha-mask. */
|
|
233
232
|
alphaMode: 'opaque' | 'mask' | 'blend';
|
|
234
233
|
/** The alpha cutoff value of the material. */
|
|
235
|
-
alphaCutoff
|
|
234
|
+
alphaCutoff?: number;
|
|
236
235
|
/** Specifies whether the material is double sided. */
|
|
237
|
-
doubleSided
|
|
236
|
+
doubleSided?: boolean;
|
|
238
237
|
/** Winding order is counterclockwise. */
|
|
239
|
-
cullFace
|
|
238
|
+
cullFace?: 'none' | 'front' | 'back';
|
|
240
239
|
};
|
|
241
240
|
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/pbrMetallicRoughness.cmn.md */
|
|
242
241
|
export type I3SPbrMetallicRoughness = {
|
|
243
242
|
/** The material's base color factor. default=[1,1,1,1] */
|
|
244
|
-
baseColorFactor
|
|
243
|
+
baseColorFactor?: [number, number, number, number];
|
|
245
244
|
/** The base color texture. */
|
|
246
|
-
baseColorTexture
|
|
245
|
+
baseColorTexture?: I3SMaterialTexture;
|
|
247
246
|
/** the metalness of the material. default=1.0 */
|
|
248
247
|
metallicFactor: number;
|
|
249
248
|
/** the roughness of the material. default=1.0 */
|
|
250
249
|
roughnessFactor: number;
|
|
251
250
|
/** the metallic-roughness texture. */
|
|
252
|
-
metallicRoughnessTexture
|
|
251
|
+
metallicRoughnessTexture?: I3SMaterialTexture;
|
|
253
252
|
};
|
|
254
253
|
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialTexture.cmn.md */
|
|
255
254
|
export type I3SMaterialTexture = {
|
|
@@ -398,27 +397,83 @@ export type NodeInPage = {
|
|
|
398
397
|
mesh?: NodeMesh;
|
|
399
398
|
};
|
|
400
399
|
|
|
400
|
+
/**
|
|
401
|
+
* https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialDefinitionInfo.cmn.md
|
|
402
|
+
*/
|
|
403
|
+
export type MaterialDefinitionInfo = {
|
|
404
|
+
/** A name for the material as assigned in the creating application. */
|
|
405
|
+
name?: string;
|
|
406
|
+
/** Indicates the material type, chosen from the supported values. */
|
|
407
|
+
type?: 'standard' | 'water' | 'billboard' | 'leafcard' | 'reference';
|
|
408
|
+
/** The href that resolves to the shared resource bundle in which the material definition is contained. */
|
|
409
|
+
$ref?: string;
|
|
410
|
+
/** Parameter defined for the material.
|
|
411
|
+
* https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialParams.cmn.md
|
|
412
|
+
*/
|
|
413
|
+
params: {
|
|
414
|
+
/** Indicates transparency of this material; 0 = opaque, 1 = fully transparent. */
|
|
415
|
+
transparency?: number;
|
|
416
|
+
/** Indicates reflectivity of this material. */
|
|
417
|
+
reflectivity?: number;
|
|
418
|
+
/** Indicates shininess of this material. */
|
|
419
|
+
shininess?: number;
|
|
420
|
+
/** Ambient color of this material. Ambient color is the color of an object where it is in shadow.
|
|
421
|
+
* This color is what the object reflects when illuminated by ambient light rather than direct light. */
|
|
422
|
+
ambient?: number[];
|
|
423
|
+
/** Diffuse color of this material. Diffuse color is the most instinctive meaning of the color of an object.
|
|
424
|
+
* It is that essential color that the object reveals under pure white light. It is perceived as the color
|
|
425
|
+
* of the object itself rather than a reflection of the light. */
|
|
426
|
+
diffuse?: number[];
|
|
427
|
+
/** Specular color of this material. Specular color is the color of the light of a specular reflection
|
|
428
|
+
* (specular reflection is the type of reflection that is characteristic of light reflected from a shiny
|
|
429
|
+
* surface). */
|
|
430
|
+
specular?: number[];
|
|
431
|
+
/** Rendering mode. */
|
|
432
|
+
renderMode: 'textured' | 'solid' | 'untextured' | 'wireframe';
|
|
433
|
+
/** TRUE if features with this material should cast shadows. */
|
|
434
|
+
castShadows?: boolean;
|
|
435
|
+
/** TRUE if features with this material should receive shadows */
|
|
436
|
+
receiveShadows?: boolean;
|
|
437
|
+
/** Indicates the material culling options {back, front, none}. */
|
|
438
|
+
cullFace?: string;
|
|
439
|
+
/** This flag indicates that the vertex color attribute of the geometry should be used to color the geometry
|
|
440
|
+
* for rendering. If texture is present, the vertex colors are multiplied by this color.
|
|
441
|
+
* e.g. pixel_color = [interpolated]vertex_color * texel_color. Default is false. */
|
|
442
|
+
vertexColors?: boolean;
|
|
443
|
+
/** This flag indicates that the geometry has uv region vertex attributes. These are used for adressing
|
|
444
|
+
* subtextures in a texture atlas. The uv coordinates are relative to this subtexture in this case.
|
|
445
|
+
* This is mostly useful for repeated textures in a texture atlas. Default is false. */
|
|
446
|
+
vertexRegions?: boolean;
|
|
447
|
+
/** Indicates whether Vertex Colors also contain a transparency channel. Default is false. */
|
|
448
|
+
useVertexColorAlpha?: boolean;
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/sharedResource.cmn.md */
|
|
401
453
|
export type SharedResources = {
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
454
|
+
/** Materials describe how a Feature or a set of Features is to be rendered. */
|
|
455
|
+
materialDefinitions?: {[key: string]: MaterialDefinitionInfo};
|
|
456
|
+
/** A Texture is a set of images, with some parameters specific to the texture/uv mapping to geometries. */
|
|
457
|
+
textureDefinitions?: {[key: string]: TextureDefinitionInfo};
|
|
405
458
|
};
|
|
406
459
|
|
|
460
|
+
/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/image.cmn.md */
|
|
407
461
|
type TextureImage = {
|
|
462
|
+
/** A unique ID for each image. Generated using the BuildID function. */
|
|
408
463
|
id: string;
|
|
464
|
+
/** width of this image, in pixels. */
|
|
409
465
|
size?: number;
|
|
466
|
+
/** The maximum size of a single pixel in world units.
|
|
467
|
+
* This property is used by the client to pick the image to load and render. */
|
|
410
468
|
pixelInWorldUnits?: number;
|
|
469
|
+
/** The href to the image(s), one per encoding, in the same order as the encodings. */
|
|
411
470
|
href?: string[];
|
|
471
|
+
/** The byte offset of this image's encodings. There is one per encoding,
|
|
472
|
+
* in the same order as the encodings, in the block in which this texture image resides. */
|
|
412
473
|
byteOffset?: string[];
|
|
474
|
+
/** The length in bytes of this image's encodings. There is one per encoding,
|
|
475
|
+
* in the same order as the encodings. */
|
|
413
476
|
length?: number[];
|
|
414
|
-
mimeType?: string;
|
|
415
|
-
bufferView?: {
|
|
416
|
-
data: ArrayBuffer;
|
|
417
|
-
};
|
|
418
|
-
image?: {
|
|
419
|
-
height: number;
|
|
420
|
-
width: number;
|
|
421
|
-
};
|
|
422
477
|
};
|
|
423
478
|
|
|
424
479
|
export type Attribute = 'OBJECTID' | 'string' | 'double' | 'Int32' | string;
|
|
@@ -527,28 +582,37 @@ export type SpatialReference = {
|
|
|
527
582
|
};
|
|
528
583
|
|
|
529
584
|
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/fullExtent.cmn.md */
|
|
530
|
-
type FullExtent = {
|
|
531
|
-
/** left */
|
|
585
|
+
export type FullExtent = {
|
|
586
|
+
/** left longitude in decimal degrees */
|
|
532
587
|
xmin: number;
|
|
533
|
-
/** right */
|
|
588
|
+
/** right longitude in decimal degrees */
|
|
534
589
|
xmax: number;
|
|
535
|
-
/** bottom */
|
|
590
|
+
/** bottom latitude in decimal degrees*/
|
|
536
591
|
ymin: number;
|
|
537
|
-
/** top */
|
|
592
|
+
/** top latitude in decimal degrees*/
|
|
538
593
|
ymax: number;
|
|
539
|
-
/** lowest elevation */
|
|
594
|
+
/** lowest elevation in meters */
|
|
540
595
|
zmin: number;
|
|
541
|
-
/** highest elevation */
|
|
596
|
+
/** highest elevation in meters */
|
|
542
597
|
zmax: number;
|
|
543
598
|
spatialReference?: SpatialReference;
|
|
544
599
|
};
|
|
545
600
|
|
|
546
|
-
|
|
547
|
-
|
|
601
|
+
/**
|
|
602
|
+
* https://github.com/Esri/i3s-spec/blob/master/docs/1.8/textureDefinitionInfo.cmn.md
|
|
603
|
+
*/
|
|
604
|
+
export type TextureDefinitionInfo = {
|
|
605
|
+
/** MIMEtype - The encoding/content type that is used by all images in this map */
|
|
606
|
+
encoding?: string[];
|
|
607
|
+
/** UV wrapping modes, from {none, repeat, mirror}. */
|
|
548
608
|
wrap?: string[];
|
|
609
|
+
/** TRUE if the Map represents a texture atlas. */
|
|
549
610
|
atlas?: boolean;
|
|
611
|
+
/** The name of the UV set to be used as texture coordinates. */
|
|
550
612
|
uvSet?: string;
|
|
613
|
+
/** Indicates channels description. */
|
|
551
614
|
channels?: 'rbg' | 'rgba' | string;
|
|
615
|
+
/** An image is a binary resource, containing a single raster that can be used to texture a feature or symbol. */
|
|
552
616
|
images: TextureImage[];
|
|
553
617
|
};
|
|
554
618
|
|
|
@@ -707,3 +771,192 @@ export type FieldInfo = {
|
|
|
707
771
|
isEditable: boolean;
|
|
708
772
|
label: string;
|
|
709
773
|
};
|
|
774
|
+
|
|
775
|
+
export type ArcGisWebSceneData = {
|
|
776
|
+
header: ArcGisWebScene;
|
|
777
|
+
layers: OperationalLayer[];
|
|
778
|
+
};
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* ArcGis WebScene spec - https://developers.arcgis.com/web-scene-specification/objects/webscene/
|
|
782
|
+
*/
|
|
783
|
+
export type ArcGisWebScene = {
|
|
784
|
+
/**
|
|
785
|
+
* @todo add type.
|
|
786
|
+
* Spec - https://developers.arcgis.com/web-scene-specification/objects/applicationProperties/
|
|
787
|
+
* Configuration of application and UI elements.
|
|
788
|
+
*/
|
|
789
|
+
applicationProperties?: any;
|
|
790
|
+
/**
|
|
791
|
+
* Operational layers contain business data which are used to make thematic scenes.
|
|
792
|
+
*/
|
|
793
|
+
operationalLayers: OperationalLayer[];
|
|
794
|
+
/**
|
|
795
|
+
* Basemaps give the web scene a geographic context.
|
|
796
|
+
*/
|
|
797
|
+
baseMap: BaseMap;
|
|
798
|
+
/**
|
|
799
|
+
* Ground defines the main surface of the web scene, based on elevation layers.
|
|
800
|
+
*/
|
|
801
|
+
ground: Ground;
|
|
802
|
+
/**
|
|
803
|
+
* An object that defines the characteristics of the vertical coordinate system used by the web scene.
|
|
804
|
+
*/
|
|
805
|
+
heightModelInfo: HeightModelInfo;
|
|
806
|
+
/**
|
|
807
|
+
* Root element in the web scene specifying a string value indicating the web scene version.
|
|
808
|
+
* 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
|
|
809
|
+
*/
|
|
810
|
+
version: string;
|
|
811
|
+
/**
|
|
812
|
+
* String value indicating the application which authored the webmap
|
|
813
|
+
*/
|
|
814
|
+
authoringApp: string;
|
|
815
|
+
/**
|
|
816
|
+
* String value indicating the authoring App's version number.
|
|
817
|
+
*/
|
|
818
|
+
authoringAppVersion: string;
|
|
819
|
+
/**
|
|
820
|
+
* A presentation consists of multiple slides, where each slide is a specific view into the web scene.
|
|
821
|
+
* Spec - https://developers.arcgis.com/web-scene-specification/objects/presentation/
|
|
822
|
+
* @todo Add presentation type.
|
|
823
|
+
*/
|
|
824
|
+
presentation: any;
|
|
825
|
+
/**
|
|
826
|
+
* An object that provides information about the initial environment settings and viewpoint of the web scene.
|
|
827
|
+
*/
|
|
828
|
+
initialState: InitialState;
|
|
829
|
+
/**
|
|
830
|
+
* An object used to specify the spatial reference of the given geometry.
|
|
831
|
+
*/
|
|
832
|
+
spatialReference: SpatialReference;
|
|
833
|
+
viewingMode: 'global' | 'local';
|
|
834
|
+
/**
|
|
835
|
+
* @todo add type.
|
|
836
|
+
* Defines area to be clipped for display.
|
|
837
|
+
*/
|
|
838
|
+
clippingArea?: any;
|
|
839
|
+
/**
|
|
840
|
+
* @todo add type.
|
|
841
|
+
* Spec - https://developers.arcgis.com/web-scene-specification/objects/mapFloorInfo/
|
|
842
|
+
* Contains floor-awareness information for the web scene.
|
|
843
|
+
*/
|
|
844
|
+
mapFloorInfo?: any;
|
|
845
|
+
/**
|
|
846
|
+
* @todo add type.
|
|
847
|
+
* Spec - https://developers.arcgis.com/web-scene-specification/objects/mapRangeInfo/
|
|
848
|
+
* Map Range Information
|
|
849
|
+
*/
|
|
850
|
+
mapRangeInfo?: any;
|
|
851
|
+
/**
|
|
852
|
+
* @todo add type.
|
|
853
|
+
* Spec - https://developers.arcgis.com/web-scene-specification/objects/table/
|
|
854
|
+
* An array of table objects.
|
|
855
|
+
*/
|
|
856
|
+
tables?: any;
|
|
857
|
+
/**
|
|
858
|
+
* @todo add type.
|
|
859
|
+
* Spec - https://developers.arcgis.com/web-scene-specification/objects/transportationNetwork/
|
|
860
|
+
* Used to specify the transportation networks of the scene.
|
|
861
|
+
*/
|
|
862
|
+
transportationNetworks?: any;
|
|
863
|
+
/**
|
|
864
|
+
* @todo add type.
|
|
865
|
+
* Spec - https://developers.arcgis.com/web-scene-specification/objects/widgets/
|
|
866
|
+
* The widgets object contains widgets that should be exposed to the user.
|
|
867
|
+
*/
|
|
868
|
+
widgets?: any;
|
|
869
|
+
};
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* Operational layers contain your data. Usually, a basemap sits beneath your operational layers to give them geographic context.
|
|
873
|
+
* Spec- https://developers.arcgis.com/web-scene-specification/objects/operationalLayers/
|
|
874
|
+
*/
|
|
875
|
+
export type OperationalLayer = {
|
|
876
|
+
id: string;
|
|
877
|
+
opacity: number;
|
|
878
|
+
title: string;
|
|
879
|
+
url: string;
|
|
880
|
+
visibility: boolean;
|
|
881
|
+
itemId: string;
|
|
882
|
+
layerType: string;
|
|
883
|
+
LayerDefinition: LayerDefinition;
|
|
884
|
+
screenSizePerspective: boolean;
|
|
885
|
+
showLabels?: boolean;
|
|
886
|
+
disablePopup?: boolean;
|
|
887
|
+
showLegend?: boolean;
|
|
888
|
+
layers?: OperationalLayer[];
|
|
889
|
+
};
|
|
890
|
+
|
|
891
|
+
type LayerDefinition = {
|
|
892
|
+
elevationInfo: ElevationInfo;
|
|
893
|
+
drawingInfo: DrawingInfo;
|
|
894
|
+
};
|
|
895
|
+
|
|
896
|
+
type BaseMap = {
|
|
897
|
+
id: string;
|
|
898
|
+
title: string;
|
|
899
|
+
baseMapLayers: BaseMapLayer[];
|
|
900
|
+
elevationLayers: ElevationLayer[];
|
|
901
|
+
};
|
|
902
|
+
|
|
903
|
+
type BaseMapLayer = {
|
|
904
|
+
id: string;
|
|
905
|
+
opacity: number;
|
|
906
|
+
title: string;
|
|
907
|
+
url: string;
|
|
908
|
+
visibility: boolean;
|
|
909
|
+
layerType: string;
|
|
910
|
+
};
|
|
911
|
+
|
|
912
|
+
type ElevationLayer = {
|
|
913
|
+
id: string;
|
|
914
|
+
listMode: string;
|
|
915
|
+
title: string;
|
|
916
|
+
url: string;
|
|
917
|
+
visibility: boolean;
|
|
918
|
+
layerType: string;
|
|
919
|
+
};
|
|
920
|
+
|
|
921
|
+
type Ground = {
|
|
922
|
+
layers: ElevationLayer[];
|
|
923
|
+
transparency: number;
|
|
924
|
+
navigationConstraint: NavigationConstraint;
|
|
925
|
+
};
|
|
926
|
+
|
|
927
|
+
type NavigationConstraint = {
|
|
928
|
+
type: string;
|
|
929
|
+
};
|
|
930
|
+
|
|
931
|
+
type InitialState = {
|
|
932
|
+
environment: Enviroment;
|
|
933
|
+
viewpoint: ViewPoint;
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
type Enviroment = {
|
|
937
|
+
lighting: Lighting;
|
|
938
|
+
atmosphereEnabled?: string;
|
|
939
|
+
starsEnabled?: string;
|
|
940
|
+
};
|
|
941
|
+
|
|
942
|
+
type Lighting = {
|
|
943
|
+
datetime?: number;
|
|
944
|
+
displayUTCOffset?: number;
|
|
945
|
+
};
|
|
946
|
+
|
|
947
|
+
type ViewPoint = {
|
|
948
|
+
camera: Camera;
|
|
949
|
+
};
|
|
950
|
+
|
|
951
|
+
type Camera = {
|
|
952
|
+
position: CameraPosition;
|
|
953
|
+
heading: number;
|
|
954
|
+
tilt: number;
|
|
955
|
+
};
|
|
956
|
+
|
|
957
|
+
type CameraPosition = {
|
|
958
|
+
spatialReference: SpatialReference;
|
|
959
|
+
x: number;
|
|
960
|
+
y: number;
|
|
961
|
+
z: number;
|
|
962
|
+
};
|