@itwin/frontend-tiles 4.0.0-dev.48 → 4.0.0-dev.50

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 (73) hide show
  1. package/.rush/temp/operation/build_ci/state.json +1 -1
  2. package/.rush/temp/package-deps_build_ci.json +21 -0
  3. package/lib/cjs/BatchedSpatialTileTreeRefs.d.ts +3 -3
  4. package/lib/cjs/BatchedSpatialTileTreeRefs.d.ts.map +1 -1
  5. package/lib/cjs/BatchedSpatialTileTreeRefs.js +34 -27
  6. package/lib/cjs/BatchedSpatialTileTreeRefs.js.map +1 -1
  7. package/lib/cjs/BatchedTile.d.ts +23 -23
  8. package/lib/cjs/BatchedTile.js +155 -155
  9. package/lib/cjs/BatchedTile.js.map +1 -1
  10. package/lib/cjs/BatchedTileContentReader.d.ts +22 -22
  11. package/lib/cjs/BatchedTileContentReader.js +74 -74
  12. package/lib/cjs/BatchedTileContentReader.js.map +1 -1
  13. package/lib/cjs/BatchedTileTree.d.ts +22 -22
  14. package/lib/cjs/BatchedTileTree.js +52 -52
  15. package/lib/cjs/BatchedTileTree.js.map +1 -1
  16. package/lib/cjs/BatchedTileTreeReference.d.ts +17 -3
  17. package/lib/cjs/BatchedTileTreeReference.d.ts.map +1 -1
  18. package/lib/cjs/BatchedTileTreeReference.js +49 -24
  19. package/lib/cjs/BatchedTileTreeReference.js.map +1 -1
  20. package/lib/cjs/BatchedTileTreeSupplier.d.ts +5 -5
  21. package/lib/cjs/BatchedTileTreeSupplier.js +38 -38
  22. package/lib/cjs/BatchedTileTreeSupplier.js.map +1 -1
  23. package/lib/cjs/BatchedTilesetReader.d.ts +13 -13
  24. package/lib/cjs/BatchedTilesetReader.js +87 -87
  25. package/lib/cjs/BatchedTilesetReader.js.map +1 -1
  26. package/lib/cjs/FrontendTiles.d.ts +14 -14
  27. package/lib/cjs/FrontendTiles.js +16 -16
  28. package/lib/cjs/FrontendTiles.js.map +1 -1
  29. package/lib/cjs/LoggerCategory.d.ts +2 -2
  30. package/lib/cjs/LoggerCategory.js +9 -9
  31. package/lib/cjs/LoggerCategory.js.map +1 -1
  32. package/lib/cjs/frontend-tiles.d.ts +1 -1
  33. package/lib/cjs/frontend-tiles.js +17 -17
  34. package/lib/cjs/frontend-tiles.js.map +1 -1
  35. package/lib/cjs/tsconfig.tsbuildinfo +1 -1
  36. package/lib/esm/BatchedSpatialTileTreeRefs.d.ts +3 -3
  37. package/lib/esm/BatchedSpatialTileTreeRefs.d.ts.map +1 -1
  38. package/lib/esm/BatchedSpatialTileTreeRefs.js +30 -23
  39. package/lib/esm/BatchedSpatialTileTreeRefs.js.map +1 -1
  40. package/lib/esm/BatchedTile.d.ts +23 -23
  41. package/lib/esm/BatchedTile.js +151 -151
  42. package/lib/esm/BatchedTile.js.map +1 -1
  43. package/lib/esm/BatchedTileContentReader.d.ts +22 -22
  44. package/lib/esm/BatchedTileContentReader.js +70 -70
  45. package/lib/esm/BatchedTileContentReader.js.map +1 -1
  46. package/lib/esm/BatchedTileTree.d.ts +22 -22
  47. package/lib/esm/BatchedTileTree.js +48 -48
  48. package/lib/esm/BatchedTileTree.js.map +1 -1
  49. package/lib/esm/BatchedTileTreeReference.d.ts +17 -3
  50. package/lib/esm/BatchedTileTreeReference.d.ts.map +1 -1
  51. package/lib/esm/BatchedTileTreeReference.js +45 -20
  52. package/lib/esm/BatchedTileTreeReference.js.map +1 -1
  53. package/lib/esm/BatchedTileTreeSupplier.d.ts +5 -5
  54. package/lib/esm/BatchedTileTreeSupplier.js +34 -34
  55. package/lib/esm/BatchedTileTreeSupplier.js.map +1 -1
  56. package/lib/esm/BatchedTilesetReader.d.ts +13 -13
  57. package/lib/esm/BatchedTilesetReader.js +83 -83
  58. package/lib/esm/BatchedTilesetReader.js.map +1 -1
  59. package/lib/esm/FrontendTiles.d.ts +14 -14
  60. package/lib/esm/FrontendTiles.js +12 -12
  61. package/lib/esm/FrontendTiles.js.map +1 -1
  62. package/lib/esm/LoggerCategory.d.ts +2 -2
  63. package/lib/esm/LoggerCategory.js +6 -6
  64. package/lib/esm/LoggerCategory.js.map +1 -1
  65. package/lib/esm/frontend-tiles.d.ts +1 -1
  66. package/lib/esm/frontend-tiles.js +5 -5
  67. package/lib/esm/frontend-tiles.js.map +1 -1
  68. package/lib/esm/tsconfig.tsbuildinfo +1 -1
  69. package/package.json +10 -10
  70. package/src/BatchedSpatialTileTreeRefs.ts +15 -6
  71. package/src/BatchedTileTreeReference.ts +50 -8
  72. package/src/FrontendTiles.ts +1 -1
  73. package/.rush/temp/820682d7f2cbea1cd35650a2487650856cc1f630.log +0 -10
