@itwin/core-frontend 4.0.0-dev.17 → 4.0.0-dev.18
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/lib/cjs/IModelApp.d.ts +1 -3
- package/lib/cjs/IModelApp.d.ts.map +1 -1
- package/lib/cjs/IModelApp.js +1 -3
- package/lib/cjs/IModelApp.js.map +1 -1
- package/lib/cjs/render/RealityMeshParams.d.ts +2 -2
- package/lib/cjs/render/RealityMeshParams.d.ts.map +1 -1
- package/lib/cjs/render/RealityMeshParams.js +1 -1
- package/lib/cjs/render/RealityMeshParams.js.map +1 -1
- package/lib/cjs/tile/RealityTile.d.ts +1 -1
- package/lib/cjs/tile/RealityTile.js +1 -1
- package/lib/cjs/tile/RealityTile.js.map +1 -1
- package/lib/cjs/tile/RealityTileTree.d.ts +1 -1
- package/lib/cjs/tile/RealityTileTree.js +1 -1
- package/lib/cjs/tile/RealityTileTree.js.map +1 -1
- package/lib/cjs/tile/TileAdmin.d.ts +5 -1
- package/lib/cjs/tile/TileAdmin.d.ts.map +1 -1
- package/lib/cjs/tile/TileAdmin.js.map +1 -1
- package/lib/cjs/tile/TileRequest.d.ts.map +1 -1
- package/lib/cjs/tile/TileRequest.js +2 -1
- package/lib/cjs/tile/TileRequest.js.map +1 -1
- package/lib/cjs/tile/TileRequestChannel.d.ts +23 -1
- package/lib/cjs/tile/TileRequestChannel.d.ts.map +1 -1
- package/lib/cjs/tile/TileRequestChannel.js +28 -7
- package/lib/cjs/tile/TileRequestChannel.js.map +1 -1
- package/lib/cjs/tile/map/EllipsoidTerrainProvider.d.ts +11 -3
- package/lib/cjs/tile/map/EllipsoidTerrainProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/EllipsoidTerrainProvider.js +17 -5
- package/lib/cjs/tile/map/EllipsoidTerrainProvider.js.map +1 -1
- package/lib/cjs/tile/map/MapCartoRectangle.d.ts +1 -1
- package/lib/cjs/tile/map/MapCartoRectangle.js +1 -1
- package/lib/cjs/tile/map/MapCartoRectangle.js.map +1 -1
- package/lib/cjs/tile/map/MapTile.d.ts +2 -2
- package/lib/cjs/tile/map/MapTile.js +2 -2
- package/lib/cjs/tile/map/MapTile.js.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.d.ts +1 -1
- package/lib/cjs/tile/map/MapTileTree.js +1 -1
- package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
- package/lib/cjs/tile/map/MapTilingScheme.d.ts +1 -1
- package/lib/cjs/tile/map/MapTilingScheme.js +1 -1
- package/lib/cjs/tile/map/MapTilingScheme.js.map +1 -1
- package/lib/cjs/tile/map/QuadId.d.ts +1 -1
- package/lib/cjs/tile/map/QuadId.js +1 -1
- package/lib/cjs/tile/map/QuadId.js.map +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.d.ts +9 -4
- package/lib/cjs/tile/map/TerrainMeshProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.js +6 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.js.map +1 -1
- package/lib/cjs/tile/map/TerrainProvider.d.ts +2 -2
- package/lib/cjs/tile/map/TerrainProvider.js +1 -1
- package/lib/cjs/tile/map/TerrainProvider.js.map +1 -1
- package/lib/esm/IModelApp.d.ts +1 -3
- package/lib/esm/IModelApp.d.ts.map +1 -1
- package/lib/esm/IModelApp.js +1 -3
- package/lib/esm/IModelApp.js.map +1 -1
- package/lib/esm/render/RealityMeshParams.d.ts +2 -2
- package/lib/esm/render/RealityMeshParams.d.ts.map +1 -1
- package/lib/esm/render/RealityMeshParams.js +1 -1
- package/lib/esm/render/RealityMeshParams.js.map +1 -1
- package/lib/esm/tile/RealityTile.d.ts +1 -1
- package/lib/esm/tile/RealityTile.js +1 -1
- package/lib/esm/tile/RealityTile.js.map +1 -1
- package/lib/esm/tile/RealityTileTree.d.ts +1 -1
- package/lib/esm/tile/RealityTileTree.js +1 -1
- package/lib/esm/tile/RealityTileTree.js.map +1 -1
- package/lib/esm/tile/TileAdmin.d.ts +5 -1
- package/lib/esm/tile/TileAdmin.d.ts.map +1 -1
- package/lib/esm/tile/TileAdmin.js.map +1 -1
- package/lib/esm/tile/TileRequest.d.ts.map +1 -1
- package/lib/esm/tile/TileRequest.js +2 -1
- package/lib/esm/tile/TileRequest.js.map +1 -1
- package/lib/esm/tile/TileRequestChannel.d.ts +23 -1
- package/lib/esm/tile/TileRequestChannel.d.ts.map +1 -1
- package/lib/esm/tile/TileRequestChannel.js +28 -7
- package/lib/esm/tile/TileRequestChannel.js.map +1 -1
- package/lib/esm/tile/map/EllipsoidTerrainProvider.d.ts +11 -3
- package/lib/esm/tile/map/EllipsoidTerrainProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/EllipsoidTerrainProvider.js +17 -5
- package/lib/esm/tile/map/EllipsoidTerrainProvider.js.map +1 -1
- package/lib/esm/tile/map/MapCartoRectangle.d.ts +1 -1
- package/lib/esm/tile/map/MapCartoRectangle.js +1 -1
- package/lib/esm/tile/map/MapCartoRectangle.js.map +1 -1
- package/lib/esm/tile/map/MapTile.d.ts +2 -2
- package/lib/esm/tile/map/MapTile.js +2 -2
- package/lib/esm/tile/map/MapTile.js.map +1 -1
- package/lib/esm/tile/map/MapTileTree.d.ts +1 -1
- package/lib/esm/tile/map/MapTileTree.js +1 -1
- package/lib/esm/tile/map/MapTileTree.js.map +1 -1
- package/lib/esm/tile/map/MapTilingScheme.d.ts +1 -1
- package/lib/esm/tile/map/MapTilingScheme.js +1 -1
- package/lib/esm/tile/map/MapTilingScheme.js.map +1 -1
- package/lib/esm/tile/map/QuadId.d.ts +1 -1
- package/lib/esm/tile/map/QuadId.js +1 -1
- package/lib/esm/tile/map/QuadId.js.map +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.d.ts +9 -4
- package/lib/esm/tile/map/TerrainMeshProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.js +6 -1
- package/lib/esm/tile/map/TerrainMeshProvider.js.map +1 -1
- package/lib/esm/tile/map/TerrainProvider.d.ts +2 -2
- package/lib/esm/tile/map/TerrainProvider.js +1 -1
- package/lib/esm/tile/map/TerrainProvider.js.map +1 -1
- package/package.json +18 -18
|
@@ -13,7 +13,7 @@ const scratchCartographic2 = Cartographic.createZero();
|
|
|
13
13
|
/** Identifies a node within a [quad tree](https://en.wikipedia.org/wiki/Quadtree), such as a [[MapTile]] within a [[MapTileTree]].
|
|
14
14
|
* A quad tree recursively sub-divides a two-dimensional space along the X and Y axes such that each node on level L has four child nodes on
|
|
15
15
|
* level L+1.
|
|
16
|
-
* @
|
|
16
|
+
* @public
|
|
17
17
|
*/
|
|
18
18
|
export class QuadId {
|
|
19
19
|
/** Construct a new QuadId. The inputs are expected to be non-negative integers. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuadId.js","sourceRoot":"","sources":["../../../../src/tile/map/QuadId.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,MAAM,oBAAoB,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC;AACvD,MAAM,oBAAoB,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC;AAEvD;;;;GAIG;AACH,MAAM,OAAO,MAAM;IAsCjB,mFAAmF;IACnF,YAAmB,KAAa,EAAE,MAAc,EAAE,GAAW;QAC3D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAnCD,aAAa;IACb,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;IACzB,CAAC;I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,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { assert, compareNumbers } from \"@itwin/core-bentley\";\r\nimport { Angle, AngleSweep, Range2d } from \"@itwin/core-geometry\";\r\nimport { Cartographic } from \"@itwin/core-common\";\r\nimport { MapTilingScheme } from \"../internal\";\r\n\r\nconst scratchCartographic1 = Cartographic.createZero();\r\nconst scratchCartographic2 = Cartographic.createZero();\r\n\r\n/** Identifies a node within a [quad tree](https://en.wikipedia.org/wiki/Quadtree), such as a [[MapTile]] within a [[MapTileTree]].\r\n * A quad tree recursively sub-divides a two-dimensional space along the X and Y axes such that each node on level L has four child nodes on\r\n * level L+1.\r\n * @
|
|
1
|
+
{"version":3,"file":"QuadId.js","sourceRoot":"","sources":["../../../../src/tile/map/QuadId.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,MAAM,oBAAoB,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC;AACvD,MAAM,oBAAoB,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC;AAEvD;;;;GAIG;AACH,MAAM,OAAO,MAAM;IAsCjB,mFAAmF;IACnF,YAAmB,KAAa,EAAE,MAAc,EAAE,GAAW;QAC3D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,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,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;YAC5C,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC;YACnC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { assert, compareNumbers } from \"@itwin/core-bentley\";\r\nimport { Angle, AngleSweep, Range2d } from \"@itwin/core-geometry\";\r\nimport { Cartographic } from \"@itwin/core-common\";\r\nimport { MapTilingScheme } from \"../internal\";\r\n\r\nconst scratchCartographic1 = Cartographic.createZero();\r\nconst scratchCartographic2 = Cartographic.createZero();\r\n\r\n/** Identifies a node within a [quad tree](https://en.wikipedia.org/wiki/Quadtree), such as a [[MapTile]] within a [[MapTileTree]].\r\n * A quad tree recursively sub-divides a two-dimensional space along the X and Y axes such that each node on level L has four child nodes on\r\n * level L+1.\r\n * @public\r\n */\r\nexport class QuadId {\r\n /** The level of the node within the tree, increasing with each subdivision, as a non-negative integer. */\r\n public level: number;\r\n /** The node's position along the X axis as a non-negative integer. */\r\n public column: number;\r\n /** The node's position along the Y axis as a non-negative integer. */\r\n public row: number;\r\n\r\n /** @alpha */\r\n public get isValid() {\r\n return this.level >= 0;\r\n }\r\n\r\n /** @alpha */\r\n public static createFromContentId(stringId: string) {\r\n const idParts = stringId.split(\"_\");\r\n assert(idParts.length === 3);\r\n if (3 !== idParts.length)\r\n return new QuadId(-1, -1, -1);\r\n\r\n return new QuadId(parseInt(idParts[0], 10), parseInt(idParts[1], 10), parseInt(idParts[2], 10));\r\n }\r\n\r\n /** @alpha */\r\n public get contentId(): string {\r\n return QuadId.getTileContentId(this.level, this.column, this.row);\r\n }\r\n\r\n /** @alpha */\r\n public static getTileContentId(level: number, column: number, row: number): string {\r\n return `${level}_${column}_${row}`;\r\n }\r\n\r\n /** @alpha */\r\n public get debugString(): string {\r\n return `Level: ${this.level} Column: ${this.column} Row: ${this.row}`;\r\n }\r\n\r\n /** Construct a new QuadId. The inputs are expected to be non-negative integers. */\r\n public constructor(level: number, column: number, row: number) {\r\n this.level = level;\r\n this.column = column;\r\n this.row = row;\r\n }\r\n\r\n /** Compute the QuadIds corresponding to this node's four child nodes. */\r\n public getChildIds(columnCount = 2, rowCount = 2): QuadId[] {\r\n const childIds = [];\r\n const level = this.level + 1;\r\n const column = this.column * 2;\r\n const row = this.row * 2;\r\n for (let j = 0; j < rowCount; j++)\r\n for (let i = 0; i < columnCount; i++)\r\n childIds.push(new QuadId(level, column + i, row + j));\r\n\r\n return childIds;\r\n }\r\n\r\n /** Compute the region of the surface of the Earth represented by this node according to the specified tiling scheme. */\r\n public getLatLongRangeDegrees(mapTilingScheme: MapTilingScheme): Range2d {\r\n return this._getLatLongRange(mapTilingScheme, \"degrees\");\r\n }\r\n\r\n /** Compute the region of the surface of the Earth represented by this node according to the specified tiling scheme. */\r\n public getLatLongRangeRadians(mapTilingScheme: MapTilingScheme): Range2d {\r\n return this._getLatLongRange(mapTilingScheme, \"radians\");\r\n }\r\n\r\n private _getLatLongRange(mapTilingScheme: MapTilingScheme, units: \"radians\" | \"degrees\"): Range2d {\r\n const range = Range2d.createNull();\r\n const factor = \"degrees\" === units ? Angle.degreesPerRadian : 1;\r\n\r\n mapTilingScheme.tileXYToCartographic(this.column, this.row, this.level, scratchCartographic1);\r\n range.extendXY(scratchCartographic1.longitude * factor, scratchCartographic1.latitude * factor);\r\n mapTilingScheme.tileXYToCartographic(this.column + 1, this.row + 1, this.level, scratchCartographic2);\r\n range.extendXY(scratchCartographic2.longitude * factor, scratchCartographic2.latitude * factor);\r\n\r\n return range;\r\n }\r\n\r\n /** @alpha */\r\n public getAngleSweep(mapTilingScheme: MapTilingScheme): { longitude: AngleSweep, latitude: AngleSweep } {\r\n mapTilingScheme.tileXYToCartographic(this.column, this.row, this.level, scratchCartographic1);\r\n mapTilingScheme.tileXYToCartographic(this.column + 1, this.row + 1, this.level, scratchCartographic2);\r\n return {\r\n longitude: AngleSweep.createStartEndRadians(scratchCartographic1.longitude, scratchCartographic2.longitude),\r\n latitude: AngleSweep.createStartEndRadians(\r\n Cartographic.parametricLatitudeFromGeodeticLatitude(scratchCartographic1.latitude),\r\n Cartographic.parametricLatitudeFromGeodeticLatitude(scratchCartographic2.latitude)\r\n ),\r\n };\r\n }\r\n\r\n /** Returns true if this node is adjacent to the south pole according to the specified tiling scheme. */\r\n public bordersSouthPole(mapTilingScheme: MapTilingScheme) {\r\n return mapTilingScheme.tileBordersSouthPole(this.row, this.level);\r\n }\r\n\r\n /** Returns true if this node is adjacent to the north pole according to the specified tiling scheme. */\r\n public bordersNorthPole(mapTilingScheme: MapTilingScheme) {\r\n return mapTilingScheme.tileBordersNorthPole(this.row, this.level);\r\n }\r\n\r\n /** Compares this Id to another according to the conventions of an [OrderedComparator]($bentley). */\r\n public compare(other: QuadId): number {\r\n return compareNumbers(this.level, other.level) ||\r\n compareNumbers(this.row, other.row) ||\r\n compareNumbers(this.column, other.column);\r\n }\r\n}\r\n"]}
|
|
@@ -6,7 +6,7 @@ import { ScreenViewport } from "../../Viewport";
|
|
|
6
6
|
import { RealityMeshParams } from "../../render/RealityMeshParams";
|
|
7
7
|
import { MapCartoRectangle, MapTile, MapTilingScheme, QuadId } from "../internal";
|
|
8
8
|
/** Options supplied to [[TerrainProvider.createTerrainMeshProvider]] to construct a [[TerrainMeshProvider]].
|
|
9
|
-
* @
|
|
9
|
+
* @public
|
|
10
10
|
*/
|
|
11
11
|
export interface TerrainMeshProviderOptions {
|
|
12
12
|
/** A scale factor to be applied to the height of the terrain meshes.
|
|
@@ -29,7 +29,7 @@ export interface TerrainMeshProviderOptions {
|
|
|
29
29
|
wantNormals: boolean;
|
|
30
30
|
}
|
|
31
31
|
/** Arguments supplied to [[TerrainMeshProvider.requestMeshData]].
|
|
32
|
-
* @
|
|
32
|
+
* @public
|
|
33
33
|
*/
|
|
34
34
|
export interface RequestMeshDataArgs {
|
|
35
35
|
/** The tile for which the terrain mesh is being requested. */
|
|
@@ -38,7 +38,7 @@ export interface RequestMeshDataArgs {
|
|
|
38
38
|
isCanceled(): boolean;
|
|
39
39
|
}
|
|
40
40
|
/** Arguments supplied to [[TerrainMeshProvider.readMesh]].
|
|
41
|
-
* @
|
|
41
|
+
* @public
|
|
42
42
|
*/
|
|
43
43
|
export interface ReadMeshArgs {
|
|
44
44
|
/** The mesh data obtained from [[TerrainMeshProvider.requestMeshData]]. */
|
|
@@ -52,7 +52,12 @@ export interface ReadMeshArgs {
|
|
|
52
52
|
* Each mesh represents the terrain within a rectangular region of the Earth associated with a [[MapTile]].
|
|
53
53
|
* The display system drapes background map imagery onto these meshes.
|
|
54
54
|
* `TerrainMeshProvider`s are obtained from [[TerrainProvider]]s.
|
|
55
|
-
* @
|
|
55
|
+
* @note A terrain mesh provider is expected to produce terrain for all areas of the globe. If it lacks terrain data for an area of the globe,
|
|
56
|
+
* it might choose to fall back to producing smooth terrain using an [[EllipsoidTerrainProvider]].
|
|
57
|
+
* @see [[EllipsoidTerrainProvider]] for an example implementation that provides smooth terrain meshes.
|
|
58
|
+
* @see [BingTerrainMeshProvider](https://github.com/iTwin/itwinjs-core/blob/master/test-apps/display-test-app/src/frontend/BingTerrainProvider.ts) for an example
|
|
59
|
+
* implementation that produces 3d terrain meshes from elevations provided by [[BingElevationProvider]].
|
|
60
|
+
* @public
|
|
56
61
|
*/
|
|
57
62
|
export declare abstract class TerrainMeshProvider {
|
|
58
63
|
/** Obtain a representation of the terrain for a specific [[MapTile]]. The result will subsequently be supplied to [[readMesh]] to produce the mesh.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TerrainMeshProvider.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/TerrainMeshProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EACL,iBAAiB,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,EACpD,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,8DAA8D;IAC9D,IAAI,EAAE,OAAO,CAAC;IACd,0JAA0J;IAC1J,UAAU,IAAI,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,2EAA2E;IAC3E,IAAI,EAAE,GAAG,CAAC;IACV,8DAA8D;IAC9D,IAAI,EAAE,OAAO,CAAC;IACd,mJAAmJ;IACnJ,UAAU,IAAI,OAAO,CAAC;CACvB;AAED
|
|
1
|
+
{"version":3,"file":"TerrainMeshProvider.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/TerrainMeshProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EACL,iBAAiB,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,EACpD,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,8DAA8D;IAC9D,IAAI,EAAE,OAAO,CAAC;IACd,0JAA0J;IAC1J,UAAU,IAAI,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,2EAA2E;IAC3E,IAAI,EAAE,GAAG,CAAC;IACV,8DAA8D;IAC9D,IAAI,EAAE,OAAO,CAAC;IACd,mJAAmJ;IACnJ,UAAU,IAAI,OAAO,CAAC;CACvB;AAED;;;;;;;;;;GAUG;AACH,8BAAsB,mBAAmB;IACvC;;OAEG;aACa,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC;IAExE;;OAEG;aACa,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;IAEpF;;;OAGG;IACI,YAAY,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI;IAExE;;;OAGG;IACI,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAIhD,iEAAiE;IACjE,aAAoB,QAAQ,IAAI,MAAM,CAAC;IAEvC;;;OAGG;IACI,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS;IAI9G,4GAA4G;IAC5G,aAAoB,YAAY,IAAI,eAAe,CAAC;IAEpD;;;OAGG;IACI,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;CAC9C"}
|
|
@@ -10,7 +10,12 @@ import { ApproximateTerrainHeights } from "../../ApproximateTerrainHeights";
|
|
|
10
10
|
* Each mesh represents the terrain within a rectangular region of the Earth associated with a [[MapTile]].
|
|
11
11
|
* The display system drapes background map imagery onto these meshes.
|
|
12
12
|
* `TerrainMeshProvider`s are obtained from [[TerrainProvider]]s.
|
|
13
|
-
* @
|
|
13
|
+
* @note A terrain mesh provider is expected to produce terrain for all areas of the globe. If it lacks terrain data for an area of the globe,
|
|
14
|
+
* it might choose to fall back to producing smooth terrain using an [[EllipsoidTerrainProvider]].
|
|
15
|
+
* @see [[EllipsoidTerrainProvider]] for an example implementation that provides smooth terrain meshes.
|
|
16
|
+
* @see [BingTerrainMeshProvider](https://github.com/iTwin/itwinjs-core/blob/master/test-apps/display-test-app/src/frontend/BingTerrainProvider.ts) for an example
|
|
17
|
+
* implementation that produces 3d terrain meshes from elevations provided by [[BingElevationProvider]].
|
|
18
|
+
* @public
|
|
14
19
|
*/
|
|
15
20
|
export class TerrainMeshProvider {
|
|
16
21
|
/** Add attribution logo cards for the terrain data supplied by this provider to the [[Viewport]]'s logo div.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TerrainMeshProvider.js","sourceRoot":"","sources":["../../../../src/tile/map/TerrainMeshProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAqD5E
|
|
1
|
+
{"version":3,"file":"TerrainMeshProvider.js","sourceRoot":"","sources":["../../../../src/tile/map/TerrainMeshProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAqD5E;;;;;;;;;;GAUG;AACH,MAAM,OAAgB,mBAAmB;IAWvC;;;OAGG;IACI,YAAY,CAAC,MAAwB,EAAE,GAAmB,IAAU,CAAC;IAE5E;;;OAGG;IACI,eAAe,CAAC,OAAe;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAKD;;;OAGG;IACI,mBAAmB,CAAC,MAAc,EAAE,SAA4B,EAAE,MAAe;QACtF,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,QAAQ,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;IAC3J,CAAC;IAKD;;;OAGG;IACI,aAAa,CAAC,KAAc,IAAa,OAAO,KAAK,CAAC,CAAC,CAAC;CAChE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { Range1d } from \"@itwin/core-geometry\";\r\nimport { ApproximateTerrainHeights } from \"../../ApproximateTerrainHeights\";\r\nimport { ScreenViewport } from \"../../Viewport\";\r\nimport { RealityMeshParams } from \"../../render/RealityMeshParams\";\r\nimport {\r\n MapCartoRectangle, MapTile, MapTilingScheme, QuadId,\r\n} from \"../internal\";\r\n\r\n/** Options supplied to [[TerrainProvider.createTerrainMeshProvider]] to construct a [[TerrainMeshProvider]].\r\n * @public\r\n */\r\nexport interface TerrainMeshProviderOptions {\r\n /** A scale factor to be applied to the height of the terrain meshes.\r\n * @see [TerrainSettings.exaggeration]($common).\r\n */\r\n exaggeration: number;\r\n /** If true, the meshes should include \"skirts\" around their edges.\r\n * Skirts add new geometry to each of the four sides of a tile, extending downward. This helps to hide small cracks between adjacent tiles.\r\n * However, if transparency is applied to the terrain then, rather than hiding slight imperfections, the skirts themselves become visible.\r\n * So skirts are only requested when the terrain is displayed without transparency.\r\n *\r\n * A [[TerrainMeshProvider]] can ignore the request for skirts if it considers the risk of visible cracks acceptable.\r\n */\r\n wantSkirts: boolean;\r\n /** If true, each vertex of the terrain meshes should include a normal vector. Normals are requested when lighting or [ThematicDisplay]($common) are applied\r\n * to the terrain.\r\n *\r\n * A [[TerrainmeshProvider can ignore the request to produce normals, but doing so will prevent lighting and thematic display from applying to its terrain meshes.\r\n */\r\n wantNormals: boolean;\r\n}\r\n\r\n/** Arguments supplied to [[TerrainMeshProvider.requestMeshData]].\r\n * @public\r\n */\r\nexport interface RequestMeshDataArgs {\r\n /** The tile for which the terrain mesh is being requested. */\r\n tile: MapTile;\r\n /** Returns true if the request has been cancelled. Check this after performing an asynchronous action, and abort `requestMeshData` if it returns true. */\r\n isCanceled(): boolean;\r\n}\r\n\r\n/** Arguments supplied to [[TerrainMeshProvider.readMesh]].\r\n * @public\r\n */\r\nexport interface ReadMeshArgs {\r\n /** The mesh data obtained from [[TerrainMeshProvider.requestMeshData]]. */\r\n data: any;\r\n /** The tile for which the terrain mesh is being generated. */\r\n tile: MapTile;\r\n /** Returns true if the request has been cancelled. Check this after performing an asynchronous action, and abort `readMesh` if it returns true. */\r\n isCanceled(): boolean;\r\n}\r\n\r\n/** Provides 3d meshes representing terrain for display in a [[Viewport]].\r\n * Each mesh represents the terrain within a rectangular region of the Earth associated with a [[MapTile]].\r\n * The display system drapes background map imagery onto these meshes.\r\n * `TerrainMeshProvider`s are obtained from [[TerrainProvider]]s.\r\n * @note A terrain mesh provider is expected to produce terrain for all areas of the globe. If it lacks terrain data for an area of the globe,\r\n * it might choose to fall back to producing smooth terrain using an [[EllipsoidTerrainProvider]].\r\n * @see [[EllipsoidTerrainProvider]] for an example implementation that provides smooth terrain meshes.\r\n * @see [BingTerrainMeshProvider](https://github.com/iTwin/itwinjs-core/blob/master/test-apps/display-test-app/src/frontend/BingTerrainProvider.ts) for an example\r\n * implementation that produces 3d terrain meshes from elevations provided by [[BingElevationProvider]].\r\n * @public\r\n */\r\nexport abstract class TerrainMeshProvider {\r\n /** Obtain a representation of the terrain for a specific [[MapTile]]. The result will subsequently be supplied to [[readMesh]] to produce the mesh.\r\n * Return `undefined` if no mesh data could be obtained.\r\n */\r\n public abstract requestMeshData(args: RequestMeshDataArgs): Promise<any>;\r\n\r\n /** Convert the terrain data supplied by [[requestMeshData]] into a terrain mesh.\r\n * @see [[RealityMeshParamsBuilder]] to simplify the process of creating the mesh.\r\n */\r\n public abstract readMesh(args: ReadMeshArgs): Promise<RealityMeshParams | undefined>;\r\n\r\n /** Add attribution logo cards for the terrain data supplied by this provider to the [[Viewport]]'s logo div.\r\n * For example, a provider that produces meshes from [Bing Maps](https://docs.microsoft.com/en-us/bingmaps/rest-services/elevations/) would be required to\r\n * disclose any copyrighted data used in the production of those meshes.\r\n */\r\n public addLogoCards(_cards: HTMLTableElement, _vp: ScreenViewport): void { }\r\n\r\n /** Return whether terrain data can be obtained for the [[MapTile]] specified by `quadId`. If it returns false, a terrain mesh will instead be produced for\r\n * that tile by up-sampling the terrain mesh provided by its parent tile.\r\n * The default implementation returns `true`.\r\n */\r\n public isTileAvailable(_quadId: QuadId): boolean {\r\n return true;\r\n }\r\n\r\n /** Returns the maximum level of detail of the terrain meshes. */\r\n public abstract get maxDepth(): number;\r\n\r\n /** Returns the minimum and maximum elevation of the terrain within the specified region of the Earth.\r\n * This range is used for culling terrain meshes that do not intersect the view frustum.\r\n * The default implementation uses a fast approximation.\r\n */\r\n public getChildHeightRange(quadId: QuadId, rectangle: MapCartoRectangle, parent: MapTile): Range1d | undefined {\r\n return (quadId.level < ApproximateTerrainHeights.maxLevel) ? ApproximateTerrainHeights.instance.getMinimumMaximumHeights(rectangle) : parent.heightRange;\r\n }\r\n\r\n /** The tiling scheme used by this provider to convert between tile coordinates and geodetic coordinates. */\r\n public abstract get tilingScheme(): MapTilingScheme;\r\n\r\n /** Returns true if the specified tile should always be loaded. Some tiles contain required metadata and hence should always be loaded.\r\n * For example, a parent tile might contain information about the availability or height ranges of its child tiles that can be used to\r\n * implement [[isTileAvailable]] or [[getChildHeightRange]], respectively.\r\n */\r\n public forceTileLoad(_tile: MapTile): boolean { return false; }\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@ import { TerrainMeshProvider, TerrainMeshProviderOptions } from "../internal";
|
|
|
5
5
|
/** Interface adopted by an object that can supply [[TerrainMeshProvider]]s enabling the display of 3d terrain in a [[Viewport]].
|
|
6
6
|
* @see [[TerrainProviderRegistry]] to register or look up a `TerrainProvider` by its name.
|
|
7
7
|
* @see [TerrainSettings.providerName]($common) to specify the terrain provider used by a [DisplayStyle]($backend).
|
|
8
|
-
* @
|
|
8
|
+
* @public
|
|
9
9
|
*/
|
|
10
10
|
export interface TerrainProvider {
|
|
11
11
|
/** Produce a [[TerrainMeshProvider]] using the specified options. */
|
|
@@ -16,7 +16,7 @@ export interface TerrainProvider {
|
|
|
16
16
|
* Any number of additional providers can be [[register]]ed.
|
|
17
17
|
*
|
|
18
18
|
* When terrain is enabled for a [[Viewport]], the display system will attempt to look up the [[TerrainProvider]] corresponding to the [TerrainSettings.providerName]($common) specified by the [[Viewport]]'s [DisplayStyleSettings]($common). If a provider by that name is registered, it will be used to obtain terrain meshes; otherwise, the display system will produce flat terrain meshes.
|
|
19
|
-
* @
|
|
19
|
+
* @public
|
|
20
20
|
*/
|
|
21
21
|
export declare class TerrainProviderRegistry {
|
|
22
22
|
private readonly _providers;
|
|
@@ -11,7 +11,7 @@ import { getCesiumTerrainProvider } from "../internal";
|
|
|
11
11
|
* Any number of additional providers can be [[register]]ed.
|
|
12
12
|
*
|
|
13
13
|
* When terrain is enabled for a [[Viewport]], the display system will attempt to look up the [[TerrainProvider]] corresponding to the [TerrainSettings.providerName]($common) specified by the [[Viewport]]'s [DisplayStyleSettings]($common). If a provider by that name is registered, it will be used to obtain terrain meshes; otherwise, the display system will produce flat terrain meshes.
|
|
14
|
-
* @
|
|
14
|
+
* @public
|
|
15
15
|
*/
|
|
16
16
|
export class TerrainProviderRegistry {
|
|
17
17
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TerrainProvider.js","sourceRoot":"","sources":["../../../../src/tile/map/TerrainProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,wBAAwB,EAAmD,MAAM,aAAa,CAAC;AAYxG;;;;;;GAMG;AACH,MAAM,OAAO,uBAAuB;IAGlC,gBAAgB;IAChB;QAHiB,eAAU,GAAG,IAAI,GAAG,EAA2B,CAAC;QAI/D,IAAI,CAAC,QAAQ,CAAC,oBAAoB,EAAE;YAClC,yBAAyB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,wBAAwB,CAAC,OAAO,CAAC;SAChF,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,IAAY,EAAE,QAAyB;QACrD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,gEAAgE;IACzD,IAAI,CAAC,IAAY;QACtB,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { getCesiumTerrainProvider, TerrainMeshProvider, TerrainMeshProviderOptions } from \"../internal\";\r\n\r\n/** Interface adopted by an object that can supply [[TerrainMeshProvider]]s enabling the display of 3d terrain in a [[Viewport]].\r\n * @see [[TerrainProviderRegistry]] to register or look up a `TerrainProvider` by its name.\r\n * @see [TerrainSettings.providerName]($common) to specify the terrain provider used by a [DisplayStyle]($backend).\r\n * @
|
|
1
|
+
{"version":3,"file":"TerrainProvider.js","sourceRoot":"","sources":["../../../../src/tile/map/TerrainProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,wBAAwB,EAAmD,MAAM,aAAa,CAAC;AAYxG;;;;;;GAMG;AACH,MAAM,OAAO,uBAAuB;IAGlC,gBAAgB;IAChB;QAHiB,eAAU,GAAG,IAAI,GAAG,EAA2B,CAAC;QAI/D,IAAI,CAAC,QAAQ,CAAC,oBAAoB,EAAE;YAClC,yBAAyB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,wBAAwB,CAAC,OAAO,CAAC;SAChF,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,IAAY,EAAE,QAAyB;QACrD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,gEAAgE;IACzD,IAAI,CAAC,IAAY;QACtB,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { getCesiumTerrainProvider, TerrainMeshProvider, TerrainMeshProviderOptions } from \"../internal\";\r\n\r\n/** Interface adopted by an object that can supply [[TerrainMeshProvider]]s enabling the display of 3d terrain in a [[Viewport]].\r\n * @see [[TerrainProviderRegistry]] to register or look up a `TerrainProvider` by its name.\r\n * @see [TerrainSettings.providerName]($common) to specify the terrain provider used by a [DisplayStyle]($backend).\r\n * @public\r\n */\r\nexport interface TerrainProvider {\r\n /** Produce a [[TerrainMeshProvider]] using the specified options. */\r\n createTerrainMeshProvider(options: TerrainMeshProviderOptions): Promise<TerrainMeshProvider | undefined>;\r\n}\r\n\r\n/** A registry of [[TerrainProvider]]s identified by their unique names. The registry can be accessed via [[IModelApp.terrainProviderRegistry]].\r\n * It always includes the built-in provider named \"CesiumWorldTerrain\", which obtains terrain meshes from [Cesium ION](https://cesium.com/platform/cesium-ion/content/cesium-world-terrain/). That provider requires a valid [[TileAdmin.Props.cesiumIonKey]] to be supplied to [[IModelApp.startup]].\r\n * Any number of additional providers can be [[register]]ed.\r\n *\r\n * When terrain is enabled for a [[Viewport]], the display system will attempt to look up the [[TerrainProvider]] corresponding to the [TerrainSettings.providerName]($common) specified by the [[Viewport]]'s [DisplayStyleSettings]($common). If a provider by that name is registered, it will be used to obtain terrain meshes; otherwise, the display system will produce flat terrain meshes.\r\n * @public\r\n */\r\nexport class TerrainProviderRegistry {\r\n private readonly _providers = new Map<string, TerrainProvider>();\r\n\r\n /** @internal */\r\n public constructor() {\r\n this.register(\"CesiumWorldTerrain\", {\r\n createTerrainMeshProvider: async (options) => getCesiumTerrainProvider(options),\r\n });\r\n }\r\n\r\n /** Register a new [[TerrainProvider]].\r\n * @param name The name of the provider. It must be unique among all providers.\r\n * @param provider The provider to register.\r\n * @see [[find]] to later retrieve the provider by name.\r\n */\r\n public register(name: string, provider: TerrainProvider): void {\r\n this._providers.set(name, provider);\r\n }\r\n\r\n /** Look up a [[register]]ed [[TerrainProvider]] by its name. */\r\n public find(name: string): TerrainProvider | undefined {\r\n return this._providers.get(name);\r\n }\r\n}\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/core-frontend",
|
|
3
|
-
"version": "4.0.0-dev.
|
|
3
|
+
"version": "4.0.0-dev.18",
|
|
4
4
|
"description": "iTwin.js frontend components",
|
|
5
5
|
"main": "lib/cjs/core-frontend.js",
|
|
6
6
|
"module": "lib/esm/core-frontend.js",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@itwin/appui-abstract": "^4.0.0-dev.8",
|
|
26
|
-
"@itwin/core-bentley": "^4.0.0-dev.
|
|
27
|
-
"@itwin/core-common": "^4.0.0-dev.
|
|
28
|
-
"@itwin/core-geometry": "^4.0.0-dev.
|
|
29
|
-
"@itwin/core-orbitgt": "^4.0.0-dev.
|
|
30
|
-
"@itwin/core-quantity": "^4.0.0-dev.
|
|
26
|
+
"@itwin/core-bentley": "^4.0.0-dev.18",
|
|
27
|
+
"@itwin/core-common": "^4.0.0-dev.18",
|
|
28
|
+
"@itwin/core-geometry": "^4.0.0-dev.18",
|
|
29
|
+
"@itwin/core-orbitgt": "^4.0.0-dev.18",
|
|
30
|
+
"@itwin/core-quantity": "^4.0.0-dev.18"
|
|
31
31
|
},
|
|
32
32
|
"//devDependencies": [
|
|
33
33
|
"NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
],
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@itwin/appui-abstract": "4.0.0-dev.8",
|
|
38
|
-
"@itwin/build-tools": "4.0.0-dev.
|
|
39
|
-
"@itwin/core-bentley": "4.0.0-dev.
|
|
40
|
-
"@itwin/core-common": "4.0.0-dev.
|
|
41
|
-
"@itwin/core-geometry": "4.0.0-dev.
|
|
42
|
-
"@itwin/core-orbitgt": "4.0.0-dev.
|
|
43
|
-
"@itwin/core-quantity": "4.0.0-dev.
|
|
44
|
-
"@itwin/certa": "4.0.0-dev.
|
|
45
|
-
"@itwin/eslint-plugin": "4.0.0-dev.
|
|
46
|
-
"@itwin/webgl-compatibility": "4.0.0-dev.
|
|
38
|
+
"@itwin/build-tools": "4.0.0-dev.18",
|
|
39
|
+
"@itwin/core-bentley": "4.0.0-dev.18",
|
|
40
|
+
"@itwin/core-common": "4.0.0-dev.18",
|
|
41
|
+
"@itwin/core-geometry": "4.0.0-dev.18",
|
|
42
|
+
"@itwin/core-orbitgt": "4.0.0-dev.18",
|
|
43
|
+
"@itwin/core-quantity": "4.0.0-dev.18",
|
|
44
|
+
"@itwin/certa": "4.0.0-dev.18",
|
|
45
|
+
"@itwin/eslint-plugin": "4.0.0-dev.18",
|
|
46
|
+
"@itwin/webgl-compatibility": "4.0.0-dev.18",
|
|
47
47
|
"@types/chai": "4.3.1",
|
|
48
48
|
"@types/chai-as-promised": "^7",
|
|
49
49
|
"@types/deep-assign": "^0.1.0",
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
"@itwin/object-storage-azure": "^1.5.0",
|
|
78
78
|
"@itwin/cloud-agnostic-core": "^1.5.0",
|
|
79
79
|
"@itwin/object-storage-core": "^1.5.0",
|
|
80
|
-
"@itwin/core-i18n": "4.0.0-dev.
|
|
81
|
-
"@itwin/core-telemetry": "4.0.0-dev.
|
|
82
|
-
"@itwin/webgl-compatibility": "4.0.0-dev.
|
|
80
|
+
"@itwin/core-i18n": "4.0.0-dev.18",
|
|
81
|
+
"@itwin/core-telemetry": "4.0.0-dev.18",
|
|
82
|
+
"@itwin/webgl-compatibility": "4.0.0-dev.18",
|
|
83
83
|
"@loaders.gl/core": "^3.1.6",
|
|
84
84
|
"@loaders.gl/draco": "^3.1.6",
|
|
85
85
|
"deep-assign": "^2.0.0",
|