@realsee/dnalogel 2.22.0-dev.1 → 2.22.0-dev.3
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/index.cjs.js +5 -5
- package/dist/index.js +17 -13
- package/dist/index.umd.js +5 -5
- package/dist/shared-utils/three/PointSelector.d.ts +1 -0
- package/docs/classes/CSS3DRender.html +30 -30
- package/docs/classes/CruisePluginController.html +25 -25
- package/docs/classes/GuideLineItem.GuideLineItem.html +19 -19
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +34 -34
- package/docs/classes/Magnifier.html +19 -19
- package/docs/classes/ModelRoomLabelController.html +10 -10
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +14 -14
- package/docs/classes/PanoMeasurePluginLine.html +26 -26
- package/docs/classes/PanoMeasurePluginModel.html +26 -26
- package/docs/classes/PanoMeasurePluginPoint.html +13 -13
- package/docs/classes/PanoMeasurePluginPolyline.html +26 -26
- package/docs/classes/PanoTagPluginController.html +46 -46
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.Interval.html +11 -11
- package/docs/classes/Util.Magnifier.html +19 -19
- package/docs/classes/Util.PointDomHelper.html +10 -10
- package/docs/classes/Util.PointHelper.html +10 -10
- package/docs/classes/Util.PointSelectorHelper.html +15 -15
- package/docs/classes/Util.Rectangle.html +12 -12
- package/docs/enums/CameraMovementEffect.html +6 -6
- package/docs/enums/ContentType.html +19 -19
- package/docs/enums/DIRECTION.html +8 -8
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +8 -8
- package/docs/enums/DimensionType.html +6 -6
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +7 -7
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +8 -8
- package/docs/enums/PaintBrushTypeEnum.html +7 -7
- package/docs/enums/PointType.html +6 -6
- package/docs/enums/Rotation.html +7 -7
- package/docs/functions/CSS3DRenderPlugin.html +3 -3
- package/docs/functions/CameraMovementPlugin.html +3 -3
- package/docs/functions/CruisePlugin.html +3 -3
- package/docs/functions/GuideLinePlugin.html +4 -4
- package/docs/functions/ItemLabelPlugin.html +3 -3
- package/docs/functions/MapviewFloorplanPlugin.html +3 -3
- package/docs/functions/ModelChassisCompassPlugin.html +3 -3
- package/docs/functions/ModelEntryDoorGuidePlugin.html +3 -3
- package/docs/functions/ModelFloorplanPlugin.html +3 -3
- package/docs/functions/ModelItemLabelPlugin.html +3 -3
- package/docs/functions/ModelRoomLabelPlugin.html +3 -3
- package/docs/functions/ModelTVVideoPlugin.html +3 -3
- package/docs/functions/ModelViewPlugin.html +3 -3
- package/docs/functions/Object3DHelperPlugin.html +3 -3
- package/docs/functions/PanoCompassPlugin.html +3 -3
- package/docs/functions/PanoCursorRaycasterPlugin.html +3 -3
- package/docs/functions/PanoDoorLabelPlugin.html +3 -3
- package/docs/functions/PanoFloorplanRadarPlugin.html +3 -3
- package/docs/functions/PanoMeasurePlugin.html +3 -3
- package/docs/functions/PanoRulerPlugin.html +3 -3
- package/docs/functions/PanoRulerProPlugin.html +3 -3
- package/docs/functions/PanoSpatialTagPlugin.html +3 -3
- package/docs/functions/PanoTagPlugin.html +3 -3
- package/docs/functions/PanoVideoPlugin.html +3 -3
- package/docs/functions/TopviewFloorplanPlugin.html +3 -3
- package/docs/functions/Util.absoluteUrl.html +4 -4
- package/docs/functions/Util.getCoordsFromClient.html +4 -4
- package/docs/functions/Util.getCoordsFromElement.html +4 -4
- package/docs/functions/Util.getFrameTime.html +4 -4
- package/docs/functions/Util.getIntersectFromRelativePosition.html +4 -4
- package/docs/functions/Util.getRaycasterFromFivePointer.html +4 -4
- package/docs/functions/Util.isAbsoluteURL.html +4 -4
- package/docs/functions/Util.isModelLike.html +4 -4
- package/docs/functions/Util.isNil.html +4 -4
- package/docs/functions/Util.isPanoramaLike.html +4 -4
- package/docs/functions/Util.nextFrame.html +4 -4
- package/docs/functions/Util.notNil.html +4 -4
- package/docs/functions/Util.requestAnimationFrameInterval.html +4 -4
- package/docs/functions/Util.tweenProgress.html +4 -4
- package/docs/functions/Util.uuid.html +4 -4
- package/docs/functions/pluginFlag.html +4 -4
- package/docs/index.html +4 -4
- package/docs/interfaces/AddTagConfig.html +5 -5
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +10 -10
- package/docs/interfaces/CSS3DRenderPluginState.html +7 -7
- package/docs/interfaces/CameraMovementPluginExportType.html +6 -6
- package/docs/interfaces/CruisePluginTypes.Config.html +7 -7
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +11 -11
- package/docs/interfaces/CruisePluginTypes.EventMap.html +19 -19
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +11 -11
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +13 -13
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +13 -13
- package/docs/interfaces/CruisePluginTypes.PluginData.html +8 -8
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +6 -6
- package/docs/interfaces/CruisePluginTypes.PluginState.html +10 -10
- package/docs/interfaces/EventMap.html +14 -14
- package/docs/interfaces/FloorplanBounding.html +7 -7
- package/docs/interfaces/FloorplanData.html +9 -9
- package/docs/interfaces/FloorplanEntrance.html +10 -10
- package/docs/interfaces/FloorplanExtraObject.html +9 -9
- package/docs/interfaces/FloorplanExtraObject3D.html +7 -7
- package/docs/interfaces/FloorplanFloorData.html +8 -8
- package/docs/interfaces/FloorplanImagePosition.html +6 -6
- package/docs/interfaces/FloorplanObserver.html +8 -8
- package/docs/interfaces/FloorplanOutlineItem.html +8 -8
- package/docs/interfaces/FloorplanPosition.html +6 -6
- package/docs/interfaces/FloorplanRoomItem.html +12 -12
- package/docs/interfaces/FloorplanRoomLabelItem.html +6 -6
- package/docs/interfaces/FloorplanServerBounding.html +7 -7
- package/docs/interfaces/FloorplanServerComputedData.html +9 -9
- package/docs/interfaces/FloorplanServerData.html +6 -6
- package/docs/interfaces/FloorplanServerDoorItem.html +9 -9
- package/docs/interfaces/FloorplanServerDoorPosition.html +7 -7
- package/docs/interfaces/FloorplanServerEntrance.html +10 -10
- package/docs/interfaces/FloorplanServerFloorData.html +8 -8
- package/docs/interfaces/FloorplanServerImagePosition.html +6 -6
- package/docs/interfaces/FloorplanServerObserver.html +8 -8
- package/docs/interfaces/FloorplanServerOutlineItem.html +8 -8
- package/docs/interfaces/FloorplanServerPosition.html +6 -6
- package/docs/interfaces/FloorplanServerRoomItem.html +13 -13
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +6 -6
- package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +7 -7
- package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +9 -9
- package/docs/interfaces/GuideLinePluginType.EventMap.html +12 -12
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +7 -7
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +5 -5
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +12 -12
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +7 -7
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +17 -17
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +6 -6
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +17 -17
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +4 -4
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +6 -6
- package/docs/interfaces/GuideLinePluginType.PluginState.html +7 -7
- package/docs/interfaces/GuideLinePluginType.Route.html +10 -10
- package/docs/interfaces/GuideLinePluginType.RouteConfig.html +8 -8
- package/docs/interfaces/HelperOffset.html +7 -7
- package/docs/interfaces/ImagePlaneGroup.html +5 -5
- package/docs/interfaces/ItemLabelPluginData.html +5 -5
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +10 -10
- package/docs/interfaces/ItemLabelPluginParametersType.html +8 -8
- package/docs/interfaces/MinMax.html +6 -6
- package/docs/interfaces/ModelChassisCompassPluginData.html +6 -6
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +6 -6
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +7 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +7 -7
- package/docs/interfaces/ModelItemLabelPluginData.html +5 -5
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +10 -10
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +6 -6
- package/docs/interfaces/ModelRoomLabelPluginData.html +5 -5
- package/docs/interfaces/ModelTVVideoPluginData.html +8 -8
- package/docs/interfaces/ModelTVVideoPluginExportType.html +7 -7
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +5 -5
- package/docs/interfaces/ModelViewPluginExportType.html +10 -10
- package/docs/interfaces/Object3DHelperState.html +7 -7
- package/docs/interfaces/ObjectHelperControllers.html +8 -8
- package/docs/interfaces/PaintBrushAction.html +11 -11
- package/docs/interfaces/PaintBrushConfigs.html +11 -11
- package/docs/interfaces/PaintBrushState.html +9 -9
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +9 -9
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +4 -4
- package/docs/interfaces/PanoMeasureParameterType.html +14 -14
- package/docs/interfaces/PanoMeasurePluginLineJson.html +7 -7
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +6 -6
- package/docs/interfaces/PanoMeasurePluginPointJson.html +6 -6
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +7 -7
- package/docs/interfaces/PanoRulerPluginExportType.html +9 -9
- package/docs/interfaces/PanoRulerPluginOptions.html +6 -6
- package/docs/interfaces/PanoRulerPluginParameterType.html +7 -7
- package/docs/interfaces/PanoRulerProPluginExportType.html +8 -8
- package/docs/interfaces/PanoRulerProPluginOptions.html +6 -6
- package/docs/interfaces/PanoRulerProPluginParameterType.html +6 -6
- package/docs/interfaces/PanoRulerProPluginState.html +7 -7
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginData.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +9 -9
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +12 -12
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +9 -9
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +12 -12
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +9 -9
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +5 -5
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +7 -7
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +5 -5
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +8 -8
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +5 -5
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +7 -7
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +9 -9
- package/docs/interfaces/Point.html +7 -7
- package/docs/interfaces/Room.html +8 -8
- package/docs/interfaces/RoomInfo.html +6 -6
- package/docs/interfaces/RoomLabel.html +13 -13
- package/docs/interfaces/RoomRules.html +4 -4
- package/docs/interfaces/Rooms.html +4 -4
- package/docs/interfaces/Scissor.html +8 -8
- package/docs/interfaces/State.html +7 -7
- package/docs/interfaces/TagCacheInterface.html +11 -11
- package/docs/interfaces/TagConfig.html +12 -12
- package/docs/interfaces/TagGLTFObjectGroup.html +5 -5
- package/docs/interfaces/TagIconUrl.html +11 -11
- package/docs/interfaces/TagObjectGroup.html +5 -5
- package/docs/interfaces/TagStyle.html +5 -5
- package/docs/interfaces/Tags.html +8 -8
- package/docs/interfaces/TemporaryState.html +5 -5
- package/docs/interfaces/Util.MagnifierParameter.html +10 -10
- package/docs/interfaces/Util.MouseGroupParameter.html +7 -7
- package/docs/interfaces/Util.PointIntersection.html +7 -7
- package/docs/modules/CruisePluginTypes.html +4 -4
- package/docs/modules/GuideLineItem.html +4 -4
- package/docs/modules/GuideLineModeItem.html +4 -4
- package/docs/modules/GuideLinePluginType.html +4 -4
- package/docs/modules/PanoVideoPluginType.html +4 -4
- package/docs/modules/Util.html +4 -4
- package/docs/modules.html +4 -4
- package/docs/types/ArrayPosition.html +4 -4
- package/docs/types/AudioAppearance.html +4 -4
- package/docs/types/AudioTagTypeConfigKey.html +4 -4
- package/docs/types/CSS3DRenderExportType.html +4 -4
- package/docs/types/CSS3DRenderPluginExportType.html +4 -4
- package/docs/types/CSS3DRenderPluginParameterType.html +4 -4
- package/docs/types/ClassFunctionParameters.html +4 -4
- package/docs/types/Color.html +4 -4
- package/docs/types/ContentTypeConfigKey.html +4 -4
- package/docs/types/ContentTypeConfigKeySplit.html +4 -4
- package/docs/types/ContentTypeMap.html +4 -4
- package/docs/types/Create3DDomContainerReturnType.html +4 -4
- package/docs/types/Create3DElementReturnType.html +4 -4
- package/docs/types/CruisePluginExportType.html +4 -4
- package/docs/types/CruisePluginTypes.CruiseData.html +4 -4
- package/docs/types/CruisePluginTypes.MoveEffect.html +4 -4
- package/docs/types/DeprecatedMediaPlaneProperty.html +4 -4
- package/docs/types/DeprecatedTagProperty.html +4 -4
- package/docs/types/Direction-1.html +4 -4
- package/docs/types/Direction4.html +4 -4
- package/docs/types/ElementRenderer.html +4 -4
- package/docs/types/FloorplanRuleLabels.html +4 -4
- package/docs/types/FloorplanServerRuleLabels.html +4 -4
- package/docs/types/GuideLinePluginExportType.html +4 -4
- package/docs/types/GuideLinePluginType.GuideLineItem.html +4 -4
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +4 -4
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +4 -4
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +4 -4
- package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +4 -4
- package/docs/types/GuideLinePluginType.PathItem.html +4 -4
- package/docs/types/GuideLinePluginType.PluginData.html +4 -4
- package/docs/types/HelperEventMap.html +4 -4
- package/docs/types/LoadTagConfig.html +4 -4
- package/docs/types/MapviewFloorplanPluginParameterType.html +4 -4
- package/docs/types/MapviewFloorplanPluginReturnType.html +4 -4
- package/docs/types/MediaData.html +4 -4
- package/docs/types/MediaStore.html +4 -4
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +4 -4
- package/docs/types/ModelFloorplanPluginParameterType.html +4 -4
- package/docs/types/ModelFloorplanPluginReturnType.html +4 -4
- package/docs/types/ModelRoomLabelPluginParameters.html +4 -4
- package/docs/types/ModelRoomLabelPluginReturnType.html +4 -4
- package/docs/types/MoveArgs.html +4 -4
- package/docs/types/MoveOpts.html +4 -4
- package/docs/types/Object3DHelperEventMap.html +4 -4
- package/docs/types/ObjectFit.html +4 -4
- package/docs/types/PaintBrushEventMap.html +4 -4
- package/docs/types/PanoCompassPluginData.html +4 -4
- package/docs/types/PanoCompassPluginExportType.html +4 -4
- package/docs/types/PanoCompassPluginParameterType.html +4 -4
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +4 -4
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +4 -4
- package/docs/types/PanoIndex.html +4 -4
- package/docs/types/PanoMeasurePluginEvent.html +4 -4
- package/docs/types/PanoMeasureReturnType.html +4 -4
- package/docs/types/PanoSpatialTagPluginId.html +4 -4
- package/docs/types/PanoTagPluginExportInterface.html +4 -4
- package/docs/types/PanoTagPluginParamsInterface.html +4 -4
- package/docs/types/PanoVideoPluginParameterType.html +4 -4
- package/docs/types/PanoVideoPluginReturnType.html +4 -4
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +4 -4
- package/docs/types/PlaneTag.html +4 -4
- package/docs/types/Point2DTag.html +4 -4
- package/docs/types/Point3DTag.html +4 -4
- package/docs/types/PointTag.html +4 -4
- package/docs/types/PointTagInstance.html +4 -4
- package/docs/types/Position.html +4 -4
- package/docs/types/RotateArgs.html +4 -4
- package/docs/types/RotateOpts.html +4 -4
- package/docs/types/RuleLabelsKey.html +4 -4
- package/docs/types/RuleLabelsValue.html +4 -4
- package/docs/types/StickType.html +4 -4
- package/docs/types/Tag.html +4 -4
- package/docs/types/Tag2D.html +4 -4
- package/docs/types/Tag3D.html +4 -4
- package/docs/types/TagContentType.html +4 -4
- package/docs/types/TagDimensionType.html +4 -4
- package/docs/types/TagElement.html +4 -4
- package/docs/types/TagEvents.html +4 -4
- package/docs/types/TagGLTFObject.html +4 -4
- package/docs/types/TagHooks.html +4 -4
- package/docs/types/TagId.html +4 -4
- package/docs/types/TagInstance.html +4 -4
- package/docs/types/TagPointType.html +4 -4
- package/docs/types/TagRendererMap.html +4 -4
- package/docs/types/TopviewFloorplanPluginParameterType.html +4 -4
- package/docs/types/TopviewFloorplanPluginReturnType.html +4 -4
- package/docs/types/WorkCode.html +4 -4
- package/docs/variables/FLOOR_TYPE_MAP.html +4 -4
- package/docs/variables/PLUGIN.html +4 -4
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +4 -4
- package/docs/variables/ROOM_TYPE_MAP.html +4 -4
- package/docs/variables/itemLabelPluginServerParams.html +4 -4
- package/docs/variables/modelItemLabelPluginServerParams.html +4 -4
- package/docs/variables/modelRoomLabelPluginServerParams.html +4 -4
- package/libs/PanoMeasurePlugin/Components/Tip.js +48 -48
- package/libs/PanoMeasurePlugin/Controller/EditController.js +73 -70
- package/libs/PanoMeasurePlugin/utils/dom/base.js +6 -6
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/PointSelector.d.ts +1 -0
- package/libs/shared-utils/three/PointSelector.js +16 -15
- package/package.json +1 -1
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { SvelteComponent as
|
|
2
|
-
import { fade as
|
|
1
|
+
import { SvelteComponent as z, init as D, safe_not_equal as E, append_styles as N, empty as O, insert as M, transition_in as m, transition_out as _, check_outros as P, detach as w, onMount as W, onDestroy as j, element as b, text as A, attr as k, append as y, set_data as B, add_render_callback as F, create_bidirectional_transition as C, group_outros as G, binding_callbacks as H } from "../../vendor/svelte/internal/index.js";
|
|
2
|
+
import { fade as T } from "../../vendor/svelte/transition/index.js";
|
|
3
3
|
import "../../vendor/svelte/easing/index.js";
|
|
4
|
-
function I(
|
|
5
|
-
N(
|
|
4
|
+
function I(l) {
|
|
5
|
+
N(l, "svelte-1q8gtp4", ".Measure-Tips.svelte-1q8gtp4.svelte-1q8gtp4{box-sizing:border-box;position:absolute;pointer-events:none;top:0;width:100%;padding:0 2.5rem}.Measure-Tips.svelte-1q8gtp4 .text.svelte-1q8gtp4{text-align:center;position:relative;max-width:100%;top:3.125rem;color:#fff;word-break:break-all;word-wrap:break-word;text-shadow:0 0.0625rem 0.375rem rgba(0, 0, 0, 0.5);font-size:1.25rem;font-weight:bold}");
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function v(l) {
|
|
8
8
|
let n, i, e, t, r;
|
|
9
9
|
return {
|
|
10
10
|
c() {
|
|
11
11
|
n = b("div"), i = b("div"), e = A(
|
|
12
12
|
/*tip*/
|
|
13
|
-
|
|
14
|
-
),
|
|
13
|
+
l[2]
|
|
14
|
+
), k(i, "class", "text svelte-1q8gtp4"), k(n, "class", "Measure-Tips svelte-1q8gtp4");
|
|
15
15
|
},
|
|
16
|
-
m(
|
|
17
|
-
M(
|
|
16
|
+
m(s, f) {
|
|
17
|
+
M(s, n, f), y(n, i), y(i, e), l[6](i), r = !0;
|
|
18
18
|
},
|
|
19
|
-
p(
|
|
20
|
-
(!r ||
|
|
19
|
+
p(s, f) {
|
|
20
|
+
(!r || f & /*tip*/
|
|
21
21
|
4) && B(
|
|
22
22
|
e,
|
|
23
23
|
/*tip*/
|
|
24
|
-
|
|
24
|
+
s[2]
|
|
25
25
|
);
|
|
26
26
|
},
|
|
27
|
-
i(
|
|
27
|
+
i(s) {
|
|
28
28
|
r || (F(() => {
|
|
29
|
-
r && (t || (t =
|
|
29
|
+
r && (t || (t = C(n, T, {}, !0)), t.run(1));
|
|
30
30
|
}), r = !0);
|
|
31
31
|
},
|
|
32
|
-
o(
|
|
33
|
-
t || (t =
|
|
32
|
+
o(s) {
|
|
33
|
+
t || (t = C(n, T, {}, !1)), t.run(0), r = !1;
|
|
34
34
|
},
|
|
35
|
-
d(
|
|
36
|
-
|
|
35
|
+
d(s) {
|
|
36
|
+
s && w(n), l[6](null), s && t && t.end();
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
function J(
|
|
40
|
+
function J(l) {
|
|
41
41
|
let n, i, e = (
|
|
42
42
|
/*visible*/
|
|
43
|
-
|
|
43
|
+
l[0] && v(l)
|
|
44
44
|
);
|
|
45
45
|
return {
|
|
46
46
|
c() {
|
|
@@ -52,7 +52,7 @@ function J(s) {
|
|
|
52
52
|
p(t, [r]) {
|
|
53
53
|
/*visible*/
|
|
54
54
|
t[0] ? e ? (e.p(t, r), r & /*visible*/
|
|
55
|
-
1 && m(e, 1)) : (e =
|
|
55
|
+
1 && m(e, 1)) : (e = v(t), e.c(), m(e, 1), e.m(n.parentNode, n)) : e && (G(), _(e, 1, 1, () => {
|
|
56
56
|
e = null;
|
|
57
57
|
}), P());
|
|
58
58
|
},
|
|
@@ -67,47 +67,47 @@ function J(s) {
|
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
function K(
|
|
71
|
-
let { measureController: e } = n, { tips: t } = n, { tipStyle: r = {} } = n, { visible:
|
|
72
|
-
const
|
|
73
|
-
const
|
|
70
|
+
function K(l, n, i) {
|
|
71
|
+
let { measureController: e } = n, { tips: t } = n, { tipStyle: r = {} } = n, { visible: s = !0 } = n, f = null;
|
|
72
|
+
const q = (o) => {
|
|
73
|
+
const S = e.currentMeasureType;
|
|
74
74
|
let u = "";
|
|
75
|
-
return u = t[o], u === void 0 && (u = t[
|
|
75
|
+
return u = t[o], u === void 0 && (u = t[S][o]), u;
|
|
76
76
|
}, c = (o) => {
|
|
77
|
-
i(2,
|
|
78
|
-
},
|
|
79
|
-
i(2,
|
|
77
|
+
i(2, p = q(o));
|
|
78
|
+
}, a = () => {
|
|
79
|
+
i(2, p = "");
|
|
80
80
|
};
|
|
81
|
-
let
|
|
82
|
-
const
|
|
83
|
-
o === "Edit" && e.changeMeasureType ? c("start") :
|
|
81
|
+
let p = "";
|
|
82
|
+
const d = (o) => {
|
|
83
|
+
o === "Edit" && e.changeMeasureType ? c("start") : a();
|
|
84
84
|
}, h = () => {
|
|
85
|
-
e.getCurrentMode() === "Watch" &&
|
|
86
|
-
},
|
|
87
|
-
e.currentMeasureType === "area" && (o.length >= 2 ? c("close") : o.length === 0 ? c("start") :
|
|
85
|
+
e.getCurrentMode() === "Watch" && a();
|
|
86
|
+
}, g = (o) => {
|
|
87
|
+
e.currentMeasureType === "area" && (o.length >= 2 ? c("close") : o.length === 0 ? c("start") : a());
|
|
88
88
|
};
|
|
89
89
|
W(() => {
|
|
90
|
-
|
|
90
|
+
d(e.getCurrentMode()), e.hook.on("modeChange", d), e.hook.on("complete", h), e.hook.on("pointsChange", g), e.hook.on("measureTypeChange", a);
|
|
91
91
|
}), j(() => {
|
|
92
|
-
e.hook.off("modeChange",
|
|
92
|
+
e.hook.off("modeChange", d), e.hook.off("complete", h), e.hook.off("pointsChange", g), e.hook.off("measureTypeChange", a), a();
|
|
93
93
|
});
|
|
94
|
-
function
|
|
94
|
+
function x(o) {
|
|
95
95
|
H[o ? "unshift" : "push"](() => {
|
|
96
|
-
|
|
96
|
+
f = o, i(1, f), i(5, r);
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
-
return
|
|
100
|
-
"measureController" in o && i(3, e = o.measureController), "tips" in o && i(4, t = o.tips), "tipStyle" in o && i(5, r = o.tipStyle), "visible" in o && i(0,
|
|
101
|
-
},
|
|
102
|
-
if (
|
|
103
|
-
34 &&
|
|
99
|
+
return l.$$set = (o) => {
|
|
100
|
+
"measureController" in o && i(3, e = o.measureController), "tips" in o && i(4, t = o.tips), "tipStyle" in o && i(5, r = o.tipStyle), "visible" in o && i(0, s = o.visible);
|
|
101
|
+
}, l.$$.update = () => {
|
|
102
|
+
if (l.$$.dirty & /*textDom, tipStyle*/
|
|
103
|
+
34 && f)
|
|
104
104
|
for (const o in r)
|
|
105
|
-
r.hasOwnProperty(o) && i(1,
|
|
106
|
-
}, [
|
|
105
|
+
r.hasOwnProperty(o) && i(1, f.style[o] = r[o], f);
|
|
106
|
+
}, [s, f, p, e, t, r, x];
|
|
107
107
|
}
|
|
108
|
-
class U extends
|
|
108
|
+
class U extends z {
|
|
109
109
|
constructor(n) {
|
|
110
|
-
super(),
|
|
110
|
+
super(), D(
|
|
111
111
|
this,
|
|
112
112
|
n,
|
|
113
113
|
K,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var R = Object.defineProperty;
|
|
2
|
-
var b = (m, c,
|
|
3
|
-
var o = (m, c,
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { throttle as
|
|
2
|
+
var b = (m, c, e) => c in m ? R(m, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[c] = e;
|
|
3
|
+
var o = (m, c, e) => (b(m, typeof c != "symbol" ? c + "" : c, e), e);
|
|
4
|
+
import H from "../Model/line.js";
|
|
5
|
+
import C from "../Model/point.js";
|
|
6
|
+
import { throttle as U } from "../../shared-utils/throttle.js";
|
|
7
7
|
import j from "./BaseController.js";
|
|
8
|
-
import { Polyline as
|
|
8
|
+
import { Polyline as S } from "../Model/polyline.js";
|
|
9
9
|
import D from "../Model/area.js";
|
|
10
10
|
import T from "../utils/isIntersecting.js";
|
|
11
11
|
import { PointSelector as x } from "../../shared-utils/three/PointSelector.js";
|
|
@@ -66,9 +66,9 @@ import "../Modules/DeleteDom/_Assets/delete_bg.png.js";
|
|
|
66
66
|
import "../Modules/DeleteDom/_Assets/delete_hover_bg.png.js";
|
|
67
67
|
const E = () => !1;
|
|
68
68
|
class Xe extends j {
|
|
69
|
-
constructor(
|
|
70
|
-
var
|
|
71
|
-
super(
|
|
69
|
+
constructor(e) {
|
|
70
|
+
var t;
|
|
71
|
+
super(e);
|
|
72
72
|
o(this, "type", "edit");
|
|
73
73
|
o(this, "polyline");
|
|
74
74
|
o(this, "area");
|
|
@@ -80,8 +80,8 @@ class Xe extends j {
|
|
|
80
80
|
o(this, "pointSelector");
|
|
81
81
|
o(this, "deleteDom");
|
|
82
82
|
/** 根据 intersection 更新放大镜和吸附点 */
|
|
83
|
-
o(this, "onIntersectionUpdate",
|
|
84
|
-
this.currentMeasureType === "area" && typeof
|
|
83
|
+
o(this, "onIntersectionUpdate", U((e, t) => {
|
|
84
|
+
this.currentMeasureType === "area" && typeof t == "boolean" && (t ? this.hook.emit("readyComplete") : this.hook.emit("notReadyComplete")), this.updateDashed();
|
|
85
85
|
}, 20));
|
|
86
86
|
/** 撤销编辑 */
|
|
87
87
|
o(this, "revoke", () => {
|
|
@@ -96,23 +96,23 @@ class Xe extends j {
|
|
|
96
96
|
this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.remove(), this.five.needsRender = !0, this.hook.emit("revoke", { isEmpty: !0 });
|
|
97
97
|
return;
|
|
98
98
|
} else
|
|
99
|
-
this.lastPoint = new
|
|
99
|
+
this.lastPoint = new C(this.area.points[this.area.points.length - 1]), this.updateDashed();
|
|
100
100
|
this.five.needsRender = !0;
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
/**
|
|
104
104
|
* @description: 测距的撤销功能
|
|
105
105
|
*/
|
|
106
|
-
o(this, "revokeLine", (
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
109
|
-
this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.remove(), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.needsRender = !0;
|
|
106
|
+
o(this, "revokeLine", (e) => {
|
|
107
|
+
const t = e || this.polyline;
|
|
108
|
+
if (t.lines.length === 0 && this.lastPoint) {
|
|
109
|
+
this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.remove(), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.needsRender = !0, this.hook.emit("pointsChange", []);
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
|
-
if (
|
|
112
|
+
if (t.lines.length === 0 && !this.lastPoint || !this.lastPoint)
|
|
113
113
|
return;
|
|
114
|
-
const i =
|
|
115
|
-
s && (this.lastPoint = s, this.hook.emit("anchorChange", s.position), this.group.remove(i.mesh),
|
|
114
|
+
const i = t.lines[t.lines.length - 1], s = i.findAnotherPoint(this.lastPoint);
|
|
115
|
+
s && (this.lastPoint = s, this.hook.emit("anchorChange", s.position), this.group.remove(i.mesh), t.removeLine(i), i.distanceItem.remove(), this.updateDashed(), this.five.needsRender = !0);
|
|
116
116
|
});
|
|
117
117
|
o(this, "onMouseLeave", () => {
|
|
118
118
|
this.dashed.hide(), this.perpendicularDashed.hide(), this.area.hideArea();
|
|
@@ -123,8 +123,8 @@ class Xe extends j {
|
|
|
123
123
|
});
|
|
124
124
|
o(this, "onWantsSelect", () => {
|
|
125
125
|
if (this.currentMeasureType === "area") {
|
|
126
|
-
const
|
|
127
|
-
if (this.area.points.length >= 3 &&
|
|
126
|
+
const e = this.area.polygon.isBlank || this.area.polygon.visible === !1;
|
|
127
|
+
if (this.area.points.length >= 3 && e)
|
|
128
128
|
return !1;
|
|
129
129
|
}
|
|
130
130
|
});
|
|
@@ -136,26 +136,26 @@ class Xe extends j {
|
|
|
136
136
|
o(this, "onSelect", () => {
|
|
137
137
|
var s, r, l, d;
|
|
138
138
|
this.hasAppendDashed || (this.dashed.distanceItem.appendTo(this.container), this.group.add(this.dashed.mesh), this.currentMeasureType === "area" && this.group.add(this.perpendicularDashed.mesh)), this.hasAppendDashed = !0;
|
|
139
|
-
const
|
|
139
|
+
const e = (() => {
|
|
140
140
|
var a, n;
|
|
141
141
|
if (this.currentMeasureType === "area")
|
|
142
142
|
return this.area.projectPoint((a = this.pointSelector.position) == null ? void 0 : a.point);
|
|
143
143
|
if (this.currentMeasureType === "line")
|
|
144
144
|
return (n = this.pointSelector.position) == null ? void 0 : n.point;
|
|
145
145
|
})();
|
|
146
|
-
if (!
|
|
146
|
+
if (!e)
|
|
147
147
|
return;
|
|
148
|
-
const
|
|
149
|
-
if (!(i != null && i.position &&
|
|
150
|
-
if (this.lastPoint =
|
|
151
|
-
if (
|
|
152
|
-
const n = new
|
|
148
|
+
const t = new C(e), i = this.lastPoint;
|
|
149
|
+
if (!(i != null && i.position && t.position.equals(i == null ? void 0 : i.position))) {
|
|
150
|
+
if (this.lastPoint = t, this.currentMeasureType === "line") {
|
|
151
|
+
if (t && i) {
|
|
152
|
+
const n = new H(i, t, this.model);
|
|
153
153
|
n.distanceItem.setCanSelect(!1), n.distanceItem.appendTo(this.container), this.polyline.addLine(n), this.group.add(n.mesh), n.distanceItem.update(this.five);
|
|
154
154
|
}
|
|
155
155
|
const a = (r = (s = this.editParams) == null ? void 0 : s.autoEndConfig) == null ? void 0 : r.line;
|
|
156
156
|
typeof a == "number" && (this.polyline.getPointLength() >= a ? this.complete() : this.polyline.getPointLength() === a - 1 && this.hook.emit("readyComplete")), this.hook.emit("pointsChange", this.polyline.points);
|
|
157
157
|
} else if (this.currentMeasureType === "area") {
|
|
158
|
-
if (this.area.addPoints(
|
|
158
|
+
if (this.area.addPoints(t.position), this.area.isClosed) {
|
|
159
159
|
this.complete();
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
@@ -163,7 +163,7 @@ class Xe extends j {
|
|
|
163
163
|
const a = (d = (l = this.editParams) == null ? void 0 : l.autoEndConfig) == null ? void 0 : d.area;
|
|
164
164
|
typeof a == "number" && (this.area.points.length >= a ? this.complete() : this.area.points.length === a - 1 && this.hook.emit("readyComplete")), this.hook.emit("pointsChange", this.area.points);
|
|
165
165
|
}
|
|
166
|
-
this.updateDashed(), this.five.needsRender = !0, this.hook.emit("anchorChange",
|
|
166
|
+
this.updateDashed(), this.five.needsRender = !0, this.hook.emit("anchorChange", t.position);
|
|
167
167
|
}
|
|
168
168
|
});
|
|
169
169
|
/** 移动全景时更新 distanceItem 在屏幕上的位置 */
|
|
@@ -175,31 +175,31 @@ class Xe extends j {
|
|
|
175
175
|
var i;
|
|
176
176
|
if (!this.lastPoint)
|
|
177
177
|
return;
|
|
178
|
-
const
|
|
178
|
+
const e = this.lastPoint.position, t = (() => {
|
|
179
179
|
var s, r;
|
|
180
180
|
if (this.currentMeasureType === "area")
|
|
181
181
|
return this.area.projectPoint((s = this.pointSelector.position) == null ? void 0 : s.point);
|
|
182
182
|
if (this.currentMeasureType === "line")
|
|
183
183
|
return (r = this.pointSelector.position) == null ? void 0 : r.point;
|
|
184
184
|
})();
|
|
185
|
-
if (!
|
|
185
|
+
if (!t) {
|
|
186
186
|
this.dashed.hide();
|
|
187
187
|
return;
|
|
188
188
|
}
|
|
189
|
-
if (this.dashed.show(), this.dashed.setPoints(
|
|
189
|
+
if (this.dashed.show(), this.dashed.setPoints(e, t), this.dashed.distanceItem.update(this.five), this.hook.emit("editedDashedLineChange", this.dashed), this.currentMeasureType === "area")
|
|
190
190
|
if (this.area.areaItem.setCanSelect(!1), this.area.points.length >= 2) {
|
|
191
191
|
const s = (i = this.pointSelector.position) == null ? void 0 : i.point;
|
|
192
192
|
if (s) {
|
|
193
|
-
const n = s, g =
|
|
193
|
+
const n = s, g = t;
|
|
194
194
|
this.perpendicularDashed.setPoints(n, g), this.perpendicularDashed.show();
|
|
195
195
|
} else
|
|
196
196
|
this.perpendicularDashed.hide();
|
|
197
|
-
const r = this.area.polyline.lines.map((n) => ({ start: n.points[0].position, end: n.points[1].position })), l = T({ start:
|
|
197
|
+
const r = this.area.polyline.lines.map((n) => ({ start: n.points[0].position, end: n.points[1].position })), l = T({ start: e, end: t }, r), d = T({ start: t, end: this.area.points[0] }, r);
|
|
198
198
|
if (l || d)
|
|
199
199
|
this.area.hideArea(), this.hook.emit("allowAddPointStateChange", "forbid");
|
|
200
200
|
else {
|
|
201
201
|
this.area.showArea();
|
|
202
|
-
const n = [...this.area.points,
|
|
202
|
+
const n = [...this.area.points, t];
|
|
203
203
|
this.area.polygon.updatePoints(n), this.area.areaItem.updateArea(this.five), this.hook.emit("allowAddPointStateChange", "allow");
|
|
204
204
|
}
|
|
205
205
|
} else
|
|
@@ -208,19 +208,19 @@ class Xe extends j {
|
|
|
208
208
|
});
|
|
209
209
|
// ====================================================================================================================================
|
|
210
210
|
// 下面一堆高亮相关
|
|
211
|
-
o(this, "wantsTapGesture", (
|
|
212
|
-
var A,
|
|
211
|
+
o(this, "wantsTapGesture", (e) => {
|
|
212
|
+
var A, k;
|
|
213
213
|
if (this.editParams.pointSelectorMode === "cursor" || this.lastPoint)
|
|
214
214
|
return !1;
|
|
215
|
-
const
|
|
215
|
+
const t = this.model.areas.map((h) => e.intersectObject(h.polygon, !0)[0]).sort((h, p) => h.distance - p.distance), i = (k = (A = t[0]) == null ? void 0 : A.object) == null ? void 0 : k.parent;
|
|
216
216
|
if (i != null && i.isPolygonMesh) {
|
|
217
217
|
const h = this.model.areas.find((p) => p.polygon === i);
|
|
218
218
|
if (h) {
|
|
219
|
-
const { x: p, y: v } =
|
|
219
|
+
const { x: p, y: v } = t[0].point.clone().project(this.five.camera), f = `${(p + 1) / 2 * 100}%`, u = `${(-v + 1) / 2 * 100}%`;
|
|
220
220
|
return this.chooseArea(h, { left: f, top: u }), !1;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
const [s] = this.five.model.intersectRaycaster(
|
|
223
|
+
const [s] = this.five.model.intersectRaycaster(e);
|
|
224
224
|
if (!s)
|
|
225
225
|
return;
|
|
226
226
|
const r = this.five.camera, l = s.point.clone().project(r), d = this.container.clientWidth, a = this.container.clientHeight, n = new y(l.x * d, l.y * a), g = this.model.getAllLines().map((h) => {
|
|
@@ -242,18 +242,19 @@ class Xe extends j {
|
|
|
242
242
|
if (L)
|
|
243
243
|
return this.chooseLine(L), !1;
|
|
244
244
|
});
|
|
245
|
-
o(this, "chooseLine", (
|
|
246
|
-
|
|
247
|
-
|
|
245
|
+
o(this, "chooseLine", (e) => {
|
|
246
|
+
console.log(e);
|
|
247
|
+
const t = B(e);
|
|
248
|
+
this.deleteDom.setTarget(t).setLines(t).updatePosition().show(), this.highlightLines(t), this.hook.emit("selectedChange", t);
|
|
248
249
|
});
|
|
249
|
-
o(this, "chooseArea", (
|
|
250
|
-
console.log("choose area"), this.deleteDom.setTarget(
|
|
250
|
+
o(this, "chooseArea", (e, t) => {
|
|
251
|
+
console.log("choose area"), this.deleteDom.setTarget(e).updatePosition(t.left, `calc(${t.top} - 1.5rem)`).show(), this.highlightArea(e);
|
|
251
252
|
});
|
|
252
|
-
o(this, "deleteArea", (
|
|
253
|
-
this.unHighlightArea(
|
|
253
|
+
o(this, "deleteArea", (e) => {
|
|
254
|
+
this.unHighlightArea(e), e.dispose(), this.deleteDom.hide();
|
|
254
255
|
});
|
|
255
|
-
o(this, "deleteLine", (
|
|
256
|
-
const
|
|
256
|
+
o(this, "deleteLine", (e) => {
|
|
257
|
+
const t = e[0], i = this.model.getPolylineByLine(t);
|
|
257
258
|
i && (this.model.removePolyline(i), i.lines.forEach((s) => this.removeLine(s)), this.deleteDom.setLines([]).hide());
|
|
258
259
|
});
|
|
259
260
|
this.fiveElement = this.five.getElement(), this.deleteDom = new G(this.five, {
|
|
@@ -272,24 +273,24 @@ class Xe extends j {
|
|
|
272
273
|
}).appendTo(this.container), this.pointSelector = new x(this.five, {
|
|
273
274
|
mode: this.editParams.pointSelectorMode,
|
|
274
275
|
pointSelectorHelperParams: { magnifierParams: this.magnifierParams }
|
|
275
|
-
}), this.pointSelector.enable(), this.polyline = new
|
|
276
|
+
}), this.pointSelector.enable(), this.polyline = new S({ model: this.model }), this.area = new D(void 0, {
|
|
276
277
|
five: this.five,
|
|
277
278
|
model: this.model,
|
|
278
279
|
meshContainer: this.group,
|
|
279
280
|
domContainer: this.container
|
|
280
281
|
}), this.model.addPolyline(this.polyline), this.model.addArea(this.area), this.model.getAllLines().forEach((i) => {
|
|
281
|
-
i.distanceItem.appendTo(this.container), i.distanceItem.update(this.five), i.distanceItem.setCanSelect(!0), this.group.add(i.mesh);
|
|
282
|
+
i.distanceItem.appendTo(this.container), i.distanceItem.update(this.five), i.distanceItem.setCanSelect(!0), i.hook.on("selected", this.chooseLine), this.group.add(i.mesh);
|
|
282
283
|
}), this.model.getAllAreas().forEach((i) => {
|
|
283
|
-
i.areaItem.appendTo(this.container), i.areaItem.updateDomPosition(this.five), i.areaItem.setCanSelect(!0), this.group.add(i.polygon), i.polyline.lines.forEach((s) => {
|
|
284
|
+
i.areaItem.appendTo(this.container), i.areaItem.updateDomPosition(this.five), i.areaItem.setCanSelect(!0), i.hook.on("selected", this.chooseArea), this.group.add(i.polygon), i.polyline.lines.forEach((s) => {
|
|
284
285
|
s.distanceItem.appendTo(this.container), s.distanceItem.update(this.five), this.group.add(s.mesh);
|
|
285
286
|
});
|
|
286
|
-
}), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsTapGesture", this.wantsTapGesture), this.five.on("wantsToMoveToPano", E), this.pointSelector.hook.on("intersectionUpdate", this.onIntersectionUpdate), this.pointSelector.hook.on("select", this.onSelect), this.pointSelector.hook.on("wantsSelect", this.onWantsSelect), this.polyline.hook.on("lineAdded", this.onLineChanged), this.polyline.hook.on("lineRemoved", this.onLineChanged), this.five.helperVisible = !1, (
|
|
287
|
+
}), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsTapGesture", this.wantsTapGesture), this.five.on("wantsToMoveToPano", E), this.pointSelector.hook.on("intersectionUpdate", this.onIntersectionUpdate), this.pointSelector.hook.on("select", this.onSelect), this.pointSelector.hook.on("wantsSelect", this.onWantsSelect), this.polyline.hook.on("lineAdded", this.onLineChanged), this.polyline.hook.on("lineRemoved", this.onLineChanged), this.five.helperVisible = !1, (t = this.fiveElement) == null || t.addEventListener("mouseleave", this.onMouseLeave), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.refresh();
|
|
287
288
|
}
|
|
288
289
|
dispose() {
|
|
289
|
-
var
|
|
290
|
-
super.dispose(), this.model.areas.forEach((
|
|
291
|
-
(
|
|
292
|
-
}), this.five.helperVisible = !0, this.pointSelector.disable(), this.dashed.remove(), this.perpendicularDashed.remove(), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsTapGesture", this.wantsTapGesture), this.five.off("wantsToMoveToPano", E), this.pointSelector.hook.off("intersectionUpdate", this.onIntersectionUpdate), this.pointSelector.hook.off("select", this.onSelect), this.polyline.hook.off("lineAdded", this.onLineChanged), this.polyline.hook.off("lineRemoved", this.onLineChanged), (
|
|
290
|
+
var e;
|
|
291
|
+
super.dispose(), this.model.areas.forEach((t) => {
|
|
292
|
+
(t.points.length < 2 || t.polygon.isBlank) && this.model.removeArea(t);
|
|
293
|
+
}), this.five.helperVisible = !0, this.pointSelector.disable(), this.dashed.remove(), this.perpendicularDashed.remove(), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsTapGesture", this.wantsTapGesture), this.five.off("wantsToMoveToPano", E), this.pointSelector.hook.off("intersectionUpdate", this.onIntersectionUpdate), this.pointSelector.hook.off("select", this.onSelect), this.polyline.hook.off("lineAdded", this.onLineChanged), this.polyline.hook.off("lineRemoved", this.onLineChanged), (e = this.fiveElement) == null || e.removeEventListener("mouseleave", this.onMouseLeave), this.magnifier.dispose(), this.dashed.distanceItem.remove(), this.five.needsRender = !0;
|
|
293
294
|
}
|
|
294
295
|
getEditingLines() {
|
|
295
296
|
return this.polyline.lines;
|
|
@@ -298,24 +299,26 @@ class Xe extends j {
|
|
|
298
299
|
this.onSelect();
|
|
299
300
|
}
|
|
300
301
|
complete() {
|
|
301
|
-
this.hook.emit("complete"), this.currentMeasureType === "area" ? (this.area.points.length < 3 ? this.deleteArea(this.area) : (this.area.showArea(), this.area.complete()), this.area = new D(void 0, { five: this.five, model: this.model, meshContainer: this.group, domContainer: this.container }), this.model.addArea(this.area)) : this.currentMeasureType === "line" && (this.polyline
|
|
302
|
+
this.hook.emit("complete"), this.currentMeasureType === "area" ? (this.area.points.length < 3 ? this.deleteArea(this.area) : (this.area.showArea(), this.area.complete(), this.area.hook.on("selected", this.chooseArea)), this.area = new D(void 0, { five: this.five, model: this.model, meshContainer: this.group, domContainer: this.container }), this.model.addArea(this.area)) : this.currentMeasureType === "line" && (this.polyline.lines.forEach((e) => {
|
|
303
|
+
e.hook.on("selected", this.chooseLine), e.distanceItem.setCanSelect(!0);
|
|
304
|
+
}), this.polyline = new S({ model: this.model }), this.model.addPolyline(this.polyline)), this.pointSelector.setAdherePoints(null), this.dashed.hide(), this.perpendicularDashed.hide(), this.lastPoint = void 0;
|
|
302
305
|
}
|
|
303
|
-
highlightArea(
|
|
304
|
-
this.highlightLines(
|
|
306
|
+
highlightArea(e) {
|
|
307
|
+
this.highlightLines(e.polyline.lines), this.five.needsRender = !0;
|
|
305
308
|
}
|
|
306
|
-
unHighlightArea(
|
|
307
|
-
this.unHighlightLines(
|
|
309
|
+
unHighlightArea(e) {
|
|
310
|
+
this.unHighlightLines(e.polyline.lines), this.five.needsRender = !0;
|
|
308
311
|
}
|
|
309
|
-
highlightLines(
|
|
310
|
-
|
|
312
|
+
highlightLines(e) {
|
|
313
|
+
e.forEach((t) => this.highlightLine(t));
|
|
311
314
|
}
|
|
312
|
-
unHighlightLines(
|
|
313
|
-
|
|
314
|
-
|
|
315
|
+
unHighlightLines(e) {
|
|
316
|
+
e.forEach((t) => {
|
|
317
|
+
t.selected = !1, t.distanceItem.unHighlight(), this.group.remove(t.lightMesh), this.five.needsRender = !0;
|
|
315
318
|
});
|
|
316
319
|
}
|
|
317
|
-
highlightLine(
|
|
318
|
-
|
|
320
|
+
highlightLine(e) {
|
|
321
|
+
this.unHighlightLines(this.model.getAllLines()), !e.selected && (e.selected = !0, this.group.add(e.lightMesh), e.distanceItem.highlight(), this.five.needsRender = !0);
|
|
319
322
|
}
|
|
320
323
|
}
|
|
321
324
|
export {
|
|
@@ -2,18 +2,18 @@ var h = Object.defineProperty;
|
|
|
2
2
|
var d = (e, t, i) => t in e ? h(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
3
3
|
var n = (e, t, i) => (d(e, typeof t != "symbol" ? t + "" : t, i), i);
|
|
4
4
|
import { isNDCPointInFront as y } from "../isNDCPointInScreen.js";
|
|
5
|
-
function
|
|
5
|
+
function D(e) {
|
|
6
6
|
const t = document.createElement("div");
|
|
7
7
|
return t.setAttribute(
|
|
8
8
|
"style",
|
|
9
9
|
"backdrop-filter: blur(4px);-webkit-backdrop-filter: blur(4px);-webkit-tap-highlight-color: rgba(0,0,0,0);"
|
|
10
10
|
), t.style.width = "max-content", t.style.padding = "3px 6px", t.style.lineHeight = "1", t.style.textAlign = "center", t.style.transform = "translate(-50%, -50%)", t.style.fontSize = "14px", t.style.color = "#fff", t.style.cursor = "pointer", t.style.userSelect = "none", e != null && e.style && Object.assign(t.style, e == null ? void 0 : e.style), t;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function m(e) {
|
|
13
13
|
const t = document.createElement("div");
|
|
14
|
-
return e != null && e.id && (t.id = e == null ? void 0 : e.id), t.classList.add("five-plugin-measure__distance"), t.style.position = "absolute", t.style.left = "0", t.style.top = "0", t.style.width = "0", t.style.height = "0", t.style.
|
|
14
|
+
return e != null && e.id && (t.id = e == null ? void 0 : e.id), t.classList.add("five-plugin-measure__distance"), t.style.position = "absolute", t.style.left = "0", t.style.top = "0", t.style.width = "0", t.style.height = "0", t.style.transformOrigin = "left top", e != null && e.style && Object.assign(t.style, e.style), t;
|
|
15
15
|
}
|
|
16
|
-
class
|
|
16
|
+
class f {
|
|
17
17
|
constructor(t) {
|
|
18
18
|
n(this, "ndcPosition");
|
|
19
19
|
n(this, "contentDom");
|
|
@@ -24,7 +24,7 @@ class u {
|
|
|
24
24
|
var i, o;
|
|
25
25
|
(o = (i = this.params).clickCallback) == null || o.call(i, t, this);
|
|
26
26
|
});
|
|
27
|
-
this.params = t, this.contentDom =
|
|
27
|
+
this.params = t, this.contentDom = D({ style: t.contentStyle }), this.containerDom = m({ style: t.containerStyle }), this.setCanSelect(!0);
|
|
28
28
|
}
|
|
29
29
|
setCanSelect(t) {
|
|
30
30
|
this.canSelected = t, this.containerDom.style.pointerEvents = t ? "all" : "none";
|
|
@@ -74,5 +74,5 @@ class u {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
export {
|
|
77
|
-
|
|
77
|
+
f as ItemDom
|
|
78
78
|
};
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv2.22.0-dev.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv2.22.0-dev.3",
|
|
4
4
|
[
|
|
5
5
|
"background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
|
|
6
6
|
"background-repeat: no-repeat",
|
|
@@ -12,12 +12,12 @@ var p = (s, e, t) => e in s ? u(s, e, { enumerable: !0, configurable: !0, writab
|
|
|
12
12
|
}, c = (s, e) => v(s, P(e));
|
|
13
13
|
var i = (s, e, t) => (p(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
14
14
|
import { Subscribe as H } from "@realsee/five";
|
|
15
|
-
import { PointSelectorHelper as
|
|
16
|
-
import { isTouchDevice as
|
|
17
|
-
import
|
|
15
|
+
import { PointSelectorHelper as b } from "./PointSelectorHelper.js";
|
|
16
|
+
import { isTouchDevice as y } from "../isTouchDevice.js";
|
|
17
|
+
import F from "hammerjs";
|
|
18
18
|
import { getIntersectionFromEvent as d } from "../getIntersectionFromEvent.js";
|
|
19
|
-
import { Vector3 as
|
|
20
|
-
import { getIntersectFromRelativePosition as
|
|
19
|
+
import { Vector3 as U, Object3D as E, Face3 as M, Vector2 as I, Raycaster as O } from "three";
|
|
20
|
+
import { getIntersectFromRelativePosition as V } from "./getIntersect.js";
|
|
21
21
|
const l = () => !1;
|
|
22
22
|
class W {
|
|
23
23
|
constructor(e, t) {
|
|
@@ -37,6 +37,7 @@ class W {
|
|
|
37
37
|
i(this, "adherePoints", null);
|
|
38
38
|
/** 吸附点的半径 */
|
|
39
39
|
i(this, "adherePointsRadius", 0.1);
|
|
40
|
+
i(this, "lastFiveHelperVisible");
|
|
40
41
|
/**
|
|
41
42
|
* @description: 主动触发一次选点
|
|
42
43
|
* @return: select 是否成功
|
|
@@ -102,7 +103,7 @@ class W {
|
|
|
102
103
|
* @description: 根据鼠标位置更新helper位置
|
|
103
104
|
*/
|
|
104
105
|
i(this, "updateByNdcPosition", (e) => {
|
|
105
|
-
const t =
|
|
106
|
+
const t = V(this.five, e), o = (() => t ? c(a({}, t), { isVirtual: !1 }) : c(a({}, C(this.five, e)), { isVirtual: !0 }))();
|
|
106
107
|
this.updatePointSelectorHelperIntersect(o);
|
|
107
108
|
});
|
|
108
109
|
/**
|
|
@@ -134,12 +135,12 @@ class W {
|
|
|
134
135
|
var n, h;
|
|
135
136
|
this.five = e;
|
|
136
137
|
const o = (n = t == null ? void 0 : t.mode) != null ? n : "auto";
|
|
137
|
-
o === "auto" ? this.mode =
|
|
138
|
+
o === "auto" ? this.mode = y ? "fixed" : "cursor" : this.mode = o;
|
|
138
139
|
const r = {
|
|
139
140
|
autoFixPCPosition: this.mode === "cursor",
|
|
140
141
|
initialPosition: this.mode === "fixed" ? { left: "35%", top: "20%" } : void 0
|
|
141
142
|
};
|
|
142
|
-
this.pointSelectorHelper = new
|
|
143
|
+
this.pointSelectorHelper = new b(e, c(a({}, t == null ? void 0 : t.pointSelectorHelperParams), {
|
|
143
144
|
magnifierParams: a(a({}, r), (h = t == null ? void 0 : t.pointSelectorHelperParams) == null ? void 0 : h.magnifierParams)
|
|
144
145
|
})), this.pointSelectorHelper.hide();
|
|
145
146
|
}
|
|
@@ -153,14 +154,14 @@ class W {
|
|
|
153
154
|
const e = this.five.getElement();
|
|
154
155
|
if (!e)
|
|
155
156
|
throw new Error("five element not found");
|
|
156
|
-
this.hammer || (this.hammer = new
|
|
157
|
+
this.hammer || (this.hammer = new F(e)), this.mode === "cursor" ? (this.five.on("intersectionOnModelUpdate", this.intersectionOnModelUpdate), this.five.on("wantsPanGesture", this.onFiveWantsPanGesture), this.five.on("wantsMoveToPano", l), this.five.on("wantsChangeMode", l), this.five.on("wantsTapGesture", l), this.lastFiveHelperVisible = this.five.helperVisible, this.five.helperVisible = !1, e.addEventListener("mousemove", this.updateByMousePosition), e.addEventListener("mouseenter", this.onEnter), e.addEventListener("mouseout", this.onLeave), this.hammer.on("tap", this.onTap), this.hammer.on("pan", this.onPan), this.hammer.on("press", this.onPress), this.hammer.on("panend", this.onPanEnd)) : this.mode === "fixed" && (this.five.on("panGesture", this.renderScreenCenter), this.five.on("interiaPan", this.renderScreenCenter), this.renderScreenCenter(), this.pointSelectorHelper.show()), this.pointSelectorHelper.hooks.on("intersectionUpdate", this.emitIntersectionUpdate);
|
|
157
158
|
}
|
|
158
159
|
disable() {
|
|
159
160
|
if (!this.enabled)
|
|
160
161
|
return;
|
|
161
162
|
this.enabled = !1, this.pointSelectorHelper.disable();
|
|
162
163
|
const e = this.five.getElement();
|
|
163
|
-
this.five.off("intersectionOnModelUpdate", this.intersectionOnModelUpdate), this.five.off("wantsPanGesture", this.onFiveWantsPanGesture), this.five.off("wantsMoveToPano", l), this.five.off("wantsChangeMode", l), this.five.off("wantsTapGesture", l), e == null || e.removeEventListener("mousemove", this.updateByMousePosition), e == null || e.removeEventListener("mouseenter", this.onEnter), e == null || e.removeEventListener("mouseout", this.onLeave), this.hammer.off("tap", this.onTap), this.hammer.off("pan", this.onPan), this.hammer.off("press", this.onPress), this.hammer.off("panend", this.onPanEnd), this.five.off("panGesture", this.renderScreenCenter), this.five.off("interiaPan", this.renderScreenCenter), this.pointSelectorHelper.hooks.off("intersectionUpdate", this.emitIntersectionUpdate);
|
|
164
|
+
this.five.off("intersectionOnModelUpdate", this.intersectionOnModelUpdate), this.five.off("wantsPanGesture", this.onFiveWantsPanGesture), this.five.off("wantsMoveToPano", l), this.five.off("wantsChangeMode", l), this.five.off("wantsTapGesture", l), this.five.helperVisible = this.lastFiveHelperVisible, e == null || e.removeEventListener("mousemove", this.updateByMousePosition), e == null || e.removeEventListener("mouseenter", this.onEnter), e == null || e.removeEventListener("mouseout", this.onLeave), this.hammer.off("tap", this.onTap), this.hammer.off("pan", this.onPan), this.hammer.off("press", this.onPress), this.hammer.off("panend", this.onPanEnd), this.five.off("panGesture", this.renderScreenCenter), this.five.off("interiaPan", this.renderScreenCenter), this.pointSelectorHelper.hooks.off("intersectionUpdate", this.emitIntersectionUpdate);
|
|
164
165
|
}
|
|
165
166
|
dispose() {
|
|
166
167
|
this.disable(), this.pointSelectorHelper.dispose();
|
|
@@ -169,17 +170,17 @@ class W {
|
|
|
169
170
|
e ? this.adherePoints = Array.isArray(e) ? e : [e] : this.adherePoints = null, typeof t == "number" && (this.adherePointsRadius = t);
|
|
170
171
|
}
|
|
171
172
|
}
|
|
172
|
-
function
|
|
173
|
+
function k(s, e) {
|
|
173
174
|
const { x: t, y: o } = e, r = t * 2 - 1, n = o * 2 - 1, h = new I().fromArray([r, n]), f = new O();
|
|
174
175
|
return f.setFromCamera(h, s.camera), f;
|
|
175
176
|
}
|
|
176
|
-
function
|
|
177
|
-
const t =
|
|
177
|
+
function C(s, e) {
|
|
178
|
+
const t = k(s, e), o = 3, r = new U().addVectors(t.ray.origin, t.ray.direction.clone().normalize().multiplyScalar(o)), n = t.ray.direction.clone().negate();
|
|
178
179
|
return {
|
|
179
180
|
distance: o,
|
|
180
181
|
point: r,
|
|
181
|
-
object: new
|
|
182
|
-
face: new
|
|
182
|
+
object: new E(),
|
|
183
|
+
face: new M(0, 0, 0, n)
|
|
183
184
|
};
|
|
184
185
|
}
|
|
185
186
|
export {
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"repository": "https://github.com/realsee-developer/dnalogel.git",
|
|
8
8
|
"description": "如视 VR 看房插件合集",
|
|
9
9
|
"private": false,
|
|
10
|
-
"version": "2.22.0-dev.
|
|
10
|
+
"version": "2.22.0-dev.3",
|
|
11
11
|
"license": "SEE LICENSE IN TERMS.txt",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"clean": "rm -rf components dist docs libs types ./vite.config.js.timestamp*",
|