@vertexvis/viewer 1.0.2-canary.2 → 1.0.2-canary.4
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-20ozv4y8.js.map +1 -1
- package/dist/cjs/controller-BhcNbaX_.js.map +1 -1
- package/dist/cjs/controller-CSwG6gbQ.js.map +1 -1
- package/dist/cjs/cursors-BZmDRtaZ.js.map +1 -1
- package/dist/cjs/dom-BBil4aN3.js.map +1 -1
- package/dist/cjs/dom-CvGkFQon.js.map +1 -1
- package/dist/cjs/entities-D6kgGria.js.map +1 -1
- package/dist/cjs/geometry_pb-BTko2Wi0.js.map +1 -1
- package/dist/cjs/grpc-BsWFEUrc.js.map +1 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/model-C9WvOKYT.js.map +1 -1
- package/dist/cjs/model-D17EQTIh.js.map +1 -1
- package/dist/cjs/model-DAB4oD5n.js.map +1 -1
- package/dist/cjs/model-DkXCzhs_.js.map +1 -1
- package/dist/cjs/multiElementInteractionHandler-BHvRKVIp.js.map +1 -1
- package/dist/cjs/overlays-B-06bUbI.js.map +1 -1
- package/dist/cjs/queries-Da9I-xMf.js.map +1 -1
- package/dist/cjs/regl-component-HhKCyGQ3.js.map +1 -1
- package/dist/cjs/representation_pb-CrCGjlyP.js.map +1 -1
- package/dist/cjs/results-1wRRZiYG.js.map +1 -1
- package/dist/cjs/row-Cet6xXup.js.map +1 -1
- package/dist/cjs/stencil-Hsr_8Chs.js.map +1 -1
- package/dist/cjs/streamAttributes-D_J-W8-2.js.map +1 -1
- package/dist/cjs/templates-DvjgjnlO.js.map +1 -1
- package/dist/cjs/util-DIJSIQXH.js.map +1 -1
- package/dist/cjs/utils-CibrnHQ4.js.map +1 -1
- package/dist/cjs/utils-D8MbXbwO.js.map +1 -1
- package/dist/cjs/utils-qErVs2Vt.js.map +1 -1
- package/dist/cjs/vertex-scene-tree-notification-banner_4.cjs.entry.js +6 -8
- package/dist/cjs/vertex-scene-tree-notification-banner_4.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-scene-tree-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/vertex-scene-tree-table-cell.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-scene-tree.cjs.entry.js +2 -2
- package/dist/cjs/vertex-scene-tree.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-box-query-tool.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-box-query-tool.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-dom-element_2.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-dom-element_2.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-dom-group.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-dom-group.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-hit-result-indicator.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-hit-result-indicator.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-markup-arrow_3.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-markup-tool.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-markup.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-markup.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-measurement-details.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-measurement-distance.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-measurement-line_2.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-measurement-line_2.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-measurement-precise.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-pin-group.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-pin-group.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-pin-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-pin-tool.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-pin-tool.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-teleport-tool.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-transform-widget.cjs.entry.js +4 -5
- package/dist/cjs/vertex-viewer-transform-widget.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-view-cube.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-view-cube.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-walk-mode-tool.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer.cjs.entry.js +9 -5
- package/dist/cjs/vertex-viewer.cjs.entry.js.map +1 -1
- package/dist/cjs/viewport-CG1VYkIU.js.map +1 -1
- package/dist/collection/components/scene-tree/errors.js.map +1 -1
- package/dist/collection/components/scene-tree/lib/controller.js.map +1 -1
- package/dist/collection/components/scene-tree/lib/dom.js.map +1 -1
- package/dist/collection/components/scene-tree/lib/errors.js.map +1 -1
- package/dist/collection/components/scene-tree/lib/grpc.js.map +1 -1
- package/dist/collection/components/scene-tree/lib/handlers.js.map +1 -1
- package/dist/collection/components/scene-tree/lib/row.js.map +1 -1
- package/dist/collection/components/scene-tree/lib/viewer-ops.js.map +1 -1
- package/dist/collection/components/scene-tree/scene-tree.js +2 -2
- package/dist/collection/components/scene-tree/scene-tree.js.map +1 -1
- package/dist/collection/components/scene-tree-search/scene-tree-search.js.map +1 -1
- package/dist/collection/components/scene-tree-table-cell/scene-tree-table-cell.js +1 -1
- package/dist/collection/components/scene-tree-table-cell/scene-tree-table-cell.js.map +1 -1
- package/dist/collection/components/scene-tree-table-cell/utils.js.map +1 -1
- package/dist/collection/components/scene-tree-table-layout/lib/dom.js.map +1 -1
- package/dist/collection/components/scene-tree-table-layout/lib/window.js.map +1 -1
- package/dist/collection/components/scene-tree-table-layout/scene-tree-table-layout.js +5 -5
- package/dist/collection/components/scene-tree-table-layout/scene-tree-table-layout.js.map +1 -1
- package/dist/collection/components/viewer/utils.js.map +1 -1
- package/dist/collection/components/viewer/viewer.js +9 -5
- package/dist/collection/components/viewer/viewer.js.map +1 -1
- package/dist/collection/components/viewer-box-query-tool/viewer-box-query-tool.js +2 -2
- package/dist/collection/components/viewer-box-query-tool/viewer-box-query-tool.js.map +1 -1
- package/dist/collection/components/viewer-dom-element/utils.js.map +1 -1
- package/dist/collection/components/viewer-dom-element/viewer-dom-element.js +1 -1
- package/dist/collection/components/viewer-dom-element/viewer-dom-element.js.map +1 -1
- package/dist/collection/components/viewer-dom-group/utils.js.map +1 -1
- package/dist/collection/components/viewer-dom-group/viewer-dom-group.js +1 -1
- package/dist/collection/components/viewer-dom-group/viewer-dom-group.js.map +1 -1
- package/dist/collection/components/viewer-dom-renderer/renderer2d.js.map +1 -1
- package/dist/collection/components/viewer-dom-renderer/renderer3d.js.map +1 -1
- package/dist/collection/components/viewer-dom-renderer/viewer-dom-renderer.js.map +1 -1
- package/dist/collection/components/viewer-hit-result-indicator/lib/dom.js.map +1 -1
- package/dist/collection/components/viewer-hit-result-indicator/lib/indicator.js.map +1 -1
- package/dist/collection/components/viewer-hit-result-indicator/lib/plane.js.map +1 -1
- package/dist/collection/components/viewer-hit-result-indicator/lib/point.js.map +1 -1
- package/dist/collection/components/viewer-hit-result-indicator/viewer-hit-result-indicator.js +1 -1
- package/dist/collection/components/viewer-hit-result-indicator/viewer-hit-result-indicator.js.map +1 -1
- package/dist/collection/components/viewer-icon/viewer-icon.js.map +1 -1
- package/dist/collection/components/viewer-markup/markup-utils.js.map +1 -1
- package/dist/collection/components/viewer-markup/viewer-markup-components.js.map +1 -1
- package/dist/collection/components/viewer-markup/viewer-markup.js +1 -1
- package/dist/collection/components/viewer-markup/viewer-markup.js.map +1 -1
- package/dist/collection/components/viewer-markup-arrow/interactions.js.map +1 -1
- package/dist/collection/components/viewer-markup-arrow/utils.js.map +1 -1
- package/dist/collection/components/viewer-markup-arrow/viewer-markup-arrow-components.js.map +1 -1
- package/dist/collection/components/viewer-markup-arrow/viewer-markup-arrow.js.map +1 -1
- package/dist/collection/components/viewer-markup-circle/interactions.js.map +1 -1
- package/dist/collection/components/viewer-markup-circle/utils.js.map +1 -1
- package/dist/collection/components/viewer-markup-circle/viewer-markup-circle.js.map +1 -1
- package/dist/collection/components/viewer-markup-freeform/interactions.js.map +1 -1
- package/dist/collection/components/viewer-markup-freeform/utils.js.map +1 -1
- package/dist/collection/components/viewer-markup-freeform/viewer-markup-freeform.js.map +1 -1
- package/dist/collection/components/viewer-markup-tool/viewer-markup-tool.js.map +1 -1
- package/dist/collection/components/viewer-measurement-details/viewer-measurement-details.js.map +1 -1
- package/dist/collection/components/viewer-measurement-distance/hitTest.js.map +1 -1
- package/dist/collection/components/viewer-measurement-distance/interactions.js.map +1 -1
- package/dist/collection/components/viewer-measurement-distance/utils.js.map +1 -1
- package/dist/collection/components/viewer-measurement-distance/viewer-measurement-distance.js.map +1 -1
- package/dist/collection/components/viewer-measurement-line/viewer-measurement-line.js +1 -1
- package/dist/collection/components/viewer-measurement-line/viewer-measurement-line.js.map +1 -1
- package/dist/collection/components/viewer-measurement-overlays/viewer-measurement-overlays.js +1 -1
- package/dist/collection/components/viewer-measurement-overlays/viewer-measurement-overlays.js.map +1 -1
- package/dist/collection/components/viewer-measurement-precise/viewer-measurement-precise.js.map +1 -1
- package/dist/collection/components/viewer-pin-group/utils.js.map +1 -1
- package/dist/collection/components/viewer-pin-group/viewer-pin-group.js +2 -2
- package/dist/collection/components/viewer-pin-group/viewer-pin-group.js.map +1 -1
- package/dist/collection/components/viewer-pin-label/viewer-pin-label.js.map +1 -1
- package/dist/collection/components/viewer-pin-tool/utils.js.map +1 -1
- package/dist/collection/components/viewer-pin-tool/viewer-pin-tool.js +1 -1
- package/dist/collection/components/viewer-pin-tool/viewer-pin-tool.js.map +1 -1
- package/dist/collection/components/viewer-teleport-tool/viewer-teleport-tool.js.map +1 -1
- package/dist/collection/components/viewer-transform-widget/util.js +1 -2
- package/dist/collection/components/viewer-transform-widget/util.js.map +1 -1
- package/dist/collection/components/viewer-transform-widget/viewer-transform-widget-components.js.map +1 -1
- package/dist/collection/components/viewer-transform-widget/viewer-transform-widget.js +3 -3
- package/dist/collection/components/viewer-transform-widget/viewer-transform-widget.js.map +1 -1
- package/dist/collection/components/viewer-transform-widget/widget.js.map +1 -1
- package/dist/collection/components/viewer-view-cube/viewer-view-cube.js +1 -1
- package/dist/collection/components/viewer-view-cube/viewer-view-cube.js.map +1 -1
- package/dist/collection/components/viewer-walk-mode-tool/viewer-walk-mode-tool.js.map +1 -1
- package/dist/collection/lib/annotations/controller.js.map +1 -1
- package/dist/collection/lib/canvases/controller.js.map +1 -1
- package/dist/collection/lib/canvases/mapper.js.map +1 -1
- package/dist/collection/lib/config.js.map +1 -1
- package/dist/collection/lib/cursors.js.map +1 -1
- package/dist/collection/lib/dom.js.map +1 -1
- package/dist/collection/lib/grpc.js.map +1 -1
- package/dist/collection/lib/interactions/baseInteractionHandler.js.map +1 -1
- package/dist/collection/lib/interactions/flyToPartKeyInteraction.js.map +1 -1
- package/dist/collection/lib/interactions/flyToPositionKeyInteraction.js.map +1 -1
- package/dist/collection/lib/interactions/interactionApi.js.map +1 -1
- package/dist/collection/lib/interactions/interactionApiOrthographic.js.map +1 -1
- package/dist/collection/lib/interactions/interactionApiPerspective.js.map +1 -1
- package/dist/collection/lib/interactions/mouseInteractionHandler.js.map +1 -1
- package/dist/collection/lib/interactions/mouseInteractions.js.map +1 -1
- package/dist/collection/lib/interactions/multiElementInteractionHandler.js.map +1 -1
- package/dist/collection/lib/interactions/multiPointerInteractionHandler.js.map +1 -1
- package/dist/collection/lib/interactions/multiTouchInteractionHandler.js.map +1 -1
- package/dist/collection/lib/interactions/pointerInteractionHandler.js.map +1 -1
- package/dist/collection/lib/interactions/tapInteractionHandler.js.map +1 -1
- package/dist/collection/lib/interactions/touchInteractionHandler.js.map +1 -1
- package/dist/collection/lib/keyBinding.js.map +1 -1
- package/dist/collection/lib/mappers/annotation.js.map +1 -1
- package/dist/collection/lib/mappers/camera.js.map +1 -1
- package/dist/collection/lib/mappers/color.js.map +1 -1
- package/dist/collection/lib/mappers/colorMaterial.js.map +1 -1
- package/dist/collection/lib/mappers/corePb.js.map +1 -1
- package/dist/collection/lib/mappers/corePbJs.js.map +1 -1
- package/dist/collection/lib/mappers/frameStreaming.js.map +1 -1
- package/dist/collection/lib/mappers/geometry.js.map +1 -1
- package/dist/collection/lib/mappers/material.js.map +1 -1
- package/dist/collection/lib/mappers/pagination.js.map +1 -1
- package/dist/collection/lib/mappers/scalar.js.map +1 -1
- package/dist/collection/lib/mappers/streamAttributes.js.map +1 -1
- package/dist/collection/lib/markup/interactions.js.map +1 -1
- package/dist/collection/lib/measurement/controller.js.map +1 -1
- package/dist/collection/lib/measurement/entities.js.map +1 -1
- package/dist/collection/lib/measurement/interactions.js.map +1 -1
- package/dist/collection/lib/measurement/mapper.js.map +1 -1
- package/dist/collection/lib/measurement/model.js.map +1 -1
- package/dist/collection/lib/measurement/overlays.js.map +1 -1
- package/dist/collection/lib/measurement/results.js.map +1 -1
- package/dist/collection/lib/meters.js.map +1 -1
- package/dist/collection/lib/model-views/controller.js.map +1 -1
- package/dist/collection/lib/model-views/mapper.js.map +1 -1
- package/dist/collection/lib/pins/controller.js.map +1 -1
- package/dist/collection/lib/pins/interactions.js.map +1 -1
- package/dist/collection/lib/pmi/controller.js.map +1 -1
- package/dist/collection/lib/pmi/mapper.js.map +1 -1
- package/dist/collection/lib/rendering/canvas.js.map +1 -1
- package/dist/collection/lib/rendering/imageLoaders.js.map +1 -1
- package/dist/collection/lib/rendering/matrices.js.map +1 -1
- package/dist/collection/lib/rendering/timing.js.map +1 -1
- package/dist/collection/lib/rendering/utils.js.map +1 -1
- package/dist/collection/lib/rendering/vectors.js.map +1 -1
- package/dist/collection/lib/scene-items/controller.js.map +1 -1
- package/dist/collection/lib/scene-items/mapper.js.map +1 -1
- package/dist/collection/lib/scenes/camera.js.map +1 -1
- package/dist/collection/lib/scenes/cameraRenderResult.js.map +1 -1
- package/dist/collection/lib/scenes/colorMaterial.js.map +1 -1
- package/dist/collection/lib/scenes/crossSectioner.js.map +1 -1
- package/dist/collection/lib/scenes/mapper.js.map +1 -1
- package/dist/collection/lib/scenes/operations.js.map +1 -1
- package/dist/collection/lib/scenes/queries.js.map +1 -1
- package/dist/collection/lib/scenes/raycaster.js.map +1 -1
- package/dist/collection/lib/scenes/scene.js.map +1 -1
- package/dist/collection/lib/scenes/sceneOperationExecuteResult.js.map +1 -1
- package/dist/collection/lib/scenes/sceneViewStateLoader.js.map +1 -1
- package/dist/collection/lib/stencil.js.map +1 -1
- package/dist/collection/lib/storage.js.map +1 -1
- package/dist/collection/lib/stream/dispatcher.js.map +1 -1
- package/dist/collection/lib/stream/stream.js.map +1 -1
- package/dist/collection/lib/stream/utils.js.map +1 -1
- package/dist/collection/lib/teleportation/interactions.js.map +1 -1
- package/dist/collection/lib/templates.js.map +1 -1
- package/dist/collection/lib/token.js.map +1 -1
- package/dist/collection/lib/transforms/axis-lines.js.map +1 -1
- package/dist/collection/lib/transforms/axis-rotation.js.map +1 -1
- package/dist/collection/lib/transforms/axis-translation.js.map +1 -1
- package/dist/collection/lib/transforms/controller.js.map +1 -1
- package/dist/collection/lib/transforms/drawable.js.map +1 -1
- package/dist/collection/lib/transforms/hits.js.map +1 -1
- package/dist/collection/lib/transforms/line.js.map +1 -1
- package/dist/collection/lib/transforms/mesh.js.map +1 -1
- package/dist/collection/lib/transforms/shape.js.map +1 -1
- package/dist/collection/lib/transforms/transformation-delta.js.map +1 -1
- package/dist/collection/lib/transforms/util.js.map +1 -1
- package/dist/collection/lib/types/clippingPlanes.js.map +1 -1
- package/dist/collection/lib/types/depthBuffer.js.map +1 -1
- package/dist/collection/lib/types/featureMap.js.map +1 -1
- package/dist/collection/lib/types/flags.js.map +1 -1
- package/dist/collection/lib/types/frame.js.map +1 -1
- package/dist/collection/lib/types/frameCamera.js.map +1 -1
- package/dist/collection/lib/types/loadableResource.js.map +1 -1
- package/dist/collection/lib/types/orientation.js.map +1 -1
- package/dist/collection/lib/types/sceneViewStateIdentifier.js.map +1 -1
- package/dist/collection/lib/types/standardView.js.map +1 -1
- package/dist/collection/lib/types/stencilBuffer.js.map +1 -1
- package/dist/collection/lib/types/synchronizedClock.js.map +1 -1
- package/dist/collection/lib/types/viewport.js.map +1 -1
- package/dist/collection/lib/visibilityObserver.js.map +1 -1
- package/dist/collection/lib/volume-intersection/controller.js.map +1 -1
- package/dist/collection/lib/volume-intersection/interactions.js.map +1 -1
- package/dist/collection/lib/volume-intersection/model.js.map +1 -1
- package/dist/collection/lib/walk-mode/controller.js.map +1 -1
- package/dist/collection/lib/walk-mode/interactions.js.map +1 -1
- package/dist/collection/lib/walk-mode/model.js.map +1 -1
- package/dist/collection/lib/webgl/regl-component.js.map +1 -1
- package/dist/collection/testing/annotations.js.map +1 -1
- package/dist/collection/testing/canvases.js.map +1 -1
- package/dist/collection/testing/colors.js.map +1 -1
- package/dist/collection/testing/eventually.js.map +1 -1
- package/dist/collection/testing/fixtures.js.map +1 -1
- package/dist/collection/testing/grpc.js +3 -9
- package/dist/collection/testing/grpc.js.map +1 -1
- package/dist/collection/testing/modelViews.js.map +1 -1
- package/dist/collection/testing/pmi.js.map +1 -1
- package/dist/collection/testing/random.js.map +1 -1
- package/dist/collection/testing/resizeObserver.js.map +1 -1
- package/dist/collection/testing/scene-items-helper.js.map +1 -1
- package/dist/collection/testing/sceneTree.js.map +1 -1
- package/dist/collection/testing/viewer.js.map +1 -1
- package/dist/collection/testing/webgl.js.map +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-St4ctu2K.js → p-3-bKfpqr.js} +2 -2
- package/dist/components/{p-St4ctu2K.js.map → p-3-bKfpqr.js.map} +1 -1
- package/dist/components/p-3DqRAYgO.js.map +1 -1
- package/dist/components/p-B-ToCp8-.js.map +1 -1
- package/dist/components/p-B156bTbY.js +5 -0
- package/dist/components/p-B156bTbY.js.map +1 -0
- package/dist/components/p-B9R0QWr4.js.map +1 -1
- package/dist/components/p-BCOD9yfw.js.map +1 -1
- package/dist/components/p-BHAaIoH5.js.map +1 -1
- package/dist/components/{p-Doltf1wO.js → p-BOJJZ1cN.js} +2 -2
- package/dist/components/p-BOJJZ1cN.js.map +1 -0
- package/dist/components/p-BkHp-aAR.js.map +1 -1
- package/dist/components/p-Bkm6H5uq.js.map +1 -1
- package/dist/components/p-C-VWDW9n.js.map +1 -1
- package/dist/components/p-C79PxobX.js.map +1 -1
- package/dist/components/p-CAugdB_8.js.map +1 -1
- package/dist/components/p-CEzVEgdQ.js.map +1 -1
- package/dist/components/p-CGCJ5hbJ.js.map +1 -1
- package/dist/components/p-COlcifvm.js.map +1 -1
- package/dist/components/p-CXTH3zrN.js.map +1 -1
- package/dist/components/p-CZCXdo3t.js.map +1 -1
- package/dist/components/p-Cd7kap5W.js.map +1 -1
- package/dist/components/p-CiSHWNC4.js.map +1 -1
- package/dist/components/p-CjG1fMh1.js.map +1 -1
- package/dist/components/p-CkjXRDNL.js.map +1 -1
- package/dist/components/p-D0KZu516.js.map +1 -1
- package/dist/components/p-D12q-fpW.js.map +1 -1
- package/dist/components/p-D33gVA2W.js.map +1 -1
- package/dist/components/p-DC86ZXai.js.map +1 -1
- package/dist/components/{p-B80hfIq6.js → p-DF4kEsJU.js} +2 -2
- package/dist/components/p-DF4kEsJU.js.map +1 -0
- package/dist/components/p-DRh4_Z-g.js.map +1 -1
- package/dist/components/p-DRnMrHWY.js.map +1 -1
- package/dist/components/{p-b0ZzPHz8.js → p-DUC59SSO.js} +2 -2
- package/dist/components/p-DUC59SSO.js.map +1 -0
- package/dist/components/p-DVW2WZTq.js.map +1 -1
- package/dist/components/p-DZI8pnGz.js.map +1 -1
- package/dist/components/p-Dbz9yUqC.js.map +1 -1
- package/dist/components/p-Yfi0i5Kj.js.map +1 -1
- package/dist/components/p-abSJ29r7.js.map +1 -1
- package/dist/components/p-ahjMltGJ.js.map +1 -1
- package/dist/components/p-bal2RLiw.js.map +1 -1
- package/dist/components/{p-BopQW1sA.js → p-oK38ynrd.js} +2 -2
- package/dist/components/p-oK38ynrd.js.map +1 -0
- package/dist/components/vertex-scene-tree-table-cell.js +1 -1
- package/dist/components/vertex-scene-tree-table-cell.js.map +1 -1
- package/dist/components/vertex-scene-tree-table-layout.js +1 -1
- package/dist/components/vertex-scene-tree.js +1 -1
- package/dist/components/vertex-scene-tree.js.map +1 -1
- package/dist/components/vertex-viewer-box-query-tool.js +1 -1
- package/dist/components/vertex-viewer-box-query-tool.js.map +1 -1
- package/dist/components/vertex-viewer-dom-element.js +1 -1
- package/dist/components/vertex-viewer-dom-group.js +1 -1
- package/dist/components/vertex-viewer-hit-result-indicator.js +1 -1
- package/dist/components/vertex-viewer-hit-result-indicator.js.map +1 -1
- package/dist/components/vertex-viewer-markup-tool.js.map +1 -1
- package/dist/components/vertex-viewer-markup.js +1 -1
- package/dist/components/vertex-viewer-markup.js.map +1 -1
- package/dist/components/vertex-viewer-measurement-details.js.map +1 -1
- package/dist/components/vertex-viewer-measurement-distance.js +1 -1
- package/dist/components/vertex-viewer-measurement-distance.js.map +1 -1
- package/dist/components/vertex-viewer-measurement-line.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-measurement-precise.js.map +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-pin-tool.js.map +1 -1
- package/dist/components/vertex-viewer-transform-widget.js +1 -1
- package/dist/components/vertex-viewer-transform-widget.js.map +1 -1
- package/dist/components/vertex-viewer-view-cube.js +1 -1
- package/dist/components/vertex-viewer-view-cube.js.map +1 -1
- package/dist/components/vertex-viewer-walk-mode-tool.js.map +1 -1
- package/dist/components/vertex-viewer.js +1 -1
- package/dist/components/vertex-viewer.js.map +1 -1
- package/dist/esm/config-lglER3mU.js.map +1 -1
- package/dist/esm/controller-BMWGs-I6.js.map +1 -1
- package/dist/esm/controller-Iymb_J2R.js.map +1 -1
- package/dist/esm/cursors-BbBDEutb.js.map +1 -1
- package/dist/esm/dom-B3m2VjbN.js.map +1 -1
- package/dist/esm/dom-DX6pEG54.js.map +1 -1
- package/dist/esm/entities-zRken6VS.js.map +1 -1
- package/dist/esm/geometry_pb-BiZRfctN.js.map +1 -1
- package/dist/esm/grpc-CZAYqbTu.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/model-BYW5YIye.js.map +1 -1
- package/dist/esm/model-CLtwOS0o.js.map +1 -1
- package/dist/esm/model-D0EJdHmW.js.map +1 -1
- package/dist/esm/model-DHJ5aE4y.js.map +1 -1
- package/dist/esm/multiElementInteractionHandler-DwjL-r55.js.map +1 -1
- package/dist/esm/overlays-BE1oqniA.js.map +1 -1
- package/dist/esm/queries-DEzCmbTD.js.map +1 -1
- package/dist/esm/regl-component-DmkowWhg.js.map +1 -1
- package/dist/esm/representation_pb-g4f0WC4k.js.map +1 -1
- package/dist/esm/results-CFB6nKu8.js.map +1 -1
- package/dist/esm/row-CiSHWNC4.js.map +1 -1
- package/dist/esm/stencil-BV-7pO4q.js.map +1 -1
- package/dist/esm/streamAttributes-Cp8PEH9A.js.map +1 -1
- package/dist/esm/templates-DRh4_Z-g.js.map +1 -1
- package/dist/esm/util-BCZZYmp4.js.map +1 -1
- package/dist/esm/utils-BvZ9-fs0.js.map +1 -1
- package/dist/esm/utils-DC86ZXai.js.map +1 -1
- package/dist/esm/utils-D_pIldrS.js.map +1 -1
- package/dist/esm/vertex-scene-tree-notification-banner_4.entry.js +6 -8
- package/dist/esm/vertex-scene-tree-notification-banner_4.entry.js.map +1 -1
- package/dist/esm/vertex-scene-tree-table-cell.entry.js +1 -1
- package/dist/esm/vertex-scene-tree-table-cell.entry.js.map +1 -1
- package/dist/esm/vertex-scene-tree.entry.js +2 -2
- package/dist/esm/vertex-scene-tree.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-box-query-tool.entry.js +2 -2
- package/dist/esm/vertex-viewer-box-query-tool.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-dom-element_2.entry.js +1 -1
- package/dist/esm/vertex-viewer-dom-element_2.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-dom-group.entry.js +1 -1
- package/dist/esm/vertex-viewer-dom-group.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-hit-result-indicator.entry.js +1 -1
- package/dist/esm/vertex-viewer-hit-result-indicator.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-icon.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-markup-arrow_3.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-markup-tool.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-markup.entry.js +1 -1
- package/dist/esm/vertex-viewer-markup.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-measurement-details.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-measurement-distance.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-measurement-line_2.entry.js +2 -2
- package/dist/esm/vertex-viewer-measurement-line_2.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-measurement-precise.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-pin-group.entry.js +2 -2
- package/dist/esm/vertex-viewer-pin-group.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-pin-label_2.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-pin-tool.entry.js +1 -1
- package/dist/esm/vertex-viewer-pin-tool.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-teleport-tool.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-transform-widget.entry.js +4 -5
- package/dist/esm/vertex-viewer-transform-widget.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-view-cube.entry.js +1 -1
- package/dist/esm/vertex-viewer-view-cube.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-walk-mode-tool.entry.js.map +1 -1
- package/dist/esm/vertex-viewer.entry.js +9 -5
- package/dist/esm/vertex-viewer.entry.js.map +1 -1
- package/dist/esm/viewport-C8WQZxvx.js.map +1 -1
- package/dist/types/regl-shape.d.ts +1 -1
- package/dist/viewer/index.esm.js.map +1 -1
- package/dist/viewer/{p-eac63070.entry.js → p-051b5154.entry.js} +2 -2
- package/dist/viewer/p-051b5154.entry.js.map +1 -0
- package/dist/viewer/{p-3d3a7eeb.entry.js → p-0984c51f.entry.js} +2 -2
- package/dist/viewer/{p-3d3a7eeb.entry.js.map → p-0984c51f.entry.js.map} +1 -1
- package/dist/viewer/{p-864f40c7.entry.js → p-11cf755a.entry.js} +2 -2
- package/dist/viewer/p-11cf755a.entry.js.map +1 -0
- package/dist/viewer/{p-29d14611.entry.js → p-16775f7d.entry.js} +2 -2
- package/dist/viewer/p-16775f7d.entry.js.map +1 -0
- package/dist/viewer/{p-5a85cae5.entry.js → p-1eb636f8.entry.js} +2 -2
- package/dist/viewer/p-1eb636f8.entry.js.map +1 -0
- package/dist/viewer/{p-e993f300.entry.js → p-228d1d43.entry.js} +2 -2
- package/dist/viewer/p-228d1d43.entry.js.map +1 -0
- package/dist/viewer/p-33f44cc1.entry.js.map +1 -1
- package/dist/viewer/{p-3300d3dc.entry.js → p-35601c85.entry.js} +2 -2
- package/dist/viewer/p-35601c85.entry.js.map +1 -0
- package/dist/viewer/p-47766566.entry.js.map +1 -1
- package/dist/viewer/p-6e3a6bbd.entry.js.map +1 -1
- package/dist/viewer/p-7f388b45.entry.js.map +1 -1
- package/dist/viewer/p-89544066.entry.js.map +1 -1
- package/dist/viewer/{p-07b99ac9.entry.js → p-8c369777.entry.js} +2 -2
- package/dist/viewer/p-8c369777.entry.js.map +1 -0
- package/dist/viewer/{p-e59983dc.entry.js → p-9835c5e2.entry.js} +2 -2
- package/dist/viewer/p-9835c5e2.entry.js.map +1 -0
- package/dist/viewer/{p-aa95e21a.entry.js → p-9d8ff406.entry.js} +2 -2
- package/dist/viewer/p-9d8ff406.entry.js.map +1 -0
- package/dist/viewer/p-BDvACHun.js.map +1 -1
- package/dist/viewer/p-BIkuvTVH.js.map +1 -1
- package/dist/viewer/p-BRPkbTVP.js.map +1 -1
- package/dist/viewer/p-BsBIynwj.js.map +1 -1
- package/dist/viewer/p-BxtKMwBH.js.map +1 -1
- package/dist/viewer/p-C4y4Noe-.js.map +1 -1
- package/dist/viewer/p-C6KrfydC.js.map +1 -1
- package/dist/viewer/p-C7dYsPFU.js.map +1 -1
- package/dist/viewer/p-C9Cqbq6H.js.map +1 -1
- package/dist/viewer/p-CVWO4w6b.js.map +1 -1
- package/dist/viewer/p-ChqXy0cG.js.map +1 -1
- package/dist/viewer/p-CiSHWNC4.js.map +1 -1
- package/dist/viewer/p-CjG1fMh1.js.map +1 -1
- package/dist/viewer/p-Cs5KOvOQ.js.map +1 -1
- package/dist/viewer/p-CyGlYje2.js.map +1 -1
- package/dist/viewer/p-D6eJC1q4.js.map +1 -1
- package/dist/viewer/p-DC86ZXai.js.map +1 -1
- package/dist/viewer/p-DRh4_Z-g.js.map +1 -1
- package/dist/viewer/p-DUX5FvBC.js.map +1 -1
- package/dist/viewer/p-DX6pEG54.js.map +1 -1
- package/dist/viewer/p-D_ixWHO7.js.map +1 -1
- package/dist/viewer/p-DacE-wPp.js.map +1 -1
- package/dist/viewer/p-Dp56p_jX.js.map +1 -1
- package/dist/viewer/p-EsKoKfmx.js.map +1 -1
- package/dist/viewer/p-F8e15or2.js.map +1 -1
- package/dist/viewer/p-Jfxh0jq9.js.map +1 -1
- package/dist/viewer/p-WPRMWirY.js.map +1 -1
- package/dist/viewer/p-_93RRNxT.js.map +1 -1
- package/dist/viewer/p-a8a81cba.entry.js +5 -0
- package/dist/viewer/p-a8a81cba.entry.js.map +1 -0
- package/dist/viewer/p-a9282481.entry.js.map +1 -1
- package/dist/viewer/{p-63f4f702.entry.js → p-c7e62d66.entry.js} +2 -2
- package/dist/viewer/p-c7e62d66.entry.js.map +1 -0
- package/dist/viewer/p-d37e647b.entry.js.map +1 -1
- package/dist/viewer/{p-302f2078.entry.js → p-d9fe788f.entry.js} +2 -2
- package/dist/viewer/p-d9fe788f.entry.js.map +1 -0
- package/dist/viewer/p-e9b83dae.entry.js.map +1 -1
- package/dist/viewer/{p-70f3629d.entry.js → p-f271dc4a.entry.js} +2 -2
- package/dist/viewer/p-f271dc4a.entry.js.map +1 -0
- package/dist/viewer/p-f65c0769.entry.js.map +1 -1
- package/dist/viewer/viewer.esm.js +1 -1
- package/package.json +7 -7
- package/dist/components/p-B80hfIq6.js.map +0 -1
- package/dist/components/p-BopQW1sA.js.map +0 -1
- package/dist/components/p-DNtS2F8J.js +0 -5
- package/dist/components/p-DNtS2F8J.js.map +0 -1
- package/dist/components/p-Doltf1wO.js.map +0 -1
- package/dist/components/p-b0ZzPHz8.js.map +0 -1
- package/dist/viewer/p-07b99ac9.entry.js.map +0 -1
- package/dist/viewer/p-29d14611.entry.js.map +0 -1
- package/dist/viewer/p-302f2078.entry.js.map +0 -1
- package/dist/viewer/p-3300d3dc.entry.js.map +0 -1
- package/dist/viewer/p-5a85cae5.entry.js.map +0 -1
- package/dist/viewer/p-60c915e3.entry.js +0 -5
- package/dist/viewer/p-60c915e3.entry.js.map +0 -1
- package/dist/viewer/p-63f4f702.entry.js.map +0 -1
- package/dist/viewer/p-70f3629d.entry.js.map +0 -1
- package/dist/viewer/p-864f40c7.entry.js.map +0 -1
- package/dist/viewer/p-aa95e21a.entry.js.map +0 -1
- package/dist/viewer/p-e59983dc.entry.js.map +0 -1
- package/dist/viewer/p-e993f300.entry.js.map +0 -1
- package/dist/viewer/p-eac63070.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewer-transform-widget.js","sourceRoot":"","sources":["../../../../../src/components/viewer-transform-widget/viewer-transform-widget.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2RF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport {\n Angle,\n Euler,\n Matrix4,\n Point,\n Quaternion,\n Vector3,\n} from '@vertexvis/geometry';\nimport { Color, Disposable } from '@vertexvis/utils';\nimport classNames from 'classnames';\n\nimport { readDOM, writeDOM } from '../../lib/stencil';\nimport { TransformController } from '../../lib/transforms/controller';\nimport { Drawable } from '../../lib/transforms/drawable';\nimport {\n AngleUnits,\n AngleUnitType,\n DistanceUnits,\n DistanceUnitType,\n} from '../../lib/types';\nimport { ModifierKey } from '../../lib/types/keys';\nimport { focusInputElement } from './dom';\nimport {\n calculateNewRotationAngle,\n computeHandleDeltaTransform,\n computeInputDeltaTransform,\n computeInputDisplayValue,\n computeInputPosition,\n convertCanvasPointToWorld,\n convertPointToCanvas,\n PointAndPlacement,\n} from './util';\nimport {\n TransformWidgetInput,\n TransformWidgetInputWrapper,\n} from './viewer-transform-widget-components';\nimport { TransformWidget } from './widget';\n\n@Component({\n tag: 'vertex-viewer-transform-widget',\n styleUrl: 'viewer-transform-widget.css',\n shadow: true,\n})\nexport class ViewerTransformWidget {\n /**\n * An event that is emitted when the position of the widget changes.\n */\n @Event({ bubbles: true })\n public positionChanged!: EventEmitter<Vector3.Vector3 | undefined>;\n\n /**\n * An event that is emitted when the rotation of the widget changes.\n */\n @Event({ bubbles: true })\n public rotationChanged!: EventEmitter<Euler.Euler | undefined>;\n\n /**\n * An event that is emitted when the interaction has ended\n */\n @Event({ bubbles: true })\n public interactionEnded!: EventEmitter<Matrix4.Matrix4 | undefined>;\n\n /**\n * An event that is emitted an interaction with the widget has started\n */\n @Event({ bubbles: true })\n public interactionStarted!: EventEmitter<void>;\n\n /**\n * The viewer to connect to transforms. If nested within a <vertex-viewer>,\n * this property will be populated automatically.\n */\n @Prop()\n public viewer?: HTMLVertexViewerElement;\n\n /**\n * The starting position of this transform widget. This position will be updated\n * as transforms occur. Setting this value to `undefined` will remove the widget.\n */\n @Prop({ mutable: true })\n public position?: Vector3.Vector3;\n\n /**\n * The starting angle for the transform widget. This rotation will be updated\n * as the rotations occur.\n */\n @Prop({ mutable: true })\n public rotation?: Euler.Euler;\n\n /**\n * The controller that is responsible for performing transforms.\n */\n @Prop({ mutable: true })\n public controller?: TransformController;\n\n /**\n * Determines whether the x-rotation is disabled on the widget\n */\n @Prop({ mutable: true })\n public xRotationDisabled = false;\n\n /**\n * Determines whether the y-rotation is disabled on the widget\n */\n @Prop({ mutable: true })\n public yRotationDisabled = false;\n\n /**\n * Determines whether the z-rotation is disabled on the widget\n */\n @Prop({ mutable: true })\n public zRotationDisabled = false;\n\n /**\n * Determines whether the x-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public xTranslationDisabled = false;\n\n /**\n * Determines whether the y-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public yTranslationDisabled = false;\n\n /**\n * Determines whether the z-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public zTranslationDisabled = false;\n\n /**\n * Determines whether the xy-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public xyTranslationDisabled = false;\n\n /**\n * Determines whether the xz-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public xzTranslationDisabled = false;\n\n /**\n * Determines whether the yz-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public yzTranslationDisabled = false;\n\n /**\n * Whether to show inputs beside the widget handles when they are interacted with.\n * Defaults to `true`.\n */\n @Prop()\n public showInputs = true;\n\n /**\n * The unit to show for translation inputs. Defaults to `millimeters`.\n *\n * @see DistanceUnitType\n */\n @Prop()\n public distanceUnit: DistanceUnitType = 'millimeters';\n\n /**\n * The unit to show for rotation inputs. Defaults to `degrees`.\n *\n * @see AngleUnitType\n */\n @Prop()\n public angleUnit: AngleUnitType = 'degrees';\n\n /**\n * The number of decimal places to show in the input. Defaults to `1`.\n */\n @Prop()\n public decimalPlaces = 1;\n\n /**\n * When defined, the widget will snap to the degree of the nearest multiple of\n * the given number when the user is rotating with the widget and holding the\n * key defined by rotationSnapKey. Defaults to undefined.\n */\n @Prop()\n public rotationSnapDegrees?: number;\n\n /**\n * When rotationSnapDegrees is defined, the widget will snap to the degree of the\n * nearest multiple of the given number when the user is rotating with the widget\n * and holding the key defined here. Defaults to the shift key.\n */\n @Prop()\n public rotationSnapKey: ModifierKey = 'shift';\n\n /**\n * Scalar to increase the size of the translation handles of this widget.\n * Values above zero and below three will result in the best visual representation\n * of the handles, and values above three may produce unexpected results.\n *\n * Defaults to `1`.\n */\n @Prop()\n public translationHandleScalar = 1;\n\n /**\n * Scalar to increase the size of the rotation handles of this widget.\n * Values above zero and below three will result in the best visual representation\n * of the handles, and values above three may produce unexpected results.\n *\n * Defaults to `1`.\n */\n @Prop()\n public rotationHandleScalar = 1;\n\n /**\n * Specifies the frequency, in milliseconds, to update the transform while interacting with the widget.\n *\n * This delay is used to group events happening in quick succession and results in smoother\n * widget movement.\n */\n @Prop()\n public interactionThrottle = 75;\n\n /**\n * **EXPERIMENTAL.**\n *\n * Enables Command+Z and Control+Z keybindings to perform an undo of\n * the previous delta transformation.\n *\n * @see `EXPERIMENTAL_undo`\n */\n @Prop()\n public EXPERIMENTAL_undoKeybindings = false;\n\n /**\n * @internal\n * @ignore\n *\n * Visible for testing.\n */\n @Prop({ mutable: true })\n public hovered?: Drawable;\n\n @State()\n protected inputPosition?: PointAndPlacement;\n\n @State()\n protected inputValue = 0;\n\n @State()\n protected isEndingTransform = false;\n\n @Element()\n private hostEl!: HTMLElement;\n\n private startingTransform?: Matrix4.Matrix4;\n private currentTransform?: Matrix4.Matrix4;\n private dragStartTransform?: Matrix4.Matrix4;\n\n private xArrowColor: Color.Color | string = '#ea3324';\n private yArrowColor: Color.Color | string = '#4faf32';\n private zArrowColor: Color.Color | string = '#0000ff';\n private twoAxesSquareColor: Color.Color | string = '#e0e0e0';\n private hoveredColor: Color.Color | string = '#ffff00';\n\n private widget?: TransformWidget;\n private lastDragged?: Drawable;\n private dragging?: Drawable;\n private lastAngle = 0;\n private lastWorldPosition?: Vector3.Vector3;\n private lastInputValue?: number;\n\n private canvasBounds?: DOMRect;\n private inputBounds?: DOMRect;\n private canvasResizeObserver?: ResizeObserver;\n private inputResizeObserver?: ResizeObserver;\n private hostStyleObserver?: MutationObserver;\n private canvasRef?: HTMLCanvasElement;\n private inputWrapperRef?: HTMLDivElement;\n private inputRef?: HTMLInputElement;\n private inputShouldFocus = false;\n\n private hoveredChangeDisposable?: Disposable;\n\n private interactionTimer?: number;\n private lastMouseEvent?: PointerEvent;\n\n protected componentDidLoad(): void {\n window.addEventListener('pointermove', this.handlePointerMove);\n\n this.canvasResizeObserver = new ResizeObserver(this.handleResize);\n this.inputResizeObserver = new ResizeObserver(this.handleInputResize);\n this.hostStyleObserver = new MutationObserver(this.handleStyleChange);\n\n if (this.canvasRef != null) {\n this.canvasResizeObserver.observe(this.canvasRef);\n\n this.setupTransformWidget(this.canvasRef);\n }\n\n this.hostStyleObserver.observe(this.hostEl, {\n attributes: true,\n attributeFilter: ['style'],\n });\n\n this.handleViewerChanged(this.viewer, undefined);\n this.handleStyleChange();\n }\n\n protected disconnectedCallback(): void {\n window.removeEventListener('pointermove', this.handlePointerMove);\n\n this.canvasResizeObserver?.disconnect();\n this.inputResizeObserver?.disconnect();\n this.hostStyleObserver?.disconnect();\n\n this.hoveredChangeDisposable?.dispose();\n this.widget?.dispose();\n }\n\n protected componentDidRender(): void {\n if (this.inputShouldFocus && this.inputRef != null) {\n focusInputElement(this.inputRef);\n this.inputShouldFocus = false;\n }\n }\n\n /**\n * **EXPERIMENTAL.**\n *\n * Performs an undo of the most recent set of transform manipulations,\n * categorized by the last pause in interactivity (pointerup on a handle,\n * Enter press on an input, keyup on an input).\n *\n * Note that this *does not* work repeatedly. I.e. only one undo can be\n * performed, and once another set of transform manipulations is performed,\n * the history is lost.\n */\n @Method()\n public async EXPERIMENTAL_undo(): Promise<void> {\n const undoDelta = await this.controller?.EXPERIMENTAL_undoTransform();\n\n if (this.currentTransform != null && undoDelta != null) {\n this.currentTransform = Matrix4.multiply(\n undoDelta,\n this.currentTransform\n );\n\n this.widget?.updateTransform(this.currentTransform);\n\n this.updateInputPosition();\n this.updateInputValue();\n this.lastInputValue = this.inputValue;\n\n this.position = Vector3.fromMatrixPosition(this.currentTransform);\n this.rotation = Euler.fromRotationMatrix(this.currentTransform);\n }\n }\n\n /**\n * @ignore\n */\n @Watch('viewer')\n protected handleViewerChanged(\n newViewer?: HTMLVertexViewerElement,\n oldViewer?: HTMLVertexViewerElement\n ): void {\n oldViewer?.removeEventListener('frameDrawn', this.handleViewerFrameDrawn);\n oldViewer?.removeEventListener(\n 'dimensionschange',\n this.handleViewerDimensionsChange\n );\n newViewer?.addEventListener('frameDrawn', this.handleViewerFrameDrawn);\n newViewer?.addEventListener(\n 'dimensionschange',\n this.handleViewerDimensionsChange\n );\n\n if (newViewer?.stream != null) {\n this.controller?.dispose();\n this.controller = new TransformController(newViewer.stream);\n }\n }\n\n /**\n * @ignore\n */\n @Watch('xTranslationDisabled')\n @Watch('yTranslationDisabled')\n @Watch('zTranslationDisabled')\n @Watch('xyTranslationDisabled')\n @Watch('xzTranslationDisabled')\n @Watch('yzTranslationDisabled')\n @Watch('xRotationDisabled')\n @Watch('yRotationDisabled')\n @Watch('zRotationDisabled')\n protected handleDisabledPropertyChanged(): void {\n this.widget?.updateDisabledAxis({\n xRotation: this.xRotationDisabled,\n yRotation: this.yRotationDisabled,\n zRotation: this.zRotationDisabled,\n\n xTranslation: this.xTranslationDisabled,\n yTranslation: this.yTranslationDisabled,\n zTranslation: this.zTranslationDisabled,\n\n xyTranslation: this.xyTranslationDisabled,\n xzTranslation: this.xzTranslationDisabled,\n yzTranslation: this.yzTranslationDisabled,\n });\n }\n\n /**\n * @ignore\n */\n @Watch('translationHandleScalar')\n @Watch('rotationHandleScalar')\n protected handleTransformHandleScalarChanged(): void {\n const effectiveArrowScalar = this.getTranslationScalar();\n const effectiveSquareScalar = this.getRotationScalar();\n\n this.widget?.updateScalars({\n xTranslation: effectiveArrowScalar,\n yTranslation: effectiveArrowScalar,\n zTranslation: effectiveArrowScalar,\n xyTranslation: effectiveSquareScalar,\n xzTranslation: effectiveSquareScalar,\n yzTranslation: effectiveSquareScalar,\n xRotation: effectiveSquareScalar,\n yRotation: effectiveSquareScalar,\n zRotation: effectiveSquareScalar,\n });\n }\n\n /**\n * @ignore\n */\n @Watch('rotation')\n protected handleRotationChanged(\n newRotation?: Euler.Euler,\n oldRotation?: Euler.Euler\n ): void {\n const rotationToApply = newRotation ?? Euler.create();\n\n this.currentTransform = this.getTransformForNewRotation(rotationToApply);\n this.startingTransform = this.currentTransform;\n\n // If the removal of the previous rotation above results in an identity matrix,\n // clear the transformation on the widget to prevent it from appearing at the origin.\n if (\n newRotation == null &&\n this.currentTransform != null &&\n Matrix4.isIdentity(this.currentTransform)\n ) {\n this.currentTransform = undefined;\n this.startingTransform = this.currentTransform;\n }\n\n this.widget?.updateTransform(this.currentTransform);\n\n console.debug(\n `Updating widget rotation [previous=${JSON.stringify(\n oldRotation\n )}, current=${JSON.stringify(newRotation)}]`\n );\n\n this.rotationChanged.emit(newRotation);\n }\n\n /**\n * @ignore\n */\n @Watch('position')\n protected handlePositionChanged(\n newPosition?: Vector3.Vector3,\n oldPosition?: Vector3.Vector3\n ): void {\n this.currentTransform = this.getTransformForNewPosition(newPosition);\n this.startingTransform = this.currentTransform;\n\n console.debug(\n `Updating widget position [previous=${JSON.stringify(\n oldPosition\n )}, current=${JSON.stringify(newPosition)}]`\n );\n this.widget?.updateTransform(this.currentTransform);\n\n if (newPosition == null) {\n this.lastDragged = undefined;\n this.inputPosition = undefined;\n this.controller?.clearTransform();\n }\n\n this.positionChanged.emit(newPosition);\n }\n\n /**\n * @ignore\n */\n @Watch('distanceUnit')\n @Watch('angleUnit')\n @Watch('decimalPlaces')\n protected handleInputFormattingChanged(): void {\n this.updateInputValue();\n this.lastInputValue = this.inputValue;\n }\n\n public render(): h.JSX.IntrinsicElements {\n return (\n <Host>\n <canvas\n ref={(el) => {\n this.canvasRef = el;\n }}\n class={classNames('widget', {\n hovered: this.hovered != null,\n })}\n tabindex=\"0\"\n width={this.viewer?.viewport.width}\n height={this.viewer?.viewport.height}\n onPointerDown={this.handleBeginDrag}\n onKeyDown={this.handleKeyDown}\n />\n\n {this.showInputs && this.inputPosition && this.viewer?.viewport && (\n <TransformWidgetInputWrapper\n ref={(el) => {\n if (el != null) {\n this.inputResizeObserver?.observe(el);\n } else if (this.inputWrapperRef != null) {\n this.inputResizeObserver?.unobserve(this.inputWrapperRef);\n }\n this.inputWrapperRef = el;\n }}\n bounds={this.inputBounds}\n viewport={this.viewer.viewport}\n point={this.inputPosition.point}\n placement={this.inputPosition.placement}\n displayUnit={this.getDisplayedUnits()}\n >\n <TransformWidgetInput\n ref={(el) => {\n this.inputRef = el;\n }}\n identifier={\n this.dragging?.identifier ?? this.lastDragged?.identifier\n }\n disabled={this.isEndingTransform}\n onChange={this.handleInputChange}\n onIncrement={() => this.handleInputStep(1)}\n onDecrement={() => this.handleInputStep(-1)}\n onBlur={() => {\n this.inputShouldFocus = false;\n }}\n onUndo={\n this.EXPERIMENTAL_undoKeybindings\n ? () => this.EXPERIMENTAL_undo()\n : undefined\n }\n />\n </TransformWidgetInputWrapper>\n )}\n </Host>\n );\n }\n\n private handleHoveredDrawableChanged = (drawable?: Drawable): void => {\n this.hovered = drawable;\n };\n\n private handleViewerFrameDrawn = (): void => {\n this.updatePropsFromViewer();\n };\n\n private handleViewerDimensionsChange = (): void => {\n writeDOM(() => {\n if (this.viewer != null && this.canvasRef != null) {\n this.canvasRef.width = this.viewer.viewport.width;\n this.canvasRef.height = this.viewer.viewport.height;\n\n this.updateCanvasBounds(this.canvasRef);\n }\n });\n };\n\n private handleResize = (): void => {\n if (this.canvasRef != null) {\n this.updateCanvasBounds(this.canvasRef);\n }\n };\n\n private handleInputResize = (): void => {\n if (this.inputWrapperRef != null) {\n const wrapperElement = this.inputWrapperRef;\n\n readDOM(() => {\n this.inputBounds = wrapperElement.getBoundingClientRect();\n });\n }\n };\n\n private handleStyleChange = (): void => {\n readDOM(() => {\n const hostStyles = window.getComputedStyle(this.hostEl);\n\n this.xArrowColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-x-axis-arrow-color')\n .trim();\n this.yArrowColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-y-axis-arrow-color')\n .trim();\n this.zArrowColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-z-axis-arrow-color')\n .trim();\n this.twoAxesSquareColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-two-axes-square-color')\n .trim();\n this.hoveredColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-hovered-arrow-color')\n .trim();\n\n this.getTransformWidget().updateColors({\n xArrow: this.xArrowColor,\n yArrow: this.yArrowColor,\n zArrow: this.zArrowColor,\n twoAxesSquare: this.twoAxesSquareColor,\n hovered: this.hoveredColor,\n });\n });\n };\n\n private handlePointerMove = (event: PointerEvent): void => {\n if (this.dragging == null) {\n const canvasPoint = convertPointToCanvas(\n Point.create(event.clientX, event.clientY),\n this.getCanvasBounds()\n );\n const widget = this.getTransformWidget();\n\n if (canvasPoint != null && widget.boundsContainsPoint(canvasPoint)) {\n widget.updateCursor(canvasPoint);\n } else {\n widget.updateCursor(undefined);\n this.hovered = undefined;\n }\n }\n };\n\n private handleBeginDrag = async (event: PointerEvent): Promise<void> => {\n const canvasBounds = this.getCanvasBounds();\n\n if (\n this.hovered != null &&\n canvasBounds != null &&\n this.viewer != null &&\n this.position != null &&\n this.viewer.frame != null\n ) {\n this.dragging = this.hovered;\n\n if (this.dragging.identifier !== this.lastDragged?.identifier) {\n this.inputValue = 0;\n this.dragStartTransform = this.currentTransform;\n this.updateInputPosition();\n this.updateInputValue();\n }\n this.lastDragged = undefined;\n\n const currentCanvas = convertPointToCanvas(\n Point.create(event.clientX, event.clientY),\n canvasBounds\n );\n const widgetCenter = this.viewer.viewport.transformWorldToViewport(\n this.position,\n this.viewer.frame.scene.camera.projectionViewMatrix\n );\n\n this.lastAngle =\n currentCanvas != null\n ? Angle.fromPoints(widgetCenter, currentCanvas)\n : 0;\n\n this.lastWorldPosition = convertCanvasPointToWorld(\n currentCanvas,\n this.viewer?.frame,\n this.viewer?.viewport,\n this.currentTransform\n );\n\n this.interactionStarted.emit();\n\n window.removeEventListener('pointermove', this.handlePointerMove);\n window.addEventListener('pointermove', this.handleDragWithTimer);\n window.addEventListener('pointerup', this.handleEndTransform);\n }\n };\n\n private handleDragWithTimer = async (event: PointerEvent): Promise<void> => {\n if (event != null) {\n // Prevent selection of text and interaction with view cube while dragging the widget\n event.preventDefault();\n\n this.lastMouseEvent = event;\n }\n\n if (this.interactionTimer == null) {\n this.interactionTimer = window.setTimeout(async () => {\n this.interactionTimer = undefined;\n await this.handleDrag();\n this.lastMouseEvent = undefined;\n }, this.interactionThrottle);\n }\n };\n\n private handleDrag = async (): Promise<void> => {\n const canvasBounds = this.getCanvasBounds();\n\n if (\n this.dragging != null &&\n this.lastWorldPosition != null &&\n canvasBounds != null &&\n this.viewer != null &&\n this.viewer.frame != null &&\n this.position != null &&\n this.lastMouseEvent != null\n ) {\n // Begin the transform on the first `pointermove` event as opposed to the\n // `pointerdown` to prevent accidental no-op transforms (identity matrix).\n await this.controller?.beginTransform();\n\n const currentCanvas = convertPointToCanvas(\n Point.create(this.lastMouseEvent.clientX, this.lastMouseEvent.clientY),\n canvasBounds\n );\n const widgetCenter = this.viewer.viewport.transformWorldToViewport(\n this.position,\n this.viewer.frame.scene.camera.projectionViewMatrix\n );\n\n const currentWorld = convertCanvasPointToWorld(\n currentCanvas,\n this.viewer?.frame,\n this.viewer?.viewport,\n this.currentTransform\n );\n\n if (\n currentWorld != null &&\n currentCanvas != null &&\n widgetCenter != null\n ) {\n const angle = Angle.fromPoints(widgetCenter, currentCanvas);\n const angleToUse = calculateNewRotationAngle(\n this.lastMouseEvent,\n this.rotationSnapKey,\n angle,\n this.lastAngle,\n this.getDisplayedAngle(),\n this.rotationSnapDegrees\n );\n\n this.transform(\n this.lastWorldPosition,\n currentWorld,\n angleToUse - this.lastAngle\n );\n\n this.updateInputPosition();\n this.updateInputValue();\n\n this.lastWorldPosition = currentWorld;\n this.lastAngle = angleToUse;\n }\n }\n };\n\n private handleEndTransform = async (event: PointerEvent): Promise<void> => {\n const canvasPoint = convertPointToCanvas(\n Point.create(event.clientX, event.clientY),\n this.getCanvasBounds()\n );\n const widget = this.getTransformWidget();\n this.lastDragged = this.dragging;\n\n this.dragging = undefined;\n this.lastWorldPosition = undefined;\n this.lastAngle = 0;\n\n this.updateInputPosition();\n this.updateInputValue();\n\n widget.updateCursor(canvasPoint);\n widget.updateTransform(this.currentTransform);\n\n this.beginEndTransform();\n\n window.removeEventListener('pointermove', this.handleDragWithTimer);\n window.removeEventListener('pointerup', this.handleEndTransform);\n\n try {\n const delta = this.controller?.getCurrentDelta();\n\n await this.controller?.endTransform();\n\n this.interactionEnded.emit(delta);\n } catch (e) {\n console.error('Failed to end transform interaction', e);\n }\n\n window.addEventListener('pointermove', this.handlePointerMove);\n\n this.completeEndTransform();\n };\n\n private handleInputStep = async (step: number): Promise<void> => {\n if (this.inputValue != null && this.lastInputValue != null) {\n // If modifying angle units, we want to adjust the step to always\n // perform the equivalent of a 1 degree rotation.\n if (this.isModifyingAngleUnits()) {\n const angles = new AngleUnits(this.angleUnit);\n const previous = angles.convertFrom(this.lastInputValue);\n const next = Angle.normalizeRadians(previous + Angle.toRadians(step));\n\n this.inputValue = angles.convertTo(next);\n } else {\n this.inputValue = this.lastInputValue + step;\n }\n await this.updateTransformFromInput(this.inputValue);\n }\n };\n\n private handleInputChange = async (value: number): Promise<void> => {\n await this.updateTransformFromInput(value);\n };\n\n private handleKeyDown = async (event: KeyboardEvent): Promise<void> => {\n const commandOrControlModifier = event.ctrlKey || event.metaKey;\n\n if (\n event.key === 'z' &&\n commandOrControlModifier &&\n this.EXPERIMENTAL_undoKeybindings\n ) {\n event.stopPropagation();\n await this.EXPERIMENTAL_undo();\n }\n };\n\n private updateTransformFromInput = async (value: number): Promise<void> => {\n if (\n this.lastDragged != null &&\n this.currentTransform != null &&\n this.startingTransform != null &&\n this.lastInputValue != null\n ) {\n this.currentTransform = computeInputDeltaTransform(\n this.currentTransform,\n this.lastDragged.identifier,\n value,\n this.lastInputValue,\n this.distanceUnit,\n this.angleUnit\n );\n\n this.updateInputValue();\n this.lastInputValue = value;\n\n await this.controller?.beginTransform();\n this.getTransformWidget().updateTransform(this.currentTransform);\n await this.controller?.updateTransform(\n Matrix4.multiply(\n this.currentTransform,\n Matrix4.invert(this.startingTransform)\n )\n );\n this.updateInputPosition();\n await this.controller?.endTransformDebounced(\n this.beginEndTransform,\n this.completeEndTransform\n );\n }\n };\n\n private updatePropsFromViewer = (): void => {\n const { frame } = this.viewer || {};\n\n if (frame != null) {\n const widget = this.getTransformWidget();\n\n widget.updateFrame(frame, this.dragging == null);\n this.updateInputPosition();\n }\n };\n\n private transform(\n previous: Vector3.Vector3,\n next: Vector3.Vector3,\n angle: number\n ): void {\n if (\n this.position != null &&\n this.startingTransform != null &&\n this.currentTransform != null &&\n this.dragging != null &&\n this.viewer != null &&\n this.viewer.frame != null\n ) {\n this.currentTransform = computeHandleDeltaTransform(\n this.currentTransform,\n previous,\n next,\n this.viewer?.frame.scene.camera.viewVector,\n angle,\n this.dragging.identifier\n );\n\n this.getTransformWidget().updateTransform(this.currentTransform);\n this.controller?.updateTransform(\n Matrix4.multiply(\n this.currentTransform,\n Matrix4.invert(this.startingTransform)\n )\n );\n }\n }\n\n private handleSettingDisabledAxis(): void {\n if (this.widget) {\n this.widget.updateDisabledAxis({\n xRotation: this.xRotationDisabled,\n yRotation: this.yRotationDisabled,\n zRotation: this.zRotationDisabled,\n xTranslation: this.xTranslationDisabled,\n yTranslation: this.yTranslationDisabled,\n zTranslation: this.zTranslationDisabled,\n xyTranslation: this.xyTranslationDisabled,\n xzTranslation: this.xzTranslationDisabled,\n yzTranslation: this.yzTranslationDisabled,\n });\n } else {\n console.warn('Cannot set disabled values - no widget defined');\n }\n }\n\n private setupTransformWidget = (\n canvasRef: HTMLCanvasElement\n ): TransformWidget => {\n console.debug(\n `Initializing transform widget. [initial-position=${JSON.stringify(\n this.position\n )}, has-initial-frame=${this.viewer?.frame != null}]`\n );\n\n const effectiveArrowScalar = this.getTranslationScalar();\n const effectiveSquareScalar = this.getRotationScalar();\n\n this.widget = new TransformWidget(canvasRef, {\n colors: {\n xArrow: this.xArrowColor,\n yArrow: this.yArrowColor,\n zArrow: this.zArrowColor,\n twoAxesSquare: this.twoAxesSquareColor,\n hovered: this.hoveredColor,\n },\n scalars: {\n xTranslation: effectiveArrowScalar,\n yTranslation: effectiveArrowScalar,\n zTranslation: effectiveArrowScalar,\n xyTranslation: effectiveSquareScalar,\n xzTranslation: effectiveSquareScalar,\n yzTranslation: effectiveSquareScalar,\n xRotation: effectiveSquareScalar,\n yRotation: effectiveSquareScalar,\n zRotation: effectiveSquareScalar,\n },\n });\n\n if (this.rotation != null) {\n this.currentTransform = this.getTransformForNewRotation(this.rotation);\n this.startingTransform = this.currentTransform;\n this.widget.updateTransform(this.currentTransform);\n }\n\n if (this.position != null) {\n this.currentTransform = this.getTransformForNewPosition(this.position);\n this.startingTransform = this.currentTransform;\n this.widget.updateTransform(this.currentTransform);\n }\n if (this.viewer?.frame != null) {\n this.widget.updateFrame(this.viewer.frame, true);\n }\n\n this.handleSettingDisabledAxis();\n\n this.hoveredChangeDisposable = this.widget.onHoveredChanged(\n this.handleHoveredDrawableChanged\n );\n\n return this.widget;\n };\n\n private updateCanvasBounds = (canvasElement: HTMLCanvasElement): void => {\n readDOM(() => {\n this.canvasBounds = canvasElement.getBoundingClientRect();\n\n this.getTransformWidget().updateDimensions(canvasElement);\n });\n };\n\n private updateInputValue = (): void => {\n const dragging = this.dragging ?? this.lastDragged;\n const isDraggingTwoAxesTranslation =\n dragging?.identifier === 'xy-translate' ||\n dragging?.identifier === 'xz-translate' ||\n dragging?.identifier === 'yz-translate';\n\n if (\n dragging != null &&\n this.currentTransform != null &&\n this.dragStartTransform != null &&\n !isDraggingTwoAxesTranslation\n ) {\n this.lastInputValue = this.inputValue;\n\n this.inputValue = computeInputDisplayValue(\n dragging.identifier,\n this.currentTransform,\n this.dragStartTransform,\n this.distanceUnit,\n this.angleUnit\n );\n\n if (this.inputRef != null) {\n const definedValue =\n this.getDisplayedDistance() ?? this.getDisplayedAngle() ?? 0;\n const displayValue = `${parseFloat(\n definedValue.toFixed(this.decimalPlaces)\n )}`;\n\n this.inputRef.value = displayValue;\n }\n }\n };\n\n private updateInputPosition = (): void => {\n const dragging = this.dragging ?? this.lastDragged;\n\n const isDraggingTwoAxesTranslation =\n dragging?.identifier === 'xy-translate' ||\n dragging?.identifier === 'xz-translate' ||\n dragging?.identifier === 'yz-translate';\n\n if (\n this.showInputs &&\n this.viewer?.frame != null &&\n this.position != null &&\n dragging != null &&\n !isDraggingTwoAxesTranslation\n ) {\n const widget = this.getTransformWidget();\n const widgetBounds = widget.getFullBounds();\n\n this.inputPosition =\n widgetBounds != null\n ? computeInputPosition(\n this.viewer.viewport,\n widgetBounds,\n dragging.points.toArray()\n )\n : undefined;\n } else if (isDraggingTwoAxesTranslation) {\n this.inputPosition = undefined;\n }\n };\n\n private beginEndTransform = (): void => {\n const widget = this.getTransformWidget();\n\n widget.updateDisabledAxis({\n xRotation: true,\n yRotation: true,\n zRotation: true,\n xTranslation: true,\n yTranslation: true,\n zTranslation: true,\n xyTranslation: true,\n xzTranslation: true,\n yzTranslation: true,\n });\n\n this.isEndingTransform = true;\n };\n\n private completeEndTransform = (): void => {\n const widget = this.getTransformWidget();\n\n widget.updateDisabledAxis({\n xRotation: this.xRotationDisabled,\n yRotation: this.yRotationDisabled,\n zRotation: this.zRotationDisabled,\n\n xTranslation: this.xTranslationDisabled,\n yTranslation: this.yTranslationDisabled,\n zTranslation: this.zTranslationDisabled,\n\n xyTranslation: this.xyTranslationDisabled,\n xzTranslation: this.xzTranslationDisabled,\n yzTranslation: this.yzTranslationDisabled,\n });\n\n this.isEndingTransform = false;\n this.inputShouldFocus = true;\n\n if (this.currentTransform != null) {\n this.position = Vector3.fromMatrixPosition(this.currentTransform);\n this.rotation = Euler.fromRotationMatrix(this.currentTransform);\n }\n };\n\n private isModifyingAngleUnits = (): boolean => {\n const draggingIdentifier =\n this.dragging?.identifier ?? this.lastDragged?.identifier;\n\n return !!draggingIdentifier?.includes('rotate');\n };\n\n private getTranslationScalar = (): number => {\n if (this.translationHandleScalar > 0) {\n return this.translationHandleScalar;\n }\n console.warn(\n 'Invalid value provided for translation-handle-scalar. Expected a positive value greater than zero.'\n );\n return 1;\n };\n\n private getRotationScalar = (): number => {\n if (this.rotationHandleScalar > 0) {\n return this.rotationHandleScalar;\n }\n console.warn(\n 'Invalid value provided for rotation-handle-scalar. Expected a positive value greater than zero.'\n );\n return 1;\n };\n\n private getDisplayedUnits = (): AngleUnits | DistanceUnits => {\n if (this.isModifyingAngleUnits()) {\n return new AngleUnits(this.angleUnit);\n }\n return new DistanceUnits(this.distanceUnit);\n };\n\n private getDisplayedAngle = (): number | undefined => {\n if (this.isModifyingAngleUnits()) {\n return this.inputValue;\n }\n };\n\n private getDisplayedDistance = (): number | undefined => {\n const draggingIdentifier =\n this.dragging?.identifier ?? this.lastDragged?.identifier;\n if (draggingIdentifier?.includes('translate')) {\n return this.inputValue;\n }\n };\n\n private getTransformForNewPosition = (\n newPosition?: Vector3.Vector3\n ): Matrix4.Matrix4 | undefined => {\n if (newPosition != null) {\n const c =\n this.currentTransform != null\n ? this.currentTransform\n : Matrix4.makeIdentity();\n\n const currentRotation = Matrix4.makeRotation(\n Quaternion.fromMatrixRotation(c)\n );\n const position = Matrix4.makeTranslation(newPosition);\n\n return Matrix4.multiply(position, currentRotation);\n }\n };\n\n private getTransformForNewRotation = (\n newRotationEuler: Euler.Euler\n ): Matrix4.Matrix4 | undefined => {\n const c =\n this.currentTransform != null\n ? this.currentTransform\n : Matrix4.makeIdentity();\n\n const oldRotation = Matrix4.invert(\n Matrix4.makeRotation(Quaternion.fromMatrixRotation(c))\n );\n\n const newRotation = Matrix4.makeRotation(\n Quaternion.fromEuler(newRotationEuler)\n );\n const oldTranslation = Matrix4.multiply(c, oldRotation);\n\n return Matrix4.multiply(oldTranslation, newRotation);\n };\n\n private getCanvasBounds = (): DOMRect | undefined => {\n if (this.canvasBounds != null) {\n return this.canvasBounds;\n } else if (this.canvasRef != null) {\n this.updateCanvasBounds(this.canvasRef);\n return this.canvasBounds;\n }\n };\n\n private getTransformWidget = (): TransformWidget => {\n if (this.widget == null && this.canvasRef != null) {\n return this.setupTransformWidget(this.canvasRef);\n } else if (this.widget != null) {\n return this.widget;\n } else {\n throw new Error(\n 'Transform widget was not initialized. The canvas element may not have been initialized.'\n );\n }\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"viewer-transform-widget.js","sourceRoot":"","sources":["../../../../../src/components/viewer-transform-widget/viewer-transform-widget.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,EACL,KAAK,EACL,OAAO,EACP,KAAK,EACL,UAAU,EACV,OAAO,GACR,MAAM,qBAAqB,CAAC;AAE7B,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EACL,UAAU,EAEV,aAAa,GAEd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,iBAAiB,EAAE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,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyRF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport {\n Angle,\n Euler,\n Matrix4,\n Point,\n Quaternion,\n Vector3,\n} from '@vertexvis/geometry';\nimport { Color, Disposable } from '@vertexvis/utils';\nimport classNames from 'classnames';\n\nimport { readDOM, writeDOM } from '../../lib/stencil';\nimport { TransformController } from '../../lib/transforms/controller';\nimport { Drawable } from '../../lib/transforms/drawable';\nimport {\n AngleUnits,\n AngleUnitType,\n DistanceUnits,\n DistanceUnitType,\n} from '../../lib/types';\nimport { ModifierKey } from '../../lib/types/keys';\nimport { focusInputElement } from './dom';\nimport {\n calculateNewRotationAngle,\n computeHandleDeltaTransform,\n computeInputDeltaTransform,\n computeInputDisplayValue,\n computeInputPosition,\n convertCanvasPointToWorld,\n convertPointToCanvas,\n PointAndPlacement,\n} from './util';\nimport {\n TransformWidgetInput,\n TransformWidgetInputWrapper,\n} from './viewer-transform-widget-components';\nimport { TransformWidget } from './widget';\n\n@Component({\n tag: 'vertex-viewer-transform-widget',\n styleUrl: 'viewer-transform-widget.css',\n shadow: true,\n})\nexport class ViewerTransformWidget {\n /**\n * An event that is emitted when the position of the widget changes.\n */\n @Event({ bubbles: true })\n public positionChanged!: EventEmitter<Vector3.Vector3 | undefined>;\n\n /**\n * An event that is emitted when the rotation of the widget changes.\n */\n @Event({ bubbles: true })\n public rotationChanged!: EventEmitter<Euler.Euler | undefined>;\n\n /**\n * An event that is emitted when the interaction has ended\n */\n @Event({ bubbles: true })\n public interactionEnded!: EventEmitter<Matrix4.Matrix4 | undefined>;\n\n /**\n * An event that is emitted an interaction with the widget has started\n */\n @Event({ bubbles: true })\n public interactionStarted!: EventEmitter<void>;\n\n /**\n * The viewer to connect to transforms. If nested within a <vertex-viewer>,\n * this property will be populated automatically.\n */\n @Prop()\n public viewer?: HTMLVertexViewerElement;\n\n /**\n * The starting position of this transform widget. This position will be updated\n * as transforms occur. Setting this value to `undefined` will remove the widget.\n */\n @Prop({ mutable: true })\n public position?: Vector3.Vector3;\n\n /**\n * The starting angle for the transform widget. This rotation will be updated\n * as the rotations occur.\n */\n @Prop({ mutable: true })\n public rotation?: Euler.Euler;\n\n /**\n * The controller that is responsible for performing transforms.\n */\n @Prop({ mutable: true })\n public controller?: TransformController;\n\n /**\n * Determines whether the x-rotation is disabled on the widget\n */\n @Prop({ mutable: true })\n public xRotationDisabled = false;\n\n /**\n * Determines whether the y-rotation is disabled on the widget\n */\n @Prop({ mutable: true })\n public yRotationDisabled = false;\n\n /**\n * Determines whether the z-rotation is disabled on the widget\n */\n @Prop({ mutable: true })\n public zRotationDisabled = false;\n\n /**\n * Determines whether the x-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public xTranslationDisabled = false;\n\n /**\n * Determines whether the y-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public yTranslationDisabled = false;\n\n /**\n * Determines whether the z-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public zTranslationDisabled = false;\n\n /**\n * Determines whether the xy-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public xyTranslationDisabled = false;\n\n /**\n * Determines whether the xz-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public xzTranslationDisabled = false;\n\n /**\n * Determines whether the yz-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public yzTranslationDisabled = false;\n\n /**\n * Whether to show inputs beside the widget handles when they are interacted with.\n * Defaults to `true`.\n */\n @Prop()\n public showInputs = true;\n\n /**\n * The unit to show for translation inputs. Defaults to `millimeters`.\n *\n * @see DistanceUnitType\n */\n @Prop()\n public distanceUnit: DistanceUnitType = 'millimeters';\n\n /**\n * The unit to show for rotation inputs. Defaults to `degrees`.\n *\n * @see AngleUnitType\n */\n @Prop()\n public angleUnit: AngleUnitType = 'degrees';\n\n /**\n * The number of decimal places to show in the input. Defaults to `1`.\n */\n @Prop()\n public decimalPlaces = 1;\n\n /**\n * When defined, the widget will snap to the degree of the nearest multiple of\n * the given number when the user is rotating with the widget and holding the\n * key defined by rotationSnapKey. Defaults to undefined.\n */\n @Prop()\n public rotationSnapDegrees?: number;\n\n /**\n * When rotationSnapDegrees is defined, the widget will snap to the degree of the\n * nearest multiple of the given number when the user is rotating with the widget\n * and holding the key defined here. Defaults to the shift key.\n */\n @Prop()\n public rotationSnapKey: ModifierKey = 'shift';\n\n /**\n * Scalar to increase the size of the translation handles of this widget.\n * Values above zero and below three will result in the best visual representation\n * of the handles, and values above three may produce unexpected results.\n *\n * Defaults to `1`.\n */\n @Prop()\n public translationHandleScalar = 1;\n\n /**\n * Scalar to increase the size of the rotation handles of this widget.\n * Values above zero and below three will result in the best visual representation\n * of the handles, and values above three may produce unexpected results.\n *\n * Defaults to `1`.\n */\n @Prop()\n public rotationHandleScalar = 1;\n\n /**\n * Specifies the frequency, in milliseconds, to update the transform while interacting with the widget.\n *\n * This delay is used to group events happening in quick succession and results in smoother\n * widget movement.\n */\n @Prop()\n public interactionThrottle = 75;\n\n /**\n * **EXPERIMENTAL.**\n *\n * Enables Command+Z and Control+Z keybindings to perform an undo of\n * the previous delta transformation.\n *\n * @see `EXPERIMENTAL_undo`\n */\n @Prop()\n public EXPERIMENTAL_undoKeybindings = false;\n\n /**\n * @internal\n * @ignore\n *\n * Visible for testing.\n */\n @Prop({ mutable: true })\n public hovered?: Drawable;\n\n @State()\n protected inputPosition?: PointAndPlacement;\n\n @State()\n protected inputValue = 0;\n\n @State()\n protected isEndingTransform = false;\n\n @Element()\n private hostEl!: HTMLElement;\n\n private startingTransform?: Matrix4.Matrix4;\n private currentTransform?: Matrix4.Matrix4;\n private dragStartTransform?: Matrix4.Matrix4;\n\n private xArrowColor: Color.Color | string = '#ea3324';\n private yArrowColor: Color.Color | string = '#4faf32';\n private zArrowColor: Color.Color | string = '#0000ff';\n private twoAxesSquareColor: Color.Color | string = '#e0e0e0';\n private hoveredColor: Color.Color | string = '#ffff00';\n\n private widget?: TransformWidget;\n private lastDragged?: Drawable;\n private dragging?: Drawable;\n private lastAngle = 0;\n private lastWorldPosition?: Vector3.Vector3;\n private lastInputValue?: number;\n\n private canvasBounds?: DOMRect;\n private inputBounds?: DOMRect;\n private canvasResizeObserver?: ResizeObserver;\n private inputResizeObserver?: ResizeObserver;\n private hostStyleObserver?: MutationObserver;\n private canvasRef?: HTMLCanvasElement;\n private inputWrapperRef?: HTMLDivElement;\n private inputRef?: HTMLInputElement;\n private inputShouldFocus = false;\n\n private hoveredChangeDisposable?: Disposable;\n\n private interactionTimer?: number;\n private lastMouseEvent?: PointerEvent;\n\n protected componentDidLoad(): void {\n window.addEventListener('pointermove', this.handlePointerMove);\n\n this.canvasResizeObserver = new ResizeObserver(this.handleResize);\n this.inputResizeObserver = new ResizeObserver(this.handleInputResize);\n this.hostStyleObserver = new MutationObserver(this.handleStyleChange);\n\n if (this.canvasRef != null) {\n this.canvasResizeObserver.observe(this.canvasRef);\n\n this.setupTransformWidget(this.canvasRef);\n }\n\n this.hostStyleObserver.observe(this.hostEl, {\n attributes: true,\n attributeFilter: ['style'],\n });\n\n this.handleViewerChanged(this.viewer, undefined);\n this.handleStyleChange();\n }\n\n protected disconnectedCallback(): void {\n window.removeEventListener('pointermove', this.handlePointerMove);\n\n this.canvasResizeObserver?.disconnect();\n this.inputResizeObserver?.disconnect();\n this.hostStyleObserver?.disconnect();\n\n this.hoveredChangeDisposable?.dispose();\n this.widget?.dispose();\n }\n\n protected componentDidRender(): void {\n if (this.inputShouldFocus && this.inputRef != null) {\n focusInputElement(this.inputRef);\n this.inputShouldFocus = false;\n }\n }\n\n /**\n * **EXPERIMENTAL.**\n *\n * Performs an undo of the most recent set of transform manipulations,\n * categorized by the last pause in interactivity (pointerup on a handle,\n * Enter press on an input, keyup on an input).\n *\n * Note that this *does not* work repeatedly. I.e. only one undo can be\n * performed, and once another set of transform manipulations is performed,\n * the history is lost.\n */\n @Method()\n public async EXPERIMENTAL_undo(): Promise<void> {\n const undoDelta = await this.controller?.EXPERIMENTAL_undoTransform();\n\n if (this.currentTransform != null && undoDelta != null) {\n this.currentTransform = Matrix4.multiply(\n undoDelta,\n this.currentTransform,\n );\n\n this.widget?.updateTransform(this.currentTransform);\n\n this.updateInputPosition();\n this.updateInputValue();\n this.lastInputValue = this.inputValue;\n\n this.position = Vector3.fromMatrixPosition(this.currentTransform);\n this.rotation = Euler.fromRotationMatrix(this.currentTransform);\n }\n }\n\n /**\n * @ignore\n */\n @Watch('viewer')\n protected handleViewerChanged(\n newViewer?: HTMLVertexViewerElement,\n oldViewer?: HTMLVertexViewerElement,\n ): void {\n oldViewer?.removeEventListener('frameDrawn', this.handleViewerFrameDrawn);\n oldViewer?.removeEventListener(\n 'dimensionschange',\n this.handleViewerDimensionsChange,\n );\n newViewer?.addEventListener('frameDrawn', this.handleViewerFrameDrawn);\n newViewer?.addEventListener(\n 'dimensionschange',\n this.handleViewerDimensionsChange,\n );\n\n if (newViewer?.stream != null) {\n this.controller?.dispose();\n this.controller = new TransformController(newViewer.stream);\n }\n }\n\n /**\n * @ignore\n */\n @Watch('xTranslationDisabled')\n @Watch('yTranslationDisabled')\n @Watch('zTranslationDisabled')\n @Watch('xyTranslationDisabled')\n @Watch('xzTranslationDisabled')\n @Watch('yzTranslationDisabled')\n @Watch('xRotationDisabled')\n @Watch('yRotationDisabled')\n @Watch('zRotationDisabled')\n protected handleDisabledPropertyChanged(): void {\n this.widget?.updateDisabledAxis({\n xRotation: this.xRotationDisabled,\n yRotation: this.yRotationDisabled,\n zRotation: this.zRotationDisabled,\n\n xTranslation: this.xTranslationDisabled,\n yTranslation: this.yTranslationDisabled,\n zTranslation: this.zTranslationDisabled,\n\n xyTranslation: this.xyTranslationDisabled,\n xzTranslation: this.xzTranslationDisabled,\n yzTranslation: this.yzTranslationDisabled,\n });\n }\n\n /**\n * @ignore\n */\n @Watch('translationHandleScalar')\n @Watch('rotationHandleScalar')\n protected handleTransformHandleScalarChanged(): void {\n const effectiveArrowScalar = this.getTranslationScalar();\n const effectiveSquareScalar = this.getRotationScalar();\n\n this.widget?.updateScalars({\n xTranslation: effectiveArrowScalar,\n yTranslation: effectiveArrowScalar,\n zTranslation: effectiveArrowScalar,\n xyTranslation: effectiveSquareScalar,\n xzTranslation: effectiveSquareScalar,\n yzTranslation: effectiveSquareScalar,\n xRotation: effectiveSquareScalar,\n yRotation: effectiveSquareScalar,\n zRotation: effectiveSquareScalar,\n });\n }\n\n /**\n * @ignore\n */\n @Watch('rotation')\n protected handleRotationChanged(\n newRotation?: Euler.Euler,\n oldRotation?: Euler.Euler,\n ): void {\n const rotationToApply = newRotation ?? Euler.create();\n\n this.currentTransform = this.getTransformForNewRotation(rotationToApply);\n this.startingTransform = this.currentTransform;\n\n // If the removal of the previous rotation above results in an identity matrix,\n // clear the transformation on the widget to prevent it from appearing at the origin.\n if (\n newRotation == null &&\n this.currentTransform != null &&\n Matrix4.isIdentity(this.currentTransform)\n ) {\n this.currentTransform = undefined;\n this.startingTransform = this.currentTransform;\n }\n\n this.widget?.updateTransform(this.currentTransform);\n\n console.debug(\n `Updating widget rotation [previous=${JSON.stringify(\n oldRotation,\n )}, current=${JSON.stringify(newRotation)}]`,\n );\n\n this.rotationChanged.emit(newRotation);\n }\n\n /**\n * @ignore\n */\n @Watch('position')\n protected handlePositionChanged(\n newPosition?: Vector3.Vector3,\n oldPosition?: Vector3.Vector3,\n ): void {\n this.currentTransform = this.getTransformForNewPosition(newPosition);\n this.startingTransform = this.currentTransform;\n\n console.debug(\n `Updating widget position [previous=${JSON.stringify(\n oldPosition,\n )}, current=${JSON.stringify(newPosition)}]`,\n );\n this.widget?.updateTransform(this.currentTransform);\n\n if (newPosition == null) {\n this.lastDragged = undefined;\n this.inputPosition = undefined;\n this.controller?.clearTransform();\n }\n\n this.positionChanged.emit(newPosition);\n }\n\n /**\n * @ignore\n */\n @Watch('distanceUnit')\n @Watch('angleUnit')\n @Watch('decimalPlaces')\n protected handleInputFormattingChanged(): void {\n this.updateInputValue();\n this.lastInputValue = this.inputValue;\n }\n\n public render(): h.JSX.IntrinsicElements {\n return (\n <Host>\n <canvas\n ref={(el) => {\n this.canvasRef = el;\n }}\n class={classNames('widget', {\n hovered: this.hovered != null,\n })}\n tabindex=\"0\"\n width={this.viewer?.viewport.width}\n height={this.viewer?.viewport.height}\n onPointerDown={this.handleBeginDrag}\n onKeyDown={this.handleKeyDown}\n />\n\n {this.showInputs && this.inputPosition && this.viewer?.viewport && (\n <TransformWidgetInputWrapper\n ref={(el) => {\n if (el != null) {\n this.inputResizeObserver?.observe(el);\n } else if (this.inputWrapperRef != null) {\n this.inputResizeObserver?.unobserve(this.inputWrapperRef);\n }\n this.inputWrapperRef = el;\n }}\n bounds={this.inputBounds}\n viewport={this.viewer.viewport}\n point={this.inputPosition.point}\n placement={this.inputPosition.placement}\n displayUnit={this.getDisplayedUnits()}\n >\n <TransformWidgetInput\n ref={(el) => {\n this.inputRef = el;\n }}\n identifier={\n this.dragging?.identifier ?? this.lastDragged?.identifier\n }\n disabled={this.isEndingTransform}\n onChange={this.handleInputChange}\n onIncrement={() => this.handleInputStep(1)}\n onDecrement={() => this.handleInputStep(-1)}\n onBlur={() => {\n this.inputShouldFocus = false;\n }}\n onUndo={\n this.EXPERIMENTAL_undoKeybindings\n ? () => this.EXPERIMENTAL_undo()\n : undefined\n }\n />\n </TransformWidgetInputWrapper>\n )}\n </Host>\n );\n }\n\n private handleHoveredDrawableChanged = (drawable?: Drawable): void => {\n this.hovered = drawable;\n };\n\n private handleViewerFrameDrawn = (): void => {\n this.updatePropsFromViewer();\n };\n\n private handleViewerDimensionsChange = (): void => {\n writeDOM(() => {\n if (this.viewer != null && this.canvasRef != null) {\n this.canvasRef.width = this.viewer.viewport.width;\n this.canvasRef.height = this.viewer.viewport.height;\n\n this.updateCanvasBounds(this.canvasRef);\n }\n });\n };\n\n private handleResize = (): void => {\n if (this.canvasRef != null) {\n this.updateCanvasBounds(this.canvasRef);\n }\n };\n\n private handleInputResize = (): void => {\n if (this.inputWrapperRef != null) {\n const wrapperElement = this.inputWrapperRef;\n\n readDOM(() => {\n this.inputBounds = wrapperElement.getBoundingClientRect();\n });\n }\n };\n\n private handleStyleChange = (): void => {\n readDOM(() => {\n const hostStyles = window.getComputedStyle(this.hostEl);\n\n this.xArrowColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-x-axis-arrow-color')\n .trim();\n this.yArrowColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-y-axis-arrow-color')\n .trim();\n this.zArrowColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-z-axis-arrow-color')\n .trim();\n this.twoAxesSquareColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-two-axes-square-color')\n .trim();\n this.hoveredColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-hovered-arrow-color')\n .trim();\n\n this.getTransformWidget().updateColors({\n xArrow: this.xArrowColor,\n yArrow: this.yArrowColor,\n zArrow: this.zArrowColor,\n twoAxesSquare: this.twoAxesSquareColor,\n hovered: this.hoveredColor,\n });\n });\n };\n\n private handlePointerMove = (event: PointerEvent): void => {\n if (this.dragging == null) {\n const canvasPoint = convertPointToCanvas(\n Point.create(event.clientX, event.clientY),\n this.getCanvasBounds(),\n );\n const widget = this.getTransformWidget();\n\n if (canvasPoint != null && widget.boundsContainsPoint(canvasPoint)) {\n widget.updateCursor(canvasPoint);\n } else {\n widget.updateCursor(undefined);\n this.hovered = undefined;\n }\n }\n };\n\n private handleBeginDrag = async (event: PointerEvent): Promise<void> => {\n const canvasBounds = this.getCanvasBounds();\n\n if (\n this.hovered != null &&\n canvasBounds != null &&\n this.viewer != null &&\n this.position != null &&\n this.viewer.frame != null\n ) {\n this.dragging = this.hovered;\n\n if (this.dragging.identifier !== this.lastDragged?.identifier) {\n this.inputValue = 0;\n this.dragStartTransform = this.currentTransform;\n this.updateInputPosition();\n this.updateInputValue();\n }\n this.lastDragged = undefined;\n\n const currentCanvas = convertPointToCanvas(\n Point.create(event.clientX, event.clientY),\n canvasBounds,\n );\n const widgetCenter = this.viewer.viewport.transformWorldToViewport(\n this.position,\n this.viewer.frame.scene.camera.projectionViewMatrix,\n );\n\n this.lastAngle =\n currentCanvas != null\n ? Angle.fromPoints(widgetCenter, currentCanvas)\n : 0;\n\n this.lastWorldPosition = convertCanvasPointToWorld(\n currentCanvas,\n this.viewer?.frame,\n this.viewer?.viewport,\n this.currentTransform,\n );\n\n this.interactionStarted.emit();\n\n window.removeEventListener('pointermove', this.handlePointerMove);\n window.addEventListener('pointermove', this.handleDragWithTimer);\n window.addEventListener('pointerup', this.handleEndTransform);\n }\n };\n\n private handleDragWithTimer = async (event: PointerEvent): Promise<void> => {\n if (event != null) {\n // Prevent selection of text and interaction with view cube while dragging the widget\n event.preventDefault();\n\n this.lastMouseEvent = event;\n }\n\n if (this.interactionTimer == null) {\n this.interactionTimer = window.setTimeout(async () => {\n this.interactionTimer = undefined;\n await this.handleDrag();\n this.lastMouseEvent = undefined;\n }, this.interactionThrottle);\n }\n };\n\n private handleDrag = async (): Promise<void> => {\n const canvasBounds = this.getCanvasBounds();\n\n if (\n this.dragging != null &&\n this.lastWorldPosition != null &&\n canvasBounds != null &&\n this.viewer != null &&\n this.viewer.frame != null &&\n this.position != null &&\n this.lastMouseEvent != null\n ) {\n // Begin the transform on the first `pointermove` event as opposed to the\n // `pointerdown` to prevent accidental no-op transforms (identity matrix).\n await this.controller?.beginTransform();\n\n const currentCanvas = convertPointToCanvas(\n Point.create(this.lastMouseEvent.clientX, this.lastMouseEvent.clientY),\n canvasBounds,\n );\n const widgetCenter = this.viewer.viewport.transformWorldToViewport(\n this.position,\n this.viewer.frame.scene.camera.projectionViewMatrix,\n );\n\n const currentWorld = convertCanvasPointToWorld(\n currentCanvas,\n this.viewer?.frame,\n this.viewer?.viewport,\n this.currentTransform,\n );\n\n if (\n currentWorld != null &&\n currentCanvas != null &&\n widgetCenter != null\n ) {\n const angle = Angle.fromPoints(widgetCenter, currentCanvas);\n const angleToUse = calculateNewRotationAngle(\n this.lastMouseEvent,\n this.rotationSnapKey,\n angle,\n this.lastAngle,\n this.getDisplayedAngle(),\n this.rotationSnapDegrees,\n );\n\n this.transform(\n this.lastWorldPosition,\n currentWorld,\n angleToUse - this.lastAngle,\n );\n\n this.updateInputPosition();\n this.updateInputValue();\n\n this.lastWorldPosition = currentWorld;\n this.lastAngle = angleToUse;\n }\n }\n };\n\n private handleEndTransform = async (event: PointerEvent): Promise<void> => {\n const canvasPoint = convertPointToCanvas(\n Point.create(event.clientX, event.clientY),\n this.getCanvasBounds(),\n );\n const widget = this.getTransformWidget();\n this.lastDragged = this.dragging;\n\n this.dragging = undefined;\n this.lastWorldPosition = undefined;\n this.lastAngle = 0;\n\n this.updateInputPosition();\n this.updateInputValue();\n\n widget.updateCursor(canvasPoint);\n widget.updateTransform(this.currentTransform);\n\n this.beginEndTransform();\n\n window.removeEventListener('pointermove', this.handleDragWithTimer);\n window.removeEventListener('pointerup', this.handleEndTransform);\n\n try {\n const delta = this.controller?.getCurrentDelta();\n\n await this.controller?.endTransform();\n\n this.interactionEnded.emit(delta);\n } catch (e) {\n console.error('Failed to end transform interaction', e);\n }\n\n window.addEventListener('pointermove', this.handlePointerMove);\n\n this.completeEndTransform();\n };\n\n private handleInputStep = async (step: number): Promise<void> => {\n if (this.inputValue != null && this.lastInputValue != null) {\n // If modifying angle units, we want to adjust the step to always\n // perform the equivalent of a 1 degree rotation.\n if (this.isModifyingAngleUnits()) {\n const angles = new AngleUnits(this.angleUnit);\n const previous = angles.convertFrom(this.lastInputValue);\n const next = Angle.normalizeRadians(previous + Angle.toRadians(step));\n\n this.inputValue = angles.convertTo(next);\n } else {\n this.inputValue = this.lastInputValue + step;\n }\n await this.updateTransformFromInput(this.inputValue);\n }\n };\n\n private handleInputChange = async (value: number): Promise<void> => {\n await this.updateTransformFromInput(value);\n };\n\n private handleKeyDown = async (event: KeyboardEvent): Promise<void> => {\n const commandOrControlModifier = event.ctrlKey || event.metaKey;\n\n if (\n event.key === 'z' &&\n commandOrControlModifier &&\n this.EXPERIMENTAL_undoKeybindings\n ) {\n event.stopPropagation();\n await this.EXPERIMENTAL_undo();\n }\n };\n\n private updateTransformFromInput = async (value: number): Promise<void> => {\n if (\n this.lastDragged != null &&\n this.currentTransform != null &&\n this.startingTransform != null &&\n this.lastInputValue != null\n ) {\n this.currentTransform = computeInputDeltaTransform(\n this.currentTransform,\n this.lastDragged.identifier,\n value,\n this.lastInputValue,\n this.distanceUnit,\n this.angleUnit,\n );\n\n this.updateInputValue();\n this.lastInputValue = value;\n\n await this.controller?.beginTransform();\n this.getTransformWidget().updateTransform(this.currentTransform);\n await this.controller?.updateTransform(\n Matrix4.multiply(\n this.currentTransform,\n Matrix4.invert(this.startingTransform),\n ),\n );\n this.updateInputPosition();\n await this.controller?.endTransformDebounced(\n this.beginEndTransform,\n this.completeEndTransform,\n );\n }\n };\n\n private updatePropsFromViewer = (): void => {\n const { frame } = this.viewer || {};\n\n if (frame != null) {\n const widget = this.getTransformWidget();\n\n widget.updateFrame(frame, this.dragging == null);\n this.updateInputPosition();\n }\n };\n\n private transform(\n previous: Vector3.Vector3,\n next: Vector3.Vector3,\n angle: number,\n ): void {\n if (\n this.position != null &&\n this.startingTransform != null &&\n this.currentTransform != null &&\n this.dragging != null &&\n this.viewer != null &&\n this.viewer.frame != null\n ) {\n this.currentTransform = computeHandleDeltaTransform(\n this.currentTransform,\n previous,\n next,\n this.viewer?.frame.scene.camera.viewVector,\n angle,\n this.dragging.identifier,\n );\n\n this.getTransformWidget().updateTransform(this.currentTransform);\n this.controller?.updateTransform(\n Matrix4.multiply(\n this.currentTransform,\n Matrix4.invert(this.startingTransform),\n ),\n );\n }\n }\n\n private handleSettingDisabledAxis(): void {\n if (this.widget) {\n this.widget.updateDisabledAxis({\n xRotation: this.xRotationDisabled,\n yRotation: this.yRotationDisabled,\n zRotation: this.zRotationDisabled,\n xTranslation: this.xTranslationDisabled,\n yTranslation: this.yTranslationDisabled,\n zTranslation: this.zTranslationDisabled,\n xyTranslation: this.xyTranslationDisabled,\n xzTranslation: this.xzTranslationDisabled,\n yzTranslation: this.yzTranslationDisabled,\n });\n } else {\n console.warn('Cannot set disabled values - no widget defined');\n }\n }\n\n private setupTransformWidget = (\n canvasRef: HTMLCanvasElement,\n ): TransformWidget => {\n console.debug(\n `Initializing transform widget. [initial-position=${JSON.stringify(\n this.position,\n )}, has-initial-frame=${this.viewer?.frame != null}]`,\n );\n\n const effectiveArrowScalar = this.getTranslationScalar();\n const effectiveSquareScalar = this.getRotationScalar();\n\n this.widget = new TransformWidget(canvasRef, {\n colors: {\n xArrow: this.xArrowColor,\n yArrow: this.yArrowColor,\n zArrow: this.zArrowColor,\n twoAxesSquare: this.twoAxesSquareColor,\n hovered: this.hoveredColor,\n },\n scalars: {\n xTranslation: effectiveArrowScalar,\n yTranslation: effectiveArrowScalar,\n zTranslation: effectiveArrowScalar,\n xyTranslation: effectiveSquareScalar,\n xzTranslation: effectiveSquareScalar,\n yzTranslation: effectiveSquareScalar,\n xRotation: effectiveSquareScalar,\n yRotation: effectiveSquareScalar,\n zRotation: effectiveSquareScalar,\n },\n });\n\n if (this.rotation != null) {\n this.currentTransform = this.getTransformForNewRotation(this.rotation);\n this.startingTransform = this.currentTransform;\n this.widget.updateTransform(this.currentTransform);\n }\n\n if (this.position != null) {\n this.currentTransform = this.getTransformForNewPosition(this.position);\n this.startingTransform = this.currentTransform;\n this.widget.updateTransform(this.currentTransform);\n }\n if (this.viewer?.frame != null) {\n this.widget.updateFrame(this.viewer.frame, true);\n }\n\n this.handleSettingDisabledAxis();\n\n this.hoveredChangeDisposable = this.widget.onHoveredChanged(\n this.handleHoveredDrawableChanged,\n );\n\n return this.widget;\n };\n\n private updateCanvasBounds = (canvasElement: HTMLCanvasElement): void => {\n readDOM(() => {\n this.canvasBounds = canvasElement.getBoundingClientRect();\n\n this.getTransformWidget().updateDimensions(canvasElement);\n });\n };\n\n private updateInputValue = (): void => {\n const dragging = this.dragging ?? this.lastDragged;\n const isDraggingTwoAxesTranslation =\n dragging?.identifier === 'xy-translate' ||\n dragging?.identifier === 'xz-translate' ||\n dragging?.identifier === 'yz-translate';\n\n if (\n dragging != null &&\n this.currentTransform != null &&\n this.dragStartTransform != null &&\n !isDraggingTwoAxesTranslation\n ) {\n this.lastInputValue = this.inputValue;\n\n this.inputValue = computeInputDisplayValue(\n dragging.identifier,\n this.currentTransform,\n this.dragStartTransform,\n this.distanceUnit,\n this.angleUnit,\n );\n\n if (this.inputRef != null) {\n const definedValue =\n this.getDisplayedDistance() ?? this.getDisplayedAngle() ?? 0;\n const displayValue = `${parseFloat(definedValue.toFixed(this.decimalPlaces))}`;\n\n this.inputRef.value = displayValue;\n }\n }\n };\n\n private updateInputPosition = (): void => {\n const dragging = this.dragging ?? this.lastDragged;\n\n const isDraggingTwoAxesTranslation =\n dragging?.identifier === 'xy-translate' ||\n dragging?.identifier === 'xz-translate' ||\n dragging?.identifier === 'yz-translate';\n\n if (\n this.showInputs &&\n this.viewer?.frame != null &&\n this.position != null &&\n dragging != null &&\n !isDraggingTwoAxesTranslation\n ) {\n const widget = this.getTransformWidget();\n const widgetBounds = widget.getFullBounds();\n\n this.inputPosition =\n widgetBounds != null\n ? computeInputPosition(\n this.viewer.viewport,\n widgetBounds,\n dragging.points.toArray(),\n )\n : undefined;\n } else if (isDraggingTwoAxesTranslation) {\n this.inputPosition = undefined;\n }\n };\n\n private beginEndTransform = (): void => {\n const widget = this.getTransformWidget();\n\n widget.updateDisabledAxis({\n xRotation: true,\n yRotation: true,\n zRotation: true,\n xTranslation: true,\n yTranslation: true,\n zTranslation: true,\n xyTranslation: true,\n xzTranslation: true,\n yzTranslation: true,\n });\n\n this.isEndingTransform = true;\n };\n\n private completeEndTransform = (): void => {\n const widget = this.getTransformWidget();\n\n widget.updateDisabledAxis({\n xRotation: this.xRotationDisabled,\n yRotation: this.yRotationDisabled,\n zRotation: this.zRotationDisabled,\n\n xTranslation: this.xTranslationDisabled,\n yTranslation: this.yTranslationDisabled,\n zTranslation: this.zTranslationDisabled,\n\n xyTranslation: this.xyTranslationDisabled,\n xzTranslation: this.xzTranslationDisabled,\n yzTranslation: this.yzTranslationDisabled,\n });\n\n this.isEndingTransform = false;\n this.inputShouldFocus = true;\n\n if (this.currentTransform != null) {\n this.position = Vector3.fromMatrixPosition(this.currentTransform);\n this.rotation = Euler.fromRotationMatrix(this.currentTransform);\n }\n };\n\n private isModifyingAngleUnits = (): boolean => {\n const draggingIdentifier =\n this.dragging?.identifier ?? this.lastDragged?.identifier;\n\n return !!draggingIdentifier?.includes('rotate');\n };\n\n private getTranslationScalar = (): number => {\n if (this.translationHandleScalar > 0) {\n return this.translationHandleScalar;\n }\n console.warn(\n 'Invalid value provided for translation-handle-scalar. Expected a positive value greater than zero.',\n );\n return 1;\n };\n\n private getRotationScalar = (): number => {\n if (this.rotationHandleScalar > 0) {\n return this.rotationHandleScalar;\n }\n console.warn(\n 'Invalid value provided for rotation-handle-scalar. Expected a positive value greater than zero.',\n );\n return 1;\n };\n\n private getDisplayedUnits = (): AngleUnits | DistanceUnits => {\n if (this.isModifyingAngleUnits()) {\n return new AngleUnits(this.angleUnit);\n }\n return new DistanceUnits(this.distanceUnit);\n };\n\n private getDisplayedAngle = (): number | undefined => {\n if (this.isModifyingAngleUnits()) {\n return this.inputValue;\n }\n };\n\n private getDisplayedDistance = (): number | undefined => {\n const draggingIdentifier =\n this.dragging?.identifier ?? this.lastDragged?.identifier;\n if (draggingIdentifier?.includes('translate')) {\n return this.inputValue;\n }\n };\n\n private getTransformForNewPosition = (\n newPosition?: Vector3.Vector3,\n ): Matrix4.Matrix4 | undefined => {\n if (newPosition != null) {\n const c =\n this.currentTransform != null\n ? this.currentTransform\n : Matrix4.makeIdentity();\n\n const currentRotation = Matrix4.makeRotation(\n Quaternion.fromMatrixRotation(c),\n );\n const position = Matrix4.makeTranslation(newPosition);\n\n return Matrix4.multiply(position, currentRotation);\n }\n };\n\n private getTransformForNewRotation = (\n newRotationEuler: Euler.Euler,\n ): Matrix4.Matrix4 | undefined => {\n const c =\n this.currentTransform != null\n ? this.currentTransform\n : Matrix4.makeIdentity();\n\n const oldRotation = Matrix4.invert(\n Matrix4.makeRotation(Quaternion.fromMatrixRotation(c)),\n );\n\n const newRotation = Matrix4.makeRotation(\n Quaternion.fromEuler(newRotationEuler),\n );\n const oldTranslation = Matrix4.multiply(c, oldRotation);\n\n return Matrix4.multiply(oldTranslation, newRotation);\n };\n\n private getCanvasBounds = (): DOMRect | undefined => {\n if (this.canvasBounds != null) {\n return this.canvasBounds;\n } else if (this.canvasRef != null) {\n this.updateCanvasBounds(this.canvasRef);\n return this.canvasBounds;\n }\n };\n\n private getTransformWidget = (): TransformWidget => {\n if (this.widget == null && this.canvasRef != null) {\n return this.setupTransformWidget(this.canvasRef);\n } else if (this.widget != null) {\n return this.widget;\n } else {\n throw new Error(\n 'Transform widget was not initialized. The canvas element may not have been initialized.',\n );\n }\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget.js","sourceRoot":"","sources":["../../../../../src/components/viewer-transform-widget/widget.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,SAAS,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAqB,eAAe,EAAY,MAAM,kBAAkB,CAAC;AAChF,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,YAAY,MAAM,YAAY,CAAC;AAEtC,OAAO,EACL,aAAa,EACb,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,EAC1B,mBAAmB,EACnB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,uBAAuB,GAExB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAwC/D,MAAM,OAAO,eAAgB,SAAQ,aAAa;IA4DhD,YACE,aAAgC,EACxB,gBAA8C,EAAE,EACxD,sBAA6C,EAAE;;QAE/C,KAAK,C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K,CAAC,MAAM,EAClB,YAAY,EACZ,MAAA,IAAI,CAAC,aAAa,CAAC,OAAO,0CAAE,aAAa,CAC1C,CACF,CAAC;QACJ,CAAC;QACD,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,EAAE,CAAC;YAC/B,IAAI,CAAC,aAAa,CAAC,YAAY,CAC7B,0BAA0B,CACxB,SAAS,EACT,KAAK,CAAC,KAAK,CAAC,MAAM,EAClB,YAAY,EACZ,MAAA,IAAI,CAAC,aAAa,CAAC,OAAO,0CAAE,aAAa,CAC1C,CACF,CAAC;QACJ,CAAC;QACD,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,EAAE,CAAC;YAC/B,IAAI,CAAC,aAAa,CAAC,YAAY,CAC7B,0BAA0B,CACxB,SAAS,EACT,KAAK,CAAC,KAAK,CAAC,MAAM,EAClB,YAAY,EACZ,MAAA,IAAI,CAAC,aAAa,CAAC,OAAO,0CAAE,aAAa,CAC1C,CACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF","sourcesContent":["import { Matrix4 } from '@vertexvis/geometry';\nimport { Point, Rectangle, Vector3 } from '@vertexvis/geometry';\nimport { Color, Disposable, EventDispatcher, Listener } from '@vertexvis/utils';\nimport regl from 'regl';\nimport shapeBuilder from 'regl-shape';\n\nimport {\n axisPositions,\n rotationAxisPositions,\n} from '../../lib/transforms/axis-lines';\nimport {\n xAxisRotationPositions,\n yAxisRotationPositions,\n zAxisRotationPositions,\n} from '../../lib/transforms/axis-rotation';\nimport {\n xAxisArrowPositions,\n xyAxisTranslationPositions,\n xzAxisTranslationPositions,\n yAxisArrowPositions,\n yzAxisTranslationPositions,\n zAxisArrowPositions,\n} from '../../lib/transforms/axis-translation';\nimport {\n computeDrawable2dBounds,\n Drawable,\n} from '../../lib/transforms/drawable';\nimport { testDrawable } from '../../lib/transforms/hits';\nimport { AxisLine, RotationLine } from '../../lib/transforms/line';\nimport { TriangleMesh } from '../../lib/transforms/mesh';\nimport { CreateShape } from '../../lib/transforms/shape';\nimport { Frame } from '../../lib/types';\nimport { ReglComponent } from '../../lib/webgl/regl-component';\n\nexport interface DrawableElementColors {\n xArrow?: Color.Color | string;\n yArrow?: Color.Color | string;\n zArrow?: Color.Color | string;\n twoAxesSquare?: Color.Color | string;\n hovered?: Color.Color | string;\n outline?: Color.Color | string;\n}\n\nexport interface DrawableElementSizeScalars {\n xRotation?: number;\n yRotation?: number;\n zRotation?: number;\n xTranslation?: number;\n yTranslation?: number;\n zTranslation?: number;\n xyTranslation?: number;\n xzTranslation?: number;\n yzTranslation?: number;\n}\n\nexport interface DisabledAxis {\n xRotation: boolean;\n yRotation: boolean;\n zRotation: boolean;\n xTranslation: boolean;\n yTranslation: boolean;\n zTranslation: boolean;\n xyTranslation: boolean;\n xzTranslation: boolean;\n yzTranslation: boolean;\n}\n\nexport interface TransformWidgetCustomization {\n colors?: DrawableElementColors;\n scalars?: DrawableElementSizeScalars;\n}\n\nexport class TransformWidget extends ReglComponent {\n private cursor?: Point.Point;\n\n private xAxis?: AxisLine;\n private yAxis?: AxisLine;\n private zAxis?: AxisLine;\n\n private xArrow?: TriangleMesh;\n private yArrow?: TriangleMesh;\n private zArrow?: TriangleMesh;\n\n private xRotation?: TriangleMesh;\n private xyRotationLine?: RotationLine;\n private xzRotationLine?: RotationLine;\n\n private yRotation?: TriangleMesh;\n private yxRotationLine?: RotationLine;\n private yzRotationLine?: RotationLine;\n\n private zRotation?: TriangleMesh;\n private zxRotationLine?: RotationLine;\n private zyRotationLine?: RotationLine;\n\n private xyTranslation?: TriangleMesh;\n private xzTranslation?: TriangleMesh;\n private yzTranslation?: TriangleMesh;\n\n private disabledAxis: DisabledAxis = {\n xTranslation: false,\n yTranslation: false,\n zTranslation: false,\n xyTranslation: false,\n xzTranslation: false,\n yzTranslation: false,\n xRotation: false,\n yRotation: false,\n zRotation: false,\n };\n\n private axisLines: AxisLine[] = [];\n private rotationLines: RotationLine[] = [];\n private translationMeshes: TriangleMesh[] = [];\n private rotationMeshes: TriangleMesh[] = [];\n private hoveredElement?: Drawable;\n\n private transform?: Matrix4.Matrix4;\n private interactiveBounds?: Rectangle.Rectangle;\n private fullBounds?: Rectangle.Rectangle;\n\n private hoveredChanged = new EventDispatcher<Drawable | undefined>();\n\n private xArrowFillColor?: Color.Color | string;\n private yArrowFillColor?: Color.Color | string;\n private zArrowFillColor?: Color.Color | string;\n\n private twoAxesSquareFillColor?: Color.Color | string;\n\n private hoveredArrowFillColor?: Color.Color | string;\n private outlineColor?: Color.Color | string;\n\n public constructor(\n canvasElement: HTMLCanvasElement,\n private customization: TransformWidgetCustomization = {},\n initialDisabledAxes: Partial<DisabledAxis> = {}\n ) {\n super(canvasElement);\n\n this.xArrowFillColor = customization.colors?.xArrow;\n this.yArrowFillColor = customization.colors?.yArrow;\n this.zArrowFillColor = customization.colors?.zArrow;\n this.hoveredArrowFillColor = customization.colors?.hovered;\n this.outlineColor = customization.colors?.outline;\n\n this.disabledAxis.xTranslation = initialDisabledAxes.xTranslation ?? false;\n this.disabledAxis.yTranslation = initialDisabledAxes.yTranslation ?? false;\n this.disabledAxis.zTranslation = initialDisabledAxes.zTranslation ?? false;\n this.disabledAxis.xyTranslation =\n initialDisabledAxes.xyTranslation ?? false;\n this.disabledAxis.xzTranslation =\n initialDisabledAxes.xzTranslation ?? false;\n this.disabledAxis.yzTranslation =\n initialDisabledAxes.yzTranslation ?? false;\n this.disabledAxis.xRotation = initialDisabledAxes.xRotation ?? false;\n this.disabledAxis.yRotation = initialDisabledAxes.yRotation ?? false;\n this.disabledAxis.zRotation = initialDisabledAxes.zRotation ?? false;\n }\n\n public dispose(): void {\n this.reglFrameDisposable?.cancel();\n }\n\n /**\n * @internal - visible for testing\n */\n public getDrawableElements(): Drawable[] {\n return this.drawableElements;\n }\n\n public getFullBounds(): Rectangle.Rectangle | undefined {\n return this.fullBounds;\n }\n\n public boundsContainsPoint(point: Point.Point): boolean {\n return (\n this.interactiveBounds != null &&\n this.frame != null &&\n Rectangle.containsPoints(this.interactiveBounds, point)\n );\n }\n\n public updateDisabledAxis(axis: Partial<DisabledAxis>): void {\n this.disabledAxis = {\n ...this.disabledAxis,\n ...axis,\n };\n this.updateDisabledOnDrawables();\n }\n\n public updateCursor(cursor?: Point.Point): void {\n this.cursor = cursor;\n\n if (cursor != null && this.frame != null) {\n this.updateHovered();\n } else {\n this.clearHovered();\n }\n }\n\n public updateTransform(transform?: Matrix4.Matrix4): void {\n this.transform = transform;\n\n if (transform != null && this.frame != null) {\n this.updateAndDraw();\n } else {\n this.clear();\n this.reglFrameDisposable?.cancel();\n this.reglFrameDisposable = undefined;\n }\n }\n\n public updateColors(colors: DrawableElementColors = {}): void {\n this.xArrowFillColor = colors.xArrow ?? this.xArrowFillColor;\n this.yArrowFillColor = colors.yArrow ?? this.yArrowFillColor;\n this.zArrowFillColor = colors.zArrow ?? this.zArrowFillColor;\n this.twoAxesSquareFillColor =\n colors.twoAxesSquare ?? this.twoAxesSquareFillColor;\n this.hoveredArrowFillColor = colors.hovered ?? this.hoveredArrowFillColor;\n this.outlineColor = colors.outline ?? this.outlineColor;\n\n this.xArrow?.updateFillColor(this.getXTranslationColor(), true);\n this.yArrow?.updateFillColor(this.getYTranslationColor(), true);\n this.zArrow?.updateFillColor(this.getZTranslationColor(), true);\n this.xRotation?.updateFillColor(this.getXRotationColor(), true);\n this.yRotation?.updateFillColor(this.getYRotationColor(), true);\n this.zRotation?.updateFillColor(this.getZRotationColor(), true);\n this.xyTranslation?.updateFillColor(\n this.getTwoAxesTranslationColor(),\n true\n );\n this.xzTranslation?.updateFillColor(\n this.getTwoAxesTranslationColor(),\n true\n );\n this.yzTranslation?.updateFillColor(\n this.getTwoAxesTranslationColor(),\n true\n );\n\n this.hoveredElement?.updateFillColor(this.hoveredArrowFillColor);\n }\n\n public updateScalars(scalars: DrawableElementSizeScalars): void {\n this.customization = {\n ...this.customization,\n scalars,\n };\n\n if (this.transform != null && this.frame != null) {\n this.updateElements(this.transform, this.frame);\n }\n }\n\n public onHoveredChanged(\n listener: Listener<Drawable | undefined>\n ): Disposable {\n return this.hoveredChanged.on(listener);\n }\n\n private updateDisabledOnDrawables(): void {\n this.xRotation?.setDisabled(this.disabledAxis.xRotation);\n this.xyRotationLine?.setDisabled(this.disabledAxis.xRotation);\n this.xzRotationLine?.setDisabled(this.disabledAxis.xRotation);\n\n this.yRotation?.setDisabled(this.disabledAxis.yRotation);\n this.yzRotationLine?.setDisabled(this.disabledAxis.yRotation);\n this.yxRotationLine?.setDisabled(this.disabledAxis.yRotation);\n\n this.zRotation?.setDisabled(this.disabledAxis.zRotation);\n this.zxRotationLine?.setDisabled(this.disabledAxis.zRotation);\n this.zyRotationLine?.setDisabled(this.disabledAxis.zRotation);\n\n this.xArrow?.setDisabled(this.disabledAxis.xTranslation);\n this.yArrow?.setDisabled(this.disabledAxis.yTranslation);\n this.zArrow?.setDisabled(this.disabledAxis.zTranslation);\n\n this.xyTranslation?.setDisabled(this.disabledAxis.xyTranslation);\n this.xzTranslation?.setDisabled(this.disabledAxis.xzTranslation);\n this.yzTranslation?.setDisabled(this.disabledAxis.yzTranslation);\n\n this.updateColors();\n }\n\n private updateHovered(): void {\n const previousHovered = this.hoveredElement;\n const currentFrame = this.frame;\n\n if (currentFrame != null) {\n this.hoveredElement = [...this.translationMeshes, ...this.rotationMeshes]\n .filter((el) => el.points.valid && !el.isDisabled())\n .find((m) =>\n this.cursor != null\n ? testDrawable(m, currentFrame, this.viewport, this.cursor)\n : false\n );\n\n if (this.hoveredElement !== previousHovered) {\n this.hoveredChanged.emit(this.hoveredElement);\n this.hoveredElement?.updateFillColor(this.hoveredArrowFillColor);\n this.clearFillColorOfPreviouslyHovered(previousHovered);\n\n // Set the corresponding arrows to the hover fill color\n // when a 2-axes translation square is hovered over\n if (this.hoveredElement?.identifier === 'xy-translate') {\n this.xArrow?.updateFillColor(this.hoveredArrowFillColor);\n this.yArrow?.updateFillColor(this.hoveredArrowFillColor);\n } else if (this.hoveredElement?.identifier === 'xz-translate') {\n this.xArrow?.updateFillColor(this.hoveredArrowFillColor);\n this.zArrow?.updateFillColor(this.hoveredArrowFillColor);\n } else if (this.hoveredElement?.identifier === 'yz-translate') {\n this.yArrow?.updateFillColor(this.hoveredArrowFillColor);\n this.zArrow?.updateFillColor(this.hoveredArrowFillColor);\n }\n }\n }\n }\n\n private clearHovered(): void {\n const previousHovered = this.hoveredElement;\n this.hoveredElement = undefined;\n\n if (this.hoveredElement !== previousHovered) {\n this.hoveredChanged.emit(this.hoveredElement);\n this.clearFillColorOfPreviouslyHovered(previousHovered);\n }\n }\n\n private clearFillColorOfPreviouslyHovered(previousHovered?: Drawable): void {\n previousHovered?.updateFillColor(previousHovered?.initialFillColor);\n\n // Also clear the hover fill color from the corresponding arrows\n // when a 2-axes translation square is no longer hovered over\n if (previousHovered?.identifier === 'xy-translate') {\n this.xArrow?.updateFillColor(this.xArrow?.initialFillColor);\n this.yArrow?.updateFillColor(this.yArrow?.initialFillColor);\n } else if (previousHovered?.identifier === 'xz-translate') {\n this.xArrow?.updateFillColor(this.xArrow?.initialFillColor);\n this.zArrow?.updateFillColor(this.zArrow?.initialFillColor);\n } else if (previousHovered?.identifier === 'yz-translate') {\n this.yArrow?.updateFillColor(this.yArrow?.initialFillColor);\n this.zArrow?.updateFillColor(this.zArrow?.initialFillColor);\n }\n }\n\n protected hasData(): boolean {\n return this.transform != null;\n }\n\n protected createOrUpdateElements(): void {\n if (this.transform != null && this.frame != null) {\n if (this.xArrow == null || this.yArrow == null || this.zArrow == null) {\n this.createElements(this.transform, this.frame);\n } else {\n this.updateElements(this.transform, this.frame);\n }\n\n this.interactiveBounds = computeDrawable2dBounds(\n this.viewport,\n ...this.rotationMeshes,\n ...this.translationMeshes\n );\n this.fullBounds = computeDrawable2dBounds(\n this.viewport,\n ...this.rotationMeshes,\n ...this.translationMeshes,\n ...this.axisLines\n );\n }\n }\n\n private createElements(transform: Matrix4.Matrix4, frame: Frame): void {\n this.reglCommand = regl({\n canvas: this.canvasElement,\n extensions: 'angle_instanced_arrays',\n });\n const { createShape } = shapeBuilder(this.reglCommand);\n\n const triangleSize = this.computeTriangleSize(\n Vector3.fromMatrixPosition(transform),\n frame\n );\n\n this.xArrow = new TriangleMesh(\n createShape,\n 'x-translate',\n xAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xTranslation\n ),\n this.outlineColor,\n this.getXTranslationColor()\n );\n this.xRotation = new TriangleMesh(\n createShape,\n 'x-rotate',\n xAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xRotation,\n this.customization.scalars?.xTranslation\n ),\n this.outlineColor,\n this.getXRotationColor()\n );\n this.xAxis = new AxisLine(\n createShape,\n 'x-axis',\n axisPositions(transform, frame.scene.camera, this.xArrow),\n this.outlineColor,\n this.getXTranslationColor()\n );\n\n this.yArrow = new TriangleMesh(\n createShape,\n 'y-translate',\n yAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yTranslation\n ),\n this.outlineColor,\n this.getYTranslationColor()\n );\n this.yRotation = new TriangleMesh(\n createShape,\n 'y-rotate',\n yAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yRotation,\n this.customization.scalars?.yTranslation\n ),\n this.outlineColor,\n this.getYRotationColor()\n );\n this.yAxis = new AxisLine(\n createShape,\n 'y-axis',\n axisPositions(transform, frame.scene.camera, this.yArrow),\n this.outlineColor,\n this.getYTranslationColor()\n );\n\n this.zArrow = new TriangleMesh(\n createShape,\n 'z-translate',\n zAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.zTranslation\n ),\n this.outlineColor,\n this.getZTranslationColor()\n );\n this.zAxis = new AxisLine(\n createShape,\n 'z-axis',\n axisPositions(transform, frame.scene.camera, this.zArrow),\n this.outlineColor,\n this.getZTranslationColor()\n );\n this.zRotation = new TriangleMesh(\n createShape,\n 'z-rotate',\n zAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.zRotation,\n this.customization.scalars?.zTranslation\n ),\n this.outlineColor,\n this.getZRotationColor()\n );\n\n this.xyTranslation = new TriangleMesh(\n createShape,\n 'xy-translate',\n xyAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xyTranslation\n ),\n this.outlineColor,\n this.getTwoAxesTranslationColor()\n );\n this.xzTranslation = new TriangleMesh(\n createShape,\n 'xz-translate',\n xzAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xzTranslation\n ),\n this.outlineColor,\n this.getTwoAxesTranslationColor()\n );\n this.yzTranslation = new TriangleMesh(\n createShape,\n 'yz-translate',\n yzAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yzTranslation\n ),\n this.outlineColor,\n this.getTwoAxesTranslationColor()\n );\n\n this.createRotationLines(createShape, transform, frame);\n\n this.axisLines = [this.xAxis, this.yAxis, this.zAxis];\n this.translationMeshes = [\n this.xArrow,\n this.yArrow,\n this.zArrow,\n this.xyTranslation,\n this.xzTranslation,\n this.yzTranslation,\n ];\n this.rotationMeshes = [this.xRotation, this.yRotation, this.zRotation];\n this.updateDisabledOnDrawables();\n\n this.availableElements = [\n ...this.axisLines,\n ...this.rotationLines,\n ...this.translationMeshes,\n ...this.rotationMeshes,\n ];\n }\n\n private getXRotationColor(): Color.Color | string | undefined {\n return this.xArrowFillColor;\n }\n\n private getYRotationColor(): Color.Color | string | undefined {\n return this.yArrowFillColor;\n }\n\n private getZRotationColor(): Color.Color | string | undefined {\n return this.zArrowFillColor;\n }\n\n private getXTranslationColor(): Color.Color | string | undefined {\n return this.xArrowFillColor;\n }\n\n private getYTranslationColor(): Color.Color | string | undefined {\n return this.yArrowFillColor;\n }\n\n private getZTranslationColor(): Color.Color | string | undefined {\n return this.zArrowFillColor;\n }\n\n private getTwoAxesTranslationColor(): Color.Color | string | undefined {\n return this.twoAxesSquareFillColor;\n }\n\n private createRotationLines(\n createShape: CreateShape,\n transform: Matrix4.Matrix4,\n frame: Frame\n ): void {\n const triangleSize = this.computeTriangleSize(\n Vector3.fromMatrixPosition(transform),\n frame\n );\n\n const xyRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.xRotation,\n this.yArrow?.points.worldTip,\n triangleSize\n );\n const xzRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.xRotation,\n this.zArrow?.points.worldTip,\n triangleSize\n );\n const yxRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.yRotation,\n this.xArrow?.points.worldTip,\n triangleSize\n );\n const yzRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.yRotation,\n this.zArrow?.points.worldTip,\n triangleSize\n );\n const zxRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.zRotation,\n this.xArrow?.points.worldTip,\n triangleSize\n );\n const zyRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.zRotation,\n this.yArrow?.points.worldTip,\n triangleSize\n );\n\n if (xyRotationLinePoints != null) {\n this.xyRotationLine = new RotationLine(\n createShape,\n 'xy-rotation-line',\n xyRotationLinePoints,\n this.outlineColor\n );\n }\n if (xzRotationLinePoints != null) {\n this.xzRotationLine = new RotationLine(\n createShape,\n 'xz-rotation-line',\n xzRotationLinePoints,\n this.outlineColor\n );\n }\n if (yxRotationLinePoints != null) {\n this.yxRotationLine = new RotationLine(\n createShape,\n 'yx-rotation-line',\n yxRotationLinePoints,\n this.outlineColor\n );\n }\n if (yzRotationLinePoints != null) {\n this.yzRotationLine = new RotationLine(\n createShape,\n 'yz-rotation-line',\n yzRotationLinePoints,\n this.outlineColor\n );\n }\n if (zxRotationLinePoints != null) {\n this.zxRotationLine = new RotationLine(\n createShape,\n 'zx-rotation-line',\n zxRotationLinePoints,\n this.outlineColor\n );\n }\n if (zyRotationLinePoints != null) {\n this.zyRotationLine = new RotationLine(\n createShape,\n 'zy-rotation-line',\n zyRotationLinePoints,\n this.outlineColor\n );\n }\n\n this.rotationLines = [\n this.xyRotationLine,\n this.xzRotationLine,\n this.yxRotationLine,\n this.yzRotationLine,\n this.zxRotationLine,\n this.zyRotationLine,\n ].filter((l) => l != null) as RotationLine[];\n }\n\n private updateElements(transform: Matrix4.Matrix4, frame: Frame): void {\n const triangleSize = this.computeTriangleSize(\n Vector3.fromMatrixPosition(transform),\n frame\n );\n\n if (this.xArrow != null) {\n this.xArrow.updatePoints(\n xAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xTranslation\n )\n );\n this.xAxis?.updatePoints(\n axisPositions(transform, frame.scene.camera, this.xArrow)\n );\n }\n this.xRotation?.updatePoints(\n xAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xRotation,\n this.customization.scalars?.xTranslation\n )\n );\n\n if (this.yArrow != null) {\n this.yArrow.updatePoints(\n yAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yTranslation\n )\n );\n this.yAxis?.updatePoints(\n axisPositions(transform, frame.scene.camera, this.yArrow)\n );\n }\n this.yRotation?.updatePoints(\n yAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yRotation,\n this.customization.scalars?.yTranslation\n )\n );\n\n if (this.zArrow != null) {\n this.zArrow.updatePoints(\n zAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.zTranslation\n )\n );\n this.zAxis?.updatePoints(\n axisPositions(transform, frame.scene.camera, this.zArrow)\n );\n }\n this.zRotation?.updatePoints(\n zAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.zRotation,\n this.customization.scalars?.zTranslation\n )\n );\n\n this.xyRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.xRotation,\n this.yArrow?.points.worldTip,\n triangleSize\n )\n );\n this.xzRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.xRotation,\n this.zArrow?.points.worldTip,\n triangleSize\n )\n );\n this.yxRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.yRotation,\n this.xArrow?.points.worldTip,\n triangleSize\n )\n );\n this.yzRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.yRotation,\n this.zArrow?.points.worldTip,\n triangleSize\n )\n );\n this.zxRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.zRotation,\n this.xArrow?.points.worldTip,\n triangleSize\n )\n );\n this.zyRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.zRotation,\n this.yArrow?.points.worldTip,\n triangleSize\n )\n );\n\n if (this.xyTranslation != null) {\n this.xyTranslation.updatePoints(\n xyAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xyTranslation\n )\n );\n }\n if (this.xzTranslation != null) {\n this.xzTranslation.updatePoints(\n xzAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xzTranslation\n )\n );\n }\n if (this.yzTranslation != null) {\n this.yzTranslation.updatePoints(\n yzAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yzTranslation\n )\n );\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"widget.js","sourceRoot":"","sources":["../../../../../src/components/viewer-transform-widget/widget.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,SAAS,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAqB,eAAe,EAAY,MAAM,kBAAkB,CAAC;AAChF,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,YAAY,MAAM,YAAY,CAAC;AAEtC,OAAO,EACL,aAAa,EACb,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,oCAAoC,CAA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Ac,0CAAE,YAAY,CAC/B,qBAAqB,CACnB,KAAK,CAAC,KAAK,CAAC,MAAM,EAClB,IAAI,CAAC,SAAS,EACd,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,CAAC,QAAQ,EAC5B,YAAY,CACb,CACF,CAAC;QACF,MAAA,IAAI,CAAC,cAAc,0CAAE,YAAY,CAC/B,qBAAqB,CACnB,KAAK,CAAC,KAAK,CAAC,MAAM,EAClB,IAAI,CAAC,SAAS,EACd,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,CAAC,QAAQ,EAC5B,YAAY,CACb,CACF,CAAC;QAEF,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,EAAE,CAAC;YAC/B,IAAI,CAAC,aAAa,CAAC,YAAY,CAC7B,0BAA0B,CACxB,SAAS,EACT,KAAK,CAAC,KAAK,CAAC,MAAM,EAClB,YAAY,EACZ,MAAA,IAAI,CAAC,aAAa,CAAC,OAAO,0CAAE,aAAa,CAC1C,CACF,CAAC;QACJ,CAAC;QACD,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,EAAE,CAAC;YAC/B,IAAI,CAAC,aAAa,CAAC,YAAY,CAC7B,0BAA0B,CACxB,SAAS,EACT,KAAK,CAAC,KAAK,CAAC,MAAM,EAClB,YAAY,EACZ,MAAA,IAAI,CAAC,aAAa,CAAC,OAAO,0CAAE,aAAa,CAC1C,CACF,CAAC;QACJ,CAAC;QACD,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,EAAE,CAAC;YAC/B,IAAI,CAAC,aAAa,CAAC,YAAY,CAC7B,0BAA0B,CACxB,SAAS,EACT,KAAK,CAAC,KAAK,CAAC,MAAM,EAClB,YAAY,EACZ,MAAA,IAAI,CAAC,aAAa,CAAC,OAAO,0CAAE,aAAa,CAC1C,CACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF","sourcesContent":["import { Matrix4 } from '@vertexvis/geometry';\nimport { Point, Rectangle, Vector3 } from '@vertexvis/geometry';\nimport { Color, Disposable, EventDispatcher, Listener } from '@vertexvis/utils';\nimport regl from 'regl';\nimport shapeBuilder from 'regl-shape';\n\nimport {\n axisPositions,\n rotationAxisPositions,\n} from '../../lib/transforms/axis-lines';\nimport {\n xAxisRotationPositions,\n yAxisRotationPositions,\n zAxisRotationPositions,\n} from '../../lib/transforms/axis-rotation';\nimport {\n xAxisArrowPositions,\n xyAxisTranslationPositions,\n xzAxisTranslationPositions,\n yAxisArrowPositions,\n yzAxisTranslationPositions,\n zAxisArrowPositions,\n} from '../../lib/transforms/axis-translation';\nimport {\n computeDrawable2dBounds,\n Drawable,\n} from '../../lib/transforms/drawable';\nimport { testDrawable } from '../../lib/transforms/hits';\nimport { AxisLine, RotationLine } from '../../lib/transforms/line';\nimport { TriangleMesh } from '../../lib/transforms/mesh';\nimport { CreateShape } from '../../lib/transforms/shape';\nimport { Frame } from '../../lib/types';\nimport { ReglComponent } from '../../lib/webgl/regl-component';\n\nexport interface DrawableElementColors {\n xArrow?: Color.Color | string;\n yArrow?: Color.Color | string;\n zArrow?: Color.Color | string;\n twoAxesSquare?: Color.Color | string;\n hovered?: Color.Color | string;\n outline?: Color.Color | string;\n}\n\nexport interface DrawableElementSizeScalars {\n xRotation?: number;\n yRotation?: number;\n zRotation?: number;\n xTranslation?: number;\n yTranslation?: number;\n zTranslation?: number;\n xyTranslation?: number;\n xzTranslation?: number;\n yzTranslation?: number;\n}\n\nexport interface DisabledAxis {\n xRotation: boolean;\n yRotation: boolean;\n zRotation: boolean;\n xTranslation: boolean;\n yTranslation: boolean;\n zTranslation: boolean;\n xyTranslation: boolean;\n xzTranslation: boolean;\n yzTranslation: boolean;\n}\n\nexport interface TransformWidgetCustomization {\n colors?: DrawableElementColors;\n scalars?: DrawableElementSizeScalars;\n}\n\nexport class TransformWidget extends ReglComponent {\n private cursor?: Point.Point;\n\n private xAxis?: AxisLine;\n private yAxis?: AxisLine;\n private zAxis?: AxisLine;\n\n private xArrow?: TriangleMesh;\n private yArrow?: TriangleMesh;\n private zArrow?: TriangleMesh;\n\n private xRotation?: TriangleMesh;\n private xyRotationLine?: RotationLine;\n private xzRotationLine?: RotationLine;\n\n private yRotation?: TriangleMesh;\n private yxRotationLine?: RotationLine;\n private yzRotationLine?: RotationLine;\n\n private zRotation?: TriangleMesh;\n private zxRotationLine?: RotationLine;\n private zyRotationLine?: RotationLine;\n\n private xyTranslation?: TriangleMesh;\n private xzTranslation?: TriangleMesh;\n private yzTranslation?: TriangleMesh;\n\n private disabledAxis: DisabledAxis = {\n xTranslation: false,\n yTranslation: false,\n zTranslation: false,\n xyTranslation: false,\n xzTranslation: false,\n yzTranslation: false,\n xRotation: false,\n yRotation: false,\n zRotation: false,\n };\n\n private axisLines: AxisLine[] = [];\n private rotationLines: RotationLine[] = [];\n private translationMeshes: TriangleMesh[] = [];\n private rotationMeshes: TriangleMesh[] = [];\n private hoveredElement?: Drawable;\n\n private transform?: Matrix4.Matrix4;\n private interactiveBounds?: Rectangle.Rectangle;\n private fullBounds?: Rectangle.Rectangle;\n\n private hoveredChanged = new EventDispatcher<Drawable | undefined>();\n\n private xArrowFillColor?: Color.Color | string;\n private yArrowFillColor?: Color.Color | string;\n private zArrowFillColor?: Color.Color | string;\n\n private twoAxesSquareFillColor?: Color.Color | string;\n\n private hoveredArrowFillColor?: Color.Color | string;\n private outlineColor?: Color.Color | string;\n\n public constructor(\n canvasElement: HTMLCanvasElement,\n private customization: TransformWidgetCustomization = {},\n initialDisabledAxes: Partial<DisabledAxis> = {},\n ) {\n super(canvasElement);\n\n this.xArrowFillColor = customization.colors?.xArrow;\n this.yArrowFillColor = customization.colors?.yArrow;\n this.zArrowFillColor = customization.colors?.zArrow;\n this.hoveredArrowFillColor = customization.colors?.hovered;\n this.outlineColor = customization.colors?.outline;\n\n this.disabledAxis.xTranslation = initialDisabledAxes.xTranslation ?? false;\n this.disabledAxis.yTranslation = initialDisabledAxes.yTranslation ?? false;\n this.disabledAxis.zTranslation = initialDisabledAxes.zTranslation ?? false;\n this.disabledAxis.xyTranslation =\n initialDisabledAxes.xyTranslation ?? false;\n this.disabledAxis.xzTranslation =\n initialDisabledAxes.xzTranslation ?? false;\n this.disabledAxis.yzTranslation =\n initialDisabledAxes.yzTranslation ?? false;\n this.disabledAxis.xRotation = initialDisabledAxes.xRotation ?? false;\n this.disabledAxis.yRotation = initialDisabledAxes.yRotation ?? false;\n this.disabledAxis.zRotation = initialDisabledAxes.zRotation ?? false;\n }\n\n public dispose(): void {\n this.reglFrameDisposable?.cancel();\n }\n\n /**\n * @internal - visible for testing\n */\n public getDrawableElements(): Drawable[] {\n return this.drawableElements;\n }\n\n public getFullBounds(): Rectangle.Rectangle | undefined {\n return this.fullBounds;\n }\n\n public boundsContainsPoint(point: Point.Point): boolean {\n return (\n this.interactiveBounds != null &&\n this.frame != null &&\n Rectangle.containsPoints(this.interactiveBounds, point)\n );\n }\n\n public updateDisabledAxis(axis: Partial<DisabledAxis>): void {\n this.disabledAxis = {\n ...this.disabledAxis,\n ...axis,\n };\n this.updateDisabledOnDrawables();\n }\n\n public updateCursor(cursor?: Point.Point): void {\n this.cursor = cursor;\n\n if (cursor != null && this.frame != null) {\n this.updateHovered();\n } else {\n this.clearHovered();\n }\n }\n\n public updateTransform(transform?: Matrix4.Matrix4): void {\n this.transform = transform;\n\n if (transform != null && this.frame != null) {\n this.updateAndDraw();\n } else {\n this.clear();\n this.reglFrameDisposable?.cancel();\n this.reglFrameDisposable = undefined;\n }\n }\n\n public updateColors(colors: DrawableElementColors = {}): void {\n this.xArrowFillColor = colors.xArrow ?? this.xArrowFillColor;\n this.yArrowFillColor = colors.yArrow ?? this.yArrowFillColor;\n this.zArrowFillColor = colors.zArrow ?? this.zArrowFillColor;\n this.twoAxesSquareFillColor =\n colors.twoAxesSquare ?? this.twoAxesSquareFillColor;\n this.hoveredArrowFillColor = colors.hovered ?? this.hoveredArrowFillColor;\n this.outlineColor = colors.outline ?? this.outlineColor;\n\n this.xArrow?.updateFillColor(this.getXTranslationColor(), true);\n this.yArrow?.updateFillColor(this.getYTranslationColor(), true);\n this.zArrow?.updateFillColor(this.getZTranslationColor(), true);\n this.xRotation?.updateFillColor(this.getXRotationColor(), true);\n this.yRotation?.updateFillColor(this.getYRotationColor(), true);\n this.zRotation?.updateFillColor(this.getZRotationColor(), true);\n this.xyTranslation?.updateFillColor(\n this.getTwoAxesTranslationColor(),\n true,\n );\n this.xzTranslation?.updateFillColor(\n this.getTwoAxesTranslationColor(),\n true,\n );\n this.yzTranslation?.updateFillColor(\n this.getTwoAxesTranslationColor(),\n true,\n );\n\n this.hoveredElement?.updateFillColor(this.hoveredArrowFillColor);\n }\n\n public updateScalars(scalars: DrawableElementSizeScalars): void {\n this.customization = {\n ...this.customization,\n scalars,\n };\n\n if (this.transform != null && this.frame != null) {\n this.updateElements(this.transform, this.frame);\n }\n }\n\n public onHoveredChanged(\n listener: Listener<Drawable | undefined>,\n ): Disposable {\n return this.hoveredChanged.on(listener);\n }\n\n private updateDisabledOnDrawables(): void {\n this.xRotation?.setDisabled(this.disabledAxis.xRotation);\n this.xyRotationLine?.setDisabled(this.disabledAxis.xRotation);\n this.xzRotationLine?.setDisabled(this.disabledAxis.xRotation);\n\n this.yRotation?.setDisabled(this.disabledAxis.yRotation);\n this.yzRotationLine?.setDisabled(this.disabledAxis.yRotation);\n this.yxRotationLine?.setDisabled(this.disabledAxis.yRotation);\n\n this.zRotation?.setDisabled(this.disabledAxis.zRotation);\n this.zxRotationLine?.setDisabled(this.disabledAxis.zRotation);\n this.zyRotationLine?.setDisabled(this.disabledAxis.zRotation);\n\n this.xArrow?.setDisabled(this.disabledAxis.xTranslation);\n this.yArrow?.setDisabled(this.disabledAxis.yTranslation);\n this.zArrow?.setDisabled(this.disabledAxis.zTranslation);\n\n this.xyTranslation?.setDisabled(this.disabledAxis.xyTranslation);\n this.xzTranslation?.setDisabled(this.disabledAxis.xzTranslation);\n this.yzTranslation?.setDisabled(this.disabledAxis.yzTranslation);\n\n this.updateColors();\n }\n\n private updateHovered(): void {\n const previousHovered = this.hoveredElement;\n const currentFrame = this.frame;\n\n if (currentFrame != null) {\n this.hoveredElement = [...this.translationMeshes, ...this.rotationMeshes]\n .filter((el) => el.points.valid && !el.isDisabled())\n .find((m) =>\n this.cursor != null\n ? testDrawable(m, currentFrame, this.viewport, this.cursor)\n : false,\n );\n\n if (this.hoveredElement !== previousHovered) {\n this.hoveredChanged.emit(this.hoveredElement);\n this.hoveredElement?.updateFillColor(this.hoveredArrowFillColor);\n this.clearFillColorOfPreviouslyHovered(previousHovered);\n\n // Set the corresponding arrows to the hover fill color\n // when a 2-axes translation square is hovered over\n if (this.hoveredElement?.identifier === 'xy-translate') {\n this.xArrow?.updateFillColor(this.hoveredArrowFillColor);\n this.yArrow?.updateFillColor(this.hoveredArrowFillColor);\n } else if (this.hoveredElement?.identifier === 'xz-translate') {\n this.xArrow?.updateFillColor(this.hoveredArrowFillColor);\n this.zArrow?.updateFillColor(this.hoveredArrowFillColor);\n } else if (this.hoveredElement?.identifier === 'yz-translate') {\n this.yArrow?.updateFillColor(this.hoveredArrowFillColor);\n this.zArrow?.updateFillColor(this.hoveredArrowFillColor);\n }\n }\n }\n }\n\n private clearHovered(): void {\n const previousHovered = this.hoveredElement;\n this.hoveredElement = undefined;\n\n if (this.hoveredElement !== previousHovered) {\n this.hoveredChanged.emit(this.hoveredElement);\n this.clearFillColorOfPreviouslyHovered(previousHovered);\n }\n }\n\n private clearFillColorOfPreviouslyHovered(previousHovered?: Drawable): void {\n previousHovered?.updateFillColor(previousHovered?.initialFillColor);\n\n // Also clear the hover fill color from the corresponding arrows\n // when a 2-axes translation square is no longer hovered over\n if (previousHovered?.identifier === 'xy-translate') {\n this.xArrow?.updateFillColor(this.xArrow?.initialFillColor);\n this.yArrow?.updateFillColor(this.yArrow?.initialFillColor);\n } else if (previousHovered?.identifier === 'xz-translate') {\n this.xArrow?.updateFillColor(this.xArrow?.initialFillColor);\n this.zArrow?.updateFillColor(this.zArrow?.initialFillColor);\n } else if (previousHovered?.identifier === 'yz-translate') {\n this.yArrow?.updateFillColor(this.yArrow?.initialFillColor);\n this.zArrow?.updateFillColor(this.zArrow?.initialFillColor);\n }\n }\n\n protected hasData(): boolean {\n return this.transform != null;\n }\n\n protected createOrUpdateElements(): void {\n if (this.transform != null && this.frame != null) {\n if (this.xArrow == null || this.yArrow == null || this.zArrow == null) {\n this.createElements(this.transform, this.frame);\n } else {\n this.updateElements(this.transform, this.frame);\n }\n\n this.interactiveBounds = computeDrawable2dBounds(\n this.viewport,\n ...this.rotationMeshes,\n ...this.translationMeshes,\n );\n this.fullBounds = computeDrawable2dBounds(\n this.viewport,\n ...this.rotationMeshes,\n ...this.translationMeshes,\n ...this.axisLines,\n );\n }\n }\n\n private createElements(transform: Matrix4.Matrix4, frame: Frame): void {\n this.reglCommand = regl({\n canvas: this.canvasElement,\n extensions: 'angle_instanced_arrays',\n });\n const { createShape } = shapeBuilder(this.reglCommand);\n\n const triangleSize = this.computeTriangleSize(\n Vector3.fromMatrixPosition(transform),\n frame,\n );\n\n this.xArrow = new TriangleMesh(\n createShape,\n 'x-translate',\n xAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xTranslation,\n ),\n this.outlineColor,\n this.getXTranslationColor(),\n );\n this.xRotation = new TriangleMesh(\n createShape,\n 'x-rotate',\n xAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xRotation,\n this.customization.scalars?.xTranslation,\n ),\n this.outlineColor,\n this.getXRotationColor(),\n );\n this.xAxis = new AxisLine(\n createShape,\n 'x-axis',\n axisPositions(transform, frame.scene.camera, this.xArrow),\n this.outlineColor,\n this.getXTranslationColor(),\n );\n\n this.yArrow = new TriangleMesh(\n createShape,\n 'y-translate',\n yAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yTranslation,\n ),\n this.outlineColor,\n this.getYTranslationColor(),\n );\n this.yRotation = new TriangleMesh(\n createShape,\n 'y-rotate',\n yAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yRotation,\n this.customization.scalars?.yTranslation,\n ),\n this.outlineColor,\n this.getYRotationColor(),\n );\n this.yAxis = new AxisLine(\n createShape,\n 'y-axis',\n axisPositions(transform, frame.scene.camera, this.yArrow),\n this.outlineColor,\n this.getYTranslationColor(),\n );\n\n this.zArrow = new TriangleMesh(\n createShape,\n 'z-translate',\n zAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.zTranslation,\n ),\n this.outlineColor,\n this.getZTranslationColor(),\n );\n this.zAxis = new AxisLine(\n createShape,\n 'z-axis',\n axisPositions(transform, frame.scene.camera, this.zArrow),\n this.outlineColor,\n this.getZTranslationColor(),\n );\n this.zRotation = new TriangleMesh(\n createShape,\n 'z-rotate',\n zAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.zRotation,\n this.customization.scalars?.zTranslation,\n ),\n this.outlineColor,\n this.getZRotationColor(),\n );\n\n this.xyTranslation = new TriangleMesh(\n createShape,\n 'xy-translate',\n xyAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xyTranslation,\n ),\n this.outlineColor,\n this.getTwoAxesTranslationColor(),\n );\n this.xzTranslation = new TriangleMesh(\n createShape,\n 'xz-translate',\n xzAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xzTranslation,\n ),\n this.outlineColor,\n this.getTwoAxesTranslationColor(),\n );\n this.yzTranslation = new TriangleMesh(\n createShape,\n 'yz-translate',\n yzAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yzTranslation,\n ),\n this.outlineColor,\n this.getTwoAxesTranslationColor(),\n );\n\n this.createRotationLines(createShape, transform, frame);\n\n this.axisLines = [this.xAxis, this.yAxis, this.zAxis];\n this.translationMeshes = [\n this.xArrow,\n this.yArrow,\n this.zArrow,\n this.xyTranslation,\n this.xzTranslation,\n this.yzTranslation,\n ];\n this.rotationMeshes = [this.xRotation, this.yRotation, this.zRotation];\n this.updateDisabledOnDrawables();\n\n this.availableElements = [\n ...this.axisLines,\n ...this.rotationLines,\n ...this.translationMeshes,\n ...this.rotationMeshes,\n ];\n }\n\n private getXRotationColor(): Color.Color | string | undefined {\n return this.xArrowFillColor;\n }\n\n private getYRotationColor(): Color.Color | string | undefined {\n return this.yArrowFillColor;\n }\n\n private getZRotationColor(): Color.Color | string | undefined {\n return this.zArrowFillColor;\n }\n\n private getXTranslationColor(): Color.Color | string | undefined {\n return this.xArrowFillColor;\n }\n\n private getYTranslationColor(): Color.Color | string | undefined {\n return this.yArrowFillColor;\n }\n\n private getZTranslationColor(): Color.Color | string | undefined {\n return this.zArrowFillColor;\n }\n\n private getTwoAxesTranslationColor(): Color.Color | string | undefined {\n return this.twoAxesSquareFillColor;\n }\n\n private createRotationLines(\n createShape: CreateShape,\n transform: Matrix4.Matrix4,\n frame: Frame,\n ): void {\n const triangleSize = this.computeTriangleSize(\n Vector3.fromMatrixPosition(transform),\n frame,\n );\n\n const xyRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.xRotation,\n this.yArrow?.points.worldTip,\n triangleSize,\n );\n const xzRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.xRotation,\n this.zArrow?.points.worldTip,\n triangleSize,\n );\n const yxRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.yRotation,\n this.xArrow?.points.worldTip,\n triangleSize,\n );\n const yzRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.yRotation,\n this.zArrow?.points.worldTip,\n triangleSize,\n );\n const zxRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.zRotation,\n this.xArrow?.points.worldTip,\n triangleSize,\n );\n const zyRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.zRotation,\n this.yArrow?.points.worldTip,\n triangleSize,\n );\n\n if (xyRotationLinePoints != null) {\n this.xyRotationLine = new RotationLine(\n createShape,\n 'xy-rotation-line',\n xyRotationLinePoints,\n this.outlineColor,\n );\n }\n if (xzRotationLinePoints != null) {\n this.xzRotationLine = new RotationLine(\n createShape,\n 'xz-rotation-line',\n xzRotationLinePoints,\n this.outlineColor,\n );\n }\n if (yxRotationLinePoints != null) {\n this.yxRotationLine = new RotationLine(\n createShape,\n 'yx-rotation-line',\n yxRotationLinePoints,\n this.outlineColor,\n );\n }\n if (yzRotationLinePoints != null) {\n this.yzRotationLine = new RotationLine(\n createShape,\n 'yz-rotation-line',\n yzRotationLinePoints,\n this.outlineColor,\n );\n }\n if (zxRotationLinePoints != null) {\n this.zxRotationLine = new RotationLine(\n createShape,\n 'zx-rotation-line',\n zxRotationLinePoints,\n this.outlineColor,\n );\n }\n if (zyRotationLinePoints != null) {\n this.zyRotationLine = new RotationLine(\n createShape,\n 'zy-rotation-line',\n zyRotationLinePoints,\n this.outlineColor,\n );\n }\n\n this.rotationLines = [\n this.xyRotationLine,\n this.xzRotationLine,\n this.yxRotationLine,\n this.yzRotationLine,\n this.zxRotationLine,\n this.zyRotationLine,\n ].filter((l) => l != null) as RotationLine[];\n }\n\n private updateElements(transform: Matrix4.Matrix4, frame: Frame): void {\n const triangleSize = this.computeTriangleSize(\n Vector3.fromMatrixPosition(transform),\n frame,\n );\n\n if (this.xArrow != null) {\n this.xArrow.updatePoints(\n xAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xTranslation,\n ),\n );\n this.xAxis?.updatePoints(\n axisPositions(transform, frame.scene.camera, this.xArrow),\n );\n }\n this.xRotation?.updatePoints(\n xAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xRotation,\n this.customization.scalars?.xTranslation,\n ),\n );\n\n if (this.yArrow != null) {\n this.yArrow.updatePoints(\n yAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yTranslation,\n ),\n );\n this.yAxis?.updatePoints(\n axisPositions(transform, frame.scene.camera, this.yArrow),\n );\n }\n this.yRotation?.updatePoints(\n yAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yRotation,\n this.customization.scalars?.yTranslation,\n ),\n );\n\n if (this.zArrow != null) {\n this.zArrow.updatePoints(\n zAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.zTranslation,\n ),\n );\n this.zAxis?.updatePoints(\n axisPositions(transform, frame.scene.camera, this.zArrow),\n );\n }\n this.zRotation?.updatePoints(\n zAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.zRotation,\n this.customization.scalars?.zTranslation,\n ),\n );\n\n this.xyRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.xRotation,\n this.yArrow?.points.worldTip,\n triangleSize,\n ),\n );\n this.xzRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.xRotation,\n this.zArrow?.points.worldTip,\n triangleSize,\n ),\n );\n this.yxRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.yRotation,\n this.xArrow?.points.worldTip,\n triangleSize,\n ),\n );\n this.yzRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.yRotation,\n this.zArrow?.points.worldTip,\n triangleSize,\n ),\n );\n this.zxRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.zRotation,\n this.xArrow?.points.worldTip,\n triangleSize,\n ),\n );\n this.zyRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.zRotation,\n this.yArrow?.points.worldTip,\n triangleSize,\n ),\n );\n\n if (this.xyTranslation != null) {\n this.xyTranslation.updatePoints(\n xyAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xyTranslation,\n ),\n );\n }\n if (this.xzTranslation != null) {\n this.xzTranslation.updatePoints(\n xzAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xzTranslation,\n ),\n );\n }\n if (this.yzTranslation != null) {\n this.yzTranslation.updatePoints(\n yzAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yzTranslation,\n ),\n );\n }\n }\n}\n"]}
|
|
@@ -148,7 +148,7 @@ export class ViewerViewCube {
|
|
|
148
148
|
* @ignore
|
|
149
149
|
*/
|
|
150
150
|
render() {
|
|
151
|
-
return (h(Host, { key: '
|
|
151
|
+
return (h(Host, { key: 'a3cea27b2376c4ffbe255168515b8c3f0e7ab5aa' }, h("vertex-viewer-dom-renderer", { key: '7f1560abaf53c1dc5b8f43b9dade445917861656', ref: (ref) => (this.rendererEl = ref), class: "renderer", camera: this.camera }, !this.triadOff && (h("vertex-viewer-dom-group", { key: '0671f7678ab3197709e98649d0ac36a1703614c6', class: "triad", position: this.triadPosition }, h(TriadAxis, { key: 'b65eddeb99f9b93120246f8143886ac937afb57a', label: "X", length: this.boxLength, rotationAxis: Vector3.origin() }), h(TriadAxis, { key: 'ba49dbda3e18e90e033453d06b509f31336fffe8', label: "Y", length: this.boxLength, rotationAxis: Vector3.back() }), h(TriadAxis, { key: 'ff765198e6e11cc6b7b2d466766809b055c5ccdf', label: "Z", length: this.boxLength, rotationAxis: Vector3.down() }))), h("vertex-viewer-dom-group", { key: '0dd9aab195029c25a3090f35ee39c04ed45da8f8', class: "cube", matrix: this.worldOrientation.matrix }, h(ViewCubeShadow, { key: '995e2af8e70518edcf949d5df72387463ff3cc0e', length: this.boxLength + 10 }), h(ViewCubeSide, { key: '0864a044b3d79b9a483cd492b7a04a20fcf64f42', label: this.zPositiveLabel, length: this.boxLength, side: "front", onPointerDown: this.handleStandardView(StandardView.FRONT), disabled: this.standardViewsOff }), h(ViewCubeSide, { key: '8f9110528267a00b802f97a8543a896d9fc333f7', label: this.zNegativeLabel, length: this.boxLength, side: "back", onPointerDown: this.handleStandardView(StandardView.BACK), disabled: this.standardViewsOff }), h(ViewCubeSide, { key: '6848e1e273bc815ee40e0218cc15bdc80d1f2715', label: this.xNegativeLabel, length: this.boxLength, side: "left", onPointerDown: this.handleStandardView(StandardView.LEFT), disabled: this.standardViewsOff }), h(ViewCubeSide, { key: '825624a992f4d31d9faf7506c8e964392da041ab', label: this.xPositiveLabel, length: this.boxLength, side: "right", onPointerDown: this.handleStandardView(StandardView.RIGHT), disabled: this.standardViewsOff }), h(ViewCubeSide, { key: 'f59f5693ce4f1b4a794f4665b3f920bf29c1f159', label: this.yPositiveLabel, length: this.boxLength, side: "top", onPointerDown: this.handleStandardView(StandardView.TOP), disabled: this.standardViewsOff }), h(ViewCubeSide, { key: '65b8c8a2f8cc5cbc7974ca0dc3e6c328e2ca0649', label: this.yNegativeLabel, length: this.boxLength, side: "bottom", onPointerDown: this.handleStandardView(StandardView.BOTTOM), disabled: this.standardViewsOff }), h(ViewCubeEdge, { key: '0923dfc3696b2c76e69069156c0f57d6cd4f8285', length: this.boxLength, face1Side: "top", face1Edge: "bottom", face2Side: "front", face2Edge: "top", onPointerDown: this.handleStandardView(StandardView.TOP_FRONT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { key: '6bf8058fbb4e35b9a1ed8dc5ff772ed2d2995add', length: this.boxLength, face1Side: "front", face1Edge: "right", face2Side: "right", face2Edge: "left", onPointerDown: this.handleStandardView(StandardView.FRONT_LEFT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { key: '61f28c6cd18661c643ec1510305a8603efbd5cdb', length: this.boxLength, face1Side: "bottom", face1Edge: "top", face2Side: "front", face2Edge: "bottom", onPointerDown: this.handleStandardView(StandardView.BOTTOM_FRONT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { key: '6c62acdf92f6397ec3c381d10078215cf6a29ebb', length: this.boxLength, face1Side: "front", face1Edge: "left", face2Side: "left", face2Edge: "right", onPointerDown: this.handleStandardView(StandardView.FRONT_RIGHT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { key: 'a94dc61cea93cae54e148c4f1ffc73a42717f986', length: this.boxLength, face1Side: "top", face1Edge: "right", face2Side: "right", face2Edge: "top", onPointerDown: this.handleStandardView(StandardView.TOP_LEFT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { key: '4a97659a3aad5b162252091401ec666727d204be', length: this.boxLength, face1Side: "back", face1Edge: "left", face2Side: "right", face2Edge: "right", onPointerDown: this.handleStandardView(StandardView.BACK_LEFT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { key: '422acd7e4689eb7ae0403726a29a3784637bdfd6', length: this.boxLength, face1Side: "bottom", face1Edge: "right", face2Side: "right", face2Edge: "bottom", onPointerDown: this.handleStandardView(StandardView.BOTTOM_LEFT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { key: 'afa5fb1b78c1fcbb78a48f040d5c868a4dd338fc', length: this.boxLength, face1Side: "top", face1Edge: "top", face2Side: "back", face2Edge: "top", onPointerDown: this.handleStandardView(StandardView.TOP_BACK), disabled: this.standardViewsOff }), h(ViewCubeEdge, { key: 'e1aa294c3ed0a6e105929a7094cfbdeab26fe7c0', length: this.boxLength, face1Side: "back", face1Edge: "right", face2Side: "left", face2Edge: "left", onPointerDown: this.handleStandardView(StandardView.BACK_RIGHT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { key: 'e3a83623df735d9987a279ef2e055d1f962cafbe', length: this.boxLength, face1Side: "bottom", face1Edge: "bottom", face2Side: "back", face2Edge: "bottom", onPointerDown: this.handleStandardView(StandardView.BOTTOM_BACK), disabled: this.standardViewsOff }), h(ViewCubeEdge, { key: 'ad1d8915f046ba5df73240489c2daf1703b6a310', length: this.boxLength, face1Side: "top", face1Edge: "left", face2Side: "left", face2Edge: "top", onPointerDown: this.handleStandardView(StandardView.TOP_RIGHT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { key: 'f0b94c0f3517d1f54cf0c23f74fa681607da3532', length: this.boxLength, face1Side: "bottom", face1Edge: "left", face2Side: "left", face2Edge: "bottom", onPointerDown: this.handleStandardView(StandardView.BOTTOM_RIGHT), disabled: this.standardViewsOff }), h(ViewCubeCorner, { key: 'c814db371a4b47ba50084e69879845921eb6ba91', length: this.boxLength, face1Side: "top", face1Corner: "bottom-left", face2Side: "front", face2Corner: "top-left", face3Side: "left", face3Corner: "top-right", onPointerDown: this.handleStandardView(StandardView.TOP_FRONT_RIGHT), disabled: this.standardViewsOff }), h(ViewCubeCorner, { key: 'b0f81f620127d1533eeb675c66d74e1b3019cb3b', length: this.boxLength, face1Side: "top", face1Corner: "bottom-right", face2Side: "front", face2Corner: "top-right", face3Side: "right", face3Corner: "top-left", onPointerDown: this.handleStandardView(StandardView.TOP_FRONT_LEFT), disabled: this.standardViewsOff }), h(ViewCubeCorner, { key: '254834f0214afa786b8997274e0dcbc4f1e5e31c', length: this.boxLength, face1Side: "bottom", face1Corner: "top-right", face2Side: "front", face2Corner: "bottom-right", face3Side: "right", face3Corner: "bottom-left", onPointerDown: this.handleStandardView(StandardView.BOTTOM_FRONT_LEFT), disabled: this.standardViewsOff }), h(ViewCubeCorner, { key: '847425b3886582ddb596408fbfcd2fcd9e424641', length: this.boxLength, face1Side: "bottom", face1Corner: "top-left", face2Side: "front", face2Corner: "bottom-left", face3Side: "left", face3Corner: "bottom-right", onPointerDown: this.handleStandardView(StandardView.BOTTOM_FRONT_RIGHT), disabled: this.standardViewsOff }), h(ViewCubeCorner, { key: 'fe6eaffd1f06fe45a9fa3fb680d638f3623187aa', length: this.boxLength, face1Side: "top", face1Corner: "top-right", face2Side: "back", face2Corner: "top-left", face3Side: "right", face3Corner: "top-right", onPointerDown: this.handleStandardView(StandardView.TOP_BACK_LEFT), disabled: this.standardViewsOff }), h(ViewCubeCorner, { key: 'e4b8004047f4f1da2decc4b17d86297a67e38e9d', length: this.boxLength, face1Side: "top", face1Corner: "top-left", face2Side: "back", face2Corner: "top-right", face3Side: "left", face3Corner: "top-left", onPointerDown: this.handleStandardView(StandardView.TOP_BACK_RIGHT), disabled: this.standardViewsOff }), h(ViewCubeCorner, { key: 'c06a8465a3b39828bf114faaa0039c8e32196441', length: this.boxLength, face1Side: "bottom", face1Corner: "bottom-left", face2Side: "back", face2Corner: "bottom-right", face3Side: "left", face3Corner: "bottom-left", onPointerDown: this.handleStandardView(StandardView.BOTTOM_BACK_RIGHT), disabled: this.standardViewsOff }), h(ViewCubeCorner, { key: '2ea208573579fd18a3b7fde9f0bbc3a5834e2652', length: this.boxLength, face1Side: "bottom", face1Corner: "bottom-right", face2Side: "back", face2Corner: "bottom-left", face3Side: "right", face3Corner: "bottom-right", onPointerDown: this.handleStandardView(StandardView.BOTTOM_BACK_LEFT), disabled: this.standardViewsOff })))));
|
|
152
152
|
}
|
|
153
153
|
static get is() { return "vertex-viewer-view-cube"; }
|
|
154
154
|
static get encapsulation() { return "shadow"; }
|