@loaders.gl/i3s 3.1.7 → 3.2.0-alpha.2
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/dist.min.js +118 -62
- package/dist/es5/i3s-attribute-loader.js +1 -1
- package/dist/es5/i3s-attribute-loader.js.map +1 -1
- package/dist/es5/i3s-building-scene-layer-loader.js +1 -1
- package/dist/es5/i3s-building-scene-layer-loader.js.map +1 -1
- package/dist/es5/i3s-content-loader.js +1 -1
- package/dist/es5/i3s-content-loader.js.map +1 -1
- package/dist/es5/i3s-loader.js +1 -1
- package/dist/es5/i3s-loader.js.map +1 -1
- package/dist/es5/i3s-node-page-loader.js +1 -1
- package/dist/es5/i3s-node-page-loader.js.map +1 -1
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/lib/helpers/i3s-nodepages-tiles.js +43 -52
- package/dist/es5/lib/helpers/i3s-nodepages-tiles.js.map +1 -1
- package/dist/es5/lib/parsers/parse-i3s-tile-content.js +46 -42
- 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/i3s-attribute-loader.js +1 -1
- package/dist/esm/i3s-attribute-loader.js.map +1 -1
- package/dist/esm/i3s-building-scene-layer-loader.js +1 -1
- package/dist/esm/i3s-building-scene-layer-loader.js.map +1 -1
- package/dist/esm/i3s-content-loader.js +1 -1
- package/dist/esm/i3s-content-loader.js.map +1 -1
- package/dist/esm/i3s-loader.js +1 -1
- package/dist/esm/i3s-loader.js.map +1 -1
- package/dist/esm/i3s-node-page-loader.js +1 -1
- package/dist/esm/i3s-node-page-loader.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/helpers/i3s-nodepages-tiles.js +8 -2
- package/dist/esm/lib/helpers/i3s-nodepages-tiles.js.map +1 -1
- package/dist/esm/lib/parsers/parse-i3s-tile-content.js +33 -29
- 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-building-scene-layer-loader.js +1 -1
- package/dist/i3s-content-loader.js +1 -1
- package/dist/i3s-content-worker.js +141 -68
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/lib/helpers/i3s-nodepages-tiles.d.ts.map +1 -1
- package/dist/lib/helpers/i3s-nodepages-tiles.js +7 -3
- package/dist/lib/parsers/parse-i3s-tile-content.d.ts.map +1 -1
- package/dist/lib/parsers/parse-i3s-tile-content.js +33 -29
- package/dist/lib/parsers/parse-i3s.js +1 -1
- package/dist/types.d.ts +100 -34
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/i3s-building-scene-layer-loader.ts +1 -1
- package/src/i3s-content-loader.ts +1 -1
- package/src/index.ts +4 -1
- package/src/lib/helpers/i3s-nodepages-tiles.ts +8 -3
- package/src/lib/parsers/parse-i3s-tile-content.ts +37 -32
- package/src/lib/parsers/parse-i3s.ts +1 -1
- package/src/types.ts +97 -34
package/src/types.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {TypedArray, MeshAttribute} from '@loaders.gl/schema';
|
|
3
|
-
import type {TextureLevel} from '@loaders.gl/textures/src/types';
|
|
4
|
-
import {Matrix4, Quaternion, Vector3} from '@math.gl/core';
|
|
1
|
+
import type {Matrix4, Quaternion, Vector3} from '@math.gl/core';
|
|
2
|
+
import type {TypedArray, MeshAttribute, TextureLevel} from '@loaders.gl/schema';
|
|
5
3
|
|
|
6
4
|
export enum DATA_TYPE {
|
|
7
5
|
UInt8 = 'UInt8',
|
|
@@ -223,34 +221,34 @@ export type I3SMaterialDefinition = {
|
|
|
223
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. */
|
|
224
222
|
pbrMetallicRoughness: I3SPbrMetallicRoughness;
|
|
225
223
|
/** The normal texture map. */
|
|
226
|
-
normalTexture
|
|
224
|
+
normalTexture?: I3SMaterialTexture;
|
|
227
225
|
/** The occlusion texture map. */
|
|
228
|
-
occlusionTexture
|
|
226
|
+
occlusionTexture?: I3SMaterialTexture;
|
|
229
227
|
/** The emissive texture map. */
|
|
230
|
-
emissiveTexture
|
|
228
|
+
emissiveTexture?: I3SMaterialTexture;
|
|
231
229
|
/** The emissive color of the material. */
|
|
232
|
-
emissiveFactor
|
|
230
|
+
emissiveFactor?: [number, number, number];
|
|
233
231
|
/** Defines the meaning of the alpha-channel/alpha-mask. */
|
|
234
232
|
alphaMode: 'opaque' | 'mask' | 'blend';
|
|
235
233
|
/** The alpha cutoff value of the material. */
|
|
236
|
-
alphaCutoff
|
|
234
|
+
alphaCutoff?: number;
|
|
237
235
|
/** Specifies whether the material is double sided. */
|
|
238
|
-
doubleSided
|
|
236
|
+
doubleSided?: boolean;
|
|
239
237
|
/** Winding order is counterclockwise. */
|
|
240
|
-
cullFace
|
|
238
|
+
cullFace?: 'none' | 'front' | 'back';
|
|
241
239
|
};
|
|
242
240
|
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/pbrMetallicRoughness.cmn.md */
|
|
243
241
|
export type I3SPbrMetallicRoughness = {
|
|
244
242
|
/** The material's base color factor. default=[1,1,1,1] */
|
|
245
|
-
baseColorFactor
|
|
243
|
+
baseColorFactor?: [number, number, number, number];
|
|
246
244
|
/** The base color texture. */
|
|
247
|
-
baseColorTexture
|
|
245
|
+
baseColorTexture?: I3SMaterialTexture;
|
|
248
246
|
/** the metalness of the material. default=1.0 */
|
|
249
247
|
metallicFactor: number;
|
|
250
248
|
/** the roughness of the material. default=1.0 */
|
|
251
249
|
roughnessFactor: number;
|
|
252
250
|
/** the metallic-roughness texture. */
|
|
253
|
-
metallicRoughnessTexture
|
|
251
|
+
metallicRoughnessTexture?: I3SMaterialTexture;
|
|
254
252
|
};
|
|
255
253
|
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialTexture.cmn.md */
|
|
256
254
|
export type I3SMaterialTexture = {
|
|
@@ -399,27 +397,83 @@ export type NodeInPage = {
|
|
|
399
397
|
mesh?: NodeMesh;
|
|
400
398
|
};
|
|
401
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 */
|
|
402
453
|
export type SharedResources = {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
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};
|
|
406
458
|
};
|
|
407
459
|
|
|
460
|
+
/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/image.cmn.md */
|
|
408
461
|
type TextureImage = {
|
|
462
|
+
/** A unique ID for each image. Generated using the BuildID function. */
|
|
409
463
|
id: string;
|
|
464
|
+
/** width of this image, in pixels. */
|
|
410
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. */
|
|
411
468
|
pixelInWorldUnits?: number;
|
|
469
|
+
/** The href to the image(s), one per encoding, in the same order as the encodings. */
|
|
412
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. */
|
|
413
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. */
|
|
414
476
|
length?: number[];
|
|
415
|
-
mimeType?: string;
|
|
416
|
-
bufferView?: {
|
|
417
|
-
data: ArrayBuffer;
|
|
418
|
-
};
|
|
419
|
-
image?: {
|
|
420
|
-
height: number;
|
|
421
|
-
width: number;
|
|
422
|
-
};
|
|
423
477
|
};
|
|
424
478
|
|
|
425
479
|
export type Attribute = 'OBJECTID' | 'string' | 'double' | 'Int32' | string;
|
|
@@ -528,28 +582,37 @@ export type SpatialReference = {
|
|
|
528
582
|
};
|
|
529
583
|
|
|
530
584
|
/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/fullExtent.cmn.md */
|
|
531
|
-
type FullExtent = {
|
|
532
|
-
/** left */
|
|
585
|
+
export type FullExtent = {
|
|
586
|
+
/** left longitude in decimal degrees */
|
|
533
587
|
xmin: number;
|
|
534
|
-
/** right */
|
|
588
|
+
/** right longitude in decimal degrees */
|
|
535
589
|
xmax: number;
|
|
536
|
-
/** bottom */
|
|
590
|
+
/** bottom latitude in decimal degrees*/
|
|
537
591
|
ymin: number;
|
|
538
|
-
/** top */
|
|
592
|
+
/** top latitude in decimal degrees*/
|
|
539
593
|
ymax: number;
|
|
540
|
-
/** lowest elevation */
|
|
594
|
+
/** lowest elevation in meters */
|
|
541
595
|
zmin: number;
|
|
542
|
-
/** highest elevation */
|
|
596
|
+
/** highest elevation in meters */
|
|
543
597
|
zmax: number;
|
|
544
598
|
spatialReference?: SpatialReference;
|
|
545
599
|
};
|
|
546
600
|
|
|
547
|
-
|
|
548
|
-
|
|
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}. */
|
|
549
608
|
wrap?: string[];
|
|
609
|
+
/** TRUE if the Map represents a texture atlas. */
|
|
550
610
|
atlas?: boolean;
|
|
611
|
+
/** The name of the UV set to be used as texture coordinates. */
|
|
551
612
|
uvSet?: string;
|
|
613
|
+
/** Indicates channels description. */
|
|
552
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. */
|
|
553
616
|
images: TextureImage[];
|
|
554
617
|
};
|
|
555
618
|
|