@@ -1,14 +1,14 @@
1
- import { Tileset3dSchema as schema } from "@itwin/core-common";
2
- import { IModelConnection } from "@itwin/core-frontend";
3
- import { BatchedTileTreeParams } from "./BatchedTileTree";
4
- import { BatchedTile, BatchedTileParams } from "./BatchedTile";
5
- /** @internal */
6
- export declare class BatchedTilesetReader {
7
- private readonly _iModel;
8
- private readonly _tileset;
9
- readonly baseUrl: URL;
10
- constructor(json: unknown, iModel: IModelConnection, baseUrl: URL);
11
- readTileParams(json: schema.Tile, parent?: BatchedTile): BatchedTileParams;
12
- readTileTreeParams(): Promise<BatchedTileTreeParams>;
13
- }
1
+ import { Tileset3dSchema as schema } from "@itwin/core-common";
2
+ import { IModelConnection } from "@itwin/core-frontend";
3
+ import { BatchedTileTreeParams } from "./BatchedTileTree";
4
+ import { BatchedTile, BatchedTileParams } from "./BatchedTile";
5
+ /** @internal */
6
+ export declare class BatchedTilesetReader {
7
+ private readonly _iModel;
8
+ private readonly _tileset;
9
+ readonly baseUrl: URL;
10
+ constructor(json: unknown, iModel: IModelConnection, baseUrl: URL);
11
+ readTileParams(json: schema.Tile, parent?: BatchedTile): BatchedTileParams;
12
+ readTileTreeParams(): Promise<BatchedTileTreeParams>;
13
+ }
14
14
  //# sourceMappingURL=BatchedTilesetReader.d.ts.map
