@vertexvis/viewer 1.0.2-canary.7 → 1.0.2-testing.0
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/{config-BsqvZSt9.js → config-20ozv4y8.js} +3 -3
- package/dist/cjs/{config-BsqvZSt9.js.map → config-20ozv4y8.js.map} +1 -1
- package/dist/cjs/{entities-ByDO45G0.js → entities-D6kgGria.js} +4 -4
- package/dist/cjs/{entities-ByDO45G0.js.map → entities-D6kgGria.js.map} +1 -1
- package/dist/cjs/{geometry_pb-CuOYGIHT.js → geometry_pb-BTko2Wi0.js} +3 -3
- package/dist/cjs/{geometry_pb-CuOYGIHT.js.map → geometry_pb-BTko2Wi0.js.map} +1 -1
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/{png-decoder-3NSToOjc.js → png-decoder-CJbE7UJh.js} +112 -112
- package/dist/cjs/png-decoder-CJbE7UJh.js.map +1 -0
- package/dist/cjs/{queries-CwDJxlsL.js → queries-Da9I-xMf.js} +4 -4
- package/dist/cjs/{queries-CwDJxlsL.js.map → queries-Da9I-xMf.js.map} +1 -1
- package/dist/cjs/{regl-component-DTvmpYVa.js → regl-component-HhKCyGQ3.js} +3 -3
- package/dist/cjs/{regl-component-DTvmpYVa.js.map → regl-component-HhKCyGQ3.js.map} +1 -1
- package/dist/cjs/{representation_pb-BU8a5Ico.js → representation_pb-CrCGjlyP.js} +3 -3
- package/dist/cjs/{representation_pb-BU8a5Ico.js.map → representation_pb-CrCGjlyP.js.map} +1 -1
- package/dist/cjs/{streamAttributes-BVp1vEp3.js → streamAttributes-D_J-W8-2.js} +3 -3
- package/dist/cjs/{streamAttributes-BVp1vEp3.js.map → streamAttributes-D_J-W8-2.js.map} +1 -1
- package/dist/cjs/vertex-scene-tree-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/vertex-scene-tree.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-dom-element_2.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-hit-result-indicator.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-measurement-details.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-measurement-distance.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-measurement-line_2.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-measurement-precise.cjs.entry.js +4 -4
- package/dist/cjs/vertex-viewer-pin-group.cjs.entry.js +3 -3
- package/dist/cjs/vertex-viewer-transform-widget.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-view-cube.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer.cjs.entry.js +4 -4
- package/dist/components/index.js +1 -1
- package/dist/components/{p-BfAW7IWG.js → p-B9R0QWr4.js} +2 -2
- package/dist/components/{p-CmtoXwYo.js → p-BCOD9yfw.js} +2 -2
- package/dist/components/{p-ux26QLbe.js → p-BOJJZ1cN.js} +2 -2
- package/dist/components/{p-C7GhKZ4q.js → p-CAugdB_8.js} +2 -2
- package/dist/components/{p-C9y2eVBq.js → p-CZCXdo3t.js} +2 -2
- package/dist/components/p-CycTYKAk.js +5 -0
- package/dist/components/{p-BnIeyVZl.js.map → p-CycTYKAk.js.map} +1 -1
- package/dist/components/{p-DTDKqbV2.js → p-D12q-fpW.js} +2 -2
- package/dist/components/{p-kVbpvDF1.js → p-DF4kEsJU.js} +2 -2
- package/dist/components/{p-D9oqIZ3P.js → p-DRnMrHWY.js} +2 -2
- package/dist/components/{p-B6mpmA2-.js → p-abSJ29r7.js} +2 -2
- package/dist/components/{p-CCPuHP2m.js → p-ahjMltGJ.js} +2 -2
- package/dist/components/vertex-scene-tree-table-cell.js +1 -1
- package/dist/components/vertex-scene-tree.js +1 -1
- package/dist/components/vertex-viewer-dom-renderer.js +1 -1
- package/dist/components/vertex-viewer-hit-result-indicator.js +1 -1
- package/dist/components/vertex-viewer-measurement-details.js +1 -1
- package/dist/components/vertex-viewer-measurement-distance.js +1 -1
- package/dist/components/vertex-viewer-measurement-overlays.js +1 -1
- package/dist/components/vertex-viewer-measurement-precise.js +1 -1
- package/dist/components/vertex-viewer-pin-group.js +1 -1
- package/dist/components/vertex-viewer-pin-tool.js +1 -1
- package/dist/components/vertex-viewer-transform-widget.js +1 -1
- package/dist/components/vertex-viewer-view-cube.js +1 -1
- package/dist/components/vertex-viewer.js +1 -1
- package/dist/esm/{config-SMudJna8.js → config-lglER3mU.js} +3 -3
- package/dist/esm/{config-SMudJna8.js.map → config-lglER3mU.js.map} +1 -1
- package/dist/esm/{entities-uAlr5vlE.js → entities-zRken6VS.js} +4 -4
- package/dist/esm/{entities-uAlr5vlE.js.map → entities-zRken6VS.js.map} +1 -1
- package/dist/esm/{geometry_pb-CMlgBITt.js → geometry_pb-BiZRfctN.js} +3 -3
- package/dist/esm/{geometry_pb-CMlgBITt.js.map → geometry_pb-BiZRfctN.js.map} +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.mjs +5 -5
- package/dist/esm/{png-decoder-Bjioht9N.js → png-decoder-CiunTuhu.js} +112 -112
- package/dist/esm/png-decoder-CiunTuhu.js.map +1 -0
- package/dist/esm/{queries-CgeSF7hf.js → queries-DEzCmbTD.js} +4 -4
- package/dist/esm/{queries-CgeSF7hf.js.map → queries-DEzCmbTD.js.map} +1 -1
- package/dist/esm/{regl-component-WqWCp9d-.js → regl-component-DmkowWhg.js} +3 -3
- package/dist/esm/{regl-component-WqWCp9d-.js.map → regl-component-DmkowWhg.js.map} +1 -1
- package/dist/esm/{representation_pb-BXvH1L33.js → representation_pb-g4f0WC4k.js} +3 -3
- package/dist/esm/{representation_pb-BXvH1L33.js.map → representation_pb-g4f0WC4k.js.map} +1 -1
- package/dist/esm/{streamAttributes-6asiWDkT.js → streamAttributes-Cp8PEH9A.js} +3 -3
- package/dist/esm/{streamAttributes-6asiWDkT.js.map → streamAttributes-Cp8PEH9A.js.map} +1 -1
- package/dist/esm/vertex-scene-tree-table-cell.entry.js +1 -1
- package/dist/esm/vertex-scene-tree.entry.js +2 -2
- package/dist/esm/vertex-viewer-dom-element_2.entry.js +1 -1
- package/dist/esm/vertex-viewer-hit-result-indicator.entry.js +2 -2
- package/dist/esm/vertex-viewer-measurement-details.entry.js +2 -2
- package/dist/esm/vertex-viewer-measurement-distance.entry.js +2 -2
- package/dist/esm/vertex-viewer-measurement-line_2.entry.js +2 -2
- package/dist/esm/vertex-viewer-measurement-precise.entry.js +4 -4
- package/dist/esm/vertex-viewer-pin-group.entry.js +3 -3
- package/dist/esm/vertex-viewer-transform-widget.entry.js +2 -2
- package/dist/esm/vertex-viewer-view-cube.entry.js +1 -1
- package/dist/esm/vertex-viewer.entry.js +4 -4
- package/dist/viewer/index.esm.js +1 -1
- package/dist/viewer/p-051b5154.entry.js +5 -0
- package/dist/viewer/{p-a5ed36cd.entry.js.map → p-051b5154.entry.js.map} +1 -1
- package/dist/viewer/{p-4dbad46f.entry.js → p-11cf755a.entry.js} +2 -2
- package/dist/viewer/{p-833d698b.entry.js → p-16775f7d.entry.js} +2 -2
- package/dist/viewer/{p-a866cbdb.entry.js → p-1eb636f8.entry.js} +2 -2
- package/dist/viewer/{p-bb18c218.entry.js → p-33f44cc1.entry.js} +2 -2
- package/dist/viewer/{p-9556c963.entry.js → p-35601c85.entry.js} +2 -2
- package/dist/viewer/{p-40dba623.entry.js → p-8c369777.entry.js} +2 -2
- package/dist/viewer/{p-Dx_kRMQd.js → p-BDvACHun.js} +2 -2
- package/dist/viewer/{p-Dx_kRMQd.js.map → p-BDvACHun.js.map} +1 -1
- package/dist/viewer/p-CZXGNc0T.js +5 -0
- package/dist/viewer/p-CZXGNc0T.js.map +1 -0
- package/dist/viewer/{p-B7IxKAst.js → p-ChqXy0cG.js} +2 -2
- package/dist/viewer/{p-B7IxKAst.js.map → p-ChqXy0cG.js.map} +1 -1
- package/dist/viewer/{p-BYm9621A.js → p-CyGlYje2.js} +2 -2
- package/dist/viewer/{p-BYm9621A.js.map → p-CyGlYje2.js.map} +1 -1
- package/dist/viewer/{p-DNam7E02.js → p-D6eJC1q4.js} +2 -2
- package/dist/viewer/{p-DNam7E02.js.map → p-D6eJC1q4.js.map} +1 -1
- package/dist/viewer/{p-BJm7oO2_.js → p-Dp56p_jX.js} +2 -2
- package/dist/viewer/{p-BJm7oO2_.js.map → p-Dp56p_jX.js.map} +1 -1
- package/dist/viewer/{p-Chfn1uMz.js → p-F8e15or2.js} +2 -2
- package/dist/viewer/{p-Chfn1uMz.js.map → p-F8e15or2.js.map} +1 -1
- package/dist/viewer/{p-CvVOQvMo.js → p-WPRMWirY.js} +2 -2
- package/dist/viewer/{p-CvVOQvMo.js.map → p-WPRMWirY.js.map} +1 -1
- package/dist/viewer/{p-04ebf937.entry.js → p-a8a81cba.entry.js} +2 -2
- package/dist/viewer/{p-4d5c68b4.entry.js → p-c7e62d66.entry.js} +2 -2
- package/dist/viewer/{p-578409b2.entry.js → p-e9b83dae.entry.js} +2 -2
- package/dist/viewer/{p-69aeb12a.entry.js → p-f271dc4a.entry.js} +2 -2
- package/dist/viewer/{p-9161d8c7.entry.js → p-f65c0769.entry.js} +2 -2
- package/dist/viewer/viewer.esm.js +1 -1
- package/package.json +10 -10
- package/dist/cjs/png-decoder-3NSToOjc.js.map +0 -1
- package/dist/components/p-BnIeyVZl.js +0 -5
- package/dist/esm/png-decoder-Bjioht9N.js.map +0 -1
- package/dist/types/web-workers.d.ts +0 -1
- package/dist/viewer/p-CmW2ZNHt.js +0 -5
- package/dist/viewer/p-CmW2ZNHt.js.map +0 -1
- package/dist/viewer/p-a5ed36cd.entry.js +0 -5
- /package/dist/components/{p-BfAW7IWG.js.map → p-B9R0QWr4.js.map} +0 -0
- /package/dist/components/{p-CmtoXwYo.js.map → p-BCOD9yfw.js.map} +0 -0
- /package/dist/components/{p-ux26QLbe.js.map → p-BOJJZ1cN.js.map} +0 -0
- /package/dist/components/{p-C7GhKZ4q.js.map → p-CAugdB_8.js.map} +0 -0
- /package/dist/components/{p-C9y2eVBq.js.map → p-CZCXdo3t.js.map} +0 -0
- /package/dist/components/{p-DTDKqbV2.js.map → p-D12q-fpW.js.map} +0 -0
- /package/dist/components/{p-kVbpvDF1.js.map → p-DF4kEsJU.js.map} +0 -0
- /package/dist/components/{p-D9oqIZ3P.js.map → p-DRnMrHWY.js.map} +0 -0
- /package/dist/components/{p-B6mpmA2-.js.map → p-abSJ29r7.js.map} +0 -0
- /package/dist/components/{p-CCPuHP2m.js.map → p-ahjMltGJ.js.map} +0 -0
- /package/dist/viewer/{p-4dbad46f.entry.js.map → p-11cf755a.entry.js.map} +0 -0
- /package/dist/viewer/{p-833d698b.entry.js.map → p-16775f7d.entry.js.map} +0 -0
- /package/dist/viewer/{p-a866cbdb.entry.js.map → p-1eb636f8.entry.js.map} +0 -0
- /package/dist/viewer/{p-bb18c218.entry.js.map → p-33f44cc1.entry.js.map} +0 -0
- /package/dist/viewer/{p-9556c963.entry.js.map → p-35601c85.entry.js.map} +0 -0
- /package/dist/viewer/{p-40dba623.entry.js.map → p-8c369777.entry.js.map} +0 -0
- /package/dist/viewer/{p-04ebf937.entry.js.map → p-a8a81cba.entry.js.map} +0 -0
- /package/dist/viewer/{p-4d5c68b4.entry.js.map → p-c7e62d66.entry.js.map} +0 -0
- /package/dist/viewer/{p-578409b2.entry.js.map → p-e9b83dae.entry.js.map} +0 -0
- /package/dist/viewer/{p-69aeb12a.entry.js.map → p-f271dc4a.entry.js.map} +0 -0
- /package/dist/viewer/{p-9161d8c7.entry.js.map → p-f65c0769.entry.js.map} +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-CCVkga9Q.js';
|
|
5
5
|
import { d as defaultEventConfig } from './events-CPk-nchx.js';
|
|
6
|
-
import './streamAttributes-
|
|
6
|
+
import './streamAttributes-Cp8PEH9A.js';
|
|
7
7
|
import './entities-BAhfr1Nx.js';
|
|
8
8
|
import { b as blurElement } from './utils-DC86ZXai.js';
|
|
9
9
|
import './bundle-CkIzrpO0.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { h, F as Fragment, r as registerInstance, c as createEvent, f as forceUpdate, H as Host, a as getElement } from './index-CCVkga9Q.js';
|
|
5
5
|
import { s as scene_tree_api_pb_serviceExports, w as webSocketSubscriptionTransportFactory, S as SceneTreeController, a as SceneTreeErrorCode, b as SceneTreeErrorDetails } from './controller-BMWGs-I6.js';
|
|
6
|
-
import { p as parseAndValidateConfig } from './config-
|
|
6
|
+
import { p as parseAndValidateConfig } from './config-lglER3mU.js';
|
|
7
7
|
import { i as isSceneTreeTableCellElement } from './utils-DC86ZXai.js';
|
|
8
8
|
import { g as getSceneTreeContainsElement } from './dom-DX6pEG54.js';
|
|
9
9
|
import { i as isLoadedRow } from './row-CiSHWNC4.js';
|
|
@@ -14,7 +14,7 @@ import './errors-Cs13_LRq.js';
|
|
|
14
14
|
import './bundle-DT9c7nCv.js';
|
|
15
15
|
import './bundle-CkIzrpO0.js';
|
|
16
16
|
import './events-CPk-nchx.js';
|
|
17
|
-
import './streamAttributes-
|
|
17
|
+
import './streamAttributes-Cp8PEH9A.js';
|
|
18
18
|
import './bundle-BOQPDi0i.js';
|
|
19
19
|
import './entities-BAhfr1Nx.js';
|
|
20
20
|
|
|
@@ -5,7 +5,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement
|
|
|
5
5
|
import { v as vector3, q as quaternion, m as matrix4, h as euler } from './bundle-CkIzrpO0.js';
|
|
6
6
|
import { o as objects } from './bundle-DT9c7nCv.js';
|
|
7
7
|
import { M as MultiElementInteractionHandler } from './multiElementInteractionHandler-DwjL-r55.js';
|
|
8
|
-
import './streamAttributes-
|
|
8
|
+
import './streamAttributes-Cp8PEH9A.js';
|
|
9
9
|
import './entities-BAhfr1Nx.js';
|
|
10
10
|
import { V as Viewport } from './viewport-C8WQZxvx.js';
|
|
11
11
|
import './_commonjsHelpers-CG9AChtV.js';
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-CCVkga9Q.js';
|
|
5
5
|
import { v as vector3, m as matrix4, q as quaternion, r as ray, a as angle } from './bundle-CkIzrpO0.js';
|
|
6
6
|
import { w as writeDOM, r as readDOM } from './stencil-BV-7pO4q.js';
|
|
7
|
-
import { M as MeshPoints, R as ReglComponent, r as regl, s as shapeBuilder, T as TriangleMesh, c as computeArrowNdcValues, a as Mesh, A as AxisLine, b as axisPositions } from './regl-component-
|
|
7
|
+
import { M as MeshPoints, R as ReglComponent, r as regl, s as shapeBuilder, T as TriangleMesh, c as computeArrowNdcValues, a as Mesh, A as AxisLine, b as axisPositions } from './regl-component-DmkowWhg.js';
|
|
8
8
|
import './_commonjsHelpers-CG9AChtV.js';
|
|
9
9
|
import './bundle-DT9c7nCv.js';
|
|
10
10
|
import './util-BCZZYmp4.js';
|
|
11
|
-
import './streamAttributes-
|
|
11
|
+
import './streamAttributes-Cp8PEH9A.js';
|
|
12
12
|
import './bundle-BOQPDi0i.js';
|
|
13
13
|
import './entities-BAhfr1Nx.js';
|
|
14
14
|
import './viewport-C8WQZxvx.js';
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import { h, F as Fragment, r as registerInstance, H as Host } from './index-CCVkga9Q.js';
|
|
5
|
-
import './geometry_pb-
|
|
5
|
+
import './geometry_pb-BiZRfctN.js';
|
|
6
6
|
import './wrappers_pb-aFAwKqIf.js';
|
|
7
7
|
import './wrappers_pb-Xw_x1jYm.js';
|
|
8
8
|
import './bundle-BOQPDi0i.js';
|
|
9
|
-
import { D as DistanceUnits, A as AngleUnits, g as AreaUnits } from './streamAttributes-
|
|
9
|
+
import { D as DistanceUnits, A as AngleUnits, g as AreaUnits } from './streamAttributes-Cp8PEH9A.js';
|
|
10
10
|
import { M as MeasurementModel } from './model-D0EJdHmW.js';
|
|
11
11
|
import './entities-BAhfr1Nx.js';
|
|
12
12
|
import { _ as __assign, v as vector3 } from './bundle-CkIzrpO0.js';
|
|
@@ -5,11 +5,11 @@ import { h, r as registerInstance, c as createEvent, H as Host, a as getElement
|
|
|
5
5
|
import { v as vector3, a as angle, p as point, l as line3 } from './bundle-CkIzrpO0.js';
|
|
6
6
|
import { m as measurementCursor } from './cursors-BbBDEutb.js';
|
|
7
7
|
import { a as cssTransformCenterAt, g as getMouseClientPosition } from './dom-B3m2VjbN.js';
|
|
8
|
-
import './geometry_pb-
|
|
8
|
+
import './geometry_pb-BiZRfctN.js';
|
|
9
9
|
import './wrappers_pb-aFAwKqIf.js';
|
|
10
10
|
import './wrappers_pb-Xw_x1jYm.js';
|
|
11
11
|
import './bundle-BOQPDi0i.js';
|
|
12
|
-
import { n as fromPbVector3f, D as DistanceUnits } from './streamAttributes-
|
|
12
|
+
import { n as fromPbVector3f, D as DistanceUnits } from './streamAttributes-Cp8PEH9A.js';
|
|
13
13
|
import { M as MeasurementModel } from './model-D0EJdHmW.js';
|
|
14
14
|
import { M as MeasurementOverlayManager } from './overlays-BE1oqniA.js';
|
|
15
15
|
import { m as makeMinimumDistanceResult } from './results-CFB6nKu8.js';
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, h, F as Fragment, H as Host } from './index-CCVkga9Q.js';
|
|
5
5
|
import { p as point, a as angle } from './bundle-CkIzrpO0.js';
|
|
6
|
-
import './geometry_pb-
|
|
6
|
+
import './geometry_pb-BiZRfctN.js';
|
|
7
7
|
import './wrappers_pb-aFAwKqIf.js';
|
|
8
8
|
import './wrappers_pb-Xw_x1jYm.js';
|
|
9
9
|
import './bundle-BOQPDi0i.js';
|
|
10
|
-
import './streamAttributes-
|
|
10
|
+
import './streamAttributes-Cp8PEH9A.js';
|
|
11
11
|
import { M as MeasurementOverlayManager } from './overlays-BE1oqniA.js';
|
|
12
12
|
import { t as translateWorldLineToViewport } from './utils-D_pIldrS.js';
|
|
13
13
|
import './bundle-DT9c7nCv.js';
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, h, H as Host } from './index-CCVkga9Q.js';
|
|
5
5
|
import { s as scene_view_api_pb_serviceExports } from './scene_view_api_pb_service-DiyuPrHM.js';
|
|
6
|
-
import { p as parseAndValidateConfig } from './config-
|
|
7
|
-
import { a as MeasurementEntity, M as MeasurementController } from './entities-
|
|
6
|
+
import { p as parseAndValidateConfig } from './config-lglER3mU.js';
|
|
7
|
+
import { a as MeasurementEntity, M as MeasurementController } from './entities-zRken6VS.js';
|
|
8
8
|
import './bundle-BOQPDi0i.js';
|
|
9
|
-
import './geometry_pb-
|
|
9
|
+
import './geometry_pb-BiZRfctN.js';
|
|
10
10
|
import './wrappers_pb-aFAwKqIf.js';
|
|
11
|
-
import './streamAttributes-
|
|
11
|
+
import './streamAttributes-Cp8PEH9A.js';
|
|
12
12
|
import { M as MeasurementModel } from './model-D0EJdHmW.js';
|
|
13
13
|
import { M as MeasurementOverlayManager } from './overlays-BE1oqniA.js';
|
|
14
14
|
import { p as point } from './bundle-CkIzrpO0.js';
|
|
@@ -5,12 +5,12 @@ import { h, F as Fragment, r as registerInstance } from './index-CCVkga9Q.js';
|
|
|
5
5
|
import { p as point, m as matrix4, v as vector3 } from './bundle-CkIzrpO0.js';
|
|
6
6
|
import './controller-BMWGs-I6.js';
|
|
7
7
|
import './cursors-BbBDEutb.js';
|
|
8
|
-
import './geometry_pb-
|
|
8
|
+
import './geometry_pb-BiZRfctN.js';
|
|
9
9
|
import './wrappers_pb-aFAwKqIf.js';
|
|
10
10
|
import './wrappers_pb-Xw_x1jYm.js';
|
|
11
11
|
import './bundle-BOQPDi0i.js';
|
|
12
|
-
import './streamAttributes-
|
|
13
|
-
import './representation_pb-
|
|
12
|
+
import './streamAttributes-Cp8PEH9A.js';
|
|
13
|
+
import './representation_pb-g4f0WC4k.js';
|
|
14
14
|
import './entities-BAhfr1Nx.js';
|
|
15
15
|
import { V as Viewport } from './viewport-C8WQZxvx.js';
|
|
16
16
|
import { g as getPinColors, i as isIconPin, b as isTextPin, P as PinModel, a as PinController, c as translatePointToScreen } from './model-CLtwOS0o.js';
|
|
@@ -6,10 +6,10 @@ import { p as point, v as vector3, r as ray, b as plane, a as angle, m as matrix
|
|
|
6
6
|
import { c as classname } from './index-DI7z7TKn.js';
|
|
7
7
|
import { w as writeDOM, r as readDOM } from './stencil-BV-7pO4q.js';
|
|
8
8
|
import { T as TransformController } from './controller-Iymb_J2R.js';
|
|
9
|
-
import { A as AngleUnits, D as DistanceUnits } from './streamAttributes-
|
|
9
|
+
import { A as AngleUnits, D as DistanceUnits } from './streamAttributes-Cp8PEH9A.js';
|
|
10
10
|
import './entities-BAhfr1Nx.js';
|
|
11
11
|
import { E as EventDispatcher } from './bundle-DT9c7nCv.js';
|
|
12
|
-
import { d as TriangleMeshPoints, T as TriangleMesh, R as ReglComponent, e as computeDrawable2dBounds, r as regl, s as shapeBuilder, x as xAxisArrowPositions, A as AxisLine, b as axisPositions, y as yAxisArrowPositions, z as zAxisArrowPositions, f as xyAxisTranslationPositions, g as xzAxisTranslationPositions, h as yzAxisTranslationPositions, i as rotationAxisPositions, j as RotationLine } from './regl-component-
|
|
12
|
+
import { d as TriangleMeshPoints, T as TriangleMesh, R as ReglComponent, e as computeDrawable2dBounds, r as regl, s as shapeBuilder, x as xAxisArrowPositions, A as AxisLine, b as axisPositions, y as yAxisArrowPositions, z as zAxisArrowPositions, f as xyAxisTranslationPositions, g as xzAxisTranslationPositions, h as yzAxisTranslationPositions, i as rotationAxisPositions, j as RotationLine } from './regl-component-DmkowWhg.js';
|
|
13
13
|
import './_commonjsHelpers-CG9AChtV.js';
|
|
14
14
|
import './bundle-BOQPDi0i.js';
|
|
15
15
|
import './util-BCZZYmp4.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { h, F as Fragment, r as registerInstance, H as Host } from './index-CCVkga9Q.js';
|
|
5
5
|
import { q as quaternion, v as vector3, h as euler } from './bundle-CkIzrpO0.js';
|
|
6
6
|
import { r as readDOM } from './stencil-BV-7pO4q.js';
|
|
7
|
-
import { O as Orientation, f as FramePerspectiveCamera, S as StandardView } from './streamAttributes-
|
|
7
|
+
import { O as Orientation, f as FramePerspectiveCamera, S as StandardView } from './streamAttributes-Cp8PEH9A.js';
|
|
8
8
|
import './entities-BAhfr1Nx.js';
|
|
9
9
|
import { c as classname } from './index-DI7z7TKn.js';
|
|
10
10
|
import './bundle-BOQPDi0i.js';
|
|
@@ -8,12 +8,12 @@ import { t as toProtoDuration, p as protoToDate, S as StreamApi, a as StreamRequ
|
|
|
8
8
|
import { m as mapper, E as EventDispatcher, a as async, c as color, d as deepEqual, o as objects, u as uri, b as uuid } from './bundle-DT9c7nCv.js';
|
|
9
9
|
import { c as classname } from './index-DI7z7TKn.js';
|
|
10
10
|
import { u as uuid_pbExports, I as ImageLoadError, p as paging_pbExports$1, C as CustomError, W as WebsocketConnectionError, S as SceneRenderError, V as ViewerInitializationError, M as MissingJWTError, a as InteractionHandlerError, b as ComponentInitializationError } from './errors-Cs13_LRq.js';
|
|
11
|
-
import { p as paging_pbExports } from './representation_pb-
|
|
11
|
+
import { p as paging_pbExports } from './representation_pb-g4f0WC4k.js';
|
|
12
12
|
import { s as scene_view_api_pbExports, r as requireField_mask_pb } from './wrappers_pb-aFAwKqIf.js';
|
|
13
13
|
import { r as requestUnary, c as createMetadata, a as requestPaged } from './grpc-CZAYqbTu.js';
|
|
14
|
-
import { h as fromPbStencilBufferOrThrow, i as decodePng, j as DepthBuffer, k as fromPbUuid2l, l as fromPbTimestamp, m as fromPbStringValue, n as fromPbVector3f, o as fromPbRGBAi, p as fromPbVector2d, u as updateLookAtRelativeToBoundingBoxCenter, t as toProtobuf, q as fromPbRGBi, r as mapCursor, s as fromPbInstant, v as fromPbMatrix4f, w as fromPbBoolValue, x as fromPbBoundingBox3f, y as toPbStreamAttributes, z as toPbRGBi, B as toPbCameraType, C as fromPbFrameOrThrow, E as fromPbStartStreamResponseOrThrow, G as fromPbReconnectResponseOrThrow, H as fromPbSyncTimeResponseOrThrow, I as fromPbRefreshTokenResponseOrThrow, J as copySummaryIfInvalid, K as toPbCameraTypeOrThrow$1, L as toOrthographic, M as toPerspective } from './streamAttributes-
|
|
15
|
-
import { t as toUuid2l, m as defaultColor, n as fromUrn, j as SynchronizedClock, M as ModelViewController, k as PmiController, S as Scene } from './queries-
|
|
16
|
-
import { p as parseAndValidateConfig } from './config-
|
|
14
|
+
import { h as fromPbStencilBufferOrThrow, i as decodePng, j as DepthBuffer, k as fromPbUuid2l, l as fromPbTimestamp, m as fromPbStringValue, n as fromPbVector3f, o as fromPbRGBAi, p as fromPbVector2d, u as updateLookAtRelativeToBoundingBoxCenter, t as toProtobuf, q as fromPbRGBi, r as mapCursor, s as fromPbInstant, v as fromPbMatrix4f, w as fromPbBoolValue, x as fromPbBoundingBox3f, y as toPbStreamAttributes, z as toPbRGBi, B as toPbCameraType, C as fromPbFrameOrThrow, E as fromPbStartStreamResponseOrThrow, G as fromPbReconnectResponseOrThrow, H as fromPbSyncTimeResponseOrThrow, I as fromPbRefreshTokenResponseOrThrow, J as copySummaryIfInvalid, K as toPbCameraTypeOrThrow$1, L as toOrthographic, M as toPerspective } from './streamAttributes-Cp8PEH9A.js';
|
|
15
|
+
import { t as toUuid2l, m as defaultColor, n as fromUrn, j as SynchronizedClock, M as ModelViewController, k as PmiController, S as Scene } from './queries-DEzCmbTD.js';
|
|
16
|
+
import { p as parseAndValidateConfig } from './config-lglER3mU.js';
|
|
17
17
|
import { C as CursorManager } from './cursors-BbBDEutb.js';
|
|
18
18
|
import { g as getMouseClientPosition, c as cssCursor } from './dom-B3m2VjbN.js';
|
|
19
19
|
import { E as EntityType } from './entities-BAhfr1Nx.js';
|
package/dist/viewer/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
export{C as Camera,c as ColorMaterial,a as CrossSectioner,I as ItemOperationBuilder,l as LoadableResource,M as ModelViewController,P as PmiAnnotationOperationsBuilder,b as PmiAnnotationsQueryExecutor,k as PmiController,R as Raycaster,d as RootQuery,S as Scene,e as SceneElementQueryExecutor,f as SceneElementsOperationExecutor,g as SceneItemOperationsBuilder,h as SceneItemQueryExecutor,i as SceneItemsOperationExecutor,s as SceneViewStateIdentifier,j as SynchronizedClock}from"./p-
|
|
4
|
+
export{C as Camera,c as ColorMaterial,a as CrossSectioner,I as ItemOperationBuilder,l as LoadableResource,M as ModelViewController,P as PmiAnnotationOperationsBuilder,b as PmiAnnotationsQueryExecutor,k as PmiController,R as Raycaster,d as RootQuery,S as Scene,e as SceneElementQueryExecutor,f as SceneElementsOperationExecutor,g as SceneItemOperationsBuilder,h as SceneItemQueryExecutor,i as SceneItemsOperationExecutor,s as SceneViewStateIdentifier,j as SynchronizedClock}from"./p-D6eJC1q4.js";export{S as SceneTreeController}from"./p-_93RRNxT.js";export{f as fromNodeProto,i as isLoadedRow}from"./p-CiSHWNC4.js";export{S as SCENE_ITEM_NAME_METADATA_KEY}from"./p-BZwvQkyb.js";export{C as CursorManager,b as boxQueryCursor,l as labelPinCursor,m as measurementCursor,a as measurementWithArrowCursor,p as pinCursor}from"./p-CVWO4w6b.js";export{M as MeasurementController,a as MeasurementEntity}from"./p-CyGlYje2.js";export{M as MeasurementModel}from"./p-Cs5KOvOQ.js";export{M as MeasurementOverlayManager}from"./p-C4y4Noe-.js";export{m as makeMinimumDistanceResult}from"./p-Jfxh0jq9.js";import{v as r,q as o,m as n}from"./p-CkIzrpO0.js";export{T as TransformController}from"./p-D_ixWHO7.js";export{f as flattenPointArray,a as toDegreesTransform,e as toLocalTransform,b as toMatrix,t as toRadiansTransform,c as toTransform,d as toWorldTransform}from"./p-BRPkbTVP.js";export{A as AngleUnits,g as AreaUnits,c as CrossSectioning,D as DistanceUnits,F as FrameCameraBase,O as Orientation,a as ReceivedFrame,b as ReceivedFrameImage,d as ReceivedFrameScene,e as ReceivedOrthographicCamera,f as ReceivedPerspectiveCamera,S as StandardView}from"./p-Dp56p_jX.js";export{E as EntityType}from"./p-BAhfr1Nx.js";export{A as ArrowMarkup,C as CircleMarkup,F as FreeformMarkup}from"./p-C0gbdp9W.js";export{V as Viewport}from"./p-BsBIynwj.js";export{V as VolumeIntersectionQueryController,a as VolumeIntersectionQueryModel}from"./p-DacE-wPp.js";import"./p-Ct0GdHoc.js";import"./p-CG9AChtV.js";import"./p--8q6LyIm.js";import"./p-ux1ckSDN.js";import"./p-BDvACHun.js";import"./p-BNuMPeJ8.js";import"./p-CjG1fMh1.js";import"./p-Og6pwwEB.js";import"./p-ChqXy0cG.js";const u=.9999;function x(e){const o=r.create(0,e.z,-e.y);const a=r.create(-e.z,0,e.x);const s=r.magnitudeSquared(o)>r.magnitudeSquared(a)?o:a;return r.normalize(r.cross(e,s))}function y(e,a){const s=r.dot(e,a);if(s>u){const r=x(e);const a=o.fromAxisAngle(r,Math.PI);return n.makeRotation(a)}else if(s<=-u){return n.makeIdentity()}else{const s=r.angleTo(a,e);const t=r.normalize(r.cross(e,a));return n.makeRotation(o.fromAxisAngle(t,s+Math.PI))}}function w(e,o,a,s){const t=y(e,a);const i=n.makeTranslation(s);return n.multiply(n.multiply(i,t),n.makeTranslation(r.negate(o)))}var v=Object.freeze({__proto__:null,ALMOST_ONE:u,calculateOrthogonalCoordinate:x,computeRotationMatrix:y,computeTransformationDelta:w});export{v as TransformationDelta};
|
|
5
5
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import{h as i,r as t,c as s,H as n,a as o}from"./p-CCVkga9Q.js";import{p as l,v as h,r as e,b as r,a,m as d,h as u,g as v,q as c,e as f,c as w}from"./p-CkIzrpO0.js";import{c as p}from"./p-Dw4-tG-V.js";import{w as x,r as g}from"./p-BxtKMwBH.js";import{T as y}from"./p-D_ixWHO7.js";import{A as m,D as z}from"./p-Dp56p_jX.js";import"./p-BAhfr1Nx.js";import{E as b}from"./p-Ct0GdHoc.js";import{d as T,T as C,R as D,e as R,r as A,s as P,x as j,A as S,b as E,y as O,z as H,f as F,g as I,h as N,i as B,j as U}from"./p-F8e15or2.js";import"./p-CG9AChtV.js";import"./p-Og6pwwEB.js";import"./p-BRPkbTVP.js";import"./p-BsBIynwj.js";function $(i){if(window.document.activeElement!==i){i.focus();i.setSelectionRange(i.value.length,i.value.length)}}function k(i,t){return t!=null?l.create(i.x-t.left,i.y-t.top):undefined}function M(i,t,s,n){const o=n!=null?h.fromMatrixPosition(n):undefined;if(i!=null&&t!=null&&s!=null&&o!=null){const n=s.transformPointToRay(i,t.image,t.scene.camera);if(t.scene.camera.isOrthographic()){const i=e.at(e.create({origin:o,direction:t.scene.camera.direction}),h.magnitude(t.scene.camera.viewVector)*2);return e.intersectPlane(n,r.fromNormalAndCoplanarPoint(t.scene.camera.direction,i))}else{return e.intersectPlane(n,r.fromNormalAndCoplanarPoint(t.scene.camera.direction,o))}}return undefined}function _(i,t,s,n,o,l){return d.multiply(i,V(t,s,n,o,l))}function V(i,t,s,n,o){const l=new z(n);const e=new m(o);const r=()=>e.convertFrom(t-s);const a=()=>l.convertRealValueToWorld(t-s);switch(i){case"x-translate":return d.makeTranslation(h.create(a(),0,0));case"y-translate":return d.makeTranslation(h.create(0,a(),0));case"z-translate":return d.makeTranslation(h.create(0,0,a()));case"x-rotate":return d.makeRotation(c.fromAxisAngle(h.left(),r()));case"y-rotate":return d.makeRotation(c.fromAxisAngle(h.down(),r()));case"z-rotate":return d.makeRotation(c.fromAxisAngle(h.forward(),r()));default:return d.makeIdentity()}}function q(i){switch(i){case"x-rotate":return"xyz";case"y-rotate":return"yzx";case"z-rotate":return"zxy";default:return"xyz"}}function J(i,t,s,n,o){const l=new z(n);const e=new m(o);const r=()=>d.makeRotation(c.fromMatrixRotation(t));const v=()=>d.multiply(t,d.invert(s));const f=()=>h.transformMatrix(h.fromMatrixPosition(v()),d.invert(r()));const w=()=>u.fromRotationMatrix(d.multiply(d.invert(r()),s),q(i));switch(i){case"x-translate":return l.convertWorldValueToReal(f().x);case"y-translate":return l.convertWorldValueToReal(f().y);case"z-translate":return l.convertWorldValueToReal(f().z);case"x-rotate":return e.convertTo(a.normalizeRadians(w().x));case"y-rotate":return e.convertTo(a.normalizeRadians(w().y));case"z-rotate":return e.convertTo(a.normalizeRadians(w().z));default:return 0}}function X(i,t,s,n,o,l){return G(i,h.subtract(s,t),n,o,l)}function G(i,t,s,n,o){switch(o){case"x-translate":return Y(i,t,h.right());case"y-translate":return Y(i,t,h.up());case"z-translate":return Y(i,t,h.back());case"xy-translate":return Z(i,t,h.create(0,0,1));case"xz-translate":return Z(i,t,h.create(0,1,0));case"yz-translate":return Z(i,t,h.create(1,0,0));case"x-rotate":return K(i,s,h.right(),n);case"y-rotate":return K(i,s,h.up(),n);case"z-rotate":return K(i,s,h.forward(),n);default:return i}}function K(i,t,s,n){const o=L(i,t,s);const l=c.fromAxisAngle(o,n);const h=d.makeRotation(l);return d.multiply(i,h)}function L(i,t,s){const n=d.makeRotation(c.fromMatrixRotation(i));const o=h.transformMatrix(s,n);const l=h.transformMatrix(h.negate(s),n);return h.dot(t,o)>h.dot(t,l)?s:h.negate(s)}function Y(i,t,s){const n=h.normalize(s);const o=d.makeRotation(c.fromMatrixRotation(i));const l=h.transformMatrix(n,o);const e=h.project(t,l);const r=d.makeTranslation(e);return d.multiply(r,i)}function Z(i,t,s){const n=h.normalize(s);const o=d.makeRotation(c.fromMatrixRotation(i));const l=h.transformMatrix(n,o);const e=h.fromMatrixPosition(i);const a=r.fromNormalAndCoplanarPoint(l,e);const u=r.projectPoint(a,t);const v=h.add(u,h.scale(a.constant,a.normal));const f=d.makeTranslation(v);return d.multiply(f,i)}function Q(i,t,s){if(s.length===0){throw new Error("Unable to compute input position. At least one shape point must be provided.")}const n=v.pad(t,5);const o=s.map((t=>i.transformNdcPointToViewport(t)));const h=v.topLeft(n);const e=l.add(h,l.create(n.width,0));const r=v.bottomRight(n);const a=l.subtract(r,l.create(n.width,0));const d=l.scale(o.reduce(((i,t)=>l.add(i,t)),l.create()),1/o.length,1/o.length);const u=[e,a,r].reduce(((i,t)=>l.distance(d,t)<l.distance(d,i)?t:i),h);switch(u){case h:return{point:u,placement:"top-left"};case e:return{point:u,placement:"top-right"};case a:return{point:u,placement:"bottom-left"};default:return{point:u,placement:"bottom-right"}}}function W(i,t,s,n,o,l){const h=t==="alt"&&i.altKey||t==="ctrl"&&i.ctrlKey||t==="meta"&&i.metaKey||t==="shift"&&i.shiftKey;if(h&&l!=null&&l>0&&Number.isInteger(l)){const i=s-n;const t=a.toDegrees(i);const h=Math.round(t/l)*l;if(o!=null){const i=Math.round(o/l)*l;const t=o-i;const s=h-t;const e=a.toRadians(s);return e+n}else{const i=a.toRadians(h);return i+n}}else{return s}}const ii=({ref:t,bounds:s,viewport:n,point:o,placement:l,displayUnit:h},e)=>{const r=ni(n,s!==null&&s!==void 0?s:f.create(0,0),o,l);return i("div",{ref:t,class:"widget-input wrapper",style:{...r,height:(s===null||s===void 0?void 0:s.height)!=null?`${s.height}px`:undefined}},e,i("div",{class:"widget-input units"},h.unit.abbreviatedName))};const ti=({ref:t,identifier:s,disabled:n,onChange:o,onIncrement:l,onDecrement:h,onBlur:e,onUndo:r})=>{const a=i=>{if(i.target!=null){const t=parseFloat(i.target.value);if(!isNaN(t)){o===null||o===void 0?void 0:o(parseFloat(i.target.value))}}};const d=i=>{const t=i.ctrlKey||i.metaKey;if(i.key==="ArrowUp"){l===null||l===void 0?void 0:l()}else if(i.key==="ArrowDown"){h===null||h===void 0?void 0:h()}else if(i.key==="z"&&t&&r){i.preventDefault();r()}};return i("input",{ref:t,disabled:n,class:`widget-input ${s}`,type:"text",onChange:a,onKeyDown:d,onBlur:e})};function si(i,t){return Math.min(i,Math.max(0,t))}function ni(i,t,s,n,o=5){const{width:l,height:h}=i.dimensions;const e=t.width+o;const r=t.height+o;function a(i){return`${i}px`}switch(n){case"top-left":return{right:a(si(l-e,l-s.x)),bottom:a(si(h-r,h-s.y))};case"top-right":return{left:a(si(l-e,s.x)),bottom:a(si(h-r,h-s.y))};case"bottom-left":return{right:a(si(l-e,l-s.x)),top:a(si(h-r,s.y))};case"bottom-right":default:return{left:a(si(l-e,s.x)),top:a(si(h-r,s.y))}}}function oi(i,t,s=3,n=1,o=1){return ei(i,t,h.back(),h.up(),s,n,o)}function li(i,t,s=3,n=1,o=1){return ei(i,t,h.right(),h.back(),s,n,o)}function hi(i,t,s=3,n=1,o=1){return ei(i,t,h.right(),h.up(),s,n,o)}function ei(i,t,s,n,o,l=1,r=1){const u=h.transformMatrix(h.add(s,n),d.makeRotation(c.fromMatrixRotation(i)));const v=h.transformMatrix(s,d.makeRotation(c.fromMatrixRotation(i)));const f=h.transformMatrix(n,d.makeRotation(c.fromMatrixRotation(i)));const w=10*r**.25;const p=h.fromMatrixPosition(i);const x=h.add(p,h.scale(o*w,u));const g=e.create({origin:x,direction:v});const y=e.create({origin:x,direction:f});const m=h.cross(v,f);const z=h.rotateAboutAxis(a.toRadians(45),e.at(y,-(o*l)),m,x);const b=h.rotateAboutAxis(a.toRadians(45),e.at(g,o*l),m,x);const C=h.rotateAboutAxis(a.toRadians(45),e.at(y,o*l),m,x);const D=h.rotateAboutAxis(a.toRadians(45),e.at(g,-(o*l)),m,x);return new T(h.dot(v,t.direction)!==-1&&h.dot(f,t.direction)!==-1,z,D,b,C,h.transformMatrix(z,t.projectionViewMatrix),h.transformMatrix(D,t.projectionViewMatrix),h.transformMatrix(b,t.projectionViewMatrix),h.transformMatrix(C,t.projectionViewMatrix))}function ri(i,t,s,n){if(i instanceof C){return ai(i,t,s,n)}return false}function ai(i,t,s,n){return di([i.points.worldLeft,i.points.worldRight,i.points.worldTip],t,s,n)||di([i.points.worldLeft,i.points.worldRight,i.points.worldBase],t,s,n)}function di(i,t,s,n){var o;if(i.length===3){const l=s.transformPointToRay(n,t.image,t.scene.camera);const e=h.subtract(i[1],i[0]);const r=h.subtract(i[2],i[0]);const a=w.epsilon((o=w.fromVectors([l.direction,l.origin,e,r]))!==null&&o!==void 0?o:w.create(e,r));const d=h.cross(l.direction,r);const u=h.dot(e,d);if(!(Math.abs(u)>=a)){return false}const v=h.subtract(l.origin,i[0]);const c=h.dot(v,d)/u;if(c<0||c>1){return false}const f=h.cross(v,e);const p=h.dot(l.direction,f)/u;if(p<0||c+p>1){return false}const x=h.dot(r,f)/u;return!isNaN(x)&&(x>0||t.scene.camera.isOrthographic())}return false}class ui extends D{constructor(i,t={},s={}){var n,o,l,h,e,r,a,d,u,v,c,f,w,p;super(i);this.customization=t;this.disabledAxis={xTranslation:false,yTranslation:false,zTranslation:false,xyTranslation:false,xzTranslation:false,yzTranslation:false,xRotation:false,yRotation:false,zRotation:false};this.axisLines=[];this.rotationLines=[];this.translationMeshes=[];this.rotationMeshes=[];this.hoveredChanged=new b;this.xArrowFillColor=(n=t.colors)===null||n===void 0?void 0:n.xArrow;this.yArrowFillColor=(o=t.colors)===null||o===void 0?void 0:o.yArrow;this.zArrowFillColor=(l=t.colors)===null||l===void 0?void 0:l.zArrow;this.hoveredArrowFillColor=(h=t.colors)===null||h===void 0?void 0:h.hovered;this.outlineColor=(e=t.colors)===null||e===void 0?void 0:e.outline;this.disabledAxis.xTranslation=(r=s.xTranslation)!==null&&r!==void 0?r:false;this.disabledAxis.yTranslation=(a=s.yTranslation)!==null&&a!==void 0?a:false;this.disabledAxis.zTranslation=(d=s.zTranslation)!==null&&d!==void 0?d:false;this.disabledAxis.xyTranslation=(u=s.xyTranslation)!==null&&u!==void 0?u:false;this.disabledAxis.xzTranslation=(v=s.xzTranslation)!==null&&v!==void 0?v:false;this.disabledAxis.yzTranslation=(c=s.yzTranslation)!==null&&c!==void 0?c:false;this.disabledAxis.xRotation=(f=s.xRotation)!==null&&f!==void 0?f:false;this.disabledAxis.yRotation=(w=s.yRotation)!==null&&w!==void 0?w:false;this.disabledAxis.zRotation=(p=s.zRotation)!==null&&p!==void 0?p:false}dispose(){var i;(i=this.reglFrameDisposable)===null||i===void 0?void 0:i.cancel()}getDrawableElements(){return this.drawableElements}getFullBounds(){return this.fullBounds}boundsContainsPoint(i){return this.interactiveBounds!=null&&this.frame!=null&&v.containsPoints(this.interactiveBounds,i)}updateDisabledAxis(i){this.disabledAxis={...this.disabledAxis,...i};this.updateDisabledOnDrawables()}updateCursor(i){this.cursor=i;if(i!=null&&this.frame!=null){this.updateHovered()}else{this.clearHovered()}}updateTransform(i){var t;this.transform=i;if(i!=null&&this.frame!=null){this.updateAndDraw()}else{this.clear();(t=this.reglFrameDisposable)===null||t===void 0?void 0:t.cancel();this.reglFrameDisposable=undefined}}updateColors(i={}){var t,s,n,o,l,h,e,r,a,d,u,v,c,f,w,p;this.xArrowFillColor=(t=i.xArrow)!==null&&t!==void 0?t:this.xArrowFillColor;this.yArrowFillColor=(s=i.yArrow)!==null&&s!==void 0?s:this.yArrowFillColor;this.zArrowFillColor=(n=i.zArrow)!==null&&n!==void 0?n:this.zArrowFillColor;this.twoAxesSquareFillColor=(o=i.twoAxesSquare)!==null&&o!==void 0?o:this.twoAxesSquareFillColor;this.hoveredArrowFillColor=(l=i.hovered)!==null&&l!==void 0?l:this.hoveredArrowFillColor;this.outlineColor=(h=i.outline)!==null&&h!==void 0?h:this.outlineColor;(e=this.xArrow)===null||e===void 0?void 0:e.updateFillColor(this.getXTranslationColor(),true);(r=this.yArrow)===null||r===void 0?void 0:r.updateFillColor(this.getYTranslationColor(),true);(a=this.zArrow)===null||a===void 0?void 0:a.updateFillColor(this.getZTranslationColor(),true);(d=this.xRotation)===null||d===void 0?void 0:d.updateFillColor(this.getXRotationColor(),true);(u=this.yRotation)===null||u===void 0?void 0:u.updateFillColor(this.getYRotationColor(),true);(v=this.zRotation)===null||v===void 0?void 0:v.updateFillColor(this.getZRotationColor(),true);(c=this.xyTranslation)===null||c===void 0?void 0:c.updateFillColor(this.getTwoAxesTranslationColor(),true);(f=this.xzTranslation)===null||f===void 0?void 0:f.updateFillColor(this.getTwoAxesTranslationColor(),true);(w=this.yzTranslation)===null||w===void 0?void 0:w.updateFillColor(this.getTwoAxesTranslationColor(),true);(p=this.hoveredElement)===null||p===void 0?void 0:p.updateFillColor(this.hoveredArrowFillColor)}updateScalars(i){this.customization={...this.customization,scalars:i};if(this.transform!=null&&this.frame!=null){this.updateElements(this.transform,this.frame)}}onHoveredChanged(i){return this.hoveredChanged.on(i)}updateDisabledOnDrawables(){var i,t,s,n,o,l,h,e,r,a,d,u,v,c,f;(i=this.xRotation)===null||i===void 0?void 0:i.setDisabled(this.disabledAxis.xRotation);(t=this.xyRotationLine)===null||t===void 0?void 0:t.setDisabled(this.disabledAxis.xRotation);(s=this.xzRotationLine)===null||s===void 0?void 0:s.setDisabled(this.disabledAxis.xRotation);(n=this.yRotation)===null||n===void 0?void 0:n.setDisabled(this.disabledAxis.yRotation);(o=this.yzRotationLine)===null||o===void 0?void 0:o.setDisabled(this.disabledAxis.yRotation);(l=this.yxRotationLine)===null||l===void 0?void 0:l.setDisabled(this.disabledAxis.yRotation);(h=this.zRotation)===null||h===void 0?void 0:h.setDisabled(this.disabledAxis.zRotation);(e=this.zxRotationLine)===null||e===void 0?void 0:e.setDisabled(this.disabledAxis.zRotation);(r=this.zyRotationLine)===null||r===void 0?void 0:r.setDisabled(this.disabledAxis.zRotation);(a=this.xArrow)===null||a===void 0?void 0:a.setDisabled(this.disabledAxis.xTranslation);(d=this.yArrow)===null||d===void 0?void 0:d.setDisabled(this.disabledAxis.yTranslation);(u=this.zArrow)===null||u===void 0?void 0:u.setDisabled(this.disabledAxis.zTranslation);(v=this.xyTranslation)===null||v===void 0?void 0:v.setDisabled(this.disabledAxis.xyTranslation);(c=this.xzTranslation)===null||c===void 0?void 0:c.setDisabled(this.disabledAxis.xzTranslation);(f=this.yzTranslation)===null||f===void 0?void 0:f.setDisabled(this.disabledAxis.yzTranslation);this.updateColors()}updateHovered(){var i,t,s,n,o,l,h,e,r,a;const d=this.hoveredElement;const u=this.frame;if(u!=null){this.hoveredElement=[...this.translationMeshes,...this.rotationMeshes].filter((i=>i.points.valid&&!i.isDisabled())).find((i=>this.cursor!=null?ri(i,u,this.viewport,this.cursor):false));if(this.hoveredElement!==d){this.hoveredChanged.emit(this.hoveredElement);(i=this.hoveredElement)===null||i===void 0?void 0:i.updateFillColor(this.hoveredArrowFillColor);this.clearFillColorOfPreviouslyHovered(d);if(((t=this.hoveredElement)===null||t===void 0?void 0:t.identifier)==="xy-translate"){(s=this.xArrow)===null||s===void 0?void 0:s.updateFillColor(this.hoveredArrowFillColor);(n=this.yArrow)===null||n===void 0?void 0:n.updateFillColor(this.hoveredArrowFillColor)}else if(((o=this.hoveredElement)===null||o===void 0?void 0:o.identifier)==="xz-translate"){(l=this.xArrow)===null||l===void 0?void 0:l.updateFillColor(this.hoveredArrowFillColor);(h=this.zArrow)===null||h===void 0?void 0:h.updateFillColor(this.hoveredArrowFillColor)}else if(((e=this.hoveredElement)===null||e===void 0?void 0:e.identifier)==="yz-translate"){(r=this.yArrow)===null||r===void 0?void 0:r.updateFillColor(this.hoveredArrowFillColor);(a=this.zArrow)===null||a===void 0?void 0:a.updateFillColor(this.hoveredArrowFillColor)}}}}clearHovered(){const i=this.hoveredElement;this.hoveredElement=undefined;if(this.hoveredElement!==i){this.hoveredChanged.emit(this.hoveredElement);this.clearFillColorOfPreviouslyHovered(i)}}clearFillColorOfPreviouslyHovered(i){var t,s,n,o,l,h,e,r,a,d,u,v;i===null||i===void 0?void 0:i.updateFillColor(i===null||i===void 0?void 0:i.initialFillColor);if((i===null||i===void 0?void 0:i.identifier)==="xy-translate"){(t=this.xArrow)===null||t===void 0?void 0:t.updateFillColor((s=this.xArrow)===null||s===void 0?void 0:s.initialFillColor);(n=this.yArrow)===null||n===void 0?void 0:n.updateFillColor((o=this.yArrow)===null||o===void 0?void 0:o.initialFillColor)}else if((i===null||i===void 0?void 0:i.identifier)==="xz-translate"){(l=this.xArrow)===null||l===void 0?void 0:l.updateFillColor((h=this.xArrow)===null||h===void 0?void 0:h.initialFillColor);(e=this.zArrow)===null||e===void 0?void 0:e.updateFillColor((r=this.zArrow)===null||r===void 0?void 0:r.initialFillColor)}else if((i===null||i===void 0?void 0:i.identifier)==="yz-translate"){(a=this.yArrow)===null||a===void 0?void 0:a.updateFillColor((d=this.yArrow)===null||d===void 0?void 0:d.initialFillColor);(u=this.zArrow)===null||u===void 0?void 0:u.updateFillColor((v=this.zArrow)===null||v===void 0?void 0:v.initialFillColor)}}hasData(){return this.transform!=null}createOrUpdateElements(){if(this.transform!=null&&this.frame!=null){if(this.xArrow==null||this.yArrow==null||this.zArrow==null){this.createElements(this.transform,this.frame)}else{this.updateElements(this.transform,this.frame)}this.interactiveBounds=R(this.viewport,...this.rotationMeshes,...this.translationMeshes);this.fullBounds=R(this.viewport,...this.rotationMeshes,...this.translationMeshes,...this.axisLines)}}createElements(i,t){var s,n,o,l,e,r,a,d,u,v,c,f;this.reglCommand=A({canvas:this.canvasElement,extensions:"angle_instanced_arrays"});const{createShape:w}=P(this.reglCommand);const p=this.computeTriangleSize(h.fromMatrixPosition(i),t);this.xArrow=new C(w,"x-translate",j(i,t.scene.camera,p,(s=this.customization.scalars)===null||s===void 0?void 0:s.xTranslation),this.outlineColor,this.getXTranslationColor());this.xRotation=new C(w,"x-rotate",oi(i,t.scene.camera,p,(n=this.customization.scalars)===null||n===void 0?void 0:n.xRotation,(o=this.customization.scalars)===null||o===void 0?void 0:o.xTranslation),this.outlineColor,this.getXRotationColor());this.xAxis=new S(w,"x-axis",E(i,t.scene.camera,this.xArrow),this.outlineColor,this.getXTranslationColor());this.yArrow=new C(w,"y-translate",O(i,t.scene.camera,p,(l=this.customization.scalars)===null||l===void 0?void 0:l.yTranslation),this.outlineColor,this.getYTranslationColor());this.yRotation=new C(w,"y-rotate",li(i,t.scene.camera,p,(e=this.customization.scalars)===null||e===void 0?void 0:e.yRotation,(r=this.customization.scalars)===null||r===void 0?void 0:r.yTranslation),this.outlineColor,this.getYRotationColor());this.yAxis=new S(w,"y-axis",E(i,t.scene.camera,this.yArrow),this.outlineColor,this.getYTranslationColor());this.zArrow=new C(w,"z-translate",H(i,t.scene.camera,p,(a=this.customization.scalars)===null||a===void 0?void 0:a.zTranslation),this.outlineColor,this.getZTranslationColor());this.zAxis=new S(w,"z-axis",E(i,t.scene.camera,this.zArrow),this.outlineColor,this.getZTranslationColor());this.zRotation=new C(w,"z-rotate",hi(i,t.scene.camera,p,(d=this.customization.scalars)===null||d===void 0?void 0:d.zRotation,(u=this.customization.scalars)===null||u===void 0?void 0:u.zTranslation),this.outlineColor,this.getZRotationColor());this.xyTranslation=new C(w,"xy-translate",F(i,t.scene.camera,p,(v=this.customization.scalars)===null||v===void 0?void 0:v.xyTranslation),this.outlineColor,this.getTwoAxesTranslationColor());this.xzTranslation=new C(w,"xz-translate",I(i,t.scene.camera,p,(c=this.customization.scalars)===null||c===void 0?void 0:c.xzTranslation),this.outlineColor,this.getTwoAxesTranslationColor());this.yzTranslation=new C(w,"yz-translate",N(i,t.scene.camera,p,(f=this.customization.scalars)===null||f===void 0?void 0:f.yzTranslation),this.outlineColor,this.getTwoAxesTranslationColor());this.createRotationLines(w,i,t);this.axisLines=[this.xAxis,this.yAxis,this.zAxis];this.translationMeshes=[this.xArrow,this.yArrow,this.zArrow,this.xyTranslation,this.xzTranslation,this.yzTranslation];this.rotationMeshes=[this.xRotation,this.yRotation,this.zRotation];this.updateDisabledOnDrawables();this.availableElements=[...this.axisLines,...this.rotationLines,...this.translationMeshes,...this.rotationMeshes]}getXRotationColor(){return this.xArrowFillColor}getYRotationColor(){return this.yArrowFillColor}getZRotationColor(){return this.zArrowFillColor}getXTranslationColor(){return this.xArrowFillColor}getYTranslationColor(){return this.yArrowFillColor}getZTranslationColor(){return this.zArrowFillColor}getTwoAxesTranslationColor(){return this.twoAxesSquareFillColor}createRotationLines(i,t,s){var n,o,l,e,r,a;const d=this.computeTriangleSize(h.fromMatrixPosition(t),s);const u=B(s.scene.camera,this.xRotation,(n=this.yArrow)===null||n===void 0?void 0:n.points.worldTip,d);const v=B(s.scene.camera,this.xRotation,(o=this.zArrow)===null||o===void 0?void 0:o.points.worldTip,d);const c=B(s.scene.camera,this.yRotation,(l=this.xArrow)===null||l===void 0?void 0:l.points.worldTip,d);const f=B(s.scene.camera,this.yRotation,(e=this.zArrow)===null||e===void 0?void 0:e.points.worldTip,d);const w=B(s.scene.camera,this.zRotation,(r=this.xArrow)===null||r===void 0?void 0:r.points.worldTip,d);const p=B(s.scene.camera,this.zRotation,(a=this.yArrow)===null||a===void 0?void 0:a.points.worldTip,d);if(u!=null){this.xyRotationLine=new U(i,"xy-rotation-line",u,this.outlineColor)}if(v!=null){this.xzRotationLine=new U(i,"xz-rotation-line",v,this.outlineColor)}if(c!=null){this.yxRotationLine=new U(i,"yx-rotation-line",c,this.outlineColor)}if(f!=null){this.yzRotationLine=new U(i,"yz-rotation-line",f,this.outlineColor)}if(w!=null){this.zxRotationLine=new U(i,"zx-rotation-line",w,this.outlineColor)}if(p!=null){this.zyRotationLine=new U(i,"zy-rotation-line",p,this.outlineColor)}this.rotationLines=[this.xyRotationLine,this.xzRotationLine,this.yxRotationLine,this.yzRotationLine,this.zxRotationLine,this.zyRotationLine].filter((i=>i!=null))}updateElements(i,t){var s,n,o,l,e,r,a,d,u,v,c,f,w,p,x,g,y,m,z,b,T,C,D,R,A,P,S,U,$,k;const M=this.computeTriangleSize(h.fromMatrixPosition(i),t);if(this.xArrow!=null){this.xArrow.updatePoints(j(i,t.scene.camera,M,(s=this.customization.scalars)===null||s===void 0?void 0:s.xTranslation));(n=this.xAxis)===null||n===void 0?void 0:n.updatePoints(E(i,t.scene.camera,this.xArrow))}(o=this.xRotation)===null||o===void 0?void 0:o.updatePoints(oi(i,t.scene.camera,M,(l=this.customization.scalars)===null||l===void 0?void 0:l.xRotation,(e=this.customization.scalars)===null||e===void 0?void 0:e.xTranslation));if(this.yArrow!=null){this.yArrow.updatePoints(O(i,t.scene.camera,M,(r=this.customization.scalars)===null||r===void 0?void 0:r.yTranslation));(a=this.yAxis)===null||a===void 0?void 0:a.updatePoints(E(i,t.scene.camera,this.yArrow))}(d=this.yRotation)===null||d===void 0?void 0:d.updatePoints(li(i,t.scene.camera,M,(u=this.customization.scalars)===null||u===void 0?void 0:u.yRotation,(v=this.customization.scalars)===null||v===void 0?void 0:v.yTranslation));if(this.zArrow!=null){this.zArrow.updatePoints(H(i,t.scene.camera,M,(c=this.customization.scalars)===null||c===void 0?void 0:c.zTranslation));(f=this.zAxis)===null||f===void 0?void 0:f.updatePoints(E(i,t.scene.camera,this.zArrow))}(w=this.zRotation)===null||w===void 0?void 0:w.updatePoints(hi(i,t.scene.camera,M,(p=this.customization.scalars)===null||p===void 0?void 0:p.zRotation,(x=this.customization.scalars)===null||x===void 0?void 0:x.zTranslation));(g=this.xyRotationLine)===null||g===void 0?void 0:g.updatePoints(B(t.scene.camera,this.xRotation,(y=this.yArrow)===null||y===void 0?void 0:y.points.worldTip,M));(m=this.xzRotationLine)===null||m===void 0?void 0:m.updatePoints(B(t.scene.camera,this.xRotation,(z=this.zArrow)===null||z===void 0?void 0:z.points.worldTip,M));(b=this.yxRotationLine)===null||b===void 0?void 0:b.updatePoints(B(t.scene.camera,this.yRotation,(T=this.xArrow)===null||T===void 0?void 0:T.points.worldTip,M));(C=this.yzRotationLine)===null||C===void 0?void 0:C.updatePoints(B(t.scene.camera,this.yRotation,(D=this.zArrow)===null||D===void 0?void 0:D.points.worldTip,M));(R=this.zxRotationLine)===null||R===void 0?void 0:R.updatePoints(B(t.scene.camera,this.zRotation,(A=this.xArrow)===null||A===void 0?void 0:A.points.worldTip,M));(P=this.zyRotationLine)===null||P===void 0?void 0:P.updatePoints(B(t.scene.camera,this.zRotation,(S=this.yArrow)===null||S===void 0?void 0:S.points.worldTip,M));if(this.xyTranslation!=null){this.xyTranslation.updatePoints(F(i,t.scene.camera,M,(U=this.customization.scalars)===null||U===void 0?void 0:U.xyTranslation))}if(this.xzTranslation!=null){this.xzTranslation.updatePoints(I(i,t.scene.camera,M,($=this.customization.scalars)===null||$===void 0?void 0:$.xzTranslation))}if(this.yzTranslation!=null){this.yzTranslation.updatePoints(N(i,t.scene.camera,M,(k=this.customization.scalars)===null||k===void 0?void 0:k.yzTranslation))}}}const vi=()=>`:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;--viewer-transform-widget-x-axis-arrow-color:var(--x-axis-color);--viewer-transform-widget-y-axis-arrow-color:var(--y-axis-color);--viewer-transform-widget-z-axis-arrow-color:var(--z-axis-color);--viewer-transform-widget-two-axes-square-color:var(--two-axes-color);--viewer-transform-widget-hovered-arrow-color:#ffff00;--viewer-transform-widget-input-width:8em}.widget{position:absolute;top:0;left:0}.widget.hovered{pointer-events:auto}.widget-input.wrapper{position:absolute;pointer-events:auto;display:flex;align-items:center;border:1px solid #444444;border-radius:4px;width:var(--viewer-transform-widget-input-width);text-align:center;background-color:white;box-sizing:border-box}.widget-input.units{position:relative;width:25%;height:100%;padding:0 0.25rem;font-size:0.8125rem;color:#444444}input.widget-input{position:relative;text-align:center;box-sizing:border-box;width:75%;height:100%;outline:none;border-width:0 1px 0 0;border-color:#444444;border-radius:2px 0 0 2px;font-size:0.875rem;color:#444444}input.widget-input.x-translate,input.widget-input.x-rotate{border-left:5px solid var(--viewer-transform-widget-x-axis-arrow-color)}input.widget-input.y-translate,input.widget-input.y-rotate{border-left:5px solid var(--viewer-transform-widget-y-axis-arrow-color)}input.widget-input.z-translate,input.widget-input.z-rotate{border-left:5px solid var(--viewer-transform-widget-z-axis-arrow-color)}input.widget-input:disabled{color:#888888}input.widget-input:focus{outline:none}`;const ci=class{constructor(i){t(this,i);this.positionChanged=s(this,"positionChanged");this.rotationChanged=s(this,"rotationChanged");this.interactionEnded=s(this,"interactionEnded");this.interactionStarted=s(this,"interactionStarted");this.xRotationDisabled=false;this.yRotationDisabled=false;this.zRotationDisabled=false;this.xTranslationDisabled=false;this.yTranslationDisabled=false;this.zTranslationDisabled=false;this.xyTranslationDisabled=false;this.xzTranslationDisabled=false;this.yzTranslationDisabled=false;this.showInputs=true;this.distanceUnit="millimeters";this.angleUnit="degrees";this.decimalPlaces=1;this.rotationSnapKey="shift";this.translationHandleScalar=1;this.rotationHandleScalar=1;this.interactionThrottle=75;this.EXPERIMENTAL_undoKeybindings=false;this.inputValue=0;this.isEndingTransform=false;this.xArrowColor="#ea3324";this.yArrowColor="#4faf32";this.zArrowColor="#0000ff";this.twoAxesSquareColor="#e0e0e0";this.hoveredColor="#ffff00";this.lastAngle=0;this.inputShouldFocus=false;this.handleHoveredDrawableChanged=i=>{this.hovered=i};this.handleViewerFrameDrawn=()=>{this.updatePropsFromViewer()};this.handleViewerDimensionsChange=()=>{x((()=>{if(this.viewer!=null&&this.canvasRef!=null){this.canvasRef.width=this.viewer.viewport.width;this.canvasRef.height=this.viewer.viewport.height;this.updateCanvasBounds(this.canvasRef)}}))};this.handleResize=()=>{if(this.canvasRef!=null){this.updateCanvasBounds(this.canvasRef)}};this.handleInputResize=()=>{if(this.inputWrapperRef!=null){const i=this.inputWrapperRef;g((()=>{this.inputBounds=i.getBoundingClientRect()}))}};this.handleStyleChange=()=>{g((()=>{const i=window.getComputedStyle(this.hostEl);this.xArrowColor=i.getPropertyValue("--viewer-transform-widget-x-axis-arrow-color").trim();this.yArrowColor=i.getPropertyValue("--viewer-transform-widget-y-axis-arrow-color").trim();this.zArrowColor=i.getPropertyValue("--viewer-transform-widget-z-axis-arrow-color").trim();this.twoAxesSquareColor=i.getPropertyValue("--viewer-transform-widget-two-axes-square-color").trim();this.hoveredColor=i.getPropertyValue("--viewer-transform-widget-hovered-arrow-color").trim();this.getTransformWidget().updateColors({xArrow:this.xArrowColor,yArrow:this.yArrowColor,zArrow:this.zArrowColor,twoAxesSquare:this.twoAxesSquareColor,hovered:this.hoveredColor})}))};this.handlePointerMove=i=>{if(this.dragging==null){const t=k(l.create(i.clientX,i.clientY),this.getCanvasBounds());const s=this.getTransformWidget();if(t!=null&&s.boundsContainsPoint(t)){s.updateCursor(t)}else{s.updateCursor(undefined);this.hovered=undefined}}};this.handleBeginDrag=async i=>{var t,s,n;const o=this.getCanvasBounds();if(this.hovered!=null&&o!=null&&this.viewer!=null&&this.position!=null&&this.viewer.frame!=null){this.dragging=this.hovered;if(this.dragging.identifier!==((t=this.lastDragged)===null||t===void 0?void 0:t.identifier)){this.inputValue=0;this.dragStartTransform=this.currentTransform;this.updateInputPosition();this.updateInputValue()}this.lastDragged=undefined;const h=k(l.create(i.clientX,i.clientY),o);const e=this.viewer.viewport.transformWorldToViewport(this.position,this.viewer.frame.scene.camera.projectionViewMatrix);this.lastAngle=h!=null?a.fromPoints(e,h):0;this.lastWorldPosition=M(h,(s=this.viewer)===null||s===void 0?void 0:s.frame,(n=this.viewer)===null||n===void 0?void 0:n.viewport,this.currentTransform);this.interactionStarted.emit();window.removeEventListener("pointermove",this.handlePointerMove);window.addEventListener("pointermove",this.handleDragWithTimer);window.addEventListener("pointerup",this.handleEndTransform)}};this.handleDragWithTimer=async i=>{if(i!=null){i.preventDefault();this.lastMouseEvent=i}if(this.interactionTimer==null){this.interactionTimer=window.setTimeout((async()=>{this.interactionTimer=undefined;await this.handleDrag();this.lastMouseEvent=undefined}),this.interactionThrottle)}};this.handleDrag=async()=>{var i,t,s;const n=this.getCanvasBounds();if(this.dragging!=null&&this.lastWorldPosition!=null&&n!=null&&this.viewer!=null&&this.viewer.frame!=null&&this.position!=null&&this.lastMouseEvent!=null){await((i=this.controller)===null||i===void 0?void 0:i.beginTransform());const o=k(l.create(this.lastMouseEvent.clientX,this.lastMouseEvent.clientY),n);const h=this.viewer.viewport.transformWorldToViewport(this.position,this.viewer.frame.scene.camera.projectionViewMatrix);const e=M(o,(t=this.viewer)===null||t===void 0?void 0:t.frame,(s=this.viewer)===null||s===void 0?void 0:s.viewport,this.currentTransform);if(e!=null&&o!=null&&h!=null){const i=a.fromPoints(h,o);const t=W(this.lastMouseEvent,this.rotationSnapKey,i,this.lastAngle,this.getDisplayedAngle(),this.rotationSnapDegrees);this.transform(this.lastWorldPosition,e,t-this.lastAngle);this.updateInputPosition();this.updateInputValue();this.lastWorldPosition=e;this.lastAngle=t}}};this.handleEndTransform=async i=>{var t,s;const n=k(l.create(i.clientX,i.clientY),this.getCanvasBounds());const o=this.getTransformWidget();this.lastDragged=this.dragging;this.dragging=undefined;this.lastWorldPosition=undefined;this.lastAngle=0;this.updateInputPosition();this.updateInputValue();o.updateCursor(n);o.updateTransform(this.currentTransform);this.beginEndTransform();window.removeEventListener("pointermove",this.handleDragWithTimer);window.removeEventListener("pointerup",this.handleEndTransform);try{const i=(t=this.controller)===null||t===void 0?void 0:t.getCurrentDelta();await((s=this.controller)===null||s===void 0?void 0:s.endTransform());this.interactionEnded.emit(i)}catch(i){console.error("Failed to end transform interaction",i)}window.addEventListener("pointermove",this.handlePointerMove);this.completeEndTransform()};this.handleInputStep=async i=>{if(this.inputValue!=null&&this.lastInputValue!=null){if(this.isModifyingAngleUnits()){const t=new m(this.angleUnit);const s=t.convertFrom(this.lastInputValue);const n=a.normalizeRadians(s+a.toRadians(i));this.inputValue=t.convertTo(n)}else{this.inputValue=this.lastInputValue+i}await this.updateTransformFromInput(this.inputValue)}};this.handleInputChange=async i=>{await this.updateTransformFromInput(i)};this.handleKeyDown=async i=>{const t=i.ctrlKey||i.metaKey;if(i.key==="z"&&t&&this.EXPERIMENTAL_undoKeybindings){i.stopPropagation();await this.EXPERIMENTAL_undo()}};this.updateTransformFromInput=async i=>{var t,s,n;if(this.lastDragged!=null&&this.currentTransform!=null&&this.startingTransform!=null&&this.lastInputValue!=null){this.currentTransform=_(this.currentTransform,this.lastDragged.identifier,i,this.lastInputValue,this.distanceUnit,this.angleUnit);this.updateInputValue();this.lastInputValue=i;await((t=this.controller)===null||t===void 0?void 0:t.beginTransform());this.getTransformWidget().updateTransform(this.currentTransform);await((s=this.controller)===null||s===void 0?void 0:s.updateTransform(d.multiply(this.currentTransform,d.invert(this.startingTransform))));this.updateInputPosition();await((n=this.controller)===null||n===void 0?void 0:n.endTransformDebounced(this.beginEndTransform,this.completeEndTransform))}};this.updatePropsFromViewer=()=>{const{frame:i}=this.viewer||{};if(i!=null){const t=this.getTransformWidget();t.updateFrame(i,this.dragging==null);this.updateInputPosition()}};this.setupTransformWidget=i=>{var t,s;console.debug(`Initializing transform widget. [initial-position=${JSON.stringify(this.position)}, has-initial-frame=${((t=this.viewer)===null||t===void 0?void 0:t.frame)!=null}]`);const n=this.getTranslationScalar();const o=this.getRotationScalar();this.widget=new ui(i,{colors:{xArrow:this.xArrowColor,yArrow:this.yArrowColor,zArrow:this.zArrowColor,twoAxesSquare:this.twoAxesSquareColor,hovered:this.hoveredColor},scalars:{xTranslation:n,yTranslation:n,zTranslation:n,xyTranslation:o,xzTranslation:o,yzTranslation:o,xRotation:o,yRotation:o,zRotation:o}});if(this.rotation!=null){this.currentTransform=this.getTransformForNewRotation(this.rotation);this.startingTransform=this.currentTransform;this.widget.updateTransform(this.currentTransform)}if(this.position!=null){this.currentTransform=this.getTransformForNewPosition(this.position);this.startingTransform=this.currentTransform;this.widget.updateTransform(this.currentTransform)}if(((s=this.viewer)===null||s===void 0?void 0:s.frame)!=null){this.widget.updateFrame(this.viewer.frame,true)}this.handleSettingDisabledAxis();this.hoveredChangeDisposable=this.widget.onHoveredChanged(this.handleHoveredDrawableChanged);return this.widget};this.updateCanvasBounds=i=>{g((()=>{this.canvasBounds=i.getBoundingClientRect();this.getTransformWidget().updateDimensions(i)}))};this.updateInputValue=()=>{var i,t,s;const n=(i=this.dragging)!==null&&i!==void 0?i:this.lastDragged;const o=(n===null||n===void 0?void 0:n.identifier)==="xy-translate"||(n===null||n===void 0?void 0:n.identifier)==="xz-translate"||(n===null||n===void 0?void 0:n.identifier)==="yz-translate";if(n!=null&&this.currentTransform!=null&&this.dragStartTransform!=null&&!o){this.lastInputValue=this.inputValue;this.inputValue=J(n.identifier,this.currentTransform,this.dragStartTransform,this.distanceUnit,this.angleUnit);if(this.inputRef!=null){const i=(s=(t=this.getDisplayedDistance())!==null&&t!==void 0?t:this.getDisplayedAngle())!==null&&s!==void 0?s:0;const n=`${parseFloat(i.toFixed(this.decimalPlaces))}`;this.inputRef.value=n}}};this.updateInputPosition=()=>{var i,t;const s=(i=this.dragging)!==null&&i!==void 0?i:this.lastDragged;const n=(s===null||s===void 0?void 0:s.identifier)==="xy-translate"||(s===null||s===void 0?void 0:s.identifier)==="xz-translate"||(s===null||s===void 0?void 0:s.identifier)==="yz-translate";if(this.showInputs&&((t=this.viewer)===null||t===void 0?void 0:t.frame)!=null&&this.position!=null&&s!=null&&!n){const i=this.getTransformWidget();const t=i.getFullBounds();this.inputPosition=t!=null?Q(this.viewer.viewport,t,s.points.toArray()):undefined}else if(n){this.inputPosition=undefined}};this.beginEndTransform=()=>{const i=this.getTransformWidget();i.updateDisabledAxis({xRotation:true,yRotation:true,zRotation:true,xTranslation:true,yTranslation:true,zTranslation:true,xyTranslation:true,xzTranslation:true,yzTranslation:true});this.isEndingTransform=true};this.completeEndTransform=()=>{const i=this.getTransformWidget();i.updateDisabledAxis({xRotation:this.xRotationDisabled,yRotation:this.yRotationDisabled,zRotation:this.zRotationDisabled,xTranslation:this.xTranslationDisabled,yTranslation:this.yTranslationDisabled,zTranslation:this.zTranslationDisabled,xyTranslation:this.xyTranslationDisabled,xzTranslation:this.xzTranslationDisabled,yzTranslation:this.yzTranslationDisabled});this.isEndingTransform=false;this.inputShouldFocus=true;if(this.currentTransform!=null){this.position=h.fromMatrixPosition(this.currentTransform);this.rotation=u.fromRotationMatrix(this.currentTransform)}};this.isModifyingAngleUnits=()=>{var i,t,s;const n=(t=(i=this.dragging)===null||i===void 0?void 0:i.identifier)!==null&&t!==void 0?t:(s=this.lastDragged)===null||s===void 0?void 0:s.identifier;return!!(n===null||n===void 0?void 0:n.includes("rotate"))};this.getTranslationScalar=()=>{if(this.translationHandleScalar>0){return this.translationHandleScalar}console.warn("Invalid value provided for translation-handle-scalar. Expected a positive value greater than zero.");return 1};this.getRotationScalar=()=>{if(this.rotationHandleScalar>0){return this.rotationHandleScalar}console.warn("Invalid value provided for rotation-handle-scalar. Expected a positive value greater than zero.");return 1};this.getDisplayedUnits=()=>{if(this.isModifyingAngleUnits()){return new m(this.angleUnit)}return new z(this.distanceUnit)};this.getDisplayedAngle=()=>{if(this.isModifyingAngleUnits()){return this.inputValue}};this.getDisplayedDistance=()=>{var i,t,s;const n=(t=(i=this.dragging)===null||i===void 0?void 0:i.identifier)!==null&&t!==void 0?t:(s=this.lastDragged)===null||s===void 0?void 0:s.identifier;if(n===null||n===void 0?void 0:n.includes("translate")){return this.inputValue}};this.getTransformForNewPosition=i=>{if(i!=null){const t=this.currentTransform!=null?this.currentTransform:d.makeIdentity();const s=d.makeRotation(c.fromMatrixRotation(t));const n=d.makeTranslation(i);return d.multiply(n,s)}};this.getTransformForNewRotation=i=>{const t=this.currentTransform!=null?this.currentTransform:d.makeIdentity();const s=d.invert(d.makeRotation(c.fromMatrixRotation(t)));const n=d.makeRotation(c.fromEuler(i));const o=d.multiply(t,s);return d.multiply(o,n)};this.getCanvasBounds=()=>{if(this.canvasBounds!=null){return this.canvasBounds}else if(this.canvasRef!=null){this.updateCanvasBounds(this.canvasRef);return this.canvasBounds}};this.getTransformWidget=()=>{if(this.widget==null&&this.canvasRef!=null){return this.setupTransformWidget(this.canvasRef)}else if(this.widget!=null){return this.widget}else{throw new Error("Transform widget was not initialized. The canvas element may not have been initialized.")}}}componentDidLoad(){window.addEventListener("pointermove",this.handlePointerMove);this.canvasResizeObserver=new ResizeObserver(this.handleResize);this.inputResizeObserver=new ResizeObserver(this.handleInputResize);this.hostStyleObserver=new MutationObserver(this.handleStyleChange);if(this.canvasRef!=null){this.canvasResizeObserver.observe(this.canvasRef);this.setupTransformWidget(this.canvasRef)}this.hostStyleObserver.observe(this.hostEl,{attributes:true,attributeFilter:["style"]});this.handleViewerChanged(this.viewer,undefined);this.handleStyleChange()}disconnectedCallback(){var i,t,s,n,o;window.removeEventListener("pointermove",this.handlePointerMove);(i=this.canvasResizeObserver)===null||i===void 0?void 0:i.disconnect();(t=this.inputResizeObserver)===null||t===void 0?void 0:t.disconnect();(s=this.hostStyleObserver)===null||s===void 0?void 0:s.disconnect();(n=this.hoveredChangeDisposable)===null||n===void 0?void 0:n.dispose();(o=this.widget)===null||o===void 0?void 0:o.dispose()}componentDidRender(){if(this.inputShouldFocus&&this.inputRef!=null){$(this.inputRef);this.inputShouldFocus=false}}async EXPERIMENTAL_undo(){var i,t;const s=await((i=this.controller)===null||i===void 0?void 0:i.EXPERIMENTAL_undoTransform());if(this.currentTransform!=null&&s!=null){this.currentTransform=d.multiply(s,this.currentTransform);(t=this.widget)===null||t===void 0?void 0:t.updateTransform(this.currentTransform);this.updateInputPosition();this.updateInputValue();this.lastInputValue=this.inputValue;this.position=h.fromMatrixPosition(this.currentTransform);this.rotation=u.fromRotationMatrix(this.currentTransform)}}handleViewerChanged(i,t){var s;t===null||t===void 0?void 0:t.removeEventListener("frameDrawn",this.handleViewerFrameDrawn);t===null||t===void 0?void 0:t.removeEventListener("dimensionschange",this.handleViewerDimensionsChange);i===null||i===void 0?void 0:i.addEventListener("frameDrawn",this.handleViewerFrameDrawn);i===null||i===void 0?void 0:i.addEventListener("dimensionschange",this.handleViewerDimensionsChange);if((i===null||i===void 0?void 0:i.stream)!=null){(s=this.controller)===null||s===void 0?void 0:s.dispose();this.controller=new y(i.stream)}}handleDisabledPropertyChanged(){var i;(i=this.widget)===null||i===void 0?void 0:i.updateDisabledAxis({xRotation:this.xRotationDisabled,yRotation:this.yRotationDisabled,zRotation:this.zRotationDisabled,xTranslation:this.xTranslationDisabled,yTranslation:this.yTranslationDisabled,zTranslation:this.zTranslationDisabled,xyTranslation:this.xyTranslationDisabled,xzTranslation:this.xzTranslationDisabled,yzTranslation:this.yzTranslationDisabled})}handleTransformHandleScalarChanged(){var i;const t=this.getTranslationScalar();const s=this.getRotationScalar();(i=this.widget)===null||i===void 0?void 0:i.updateScalars({xTranslation:t,yTranslation:t,zTranslation:t,xyTranslation:s,xzTranslation:s,yzTranslation:s,xRotation:s,yRotation:s,zRotation:s})}handleRotationChanged(i,t){var s;const n=i!==null&&i!==void 0?i:u.create();this.currentTransform=this.getTransformForNewRotation(n);this.startingTransform=this.currentTransform;if(i==null&&this.currentTransform!=null&&d.isIdentity(this.currentTransform)){this.currentTransform=undefined;this.startingTransform=this.currentTransform}(s=this.widget)===null||s===void 0?void 0:s.updateTransform(this.currentTransform);console.debug(`Updating widget rotation [previous=${JSON.stringify(t)}, current=${JSON.stringify(i)}]`);this.rotationChanged.emit(i)}handlePositionChanged(i,t){var s,n;this.currentTransform=this.getTransformForNewPosition(i);this.startingTransform=this.currentTransform;console.debug(`Updating widget position [previous=${JSON.stringify(t)}, current=${JSON.stringify(i)}]`);(s=this.widget)===null||s===void 0?void 0:s.updateTransform(this.currentTransform);if(i==null){this.lastDragged=undefined;this.inputPosition=undefined;(n=this.controller)===null||n===void 0?void 0:n.clearTransform()}this.positionChanged.emit(i)}handleInputFormattingChanged(){this.updateInputValue();this.lastInputValue=this.inputValue}render(){var t,s,o,l,h,e;return i(n,{key:"5d32e8df03f363c836a8a6194f9ff945227a70c8"},i("canvas",{key:"ba1d8b8b1fb99b808809d32176f341d12708af32",ref:i=>{this.canvasRef=i},class:p("widget",{hovered:this.hovered!=null}),tabindex:"0",width:(t=this.viewer)===null||t===void 0?void 0:t.viewport.width,height:(s=this.viewer)===null||s===void 0?void 0:s.viewport.height,onPointerDown:this.handleBeginDrag,onKeyDown:this.handleKeyDown}),this.showInputs&&this.inputPosition&&((o=this.viewer)===null||o===void 0?void 0:o.viewport)&&i(ii,{key:"734bd29977c8efe57e5e4e9d838279c8d7777ead",ref:i=>{var t,s;if(i!=null){(t=this.inputResizeObserver)===null||t===void 0?void 0:t.observe(i)}else if(this.inputWrapperRef!=null){(s=this.inputResizeObserver)===null||s===void 0?void 0:s.unobserve(this.inputWrapperRef)}this.inputWrapperRef=i},bounds:this.inputBounds,viewport:this.viewer.viewport,point:this.inputPosition.point,placement:this.inputPosition.placement,displayUnit:this.getDisplayedUnits()},i(ti,{key:"0d8d997c37a534fcbfe24d452e520a321fea2f18",ref:i=>{this.inputRef=i},identifier:(h=(l=this.dragging)===null||l===void 0?void 0:l.identifier)!==null&&h!==void 0?h:(e=this.lastDragged)===null||e===void 0?void 0:e.identifier,disabled:this.isEndingTransform,onChange:this.handleInputChange,onIncrement:()=>this.handleInputStep(1),onDecrement:()=>this.handleInputStep(-1),onBlur:()=>{this.inputShouldFocus=false},onUndo:this.EXPERIMENTAL_undoKeybindings?()=>this.EXPERIMENTAL_undo():undefined})))}transform(i,t,s){var n,o;if(this.position!=null&&this.startingTransform!=null&&this.currentTransform!=null&&this.dragging!=null&&this.viewer!=null&&this.viewer.frame!=null){this.currentTransform=X(this.currentTransform,i,t,(n=this.viewer)===null||n===void 0?void 0:n.frame.scene.camera.viewVector,s,this.dragging.identifier);this.getTransformWidget().updateTransform(this.currentTransform);(o=this.controller)===null||o===void 0?void 0:o.updateTransform(d.multiply(this.currentTransform,d.invert(this.startingTransform)))}}handleSettingDisabledAxis(){if(this.widget){this.widget.updateDisabledAxis({xRotation:this.xRotationDisabled,yRotation:this.yRotationDisabled,zRotation:this.zRotationDisabled,xTranslation:this.xTranslationDisabled,yTranslation:this.yTranslationDisabled,zTranslation:this.zTranslationDisabled,xyTranslation:this.xyTranslationDisabled,xzTranslation:this.xzTranslationDisabled,yzTranslation:this.yzTranslationDisabled})}else{console.warn("Cannot set disabled values - no widget defined")}}get hostEl(){return o(this)}static get watchers(){return{viewer:[{handleViewerChanged:0}],xTranslationDisabled:[{handleDisabledPropertyChanged:0}],yTranslationDisabled:[{handleDisabledPropertyChanged:0}],zTranslationDisabled:[{handleDisabledPropertyChanged:0}],xyTranslationDisabled:[{handleDisabledPropertyChanged:0}],xzTranslationDisabled:[{handleDisabledPropertyChanged:0}],yzTranslationDisabled:[{handleDisabledPropertyChanged:0}],xRotationDisabled:[{handleDisabledPropertyChanged:0}],yRotationDisabled:[{handleDisabledPropertyChanged:0}],zRotationDisabled:[{handleDisabledPropertyChanged:0}],translationHandleScalar:[{handleTransformHandleScalarChanged:0}],rotationHandleScalar:[{handleTransformHandleScalarChanged:0}],rotation:[{handleRotationChanged:0}],position:[{handlePositionChanged:0}],distanceUnit:[{handleInputFormattingChanged:0}],angleUnit:[{handleInputFormattingChanged:0}],decimalPlaces:[{handleInputFormattingChanged:0}]}}};ci.style=vi();export{ci as vertex_viewer_transform_widget};
|
|
5
|
+
//# sourceMappingURL=p-051b5154.entry.js.map
|