@realsee/dnalogel 2.21.0-dev.3 → 2.21.0-dev.5
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/GuideLinePlugin/Controller.d.ts +5 -3
- package/dist/GuideLinePlugin/GuideLineItem.d.ts +1 -1
- package/dist/GuideLinePlugin/GuideLineModeItem.d.ts +17 -0
- package/dist/GuideLinePlugin/utils/createLineGeometry.d.ts +7 -0
- package/dist/index.cjs.js +57 -57
- package/dist/index.js +5114 -4936
- package/dist/index.umd.js +50 -50
- package/docs/assets/search.js +1 -1
- 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 +86 -31
- 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 +24 -24
- package/docs/classes/PanoMeasurePluginModel.html +25 -25
- 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 +17 -17
- package/docs/classes/Util.PointDomHelper.html +10 -10
- package/docs/classes/Util.PointHelper.html +10 -10
- package/docs/classes/Util.PointSelectorHelper.html +16 -16
- 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.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/PartialObjectDeep.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/GuideLinePlugin/Components/Tag.js +137 -44
- package/libs/GuideLinePlugin/Controller.d.ts +5 -3
- package/libs/GuideLinePlugin/Controller.js +48 -44
- package/libs/GuideLinePlugin/GuideLineItem/index.js +1 -1
- package/libs/GuideLinePlugin/GuideLineItem.d.ts +1 -1
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +150 -113
- package/libs/GuideLinePlugin/GuideLineModeItem.d.ts +17 -0
- package/libs/GuideLinePlugin/utils/createLineGeometry.d.ts +7 -0
- package/libs/GuideLinePlugin/utils/createLineGeometry.js +19 -17
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +77 -77
- package/libs/PanoMeasurePlugin/Components/Controller1.js +157 -117
- package/libs/PanoTagPlugin/controller/TagRender.js +1 -1
- package/libs/base/BasePlugin.js +1 -1
- package/libs/floorplan/Components/RoomHighlight/Room.js +54 -54
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +8 -8
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +30 -28
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var
|
|
1
|
+
var k = Object.defineProperty, w = Object.defineProperties;
|
|
2
|
+
var P = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var C = Object.getOwnPropertySymbols;
|
|
4
|
+
var F = Object.prototype.hasOwnProperty, L = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var v = (n, e, t) => e in n ? k(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, m = (n, e) => {
|
|
6
|
+
for (var t in e || (e = {}))
|
|
7
|
+
F.call(e, t) && v(n, t, e[t]);
|
|
8
|
+
if (C)
|
|
9
|
+
for (var t of C(e))
|
|
10
|
+
L.call(e, t) && v(n, t, e[t]);
|
|
11
|
+
return n;
|
|
12
|
+
}, p = (n, e) => w(n, P(e));
|
|
13
|
+
var i = (n, e, t) => (v(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
14
14
|
import * as l from "three";
|
|
15
|
-
import { logWarning as
|
|
15
|
+
import { logWarning as T, logError as V } from "../../shared-utils/log.js";
|
|
16
16
|
import { createLineGeometry as U } from "../utils/createLineGeometry.js";
|
|
17
17
|
import { isPanoramaLike as x, isModelLike as _ } from "../../shared-utils/five/mode.js";
|
|
18
18
|
import "hammerjs";
|
|
@@ -20,13 +20,13 @@ import "@realsee/five";
|
|
|
20
20
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
21
21
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
22
22
|
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
23
|
-
import { BetterTween as M, tweenProgress as
|
|
24
|
-
import { loadTexture as
|
|
25
|
-
import
|
|
23
|
+
import { BetterTween as M, tweenProgress as G } from "../../shared-utils/animationFrame/BetterTween.js";
|
|
24
|
+
import { loadTexture as E } from "../../shared-utils/three/loadTexture.js";
|
|
25
|
+
import y from "../../PanoTagPlugin/controller/index.js";
|
|
26
26
|
import O from "../Components/Tag.js";
|
|
27
|
-
import { filterAdjacentDistinct as
|
|
28
|
-
import { objectAssignDeepExports as
|
|
29
|
-
const
|
|
27
|
+
import { filterAdjacentDistinct as S } from "../utils/index.js";
|
|
28
|
+
import { objectAssignDeepExports as A } from "../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
29
|
+
const B = (
|
|
30
30
|
/* glsl */
|
|
31
31
|
`
|
|
32
32
|
varying vec2 vUv;
|
|
@@ -36,7 +36,7 @@ const S = (
|
|
|
36
36
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
37
37
|
}
|
|
38
38
|
`
|
|
39
|
-
),
|
|
39
|
+
), I = (
|
|
40
40
|
/* glsl */
|
|
41
41
|
`
|
|
42
42
|
// 是否使用颜色
|
|
@@ -120,77 +120,86 @@ const S = (
|
|
|
120
120
|
}
|
|
121
121
|
`
|
|
122
122
|
);
|
|
123
|
-
class
|
|
124
|
-
constructor(e,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
123
|
+
class R {
|
|
124
|
+
constructor(e, t) {
|
|
125
|
+
i(this, "name", "");
|
|
126
|
+
i(this, "startTagContainer");
|
|
127
|
+
i(this, "endTagContainer");
|
|
128
|
+
i(this, "mesh");
|
|
129
|
+
i(this, "five");
|
|
130
|
+
i(this, "mode");
|
|
131
|
+
i(this, "path", []);
|
|
132
|
+
i(this, "_curvePath", null);
|
|
133
|
+
i(this, "_curvePoints", null);
|
|
134
|
+
i(this, "_panoGroup", []);
|
|
135
|
+
i(this, "skippedPositions", null);
|
|
136
|
+
i(this, "textureUrl", "");
|
|
137
|
+
i(this, "scale", 1);
|
|
138
|
+
i(this, "width", 0.5);
|
|
139
|
+
i(this, "unitLength", 0.5);
|
|
140
|
+
i(this, "_visibleFloorIndexes", null);
|
|
141
|
+
i(this, "visible", null);
|
|
139
142
|
/** Five Mode 是否满足 */
|
|
140
|
-
|
|
143
|
+
i(this, "modeVisible", !1);
|
|
141
144
|
/** 楼层是否满足展示条件 */
|
|
142
|
-
|
|
145
|
+
i(this, "floorVisible", !0);
|
|
143
146
|
/** 默认是否展示 */
|
|
144
|
-
|
|
147
|
+
i(this, "defaultVisible", !1);
|
|
145
148
|
/** 走点动画 */
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
149
|
+
i(this, "inWalkAnimation", !1);
|
|
150
|
+
i(this, "customVisible", null);
|
|
151
|
+
i(this, "parent");
|
|
152
|
+
i(this, "plugin");
|
|
153
|
+
i(this, "textureHasLoaded", !1);
|
|
154
|
+
i(this, "disposed", !1);
|
|
155
|
+
i(this, "flowAnime", new M({ progress: 0 }).to({ progress: 1 }).duration(1500).repeat(1 / 0));
|
|
156
|
+
i(this, "flickerAnime", G(300).yoyo(!0).repeat(5));
|
|
157
|
+
/** 缓存 panoGroup 中每个点距离起点的长度 */
|
|
158
|
+
i(this, "cacheLengths", []);
|
|
159
|
+
i(this, "dispose", () => {
|
|
160
|
+
var e, t;
|
|
161
|
+
this.disposed || (this.disposed = !0, this.parent.hooks.off("show", this.updateVisible), this.parent.hooks.off("hide", this.updateVisible), this.plugin.hooks.off("show", this.updateVisible), this.plugin.hooks.off("hide", this.updateVisible), this.plugin.hooks.off("enable", this.updateVisible), this.plugin.hooks.off("disable", this.updateVisible), this.five.off("modeChange", this.onFiveModeChange), this.five.off("modelShownFloorChange", this.onFiveModelShownFloorChange), this.doHide(), (e = this.startTagContainer) == null || e.plugin.dispose(), (t = this.endTagContainer) == null || t.plugin.dispose());
|
|
157
162
|
});
|
|
158
163
|
/** 开始走点动画 */
|
|
159
|
-
|
|
164
|
+
i(this, "onWalkAnimationStart", () => {
|
|
160
165
|
this.inWalkAnimation = !0, this.updateVisible();
|
|
161
166
|
});
|
|
162
167
|
/** 结束走点动画 */
|
|
163
|
-
|
|
168
|
+
i(this, "onWalkAnimationEnd", () => {
|
|
164
169
|
this.inWalkAnimation = !1, this.updateVisible();
|
|
165
170
|
});
|
|
166
171
|
/** 模型状态变更 */
|
|
167
|
-
|
|
172
|
+
i(this, "onFiveModeChange", (e) => {
|
|
168
173
|
this.modeVisible = this.mode === "panorama" ? x(e) : _(e), this.updateVisible();
|
|
169
174
|
});
|
|
170
|
-
|
|
175
|
+
i(this, "onFiveModelShownFloorChange", (e) => {
|
|
171
176
|
this.floorVisible = e === null || this.visibleFloorIndexes === null || this.visibleFloorIndexes.includes(e), this.updateVisible();
|
|
172
177
|
});
|
|
173
178
|
/** 更新可见性 */
|
|
174
|
-
|
|
179
|
+
i(this, "updateVisible", () => {
|
|
175
180
|
const e = (() => !this.parent.visible || !this.plugin.state.enabled || !this.plugin.state.visible ? !1 : this.customVisible !== null ? this.customVisible : this.inWalkAnimation ? !0 : this.modeVisible && this.textureHasLoaded && this.defaultVisible && this.floorVisible)();
|
|
176
181
|
this.visible !== e && (this.visible = e, e ? this.doShow() : this.doHide());
|
|
177
182
|
});
|
|
178
|
-
|
|
179
|
-
const { progress:
|
|
180
|
-
this.mesh.material.uniforms.vOffset.value =
|
|
183
|
+
i(this, "onFlowAnimeUpdate", (e) => {
|
|
184
|
+
const { progress: t } = e;
|
|
185
|
+
this.mesh.material.uniforms.vOffset.value = t, this.mesh.material.uniformsNeedUpdate = !0, this.five.needsRender = !0;
|
|
181
186
|
});
|
|
182
|
-
|
|
183
|
-
var
|
|
184
|
-
const { progress:
|
|
185
|
-
this.mesh.material.uniforms.flicker.value =
|
|
187
|
+
i(this, "onFlickerAnimeUpdate", (e) => {
|
|
188
|
+
var a, r;
|
|
189
|
+
const { progress: t } = e, s = 1 - t;
|
|
190
|
+
this.mesh.material.uniforms.flicker.value = s, this.mesh.material.uniformsNeedUpdate = !0, this.five.needsRender = !0, this.startTagContainer.tag && b(this.startTagContainer.tag) && ((a = this.startTagContainer.app) == null || a.$set(p(m({}, this.startTagContainer.tag.data), {
|
|
191
|
+
opacity: s,
|
|
192
|
+
name: this.name,
|
|
193
|
+
distance: Math.floor(this.curvePath.getLength())
|
|
194
|
+
}))), this.endTagContainer.tag && b(this.endTagContainer.tag) && ((r = this.endTagContainer.app) == null || r.$set(p(m({}, this.endTagContainer.tag.data), { opacity: s })));
|
|
186
195
|
});
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
var
|
|
190
|
-
this.five = e, this.mode =
|
|
191
|
-
const
|
|
192
|
-
vertexShader:
|
|
193
|
-
fragmentShader:
|
|
196
|
+
i(this, "logWarning", (e) => T("GuideLineModeItem: ", e));
|
|
197
|
+
i(this, "logError", (e) => V("GuideLineModeItem: ", e));
|
|
198
|
+
var r, o;
|
|
199
|
+
this.five = e, this.mode = t.mode, this.plugin = t.plugin, this.parent = t.parent, this.startTagContainer = { tag: null, plugin: new y(this.five) }, this.endTagContainer = { tag: null, plugin: new y(this.five) };
|
|
200
|
+
const s = new l.BufferGeometry(), a = new l.ShaderMaterial({
|
|
201
|
+
vertexShader: B,
|
|
202
|
+
fragmentShader: I,
|
|
194
203
|
transparent: !0,
|
|
195
204
|
uniforms: {
|
|
196
205
|
map: { value: null },
|
|
@@ -207,7 +216,7 @@ class B {
|
|
|
207
216
|
vOffset: { value: 0 }
|
|
208
217
|
}
|
|
209
218
|
});
|
|
210
|
-
this.mesh = new l.Mesh(
|
|
219
|
+
this.mesh = new l.Mesh(s, a), this.mesh.name = "GuideLineModeItem", this.mode === "panorama" && (this.parent.hooks.on("walkStart", this.onWalkAnimationStart), this.parent.hooks.on("walkEnded", this.onWalkAnimationEnd)), this.updateVisible(), this.onFiveModeChange(this.five.getCurrentState().mode), this.onFiveModelShownFloorChange((o = (r = this.five.model) == null ? void 0 : r.shownFloor) != null ? o : null), this.flowAnime.onUpdate(this.onFlowAnimeUpdate), this.flickerAnime.onUpdate(this.onFlickerAnimeUpdate), this.parent.hooks.on("show", this.updateVisible), this.parent.hooks.on("hide", this.updateVisible), this.plugin.hooks.on("show", this.updateVisible), this.plugin.hooks.on("hide", this.updateVisible), this.plugin.hooks.on("enable", this.updateVisible), this.plugin.hooks.on("disable", this.updateVisible), this.plugin.hooks.on("dispose", this.dispose), this.five.on("modeChange", this.onFiveModeChange), this.five.on("modelShownFloorChange", this.onFiveModelShownFloorChange);
|
|
211
220
|
}
|
|
212
221
|
get panoGroup() {
|
|
213
222
|
return this._panoGroup;
|
|
@@ -216,6 +225,14 @@ class B {
|
|
|
216
225
|
get visibleFloorIndexes() {
|
|
217
226
|
return this._visibleFloorIndexes;
|
|
218
227
|
}
|
|
228
|
+
/** THREE Curve 路径 */
|
|
229
|
+
get curvePath() {
|
|
230
|
+
return this._curvePath;
|
|
231
|
+
}
|
|
232
|
+
/** THREE Curve 路径上的点 */
|
|
233
|
+
get curvePoints() {
|
|
234
|
+
return this._curvePoints;
|
|
235
|
+
}
|
|
219
236
|
/** 自定义展示 */
|
|
220
237
|
setCustomVisible(e) {
|
|
221
238
|
if (this.disposed)
|
|
@@ -229,10 +246,10 @@ class B {
|
|
|
229
246
|
this.defaultVisible !== e && (this.defaultVisible = e, this.updateVisible());
|
|
230
247
|
}
|
|
231
248
|
/** 基础宽、长 */
|
|
232
|
-
setUnitSize(e,
|
|
249
|
+
setUnitSize(e, t) {
|
|
233
250
|
if (this.disposed)
|
|
234
251
|
return this.logError("disposed");
|
|
235
|
-
this.width = e, this.unitLength =
|
|
252
|
+
this.width = e, this.unitLength = t, this.setGeometryByPath(this.path, { width: e, unit_length: t });
|
|
236
253
|
}
|
|
237
254
|
/** 设置缩放 */
|
|
238
255
|
setScale(e) {
|
|
@@ -241,40 +258,40 @@ class B {
|
|
|
241
258
|
this.scale = e, this.setGeometryByPath(this.path, { scale: e });
|
|
242
259
|
}
|
|
243
260
|
/** 通过点位设置线条形状 */
|
|
244
|
-
setGeometryByPanoGroup(e,
|
|
261
|
+
setGeometryByPanoGroup(e, t) {
|
|
245
262
|
if (this.disposed)
|
|
246
263
|
return this.logError("disposed");
|
|
247
264
|
if (!this.five.work)
|
|
248
265
|
return this.logError("setPathByPanoGroup: work is not ready");
|
|
249
|
-
const
|
|
250
|
-
if (this._panoGroup =
|
|
251
|
-
const
|
|
252
|
-
this.skippedPositions =
|
|
266
|
+
const s = S(e);
|
|
267
|
+
if (this._panoGroup = s, (t == null ? void 0 : t.skipPanoGroup) !== void 0) {
|
|
268
|
+
const r = t.skipPanoGroup ? s.map((o) => this.five.work.observers[o]).map((o) => o.standingPosition.clone()) : null;
|
|
269
|
+
this.skippedPositions = r;
|
|
253
270
|
}
|
|
254
|
-
const
|
|
255
|
-
this.path =
|
|
271
|
+
const a = this.getPathFromPanoGroup(s, this.five.work, t);
|
|
272
|
+
this.path = a, this.setGeometryByPath(a, t);
|
|
256
273
|
}
|
|
257
274
|
/** 通过路径设置线条形状 */
|
|
258
|
-
setGeometryByPath(e,
|
|
259
|
-
var
|
|
275
|
+
setGeometryByPath(e, t) {
|
|
276
|
+
var f, g, c;
|
|
260
277
|
if (this.disposed)
|
|
261
278
|
return this.logError("disposed");
|
|
262
|
-
const
|
|
263
|
-
this.path = e, this.scale =
|
|
264
|
-
const { geometry:
|
|
279
|
+
const s = (f = t == null ? void 0 : t.scale) != null ? f : this.scale, a = (g = t == null ? void 0 : t.width) != null ? g : this.width, r = (c = t == null ? void 0 : t.unit_length) != null ? c : this.unitLength;
|
|
280
|
+
this.path = e, this.scale = s, this.width = a, this.unitLength = r;
|
|
281
|
+
const { geometry: o, maxU: u, curvePath: d, curvePoints: h } = U({
|
|
265
282
|
path: e,
|
|
266
|
-
width:
|
|
267
|
-
unitLength:
|
|
283
|
+
width: a * s,
|
|
284
|
+
unitLength: r * s,
|
|
268
285
|
skipPositions: this.skippedPositions
|
|
269
286
|
});
|
|
270
|
-
this.mesh.geometry =
|
|
287
|
+
this._curvePath = d, this._curvePoints = h, this.mesh.geometry = o, this.mesh.material.needsUpdate = !0, this.mesh.material.uniforms.maxU.value = u, this.five.needsRender = !0;
|
|
271
288
|
}
|
|
272
289
|
/** 设置线条材质 */
|
|
273
290
|
setMartial(e) {
|
|
274
|
-
var
|
|
291
|
+
var t;
|
|
275
292
|
if (this.disposed)
|
|
276
293
|
return this.logError("disposed");
|
|
277
|
-
(e == null ? void 0 : e.visible) !== void 0 && this.setDefaultVisible(e.visible), (e == null ? void 0 : e.color) !== void 0 && this.setColor(e.color), (e == null ? void 0 : e.opacity) !== void 0 && this.setOpacity(e.opacity), ((
|
|
294
|
+
(e == null ? void 0 : e.visible) !== void 0 && this.setDefaultVisible(e.visible), (e == null ? void 0 : e.color) !== void 0 && this.setColor(e.color), (e == null ? void 0 : e.opacity) !== void 0 && this.setOpacity(e.opacity), ((t = e == null ? void 0 : e.texture) == null ? void 0 : t.url) !== void 0 && this.setTextureUrl(e.texture.url), (e == null ? void 0 : e.background_color) !== void 0 && this.setBackgroundColor(e.background_color), (e == null ? void 0 : e.background_opacity) !== void 0 && this.setBackgroundOpacity(e.background_opacity), (e == null ? void 0 : e.border_color) !== void 0 && this.setBorderColor(e.border_color), (e == null ? void 0 : e.border_opacity) !== void 0 && this.setBorderOpacity(e.border_opacity);
|
|
278
295
|
}
|
|
279
296
|
/** 设置贴图颜色 */
|
|
280
297
|
setColor(e) {
|
|
@@ -322,15 +339,15 @@ class B {
|
|
|
322
339
|
setTextureUrl(e) {
|
|
323
340
|
if (this.disposed)
|
|
324
341
|
return this.logError("disposed");
|
|
325
|
-
this.textureUrl = e,
|
|
326
|
-
this.disposed || this.textureUrl === e && (
|
|
342
|
+
this.textureUrl = e, E(e).then((t) => {
|
|
343
|
+
this.disposed || this.textureUrl === e && (t.wrapT = l.RepeatWrapping, this.textureHasLoaded = !0, this.mesh.material.uniforms.map.value = t, this.mesh.material.uniformsNeedUpdate = !0, this.mesh.material.needsUpdate = !0, this.five.needsRender = !0, this.updateVisible());
|
|
327
344
|
});
|
|
328
345
|
}
|
|
329
346
|
setVisibleFloorIndexes(e) {
|
|
330
|
-
var
|
|
347
|
+
var t, s;
|
|
331
348
|
if (this.disposed)
|
|
332
349
|
return this.logError("disposed");
|
|
333
|
-
this._visibleFloorIndexes = e, this.onFiveModelShownFloorChange((
|
|
350
|
+
this._visibleFloorIndexes = e, this.onFiveModelShownFloorChange((s = (t = this.five.model) == null ? void 0 : t.shownFloor) != null ? s : null);
|
|
334
351
|
}
|
|
335
352
|
setStartTag(e) {
|
|
336
353
|
this.setTag("start", e);
|
|
@@ -344,22 +361,42 @@ class B {
|
|
|
344
361
|
return this.logError("disposed");
|
|
345
362
|
this.flickerAnime.play();
|
|
346
363
|
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
364
|
+
/** 求起点到 panoIndex 曲线长度
|
|
365
|
+
* @param index panoIndex 在 panoGroup 中的索引
|
|
366
|
+
*
|
|
367
|
+
* @description 为什么不使用 panoIndex 作为参数?
|
|
368
|
+
* - panoIndex 在一个曲线中可能出现多次,无法确定是哪一个。
|
|
369
|
+
*/
|
|
370
|
+
getLengthByPanoGroupIndex(e) {
|
|
371
|
+
return this.disposed ? this.logError("disposed") : this.cacheLengths.length !== 0 ? this.cacheLengths[e] : (this.cacheLengths = this.getPanoGroupLengths(), this.cacheLengths[e]);
|
|
372
|
+
}
|
|
373
|
+
getPanoGroupLengths() {
|
|
374
|
+
const e = this.panoGroup.map((h) => this.five.work.observers[h]), t = this.curvePoints.length, s = this.curvePath.getLength(), a = t - 1, r = s / a, o = this.curvePath.getLengths(a), u = [];
|
|
375
|
+
let d = 0;
|
|
376
|
+
for (let h = 0; h < t; h++) {
|
|
377
|
+
const f = this.curvePoints[h], g = e[d];
|
|
378
|
+
if (!g)
|
|
379
|
+
break;
|
|
380
|
+
g.standingPosition.clone().setY(0).distanceTo(f.clone().setY(0)) < r && (u.push(o[h]), d += 1);
|
|
381
|
+
}
|
|
382
|
+
return u;
|
|
383
|
+
}
|
|
384
|
+
setTag(e, t) {
|
|
385
|
+
const s = e === "start" ? this.startTagContainer : this.endTagContainer;
|
|
386
|
+
t || s.plugin.clearTags();
|
|
387
|
+
const r = A({}, {
|
|
351
388
|
contentType: "Custom",
|
|
352
389
|
stickType: "2DPoint",
|
|
353
390
|
config: { visibleConfig: { visibleFiveMode: ["Floorplan", "Mapview"], followModelVisibility: !1 } },
|
|
354
391
|
style: { point: { enabled: !1 } },
|
|
355
392
|
data: {}
|
|
356
|
-
},
|
|
357
|
-
|
|
393
|
+
}, t);
|
|
394
|
+
s.tag = r, b(r) && (s.tag.element = (o) => {
|
|
358
395
|
var h;
|
|
359
|
-
(h =
|
|
360
|
-
const d = new O({ target:
|
|
361
|
-
return
|
|
362
|
-
}),
|
|
396
|
+
(h = s.app) == null || h.$destroy();
|
|
397
|
+
const u = e === "start" ? p(m({}, r.data), { name: this.name, distance: Math.floor(this.curvePath.getLength()), i18n: this.plugin.config.i18n }) : r.data, d = new O({ target: o, intro: !0, props: u });
|
|
398
|
+
return s.app = d, () => d.$destroy();
|
|
399
|
+
}), s.plugin.load({ tagList: [s.tag] });
|
|
363
400
|
}
|
|
364
401
|
doShow() {
|
|
365
402
|
this.mode === "model" && this.flowAnime.play(), this.five.scene.add(this.mesh), this.startTagContainer.plugin.show(), this.endTagContainer.plugin.show(), this.five.needsRender = !0;
|
|
@@ -368,21 +405,21 @@ class B {
|
|
|
368
405
|
this.mode === "model" && this.flowAnime.stop(), this.five.scene.remove(this.mesh), this.startTagContainer.plugin.hide(), this.endTagContainer.plugin.hide(), this.five.needsRender = !0;
|
|
369
406
|
}
|
|
370
407
|
/** 通过 panoIndex 数组计算路径 */
|
|
371
|
-
getPathFromPanoGroup(e,
|
|
408
|
+
getPathFromPanoGroup(e, t, s) {
|
|
372
409
|
if (e.length < 2)
|
|
373
410
|
return [];
|
|
374
|
-
const
|
|
375
|
-
return [
|
|
411
|
+
const r = e.map((o) => t.observers[o]).map((o) => o.standingPosition.toArray());
|
|
412
|
+
return [m({ type: "CatmullRomCurve3", points: r }, s)];
|
|
376
413
|
}
|
|
377
414
|
}
|
|
378
|
-
function
|
|
379
|
-
return
|
|
415
|
+
function b(n) {
|
|
416
|
+
return n.contentType === "Custom";
|
|
380
417
|
}
|
|
381
|
-
const
|
|
418
|
+
const te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
382
419
|
__proto__: null,
|
|
383
|
-
GuideLineModeItem:
|
|
420
|
+
GuideLineModeItem: R
|
|
384
421
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
385
422
|
export {
|
|
386
|
-
|
|
387
|
-
|
|
423
|
+
R as GuideLineModeItem,
|
|
424
|
+
te as GuideLineModeItem$1
|
|
388
425
|
};
|
|
@@ -18,12 +18,19 @@ declare class GuideLineModeItem {
|
|
|
18
18
|
get panoGroup(): number[];
|
|
19
19
|
/** 可展示的楼层 */
|
|
20
20
|
get visibleFloorIndexes(): number[];
|
|
21
|
+
/** THREE Curve 路径 */
|
|
22
|
+
get curvePath(): THREE.CurvePath<THREE.Vector3>;
|
|
23
|
+
/** THREE Curve 路径上的点 */
|
|
24
|
+
get curvePoints(): THREE.Vector3[];
|
|
25
|
+
name: string;
|
|
21
26
|
startTagContainer: GuideLineTagContainer;
|
|
22
27
|
endTagContainer: GuideLineTagContainer;
|
|
23
28
|
readonly mesh: THREE.Mesh<THREE.BufferGeometry, THREE.ShaderMaterial>;
|
|
24
29
|
private five;
|
|
25
30
|
private mode;
|
|
26
31
|
private path;
|
|
32
|
+
private _curvePath;
|
|
33
|
+
private _curvePoints;
|
|
27
34
|
private _panoGroup;
|
|
28
35
|
private skippedPositions;
|
|
29
36
|
private textureUrl;
|
|
@@ -47,6 +54,8 @@ declare class GuideLineModeItem {
|
|
|
47
54
|
private disposed;
|
|
48
55
|
private flowAnime;
|
|
49
56
|
private flickerAnime;
|
|
57
|
+
/** 缓存 panoGroup 中每个点距离起点的长度 */
|
|
58
|
+
private cacheLengths;
|
|
50
59
|
constructor(five: Five, options: {
|
|
51
60
|
mode: PluginType.GuideLineModeItemMode;
|
|
52
61
|
plugin: GuideLinePlugin;
|
|
@@ -90,6 +99,14 @@ declare class GuideLineModeItem {
|
|
|
90
99
|
setEndTag(tag: Tag | PluginType.ModelGuideLineTagData | null): void;
|
|
91
100
|
/** 闪烁 */
|
|
92
101
|
flicker(): void;
|
|
102
|
+
/** 求起点到 panoIndex 曲线长度
|
|
103
|
+
* @param index panoIndex 在 panoGroup 中的索引
|
|
104
|
+
*
|
|
105
|
+
* @description 为什么不使用 panoIndex 作为参数?
|
|
106
|
+
* - panoIndex 在一个曲线中可能出现多次,无法确定是哪一个。
|
|
107
|
+
*/
|
|
108
|
+
getLengthByPanoGroupIndex(index: number): number | void;
|
|
109
|
+
private getPanoGroupLengths;
|
|
93
110
|
private setTag;
|
|
94
111
|
/** 开始走点动画 */
|
|
95
112
|
private onWalkAnimationStart;
|
|
@@ -19,5 +19,12 @@ interface LineGeometryOption {
|
|
|
19
19
|
export declare function createLineGeometry(options: LineGeometryOption): {
|
|
20
20
|
geometry: THREE.BufferGeometry;
|
|
21
21
|
maxU: number;
|
|
22
|
+
curvePath?: undefined;
|
|
23
|
+
curvePoints?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
geometry: THREE.BufferGeometry;
|
|
26
|
+
maxU: number;
|
|
27
|
+
curvePath: THREE.CurvePath<THREE.Vector3>;
|
|
28
|
+
curvePoints: THREE.Vector3[];
|
|
22
29
|
};
|
|
23
30
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as n from "three";
|
|
2
|
-
import { Vector3 as
|
|
2
|
+
import { Vector3 as x } from "three";
|
|
3
3
|
import { polylineNormals as G } from "../../vendor/polyline-normals/index.js";
|
|
4
4
|
import "../../vendor/polyline-miter-util/index.js";
|
|
5
5
|
import "../../vendor/gl-vec2/add.js";
|
|
@@ -12,33 +12,35 @@ function Q(e) {
|
|
|
12
12
|
const i = e.width, g = e.unitLength / i, c = i / 2, E = e.path;
|
|
13
13
|
if (E.length === 0)
|
|
14
14
|
return { geometry: new n.BufferGeometry(), maxU: 0 };
|
|
15
|
-
const
|
|
15
|
+
const u = new n.CurvePath();
|
|
16
16
|
E.forEach((t) => {
|
|
17
|
-
const
|
|
18
|
-
|
|
17
|
+
const m = I(t);
|
|
18
|
+
m && u.add(m);
|
|
19
19
|
});
|
|
20
|
-
const
|
|
21
|
-
|
|
20
|
+
const w = Math.ceil(u.getLength() * 100);
|
|
21
|
+
u.arcLengthDivisions = w;
|
|
22
|
+
const o = u.getPoints(w), y = o.length, L = G(o.map((t) => [t.x, t.z])), B = (y - 1) * z * M, d = 2 * y, C = d * X, U = d * k, r = new Uint32Array(B), s = new Float32Array(C), a = new Float32Array(U);
|
|
23
|
+
let N = 0, R = 0;
|
|
22
24
|
for (let t = 0; t < o.length; t++) {
|
|
23
|
-
const [
|
|
24
|
-
s[t * 6 + 0] =
|
|
25
|
-
const
|
|
26
|
-
s[t * 6 + 3] =
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
29
|
-
const V = new n.Vector3().lerpVectors(
|
|
25
|
+
const [m, A] = L[t][0], T = o[t], { x: _, y: b, z: P } = T, f = new x(_ + m * c, b + 0.05, P + A * c);
|
|
26
|
+
s[t * 6 + 0] = f.x, s[t * 6 + 1] = f.y, s[t * 6 + 2] = f.z;
|
|
27
|
+
const h = new x(_ - m * c, b + 0.05, P - A * c);
|
|
28
|
+
s[t * 6 + 3] = h.x, s[t * 6 + 4] = h.y, s[t * 6 + 5] = h.z, N += t > 0 ? o[t - 1].clone().sub(o[t]).length() : 0;
|
|
29
|
+
const v = N / i / g;
|
|
30
|
+
if (R = v, a[t * 4 + 0] = 0, a[t * 4 + 1] = v, a[t * 4 + 2] = 1, a[t * 4 + 3] = v, e.skipPositions) {
|
|
31
|
+
const V = new n.Vector3().lerpVectors(f, h, 0.5);
|
|
30
32
|
if (e.skipPositions.some((F) => F.distanceTo(V) < 0.26))
|
|
31
33
|
continue;
|
|
32
34
|
}
|
|
33
35
|
t !== o.length - 1 && (r[t * 6 + 0] = t * 2 + 0, r[t * 6 + 1] = t * 2 + 2, r[t * 6 + 2] = t * 2 + 1, r[t * 6 + 3] = t * 2 + 2, r[t * 6 + 4] = t * 2 + 3, r[t * 6 + 5] = t * 2 + 1);
|
|
34
36
|
}
|
|
35
|
-
const
|
|
36
|
-
return
|
|
37
|
+
const l = new n.BufferGeometry();
|
|
38
|
+
return l.setAttribute("position", new n.BufferAttribute(s, 3)), l.setAttribute("uv", new n.BufferAttribute(a, 2)), l.setIndex(new n.BufferAttribute(r, 1)), { geometry: l, maxU: R, curvePath: u, curvePoints: o };
|
|
37
39
|
}
|
|
38
40
|
function I(e) {
|
|
39
41
|
if (O(e)) {
|
|
40
|
-
const i = [e.closed, e.curve_type, e.tension],
|
|
41
|
-
return new n.CatmullRomCurve3(
|
|
42
|
+
const i = [e.closed, e.curve_type, e.tension], p = e.points.map((c) => new n.Vector3().fromArray(c));
|
|
43
|
+
return new n.CatmullRomCurve3(p, ...i);
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
function O(e) {
|