@@ -1,88 +1,88 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.BatchedTilesetReader = void 0;
8
- const core_geometry_1 = require("@itwin/core-geometry");
9
- const core_frontend_1 = require("@itwin/core-frontend");
10
- function isTileset3d(json) {
11
- if (typeof json !== "object")
12
- return false;
13
- const props = json;
14
- if (!props.root || !props.asset)
15
- return false;
16
- // ###TODO spec requires geometricError to be present on tileset and all tiles; exporter is omitting from tileset.
17
- if (undefined === props.geometricError)
18
- props.geometricError = props.root.geometricError;
19
- return true;
20
- }
21
- function rangeFromBoundingVolume(vol) {
22
- if (vol.box) {
23
- const center = new core_geometry_1.Point3d(vol.box[0], vol.box[1], vol.box[2]);
24
- const ux = new core_geometry_1.Vector3d(vol.box[3], vol.box[4], vol.box[5]);
25
- const uy = new core_geometry_1.Vector3d(vol.box[6], vol.box[7], vol.box[8]);
26
- const uz = new core_geometry_1.Vector3d(vol.box[9], vol.box[10], vol.box[11]);
27
- const range = core_geometry_1.Range3d.createNull();
28
- for (let i = -1; i <= 1; i += 2)
29
- for (let j = -1; j <= 1; j += 2)
30
- for (let k = -1; k <= 1; k += 2)
31
- range.extendPoint(center.plus3Scaled(ux, i, uy, j, uz, k));
32
- return range;
33
- }
34
- else if (vol.sphere) {
35
- const center = new core_geometry_1.Point3d(vol.sphere[0], vol.sphere[1], vol.sphere[2]);
36
- const radius = vol.sphere[3];
37
- return core_geometry_1.Range3d.createXYZXYZ(center.x - radius, center.y - radius, center.z - radius, center.x + radius, center.y + radius, center.z + radius);
38
- }
39
- // We won't get region bounding volumes in our tiles.
40
- throw new Error("region bounding volume unimplemented");
41
- }
42
- function transformFromJSON(json) {
43
- const translation = new core_geometry_1.Point3d(json[12], json[13], json[14]);
44
- const matrix = core_geometry_1.Matrix3d.createRowValues(json[0], json[4], json[8], json[1], json[5], json[9], json[2], json[6], json[10]);
45
- return core_geometry_1.Transform.createOriginAndMatrix(translation, matrix);
46
- }
47
- /** @internal */
48
- class BatchedTilesetReader {
49
- constructor(json, iModel, baseUrl) {
50
- if (!isTileset3d(json))
51
- throw new Error("Invalid tileset JSON");
52
- this._iModel = iModel;
53
- this._tileset = json;
54
- this.baseUrl = baseUrl;
55
- }
56
- readTileParams(json, parent) {
57
- const content = json.content;
58
- const geometricError = json.geometricError;
59
- const range = rangeFromBoundingVolume(json.boundingVolume);
60
- const isLeaf = undefined === json.children || json.children.length === 0;
61
- // ###TODO evaluate this. The geometric errors in the tiles seem far too small.
62
- const maximumSizeScale = 8;
63
- return {
64
- parent,
65
- contentId: content?.uri ?? "",
66
- range,
67
- contentRange: content?.boundingVolume ? rangeFromBoundingVolume(content.boundingVolume) : undefined,
68
- isLeaf,
69
- maximumSize: maximumSizeScale * core_frontend_1.RealityModelTileUtils.maximumSizeFromGeometricTolerance(range, geometricError),
70
- childrenProps: isLeaf ? undefined : json.children,
71
- };
72
- }
73
- async readTileTreeParams() {
74
- const root = this._tileset.root;
75
- const location = root.transform ? transformFromJSON(root.transform) : core_geometry_1.Transform.createIdentity();
76
- return {
77
- id: "spatial-models",
78
- modelId: this._iModel.transientIds.getNext(),
79
- iModel: this._iModel,
80
- location,
81
- priority: core_frontend_1.TileLoadPriority.Primary,
82
- rootTile: this.readTileParams(root),
83
- reader: this,
84
- };
85
- }
86
- }
87
- exports.BatchedTilesetReader = BatchedTilesetReader;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.BatchedTilesetReader = void 0;
8
+ const core_geometry_1 = require("@itwin/core-geometry");
9
+ const core_frontend_1 = require("@itwin/core-frontend");
10
+ function isTileset3d(json) {
11
+ if (typeof json !== "object")
12
+ return false;
13
+ const props = json;
14
+ if (!props.root || !props.asset)
15
+ return false;
16
+ // ###TODO spec requires geometricError to be present on tileset and all tiles; exporter is omitting from tileset.
17
+ if (undefined === props.geometricError)
18
+ props.geometricError = props.root.geometricError;
19
+ return true;
20
+ }
21
+ function rangeFromBoundingVolume(vol) {
22
+ if (vol.box) {
23
+ const center = new core_geometry_1.Point3d(vol.box[0], vol.box[1], vol.box[2]);
24
+ const ux = new core_geometry_1.Vector3d(vol.box[3], vol.box[4], vol.box[5]);
25
+ const uy = new core_geometry_1.Vector3d(vol.box[6], vol.box[7], vol.box[8]);
26
+ const uz = new core_geometry_1.Vector3d(vol.box[9], vol.box[10], vol.box[11]);
27
+ const range = core_geometry_1.Range3d.createNull();
28
+ for (let i = -1; i <= 1; i += 2)
29
+ for (let j = -1; j <= 1; j += 2)
30
+ for (let k = -1; k <= 1; k += 2)
31
+ range.extendPoint(center.plus3Scaled(ux, i, uy, j, uz, k));
32
+ return range;
33
+ }
34
+ else if (vol.sphere) {
35
+ const center = new core_geometry_1.Point3d(vol.sphere[0], vol.sphere[1], vol.sphere[2]);
36
+ const radius = vol.sphere[3];
37
+ return core_geometry_1.Range3d.createXYZXYZ(center.x - radius, center.y - radius, center.z - radius, center.x + radius, center.y + radius, center.z + radius);
38
+ }
39
+ // We won't get region bounding volumes in our tiles.
40
+ throw new Error("region bounding volume unimplemented");
41
+ }
42
+ function transformFromJSON(json) {
43
+ const translation = new core_geometry_1.Point3d(json[12], json[13], json[14]);
44
+ const matrix = core_geometry_1.Matrix3d.createRowValues(json[0], json[4], json[8], json[1], json[5], json[9], json[2], json[6], json[10]);
45
+ return core_geometry_1.Transform.createOriginAndMatrix(translation, matrix);
46
+ }
47
+ /** @internal */
48
+ class BatchedTilesetReader {
49
+ constructor(json, iModel, baseUrl) {
50
+ if (!isTileset3d(json))
51
+ throw new Error("Invalid tileset JSON");
52
+ this._iModel = iModel;
53
+ this._tileset = json;
54
+ this.baseUrl = baseUrl;
55
+ }
56
+ readTileParams(json, parent) {
57
+ const content = json.content;
58
+ const geometricError = json.geometricError;
59
+ const range = rangeFromBoundingVolume(json.boundingVolume);
60
+ const isLeaf = undefined === json.children || json.children.length === 0;
61
+ // ###TODO evaluate this. The geometric errors in the tiles seem far too small.
62
+ const maximumSizeScale = 8;
63
+ return {
64
+ parent,
65
+ contentId: content?.uri ?? "",
66
+ range,
67
+ contentRange: content?.boundingVolume ? rangeFromBoundingVolume(content.boundingVolume) : undefined,
68
+ isLeaf,
69
+ maximumSize: maximumSizeScale * core_frontend_1.RealityModelTileUtils.maximumSizeFromGeometricTolerance(range, geometricError),
70
+ childrenProps: isLeaf ? undefined : json.children,
71
+ };
72
+ }
73
+ async readTileTreeParams() {
74
+ const root = this._tileset.root;
75
+ const location = root.transform ? transformFromJSON(root.transform) : core_geometry_1.Transform.createIdentity();
76
+ return {
77
+ id: "spatial-models",
78
+ modelId: this._iModel.transientIds.getNext(),
79
+ iModel: this._iModel,
80
+ location,
81
+ priority: core_frontend_1.TileLoadPriority.Primary,
82
+ rootTile: this.readTileParams(root),
83
+ reader: this,
84
+ };
85
+ }
86
+ }
87
+ exports.BatchedTilesetReader = BatchedTilesetReader;
88
88
  //# sourceMappingURL=BatchedTilesetReader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BatchedTilesetReader.js","sourceRoot":"","sources":["../../src/BatchedTilesetReader.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,wDAE8B;AAE9B,wDAAiG;AAIjG,SAAS,WAAW,CAAC,IAAa;IAChC,IAAI,OAAO,IAAI,KAAK,QAAQ;QAC1B,OAAO,KAAK,CAAC;IAEf,MAAM,KAAK,GAAG,IAAsB,CAAC;IAErC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK;QAC7B,OAAO,KAAK,CAAC;IAEf,kHAAkH;IAClH,IAAI,SAAS,KAAK,KAAK,CAAC,cAAc;QACpC,KAAK,CAAC,cAAc,GAAG,KAAK,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AG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QAChC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,yBAAS,CAAC,cAAc,EAAE,CAAC;QAEjG,OAAO;YACL,EAAE,EAAE,gBAAgB;YACpB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,EAAE;YAC5C,MAAM,EAAE,IAAI,CAAC,OAAO;YACpB,QAAQ;YACR,QAAQ,EAAE,gCAAgB,CAAC,OAAO;YAClC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;YACnC,MAAM,EAAE,IAAI;SACb,CAAC;IACJ,CAAC;CACF;AA/CD,oDA+CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport {\n Matrix3d, Point3d, Range3d, Transform, Vector3d,\n} from \"@itwin/core-geometry\";\nimport { Tileset3dSchema as schema } from \"@itwin/core-common\";\nimport { IModelConnection, RealityModelTileUtils, TileLoadPriority } from \"@itwin/core-frontend\";\nimport { BatchedTileTreeParams } from \"./BatchedTileTree\";\nimport { BatchedTile, BatchedTileParams } from \"./BatchedTile\";\n\nfunction isTileset3d(json: unknown): json is schema.Tileset {\n if (typeof json !== \"object\")\n return false;\n\n const props = json as schema.Tileset;\n\n if (!props.root || !props.asset)\n return false;\n\n // ###TODO spec requires geometricError to be present on tileset and all tiles; exporter is omitting from tileset.\n if (undefined === props.geometricError)\n props.geometricError = props.root.geometricError;\n\n return true;\n}\n\nfunction rangeFromBoundingVolume(vol: schema.BoundingVolume): Range3d {\n if (vol.box) {\n const center = new Point3d(vol.box[0], vol.box[1], vol.box[2]);\n const ux = new Vector3d(vol.box[3], vol.box[4], vol.box[5]);\n const uy = new Vector3d(vol.box[6], vol.box[7], vol.box[8]);\n const uz = new Vector3d(vol.box[9], vol.box[10], vol.box[11]);\n\n const range = Range3d.createNull();\n for (let i = -1; i <= 1; i += 2)\n for (let j = -1; j <= 1; j += 2)\n for (let k = -1; k <= 1; k += 2)\n range.extendPoint(center.plus3Scaled(ux, i, uy, j, uz, k));\n\n return range;\n } else if (vol.sphere) {\n const center = new Point3d(vol.sphere[0], vol.sphere[1], vol.sphere[2]);\n const radius = vol.sphere[3];\n return Range3d.createXYZXYZ(center.x - radius, center.y - radius, center.z - radius, center.x + radius, center.y + radius, center.z + radius);\n }\n\n // We won't get region bounding volumes in our tiles.\n throw new Error(\"region bounding volume unimplemented\");\n}\n\nfunction transformFromJSON(json: schema.Transform): Transform {\n const translation = new Point3d(json[12], json[13], json[14]);\n const matrix = Matrix3d.createRowValues(\n json[0], json[4], json[8],\n json[1], json[5], json[9],\n json[2], json[6], json[10]\n );\n\n return Transform.createOriginAndMatrix(translation, matrix);\n}\n\n/** @internal */\nexport class BatchedTilesetReader {\n private readonly _iModel: IModelConnection;\n private readonly _tileset: schema.Tileset;\n public readonly baseUrl: URL;\n\n public constructor(json: unknown, iModel: IModelConnection, baseUrl: URL) {\n if (!isTileset3d(json))\n throw new Error(\"Invalid tileset JSON\");\n\n this._iModel = iModel;\n this._tileset = json;\n this.baseUrl = baseUrl;\n }\n\n public readTileParams(json: schema.Tile, parent?: BatchedTile): BatchedTileParams {\n const content = json.content;\n const geometricError = json.geometricError;\n const range = rangeFromBoundingVolume(json.boundingVolume);\n const isLeaf = undefined === json.children || json.children.length === 0;\n\n // ###TODO evaluate this. The geometric errors in the tiles seem far too small.\n const maximumSizeScale = 8;\n return {\n parent,\n contentId: content?.uri ?? \"\",\n range,\n contentRange: content?.boundingVolume ? rangeFromBoundingVolume(content.boundingVolume) : undefined,\n isLeaf,\n maximumSize: maximumSizeScale * RealityModelTileUtils.maximumSizeFromGeometricTolerance(range, geometricError),\n childrenProps: isLeaf ? undefined : json.children,\n };\n }\n\n public async readTileTreeParams(): Promise<BatchedTileTreeParams> {\n const root = this._tileset.root;\n const location = root.transform ? transformFromJSON(root.transform) : Transform.createIdentity();\n\n return {\n id: \"spatial-models\",\n modelId: this._iModel.transientIds.getNext(),\n iModel: this._iModel,\n location,\n priority: TileLoadPriority.Primary,\n rootTile: this.readTileParams(root),\n reader: this,\n };\n }\n}\n"]}
