@vertexvis/viewer 0.15.2-testing.4 → 0.15.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/_commonjsHelpers-dcc4cf71.js +1 -1
- package/dist/cjs/app-globals-2035678d.js +1 -1
- package/dist/cjs/browser.esm-5d246754.js +1 -1
- package/dist/cjs/bundle.esm-22b6f2d6.js +1 -1
- package/dist/cjs/bundle.esm-b43c197a.js +38280 -0
- package/dist/cjs/{config-4a86ae0b.js → config-3fc1c093.js} +2 -2
- package/dist/cjs/{cursors-85d403e9.js → cursors-02a06ec9.js} +7 -1
- package/dist/cjs/dom-8d90bfaf.js +1 -1
- package/dist/cjs/dom-92728e58.js +1 -1
- package/dist/cjs/dom-d1bbd67c.js +1 -1
- package/dist/cjs/dom-d57d3c3b.js +1 -1
- package/dist/cjs/elementRectObserver-9b28f182.js +1 -1
- package/dist/cjs/entities-9eb7e608.js +1 -1
- package/dist/cjs/{entities-496b61cd.js → entities-c1c3c6a3.js} +3 -3
- package/dist/cjs/errors-1b37642b.js +97 -0
- package/dist/cjs/grpc-web-client.umd-2af20c1b.js +1 -1
- package/dist/cjs/index-70db349e.js +1 -1
- package/dist/cjs/index-b9d13137.js +1 -1
- package/dist/cjs/index.cjs.js +9 -6
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{mapper-216603b0.js → mapper-d4145b72.js} +2 -2
- package/dist/cjs/markup-4a2fc281.js +1 -1
- package/dist/cjs/{model-b61f4d20.js → model-19fb560a.js} +27 -6
- package/dist/cjs/model-20a70d27.js +1 -1
- package/dist/cjs/overlays-b03ec80b.js +1 -1
- package/dist/cjs/png-decoder-ef097f37.js +1 -1
- package/dist/cjs/results-178e89a3.js +1 -1
- package/dist/cjs/{scene-0ce59b26.js → scene-a94e6fa5.js} +276 -225
- package/dist/cjs/shadow-css-6b9daa41.js +1 -1
- package/dist/cjs/stencil-fc92b387.js +1 -1
- package/dist/cjs/{streamAttributes-7725f5c4.js → streamAttributes-cf0c513d.js} +5408 -39951
- package/dist/cjs/templates-e57b3741.js +1 -1
- package/dist/cjs/utils-2c8e2aa3.js +1 -1
- package/dist/cjs/utils-ea359796.js +1 -1
- package/dist/cjs/vertex-scene-tree-search_3.cjs.entry.js +1 -1
- package/dist/cjs/vertex-scene-tree-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/vertex-scene-tree-table-column.cjs.entry.js +1 -1
- package/dist/cjs/vertex-scene-tree-table-header.cjs.entry.js +1 -1
- package/dist/cjs/vertex-scene-tree-table-resize-divider.cjs.entry.js +1 -1
- package/dist/cjs/vertex-scene-tree-toolbar-group.cjs.entry.js +1 -1
- package/dist/cjs/vertex-scene-tree.cjs.entry.js +158 -37
- package/dist/cjs/vertex-viewer-box-query-tool.cjs.entry.js +229 -49
- package/dist/cjs/vertex-viewer-button_3.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-default-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-dom-element_2.cjs.entry.js +3 -2
- package/dist/cjs/vertex-viewer-dom-group.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-icon.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-layer.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-markup-arrow_3.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-markup-tool.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-markup.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-measurement-details.cjs.entry.js +3 -2
- package/dist/cjs/vertex-viewer-measurement-distance.cjs.entry.js +5 -4
- package/dist/cjs/vertex-viewer-measurement-line_2.cjs.entry.js +4 -3
- package/dist/cjs/vertex-viewer-measurement-precise.cjs.entry.js +7 -6
- package/dist/cjs/vertex-viewer-pin-group.cjs.entry.js +10 -5
- package/dist/cjs/vertex-viewer-pin-label_2.cjs.entry.js +15 -13
- package/dist/cjs/vertex-viewer-pin-tool.cjs.entry.js +20 -9
- package/dist/cjs/vertex-viewer-spinner.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-transform-widget.cjs.entry.js +6 -4
- package/dist/cjs/vertex-viewer-view-cube.cjs.entry.js +5 -4
- package/dist/cjs/vertex-viewer.cjs.entry.js +80 -53
- package/dist/cjs/viewer.cjs.js +2 -2
- package/dist/cjs/viewport-5ca619f7.js +1 -1
- package/dist/collection/components/scene-tree/lib/controller.js +108 -28
- package/dist/collection/components/scene-tree/lib/errors.js +35 -2
- package/dist/collection/components/scene-tree/scene-tree.js +12 -5
- package/dist/collection/components/viewer/viewer.js +17 -15
- package/dist/collection/components/viewer-box-query-tool/viewer-box-query-tool.css +7 -2
- package/dist/collection/components/viewer-box-query-tool/viewer-box-query-tool.js +105 -18
- package/dist/collection/components/viewer-pin-group/viewer-pin-group.js +5 -1
- package/dist/collection/components/viewer-pin-label/viewer-pin-label.css +1 -1
- package/dist/collection/components/viewer-pin-label/viewer-pin-label.js +14 -12
- package/dist/collection/components/viewer-pin-tool/utils.js +25 -4
- package/dist/collection/components/viewer-pin-tool/viewer-pin-tool.css +12 -0
- package/dist/collection/components/viewer-pin-tool/viewer-pin-tool.js +9 -2
- package/dist/collection/components/viewer-transform-widget/viewer-transform-widget.js +3 -2
- package/dist/collection/components/viewer-view-cube/viewer-view-cube.js +5 -5
- package/dist/collection/lib/cursors.js +6 -1
- package/dist/collection/lib/interactions/baseInteractionHandler.js +12 -2
- package/dist/collection/lib/interactions/mouseInteractions.js +5 -4
- package/dist/collection/lib/mappers/frameStreaming.js +11 -11
- package/dist/collection/lib/pins/interactions.js +9 -5
- package/dist/collection/lib/pins/model.js +2 -2
- package/dist/collection/lib/rendering/matrices.js +2 -4
- package/dist/collection/lib/scenes/camera.js +4 -2
- package/dist/collection/lib/scenes/mapper.js +98 -36
- package/dist/collection/lib/scenes/queries.js +89 -50
- package/dist/collection/lib/scenes/scene.js +15 -7
- package/dist/collection/lib/stream/stream.js +24 -12
- package/dist/collection/lib/transforms/drawable.js +2 -2
- package/dist/collection/lib/types/frame.js +4 -3
- package/dist/collection/lib/types/frameCamera.js +6 -1
- package/dist/collection/lib/types/index.js +3 -2
- package/dist/collection/lib/types/loadableResource.js +24 -4
- package/dist/collection/lib/types/sceneViewStateIdentifier.js +7 -0
- package/dist/collection/lib/volume-intersection/controller.js +71 -15
- package/dist/collection/lib/volume-intersection/interactions.js +54 -9
- package/dist/collection/lib/volume-intersection/model.js +27 -10
- package/dist/custom-elements/index.js +20207 -15976
- package/dist/custom-elements/png-decoder.js +1 -1
- package/dist/esm/_commonjsHelpers-11ca3be1.js +1 -1
- package/dist/esm/app-globals-40df99a0.js +1 -1
- package/dist/esm/{browser.esm-ae4ca1f1.js → browser.esm-07e7db8f.js} +2 -2
- package/dist/esm/bundle.esm-91404853.js +38273 -0
- package/dist/esm/{bundle.esm-ce2c7ad3.js → bundle.esm-92e615bf.js} +2 -2
- package/dist/esm/{config-6cdeb6ca.js → config-25384fe6.js} +3 -3
- package/dist/esm/{cursors-a8d4b3f4.js → cursors-127a3bb7.js} +8 -3
- package/dist/esm/dom-0440435d.js +1 -1
- package/dist/esm/dom-be140992.js +1 -1
- package/dist/esm/dom-e19ee80b.js +1 -1
- package/dist/esm/{dom-5b164305.js → dom-e436f0c0.js} +2 -2
- package/dist/esm/elementRectObserver-39cf7b95.js +1 -1
- package/dist/esm/{entities-6f3c5437.js → entities-0e325765.js} +4 -4
- package/dist/esm/entities-ce81dd7f.js +1 -1
- package/dist/esm/errors-a4cc9caa.js +85 -0
- package/dist/esm/grpc-web-client.umd-5409853c.js +1 -1
- package/dist/esm/index-26dfb2d0.js +1 -1
- package/dist/esm/index-e841d91b.js +1 -1
- package/dist/esm/index.js +15 -13
- package/dist/esm/index.mjs +15 -13
- package/dist/esm/loader.js +2 -2
- package/dist/esm/loader.mjs +2 -2
- package/dist/esm/{mapper-941ff03c.js → mapper-dd937684.js} +3 -3
- package/dist/esm/{markup-3c2900f3.js → markup-2dde1f10.js} +3 -3
- package/dist/esm/{model-fa9af61a.js → model-3cd8cd47.js} +2 -2
- package/dist/esm/{model-40bd1711.js → model-bfe1c4d8.js} +29 -8
- package/dist/esm/{overlays-cc3efc30.js → overlays-8f195eb3.js} +3 -3
- package/dist/esm/{png-decoder-d4b65417.js → png-decoder-45f38ea3.js} +2 -2
- package/dist/esm/{results-3b4df2cf.js → results-38baef59.js} +2 -2
- package/dist/esm/{scene-970f5000.js → scene-2543b3bd.js} +237 -178
- package/dist/esm/shadow-css-51dd7708.js +1 -1
- package/dist/esm/stencil-bfbf099f.js +1 -1
- package/dist/esm/{streamAttributes-24bd7b3a.js → streamAttributes-23270e27.js} +5419 -39956
- package/dist/esm/templates-022199c1.js +1 -1
- package/dist/esm/{utils-81347571.js → utils-2306c744.js} +2 -2
- package/dist/esm/{utils-559e1632.js → utils-f03802ef.js} +2 -2
- package/dist/esm/vertex-scene-tree-search_3.entry.js +3 -3
- package/dist/esm/vertex-scene-tree-table-cell.entry.js +1 -1
- package/dist/esm/vertex-scene-tree-table-column.entry.js +1 -1
- package/dist/esm/vertex-scene-tree-table-header.entry.js +1 -1
- package/dist/esm/vertex-scene-tree-table-resize-divider.entry.js +1 -1
- package/dist/esm/vertex-scene-tree-toolbar-group.entry.js +1 -1
- package/dist/esm/vertex-scene-tree.entry.js +160 -39
- package/dist/esm/vertex-viewer-box-query-tool.entry.js +229 -49
- package/dist/esm/vertex-viewer-button_3.entry.js +1 -1
- package/dist/esm/vertex-viewer-default-toolbar.entry.js +1 -1
- package/dist/esm/vertex-viewer-dom-element_2.entry.js +6 -5
- package/dist/esm/vertex-viewer-dom-group.entry.js +3 -3
- package/dist/esm/vertex-viewer-icon.entry.js +1 -1
- package/dist/esm/vertex-viewer-layer.entry.js +1 -1
- package/dist/esm/vertex-viewer-markup-arrow_3.entry.js +4 -4
- package/dist/esm/vertex-viewer-markup-tool.entry.js +5 -5
- package/dist/esm/vertex-viewer-markup.entry.js +5 -5
- package/dist/esm/vertex-viewer-measurement-details.entry.js +5 -4
- package/dist/esm/vertex-viewer-measurement-distance.entry.js +13 -12
- package/dist/esm/vertex-viewer-measurement-line_2.entry.js +8 -7
- package/dist/esm/vertex-viewer-measurement-precise.entry.js +12 -11
- package/dist/esm/vertex-viewer-pin-group.entry.js +13 -8
- package/dist/esm/vertex-viewer-pin-label_2.entry.js +18 -16
- package/dist/esm/vertex-viewer-pin-tool.entry.js +23 -12
- package/dist/esm/vertex-viewer-spinner.entry.js +1 -1
- package/dist/esm/vertex-viewer-transform-widget.entry.js +9 -7
- package/dist/esm/vertex-viewer-view-cube.entry.js +7 -6
- package/dist/esm/vertex-viewer.entry.js +65 -38
- package/dist/esm/viewer.js +2 -2
- package/dist/esm/{viewport-e39e2eba.js → viewport-f19fc583.js} +2 -2
- package/dist/types/components/scene-tree/lib/controller.d.ts +18 -3
- package/dist/types/components/scene-tree/lib/errors.d.ts +17 -2
- package/dist/types/components/viewer/viewer.d.ts +2 -0
- package/dist/types/components/viewer-box-query-tool/viewer-box-query-tool.d.ts +36 -2
- package/dist/types/components/viewer-pin-tool/utils.d.ts +1 -1
- package/dist/types/components.d.ts +11 -3
- package/dist/types/lib/cursors.d.ts +5 -0
- package/dist/types/lib/interactions/baseInteractionHandler.d.ts +1 -0
- package/dist/types/lib/interactions/mouseInteractions.d.ts +2 -1
- package/dist/types/lib/pins/interactions.d.ts +4 -2
- package/dist/types/lib/pins/model.d.ts +1 -1
- package/dist/types/lib/scenes/camera.d.ts +1 -1
- package/dist/types/lib/scenes/mapper.d.ts +5 -1
- package/dist/types/lib/scenes/queries.d.ts +45 -30
- package/dist/types/lib/scenes/scene.d.ts +10 -1
- package/dist/types/lib/types/frame.d.ts +1 -1
- package/dist/types/lib/types/index.d.ts +2 -1
- package/dist/types/lib/types/loadableResource.d.ts +8 -2
- package/dist/types/lib/types/sceneViewStateIdentifier.d.ts +15 -0
- package/dist/types/lib/volume-intersection/controller.d.ts +33 -5
- package/dist/types/lib/volume-intersection/interactions.d.ts +12 -1
- package/dist/types/lib/volume-intersection/model.d.ts +7 -0
- package/dist/viewer/index.esm.js +2 -2
- package/dist/viewer/{p-ad09c92e.entry.js → p-029fba92.entry.js} +1 -1
- package/dist/viewer/p-07aeee89.js +1 -1
- package/dist/viewer/{p-29986489.js → p-0a017be7.js} +2 -2
- package/dist/viewer/p-0c583cad.entry.js +4 -0
- package/dist/viewer/p-0d494d01.js +4 -0
- package/dist/viewer/p-0fdad1a5.js +1 -1
- package/dist/viewer/{p-3ca4a7c1.js → p-1812c82d.js} +2 -2
- package/dist/viewer/{p-7663a603.entry.js → p-191156ad.entry.js} +1 -1
- package/dist/viewer/{p-a57dc6e4.entry.js → p-1998284a.entry.js} +2 -2
- package/dist/viewer/p-27f715f8.entry.js +4 -0
- package/dist/viewer/{p-7f6251da.js → p-283aeac4.js} +2 -2
- package/dist/viewer/p-298b63c2.entry.js +4 -0
- package/dist/viewer/p-2ace066b.entry.js +4 -0
- package/dist/viewer/{p-597cc9b5.js → p-2b60a8b0.js} +2 -2
- package/dist/viewer/{p-050f912b.entry.js → p-2fd123c8.entry.js} +1 -1
- package/dist/viewer/p-305a8be6.entry.js +4 -0
- package/dist/viewer/p-31724d24.js +4 -0
- package/dist/viewer/p-32cc2209.js +4 -0
- package/dist/viewer/p-3829dd99.entry.js +4 -0
- package/dist/viewer/{p-6da8a28f.entry.js → p-3aae4bf1.entry.js} +2 -2
- package/dist/viewer/{p-99352cf0.js → p-42760392.js} +2 -2
- package/dist/viewer/p-440c8174.js +4 -0
- package/dist/viewer/{p-e422deaf.entry.js → p-4f25e367.entry.js} +2 -2
- package/dist/viewer/{p-a107b65e.entry.js → p-507b5aeb.entry.js} +2 -2
- package/dist/viewer/{p-52ab9ec0.js → p-51401063.js} +2 -2
- package/dist/viewer/{p-426970b3.entry.js → p-533b1c63.entry.js} +1 -1
- package/dist/viewer/{p-dcb9804c.entry.js → p-569ed94a.entry.js} +2 -2
- package/dist/viewer/p-5809b400.js +1 -1
- package/dist/viewer/p-6072cf84.js +4 -0
- package/dist/viewer/{p-e4a26a32.entry.js → p-6406a70a.entry.js} +1 -1
- package/dist/viewer/p-6bf0594b.entry.js +4 -0
- package/dist/viewer/p-72c59115.entry.js +4 -0
- package/dist/viewer/{p-d71652b0.entry.js → p-8ac7290a.entry.js} +1 -1
- package/dist/viewer/{p-f184bcab.entry.js → p-8afcbd99.entry.js} +1 -1
- package/dist/viewer/p-92fe4417.js +1 -1
- package/dist/viewer/{p-5746931d.entry.js → p-952a217d.entry.js} +1 -1
- package/dist/viewer/p-98e6a50e.js +1 -1
- package/dist/viewer/{p-99fd27e0.entry.js → p-9cb99ea8.entry.js} +1 -1
- package/dist/viewer/p-a2e9e8a5.js +4 -0
- package/dist/viewer/p-a380f0c2.js +1 -1
- package/dist/viewer/{p-661b5234.js → p-acfc5c50.js} +2 -2
- package/dist/viewer/{p-82bd25e8.entry.js → p-b3540dce.entry.js} +1 -1
- package/dist/viewer/p-b5ca30cd.js +4 -0
- package/dist/viewer/p-b74242dc.js +1 -1
- package/dist/viewer/p-bc1160cf.entry.js +4 -0
- package/dist/viewer/{p-c5e67a1e.entry.js → p-bd5a302c.entry.js} +2 -2
- package/dist/viewer/p-c738296e.js +1 -1
- package/dist/viewer/p-c8c4343b.js +1 -1
- package/dist/viewer/p-cd9ccb9e.entry.js +4 -0
- package/dist/viewer/{p-9e1384c9.js → p-cf689bbd.js} +2 -2
- package/dist/viewer/{p-70e5e8a8.js → p-d216a866.js} +2 -2
- package/dist/viewer/p-d4ed7b8d.js +4 -0
- package/dist/viewer/p-d6d5d5de.entry.js +4 -0
- package/dist/viewer/p-d6fce4c1.js +1 -1
- package/dist/viewer/p-df8fbe56.js +1 -1
- package/dist/viewer/p-dfe5a97d.js +1 -1
- package/dist/viewer/{p-00ce31a0.js → p-e1896ce4.js} +2 -2
- package/dist/viewer/p-e23af70c.js +4 -0
- package/dist/viewer/p-e4aa9cdb.js +1 -1
- package/dist/viewer/p-e929dd63.entry.js +4 -0
- package/dist/viewer/{p-65af7a89.js → p-fc7d8c03.js} +3 -3
- package/dist/viewer/viewer.esm.js +2 -2
- package/package.json +9 -9
- package/readme.md +4 -4
- package/dist/viewer/p-096e60bd.js +0 -4
- package/dist/viewer/p-0cf4f05d.entry.js +0 -4
- package/dist/viewer/p-0fcafbf9.js +0 -4
- package/dist/viewer/p-10145045.js +0 -4
- package/dist/viewer/p-1abfe4bf.js +0 -4
- package/dist/viewer/p-1bba9ade.entry.js +0 -4
- package/dist/viewer/p-24cda14a.entry.js +0 -4
- package/dist/viewer/p-27dbc865.js +0 -4
- package/dist/viewer/p-2b58afc3.entry.js +0 -4
- package/dist/viewer/p-51966cef.entry.js +0 -4
- package/dist/viewer/p-608925c5.entry.js +0 -4
- package/dist/viewer/p-68e192b9.js +0 -4
- package/dist/viewer/p-69a3fce8.entry.js +0 -4
- package/dist/viewer/p-74c772bb.entry.js +0 -4
- package/dist/viewer/p-990f98c2.js +0 -4
- package/dist/viewer/p-9dfe0b43.entry.js +0 -4
- package/dist/viewer/p-bb425931.entry.js +0 -4
- package/dist/viewer/p-bfacbaa8.entry.js +0 -4
- package/dist/viewer/p-c72da0fb.entry.js +0 -4
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
/**!
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2023 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, h, H as Host } from './index-26dfb2d0.js';
|
|
5
|
-
import { s as scene_view_api_pb } from './mapper-
|
|
5
|
+
import { s as scene_view_api_pb } from './mapper-dd937684.js';
|
|
6
6
|
import { g as grpcWebClient_umd } from './grpc-web-client.umd-5409853c.js';
|
|
7
|
-
import { p as parseConfig } from './config-
|
|
8
|
-
import { a as MeasurementEntity, M as MeasurementController } from './entities-
|
|
9
|
-
import './streamAttributes-
|
|
10
|
-
import { M as MeasurementModel } from './model-
|
|
11
|
-
import { M as MeasurementOverlayManager } from './overlays-
|
|
12
|
-
import { p as point } from './bundle.esm-
|
|
13
|
-
import { a as measurementWithArrowCursor } from './cursors-
|
|
14
|
-
import { g as getMouseClientPosition } from './dom-
|
|
7
|
+
import { p as parseConfig } from './config-25384fe6.js';
|
|
8
|
+
import { a as MeasurementEntity, M as MeasurementController } from './entities-0e325765.js';
|
|
9
|
+
import './streamAttributes-23270e27.js';
|
|
10
|
+
import { M as MeasurementModel } from './model-3cd8cd47.js';
|
|
11
|
+
import { M as MeasurementOverlayManager } from './overlays-8f195eb3.js';
|
|
12
|
+
import { p as point } from './bundle.esm-92e615bf.js';
|
|
13
|
+
import { a as measurementWithArrowCursor } from './cursors-127a3bb7.js';
|
|
14
|
+
import { g as getMouseClientPosition } from './dom-e436f0c0.js';
|
|
15
15
|
import { E as ElementRectObserver } from './elementRectObserver-39cf7b95.js';
|
|
16
16
|
import { E as EntityType } from './entities-ce81dd7f.js';
|
|
17
17
|
import './_commonjsHelpers-11ca3be1.js';
|
|
18
|
-
import './browser.esm-
|
|
18
|
+
import './browser.esm-07e7db8f.js';
|
|
19
|
+
import './bundle.esm-91404853.js';
|
|
19
20
|
|
|
20
21
|
// package: vertexvis.protobuf.sceneview.v1
|
|
21
22
|
// file: sceneview/protos/scene_view_api.proto
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
/**!
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2023 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import { h, F as Fragment, r as registerInstance } from './index-26dfb2d0.js';
|
|
5
|
-
import { p as point, m as matrix4, v as vector3 } from './bundle.esm-
|
|
6
|
-
import './cursors-
|
|
7
|
-
import './mapper-
|
|
5
|
+
import { p as point, m as matrix4, v as vector3 } from './bundle.esm-92e615bf.js';
|
|
6
|
+
import './cursors-127a3bb7.js';
|
|
7
|
+
import './mapper-dd937684.js';
|
|
8
8
|
import './grpc-web-client.umd-5409853c.js';
|
|
9
|
-
import './streamAttributes-
|
|
9
|
+
import './streamAttributes-23270e27.js';
|
|
10
10
|
import './entities-ce81dd7f.js';
|
|
11
|
-
import { V as Viewport } from './viewport-
|
|
12
|
-
import { g as getPinColors, i as isIconPin, b as isTextPin, P as PinModel, a as PinController, c as translatePointToScreen } from './model-
|
|
11
|
+
import { V as Viewport } from './viewport-f19fc583.js';
|
|
12
|
+
import { g as getPinColors, i as isIconPin, b as isTextPin, P as PinModel, a as PinController, c as translatePointToScreen } from './model-bfe1c4d8.js';
|
|
13
13
|
import { c as classnames } from './index-e841d91b.js';
|
|
14
|
-
import './browser.esm-
|
|
14
|
+
import './browser.esm-07e7db8f.js';
|
|
15
15
|
import './_commonjsHelpers-11ca3be1.js';
|
|
16
|
+
import './bundle.esm-91404853.js';
|
|
16
17
|
|
|
17
18
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
18
19
|
const PinRenderer = ({ pin, selected, }) => {
|
|
@@ -76,10 +77,14 @@ const ViewerPinGroup = class {
|
|
|
76
77
|
};
|
|
77
78
|
}
|
|
78
79
|
componentDidLoad() {
|
|
80
|
+
var _a;
|
|
79
81
|
this.setLabelObserver();
|
|
80
82
|
if (this.pinController == null) {
|
|
81
83
|
this.pinController = new PinController(this.pinModel);
|
|
82
84
|
}
|
|
85
|
+
if (this.selected) {
|
|
86
|
+
(_a = this.labelEl) === null || _a === void 0 ? void 0 : _a.setFocus();
|
|
87
|
+
}
|
|
83
88
|
}
|
|
84
89
|
disconnectedCallback() {
|
|
85
90
|
var _a, _b;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**!
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2023 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-26dfb2d0.js';
|
|
5
|
-
import { p as point } from './bundle.esm-
|
|
5
|
+
import { p as point } from './bundle.esm-92e615bf.js';
|
|
6
6
|
import { c as classnames } from './index-e841d91b.js';
|
|
7
|
-
import { g as getMouseClientPosition } from './dom-
|
|
8
|
-
import { t as translatePointToRelative, c as translatePointToScreen, a as PinController, P as PinModel, g as getPinColors, b as isTextPin } from './model-
|
|
7
|
+
import { g as getMouseClientPosition } from './dom-e436f0c0.js';
|
|
8
|
+
import { t as translatePointToRelative, c as translatePointToScreen, a as PinController, P as PinModel, g as getPinColors, b as isTextPin } from './model-bfe1c4d8.js';
|
|
9
9
|
import { r as readDOM } from './stencil-bfbf099f.js';
|
|
10
10
|
import './_commonjsHelpers-11ca3be1.js';
|
|
11
|
-
import './browser.esm-
|
|
11
|
+
import './browser.esm-07e7db8f.js';
|
|
12
12
|
|
|
13
13
|
function getComputedStyle(el) {
|
|
14
14
|
return window.getComputedStyle(el);
|
|
@@ -36,12 +36,15 @@ const VertexPinLabel = class {
|
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
38
|
this.handleInputKeyDown = (event) => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
event.stopPropagation();
|
|
40
|
+
if (event.key === 'Enter' &&
|
|
41
|
+
(event.ctrlKey || event.metaKey || event.shiftKey)) {
|
|
42
|
+
this.textareaRows += 1;
|
|
43
|
+
this.value += '\n';
|
|
42
44
|
}
|
|
43
45
|
else if (event.key === 'Enter') {
|
|
44
|
-
|
|
46
|
+
event.preventDefault();
|
|
47
|
+
this.submit();
|
|
45
48
|
}
|
|
46
49
|
};
|
|
47
50
|
this.handlePointerDown = (event) => {
|
|
@@ -60,6 +63,8 @@ const VertexPinLabel = class {
|
|
|
60
63
|
if (this.elementBounds != null &&
|
|
61
64
|
this.relativePointerDownPosition &&
|
|
62
65
|
this.pinPointerDownPosition != null) {
|
|
66
|
+
// Prevent selection of any text while interacting with the label
|
|
67
|
+
event.preventDefault();
|
|
63
68
|
const point$1 = getMouseClientPosition(event, this.elementBounds);
|
|
64
69
|
const relative = translatePointToRelative(point$1, this.elementBounds);
|
|
65
70
|
const relativeDelta = point.subtract(relative, this.relativePointerDownPosition);
|
|
@@ -104,12 +109,9 @@ const VertexPinLabel = class {
|
|
|
104
109
|
var _a, _b, _c;
|
|
105
110
|
// HTMLInputElement.focus() doesn't exist in tests.
|
|
106
111
|
if (typeof ((_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus) === 'function') {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
else {
|
|
111
|
-
(_c = this.inputEl) === null || _c === void 0 ? void 0 : _c.blur();
|
|
112
|
-
}
|
|
112
|
+
this.focused = true;
|
|
113
|
+
this.labelFocused.emit((_b = this.pin) === null || _b === void 0 ? void 0 : _b.id);
|
|
114
|
+
(_c = this.inputEl) === null || _c === void 0 ? void 0 : _c.focus();
|
|
113
115
|
}
|
|
114
116
|
}
|
|
115
117
|
watchFocusChange() {
|
|
@@ -186,7 +188,7 @@ const VertexPinLabel = class {
|
|
|
186
188
|
}
|
|
187
189
|
computeMinWidth() {
|
|
188
190
|
if (this.contentElBounds != null) {
|
|
189
|
-
const expected = `${this.contentElBounds.width +
|
|
191
|
+
const expected = `${this.contentElBounds.width + 8}px`;
|
|
190
192
|
return `min(${expected}, ${this.computeMaxWidth()})`;
|
|
191
193
|
}
|
|
192
194
|
else {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**!
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2023 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-26dfb2d0.js';
|
|
5
|
-
import { t as translatePointToRelative, P as PinModel, a as PinController } from './model-
|
|
6
|
-
import { p as point } from './bundle.esm-
|
|
7
|
-
import { b as uuid } from './browser.esm-
|
|
8
|
-
import { l as labelPinCursor, p as pinCursor } from './cursors-
|
|
9
|
-
import { g as getMouseClientPosition } from './dom-
|
|
5
|
+
import { t as translatePointToRelative, P as PinModel, a as PinController } from './model-bfe1c4d8.js';
|
|
6
|
+
import { p as point } from './bundle.esm-92e615bf.js';
|
|
7
|
+
import { b as uuid } from './browser.esm-07e7db8f.js';
|
|
8
|
+
import { l as labelPinCursor, p as pinCursor } from './cursors-127a3bb7.js';
|
|
9
|
+
import { g as getMouseClientPosition } from './dom-e436f0c0.js';
|
|
10
10
|
import { E as ElementRectObserver } from './elementRectObserver-39cf7b95.js';
|
|
11
11
|
import { E as EntityType } from './entities-ce81dd7f.js';
|
|
12
12
|
import { g as getMarkupBoundingClientRect } from './dom-be140992.js';
|
|
13
13
|
|
|
14
14
|
class PinsInteractionHandler {
|
|
15
|
-
constructor(controller) {
|
|
15
|
+
constructor(controller, xOffset, yOffset) {
|
|
16
16
|
this.rectObserver = new ElementRectObserver();
|
|
17
17
|
this.droppableSurfaces = [
|
|
18
18
|
EntityType.PRECISE_SURFACE,
|
|
@@ -28,7 +28,7 @@ class PinsInteractionHandler {
|
|
|
28
28
|
if (this.controller.getDraggable() == null &&
|
|
29
29
|
this.controller.getToolMode() === 'edit' &&
|
|
30
30
|
isDroppableSurface) {
|
|
31
|
-
this.addCursor(this.
|
|
31
|
+
this.addCursor(this.getCursorType());
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
34
|
this.clearCursor();
|
|
@@ -82,6 +82,8 @@ class PinsInteractionHandler {
|
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
84
|
this.controller = controller;
|
|
85
|
+
this.xOffset = xOffset;
|
|
86
|
+
this.yOffset = yOffset;
|
|
85
87
|
}
|
|
86
88
|
get elementRect() {
|
|
87
89
|
return this.rectObserver.rect;
|
|
@@ -115,7 +117,6 @@ class PinsInteractionHandler {
|
|
|
115
117
|
var _a, _b, _c, _d, _e, _f;
|
|
116
118
|
const [hit] = await api.hitItems(pt);
|
|
117
119
|
if ((hit === null || hit === void 0 ? void 0 : hit.hitPoint) != null && this.elementRect != null) {
|
|
118
|
-
const relativePoint = translatePointToRelative(pt, this.elementRect);
|
|
119
120
|
if ((hit === null || hit === void 0 ? void 0 : hit.hitPoint) != null &&
|
|
120
121
|
(hit === null || hit === void 0 ? void 0 : hit.hitPoint.x) != null &&
|
|
121
122
|
(hit === null || hit === void 0 ? void 0 : hit.hitPoint.y) != null &&
|
|
@@ -141,6 +142,8 @@ class PinsInteractionHandler {
|
|
|
141
142
|
});
|
|
142
143
|
break;
|
|
143
144
|
case 'pin-text':
|
|
145
|
+
const isNewPin = existingPin == null;
|
|
146
|
+
const relativePoint = translatePointToRelative(pt, this.elementRect, isNewPin, this.xOffset, this.yOffset);
|
|
144
147
|
this.controller.setPin({
|
|
145
148
|
type: 'text',
|
|
146
149
|
id: pinId,
|
|
@@ -155,6 +158,7 @@ class PinsInteractionHandler {
|
|
|
155
158
|
},
|
|
156
159
|
attributes,
|
|
157
160
|
});
|
|
161
|
+
this.controller.setSelectedPinId(pinId);
|
|
158
162
|
break;
|
|
159
163
|
}
|
|
160
164
|
}
|
|
@@ -164,7 +168,7 @@ class PinsInteractionHandler {
|
|
|
164
168
|
}
|
|
165
169
|
});
|
|
166
170
|
}
|
|
167
|
-
|
|
171
|
+
getCursorType() {
|
|
168
172
|
switch (this.controller.getToolType()) {
|
|
169
173
|
case 'pin-icon':
|
|
170
174
|
return pinCursor;
|
|
@@ -197,7 +201,7 @@ class PinsInteractionHandler {
|
|
|
197
201
|
}
|
|
198
202
|
}
|
|
199
203
|
|
|
200
|
-
const viewerPinToolCss = ":host{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden;pointer-events:none}";
|
|
204
|
+
const viewerPinToolCss = ":host{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden;pointer-events:none;--viewer-pin-tool-initial-label-offset-x:20;--viewer-pin-tool-initial-label-offset-y:20}";
|
|
201
205
|
|
|
202
206
|
const ViewerPinTool = class {
|
|
203
207
|
constructor(hostRef) {
|
|
@@ -321,10 +325,17 @@ const ViewerPinTool = class {
|
|
|
321
325
|
}
|
|
322
326
|
setupInteractionHandler() {
|
|
323
327
|
var _a;
|
|
328
|
+
const hostStyles = window.getComputedStyle(this.hostEl);
|
|
329
|
+
const xOffset = hostStyles
|
|
330
|
+
.getPropertyValue('--viewer-pin-tool-initial-label-offset-x')
|
|
331
|
+
.trim();
|
|
332
|
+
const yOffset = hostStyles
|
|
333
|
+
.getPropertyValue('--viewer-pin-tool-initial-label-offset-y')
|
|
334
|
+
.trim();
|
|
324
335
|
this.clearInteractionHandler();
|
|
325
336
|
if (this.pinController != null) {
|
|
326
337
|
this.registeredInteractionHandler =
|
|
327
|
-
(_a = this.viewer) === null || _a === void 0 ? void 0 : _a.registerInteractionHandler(new PinsInteractionHandler(this.pinController));
|
|
338
|
+
(_a = this.viewer) === null || _a === void 0 ? void 0 : _a.registerInteractionHandler(new PinsInteractionHandler(this.pinController, parseInt(xOffset), parseInt(yOffset)));
|
|
328
339
|
}
|
|
329
340
|
}
|
|
330
341
|
clearModelListeners() {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**!
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2023 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-26dfb2d0.js';
|
|
5
|
-
import { m as matrix4, p as point, v as vector3, r as ray,
|
|
5
|
+
import { m as matrix4, p as point, v as vector3, r as ray, f as plane, q as quaternion, e as rectangle, c as angle, b as boundingBox } from './bundle.esm-92e615bf.js';
|
|
6
6
|
import { c as classnames } from './index-e841d91b.js';
|
|
7
7
|
import { w as writeDOM, r as readDOM } from './stencil-bfbf099f.js';
|
|
8
|
-
import { c as color, E as EventDispatcher } from './browser.esm-
|
|
8
|
+
import { c as color, E as EventDispatcher } from './browser.esm-07e7db8f.js';
|
|
9
9
|
import { c as createCommonjsModule, a as commonjsGlobal, g as getAugmentedNamespace, b as getDefaultExportFromCjs } from './_commonjsHelpers-11ca3be1.js';
|
|
10
|
-
import './streamAttributes-
|
|
10
|
+
import './streamAttributes-23270e27.js';
|
|
11
11
|
import './entities-ce81dd7f.js';
|
|
12
|
-
import { V as Viewport } from './viewport-
|
|
12
|
+
import { V as Viewport } from './viewport-f19fc583.js';
|
|
13
|
+
import './bundle.esm-91404853.js';
|
|
13
14
|
|
|
14
15
|
class TransformController {
|
|
15
16
|
constructor(stream) {
|
|
@@ -12494,7 +12495,7 @@ function computeDrawable2dBounds(viewport, ...elements) {
|
|
|
12494
12495
|
let max = point.create();
|
|
12495
12496
|
elements
|
|
12496
12497
|
.filter((m) => m.points.valid)
|
|
12497
|
-
.
|
|
12498
|
+
.forEach((m) => {
|
|
12498
12499
|
m.points
|
|
12499
12500
|
.toArray()
|
|
12500
12501
|
.map((pt) => viewport.transformNdcPointToViewport(pt))
|
|
@@ -13127,6 +13128,7 @@ const ViewerTransformWidget = class {
|
|
|
13127
13128
|
});
|
|
13128
13129
|
if (this.position != null) {
|
|
13129
13130
|
this.currentTransform = matrix4.makeTranslation(this.position);
|
|
13131
|
+
this.startingTransform = this.currentTransform;
|
|
13130
13132
|
this.widget.updateTransform(this.currentTransform);
|
|
13131
13133
|
}
|
|
13132
13134
|
if (((_b = this.viewer) === null || _b === void 0 ? void 0 : _b.frame) != null) {
|
|
@@ -13231,7 +13233,7 @@ const ViewerTransformWidget = class {
|
|
|
13231
13233
|
var _a, _b;
|
|
13232
13234
|
this.currentTransform = this.getTransform(oldPosition, newPosition);
|
|
13233
13235
|
this.startingTransform = this.currentTransform;
|
|
13234
|
-
console.debug(`Updating widget position [previous=${JSON.stringify(
|
|
13236
|
+
console.debug(`Updating widget position [previous=${JSON.stringify(oldPosition)}, current=${JSON.stringify(newPosition)}]`);
|
|
13235
13237
|
(_a = this.widget) === null || _a === void 0 ? void 0 : _a.updateTransform(this.currentTransform);
|
|
13236
13238
|
if (newPosition == null) {
|
|
13237
13239
|
(_b = this.controller) === null || _b === void 0 ? void 0 : _b.clearTransform();
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**!
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2023 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import { h, F as Fragment, r as registerInstance, H as Host } from './index-26dfb2d0.js';
|
|
5
|
-
import { v as vector3, q as quaternion, u as euler } from './bundle.esm-
|
|
5
|
+
import { v as vector3, q as quaternion, u as euler } from './bundle.esm-92e615bf.js';
|
|
6
6
|
import { r as readDOM } from './stencil-bfbf099f.js';
|
|
7
|
-
import { O as Orientation, e as FramePerspectiveCamera,
|
|
7
|
+
import { O as Orientation, e as FramePerspectiveCamera, S as StandardView } from './streamAttributes-23270e27.js';
|
|
8
8
|
import './entities-ce81dd7f.js';
|
|
9
9
|
import { c as classnames } from './index-e841d91b.js';
|
|
10
|
-
import './
|
|
10
|
+
import './bundle.esm-91404853.js';
|
|
11
|
+
import './browser.esm-07e7db8f.js';
|
|
11
12
|
import './_commonjsHelpers-11ca3be1.js';
|
|
12
13
|
|
|
13
14
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -101,11 +102,11 @@ const ViewerViewCube = class {
|
|
|
101
102
|
/**
|
|
102
103
|
* The label for the side of the cube on the positive x-axis.
|
|
103
104
|
*/
|
|
104
|
-
this.xPositiveLabel = '
|
|
105
|
+
this.xPositiveLabel = 'Right';
|
|
105
106
|
/**
|
|
106
107
|
* The label for the side of the cube on the negative x-axis.
|
|
107
108
|
*/
|
|
108
|
-
this.xNegativeLabel = '
|
|
109
|
+
this.xNegativeLabel = 'Left';
|
|
109
110
|
/**
|
|
110
111
|
* The label for the side of the cube on the positive y-axis.
|
|
111
112
|
*/
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
/**!
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2023 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-26dfb2d0.js';
|
|
5
|
-
import { p as point, v as vector3,
|
|
6
|
-
import {
|
|
7
|
-
import { E as EventDispatcher, m as mapper, c as color, o as objects, u as uri, a as async, b as uuid } from './browser.esm-
|
|
5
|
+
import { p as point, v as vector3, c as angle, f as plane, r as ray, b as boundingBox, s as matrix2, d as dimensions } from './bundle.esm-92e615bf.js';
|
|
6
|
+
import { t as toProtoDuration, p as protoToDate, S as StreamApi, a as StreamRequestError, c as currentDateAsProtoTimestamp, W as WebSocketClientImpl } from './bundle.esm-91404853.js';
|
|
7
|
+
import { E as EventDispatcher, m as mapper, c as color, o as objects, u as uri, a as async, b as uuid } from './browser.esm-07e7db8f.js';
|
|
8
8
|
import { c as classnames } from './index-e841d91b.js';
|
|
9
|
-
import { p as parseConfig } from './config-
|
|
10
|
-
import { C as CursorManager } from './cursors-
|
|
11
|
-
import { g as getMouseClientPosition, c as cssCursor } from './dom-
|
|
12
|
-
import {
|
|
9
|
+
import { p as parseConfig } from './config-25384fe6.js';
|
|
10
|
+
import { C as CursorManager } from './cursors-127a3bb7.js';
|
|
11
|
+
import { g as getMouseClientPosition, c as cssCursor } from './dom-e436f0c0.js';
|
|
12
|
+
import { c as ImageLoadError, C as CustomError, W as WebsocketConnectionError, S as SceneRenderError, V as ViewerInitializationError, d as InteractionHandlerError, e as ComponentInitializationError, f as IllegalStateError } from './errors-a4cc9caa.js';
|
|
13
|
+
import { k as fromPbStencilBufferOrThrow, l as decodePng, m as DepthBuffer, t as toProtobuf, n as toPbStreamAttributes, o as toPbRGBi, p as fromPbFrameOrThrow, q as fromPbStartStreamResponseOrThrow, r as fromPbReconnectResponseOrThrow, s as fromPbSyncTimeResponseOrThrow, u as fromPbRefreshTokenResponseOrThrow, x as toOrthographic, y as toPerspective } from './streamAttributes-23270e27.js';
|
|
13
14
|
import { E as EntityType } from './entities-ce81dd7f.js';
|
|
14
|
-
import { V as Viewport } from './viewport-
|
|
15
|
+
import { V as Viewport } from './viewport-f19fc583.js';
|
|
16
|
+
import { f as fromUrn, a as SynchronizedClock, d as defaultSelectionMaterial, b as fromHex, S as Scene } from './scene-2543b3bd.js';
|
|
15
17
|
import './_commonjsHelpers-11ca3be1.js';
|
|
16
18
|
|
|
17
19
|
/**
|
|
@@ -1021,9 +1023,11 @@ class BaseInteractionHandler {
|
|
|
1021
1023
|
switch (type) {
|
|
1022
1024
|
case 'rotate':
|
|
1023
1025
|
this.primaryInteraction = this.rotateInteraction;
|
|
1026
|
+
this.lastPrimaryRotateInteraction = this.rotateInteraction;
|
|
1024
1027
|
break;
|
|
1025
1028
|
case 'rotate-point':
|
|
1026
1029
|
this.primaryInteraction = this.rotatePointInteraction;
|
|
1030
|
+
this.lastPrimaryRotateInteraction = this.rotatePointInteraction;
|
|
1027
1031
|
break;
|
|
1028
1032
|
case 'zoom':
|
|
1029
1033
|
this.primaryInteraction = this.zoomInteraction;
|
|
@@ -1098,9 +1102,13 @@ class BaseInteractionHandler {
|
|
|
1098
1102
|
}
|
|
1099
1103
|
}
|
|
1100
1104
|
beginDrag(event) {
|
|
1105
|
+
var _a;
|
|
1101
1106
|
if (this.keyboardControls && event.metaKey && event.shiftKey) {
|
|
1102
1107
|
this.currentInteraction = this.rotatePointInteraction;
|
|
1103
1108
|
}
|
|
1109
|
+
else if (this.keyboardControls && event.shiftKey && event.altKey) {
|
|
1110
|
+
this.currentInteraction = this.twistInteraction;
|
|
1111
|
+
}
|
|
1104
1112
|
else if (this.keyboardControls && event.shiftKey) {
|
|
1105
1113
|
this.currentInteraction = this.zoomInteraction;
|
|
1106
1114
|
}
|
|
@@ -1110,13 +1118,17 @@ class BaseInteractionHandler {
|
|
|
1110
1118
|
else if (this.keyboardControls && event.altKey) {
|
|
1111
1119
|
this.currentInteraction = this.rotateInteraction;
|
|
1112
1120
|
}
|
|
1113
|
-
if (event.buttons === 1
|
|
1121
|
+
if (event.buttons === 1) {
|
|
1114
1122
|
this.draggingInteraction =
|
|
1115
1123
|
this.currentInteraction || this.primaryInteraction;
|
|
1116
1124
|
}
|
|
1117
1125
|
else if (event.buttons === 2) {
|
|
1118
1126
|
this.draggingInteraction = this.panInteraction;
|
|
1119
1127
|
}
|
|
1128
|
+
else if (event.buttons === 4) {
|
|
1129
|
+
this.draggingInteraction =
|
|
1130
|
+
(_a = this.lastPrimaryRotateInteraction) !== null && _a !== void 0 ? _a : this.rotateInteraction;
|
|
1131
|
+
}
|
|
1120
1132
|
if (this.draggingInteraction != null &&
|
|
1121
1133
|
this.interactionApi != null &&
|
|
1122
1134
|
this.element != null) {
|
|
@@ -1385,12 +1397,13 @@ class TwistInteraction extends MouseInteraction {
|
|
|
1385
1397
|
super(...arguments);
|
|
1386
1398
|
this.type = 'twist';
|
|
1387
1399
|
}
|
|
1388
|
-
beginDrag(event, canvasPosition, api) {
|
|
1389
|
-
this.currentPosition = point.create(event.
|
|
1400
|
+
beginDrag(event, canvasPosition, api, element) {
|
|
1401
|
+
this.currentPosition = point.create(event.offsetX, event.offsetY);
|
|
1402
|
+
this.canvasRect = element.getBoundingClientRect();
|
|
1390
1403
|
api.beginInteraction();
|
|
1391
1404
|
}
|
|
1392
1405
|
drag(event, api) {
|
|
1393
|
-
const position =
|
|
1406
|
+
const position = getMouseClientPosition(event, this.canvasRect);
|
|
1394
1407
|
this.currentPosition = position;
|
|
1395
1408
|
api.twistCamera(position);
|
|
1396
1409
|
}
|
|
@@ -2156,21 +2169,27 @@ class ViewerStream extends StreamApi {
|
|
|
2156
2169
|
}
|
|
2157
2170
|
}
|
|
2158
2171
|
async loadIfConnectingOrConnected(urn, state) {
|
|
2159
|
-
|
|
2172
|
+
var _a;
|
|
2173
|
+
const { resource: pResource, subResource: pSubResource } = state.resource;
|
|
2160
2174
|
const resource = fromUrn(urn);
|
|
2161
2175
|
const hasResourceChanged = !objects.isEqual(pResource, resource.resource);
|
|
2162
|
-
const
|
|
2163
|
-
const hasQuery = resource.queries[0] != null;
|
|
2176
|
+
const hasSubResourceChanged = !objects.isEqual(pSubResource, resource.subResource);
|
|
2164
2177
|
const isConnecting = state.type === 'connecting' || state.type === 'reconnecting';
|
|
2165
2178
|
const isConnected = state.type === 'connected';
|
|
2166
|
-
|
|
2179
|
+
const suppliedIdQuery = resource.queries.find((q) => q.type === 'supplied-id');
|
|
2180
|
+
if (hasResourceChanged || (isConnecting && hasSubResourceChanged)) {
|
|
2167
2181
|
this.disconnect();
|
|
2168
2182
|
return this.loadIfDisconnected(urn);
|
|
2169
2183
|
}
|
|
2170
|
-
else if (isConnected &&
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
}
|
|
2184
|
+
else if (isConnected &&
|
|
2185
|
+
hasSubResourceChanged &&
|
|
2186
|
+
((_a = resource.subResource) === null || _a === void 0 ? void 0 : _a.type) === 'scene-view-state') {
|
|
2187
|
+
const payload = Object.assign(Object.assign({}, (resource.subResource.id != null
|
|
2188
|
+
? { sceneViewStateId: { hex: resource.subResource.id } }
|
|
2189
|
+
: {})), (suppliedIdQuery != null
|
|
2190
|
+
? { sceneViewStateSuppliedId: { value: suppliedIdQuery.id } }
|
|
2191
|
+
: {}));
|
|
2192
|
+
await this.loadSceneViewState(payload);
|
|
2174
2193
|
this.updateState(Object.assign(Object.assign({}, state), { resource }));
|
|
2175
2194
|
}
|
|
2176
2195
|
}
|
|
@@ -2281,14 +2300,20 @@ class ViewerStream extends StreamApi {
|
|
|
2281
2300
|
});
|
|
2282
2301
|
}
|
|
2283
2302
|
async requestNewStream(resource) {
|
|
2284
|
-
var _a;
|
|
2303
|
+
var _a, _b;
|
|
2304
|
+
const suppliedIdQuery = resource.queries.find((q) => q.type === 'supplied-id');
|
|
2285
2305
|
const res = fromPbStartStreamResponseOrThrow(await this.startStream({
|
|
2286
2306
|
streamKey: { value: resource.resource.id },
|
|
2287
2307
|
dimensions: this.dimensions,
|
|
2288
2308
|
frameBackgroundColor: toPbColorOrThrow(this.frameBgColor),
|
|
2289
2309
|
streamAttributes: toPbStreamAttributesOrThrow(this.streamAttributes),
|
|
2290
|
-
sceneViewStateId: ((_a = resource.
|
|
2291
|
-
|
|
2310
|
+
sceneViewStateId: ((_a = resource.subResource) === null || _a === void 0 ? void 0 : _a.type) === 'scene-view-state' &&
|
|
2311
|
+
resource.subResource.id != null
|
|
2312
|
+
? { hex: resource.subResource.id }
|
|
2313
|
+
: undefined,
|
|
2314
|
+
sceneViewStateSuppliedId: ((_b = resource.subResource) === null || _b === void 0 ? void 0 : _b.type) === 'scene-view-state' &&
|
|
2315
|
+
suppliedIdQuery != null
|
|
2316
|
+
? { value: suppliedIdQuery.id }
|
|
2292
2317
|
: undefined,
|
|
2293
2318
|
}));
|
|
2294
2319
|
return {
|
|
@@ -2599,13 +2624,9 @@ const Viewer = class {
|
|
|
2599
2624
|
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(this.containerElement);
|
|
2600
2625
|
}
|
|
2601
2626
|
if (this.src != null) {
|
|
2602
|
-
|
|
2603
|
-
this.load(this.src);
|
|
2604
|
-
}
|
|
2605
|
-
catch (e) {
|
|
2606
|
-
// Consumer cannot handle this error. Just log it.
|
|
2627
|
+
this.load(this.src).catch((e) => {
|
|
2607
2628
|
console.error('Error loading scene', e);
|
|
2608
|
-
}
|
|
2629
|
+
});
|
|
2609
2630
|
}
|
|
2610
2631
|
this.initializeDefaultInteractionHandlers();
|
|
2611
2632
|
this.injectViewerApi();
|
|
@@ -2925,7 +2946,7 @@ const Viewer = class {
|
|
|
2925
2946
|
this.connectionChange.emit(status);
|
|
2926
2947
|
}
|
|
2927
2948
|
handleElementResize(entries) {
|
|
2928
|
-
const dimensionsHaveChanged = entries.length
|
|
2949
|
+
const dimensionsHaveChanged = entries.length > 0 &&
|
|
2929
2950
|
this.dimensions != null &&
|
|
2930
2951
|
!dimensions.isEqual(entries[0].contentRect, this.viewport);
|
|
2931
2952
|
if (dimensionsHaveChanged) {
|
|
@@ -3104,6 +3125,7 @@ const Viewer = class {
|
|
|
3104
3125
|
async initializeDefaultInteractionHandlers() {
|
|
3105
3126
|
var _a;
|
|
3106
3127
|
await this.initializeDefaultCameraInteractionHandlers();
|
|
3128
|
+
await this.initializeDefaultTapInteractionHandler();
|
|
3107
3129
|
this.initializeDefaultKeyboardInteractionHandlers();
|
|
3108
3130
|
if (this.rotateAroundTapPoint) {
|
|
3109
3131
|
(_a = this.baseInteractionHandler) === null || _a === void 0 ? void 0 : _a.setPrimaryInteractionType('rotate-point');
|
|
@@ -3126,32 +3148,25 @@ const Viewer = class {
|
|
|
3126
3148
|
var _a, _b;
|
|
3127
3149
|
this.clearDefaultCameraInteractionHandlers();
|
|
3128
3150
|
if (this.cameraControls) {
|
|
3129
|
-
// default to pointer events if allowed by browser.
|
|
3130
3151
|
if (window.PointerEvent != null) {
|
|
3131
|
-
const tapInteractionHandler = new TapInteractionHandler('pointerdown', 'pointerup', 'pointermove', () => this.getResolvedConfig());
|
|
3132
3152
|
this.baseInteractionHandler =
|
|
3133
3153
|
(_a = this.baseInteractionHandler) !== null && _a !== void 0 ? _a : new PointerInteractionHandler(() => this.getResolvedConfig());
|
|
3134
3154
|
const baseDisposable = await this.registerInteractionHandler(this.baseInteractionHandler);
|
|
3135
3155
|
const multiPointerDisposable = await this.registerInteractionHandler(new MultiPointerInteractionHandler());
|
|
3136
|
-
const tapDisposable = await this.registerInteractionHandler(tapInteractionHandler);
|
|
3137
3156
|
this.defaultInteractionHandlerDisposables = [
|
|
3138
3157
|
baseDisposable,
|
|
3139
3158
|
multiPointerDisposable,
|
|
3140
|
-
tapDisposable,
|
|
3141
3159
|
];
|
|
3142
3160
|
}
|
|
3143
3161
|
else {
|
|
3144
|
-
const tapInteractionHandler = new TapInteractionHandler('mousedown', 'mouseup', 'mousemove', () => this.getResolvedConfig());
|
|
3145
3162
|
// fallback to touch events and mouse events as a default
|
|
3146
3163
|
this.baseInteractionHandler =
|
|
3147
3164
|
(_b = this.baseInteractionHandler) !== null && _b !== void 0 ? _b : new MouseInteractionHandler(() => this.getResolvedConfig());
|
|
3148
3165
|
const baseDisposable = await this.registerInteractionHandler(this.baseInteractionHandler);
|
|
3149
3166
|
const touchDisposable = await this.registerInteractionHandler(new TouchInteractionHandler());
|
|
3150
|
-
const tapDisposable = await this.registerInteractionHandler(tapInteractionHandler);
|
|
3151
3167
|
this.defaultInteractionHandlerDisposables = [
|
|
3152
3168
|
baseDisposable,
|
|
3153
3169
|
touchDisposable,
|
|
3154
|
-
tapDisposable,
|
|
3155
3170
|
];
|
|
3156
3171
|
}
|
|
3157
3172
|
}
|
|
@@ -3168,6 +3183,18 @@ const Viewer = class {
|
|
|
3168
3183
|
this.defaultTapKeyInteractions = [flyToPart, flyToPosition];
|
|
3169
3184
|
}
|
|
3170
3185
|
}
|
|
3186
|
+
async initializeDefaultTapInteractionHandler() {
|
|
3187
|
+
if (this.tapHandlerDisposable == null) {
|
|
3188
|
+
if (window.PointerEvent != null) {
|
|
3189
|
+
const tapInteractionHandler = new TapInteractionHandler('pointerdown', 'pointerup', 'pointermove', () => this.getResolvedConfig());
|
|
3190
|
+
this.tapHandlerDisposable = await this.registerInteractionHandler(tapInteractionHandler);
|
|
3191
|
+
}
|
|
3192
|
+
else {
|
|
3193
|
+
const tapInteractionHandler = new TapInteractionHandler('mousedown', 'mouseup', 'mousemove', () => this.getResolvedConfig());
|
|
3194
|
+
this.tapHandlerDisposable = await this.registerInteractionHandler(tapInteractionHandler);
|
|
3195
|
+
}
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3171
3198
|
initializeInteractionHandler(handler) {
|
|
3172
3199
|
if (this.stateMap.interactionTarget == null) {
|
|
3173
3200
|
throw new InteractionHandlerError('Cannot initialize interaction handler. Interaction target is undefined.');
|