@realsee/dnalogel 2.1.1 → 2.1.2-alpha.1
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/README.md +3 -12
- package/components/index.js +242 -569
- package/dist/index.cjs.js +58 -73
- package/dist/index.es.js +7842 -12958
- package/dist/index.js +7842 -12958
- package/dist/index.umd.js +46 -61
- package/docs/assets/highlight.css +3 -3
- package/docs/assets/main.js +4 -2
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +462 -619
- package/docs/classes/CruisePluginController.html +397 -23
- package/docs/classes/Magnifier.html +187 -9
- package/docs/classes/ModelRoomLabelController.html +149 -11
- package/docs/classes/Object3DHelperController.html +356 -0
- package/docs/classes/PaintBrush.html +260 -0
- package/docs/classes/PanoTagPluginController.html +940 -0
- package/docs/classes/Util.BetterTween.html +134 -0
- package/docs/classes/Util.FivePointSelector.html +144 -0
- package/docs/classes/Util.Interval.html +158 -0
- package/docs/classes/Util.Magnifier.html +196 -0
- package/docs/classes/Util.PointDomHelper.html +135 -0
- package/docs/classes/Util.PointHelper.html +127 -0
- package/docs/classes/Util.Rectangle.html +181 -0
- package/docs/enums/CameraMovementEffect.html +70 -3
- package/docs/enums/ContentType.html +116 -0
- package/docs/enums/DIRECTION.html +81 -1
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +81 -1
- package/docs/enums/DimensionType.html +67 -0
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +74 -1
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +81 -1
- package/docs/enums/LinkType.html +67 -0
- package/docs/enums/PaintBrushTypeEnum.html +74 -0
- package/docs/enums/PointType.html +67 -0
- package/docs/enums/Rotation.html +77 -3
- package/docs/functions/CSS3DRenderPlugin.html +233 -0
- package/docs/functions/CameraMovementPlugin.html +237 -0
- package/docs/functions/CruisePlugin.html +233 -0
- package/docs/functions/GuideLinePlugin.html +235 -0
- package/docs/functions/ItemLabelPlugin.html +235 -0
- package/docs/functions/MapviewFloorplanPlugin.html +235 -0
- package/docs/functions/ModelChassisCompassPlugin.html +237 -0
- package/docs/functions/ModelEntryDoorGuidePlugin.html +237 -0
- package/docs/functions/ModelFloorplanPlugin.html +235 -0
- package/docs/functions/ModelItemLabelPlugin.html +235 -0
- package/docs/functions/ModelRoomLabelPlugin.html +233 -0
- package/docs/functions/ModelTVVideoPlugin.html +235 -0
- package/docs/functions/ModelViewPlugin.html +237 -0
- package/docs/functions/Object3DHelperPlugin.html +233 -0
- package/docs/functions/PanoCompassPlugin.html +235 -0
- package/docs/functions/PanoCursorRaycasterPlugin.html +238 -0
- package/docs/functions/PanoDoorLabelPlugin.html +235 -0
- package/docs/functions/PanoFloorplanRadarPlugin.html +235 -0
- package/docs/functions/PanoMeasurePlugin.html +235 -0
- package/docs/functions/PanoRulerPlugin.html +237 -0
- package/docs/functions/PanoRulerProPlugin.html +237 -0
- package/docs/functions/PanoSpatialTagPlugin.html +237 -0
- package/docs/functions/PanoTagPlugin.html +249 -0
- package/docs/functions/TopviewFloorplanPlugin.html +235 -0
- package/docs/functions/Util.getCoordsFromClient.html +78 -0
- package/docs/functions/Util.getCoordsFromElement.html +78 -0
- package/docs/functions/Util.getFrameTime.html +70 -0
- package/docs/functions/Util.getIntersectFromRelativePosition.html +78 -0
- package/docs/functions/Util.getRaycasterFromFivePointer.html +78 -0
- package/docs/functions/Util.isNil.html +79 -0
- package/docs/functions/Util.nextFrame.html +73 -0
- package/docs/functions/Util.notNil.html +78 -0
- package/docs/functions/Util.requestAnimationFrameInterval.html +98 -0
- package/docs/functions/Util.tweenProgress.html +84 -0
- package/docs/functions/pluginFlag.html +233 -0
- package/docs/index.html +222 -9
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +205 -0
- package/docs/interfaces/CSS3DRenderPluginState.html +85 -0
- package/docs/interfaces/CameraMovementPluginExportType.html +111 -17
- package/docs/interfaces/ContentTypeMap.html +212 -0
- package/docs/interfaces/FloorplanBounding.html +89 -10
- package/docs/interfaces/FloorplanData.html +95 -3
- package/docs/interfaces/FloorplanEntrance.html +114 -15
- package/docs/interfaces/FloorplanExtraObject.html +108 -7
- package/docs/interfaces/FloorplanExtraObject3D.html +99 -3
- package/docs/interfaces/FloorplanFloorData.html +88 -3
- package/docs/interfaces/FloorplanImagePosition.html +74 -3
- package/docs/interfaces/FloorplanObserver.html +92 -5
- package/docs/interfaces/FloorplanOutlineItem.html +88 -3
- package/docs/interfaces/FloorplanPosition.html +74 -3
- package/docs/interfaces/FloorplanRoomItem.html +134 -17
- package/docs/interfaces/FloorplanRoomLabelItem.html +78 -7
- package/docs/interfaces/FloorplanServerBounding.html +89 -10
- package/docs/interfaces/FloorplanServerComputedData.html +92 -1
- package/docs/interfaces/FloorplanServerData.html +74 -3
- package/docs/interfaces/FloorplanServerDoorItem.html +92 -1
- package/docs/interfaces/FloorplanServerDoorPosition.html +78 -1
- package/docs/interfaces/FloorplanServerEntrance.html +114 -15
- package/docs/interfaces/FloorplanServerFloorData.html +88 -3
- package/docs/interfaces/FloorplanServerImagePosition.html +74 -3
- package/docs/interfaces/FloorplanServerObserver.html +92 -5
- package/docs/interfaces/FloorplanServerOutlineItem.html +88 -3
- package/docs/interfaces/FloorplanServerPosition.html +74 -3
- package/docs/interfaces/FloorplanServerRoomItem.html +145 -20
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +78 -7
- package/docs/interfaces/ItemLabelPluginData.html +64 -1
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +149 -1
- package/docs/interfaces/ItemLabelPluginParametersType.html +85 -1
- package/docs/interfaces/LineJson.html +71 -1
- package/docs/interfaces/ModelChassisCompassPluginData.html +71 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +107 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +71 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +78 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +115 -1
- package/docs/interfaces/ModelItemLabelPluginData.html +64 -1
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +149 -1
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +71 -1
- package/docs/interfaces/ModelRoomLabelPluginData.html +64 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +85 -1
- package/docs/interfaces/ModelTVVideoPluginExportType.html +109 -1
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +64 -1
- package/docs/interfaces/ModelViewPluginExportType.html +129 -1
- package/docs/interfaces/Object3DHelperState.html +78 -0
- package/docs/interfaces/OpenParameter.html +74 -3
- package/docs/interfaces/PaintBrushAction.html +118 -0
- package/docs/interfaces/PaintBrushConfigs.html +122 -0
- package/docs/interfaces/PaintBrushState.html +99 -0
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +186 -11
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +227 -1
- package/docs/interfaces/PanoMeasureParameterType.html +128 -5
- package/docs/interfaces/PanoRulerPluginExportType.html +138 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +87 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +78 -1
- package/docs/interfaces/PanoRulerProPluginExportType.html +114 -1
- package/docs/interfaces/PanoRulerProPluginOptions.html +84 -1
- package/docs/interfaces/PanoRulerProPluginParameterType.html +71 -1
- package/docs/interfaces/PanoRulerProPluginState.html +78 -1
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +241 -1
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +230 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +114 -1
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +96 -1
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +192 -1
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +92 -1
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +113 -1
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +99 -1
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +92 -1
- package/docs/interfaces/Point.html +78 -1
- package/docs/interfaces/PointJson.html +78 -1
- package/docs/interfaces/Room.html +85 -1
- package/docs/interfaces/RoomInfo.html +71 -1
- package/docs/interfaces/RoomLabel.html +141 -13
- package/docs/interfaces/RoomRules.html +230 -1
- package/docs/interfaces/Rooms.html +230 -1
- package/docs/interfaces/Scissor.html +100 -0
- package/docs/interfaces/TagConfig.html +120 -0
- package/docs/interfaces/Tags.html +89 -0
- package/docs/interfaces/Util.MagnifierParameter.html +116 -0
- package/docs/interfaces/Util.MouseGroupParameter.html +79 -0
- package/docs/modules/Util.html +91 -0
- package/docs/modules.html +425 -36
- package/docs/types/ArrayPosition.html +224 -0
- package/docs/types/CSS3DRenderExportType.html +224 -0
- package/docs/types/CSS3DRenderPluginExportType.html +224 -0
- package/docs/types/CSS3DRenderPluginParameterType.html +224 -0
- package/docs/types/Color.html +224 -0
- package/docs/types/ContentTypeConfigKey.html +224 -0
- package/docs/types/ContentTypeConfigKeyArray.html +224 -0
- package/docs/types/Create3DDomContainerReturnType.html +224 -0
- package/docs/types/Create3DElementReturnType.html +224 -0
- package/docs/types/CruisePluginExportType.html +224 -0
- package/docs/types/Direction-1.html +224 -0
- package/docs/types/Direction4.html +224 -0
- package/docs/types/FloorplanRuleLabels.html +226 -0
- package/docs/types/FloorplanServerRuleLabels.html +224 -0
- package/docs/types/GuideLinePluginExportType.html +224 -0
- package/docs/types/HelperEventMap.html +314 -0
- package/docs/types/MapviewFloorplanPluginParameterType.html +224 -0
- package/docs/types/MapviewFloorplanPluginReturnType.html +224 -0
- package/docs/types/MediaData.html +224 -0
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +224 -0
- package/docs/types/ModelFloorplanPluginParameterType.html +224 -0
- package/docs/types/ModelFloorplanPluginReturnType.html +224 -0
- package/docs/types/ModelRoomLabelPluginParameters.html +224 -0
- package/docs/types/ModelRoomLabelPluginReturnType.html +224 -0
- package/docs/types/MoveArgs.html +226 -0
- package/docs/types/MoveOpts.html +226 -0
- package/docs/types/Object3DHelperEventMap.html +317 -0
- package/docs/types/ObjectFit.html +224 -0
- package/docs/types/PaintBrushEventMap.html +255 -0
- package/docs/types/PanoCompassPluginData.html +224 -0
- package/docs/types/PanoCompassPluginExportType.html +224 -0
- package/docs/types/PanoCompassPluginParameterType.html +224 -0
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +224 -0
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +224 -0
- package/docs/types/PanoMeasurePluginEvent.html +224 -0
- package/docs/types/PanoMeasureReturnType.html +224 -0
- package/docs/types/PanoSpatialTagPluginId.html +224 -0
- package/docs/types/PanoTagPluginExportInterface.html +224 -0
- package/docs/types/PanoTagPluginParamsInterface.html +224 -0
- package/docs/types/PlaneTag.html +233 -0
- package/docs/types/PointTag.html +235 -0
- package/docs/types/Position.html +224 -0
- package/docs/types/RotateArgs.html +226 -0
- package/docs/types/RotateOpts.html +226 -0
- package/docs/types/RuleLabelsKey.html +224 -0
- package/docs/types/RuleLabelsValue.html +224 -0
- package/docs/types/Tag.html +235 -0
- package/docs/types/Tag2D.html +233 -0
- package/docs/types/Tag3D.html +233 -0
- package/docs/types/TagId.html +224 -0
- package/docs/types/TopviewFloorplanPluginParameterType.html +224 -0
- package/docs/types/TopviewFloorplanPluginReturnType.html +224 -0
- package/docs/variables/FLOOR_TYPE_MAP.html +226 -0
- package/docs/variables/PLUGIN.html +224 -0
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +226 -0
- package/docs/variables/ROOM_TYPE_MAP.html +226 -0
- package/docs/variables/VERSION.html +224 -0
- package/docs/variables/itemLabelPluginServerParams.html +231 -0
- package/docs/variables/modelItemLabelPluginServerParams.html +231 -0
- package/docs/variables/modelRoomLabelPluginServerParams.html +231 -0
- package/libs/CSS3DRenderPlugin/CSS3DRender.d.ts +2 -2
- package/libs/CSS3DRenderPlugin/CSS3DRender.js +1 -300
- package/libs/CSS3DRenderPlugin/Controller.d.ts +3 -3
- package/libs/CSS3DRenderPlugin/Controller.js +1 -81
- package/libs/CSS3DRenderPlugin/index.js +1 -14
- package/libs/CSS3DRenderPlugin/typing.js +1 -1
- package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +1 -67
- package/libs/CSS3DRenderPlugin/utils/centerPoint.js +1 -10
- package/libs/CSS3DRenderPlugin/utils/evenNumber.js +1 -7
- package/libs/CSS3DRenderPlugin/utils/index.js +1 -13
- package/libs/CSS3DRenderPlugin/utils/positionToVector3.js +1 -7
- package/libs/CSS3DRenderPlugin/utils/random.js +1 -6
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +1 -71
- package/libs/CameraMovementPlugin/index.js +1 -15
- package/libs/CameraMovementPlugin/typing.js +1 -5
- package/libs/CruisePlugin/Controller.js +1 -440
- package/libs/CruisePlugin/index.js +1 -27
- package/libs/CruisePlugin/utils/coordinatesAngle.js +1 -9
- package/libs/CruisePlugin/utils/coordinatesToVector.js +1 -12
- package/libs/CruisePlugin/utils/formatRad.js +1 -7
- package/libs/CruisePlugin/utils/linerValue.js +1 -7
- package/libs/CruisePlugin/utils/safeCall.js +1 -12
- package/libs/CruisePlugin/utils/sleep.js +1 -10
- package/libs/CruisePlugin/utils/vectorToCoordinates.js +1 -10
- package/libs/GuideLinePlugin/Controller.js +1 -112
- package/libs/GuideLinePlugin/index.js +1 -15
- package/libs/GuideLinePlugin/utils/getArrowMaterial.js +1 -13
- package/libs/GuideLinePlugin/utils/getLineGeometries.js +1 -118
- package/libs/GuideLinePlugin/utils/polyline-normals.d.ts +3 -0
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +1 -254
- package/libs/ItemLabelPlugin/ItemLabelItem.js +2 -133
- package/libs/ItemLabelPlugin/Plugin.js +2 -85
- package/libs/ItemLabelPlugin/index.js +1 -25
- package/libs/ItemLabelPlugin/typings.js +1 -4
- package/libs/ItemLabelPlugin/utils/getLabelTransform.js +1 -4
- package/libs/ItemLabelPlugin/utils/getStrokeLength.js +1 -16
- package/libs/ItemLabelPlugin/utils/isImpacted.js +1 -10
- package/libs/ItemLabelPlugin/utils/parseData.js +1 -10
- package/libs/ItemLabelPlugin/utils/transform2RenderData.js +1 -11
- package/libs/ModelChassisCompassPlugin/Plugin.js +1 -55
- package/libs/ModelChassisCompassPlugin/index.js +1 -10
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +1 -66
- package/libs/ModelEntryDoorGuidePlugin/index.js +1 -11
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +1 -196
- package/libs/ModelItemLabelPlugin/ItemLabelItem.js +2 -42
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +2 -79
- package/libs/ModelItemLabelPlugin/events.type.js +1 -1
- package/libs/ModelItemLabelPlugin/index.js +1 -21
- package/libs/ModelItemLabelPlugin/typings.js +1 -4
- package/libs/ModelItemLabelPlugin/utils/parseData.js +1 -9
- package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.js +1 -4
- package/libs/ModelRoomLabelPlugin/Controller.js +1 -64
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +1 -45
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +1 -151
- package/libs/ModelRoomLabelPlugin/index.js +1 -16
- package/libs/ModelRoomLabelPlugin/utils/parseData.js +1 -16
- package/libs/ModelTVVideoPlugin/Plugin.js +1 -157
- package/libs/ModelTVVideoPlugin/index.js +1 -19
- package/libs/ModelTVVideoPlugin/typings.js +1 -4
- package/libs/ModelTVVideoPlugin/utils/parseData.js +1 -20
- package/libs/ModelViewPlugin/Plugin.js +1 -96
- package/libs/ModelViewPlugin/index.js +1 -8
- package/libs/Object3DHelperPlugin/Controller.d.ts +1 -1
- package/libs/Object3DHelperPlugin/Controller.js +1 -137
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.d.ts +1 -1
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +1 -35
- package/libs/Object3DHelperPlugin/index.js +1 -42
- package/libs/PanoCompassPlugin/Assets/roomInfoIcon.js +1 -4
- package/libs/PanoCompassPlugin/Controller.js +1 -205
- package/libs/PanoCompassPlugin/getRoomInfoInstance.js +1 -24
- package/libs/PanoCompassPlugin/index.js +1 -24
- package/libs/PanoCursorRaycasterPlugin/index.js +1 -60
- package/libs/PanoDoorLabelPlugin/BaseController.js +1 -50
- package/libs/PanoDoorLabelPlugin/Controller.js +1 -215
- package/libs/PanoDoorLabelPlugin/DoorLabelItem.js +1 -65
- package/libs/PanoDoorLabelPlugin/index.d.ts +1 -1
- package/libs/PanoDoorLabelPlugin/index.js +1 -15
- package/libs/PanoDoorLabelPlugin/utils.d.ts +2 -2
- package/libs/PanoDoorLabelPlugin/utils.js +1 -23
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +1 -63
- package/libs/PanoMeasurePlugin/Controller/EditController.js +1 -114
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +1 -138
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +1 -33
- package/libs/PanoMeasurePlugin/Controller/ViewController.js +1 -101
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +1 -169
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/index.js +1 -167
- package/libs/PanoMeasurePlugin/Model/index.d.ts +4 -4
- package/libs/PanoMeasurePlugin/Model/index.js +1 -99
- package/libs/PanoMeasurePlugin/Model/line.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Model/line.js +1 -60
- package/libs/PanoMeasurePlugin/Model/point.js +1 -30
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Model/polyline.js +1 -47
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +2 -5
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +1 -4
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +1 -4
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +3 -67
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +1 -28
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +1 -41
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -103
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +8 -12
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +1 -50
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +1 -36
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +1 -48
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +3 -8
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.js +1 -39
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +1 -70
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +2 -7
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +1 -123
- package/libs/PanoMeasurePlugin/index.js +1 -60
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +1 -12
- package/libs/PanoMeasurePlugin/utils/constants.js +1 -23
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +1 -62
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.js +1 -13
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +1 -16
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +1 -9
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +1 -8
- package/libs/PanoMeasurePlugin/utils/ironbox.js +1 -4
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +1 -7
- package/libs/PanoMeasurePlugin/utils/line.js +1 -18
- package/libs/PanoMeasurePlugin/utils/math.js +1 -13
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +3 -33
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +1 -8
- package/libs/PanoRulerPlugin/Plugin.js +3 -241
- package/libs/PanoRulerPlugin/index.js +1 -11
- package/libs/PanoRulerPlugin/style.js +2 -5
- package/libs/PanoRulerProPlugin/Controller.js +1 -74
- package/libs/PanoRulerProPlugin/RulerItem.js +1 -118
- package/libs/PanoRulerProPlugin/RulerItems.js +1 -181
- package/libs/PanoRulerProPlugin/index.js +1 -17
- package/libs/PanoSpatialTagPlugin/Components/origins.js +1 -82
- package/libs/PanoSpatialTagPlugin/Components/tag.js +1 -124
- package/libs/PanoSpatialTagPlugin/Plugin.js +1 -258
- package/libs/PanoSpatialTagPlugin/index.js +1 -24
- package/libs/PanoSpatialTagPlugin/store.d.ts +1 -1
- package/libs/PanoSpatialTagPlugin/store.js +1 -6
- package/libs/PanoSpatialTagPlugin/style.js +1 -11
- package/libs/PanoSpatialTagPlugin/typings.js +1 -1
- package/libs/PanoTagPlugin/Assets/Icon.js +1 -6
- package/libs/PanoTagPlugin/Components/Common/Arrow.js +1 -103
- package/libs/PanoTagPlugin/Components/Common/Audio.js +1 -163
- package/libs/PanoTagPlugin/Components/Common/Line/Polyline.js +1 -93
- package/libs/PanoTagPlugin/Components/Common/Line/Straight.js +1 -91
- package/libs/PanoTagPlugin/Components/Common/Media.js +1 -3438
- package/libs/PanoTagPlugin/Components/Common/MediaItem.js +1 -139
- package/libs/PanoTagPlugin/Components/Common/MultiLineText.js +1 -181
- package/libs/PanoTagPlugin/Components/Common/Point/CustomPoint.js +1 -52
- package/libs/PanoTagPlugin/Components/Common/Point/DefaultPoint.js +1 -52
- package/libs/PanoTagPlugin/Components/Common/Point/PointSwitch.js +1 -170
- package/libs/PanoTagPlugin/Components/Common/Shadow.js +15 -125
- package/libs/PanoTagPlugin/Components/Common/Text.js +1 -984
- package/libs/PanoTagPlugin/Components/Tag/AudioTag.js +1 -140
- package/libs/PanoTagPlugin/Components/Tag/CustomTag.js +1 -72
- package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +1 -202
- package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +1 -128
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +1 -231
- package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +1 -95
- package/libs/PanoTagPlugin/Components/Tag/TextTag.js +1 -134
- package/libs/PanoTagPlugin/Components/Tag/index.js +2 -308
- package/libs/PanoTagPlugin/Components/TagContainer.js +1 -187
- package/libs/PanoTagPlugin/Components/TagWrapper.js +1 -183
- package/libs/PanoTagPlugin/controller/TagCacheController.js +1 -32
- package/libs/PanoTagPlugin/controller/TagComputer.d.ts +5 -5
- package/libs/PanoTagPlugin/controller/TagComputer.js +1 -15
- package/libs/PanoTagPlugin/controller/index.js +1 -386
- package/libs/PanoTagPlugin/index.js +1 -71
- package/libs/PanoTagPlugin/tag.config.js +1 -44
- package/libs/PanoTagPlugin/typings/controller.js +1 -1
- package/libs/PanoTagPlugin/typings/index.js +1 -7
- package/libs/PanoTagPlugin/typings/tag.js +1 -7
- package/libs/PanoTagPlugin/utils/actionAfterFiveModelLoad.js +1 -6
- package/libs/PanoTagPlugin/utils/addDebugPoints.js +1 -27
- package/libs/PanoTagPlugin/utils/checkRange.d.ts +1 -1
- package/libs/PanoTagPlugin/utils/checkRange.js +1 -10
- package/libs/PanoTagPlugin/utils/constants.js +1 -8
- package/libs/PanoTagPlugin/utils/debounce.js +1 -12
- package/libs/PanoTagPlugin/utils/doUtil.js +1 -12
- package/libs/PanoTagPlugin/utils/index.js +1 -36
- package/libs/PanoTagPlugin/utils/noTypecheck.js +1 -4
- package/libs/PanoTagPlugin/utils/normalPositionToPositions.js +1 -13
- package/libs/PanoTagPlugin/utils/planeNormal.js +1 -11
- package/libs/PanoTagPlugin/utils/resizeObserver.js +1 -17
- package/libs/PanoTagPlugin/utils/search.js +1 -33
- package/libs/PanoTagPlugin/utils/tagPosition.js +1 -13
- package/libs/PanoTagPlugin/utils/throttle.js +1 -11
- package/libs/base/BasePlugin.js +1 -18
- package/libs/base/BasePluginWithData.js +1 -7
- package/libs/components/PaintBrush/Controller.d.ts +2 -2
- package/libs/components/PaintBrush/Controller.js +1 -309
- package/libs/components/PaintBrush/Subscribe.js +1 -47
- package/libs/components/PaintBrush/index.js +1 -52
- package/libs/components/PaintBrush/style.js +2 -5
- package/libs/components/PaintBrush/tween.js +1 -15
- package/libs/components/PaintBrush/typings.js +1 -4
- package/libs/components/PaintBrush/utils.d.ts +1 -1
- package/libs/components/PaintBrush/utils.js +1 -45
- package/libs/components/index.js +1 -13
- package/libs/env.d.ts +1 -0
- package/libs/floorplan/Assets/camera.js +1 -4
- package/libs/floorplan/Assets/compass.js +1 -4
- package/libs/floorplan/Assets/floorplanExtraObject.js +1 -4
- package/libs/floorplan/Components/BaseImage.js +1 -104
- package/libs/floorplan/Components/Camera.js +1 -62
- package/libs/floorplan/Components/Compass.js +1 -60
- package/libs/floorplan/Components/CurrentFloor.js +1 -255
- package/libs/floorplan/Components/Main.js +1 -282
- package/libs/floorplan/Components/Normalmage.js +1 -37
- package/libs/floorplan/Components/RoomHighlight/Room.js +1 -61
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +1 -122
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +1 -152
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +1 -174
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +1 -184
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +1 -37
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +1 -39
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +1 -37
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +1 -134
- package/libs/floorplan/Components/RuleLabels/RuleLabels.js +1 -139
- package/libs/floorplan/Components/SvgImage.js +2 -39
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.d.ts +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +1 -322
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +1 -49
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -318
- package/libs/floorplan/ModelFloorplanPlugin/index.js +1 -49
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +1 -84
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +1 -133
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +1 -72
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +1 -191
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -146
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +1 -26
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -265
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +1 -46
- package/libs/floorplan/constant.js +1 -4
- package/libs/floorplan/index.js +1 -67
- package/libs/floorplan/typings/floorplanData.js +1 -1
- package/libs/floorplan/typings/floorplanServerData.js +1 -101
- package/libs/floorplan/utils/constant.js +1 -8
- package/libs/floorplan/utils/correctFiveState.js +1 -36
- package/libs/floorplan/utils/formatData.js +1 -82
- package/libs/floorplan/utils/formatPosition.js +1 -35
- package/libs/index.js +1 -330
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +1 -155
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +1 -53
- package/libs/shared-utils/Object3DHelper/Constants/color.js +1 -21
- package/libs/shared-utils/Object3DHelper/Controller/CSS3DScaleController.js +1 -29
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +1 -74
- package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +1 -1
- package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +1 -117
- package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +1 -142
- package/libs/shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js +1 -81
- package/libs/shared-utils/Object3DHelper/Helper/HTML/tipsDom.js +1 -31
- package/libs/shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js +1 -14
- package/libs/shared-utils/Object3DHelper/Helper/MoveHelper.js +1 -31
- package/libs/shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js +1 -35
- package/libs/shared-utils/Object3DHelper/Helper/OutlineHelper.js +1 -103
- package/libs/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.js +1 -143
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +1 -137
- package/libs/shared-utils/Object3DHelper/Helper/index.js +1 -30
- package/libs/shared-utils/Object3DHelper/index.js +1 -140
- package/libs/shared-utils/Object3DHelper/typings/Direction.js +1 -1
- package/libs/shared-utils/Object3DHelper/typings/Hooks.js +1 -1
- package/libs/shared-utils/Object3DHelper/typings/Scissor.js +1 -1
- package/libs/shared-utils/Object3DHelper/typings/index.js +1 -1
- package/libs/shared-utils/Object3DHelper/utils/calculateThreeMouse.js +1 -11
- package/libs/shared-utils/Object3DHelper/utils/direction.js +1 -30
- package/libs/shared-utils/Object3DHelper/utils/filterNotColinearPoints.js +1 -18
- package/libs/shared-utils/Object3DHelper/utils/getMouseRaycaster.d.ts +1 -1
- package/libs/shared-utils/Object3DHelper/utils/getMouseRaycaster.js +1 -14
- package/libs/shared-utils/Object3DHelper/utils/getPoint.js +1 -18
- package/libs/shared-utils/Object3DHelper/utils/index.js +1 -29
- package/libs/shared-utils/Object3DHelper/utils/normalPositionToPositions.js +1 -13
- package/libs/shared-utils/Object3DHelper/utils/object3DBoundingPosition.js +1 -5
- package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.d.ts +34 -0
- package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.js +1 -191
- package/libs/shared-utils/Object3DHelper/utils/vectorIsEqual.js +1 -6
- package/libs/shared-utils/Subscribe.js +1 -50
- package/libs/shared-utils/animationFrame/BetterTween.js +1 -6
- package/libs/shared-utils/animationFrame/calculateProgress.js +1 -12
- package/libs/shared-utils/animationFrame/formatRad.js +1 -13
- package/libs/shared-utils/animationFrame/index.js +1 -51
- package/libs/shared-utils/animationFrame/tween.js +1 -30
- package/libs/shared-utils/changeModelCanvasOpacity.js +1 -12
- package/libs/shared-utils/createCanvasTextTexture.js +1 -11
- package/libs/shared-utils/createLine/index.js +1 -9
- package/libs/shared-utils/debounce.js +1 -11
- package/libs/shared-utils/equal.js +1 -54
- package/libs/shared-utils/filter.js +1 -30
- package/libs/shared-utils/five/changeMode.js +1 -21
- package/libs/shared-utils/getPxmm.js +1 -21
- package/libs/shared-utils/index.js +1 -45
- package/libs/shared-utils/isNil.js +1 -10
- package/libs/shared-utils/isTruelyObject.js +1 -6
- package/libs/shared-utils/math/Interval.js +1 -23
- package/libs/shared-utils/math/Rectangle.js +1 -23
- package/libs/shared-utils/math/index.js +1 -6
- package/libs/shared-utils/math/planimetry.d.ts +5 -5
- package/libs/shared-utils/math/planimetry.js +1 -135
- package/libs/shared-utils/math/rad2Deg.js +1 -6
- package/libs/shared-utils/nearlyEqual.js +1 -6
- package/libs/shared-utils/nextFrame.js +1 -6
- package/libs/shared-utils/noop.js +1 -5
- package/libs/shared-utils/object3d2LocalMatrix.js +1 -19
- package/libs/shared-utils/removeArrayItem.d.ts +1 -1
- package/libs/shared-utils/removeArrayItem.js +1 -8
- package/libs/shared-utils/tap.js +1 -6
- package/libs/shared-utils/three/Assets/index.js +1 -5
- package/libs/shared-utils/three/FivePointSelector.d.ts +1 -1
- package/libs/shared-utils/three/FivePointSelector.js +1 -63
- package/libs/shared-utils/three/Magnifier.d.ts +2 -2
- package/libs/shared-utils/three/Magnifier.js +1 -104
- package/libs/shared-utils/three/PointDomHelper.js +1 -68
- package/libs/shared-utils/three/PointHelper.js +3 -60
- package/libs/shared-utils/three/getCoords.js +1 -13
- package/libs/shared-utils/three/getIntersect.d.ts +1 -1
- package/libs/shared-utils/three/getIntersect.js +1 -8
- package/libs/shared-utils/three/getRaycaster.d.ts +1 -1
- package/libs/shared-utils/three/getRaycaster.js +1 -12
- package/libs/shared-utils/three/index.js +1 -33
- package/libs/shared-utils/three/loadTexture.js +1 -10
- package/libs/shared-utils/three/transformPositionToVector3.js +1 -5
- package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +1 -13
- package/libs/shared-utils/throttle.js +1 -11
- package/libs/shared-utils/tinyEJSrender.js +14 -138
- package/libs/shared-utils/to.js +1 -11
- package/libs/shared-utils/uuid.js +1 -10
- package/libs/vendor/swiper/components-shared/get-changed-params.js +1 -0
- package/libs/vendor/swiper/components-shared/get-params.js +1 -0
- package/libs/vendor/swiper/components-shared/mount-swiper.js +1 -0
- package/libs/vendor/swiper/components-shared/params-list.js +1 -0
- package/libs/vendor/swiper/components-shared/update-swiper.js +1 -0
- package/libs/vendor/swiper/components-shared/utils.js +1 -0
- package/libs/vendor/swiper/svelte/swiper-slide.js +1 -0
- package/libs/vendor/swiper/svelte/swiper-svelte.js +1 -0
- package/libs/vendor/swiper/svelte/swiper.js +1 -0
- package/package.json +218 -31
- package/dist/style.css +0 -1
- package/docs/assets/icons.css +0 -1043
- package/docs/assets/icons.png +0 -0
- package/docs/assets/icons@2x.png +0 -0
- package/docs/assets/widgets.png +0 -0
- package/docs/assets/widgets@2x.png +0 -0
- package/docs/interfaces/CSS3DRenderPluginExportType.html +0 -4
- package/libs/CruisePlugin/typing.js +0 -1
- package/libs/GuideLinePlugin/typing.js +0 -1
- package/libs/GuideLinePlugin/utils/getPoint.d.ts +0 -3
- package/libs/GuideLinePlugin/utils/getPoint.js +0 -18
- package/libs/GuideLinePlugin/utils/polyline-normals.d.js +0 -1
- package/libs/ItemLabelPlugin/events.type.js +0 -1
- package/libs/ModelRoomLabelPlugin/typings.js +0 -1
- package/libs/Object3DHelperPlugin/mocks/addObject3D.d.ts +0 -2
- package/libs/Object3DHelperPlugin/mocks/addObject3D.js +0 -1377
- package/libs/Object3DHelperPlugin/mocks/objects.d.ts +0 -7
- package/libs/Object3DHelperPlugin/mocks/objects.js +0 -47
- package/libs/Object3DHelperPlugin/typings.js +0 -1
- package/libs/PanoCompassPlugin/typings.js +0 -1
- package/libs/PanoDoorLabelPlugin/typings.js +0 -1
- package/libs/PanoMeasurePlugin/typings/data.js +0 -1
- package/libs/PanoMeasurePlugin/typings/event.type.js +0 -1
- package/libs/PanoMeasurePlugin/typings/index.js +0 -1
- package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +0 -1
- package/libs/PanoMeasurePlugin/typings/utils.type.js +0 -1
- package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +0 -2
- package/libs/PanoMeasurePlugin/utils/clearGroup.js +0 -6
- package/libs/PanoRulerPlugin/typings.js +0 -1
- package/libs/PanoRulerProPlugin/typings.js +0 -1
- package/libs/PanoTagPlugin/Components/Common/TextItem.js +0 -106
- package/libs/TagComputer.2bc444dc.js +0 -315
- package/libs/floorplan/MapviewFloorplanPlugin/typing.js +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/typing.js +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/typing.js +0 -1
- package/libs/floorplan/TopviewFloorplanPlugin/style.d.ts +0 -1
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +0 -11
- package/libs/floorplan/TopviewFloorplanPlugin/typing.js +0 -1
- package/libs/floorplan/typings/index.js +0 -1
- package/libs/floorplan/typings/utility.js +0 -1
- package/libs/hammer.b5b6115e.js +0 -882
- package/libs/index.164f1850.js +0 -641
- package/libs/index.5d5d1089.js +0 -34
- package/libs/index.6a0eead1.js +0 -12
- package/libs/index.ad783a2f.js +0 -31
- package/libs/index.dca207cb.js +0 -37
- package/libs/index.f2f85d71.js +0 -40
- package/libs/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +0 -1
- package/libs/shared-utils/Object3DHelper/utils/finiteNumber.js +0 -6
- package/libs/shared-utils/Object3DHelper/utils/negateScale.d.ts +0 -2
- package/libs/shared-utils/Object3DHelper/utils/negateScale.js +0 -7
- package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.d.js +0 -4
- package/libs/shared-utils/Preloader.d.ts +0 -6
- package/libs/shared-utils/Preloader.js +0 -18
- package/libs/shared-utils/formatRad.d.ts +0 -7
- package/libs/shared-utils/formatRad.js +0 -7
- package/libs/shared-utils/getRandomColor.d.ts +0 -1
- package/libs/shared-utils/getRandomColor.js +0 -6
- package/libs/shared-utils/logger.d.ts +0 -16
- package/libs/shared-utils/logger.js +0 -27
- package/libs/shared-utils/math/evenNumber.d.ts +0 -3
- package/libs/shared-utils/math/evenNumber.js +0 -7
- package/libs/shared-utils/px2rem.d.ts +0 -1
- package/libs/shared-utils/px2rem.js +0 -6
- package/libs/shared-utils/three/getExtraModelLoader.d.ts +0 -6
- package/libs/shared-utils/three/getExtraModelLoader.js +0 -18
- package/libs/shared-utils/three/getNormal.d.ts +0 -2
- package/libs/shared-utils/three/getNormal.js +0 -7
- package/libs/shared-utils/three/getTextureLoader.d.ts +0 -6
- package/libs/shared-utils/three/getTextureLoader.js +0 -16
- package/libs/shared-utils/three/loadFbxObj.d.ts +0 -2
- package/libs/shared-utils/three/loadFbxObj.js +0 -16
- package/libs/shared-utils/vectorTocoordinates.d.ts +0 -7
- package/libs/shared-utils/vectorTocoordinates.js +0 -10
- package/libs/style.css +0 -1
- package/libs/tween.esm.bad2b2b4.js +0 -340
- package/libs/typings/math.type.js +0 -1
- package/libs/typings/utils.type.d.ts +0 -2
- package/libs/typings/utils.type.js +0 -1
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
try {
|
|
3
|
-
c().then(() => {
|
|
4
|
-
}, () => {
|
|
5
|
-
}).catch(() => {
|
|
6
|
-
});
|
|
7
|
-
} catch {
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
a as safeCall
|
|
12
|
-
};
|
|
1
|
+
"use strict";var n=(t,l,c)=>new Promise((f,h)=>{var y=a=>{try{s(c.next(a))}catch(e){h(e)}},C=a=>{try{s(c.throw(a))}catch(e){h(e)}},s=a=>a.done?f(a.value):Promise.resolve(a.value).then(y,C);s((c=c.apply(t,l)).next())});const i=t=>n(exports,null,function*(){try{t().then(()=>{},()=>{}).catch(()=>{})}catch(l){}});exports.safeCall=i;
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
function n(t) {
|
|
3
|
-
return {
|
|
4
|
-
longitude: a(-Math.atan2(t.x, -t.z)),
|
|
5
|
-
latitude: -Math.asin(t.y / 1)
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
export {
|
|
9
|
-
n as vectorToCoordinates
|
|
10
|
-
};
|
|
1
|
+
"use strict";const a=require("./formatRad.js");function o(t){return{longitude:a.formatRad(-Math.atan2(t.x,-t.z)),latitude:-Math.asin(t.y/1)}}exports.vectorToCoordinates=o;
|
|
@@ -1,112 +1 @@
|
|
|
1
|
-
var w = Object.defineProperty;
|
|
2
|
-
var E = (t, n, e) => n in t ? w(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
|
|
3
|
-
var a = (t, n, e) => (E(t, typeof n != "symbol" ? n + "" : n, e), e);
|
|
4
|
-
import { Controller as L } from "../base/BasePluginWithData.js";
|
|
5
|
-
import * as u from "three";
|
|
6
|
-
import S from "./utils/getLineGeometries.js";
|
|
7
|
-
import { getArrowMaterial as k } from "./utils/getArrowMaterial.js";
|
|
8
|
-
import { notNil as m } from "../shared-utils/isNil.js";
|
|
9
|
-
import x from "../shared-utils/equal.js";
|
|
10
|
-
import "../base/BasePlugin.js";
|
|
11
|
-
import "../shared-utils/Subscribe.js";
|
|
12
|
-
import "../shared-utils/isTruelyObject.js";
|
|
13
|
-
const g = "v1.0.1", G = "GuideLinePlugin", f = `${G}@${g}`, v = (t) => `${f}--${t}`;
|
|
14
|
-
class P extends L {
|
|
15
|
-
constructor(e, i) {
|
|
16
|
-
super(e, i);
|
|
17
|
-
a(this, "state", {
|
|
18
|
-
visible: !1,
|
|
19
|
-
enabled: !0,
|
|
20
|
-
disposed: !1
|
|
21
|
-
});
|
|
22
|
-
a(this, "data");
|
|
23
|
-
a(this, "linesGroup");
|
|
24
|
-
a(this, "disposedErrorLog", () => {
|
|
25
|
-
console.error(`${f} is disposed`);
|
|
26
|
-
});
|
|
27
|
-
a(this, "actionWhenEnabled", (e) => {
|
|
28
|
-
if (this.state.enabled)
|
|
29
|
-
return e();
|
|
30
|
-
});
|
|
31
|
-
Object.assign(window, { [`__${G}_DEBUG__`]: this });
|
|
32
|
-
}
|
|
33
|
-
async load(e, i, s = !0) {
|
|
34
|
-
const o = this.data ? JSON.parse(JSON.stringify(this.data)) : void 0, r = await this.formatData(e);
|
|
35
|
-
this.hooks.emit("dataChange", r, o), this.data = r, this.linesGroup && this.five.scene.remove(this.linesGroup);
|
|
36
|
-
const h = this.getLinesGroup(r.routes);
|
|
37
|
-
!h || (this.linesGroup = h, await this.waitFiveModelLoaded(), this.five.scene.add(h), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), i && this.setState(i), this.five.needsRender = !0, this.hooks.emit("dataLoaded", r), console.log(`${f} loaded`, r));
|
|
38
|
-
}
|
|
39
|
-
async formatData(e) {
|
|
40
|
-
return typeof e == "object" && e !== null && e.version && e.data ? e.data : e;
|
|
41
|
-
}
|
|
42
|
-
async show(e) {
|
|
43
|
-
this.setState({ visible: !0 }, e);
|
|
44
|
-
}
|
|
45
|
-
async hide(e) {
|
|
46
|
-
this.setState({ visible: !1 }, e);
|
|
47
|
-
}
|
|
48
|
-
enable(e) {
|
|
49
|
-
this.setState({ enabled: !0 }, e);
|
|
50
|
-
}
|
|
51
|
-
disable(e) {
|
|
52
|
-
this.setState({ enabled: !1 }, e);
|
|
53
|
-
}
|
|
54
|
-
dispose() {
|
|
55
|
-
this.setState({ disposed: !0 });
|
|
56
|
-
}
|
|
57
|
-
setState(e, i) {
|
|
58
|
-
var o;
|
|
59
|
-
if (this.state.disposed)
|
|
60
|
-
return this.disposedErrorLog();
|
|
61
|
-
const s = { ...this.state };
|
|
62
|
-
this.state = { ...this.state, ...e }, e.disposed !== void 0 && e.disposed !== s.disposed && e.disposed && this.handleDispose(), e.visible !== void 0 && e.visible !== s.visible && this.handleVisible(e.visible, i == null ? void 0 : i.userAction), e.enabled !== void 0 && e.enabled !== s.enabled && this.handleEnable(e.enabled, i == null ? void 0 : i.userAction), x(s, this.state, { deep: !0 }) || (this.hooks.emit("stateChange", { state: this.state, prevState: s, userAction: (o = i == null ? void 0 : i.userAction) != null ? o : !0 }), this.five.needsRender = !0);
|
|
63
|
-
}
|
|
64
|
-
handleEnable(e, i = !0) {
|
|
65
|
-
this.linesGroup && (e ? (this.five.scene.add(this.linesGroup), this.actionWhenEnabled(() => this.hooks.emit("enable", { userAction: i }))) : (this.five.scene.remove(this.linesGroup), this.hooks.emit("disable", { userAction: i })));
|
|
66
|
-
}
|
|
67
|
-
handleVisible(e, i = !0) {
|
|
68
|
-
this.linesGroup && (e ? (this.linesGroup.visible = !0, this.actionWhenEnabled(() => this.hooks.emit("show", { userAction: i }))) : (this.linesGroup.visible = !1, this.actionWhenEnabled(() => this.hooks.emit("hide", { userAction: i }))));
|
|
69
|
-
}
|
|
70
|
-
handleDispose() {
|
|
71
|
-
this.linesGroup && this.five.scene.add(this.linesGroup);
|
|
72
|
-
}
|
|
73
|
-
getLinesGroup(e) {
|
|
74
|
-
const i = e.map(this.getLine.bind(this)).filter(m), s = new u.Group();
|
|
75
|
-
if (s.name = v("route-group"), i.length !== 0)
|
|
76
|
-
return s.add(...i), s;
|
|
77
|
-
}
|
|
78
|
-
getLine(e) {
|
|
79
|
-
var h, c, p, b;
|
|
80
|
-
const i = new u.Group(), s = e.panoIndexList.map((l) => {
|
|
81
|
-
var d;
|
|
82
|
-
return (d = this.five.work.observers[l]) == null ? void 0 : d.standingPosition;
|
|
83
|
-
}).filter(m), o = S(s, {
|
|
84
|
-
skipPanoIndexMesh: (h = e.skipPanoIndexMesh) != null ? h : !0,
|
|
85
|
-
unitWidth: (c = e.unitWidth) != null ? c : 0.6,
|
|
86
|
-
unitHeight: (p = e.unitHeight) != null ? p : 0.4
|
|
87
|
-
});
|
|
88
|
-
if (!o)
|
|
89
|
-
return;
|
|
90
|
-
const r = k({ textureUrl: (b = e.arrowTextureUrl) != null ? b : this.staticPrefix + "/release/web/arrow6.b6ce0c62.png" });
|
|
91
|
-
return o.forEach((l) => {
|
|
92
|
-
const d = new u.Mesh(l, r);
|
|
93
|
-
d.name = v("route-line-mesh"), i.add(d);
|
|
94
|
-
}), i;
|
|
95
|
-
}
|
|
96
|
-
async waitFiveModelLoaded() {
|
|
97
|
-
return new Promise((e) => {
|
|
98
|
-
if (this.five.model.loaded) {
|
|
99
|
-
e();
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
this.five.once("modelLoaded", () => {
|
|
103
|
-
e();
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
a(P, "lasestVersion", g);
|
|
109
|
-
export {
|
|
110
|
-
P as default,
|
|
111
|
-
v as pluginFlag
|
|
112
|
-
};
|
|
1
|
+
"use strict";var S=Object.defineProperty;var G=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var p=(t,s,e)=>s in t?S(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,f=(t,s)=>{for(var e in s||(s={}))j.call(s,e)&&p(t,e,s[e]);if(G)for(var e of G(s))k.call(s,e)&&p(t,e,s[e]);return t};var d=(t,s,e)=>(p(t,typeof s!="symbol"?s+"":s,e),e);var u=(t,s,e)=>new Promise((i,n)=>{var o=a=>{try{r(e.next(a))}catch(h){n(h)}},l=a=>{try{r(e.throw(a))}catch(h){n(h)}},r=a=>a.done?i(a.value):Promise.resolve(a.value).then(o,l);r((e=e.apply(t,s)).next())});const M=require("../base/BasePluginWithData.js"),N=require("three"),y=require("./utils/getLineGeometries.js"),q=require("./utils/getArrowMaterial.js"),w=require("../shared-utils/isNil.js"),O=require("../shared-utils/equal.js");function W(t){if(t&&t.__esModule)return t;const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(s,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return s.default=t,Object.freeze(s)}const g=W(N),_="v1.0.1",E="GuideLinePlugin",m=`${E}@${_}`,L=t=>`${m}--${t}`;class P extends M.Controller{constructor(e,i){super(e,i);d(this,"state",{visible:!1,enabled:!0,disposed:!1});d(this,"data");d(this,"linesGroup");d(this,"disposedErrorLog",()=>{console.error(`${m} is disposed`)});d(this,"actionWhenEnabled",e=>{if(this.state.enabled)return e()});Object.assign(window,{[`__${E}_DEBUG__`]:this})}load(e,i,n=!0){return u(this,null,function*(){const o=this.data?JSON.parse(JSON.stringify(this.data)):void 0,l=yield this.formatData(e);this.hooks.emit("dataChange",l,o),this.data=l,this.linesGroup&&this.five.scene.remove(this.linesGroup);const r=this.getLinesGroup(l.routes);!r||(this.linesGroup=r,yield this.waitFiveModelLoaded(),this.five.scene.add(r),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),i&&this.setState(i),this.five.needsRender=!0,this.hooks.emit("dataLoaded",l),console.log(`${m} loaded`,l))})}formatData(e){return u(this,null,function*(){return typeof e=="object"&&e!==null&&e.version&&e.data?e.data:e})}show(e){return u(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return u(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,i){var o;if(this.state.disposed)return this.disposedErrorLog();const n=f({},this.state);this.state=f(f({},this.state),e),e.disposed!==void 0&&e.disposed!==n.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==n.visible&&this.handleVisible(e.visible,i==null?void 0:i.userAction),e.enabled!==void 0&&e.enabled!==n.enabled&&this.handleEnable(e.enabled,i==null?void 0:i.userAction),O.equal(n,this.state,{deep:!0})||(this.hooks.emit("stateChange",{state:this.state,prevState:n,userAction:(o=i==null?void 0:i.userAction)!=null?o:!0}),this.five.needsRender=!0)}handleEnable(e,i=!0){this.linesGroup&&(e?(this.five.scene.add(this.linesGroup),this.actionWhenEnabled(()=>this.hooks.emit("enable",{userAction:i}))):(this.five.scene.remove(this.linesGroup),this.hooks.emit("disable",{userAction:i})))}handleVisible(e,i=!0){this.linesGroup&&(e?(this.linesGroup.visible=!0,this.actionWhenEnabled(()=>this.hooks.emit("show",{userAction:i}))):(this.linesGroup.visible=!1,this.actionWhenEnabled(()=>this.hooks.emit("hide",{userAction:i}))))}handleDispose(){this.linesGroup&&this.five.scene.add(this.linesGroup)}getLinesGroup(e){const i=e.map(this.getLine.bind(this)).filter(w.notNil),n=new g.Group;if(n.name=L("route-group"),i.length!==0)return n.add(...i),n}getLine(e){var r,a,h,v;const i=new g.Group,n=e.panoIndexList.map(b=>{var c;return(c=this.five.work.observers[b])==null?void 0:c.standingPosition}).filter(w.notNil),o=y.getLineGeometries(n,{skipPanoIndexMesh:(r=e.skipPanoIndexMesh)!=null?r:!0,unitWidth:(a=e.unitWidth)!=null?a:.6,unitHeight:(h=e.unitHeight)!=null?h:.4});if(!o)return;const l=q.getArrowMaterial({textureUrl:(v=e.arrowTextureUrl)!=null?v:this.staticPrefix+"/release/web/arrow6.b6ce0c62.png"});return o.forEach(b=>{const c=new g.Mesh(b,l);c.name=L("route-line-mesh"),i.add(c)}),i}waitFiveModelLoaded(){return u(this,null,function*(){return new Promise(e=>{if(this.five.model.loaded){e();return}this.five.once("modelLoaded",()=>{e()})})})}}d(P,"lasestVersion",_);exports.Controller=P;
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import "../base/BasePluginWithData.js";
|
|
3
|
-
import "../base/BasePlugin.js";
|
|
4
|
-
import "../shared-utils/Subscribe.js";
|
|
5
|
-
import "three";
|
|
6
|
-
import "./utils/getLineGeometries.js";
|
|
7
|
-
import "./utils/getArrowMaterial.js";
|
|
8
|
-
import "../shared-utils/isNil.js";
|
|
9
|
-
import "../shared-utils/equal.js";
|
|
10
|
-
import "../shared-utils/isTruelyObject.js";
|
|
11
|
-
const s = (o, r) => new t(o, r);
|
|
12
|
-
export {
|
|
13
|
-
s as GuideLinePlugin,
|
|
14
|
-
s as default
|
|
15
|
-
};
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("./Controller.js");require("../base/BasePluginWithData.js");require("../base/BasePlugin.js");require("../shared-utils/Subscribe.js");require("three");require("./utils/getLineGeometries.js");require("polyline-normals");require("./utils/getArrowMaterial.js");require("../shared-utils/isNil.js");require("../shared-utils/equal.js");require("../shared-utils/isTruelyObject.js");const e=(r,i)=>new u.Controller(r,i);exports.GuideLinePlugin=e;exports.default=e;
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
function o(e) {
|
|
3
|
-
const r = new a.TextureLoader().load(e.textureUrl);
|
|
4
|
-
return r.wrapS = r.wrapT = a.RepeatWrapping, r.encoding = a.sRGBEncoding, new a.MeshBasicMaterial({
|
|
5
|
-
color: 16777215,
|
|
6
|
-
map: r,
|
|
7
|
-
transparent: !0,
|
|
8
|
-
opacity: 0.8
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
o as getArrowMaterial
|
|
13
|
-
};
|
|
1
|
+
"use strict";const o=require("three");function c(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const a=c(o);function i(e){const t=new a.TextureLoader().load(e.textureUrl);return t.wrapS=t.wrapT=a.RepeatWrapping,t.encoding=a.sRGBEncoding,new a.MeshBasicMaterial({color:16777215,map:t,transparent:!0,opacity:.8})}exports.getArrowMaterial=i;
|
|
@@ -1,118 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { Vector3 as z } from "three";
|
|
3
|
-
var U = {}, D = H;
|
|
4
|
-
function H(e, t, r) {
|
|
5
|
-
return e[0] = t[0] + r[0], e[1] = t[1] + r[1], e;
|
|
6
|
-
}
|
|
7
|
-
var k = q;
|
|
8
|
-
function q(e, t, r) {
|
|
9
|
-
return e[0] = t, e[1] = r, e;
|
|
10
|
-
}
|
|
11
|
-
var S = W;
|
|
12
|
-
function W(e, t) {
|
|
13
|
-
var r = t[0], o = t[1], i = r * r + o * o;
|
|
14
|
-
return i > 0 && (i = 1 / Math.sqrt(i), e[0] = t[0] * i, e[1] = t[1] * i), e;
|
|
15
|
-
}
|
|
16
|
-
var Y = Z;
|
|
17
|
-
function Z(e, t, r) {
|
|
18
|
-
return e[0] = t[0] - r[0], e[1] = t[1] - r[1], e;
|
|
19
|
-
}
|
|
20
|
-
var j = J;
|
|
21
|
-
function J(e, t) {
|
|
22
|
-
return e[0] * t[0] + e[1] * t[1];
|
|
23
|
-
}
|
|
24
|
-
var K = D, O = k, C = S, Q = Y, ee = j, V = [0, 0];
|
|
25
|
-
U.computeMiter = function(t, r, o, i, a) {
|
|
26
|
-
return K(t, o, i), C(t, t), O(r, -t[1], t[0]), O(V, -o[1], o[0]), a / ee(r, V);
|
|
27
|
-
};
|
|
28
|
-
U.normal = function(t, r) {
|
|
29
|
-
return O(t, -r[1], r[0]), t;
|
|
30
|
-
};
|
|
31
|
-
U.direction = function(t, r, o) {
|
|
32
|
-
return Q(t, r, o), C(t, t), t;
|
|
33
|
-
};
|
|
34
|
-
var f = U, b = [0, 0], P = [0, 0], F = [0, 0], A = [0, 0], te = function(e, t) {
|
|
35
|
-
var r = null, o = [];
|
|
36
|
-
t && (e = e.slice(), e.push(e[0]));
|
|
37
|
-
for (var i = e.length, a = 1; a < i; a++) {
|
|
38
|
-
var y = e[a - 1], M = e[a], x = a < e.length - 1 ? e[a + 1] : null;
|
|
39
|
-
if (f.direction(b, M, y), r || (r = [0, 0], f.normal(r, b)), a === 1 && L(o, r, 1), !x)
|
|
40
|
-
f.normal(r, b), L(o, r, 1);
|
|
41
|
-
else {
|
|
42
|
-
f.direction(P, x, M);
|
|
43
|
-
var h = f.computeMiter(F, A, b, P, 1);
|
|
44
|
-
L(o, A, h);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
if (e.length > 2 && t) {
|
|
48
|
-
var c = e[i - 2], E = e[0], l = e[1];
|
|
49
|
-
f.direction(b, E, c), f.direction(P, l, E), f.normal(r, b);
|
|
50
|
-
var v = f.computeMiter(F, A, b, P, 1);
|
|
51
|
-
o[0][0] = A.slice(), o[i - 1][0] = A.slice(), o[0][1] = v, o[i - 1][1] = v, o.pop();
|
|
52
|
-
}
|
|
53
|
-
return o;
|
|
54
|
-
};
|
|
55
|
-
function L(e, t, r) {
|
|
56
|
-
e.push([[t[0], t[1]], r]);
|
|
57
|
-
}
|
|
58
|
-
const ne = 2, re = 3, oe = 3, se = 2;
|
|
59
|
-
function ce(e, t) {
|
|
60
|
-
var y, M, x;
|
|
61
|
-
if (e.length < 2)
|
|
62
|
-
return console.warn("positionList length must be greater than 1"), [];
|
|
63
|
-
const r = (y = t == null ? void 0 : t.unitWidth) != null ? y : 0.5, o = (M = t == null ? void 0 : t.unitHeight) != null ? M : 0.5, i = (x = t == null ? void 0 : t.skipPanoIndexMesh) != null ? x : !1, a = new B.CatmullRomCurve3(e, !1, "catmullrom", 1);
|
|
64
|
-
if (i) {
|
|
65
|
-
const h = Math.ceil(a.getLength() / o * 1.5), c = a.getPoints(h), E = [];
|
|
66
|
-
let l = 0;
|
|
67
|
-
const v = e;
|
|
68
|
-
return v.forEach((m, I) => {
|
|
69
|
-
let u = 0, n = 99999999;
|
|
70
|
-
c.forEach((d, s) => {
|
|
71
|
-
const g = d.distanceTo(m);
|
|
72
|
-
g < n && (u = s, n = g);
|
|
73
|
-
});
|
|
74
|
-
const _ = c[u + 1], R = _ == null ? void 0 : _.distanceTo(m), N = c[u - 1], T = N == null ? void 0 : N.distanceTo(m);
|
|
75
|
-
if (u > l && u - l > 1) {
|
|
76
|
-
let d = u;
|
|
77
|
-
N !== void 0 && T > 0.8 && (d = u + 1), N !== void 0 && T > 0.2 && T < 0.3 ? d = u : n > 0.2 && n < 0.3 && (d = u + 1);
|
|
78
|
-
let s = l;
|
|
79
|
-
if (_ !== void 0 && R > 0.2 && R < 0.3 ? s = l + 1 : n > 0.2 && n < 0.3 && (s = l), c[s] && c[s + 1]) {
|
|
80
|
-
const w = v[I - 1];
|
|
81
|
-
if (w)
|
|
82
|
-
if (w.equals(c[s]))
|
|
83
|
-
s += 1;
|
|
84
|
-
else {
|
|
85
|
-
const X = new z().subVectors(c[s + 1], c[s]), $ = new z().subVectors(w, c[s]);
|
|
86
|
-
X.angleTo($) < Math.PI / 2 && (s += 1);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
if (d < s || d - s <= 1)
|
|
90
|
-
return;
|
|
91
|
-
const g = c.slice(s, d), p = G(g, r, o);
|
|
92
|
-
E.push(p), l = u;
|
|
93
|
-
}
|
|
94
|
-
}), E;
|
|
95
|
-
} else {
|
|
96
|
-
const h = Math.ceil(a.getLength()), c = a.getPoints(h);
|
|
97
|
-
return [G(c, r, o)];
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
function G(e, t, r) {
|
|
101
|
-
const o = t / 2, i = r / t, a = e.length, y = te(e.map((n) => [n.x, n.z])), x = (e.length - 1) * ne * re, h = 2 * a, c = h * oe, E = h * se, l = new Uint32Array(x), v = new Float32Array(c), m = new Float32Array(E);
|
|
102
|
-
e.forEach((n, _) => {
|
|
103
|
-
});
|
|
104
|
-
let I = 0;
|
|
105
|
-
for (let n = 0; n < e.length; n++) {
|
|
106
|
-
const [_, R] = y[n][0], N = e[n], { x: T, y: d, z: s } = N, g = new z(T + _ * o, d + 0.05, s + R * o);
|
|
107
|
-
v[n * 6 + 0] = g.x, v[n * 6 + 1] = g.y, v[n * 6 + 2] = g.z;
|
|
108
|
-
const p = new z(T - _ * o, d + 0.05, s - R * o);
|
|
109
|
-
v[n * 6 + 3] = p.x, v[n * 6 + 4] = p.y, v[n * 6 + 5] = p.z, I += n > 0 ? e[n - 1].clone().sub(e[n]).length() : 0;
|
|
110
|
-
const w = I / t / i;
|
|
111
|
-
m[n * 4 + 0] = 0, m[n * 4 + 1] = w, m[n * 4 + 2] = 1, m[n * 4 + 3] = w, n !== e.length - 1 && (l[n * 6 + 0] = n * 2 + 0, l[n * 6 + 1] = n * 2 + 2, l[n * 6 + 2] = n * 2 + 1, l[n * 6 + 3] = n * 2 + 2, l[n * 6 + 4] = n * 2 + 3, l[n * 6 + 5] = n * 2 + 1);
|
|
112
|
-
}
|
|
113
|
-
const u = new B.BufferGeometry();
|
|
114
|
-
return u.setAttribute("position", new B.BufferAttribute(v, 3)), u.setAttribute("uv", new B.BufferAttribute(m, 2)), u.setIndex(new B.BufferAttribute(l, 1)), u;
|
|
115
|
-
}
|
|
116
|
-
export {
|
|
117
|
-
ce as default
|
|
118
|
-
};
|
|
1
|
+
"use strict";const T=require("three"),B=require("polyline-normals"),L=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function V(e){if(e&&e.__esModule)return e;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const u in e)if(u!=="default"){const c=Object.getOwnPropertyDescriptor(e,u);Object.defineProperty(o,u,c.get?c:{enumerable:!0,get:()=>e[u]})}}return o.default=e,Object.freeze(o)}const N=V(T),G=L(B),U=2,z=3,F=3,j=2;function C(e,o){var w,O,x;if(e.length<2)return console.warn("positionList length must be greater than 1"),[];const u=(w=o==null?void 0:o.unitWidth)!=null?w:.5,c=(O=o==null?void 0:o.unitHeight)!=null?O:.5,A=(x=o==null?void 0:o.skipPanoIndexMesh)!=null?x:!1,g=new N.CatmullRomCurve3(e,!1,"catmullrom",1);if(A){const b=Math.ceil(g.getLength()/c*1.5),r=g.getPoints(b),p=[];let i=0;const l=e;return l.forEach((d,R)=>{let s=0,t=99999999;r.forEach((a,n)=>{const m=a.distanceTo(d);m<t&&(s=n,t=m)});const f=r[s+1],y=f==null?void 0:f.distanceTo(d),h=r[s-1],E=h==null?void 0:h.distanceTo(d);if(s>i&&s-i>1){let a=s;h!==void 0&&E>.8&&(a=s+1),h!==void 0&&E>.2&&E<.3?a=s:t>.2&&t<.3&&(a=s+1);let n=i;if(f!==void 0&&y>.2&&y<.3?n=i+1:t>.2&&t<.3&&(n=i),r[n]&&r[n+1]){const _=l[R-1];if(_)if(_.equals(r[n]))n+=1;else{const I=new T.Vector3().subVectors(r[n+1],r[n]),M=new T.Vector3().subVectors(_,r[n]);I.angleTo(M)<Math.PI/2&&(n+=1)}}if(a<n||a-n<=1)return;const m=r.slice(n,a),v=P(m,u,c);p.push(v),i=s}}),p}else{const b=Math.ceil(g.getLength()),r=g.getPoints(b);return[P(r,u,c)]}}function P(e,o,u){const c=o/2,A=u/o,g=e.length,w=G.default(e.map(t=>[t.x,t.z])),x=(e.length-1)*U*z,b=2*g,r=b*F,p=b*j,i=new Uint32Array(x),l=new Float32Array(r),d=new Float32Array(p);e.forEach((t,f)=>{});let R=0;for(let t=0;t<e.length;t++){const[f,y]=w[t][0],h=e[t],{x:E,y:a,z:n}=h,m=new T.Vector3(E+f*c,a+.05,n+y*c);l[t*6+0]=m.x,l[t*6+1]=m.y,l[t*6+2]=m.z;const v=new T.Vector3(E-f*c,a+.05,n-y*c);l[t*6+3]=v.x,l[t*6+4]=v.y,l[t*6+5]=v.z,R+=t>0?e[t-1].clone().sub(e[t]).length():0;const _=R/o/A;d[t*4+0]=0,d[t*4+1]=_,d[t*4+2]=1,d[t*4+3]=_,t!==e.length-1&&(i[t*6+0]=t*2+0,i[t*6+1]=t*2+2,i[t*6+2]=t*2+1,i[t*6+3]=t*2+2,i[t*6+4]=t*2+3,i[t*6+5]=t*2+1)}const s=new N.BufferGeometry;return s.setAttribute("position",new N.BufferAttribute(l,3)),s.setAttribute("uv",new N.BufferAttribute(d,2)),s.setIndex(new N.BufferAttribute(i,1)),s}exports.getLineGeometries=C;
|
|
@@ -1,254 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { Five as k } from "@realsee/five";
|
|
3
|
-
import * as Ie from "three";
|
|
4
|
-
import ke from "./ItemLabelItem.js";
|
|
5
|
-
import ye from "../shared-utils/debounce.js";
|
|
6
|
-
import { isImpacted as R } from "./utils/isImpacted.js";
|
|
7
|
-
import { getStrokeLength as Oe } from "./utils/getStrokeLength.js";
|
|
8
|
-
import { getLabelTransform as Pe } from "./utils/getLabelTransform.js";
|
|
9
|
-
import { transform2RenderData as A } from "./utils/transform2RenderData.js";
|
|
10
|
-
import "../index.f2f85d71.js";
|
|
11
|
-
import "./typings.js";
|
|
12
|
-
function je(m) {
|
|
13
|
-
re(m, "svelte-gk8s47", ".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}");
|
|
14
|
-
}
|
|
15
|
-
function B(m, o, n) {
|
|
16
|
-
const i = m.slice();
|
|
17
|
-
return i[30] = o[n], i;
|
|
18
|
-
}
|
|
19
|
-
function H(m) {
|
|
20
|
-
let o, n;
|
|
21
|
-
return o = new ke({
|
|
22
|
-
props: {
|
|
23
|
-
itemLabel: m[30],
|
|
24
|
-
hooks: m[0],
|
|
25
|
-
anchorEnabled: m[2],
|
|
26
|
-
onIconClick: m[6]
|
|
27
|
-
}
|
|
28
|
-
}), {
|
|
29
|
-
c() {
|
|
30
|
-
pe(o.$$.fragment);
|
|
31
|
-
},
|
|
32
|
-
m(i, f) {
|
|
33
|
-
ge(o, i, f), n = !0;
|
|
34
|
-
},
|
|
35
|
-
p(i, f) {
|
|
36
|
-
const e = {};
|
|
37
|
-
f[0] & 2 && (e.itemLabel = i[30]), f[0] & 1 && (e.hooks = i[0]), f[0] & 4 && (e.anchorEnabled = i[2]), o.$set(e);
|
|
38
|
-
},
|
|
39
|
-
i(i) {
|
|
40
|
-
n || (y(o.$$.fragment, i), n = !0);
|
|
41
|
-
},
|
|
42
|
-
o(i) {
|
|
43
|
-
j(o.$$.fragment, i), n = !1;
|
|
44
|
-
},
|
|
45
|
-
d(i) {
|
|
46
|
-
_e(o, i);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
function W(m, o) {
|
|
51
|
-
let n, i, f, e = o[30].visible && H(o);
|
|
52
|
-
return {
|
|
53
|
-
key: m,
|
|
54
|
-
first: null,
|
|
55
|
-
c() {
|
|
56
|
-
n = U(), e && e.c(), i = U(), this.first = n;
|
|
57
|
-
},
|
|
58
|
-
m(l, h) {
|
|
59
|
-
F(l, n, h), e && e.m(l, h), F(l, i, h), f = !0;
|
|
60
|
-
},
|
|
61
|
-
p(l, h) {
|
|
62
|
-
o = l, o[30].visible ? e ? (e.p(o, h), h[0] & 2 && y(e, 1)) : (e = H(o), e.c(), y(e, 1), e.m(i.parentNode, i)) : e && (N(), j(e, 1, 1, () => {
|
|
63
|
-
e = null;
|
|
64
|
-
}), q());
|
|
65
|
-
},
|
|
66
|
-
i(l) {
|
|
67
|
-
f || (y(e), f = !0);
|
|
68
|
-
},
|
|
69
|
-
o(l) {
|
|
70
|
-
j(e), f = !1;
|
|
71
|
-
},
|
|
72
|
-
d(l) {
|
|
73
|
-
l && E(n), e && e.d(l), l && E(i);
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
function ve(m) {
|
|
78
|
-
let o, n = [], i = /* @__PURE__ */ new Map(), f, e, l = m[1];
|
|
79
|
-
const h = (a) => a[30].id;
|
|
80
|
-
for (let a = 0; a < l.length; a += 1) {
|
|
81
|
-
let r = B(m, l, a), p = h(r);
|
|
82
|
-
i.set(p, n[a] = W(p, r));
|
|
83
|
-
}
|
|
84
|
-
return {
|
|
85
|
-
c() {
|
|
86
|
-
o = ae("div");
|
|
87
|
-
for (let a = 0; a < n.length; a += 1)
|
|
88
|
-
n[a].c();
|
|
89
|
-
ce(o, "class", "item-labels-container svelte-gk8s47"), le(() => m[12].call(o)), S(o, "opacity", m[5] ? 1 : 0);
|
|
90
|
-
},
|
|
91
|
-
m(a, r) {
|
|
92
|
-
F(a, o, r);
|
|
93
|
-
for (let p = 0; p < n.length; p += 1)
|
|
94
|
-
n[p].m(o, null);
|
|
95
|
-
f = de(o, m[12].bind(o)), e = !0;
|
|
96
|
-
},
|
|
97
|
-
p(a, r) {
|
|
98
|
-
r[0] & 71 && (l = a[1], N(), n = me(n, r, h, 1, a, l, i, o, he, W, null, B), q()), r[0] & 32 && S(o, "opacity", a[5] ? 1 : 0);
|
|
99
|
-
},
|
|
100
|
-
i(a) {
|
|
101
|
-
if (!e) {
|
|
102
|
-
for (let r = 0; r < l.length; r += 1)
|
|
103
|
-
y(n[r]);
|
|
104
|
-
e = !0;
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
o(a) {
|
|
108
|
-
for (let r = 0; r < n.length; r += 1)
|
|
109
|
-
j(n[r]);
|
|
110
|
-
e = !1;
|
|
111
|
-
},
|
|
112
|
-
d(a) {
|
|
113
|
-
a && E(o);
|
|
114
|
-
for (let r = 0; r < n.length; r += 1)
|
|
115
|
-
n[r].d();
|
|
116
|
-
f();
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
let we = 11;
|
|
121
|
-
function Le(m, o, n) {
|
|
122
|
-
const { Raycaster: i, Vector3: f } = Ie;
|
|
123
|
-
let { five: e } = o, { modelOcclusionEnable: l } = o, { itemLabels: h } = o, { hooks: a } = o, { displayStrategyType: r } = o, { maxVisibleDistance: p } = o, v = null, I = null, X = (e == null ? void 0 : e.currentMode) === k.Mode.Panorama, w, L, x = [], M = !0;
|
|
124
|
-
const Y = (s, u) => {
|
|
125
|
-
const b = s.camera.position.clone(), d = new f(u.modelPosition[0], u.modelPosition[1], u.modelPosition[2]), t = d.distanceTo(b);
|
|
126
|
-
return p !== void 0 && s.state.mode === k.Mode.Panorama && t > p ? !1 : R(s, d.clone().sub(b).normalize(), b, t);
|
|
127
|
-
}, Z = (s) => {
|
|
128
|
-
const { camera: u, model: b } = e, { x: d, y: t, z: c } = s.clone().project(u), _ = (d + 1) / 2, g = (2 - (t + 1)) / 2, C = Math.abs(c) < 1 && [_, g].every((D) => D < 1 && D >= 0);
|
|
129
|
-
return Boolean(C);
|
|
130
|
-
}, G = (s, u) => {
|
|
131
|
-
const b = new f(u.modelPosition[0], u.modelPosition[1], u.modelPosition[2]), d = s.project2d(b), t = d == null ? void 0 : d.x, c = d == null ? void 0 : d.y;
|
|
132
|
-
return [t, c];
|
|
133
|
-
}, J = (s, u) => {
|
|
134
|
-
const b = u.map((t) => {
|
|
135
|
-
if (s.state.panoIndex !== t.panoIndex)
|
|
136
|
-
return Object.assign(Object.assign({}, t), { visible: !1 });
|
|
137
|
-
const c = G(s, t);
|
|
138
|
-
t.name.length * we;
|
|
139
|
-
const _ = Oe(t.modelPosition[1], r), g = s.currentMode === k.Mode.Panorama ? Z(new f(t.position[0], t.position[1], t.position[2])) : !0, z = l ? Y(s, t) : !1, P = g && !z;
|
|
140
|
-
if (!P)
|
|
141
|
-
return Object.assign(Object.assign({}, t), { visible: P });
|
|
142
|
-
x.push(c);
|
|
143
|
-
const C = Pe(c);
|
|
144
|
-
return Object.assign(Object.assign({}, t), { visible: P, transform: C, strokeLength: _ });
|
|
145
|
-
}), d = b.filter(({ visible: t }) => t).map((t) => ({
|
|
146
|
-
itemLabelItem: t,
|
|
147
|
-
distance: new f(t.modelPosition[0], t.modelPosition[1], t.modelPosition[2]).clone().distanceTo(s.camera.position)
|
|
148
|
-
})).sort((t, c) => t.distance - c.distance);
|
|
149
|
-
return b.map((t) => {
|
|
150
|
-
const c = d.findIndex((_) => _.itemLabelItem.id === t.id);
|
|
151
|
-
return c !== void 0 ? Object.assign(Object.assign({}, t), { zIndex: c * 10 }) : t;
|
|
152
|
-
});
|
|
153
|
-
}, O = () => {
|
|
154
|
-
x = [], n(1, I = J(e, I));
|
|
155
|
-
}, V = () => {
|
|
156
|
-
n(5, M = !1), K();
|
|
157
|
-
}, K = ye(
|
|
158
|
-
() => {
|
|
159
|
-
n(5, M = !0), O();
|
|
160
|
-
},
|
|
161
|
-
300
|
|
162
|
-
), T = () => {
|
|
163
|
-
e.once("renderFrame", O);
|
|
164
|
-
}, Q = () => {
|
|
165
|
-
window.addEventListener("resize", T, !1);
|
|
166
|
-
}, $ = () => {
|
|
167
|
-
v !== h && (n(1, I = A(h)), v = h, O());
|
|
168
|
-
}, ee = (s, u) => {
|
|
169
|
-
let b = [];
|
|
170
|
-
for (let t = 0; t < u.length; t++) {
|
|
171
|
-
const { position: c, panoIndex: _ } = u[t], g = s.distanceTo(c);
|
|
172
|
-
(p === void 0 || g <= p || e.state.mode !== k.Mode.Panorama) && b.push({ panoIndex: _, obVector: c, distance: g });
|
|
173
|
-
}
|
|
174
|
-
b = b.sort((t, c) => t.distance - c.distance);
|
|
175
|
-
let d;
|
|
176
|
-
for (let t = 0; t < b.length; t++) {
|
|
177
|
-
const { obVector: c, distance: _, panoIndex: g } = b[t];
|
|
178
|
-
if (!R(e, s, c, _)) {
|
|
179
|
-
d = g;
|
|
180
|
-
break;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
return typeof d == "number" ? u[d] : void 0;
|
|
184
|
-
}, te = (s) => {
|
|
185
|
-
if (e.state.mode === k.Mode.Panorama)
|
|
186
|
-
return;
|
|
187
|
-
const u = e.work.observers, b = new f().fromArray(s.position), d = ee(b, u);
|
|
188
|
-
if (d && (s.observerIndex = d.panoIndex), typeof s.observerIndex == "number") {
|
|
189
|
-
const t = u[s.observerIndex], c = b.clone().sub(t.position).normalize(), _ = {
|
|
190
|
-
longitude: Math.PI + Math.atan2(c.x, c.z),
|
|
191
|
-
latitude: Math.acos(c.y / c.length()) - Math.PI / 2
|
|
192
|
-
};
|
|
193
|
-
e.setState(Object.assign(Object.assign({}, _), {
|
|
194
|
-
mode: k.Mode.Panorama,
|
|
195
|
-
panoIndex: s.observerIndex
|
|
196
|
-
})), e.once("initAnimationEnded", () => {
|
|
197
|
-
n(1, I = I.map((g) => Object.assign(Object.assign({}, g), { isFold: g.id !== s.id }))), e.once("cameraUpdate", () => {
|
|
198
|
-
n(1, I = I.map((g) => Object.assign(Object.assign({}, g), { isFold: !1 })));
|
|
199
|
-
});
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
fe(() => {
|
|
204
|
-
$();
|
|
205
|
-
}), ue(() => {
|
|
206
|
-
n(1, I = A(h)), v = h, O(), Q(), e.on("cameraUpdate", V);
|
|
207
|
-
}), be(() => {
|
|
208
|
-
e.off("cameraUpdate", V), window.removeEventListener("resize", T, !1);
|
|
209
|
-
});
|
|
210
|
-
function ne() {
|
|
211
|
-
w = this.clientWidth, L = this.clientHeight, n(3, w), n(4, L);
|
|
212
|
-
}
|
|
213
|
-
return m.$$set = (s) => {
|
|
214
|
-
"five" in s && n(7, e = s.five), "modelOcclusionEnable" in s && n(8, l = s.modelOcclusionEnable), "itemLabels" in s && n(9, h = s.itemLabels), "hooks" in s && n(0, a = s.hooks), "displayStrategyType" in s && n(10, r = s.displayStrategyType), "maxVisibleDistance" in s && n(11, p = s.maxVisibleDistance);
|
|
215
|
-
}, [
|
|
216
|
-
a,
|
|
217
|
-
I,
|
|
218
|
-
X,
|
|
219
|
-
w,
|
|
220
|
-
L,
|
|
221
|
-
M,
|
|
222
|
-
te,
|
|
223
|
-
e,
|
|
224
|
-
l,
|
|
225
|
-
h,
|
|
226
|
-
r,
|
|
227
|
-
p,
|
|
228
|
-
ne
|
|
229
|
-
];
|
|
230
|
-
}
|
|
231
|
-
class Ue extends oe {
|
|
232
|
-
constructor(o) {
|
|
233
|
-
super(), se(
|
|
234
|
-
this,
|
|
235
|
-
o,
|
|
236
|
-
Le,
|
|
237
|
-
ve,
|
|
238
|
-
ie,
|
|
239
|
-
{
|
|
240
|
-
five: 7,
|
|
241
|
-
modelOcclusionEnable: 8,
|
|
242
|
-
itemLabels: 9,
|
|
243
|
-
hooks: 0,
|
|
244
|
-
displayStrategyType: 10,
|
|
245
|
-
maxVisibleDistance: 11
|
|
246
|
-
},
|
|
247
|
-
je,
|
|
248
|
-
[-1, -1]
|
|
249
|
-
);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
export {
|
|
253
|
-
Ue as default
|
|
254
|
-
};
|
|
1
|
+
"use strict";var te=Object.defineProperty,ne=Object.defineProperties;var oe=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var se=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable;var V=(s,t,e)=>t in s?te(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,y=(s,t)=>{for(var e in t||(t={}))se.call(t,e)&&V(s,e,t[e]);if(S)for(var e of S(t))ie.call(t,e)&&V(s,e,t[e]);return s},L=(s,t)=>ne(s,oe(t));const r=require("svelte/internal"),P=require("@realsee/five"),z=require("svelte"),re=require("three"),ae=require("./ItemLabelItem.js"),ce=require("../shared-utils/debounce.js"),x=require("./utils/isImpacted.js"),le=require("./utils/getStrokeLength.js"),de=require("./utils/getLabelTransform.js"),U=require("./utils/transform2RenderData.js");function me(s){if(s&&s.__esModule)return s;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(t,e,a.get?a:{enumerable:!0,get:()=>s[e]})}}return t.default=s,Object.freeze(t)}const ue=me(re);function fe(s){r.append_styles(s,"svelte-gk8s47",".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}")}function H(s,t,e){const a=s.slice();return a[30]=t[e],a}function N(s){let t,e;return t=new ae.ItemLabelItem({props:{itemLabel:s[30],hooks:s[0],anchorEnabled:s[2],onIconClick:s[6]}}),{c(){r.create_component(t.$$.fragment)},m(a,f){r.mount_component(t,a,f),e=!0},p(a,f){const n={};f[0]&2&&(n.itemLabel=a[30]),f[0]&1&&(n.hooks=a[0]),f[0]&4&&(n.anchorEnabled=a[2]),t.$set(n)},i(a){e||(r.transition_in(t.$$.fragment,a),e=!0)},o(a){r.transition_out(t.$$.fragment,a),e=!1},d(a){r.destroy_component(t,a)}}}function W(s,t){let e,a,f,n=t[30].visible&&N(t);return{key:s,first:null,c(){e=r.empty(),n&&n.c(),a=r.empty(),this.first=e},m(m,h){r.insert(m,e,h),n&&n.m(m,h),r.insert(m,a,h),f=!0},p(m,h){t=m,t[30].visible?n?(n.p(t,h),h[0]&2&&r.transition_in(n,1)):(n=N(t),n.c(),r.transition_in(n,1),n.m(a.parentNode,a)):n&&(r.group_outros(),r.transition_out(n,1,1,()=>{n=null}),r.check_outros())},i(m){f||(r.transition_in(n),f=!0)},o(m){r.transition_out(n),f=!1},d(m){m&&r.detach(e),n&&n.d(m),m&&r.detach(a)}}}function _e(s){let t,e=[],a=new Map,f,n,m=s[1];const h=l=>l[30].id;for(let l=0;l<m.length;l+=1){let c=H(s,m,l),p=h(c);a.set(p,e[l]=W(p,c))}return{c(){t=r.element("div");for(let l=0;l<e.length;l+=1)e[l].c();r.attr(t,"class","item-labels-container svelte-gk8s47"),r.add_render_callback(()=>s[12].call(t)),r.set_style(t,"opacity",s[5]?1:0,!1)},m(l,c){r.insert(l,t,c);for(let p=0;p<e.length;p+=1)e[p].m(t,null);f=r.add_resize_listener(t,s[12].bind(t)),n=!0},p(l,c){c[0]&71&&(m=l[1],r.group_outros(),e=r.update_keyed_each(e,c,h,1,l,m,a,t,r.outro_and_destroy_block,W,null,H),r.check_outros()),c[0]&32&&r.set_style(t,"opacity",l[5]?1:0,!1)},i(l){if(!n){for(let c=0;c<m.length;c+=1)r.transition_in(e[c]);n=!0}},o(l){for(let c=0;c<e.length;c+=1)r.transition_out(e[c]);n=!1},d(l){l&&r.detach(t);for(let c=0;c<e.length;c+=1)e[c].d();f()}}}let be=11;function he(s,t,e){const{Raycaster:a,Vector3:f}=ue;let{five:n}=t,{modelOcclusionEnable:m}=t,{itemLabels:h}=t,{hooks:l}=t,{displayStrategyType:c}=t,{maxVisibleDistance:p}=t,F=null,k=null,A=(n==null?void 0:n.currentMode)===P.Five.Mode.Panorama,M,O,C=[],j=!0;const B=(i,_)=>{const b=i.camera.position.clone(),u=new f(_.modelPosition[0],_.modelPosition[1],_.modelPosition[2]),o=u.distanceTo(b);return p!==void 0&&i.state.mode===P.Five.Mode.Panorama&&o>p?!1:x.isImpacted(i,u.clone().sub(b).normalize(),b,o)},X=i=>{const{camera:_,model:b}=n,{x:u,y:o,z:d}=i.clone().project(_),I=(u+1)/2,g=(2-(o+1))/2,T=Math.abs(d)<1&&[I,g].every(R=>R<1&&R>=0);return Boolean(T)},Y=(i,_)=>{const b=new f(_.modelPosition[0],_.modelPosition[1],_.modelPosition[2]),u=i.project2d(b),o=u==null?void 0:u.x,d=u==null?void 0:u.y;return[o,d]},Z=(i,_)=>{const b=_.map(o=>{if(i.state.panoIndex!==o.panoIndex)return L(y({},o),{visible:!1});const d=Y(i,o);o.name.length*be;const I=le.getStrokeLength(o.modelPosition[1],c),g=i.currentMode===P.Five.Mode.Panorama?X(new f(o.position[0],o.position[1],o.position[2])):!0,E=m?B(i,o):!1,w=g&&!E;if(!w)return L(y({},o),{visible:w});C.push(d);const T=de.getLabelTransform(d);return L(y({},o),{visible:w,transform:T,strokeLength:I})}),u=b.filter(({visible:o})=>o).map(o=>({itemLabelItem:o,distance:new f(o.modelPosition[0],o.modelPosition[1],o.modelPosition[2]).clone().distanceTo(i.camera.position)})).sort((o,d)=>o.distance-d.distance);return b.map(o=>{const d=u.findIndex(I=>I.itemLabelItem.id===o.id);return d!==void 0?L(y({},o),{zIndex:d*10}):o})},v=()=>{C=[],e(1,k=Z(n,k))},D=()=>{e(5,j=!1),G()},G=ce.debounce(()=>{e(5,j=!0),v()},300),q=()=>{n.once("renderFrame",v)},J=()=>{window.addEventListener("resize",q,!1)},K=()=>{F!==h&&(e(1,k=U.transform2RenderData(h)),F=h,v())},Q=(i,_)=>{let b=[];for(let o=0;o<_.length;o++){const{position:d,panoIndex:I}=_[o],g=i.distanceTo(d);(p===void 0||g<=p||n.state.mode!==P.Five.Mode.Panorama)&&b.push({panoIndex:I,obVector:d,distance:g})}b=b.sort((o,d)=>o.distance-d.distance);let u;for(let o=0;o<b.length;o++){const{obVector:d,distance:I,panoIndex:g}=b[o];if(!x.isImpacted(n,i,d,I)){u=g;break}}return typeof u=="number"?_[u]:void 0},$=i=>{if(n.state.mode===P.Five.Mode.Panorama)return;const _=n.work.observers,b=new f().fromArray(i.position),u=Q(b,_);if(u&&(i.observerIndex=u.panoIndex),typeof i.observerIndex=="number"){const o=_[i.observerIndex],d=b.clone().sub(o.position).normalize(),I={longitude:Math.PI+Math.atan2(d.x,d.z),latitude:Math.acos(d.y/d.length())-Math.PI/2};n.setState(L(y({},I),{mode:P.Five.Mode.Panorama,panoIndex:i.observerIndex})),n.once("initAnimationEnded",()=>{e(1,k=k.map(g=>L(y({},g),{isFold:g.id!==i.id}))),n.once("cameraUpdate",()=>{e(1,k=k.map(g=>L(y({},g),{isFold:!1})))})})}};z.beforeUpdate(()=>{K()}),z.onMount(()=>{e(1,k=U.transform2RenderData(h)),F=h,v(),J(),n.on("cameraUpdate",D)}),z.onDestroy(()=>{n.off("cameraUpdate",D),window.removeEventListener("resize",q,!1)});function ee(){M=this.clientWidth,O=this.clientHeight,e(3,M),e(4,O)}return s.$$set=i=>{"five"in i&&e(7,n=i.five),"modelOcclusionEnable"in i&&e(8,m=i.modelOcclusionEnable),"itemLabels"in i&&e(9,h=i.itemLabels),"hooks"in i&&e(0,l=i.hooks),"displayStrategyType"in i&&e(10,c=i.displayStrategyType),"maxVisibleDistance"in i&&e(11,p=i.maxVisibleDistance)},[l,k,A,M,O,j,$,n,m,h,c,p,ee]}class pe extends r.SvelteComponent{constructor(t){super(),r.init(this,t,he,_e,r.safe_not_equal,{five:7,modelOcclusionEnable:8,itemLabels:9,hooks:0,displayStrategyType:10,maxVisibleDistance:11},fe,[-1,-1])}}exports.ItemLabelComponent=pe;
|