1
+ {"version":3,"file":"BatchedTilesetReader.js","sourceRoot":"","sources":["../../src/BatchedTilesetReader.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,wDAE8B;AAE9B,wDAAiG;AAIjG,SAAS,WAAW,CAAC,IAAa;IAChC,IAAI,OAAO,IAAI,KAAK,QAAQ;QAC1B,OAAO,KAAK,CAAC;IAEf,MAAM,KAAK,GAAG,IAAsB,CAAC;IAErC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK;QAC7B,OAAO,KAAK,CAAC;IAEf,kHAAkH;IAClH,IAAI,SAAS,KAAK,KAAK,CAAC,cAAc;QACpC,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC;IAEnD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,uBAAuB,CAAC,GAA0B;IACzD,IAAI,GAAG,CAAC,GAAG,EAAE;QACX,MAAM,MAAM,GAAG,IAAI,uBAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/D,MAAM,EAAE,GAAG,IAAI,wBAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5D,MAAM,EAAE,GAAG,IAAI,wBAAQ,CAAC,GAAG,C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\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\r\nimport {\r\n Matrix3d, Point3d, Range3d, Transform, Vector3d,\r\n} from \"@itwin/core-geometry\";\r\nimport { Tileset3dSchema as schema } from \"@itwin/core-common\";\r\nimport { IModelConnection, RealityModelTileUtils, TileLoadPriority } from \"@itwin/core-frontend\";\r\nimport { BatchedTileTreeParams } from \"./BatchedTileTree\";\r\nimport { BatchedTile, BatchedTileParams } from \"./BatchedTile\";\r\n\r\nfunction isTileset3d(json: unknown): json is schema.Tileset {\r\n if (typeof json !== \"object\")\r\n return false;\r\n\r\n const props = json as schema.Tileset;\r\n\r\n if (!props.root || !props.asset)\r\n return false;\r\n\r\n // ###TODO spec requires geometricError to be present on tileset and all tiles; exporter is omitting from tileset.\r\n if (undefined === props.geometricError)\r\n props.geometricError = props.root.geometricError;\r\n\r\n return true;\r\n}\r\n\r\nfunction rangeFromBoundingVolume(vol: schema.BoundingVolume): Range3d {\r\n if (vol.box) {\r\n const center = new Point3d(vol.box[0], vol.box[1], vol.box[2]);\r\n const ux = new Vector3d(vol.box[3], vol.box[4], vol.box[5]);\r\n const uy = new Vector3d(vol.box[6], vol.box[7], vol.box[8]);\r\n const uz = new Vector3d(vol.box[9], vol.box[10], vol.box[11]);\r\n\r\n const range = Range3d.createNull();\r\n for (let i = -1; i <= 1; i += 2)\r\n for (let j = -1; j <= 1; j += 2)\r\n for (let k = -1; k <= 1; k += 2)\r\n range.extendPoint(center.plus3Scaled(ux, i, uy, j, uz, k));\r\n\r\n return range;\r\n } else if (vol.sphere) {\r\n const center = new Point3d(vol.sphere[0], vol.sphere[1], vol.sphere[2]);\r\n const radius = vol.sphere[3];\r\n return Range3d.createXYZXYZ(center.x - radius, center.y - radius, center.z - radius, center.x + radius, center.y + radius, center.z + radius);\r\n }\r\n\r\n // We won't get region bounding volumes in our tiles.\r\n throw new Error(\"region bounding volume unimplemented\");\r\n}\r\n\r\nfunction transformFromJSON(json: schema.Transform): Transform {\r\n const translation = new Point3d(json[12], json[13], json[14]);\r\n const matrix = Matrix3d.createRowValues(\r\n json[0], json[4], json[8],\r\n json[1], json[5], json[9],\r\n json[2], json[6], json[10]\r\n );\r\n\r\n return Transform.createOriginAndMatrix(translation, matrix);\r\n}\r\n\r\n/** @internal */\r\nexport class BatchedTilesetReader {\r\n private readonly _iModel: IModelConnection;\r\n private readonly _tileset: schema.Tileset;\r\n public readonly baseUrl: URL;\r\n\r\n public constructor(json: unknown, iModel: IModelConnection, baseUrl: URL) {\r\n if (!isTileset3d(json))\r\n throw new Error(\"Invalid tileset JSON\");\r\n\r\n this._iModel = iModel;\r\n this._tileset = json;\r\n this.baseUrl = baseUrl;\r\n }\r\n\r\n public readTileParams(json: schema.Tile, parent?: BatchedTile): BatchedTileParams {\r\n const content = json.content;\r\n const geometricError = json.geometricError;\r\n const range = rangeFromBoundingVolume(json.boundingVolume);\r\n const isLeaf = undefined === json.children || json.children.length === 0;\r\n\r\n // ###TODO evaluate this. The geometric errors in the tiles seem far too small.\r\n const maximumSizeScale = 8;\r\n return {\r\n parent,\r\n contentId: content?.uri ?? \"\",\r\n range,\r\n contentRange: content?.boundingVolume ? rangeFromBoundingVolume(content.boundingVolume) : undefined,\r\n isLeaf,\r\n maximumSize: maximumSizeScale * RealityModelTileUtils.maximumSizeFromGeometricTolerance(range, geometricError),\r\n childrenProps: isLeaf ? undefined : json.children,\r\n };\r\n }\r\n\r\n public async readTileTreeParams(): Promise<BatchedTileTreeParams> {\r\n const root = this._tileset.root;\r\n const location = root.transform ? transformFromJSON(root.transform) : Transform.createIdentity();\r\n\r\n return {\r\n id: \"spatial-models\",\r\n modelId: this._iModel.transientIds.getNext(),\r\n iModel: this._iModel,\r\n location,\r\n priority: TileLoadPriority.Primary,\r\n rootTile: this.readTileParams(root),\r\n reader: this,\r\n };\r\n }\r\n}\r\n"]}
@@ -1,15 +1,15 @@
1
- import { IModelConnection } from "@itwin/core-frontend";
2
- /** Options supplied to [[initializeFrontendTiles]].
3
- * @alpha
4
- */
5
- export interface FrontendTilesOptions {
6
- /** Given an iModel, provide the base URL where the tiles are stored representing all of the spatial models in the iModel.
7
- * It is expected that baseUrl/tileset.json exists and contains a 3d tileset in which all relative URLs are relative to baseUrl.
8
- */
9
- computeSpatialTilesetBaseUrl: (iModel: IModelConnection) => URL;
10
- }
11
- /** Initialize the frontend-tiles package to obtain tiles for spatial views.
12
- * @alpha
13
- */
14
- export declare function initializeFrontendTiles(options: FrontendTilesOptions): void;
1
+ import { IModelConnection } from "@itwin/core-frontend";
2
+ /** Options supplied to [[initializeFrontendTiles]].
3
+ * @alpha
4
+ */
5
+ export interface FrontendTilesOptions {
6
+ /** Given an iModel, provide the base URL where the tiles are stored representing all of the spatial models in the iModel.
7
+ * It is expected that baseUrl/tileset.json exists and contains a 3d tileset in which all relative URLs are relative to baseUrl.
8
+ */
9
+ computeSpatialTilesetBaseUrl: (iModel: IModelConnection) => URL;
10
+ }
11
+ /** Initialize the frontend-tiles package to obtain tiles for spatial views.
12
+ * @alpha
13
+ */
14
+ export declare function initializeFrontendTiles(options: FrontendTilesOptions): void;
15
15
  //# sourceMappingURL=FrontendTiles.d.ts.map
