@vertexvis/viewer 0.13.1 → 0.13.2-canary.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/cjs/{browser.esm-31b03292.js → browser.esm-c51162f8.js} +1 -1
- package/dist/cjs/{bundle.esm-dc0a8361.js → bundle.esm-1b8b1f36.js} +34 -0
- package/dist/cjs/{config-90ee43d5.js → config-91efd353.js} +2 -2
- package/dist/cjs/{cursors-ad2fd395.js → cursors-14827f58.js} +1 -1
- package/dist/cjs/{dom-dd265f48.js → dom-c697cf99.js} +1 -1
- package/dist/cjs/{entities-aa59890e.js → entities-0829b4a4.js} +3 -3
- package/dist/cjs/index.cjs.js +13 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{mapper-f6e6cafe.js → mapper-67af470b.js} +2 -2
- package/dist/cjs/{markup-fb1553b1.js → markup-835f2e83.js} +2 -2
- package/dist/cjs/{measurement-aba1e0e8.js → measurement-8e0ce89a.js} +2 -2
- package/dist/cjs/{model-4ec0c36e.js → model-78241d4f.js} +1 -1
- package/dist/cjs/{overlays-40c6cbc7.js → overlays-06786e52.js} +2 -2
- package/dist/cjs/{png-decoder-27d25eed.js → png-decoder-01b76242.js} +1 -1
- package/dist/cjs/{results-bc325974.js → results-7a694238.js} +1 -1
- package/dist/cjs/{scene-d420fd26.js → scene-23535fc0.js} +176 -85
- package/dist/cjs/{streamAttributes-d6236448.js → streamAttributes-f13c1a96.js} +1431 -41
- package/dist/cjs/{utils-f80be307.js → utils-4a02e54b.js} +1 -1
- package/dist/cjs/{utils-545b1865.js → utils-5cc32a26.js} +1 -1
- package/dist/cjs/vertex-scene-tree-search_3.cjs.entry.js +1 -1
- package/dist/cjs/vertex-scene-tree.cjs.entry.js +4 -4
- package/dist/cjs/vertex-viewer-dom-element_3.cjs.entry.js +4 -4
- package/dist/cjs/vertex-viewer-markup-arrow_3.cjs.entry.js +3 -3
- package/dist/cjs/vertex-viewer-markup-tool.cjs.entry.js +4 -4
- package/dist/cjs/vertex-viewer-markup.cjs.entry.js +4 -4
- package/dist/cjs/vertex-viewer-measurement-details.cjs.entry.js +3 -3
- package/dist/cjs/vertex-viewer-measurement-distance.cjs.entry.js +11 -11
- package/dist/cjs/vertex-viewer-measurement-line_2.cjs.entry.js +6 -6
- package/dist/cjs/vertex-viewer-measurement-precise.cjs.entry.js +10 -10
- package/dist/cjs/vertex-viewer-measurement-tool.cjs.entry.js +5 -5
- package/dist/cjs/vertex-viewer-measurements.cjs.entry.js +8 -8
- package/dist/cjs/vertex-viewer-view-cube.cjs.entry.js +3 -3
- package/dist/cjs/vertex-viewer.cjs.entry.js +198 -79
- package/dist/cjs/viewer.cjs.js +1 -1
- package/dist/cjs/{viewport-8c39089f.js → viewport-052809c7.js} +1 -1
- package/dist/collection/components/viewer/viewer.js +68 -4
- package/dist/collection/components/viewer-dom-renderer/renderer2d.js +1 -1
- package/dist/collection/components/viewer-dom-renderer/renderer3d.js +1 -1
- package/dist/collection/components/viewer-dom-renderer/viewer-dom-renderer.js +3 -3
- package/dist/collection/components/viewer-measurement-distance/viewer-measurement-distance.js +3 -3
- package/dist/collection/components/viewer-measurement-overlays/viewer-measurement-overlays.js +3 -3
- package/dist/collection/index.js +2 -2
- package/dist/collection/lib/errors.js +8 -1
- package/dist/collection/lib/interactions/index.js +3 -1
- package/dist/collection/lib/interactions/interactionApi.js +4 -25
- package/dist/collection/lib/interactions/interactionApiOrthographic.js +50 -0
- package/dist/collection/lib/interactions/interactionApiPerspective.js +50 -0
- package/dist/collection/lib/mappers/frameStreaming.js +27 -5
- package/dist/collection/lib/rendering/matrices.js +13 -4
- package/dist/collection/lib/scenes/__mocks__/mocks.js +2 -2
- package/dist/collection/lib/scenes/camera.js +149 -77
- package/dist/collection/lib/scenes/mapper.js +3 -2
- package/dist/collection/lib/scenes/scene.js +23 -9
- package/dist/collection/lib/types/clippingPlanes.js +54 -17
- package/dist/collection/lib/types/depthBuffer.js +1 -1
- package/dist/collection/lib/types/frame.js +88 -23
- package/dist/collection/lib/types/frameCamera.js +81 -6
- package/dist/collection/lib/types/viewport.js +1 -1
- package/dist/collection/testing/fixtures.js +23 -10
- package/dist/collection/testing/viewer.js +5 -3
- package/dist/custom-elements/index.js +1821 -194
- package/dist/esm/{browser.esm-59e914f6.js → browser.esm-48f051a3.js} +1 -1
- package/dist/esm/{bundle.esm-d899b2d5.js → bundle.esm-df3a8a42.js} +35 -1
- package/dist/esm/{config-604c644e.js → config-3a5d3ea3.js} +2 -2
- package/dist/esm/{cursors-a7ec4adb.js → cursors-45f23dfe.js} +1 -1
- package/dist/esm/{dom-780d25be.js → dom-18d9ac79.js} +1 -1
- package/dist/esm/{entities-759d97cd.js → entities-60dfd79d.js} +3 -3
- package/dist/esm/index.js +12 -12
- package/dist/esm/index.mjs +12 -12
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loader.mjs +1 -1
- package/dist/esm/{mapper-4b815e31.js → mapper-adf23dc4.js} +2 -2
- package/dist/esm/{markup-1d177b4a.js → markup-accb6b5c.js} +2 -2
- package/dist/esm/{measurement-12cdbf5c.js → measurement-6cd457a6.js} +2 -2
- package/dist/esm/{model-e5a4f00f.js → model-4982c15d.js} +1 -1
- package/dist/esm/{overlays-1919b192.js → overlays-1783a61a.js} +2 -2
- package/dist/esm/{png-decoder-3f1fa486.js → png-decoder-f35def4c.js} +1 -1
- package/dist/esm/{results-994bdb50.js → results-93d45acc.js} +1 -1
- package/dist/esm/{scene-2c2460d5.js → scene-2d8bdccc.js} +176 -85
- package/dist/esm/{streamAttributes-d623bb60.js → streamAttributes-87a3605c.js} +1426 -43
- package/dist/esm/{utils-5e57bf24.js → utils-9f4b25ec.js} +1 -1
- package/dist/esm/{utils-83a19677.js → utils-ed2346c0.js} +1 -1
- package/dist/esm/vertex-scene-tree-search_3.entry.js +1 -1
- package/dist/esm/vertex-scene-tree.entry.js +4 -4
- package/dist/esm/vertex-viewer-dom-element_3.entry.js +4 -4
- package/dist/esm/vertex-viewer-markup-arrow_3.entry.js +3 -3
- package/dist/esm/vertex-viewer-markup-tool.entry.js +4 -4
- package/dist/esm/vertex-viewer-markup.entry.js +4 -4
- package/dist/esm/vertex-viewer-measurement-details.entry.js +3 -3
- package/dist/esm/vertex-viewer-measurement-distance.entry.js +11 -11
- package/dist/esm/vertex-viewer-measurement-line_2.entry.js +6 -6
- package/dist/esm/vertex-viewer-measurement-precise.entry.js +10 -10
- package/dist/esm/vertex-viewer-measurement-tool.entry.js +5 -5
- package/dist/esm/vertex-viewer-measurements.entry.js +8 -8
- package/dist/esm/vertex-viewer-view-cube.entry.js +3 -3
- package/dist/esm/vertex-viewer.entry.js +198 -79
- package/dist/esm/viewer.js +1 -1
- package/dist/esm/{viewport-01c886ea.js → viewport-6d4c0af0.js} +1 -1
- package/dist/types/components/viewer/viewer.d.ts +8 -0
- package/dist/types/components/viewer-dom-renderer/renderer2d.d.ts +2 -2
- package/dist/types/components/viewer-dom-renderer/renderer3d.d.ts +3 -3
- package/dist/types/components/viewer-dom-renderer/viewer-dom-renderer.d.ts +2 -2
- package/dist/types/components/viewer-measurement-distance/utils.d.ts +2 -2
- package/dist/types/components/viewer-measurement-distance/viewer-measurement-distance.d.ts +2 -2
- package/dist/types/components/viewer-measurement-overlays/viewer-measurement-overlays-components.d.ts +2 -2
- package/dist/types/components/viewer-measurement-overlays/viewer-measurement-overlays.d.ts +2 -2
- package/dist/types/components.d.ts +15 -7
- package/dist/types/index.d.ts +1 -1
- package/dist/types/lib/errors.d.ts +3 -0
- package/dist/types/lib/interactions/index.d.ts +2 -0
- package/dist/types/lib/interactions/interactionApi.d.ts +20 -21
- package/dist/types/lib/interactions/interactionApiOrthographic.d.ts +21 -0
- package/dist/types/lib/interactions/interactionApiPerspective.d.ts +21 -0
- package/dist/types/lib/mappers/frameStreaming.d.ts +2 -0
- package/dist/types/lib/scenes/__mocks__/mocks.d.ts +2 -2
- package/dist/types/lib/scenes/camera.d.ts +100 -37
- package/dist/types/lib/scenes/scene.d.ts +1 -1
- package/dist/types/lib/types/clippingPlanes.d.ts +3 -1
- package/dist/types/lib/types/depthBuffer.d.ts +4 -4
- package/dist/types/lib/types/frame.d.ts +54 -11
- package/dist/types/lib/types/frameCamera.d.ts +21 -2
- package/dist/types/lib/types/viewport.d.ts +2 -3
- package/dist/types/testing/fixtures.d.ts +4 -2
- package/dist/viewer/index.esm.js +1 -1
- package/dist/viewer/{p-3f6ac74f.js → p-014561cd.js} +1 -1
- package/dist/viewer/p-121f2b40.js +18 -0
- package/dist/viewer/p-18ec4fed.js +4 -0
- package/dist/viewer/{p-e2297df2.entry.js → p-1acd0e56.entry.js} +1 -1
- package/dist/viewer/{p-da2f4a56.js → p-25dfee48.js} +1 -1
- package/dist/viewer/p-2e75198d.js +4 -0
- package/dist/viewer/p-38c06c25.js +4 -0
- package/dist/viewer/{p-67446e35.js → p-463151e0.js} +1 -1
- package/dist/viewer/{p-301660cf.js → p-546ae240.js} +1 -1
- package/dist/viewer/{p-d00e9203.js → p-6120a219.js} +1 -1
- package/dist/viewer/p-61db972b.js +4 -0
- package/dist/viewer/{p-a0df0e0c.js → p-6d9d3553.js} +1 -1
- package/dist/viewer/{p-f8d01b8a.entry.js → p-7c5bee8e.entry.js} +1 -1
- package/dist/viewer/{p-8decee06.entry.js → p-8de749a5.entry.js} +1 -1
- package/dist/viewer/{p-081e6873.js → p-8df35eee.js} +1 -1
- package/dist/viewer/{p-671c113c.entry.js → p-923b616f.entry.js} +1 -1
- package/dist/viewer/p-9b1ecc71.js +4 -0
- package/dist/viewer/{p-3810c24d.js → p-9fd5fc8e.js} +1 -1
- package/dist/viewer/p-b2d4c0cf.entry.js +4 -0
- package/dist/viewer/{p-364ce21c.js → p-b8bc15ec.js} +1 -1
- package/dist/viewer/{p-439220c6.js → p-b8f027eb.js} +1 -1
- package/dist/viewer/p-bc7f0ad6.entry.js +4 -0
- package/dist/viewer/{p-2cefb1b0.js → p-ce0fe8be.js} +1 -1
- package/dist/viewer/p-d939ecd3.entry.js +4 -0
- package/dist/viewer/{p-25eaab00.entry.js → p-de7eecce.entry.js} +1 -1
- package/dist/viewer/{p-4985fad5.js → p-e3fff448.js} +1 -1
- package/dist/viewer/{p-6e80f8b0.entry.js → p-e4934f47.entry.js} +1 -1
- package/dist/viewer/{p-df292b56.entry.js → p-e8f6cba6.entry.js} +1 -1
- package/dist/viewer/{p-353cfc7a.entry.js → p-ee86bed2.entry.js} +1 -1
- package/dist/viewer/{p-c62cb926.entry.js → p-f359a9ac.entry.js} +1 -1
- package/dist/viewer/{p-e07377fa.entry.js → p-fa7f2d0c.entry.js} +1 -1
- package/dist/viewer/{p-915d95ad.entry.js → p-ffde162f.entry.js} +1 -1
- package/dist/viewer/viewer.esm.js +1 -1
- package/package.json +8 -8
- package/dist/viewer/p-085e908a.js +0 -4
- package/dist/viewer/p-0aba71fd.js +0 -18
- package/dist/viewer/p-423410be.js +0 -4
- package/dist/viewer/p-432267bc.entry.js +0 -4
- package/dist/viewer/p-7cad9bf4.js +0 -4
- package/dist/viewer/p-d90f2f6d.entry.js +0 -4
- package/dist/viewer/p-f755af5a.entry.js +0 -4
- package/dist/viewer/p-f7cb7e59.js +0 -4
- package/dist/viewer/p-fe11d694.js +0 -4
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
8
8
|
const index = require('./index-e100709a.js');
|
|
9
9
|
const index$1 = require('./index-3bc6bac0.js');
|
|
10
10
|
const stencil = require('./stencil-a664cd10.js');
|
|
11
|
-
const bundle_esm = require('./bundle.esm-
|
|
11
|
+
const bundle_esm = require('./bundle.esm-1b8b1f36.js');
|
|
12
12
|
const dom = require('./dom-d162f898.js');
|
|
13
13
|
require('./_commonjsHelpers-537d719a.js');
|
|
14
14
|
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-e100709a.js');
|
|
9
|
-
const bundle_esm = require('./bundle.esm-
|
|
9
|
+
const bundle_esm = require('./bundle.esm-1b8b1f36.js');
|
|
10
10
|
const _commonjsHelpers = require('./_commonjsHelpers-537d719a.js');
|
|
11
11
|
const grpcWebClient_umd = require('./grpc-web-client.umd-60a79aae.js');
|
|
12
|
-
const config = require('./config-
|
|
13
|
-
const browser_esm = require('./browser.esm-
|
|
12
|
+
const config = require('./config-91efd353.js');
|
|
13
|
+
const browser_esm = require('./browser.esm-c51162f8.js');
|
|
14
14
|
const dom = require('./dom-d162f898.js');
|
|
15
|
-
require('./streamAttributes-
|
|
15
|
+
require('./streamAttributes-f13c1a96.js');
|
|
16
16
|
|
|
17
17
|
window.requestIdleCallback =
|
|
18
18
|
window.requestIdleCallback ||
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-e100709a.js');
|
|
9
|
-
const bundle_esm = require('./bundle.esm-
|
|
10
|
-
require('./streamAttributes-
|
|
11
|
-
const viewport = require('./viewport-
|
|
12
|
-
require('./browser.esm-
|
|
9
|
+
const bundle_esm = require('./bundle.esm-1b8b1f36.js');
|
|
10
|
+
require('./streamAttributes-f13c1a96.js');
|
|
11
|
+
const viewport = require('./viewport-052809c7.js');
|
|
12
|
+
require('./browser.esm-c51162f8.js');
|
|
13
13
|
require('./_commonjsHelpers-537d719a.js');
|
|
14
14
|
|
|
15
15
|
const viewerDomElementCss = ":host{position:absolute;pointer-events:none}:host(:not([interactions-off]))>*{pointer-events:auto}";
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-e100709a.js');
|
|
9
|
-
const bundle_esm = require('./bundle.esm-
|
|
10
|
-
const dom = require('./dom-
|
|
11
|
-
const utils = require('./utils-
|
|
9
|
+
const bundle_esm = require('./bundle.esm-1b8b1f36.js');
|
|
10
|
+
const dom = require('./dom-c697cf99.js');
|
|
11
|
+
const utils = require('./utils-4a02e54b.js');
|
|
12
12
|
const index$1 = require('./index-3bc6bac0.js');
|
|
13
13
|
require('./_commonjsHelpers-537d719a.js');
|
|
14
14
|
|
|
@@ -7,10 +7,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
7
7
|
|
|
8
8
|
const index = require('./index-e100709a.js');
|
|
9
9
|
const templates = require('./templates-e57b3741.js');
|
|
10
|
-
const markup = require('./markup-
|
|
11
|
-
const utils = require('./utils-
|
|
12
|
-
require('./bundle.esm-
|
|
13
|
-
require('./browser.esm-
|
|
10
|
+
const markup = require('./markup-835f2e83.js');
|
|
11
|
+
const utils = require('./utils-4a02e54b.js');
|
|
12
|
+
require('./bundle.esm-1b8b1f36.js');
|
|
13
|
+
require('./browser.esm-c51162f8.js');
|
|
14
14
|
|
|
15
15
|
const viewerMarkupToolCss = ":host{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none}:host([elevated=\"\"]){z-index:100}";
|
|
16
16
|
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-e100709a.js');
|
|
9
|
-
const bundle_esm = require('./bundle.esm-
|
|
9
|
+
const bundle_esm = require('./bundle.esm-1b8b1f36.js');
|
|
10
10
|
const templates = require('./templates-e57b3741.js');
|
|
11
|
-
const markup = require('./markup-
|
|
12
|
-
const utils = require('./utils-
|
|
13
|
-
require('./browser.esm-
|
|
11
|
+
const markup = require('./markup-835f2e83.js');
|
|
12
|
+
const utils = require('./utils-4a02e54b.js');
|
|
13
|
+
require('./browser.esm-c51162f8.js');
|
|
14
14
|
|
|
15
15
|
const viewerMarkupCss = ":host{display:block;position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none}";
|
|
16
16
|
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-e100709a.js');
|
|
9
|
-
const streamAttributes = require('./streamAttributes-
|
|
10
|
-
const bundle_esm = require('./bundle.esm-
|
|
9
|
+
const streamAttributes = require('./streamAttributes-f13c1a96.js');
|
|
10
|
+
const bundle_esm = require('./bundle.esm-1b8b1f36.js');
|
|
11
11
|
const index$1 = require('./index-3bc6bac0.js');
|
|
12
|
-
require('./browser.esm-
|
|
12
|
+
require('./browser.esm-c51162f8.js');
|
|
13
13
|
require('./_commonjsHelpers-537d719a.js');
|
|
14
14
|
|
|
15
15
|
/*! *****************************************************************************
|
|
@@ -6,19 +6,19 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-e100709a.js');
|
|
9
|
-
const bundle_esm = require('./bundle.esm-
|
|
9
|
+
const bundle_esm = require('./bundle.esm-1b8b1f36.js');
|
|
10
10
|
const constants = require('./constants-be2deb55.js');
|
|
11
|
-
const cursors = require('./cursors-
|
|
12
|
-
const dom = require('./dom-
|
|
13
|
-
require('./mapper-
|
|
11
|
+
const cursors = require('./cursors-14827f58.js');
|
|
12
|
+
const dom = require('./dom-c697cf99.js');
|
|
13
|
+
require('./mapper-67af470b.js');
|
|
14
14
|
require('./grpc-web-client.umd-60a79aae.js');
|
|
15
|
-
const streamAttributes = require('./streamAttributes-
|
|
16
|
-
const model = require('./model-
|
|
17
|
-
const overlays = require('./overlays-
|
|
18
|
-
const results = require('./results-
|
|
19
|
-
const viewport = require('./viewport-
|
|
20
|
-
const browser_esm = require('./browser.esm-
|
|
21
|
-
const utils = require('./utils-
|
|
15
|
+
const streamAttributes = require('./streamAttributes-f13c1a96.js');
|
|
16
|
+
const model = require('./model-78241d4f.js');
|
|
17
|
+
const overlays = require('./overlays-06786e52.js');
|
|
18
|
+
const results = require('./results-7a694238.js');
|
|
19
|
+
const viewport = require('./viewport-052809c7.js');
|
|
20
|
+
const browser_esm = require('./browser.esm-c51162f8.js');
|
|
21
|
+
const utils = require('./utils-5cc32a26.js');
|
|
22
22
|
const index$1 = require('./index-3bc6bac0.js');
|
|
23
23
|
require('./_commonjsHelpers-537d719a.js');
|
|
24
24
|
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-e100709a.js');
|
|
9
|
-
const bundle_esm = require('./bundle.esm-
|
|
10
|
-
require('./mapper-
|
|
9
|
+
const bundle_esm = require('./bundle.esm-1b8b1f36.js');
|
|
10
|
+
require('./mapper-67af470b.js');
|
|
11
11
|
require('./grpc-web-client.umd-60a79aae.js');
|
|
12
|
-
require('./streamAttributes-
|
|
13
|
-
const overlays = require('./overlays-
|
|
14
|
-
const utils = require('./utils-
|
|
12
|
+
require('./streamAttributes-f13c1a96.js');
|
|
13
|
+
const overlays = require('./overlays-06786e52.js');
|
|
14
|
+
const utils = require('./utils-5cc32a26.js');
|
|
15
15
|
require('./_commonjsHelpers-537d719a.js');
|
|
16
|
-
require('./browser.esm-
|
|
16
|
+
require('./browser.esm-c51162f8.js');
|
|
17
17
|
|
|
18
18
|
const viewerMeasurementLineCss = ":host{display:block;--viewer-measurement-line-stroke:var(--white);--viewer-measurement-line-stroke-opacity:0.75;--viewer-measurement-line-stroke-width:1.25px;--viewer-measurement-line-fill:var(--neutral-900);--viewer-measurement-line-fill-width:2px;--viewer-measurement-line-start-cap-visibility:initial;--viewer-measurement-line-end-cap-visibility:initial}svg{width:100%;height:100%}.line-stroke{stroke-width:calc(\n var(--viewer-measurement-line-fill-width) +\n var(--viewer-measurement-line-stroke-width)\n );stroke:var(--viewer-measurement-line-stroke);opacity:var(--viewer-measurement-line-stroke-opacity)}.line-fill{stroke-width:var(--viewer-measurement-line-fill-width);stroke:var(--viewer-measurement-line-fill)}.start-cap{visibility:var(--viewer-measurement-line-start-cap-visibility)}.end-cap{visibility:var(--viewer-measurement-line-end-cap-visibility)}";
|
|
19
19
|
|
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-e100709a.js');
|
|
9
|
-
const mapper = require('./mapper-
|
|
9
|
+
const mapper = require('./mapper-67af470b.js');
|
|
10
10
|
const grpcWebClient_umd = require('./grpc-web-client.umd-60a79aae.js');
|
|
11
|
-
const config = require('./config-
|
|
12
|
-
const entities = require('./entities-
|
|
13
|
-
const streamAttributes = require('./streamAttributes-
|
|
14
|
-
const model = require('./model-
|
|
15
|
-
const overlays = require('./overlays-
|
|
16
|
-
const bundle_esm = require('./bundle.esm-
|
|
17
|
-
const cursors = require('./cursors-
|
|
18
|
-
const dom = require('./dom-
|
|
11
|
+
const config = require('./config-91efd353.js');
|
|
12
|
+
const entities = require('./entities-0829b4a4.js');
|
|
13
|
+
const streamAttributes = require('./streamAttributes-f13c1a96.js');
|
|
14
|
+
const model = require('./model-78241d4f.js');
|
|
15
|
+
const overlays = require('./overlays-06786e52.js');
|
|
16
|
+
const bundle_esm = require('./bundle.esm-1b8b1f36.js');
|
|
17
|
+
const cursors = require('./cursors-14827f58.js');
|
|
18
|
+
const dom = require('./dom-c697cf99.js');
|
|
19
19
|
require('./_commonjsHelpers-537d719a.js');
|
|
20
|
-
require('./browser.esm-
|
|
20
|
+
require('./browser.esm-c51162f8.js');
|
|
21
21
|
|
|
22
22
|
// package: vertexvis.protobuf.sceneview.v1
|
|
23
23
|
// file: sceneview/protos/scene_view_api.proto
|
|
@@ -8,11 +8,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
8
8
|
const index = require('./index-e100709a.js');
|
|
9
9
|
const constants = require('./constants-be2deb55.js');
|
|
10
10
|
const templates = require('./templates-e57b3741.js');
|
|
11
|
-
require('./streamAttributes-
|
|
12
|
-
const measurement = require('./measurement-
|
|
13
|
-
const utils = require('./utils-
|
|
14
|
-
require('./bundle.esm-
|
|
15
|
-
require('./browser.esm-
|
|
11
|
+
require('./streamAttributes-f13c1a96.js');
|
|
12
|
+
const measurement = require('./measurement-8e0ce89a.js');
|
|
13
|
+
const utils = require('./utils-5cc32a26.js');
|
|
14
|
+
require('./bundle.esm-1b8b1f36.js');
|
|
15
|
+
require('./browser.esm-c51162f8.js');
|
|
16
16
|
require('./_commonjsHelpers-537d719a.js');
|
|
17
17
|
|
|
18
18
|
const viewerMeasurementToolCss = ":host{position:absolute;top:0;bottom:0;left:0;right:0}";
|
|
@@ -7,17 +7,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
7
7
|
|
|
8
8
|
const index = require('./index-e100709a.js');
|
|
9
9
|
const constants = require('./constants-be2deb55.js');
|
|
10
|
-
require('./mapper-
|
|
10
|
+
require('./mapper-67af470b.js');
|
|
11
11
|
require('./grpc-web-client.umd-60a79aae.js');
|
|
12
|
-
require('./streamAttributes-
|
|
13
|
-
const model = require('./model-
|
|
14
|
-
const results = require('./results-
|
|
12
|
+
require('./streamAttributes-f13c1a96.js');
|
|
13
|
+
const model = require('./model-78241d4f.js');
|
|
14
|
+
const results = require('./results-7a694238.js');
|
|
15
15
|
const templates = require('./templates-e57b3741.js');
|
|
16
|
-
const measurement = require('./measurement-
|
|
17
|
-
const utils = require('./utils-
|
|
16
|
+
const measurement = require('./measurement-8e0ce89a.js');
|
|
17
|
+
const utils = require('./utils-5cc32a26.js');
|
|
18
18
|
require('./_commonjsHelpers-537d719a.js');
|
|
19
|
-
require('./browser.esm-
|
|
20
|
-
require('./bundle.esm-
|
|
19
|
+
require('./browser.esm-c51162f8.js');
|
|
20
|
+
require('./bundle.esm-1b8b1f36.js');
|
|
21
21
|
|
|
22
22
|
const viewerMeasurementsCss = ":host{display:block;position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none}::slotted(.viewer-measurements__measurement[mode='']){cursor:pointer}::slotted(.viewer-measurements__measurement[mode='edit']){z-index:1}::slotted(.viewer-measurements__measurement[interacting-anchor='start']),::slotted(.viewer-measurements__measurement[interacting-anchor='end']),::slotted(vertex-viewer-measurement-tool[is-measuring]){z-index:2}";
|
|
23
23
|
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-e100709a.js');
|
|
9
|
-
const bundle_esm = require('./bundle.esm-
|
|
9
|
+
const bundle_esm = require('./bundle.esm-1b8b1f36.js');
|
|
10
10
|
const stencil = require('./stencil-a664cd10.js');
|
|
11
|
-
const streamAttributes = require('./streamAttributes-
|
|
11
|
+
const streamAttributes = require('./streamAttributes-f13c1a96.js');
|
|
12
12
|
const index$1 = require('./index-3bc6bac0.js');
|
|
13
|
-
require('./browser.esm-
|
|
13
|
+
require('./browser.esm-c51162f8.js');
|
|
14
14
|
require('./_commonjsHelpers-537d719a.js');
|
|
15
15
|
|
|
16
16
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-e100709a.js');
|
|
9
|
-
const bundle_esm = require('./bundle.esm-
|
|
10
|
-
const streamAttributes = require('./streamAttributes-
|
|
11
|
-
const browser_esm = require('./browser.esm-
|
|
9
|
+
const bundle_esm = require('./bundle.esm-1b8b1f36.js');
|
|
10
|
+
const streamAttributes = require('./streamAttributes-f13c1a96.js');
|
|
11
|
+
const browser_esm = require('./browser.esm-c51162f8.js');
|
|
12
12
|
const index$1 = require('./index-3bc6bac0.js');
|
|
13
|
-
const config = require('./config-
|
|
14
|
-
const cursors = require('./cursors-
|
|
15
|
-
const dom = require('./dom-
|
|
16
|
-
const scene = require('./scene-
|
|
17
|
-
const viewport = require('./viewport-
|
|
13
|
+
const config = require('./config-91efd353.js');
|
|
14
|
+
const cursors = require('./cursors-14827f58.js');
|
|
15
|
+
const dom = require('./dom-c697cf99.js');
|
|
16
|
+
const scene = require('./scene-23535fc0.js');
|
|
17
|
+
const viewport = require('./viewport-052809c7.js');
|
|
18
18
|
require('./_commonjsHelpers-537d719a.js');
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -273,52 +273,6 @@ class FlyToPartKeyInteraction {
|
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
class FlyToPositionKeyInteraction {
|
|
277
|
-
constructor(stream, configProvider, imageScaleProvider, sceneProvider) {
|
|
278
|
-
this.stream = stream;
|
|
279
|
-
this.configProvider = configProvider;
|
|
280
|
-
this.imageScaleProvider = imageScaleProvider;
|
|
281
|
-
this.sceneProvider = sceneProvider;
|
|
282
|
-
}
|
|
283
|
-
predicate(e) {
|
|
284
|
-
return e.altKey && e.shiftKey;
|
|
285
|
-
}
|
|
286
|
-
async fn(e) {
|
|
287
|
-
var _a, _b;
|
|
288
|
-
const scale = this.imageScaleProvider();
|
|
289
|
-
const hitResult = await this.stream.hitItems({
|
|
290
|
-
point: bundle_esm.point.scale(e.position, (scale === null || scale === void 0 ? void 0 : scale.x) || 1, (scale === null || scale === void 0 ? void 0 : scale.y) || 1),
|
|
291
|
-
}, true);
|
|
292
|
-
if (((_a = hitResult.hitItems) === null || _a === void 0 ? void 0 : _a.hits) != null &&
|
|
293
|
-
hitResult.hitItems.hits.length > 0 &&
|
|
294
|
-
hitResult.hitItems.hits[0].hitPoint != null) {
|
|
295
|
-
const camera = this.sceneProvider().camera();
|
|
296
|
-
const hit = hitResult.hitItems.hits[0];
|
|
297
|
-
if (hit.hitPoint != null &&
|
|
298
|
-
hit.hitPoint.x != null &&
|
|
299
|
-
hit.hitPoint.y != null &&
|
|
300
|
-
hit.hitPoint.z != null) {
|
|
301
|
-
await this.stream.flyTo({
|
|
302
|
-
camera: camera
|
|
303
|
-
.update({
|
|
304
|
-
lookAt: bundle_esm.vector3.create(hit.hitPoint.x, hit.hitPoint.y, hit.hitPoint.z),
|
|
305
|
-
})
|
|
306
|
-
.toFrameCamera(),
|
|
307
|
-
animation: {
|
|
308
|
-
duration: streamAttributes.toProtoDuration(this.configProvider().animation.durationMs),
|
|
309
|
-
},
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
else {
|
|
313
|
-
console.debug(`No hit position found for fly to position [position={x: ${e.position.x}, y: ${e.position.y}}, hit-id={${(_b = hit.itemId) === null || _b === void 0 ? void 0 : _b.hex}}]`);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
else {
|
|
317
|
-
console.debug(`No hit results found for fly to position [position={x: ${e.position.x}, y: ${e.position.y}}]`);
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
|
|
322
276
|
/**
|
|
323
277
|
* The `InteractionApi` provides methods that API developers can use to modify
|
|
324
278
|
* the internal state of an interaction.
|
|
@@ -526,27 +480,6 @@ class InteractionApi {
|
|
|
526
480
|
return camera;
|
|
527
481
|
});
|
|
528
482
|
}
|
|
529
|
-
/**
|
|
530
|
-
* Performs a pan operation of the scene's camera, and requests a new image
|
|
531
|
-
* for the updated scene.
|
|
532
|
-
*
|
|
533
|
-
* @param delta A position delta `{x, y}` in the 2D coordinate space of the
|
|
534
|
-
* viewer.
|
|
535
|
-
*/
|
|
536
|
-
async panCameraByDelta(delta) {
|
|
537
|
-
return this.transformCamera(({ camera, viewport }) => {
|
|
538
|
-
const vv = camera.viewVector();
|
|
539
|
-
const u = bundle_esm.vector3.normalize(camera.up);
|
|
540
|
-
const v = bundle_esm.vector3.normalize(vv);
|
|
541
|
-
const d = bundle_esm.vector3.magnitude(vv) * Math.tan(camera.fovY);
|
|
542
|
-
const epsilonX = (delta.x * d) / viewport.width;
|
|
543
|
-
const epsilonY = (delta.y / viewport.width) * d;
|
|
544
|
-
const xvec = bundle_esm.vector3.cross(u, v);
|
|
545
|
-
const yvec = bundle_esm.vector3.cross(v, xvec);
|
|
546
|
-
const offset = bundle_esm.vector3.add(bundle_esm.vector3.scale(epsilonX, xvec), bundle_esm.vector3.scale(epsilonY, yvec));
|
|
547
|
-
return camera.moveBy(offset);
|
|
548
|
-
});
|
|
549
|
-
}
|
|
550
483
|
/**
|
|
551
484
|
* Performs a view all operation for the scene's bounding box, and requests a
|
|
552
485
|
* new image for the updated scene.
|
|
@@ -605,8 +538,8 @@ class InteractionApi {
|
|
|
605
538
|
return updated.update({
|
|
606
539
|
// Scale the lookAt point to the same length as the distance to the
|
|
607
540
|
// center of the bounding box to maintain zoom and pan behavior.
|
|
608
|
-
lookAt: bundle_esm.vector3.add(bundle_esm.vector3.scale(camera.
|
|
609
|
-
bundle_esm.vector3.magnitude(updated.viewVector
|
|
541
|
+
lookAt: bundle_esm.vector3.add(bundle_esm.vector3.scale(Math.abs(camera.signedDistanceToBoundingBoxCenter()) /
|
|
542
|
+
bundle_esm.vector3.magnitude(updated.viewVector), updated.viewVector), updated.position),
|
|
610
543
|
});
|
|
611
544
|
});
|
|
612
545
|
}
|
|
@@ -619,7 +552,7 @@ class InteractionApi {
|
|
|
619
552
|
*/
|
|
620
553
|
async zoomCamera(delta) {
|
|
621
554
|
return this.transformCamera(({ camera, viewport }) => {
|
|
622
|
-
const vv = camera.viewVector
|
|
555
|
+
const vv = camera.viewVector;
|
|
623
556
|
const v = bundle_esm.vector3.normalize(vv);
|
|
624
557
|
const distance = bundle_esm.vector3.magnitude(vv);
|
|
625
558
|
const epsilon = (3 * distance * delta) / viewport.height;
|
|
@@ -740,6 +673,148 @@ class InteractionApi {
|
|
|
740
673
|
}
|
|
741
674
|
}
|
|
742
675
|
|
|
676
|
+
class InteractionApiOrthographic extends InteractionApi {
|
|
677
|
+
constructor(stream, cursors, getConfig, getScene, getFrame, getViewport, tapEmitter, doubleTapEmitter, longPressEmitter, interactionStartedEmitter, interactionFinishedEmitter) {
|
|
678
|
+
super(stream, cursors, getConfig, getScene, getFrame, getViewport, tapEmitter, doubleTapEmitter, longPressEmitter, interactionStartedEmitter, interactionFinishedEmitter);
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Performs a pan operation of the scene's camera, and requests a new image
|
|
682
|
+
* for the updated scene.
|
|
683
|
+
*
|
|
684
|
+
* @param delta A position delta `{x, y}` in the 2D coordinate space of the
|
|
685
|
+
* viewer.
|
|
686
|
+
*/
|
|
687
|
+
async panCameraByDelta(delta) {
|
|
688
|
+
return this.transformCamera(({ camera, viewport }) => {
|
|
689
|
+
const viewVector = camera.viewVector;
|
|
690
|
+
const normalizedUpVector = bundle_esm.vector3.normalize(camera.up);
|
|
691
|
+
const normalizedViewVector = bundle_esm.vector3.normalize(viewVector);
|
|
692
|
+
const d = bundle_esm.vector3.magnitude(viewVector) * Math.tan(camera.fovHeight);
|
|
693
|
+
const epsilonX = (delta.x * d) / viewport.width;
|
|
694
|
+
const epsilonY = (delta.y / viewport.width) * d;
|
|
695
|
+
const xvec = bundle_esm.vector3.cross(normalizedUpVector, normalizedViewVector);
|
|
696
|
+
const yvec = bundle_esm.vector3.cross(normalizedViewVector, xvec);
|
|
697
|
+
const offset = bundle_esm.vector3.add(bundle_esm.vector3.scale(epsilonX, xvec), bundle_esm.vector3.scale(epsilonY, yvec));
|
|
698
|
+
return camera.moveBy(offset);
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
async transformCamera(t) {
|
|
702
|
+
var _a;
|
|
703
|
+
if (this.isInteracting()) {
|
|
704
|
+
const scene = this.getScene();
|
|
705
|
+
const viewport = this.getViewport();
|
|
706
|
+
const frame = this.getFrame();
|
|
707
|
+
const depthBuffer = await (frame === null || frame === void 0 ? void 0 : frame.depthBuffer());
|
|
708
|
+
this.currentCamera =
|
|
709
|
+
this.currentCamera != null && viewport != null && frame != null
|
|
710
|
+
? t({
|
|
711
|
+
camera: this.currentCamera,
|
|
712
|
+
viewport,
|
|
713
|
+
scale: scene.scale(),
|
|
714
|
+
boundingBox: scene.boundingBox(),
|
|
715
|
+
frame,
|
|
716
|
+
depthBuffer,
|
|
717
|
+
})
|
|
718
|
+
: undefined;
|
|
719
|
+
await ((_a = this.currentCamera) === null || _a === void 0 ? void 0 : _a.render());
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
class InteractionApiPerspective extends InteractionApi {
|
|
725
|
+
constructor(stream, cursors, getConfig, getScene, getFrame, getViewport, tapEmitter, doubleTapEmitter, longPressEmitter, interactionStartedEmitter, interactionFinishedEmitter) {
|
|
726
|
+
super(stream, cursors, getConfig, getScene, getFrame, getViewport, tapEmitter, doubleTapEmitter, longPressEmitter, interactionStartedEmitter, interactionFinishedEmitter);
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* Performs a pan operation of the scene's camera, and requests a new image
|
|
730
|
+
* for the updated scene.
|
|
731
|
+
*
|
|
732
|
+
* @param delta A position delta `{x, y}` in the 2D coordinate space of the
|
|
733
|
+
* viewer.
|
|
734
|
+
*/
|
|
735
|
+
async panCameraByDelta(delta) {
|
|
736
|
+
return this.transformCamera(({ camera, viewport }) => {
|
|
737
|
+
const vv = camera.viewVector;
|
|
738
|
+
const u = bundle_esm.vector3.normalize(camera.up);
|
|
739
|
+
const v = bundle_esm.vector3.normalize(vv);
|
|
740
|
+
const d = bundle_esm.vector3.magnitude(vv) * Math.tan(camera.fovY);
|
|
741
|
+
const epsilonX = (delta.x * d) / viewport.width;
|
|
742
|
+
const epsilonY = (delta.y / viewport.width) * d;
|
|
743
|
+
const xvec = bundle_esm.vector3.cross(u, v);
|
|
744
|
+
const yvec = bundle_esm.vector3.cross(v, xvec);
|
|
745
|
+
const offset = bundle_esm.vector3.add(bundle_esm.vector3.scale(epsilonX, xvec), bundle_esm.vector3.scale(epsilonY, yvec));
|
|
746
|
+
return camera.moveBy(offset);
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
async transformCamera(t) {
|
|
750
|
+
var _a;
|
|
751
|
+
if (this.isInteracting()) {
|
|
752
|
+
const scene = this.getScene();
|
|
753
|
+
const viewport = this.getViewport();
|
|
754
|
+
const frame = this.getFrame();
|
|
755
|
+
const depthBuffer = await (frame === null || frame === void 0 ? void 0 : frame.depthBuffer());
|
|
756
|
+
this.currentCamera =
|
|
757
|
+
this.currentCamera != null && viewport != null && frame != null
|
|
758
|
+
? t({
|
|
759
|
+
camera: this.currentCamera,
|
|
760
|
+
viewport,
|
|
761
|
+
scale: scene.scale(),
|
|
762
|
+
boundingBox: scene.boundingBox(),
|
|
763
|
+
frame,
|
|
764
|
+
depthBuffer,
|
|
765
|
+
})
|
|
766
|
+
: undefined;
|
|
767
|
+
await ((_a = this.currentCamera) === null || _a === void 0 ? void 0 : _a.render());
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
class FlyToPositionKeyInteraction {
|
|
773
|
+
constructor(stream, configProvider, imageScaleProvider, sceneProvider) {
|
|
774
|
+
this.stream = stream;
|
|
775
|
+
this.configProvider = configProvider;
|
|
776
|
+
this.imageScaleProvider = imageScaleProvider;
|
|
777
|
+
this.sceneProvider = sceneProvider;
|
|
778
|
+
}
|
|
779
|
+
predicate(e) {
|
|
780
|
+
return e.altKey && e.shiftKey;
|
|
781
|
+
}
|
|
782
|
+
async fn(e) {
|
|
783
|
+
var _a, _b;
|
|
784
|
+
const scale = this.imageScaleProvider();
|
|
785
|
+
const hitResult = await this.stream.hitItems({
|
|
786
|
+
point: bundle_esm.point.scale(e.position, (scale === null || scale === void 0 ? void 0 : scale.x) || 1, (scale === null || scale === void 0 ? void 0 : scale.y) || 1),
|
|
787
|
+
}, true);
|
|
788
|
+
if (((_a = hitResult.hitItems) === null || _a === void 0 ? void 0 : _a.hits) != null &&
|
|
789
|
+
hitResult.hitItems.hits.length > 0 &&
|
|
790
|
+
hitResult.hitItems.hits[0].hitPoint != null) {
|
|
791
|
+
const camera = this.sceneProvider().camera();
|
|
792
|
+
const hit = hitResult.hitItems.hits[0];
|
|
793
|
+
if (hit.hitPoint != null &&
|
|
794
|
+
hit.hitPoint.x != null &&
|
|
795
|
+
hit.hitPoint.y != null &&
|
|
796
|
+
hit.hitPoint.z != null) {
|
|
797
|
+
await this.stream.flyTo({
|
|
798
|
+
camera: camera
|
|
799
|
+
.update({
|
|
800
|
+
lookAt: bundle_esm.vector3.create(hit.hitPoint.x, hit.hitPoint.y, hit.hitPoint.z),
|
|
801
|
+
})
|
|
802
|
+
.toFrameCamera(),
|
|
803
|
+
animation: {
|
|
804
|
+
duration: streamAttributes.toProtoDuration(this.configProvider().animation.durationMs),
|
|
805
|
+
},
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
else {
|
|
809
|
+
console.debug(`No hit position found for fly to position [position={x: ${e.position.x}, y: ${e.position.y}}, hit-id={${(_b = hit.itemId) === null || _b === void 0 ? void 0 : _b.hex}}]`);
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
else {
|
|
813
|
+
console.debug(`No hit results found for fly to position [position={x: ${e.position.x}, y: ${e.position.y}}]`);
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
|
|
743
818
|
const SCROLL_WHEEL_DELTA_PERCENTAGES = [0.2, 0.15, 0.25, 0.25, 0.15];
|
|
744
819
|
const DEFAULT_FONT_SIZE = 16;
|
|
745
820
|
const DEFAULT_LINE_HEIGHT = 1.2;
|
|
@@ -2272,6 +2347,11 @@ let Viewer = class {
|
|
|
2272
2347
|
* the viewer. Enabled by default.
|
|
2273
2348
|
*/
|
|
2274
2349
|
this.cameraControls = true;
|
|
2350
|
+
/**
|
|
2351
|
+
* The type of camera model to represent the scene with. Can be either
|
|
2352
|
+
* `perspective` or `orthographic`, and defaults to `perspective`.
|
|
2353
|
+
*/
|
|
2354
|
+
this.cameraType = 'perspective';
|
|
2275
2355
|
/**
|
|
2276
2356
|
* Enables or disables the default keyboard shortcut interactions provided by
|
|
2277
2357
|
* the viewer. Enabled by default, requires `cameraControls` being enabled.
|
|
@@ -2561,6 +2641,11 @@ let Viewer = class {
|
|
|
2561
2641
|
(_b = this.baseInteractionHandler) === null || _b === void 0 ? void 0 : _b.setPrimaryInteractionType('rotate');
|
|
2562
2642
|
}
|
|
2563
2643
|
}
|
|
2644
|
+
handleCameraTypeChanged(updatedCameraType, previousCameraType) {
|
|
2645
|
+
if (updatedCameraType !== previousCameraType) {
|
|
2646
|
+
this.updateCameraType();
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2564
2649
|
/**
|
|
2565
2650
|
* @ignore
|
|
2566
2651
|
*/
|
|
@@ -2807,7 +2892,9 @@ let Viewer = class {
|
|
|
2807
2892
|
this.frame !== frame) {
|
|
2808
2893
|
const canvas = this.canvasElement.getContext('2d');
|
|
2809
2894
|
if (canvas != null) {
|
|
2895
|
+
const previousFrame = this.frame;
|
|
2810
2896
|
this.frame = frame;
|
|
2897
|
+
this.updateInteractionApi(previousFrame);
|
|
2811
2898
|
const data = {
|
|
2812
2899
|
canvas,
|
|
2813
2900
|
canvasDimensions,
|
|
@@ -2843,7 +2930,10 @@ let Viewer = class {
|
|
|
2843
2930
|
if (this.stream == null) {
|
|
2844
2931
|
throw new scene.ComponentInitializationError('Cannot create interaction API. Component has not been initialized.');
|
|
2845
2932
|
}
|
|
2846
|
-
return
|
|
2933
|
+
return this.frame == null ||
|
|
2934
|
+
streamAttributes.isPerspectiveFrameCamera(this.frame.scene.camera)
|
|
2935
|
+
? new InteractionApiPerspective(this.stream, this.stateMap.cursorManager, () => this.getResolvedConfig().interactions, () => this.createScene(), () => this.frame, () => this.viewport, this.tap, this.doubletap, this.longpress, this.interactionStarted, this.interactionFinished)
|
|
2936
|
+
: new InteractionApiOrthographic(this.stream, this.stateMap.cursorManager, () => this.getResolvedConfig().interactions, () => this.createScene(), () => this.frame, () => this.viewport, this.tap, this.doubletap, this.longpress, this.interactionStarted, this.interactionFinished);
|
|
2847
2937
|
}
|
|
2848
2938
|
handleCursorChanged() {
|
|
2849
2939
|
window.requestAnimationFrame(() => {
|
|
@@ -2903,6 +2993,34 @@ let Viewer = class {
|
|
|
2903
2993
|
var _a;
|
|
2904
2994
|
(_a = this.stream) === null || _a === void 0 ? void 0 : _a.update({ streamAttributes: this.getStreamAttributes() });
|
|
2905
2995
|
}
|
|
2996
|
+
updateInteractionApi(previousFrame) {
|
|
2997
|
+
if (previousFrame != null && this.frame != null) {
|
|
2998
|
+
const hasChangedFromPerspective = streamAttributes.isPerspectiveFrameCamera(previousFrame.scene.camera) &&
|
|
2999
|
+
streamAttributes.isPerspectiveFrameCamera(this.frame.scene.camera);
|
|
3000
|
+
const hasChangedFromOrthographic = streamAttributes.isOrthographicFrameCamera(previousFrame.scene.camera) &&
|
|
3001
|
+
streamAttributes.isOrthographicFrameCamera(this.frame.scene.camera);
|
|
3002
|
+
if (hasChangedFromPerspective || hasChangedFromOrthographic) {
|
|
3003
|
+
this.interactionApi = this.createInteractionApi();
|
|
3004
|
+
}
|
|
3005
|
+
}
|
|
3006
|
+
}
|
|
3007
|
+
updateCameraType() {
|
|
3008
|
+
var _a, _b;
|
|
3009
|
+
if (this.frame != null) {
|
|
3010
|
+
if (this.cameraType === 'orthographic' &&
|
|
3011
|
+
streamAttributes.isPerspectiveFrameCamera(this.frame.scene.camera)) {
|
|
3012
|
+
(_a = this.stream) === null || _a === void 0 ? void 0 : _a.replaceCamera({
|
|
3013
|
+
camera: streamAttributes.toProtobuf(streamAttributes.toOrthographic(this.frame.scene.camera)),
|
|
3014
|
+
});
|
|
3015
|
+
}
|
|
3016
|
+
else if (this.cameraType === 'perspective' &&
|
|
3017
|
+
streamAttributes.isOrthographicFrameCamera(this.frame.scene.camera)) {
|
|
3018
|
+
(_b = this.stream) === null || _b === void 0 ? void 0 : _b.replaceCamera({
|
|
3019
|
+
camera: streamAttributes.toProtobuf(streamAttributes.toPerspective(this.frame.scene.camera)),
|
|
3020
|
+
});
|
|
3021
|
+
}
|
|
3022
|
+
}
|
|
3023
|
+
}
|
|
2906
3024
|
getDepthBufferStreamAttributesValue() {
|
|
2907
3025
|
var _a;
|
|
2908
3026
|
const depthBuffer = (_a = this.depthBuffers) !== null && _a !== void 0 ? _a : (this.rotateAroundTapPoint ? 'final' : undefined);
|
|
@@ -2943,6 +3061,7 @@ let Viewer = class {
|
|
|
2943
3061
|
static get watchers() { return {
|
|
2944
3062
|
"src": ["handleSrcChanged"],
|
|
2945
3063
|
"rotateAroundTapPoint": ["handleRotateAboutTapPointChanged"],
|
|
3064
|
+
"cameraType": ["handleCameraTypeChanged"],
|
|
2946
3065
|
"depthBuffers": ["handleDepthBuffersChanged"],
|
|
2947
3066
|
"experimentalGhostingOpacity": ["handleExperimentalGhostingOpacityChanged"],
|
|
2948
3067
|
"featureLines": ["handleFeatureLinesChanged"],
|