@@ -1,17 +1,17 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.initializeFrontendTiles = void 0;
8
- const core_frontend_1 = require("@itwin/core-frontend");
9
- const BatchedSpatialTileTreeRefs_1 = require("./BatchedSpatialTileTreeRefs");
10
- /** Initialize the frontend-tiles package to obtain tiles for spatial views.
11
- * @alpha
12
- */
13
- function initializeFrontendTiles(options) {
14
- core_frontend_1.SpatialTileTreeReferences.create = (view) => (0, BatchedSpatialTileTreeRefs_1.createBatchedSpatialTileTreeReferences)(view.iModel, options.computeSpatialTilesetBaseUrl);
15
- }
16
- exports.initializeFrontendTiles = initializeFrontendTiles;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.initializeFrontendTiles = void 0;
8
+ const core_frontend_1 = require("@itwin/core-frontend");
9
+ const BatchedSpatialTileTreeRefs_1 = require("./BatchedSpatialTileTreeRefs");
10
+ /** Initialize the frontend-tiles package to obtain tiles for spatial views.
11
+ * @alpha
12
+ */
13
+ function initializeFrontendTiles(options) {
14
+ core_frontend_1.SpatialTileTreeReferences.create = (view) => (0, BatchedSpatialTileTreeRefs_1.createBatchedSpatialTileTreeReferences)(view, options.computeSpatialTilesetBaseUrl);
15
+ }
16
+ exports.initializeFrontendTiles = initializeFrontendTiles;
17
17
  //# sourceMappingURL=FrontendTiles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FrontendTiles.js","sourceRoot":"","sources":["../../src/FrontendTiles.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,wDAAqG;AACrG,6EAAsF;AAYtF;;GAEG;AACH,SAAgB,uBAAuB,CAAC,OAA6B;IACnE,yCAAyB,CAAC,MAAM,GAAG,CAAC,IAAsB,EAAE,EAAE,CAAC,IAAA,mEAAsC,EAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAC3J,CAAC;AAFD,0DAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { IModelConnection, SpatialTileTreeReferences, SpatialViewState } from \"@itwin/core-frontend\";\nimport { createBatchedSpatialTileTreeReferences } from \"./BatchedSpatialTileTreeRefs\";\n\n/** Options supplied to [[initializeFrontendTiles]].\n * @alpha\n */\nexport interface FrontendTilesOptions {\n /** Given an iModel, provide the base URL where the tiles are stored representing all of the spatial models in the iModel.\n * It is expected that baseUrl/tileset.json exists and contains a 3d tileset in which all relative URLs are relative to baseUrl.\n */\n computeSpatialTilesetBaseUrl: (iModel: IModelConnection) => URL;\n}\n\n/** Initialize the frontend-tiles package to obtain tiles for spatial views.\n * @alpha\n */\nexport function initializeFrontendTiles(options: FrontendTilesOptions): void {\n SpatialTileTreeReferences.create = (view: SpatialViewState) => createBatchedSpatialTileTreeReferences(view.iModel, options.computeSpatialTilesetBaseUrl);\n}\n"]}
1
+ {"version":3,"file":"FrontendTiles.js","sourceRoot":"","sources":["../../src/FrontendTiles.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,wDAAqG;AACrG,6EAAsF;AAYtF;;GAEG;AACH,SAAgB,uBAAuB,CAAC,OAA6B;IACnE,yCAAyB,CAAC,MAAM,GAAG,CAAC,IAAsB,EAAE,EAAE,CAAC,IAAA,mEAAsC,EAAC,IAAI,EAAE,OAAO,CAAC,4BAA4B,CAAC,CAAC;AACpJ,CAAC;AAFD,0DAEC","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\r\nimport { IModelConnection, SpatialTileTreeReferences, SpatialViewState } from \"@itwin/core-frontend\";\r\nimport { createBatchedSpatialTileTreeReferences } from \"./BatchedSpatialTileTreeRefs\";\r\n\r\n/** Options supplied to [[initializeFrontendTiles]].\r\n * @alpha\r\n */\r\nexport interface FrontendTilesOptions {\r\n /** Given an iModel, provide the base URL where the tiles are stored representing all of the spatial models in the iModel.\r\n * It is expected that baseUrl/tileset.json exists and contains a 3d tileset in which all relative URLs are relative to baseUrl.\r\n */\r\n computeSpatialTilesetBaseUrl: (iModel: IModelConnection) => URL;\r\n}\r\n\r\n/** Initialize the frontend-tiles package to obtain tiles for spatial views.\r\n * @alpha\r\n */\r\nexport function initializeFrontendTiles(options: FrontendTilesOptions): void {\r\n SpatialTileTreeReferences.create = (view: SpatialViewState) => createBatchedSpatialTileTreeReferences(view, options.computeSpatialTilesetBaseUrl);\r\n}\r\n"]}
@@ -1,3 +1,3 @@
1
- /** @internal */
2
- export declare const loggerCategory = "frontend-tiles";
1
+ /** @internal */
2
+ export declare const loggerCategory = "frontend-tiles";
3
3
  //# sourceMappingURL=LoggerCategory.d.ts.map
@@ -1,10 +1,10 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.loggerCategory = void 0;
8
- /** @internal */
9
- exports.loggerCategory = "frontend-tiles";
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.loggerCategory = void 0;
8
+ /** @internal */
9
+ exports.loggerCategory = "frontend-tiles";
10
10
  //# sourceMappingURL=LoggerCategory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoggerCategory.js","sourceRoot":"","sources":["../../src/LoggerCategory.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,gBAAgB;AACH,QAAA,cAAc,GAAG,gBAAgB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @internal */\nexport const loggerCategory = \"frontend-tiles\";\n\n"]}
1
+ {"version":3,"file":"LoggerCategory.js","sourceRoot":"","sources":["../../src/LoggerCategory.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,gBAAgB;AACH,QAAA,cAAc,GAAG,gBAAgB,CAAC","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\r\n/** @internal */\r\nexport const loggerCategory = \"frontend-tiles\";\r\n\r\n"]}
@@ -1,2 +1,2 @@
1
- export * from "./FrontendTiles";
1
+ export * from "./FrontendTiles";
2
2
  //# sourceMappingURL=frontend-tiles.d.ts.map
@@ -1,18 +1,18 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./FrontendTiles"), exports);
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./FrontendTiles"), exports);
18
18
  //# sourceMappingURL=frontend-tiles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"frontend-tiles.js","sourceRoot":"","sources":["../../src/frontend-tiles.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,kDAAgC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nexport * from \"./FrontendTiles\";\n"]}
1
+ {"version":3,"file":"frontend-tiles.js","sourceRoot":"","sources":["../../src/frontend-tiles.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,kDAAgC","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\r\nexport * from \"./FrontendTiles\";\r\n"]}