@realsee/dnalogel 2.20.2 → 2.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GuideLinePlugin/Controller.d.ts +3 -3
- package/dist/GuideLinePlugin/GuideLineItem.d.ts +1 -1
- package/dist/GuideLinePlugin/GuideLineModeItem.d.ts +16 -0
- package/dist/GuideLinePlugin/utils/createLineGeometry.d.ts +7 -0
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +2 -1
- package/dist/index.cjs.js +27 -27
- package/dist/index.js +875 -839
- package/dist/index.umd.js +21 -21
- 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 +79 -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 +22 -22
- package/docs/classes/PanoMeasurePluginModel.html +21 -21
- package/docs/classes/PanoMeasurePluginPoint.html +13 -13
- package/docs/classes/PanoMeasurePluginPolyline.html +25 -25
- package/docs/classes/PanoTagPluginController.html +46 -46
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.FivePointSelector.html +11 -11
- package/docs/classes/Util.Interval.html +11 -11
- package/docs/classes/Util.Magnifier.html +16 -16
- package/docs/classes/Util.PointDomHelper.html +10 -10
- package/docs/classes/Util.PointHelper.html +10 -10
- 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 +13 -13
- 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/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/Controller.d.ts +3 -3
- package/libs/GuideLinePlugin/Controller.js +2 -2
- package/libs/GuideLinePlugin/GuideLineItem.d.ts +1 -1
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +108 -76
- package/libs/GuideLinePlugin/GuideLineModeItem.d.ts +16 -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/Controller/index.d.ts +2 -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 +2 -2
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
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, T = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var c = (n, e, i) => e in n ? k(n, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : n[e] = i, f = (n, e) => {
|
|
6
6
|
for (var i in e || (e = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var i of
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var t = (
|
|
14
|
-
import * as
|
|
15
|
-
import { logWarning as V, logError as
|
|
7
|
+
F.call(e, i) && c(n, i, e[i]);
|
|
8
|
+
if (C)
|
|
9
|
+
for (var i of C(e))
|
|
10
|
+
T.call(e, i) && c(n, i, e[i]);
|
|
11
|
+
return n;
|
|
12
|
+
}, v = (n, e) => w(n, P(e));
|
|
13
|
+
var t = (n, e, i) => (c(n, typeof e != "symbol" ? e + "" : e, i), i);
|
|
14
|
+
import * as h from "three";
|
|
15
|
+
import { logWarning as V, logError as L } 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
|
|
24
|
-
import { loadTexture as
|
|
25
|
-
import
|
|
23
|
+
import { BetterTween as G, tweenProgress as M } 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,7 +120,7 @@ const S = (
|
|
|
120
120
|
}
|
|
121
121
|
`
|
|
122
122
|
);
|
|
123
|
-
class
|
|
123
|
+
class R {
|
|
124
124
|
constructor(e, i) {
|
|
125
125
|
t(this, "startTagContainer");
|
|
126
126
|
t(this, "endTagContainer");
|
|
@@ -128,7 +128,9 @@ class B {
|
|
|
128
128
|
t(this, "five");
|
|
129
129
|
t(this, "mode");
|
|
130
130
|
t(this, "path", []);
|
|
131
|
-
t(this, "
|
|
131
|
+
t(this, "_curvePath", null);
|
|
132
|
+
t(this, "_curvePoints", null);
|
|
133
|
+
t(this, "_panoGroup", []);
|
|
132
134
|
t(this, "skippedPositions", null);
|
|
133
135
|
t(this, "textureUrl", "");
|
|
134
136
|
t(this, "scale", 1);
|
|
@@ -149,8 +151,10 @@ class B {
|
|
|
149
151
|
t(this, "plugin");
|
|
150
152
|
t(this, "textureHasLoaded", !1);
|
|
151
153
|
t(this, "disposed", !1);
|
|
152
|
-
t(this, "flowAnime", new
|
|
153
|
-
t(this, "flickerAnime",
|
|
154
|
+
t(this, "flowAnime", new G({ progress: 0 }).to({ progress: 1 }).duration(1500).repeat(1 / 0));
|
|
155
|
+
t(this, "flickerAnime", M(300).yoyo(!0).repeat(5));
|
|
156
|
+
/** 缓存 panoGroup 中每个点距离起点的长度 */
|
|
157
|
+
t(this, "cacheLengths", []);
|
|
154
158
|
t(this, "dispose", () => {
|
|
155
159
|
var e, i;
|
|
156
160
|
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(), (i = this.endTagContainer) == null || i.plugin.dispose());
|
|
@@ -180,26 +184,26 @@ class B {
|
|
|
180
184
|
this.mesh.material.uniforms.vOffset.value = i, this.mesh.material.uniformsNeedUpdate = !0, this.five.needsRender = !0;
|
|
181
185
|
});
|
|
182
186
|
t(this, "onFlickerAnimeUpdate", (e) => {
|
|
183
|
-
var
|
|
184
|
-
const { progress: i } = e,
|
|
185
|
-
this.mesh.material.uniforms.flicker.value =
|
|
187
|
+
var a, r;
|
|
188
|
+
const { progress: i } = e, s = 1 - i;
|
|
189
|
+
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(v(f({}, this.startTagContainer.tag.data), { opacity: s }))), this.endTagContainer.tag && b(this.endTagContainer.tag) && ((r = this.endTagContainer.app) == null || r.$set(v(f({}, this.endTagContainer.tag.data), { opacity: s })));
|
|
186
190
|
});
|
|
187
191
|
t(this, "logWarning", (e) => V("GuideLineModeItem: ", e));
|
|
188
|
-
t(this, "logError", (e) =>
|
|
189
|
-
var
|
|
190
|
-
this.five = e, this.mode = i.mode, this.plugin = i.plugin, this.parent = i.parent, this.startTagContainer = { tag: null, plugin: new
|
|
191
|
-
const
|
|
192
|
-
vertexShader:
|
|
193
|
-
fragmentShader:
|
|
192
|
+
t(this, "logError", (e) => L("GuideLineModeItem: ", e));
|
|
193
|
+
var r, o;
|
|
194
|
+
this.five = e, this.mode = i.mode, this.plugin = i.plugin, this.parent = i.parent, this.startTagContainer = { tag: null, plugin: new y(this.five) }, this.endTagContainer = { tag: null, plugin: new y(this.five) };
|
|
195
|
+
const s = new h.BufferGeometry(), a = new h.ShaderMaterial({
|
|
196
|
+
vertexShader: B,
|
|
197
|
+
fragmentShader: I,
|
|
194
198
|
transparent: !0,
|
|
195
199
|
uniforms: {
|
|
196
200
|
map: { value: null },
|
|
197
201
|
useMapColor: { value: 0 },
|
|
198
|
-
mapColor: { value: new
|
|
202
|
+
mapColor: { value: new h.Color() },
|
|
199
203
|
mapOpacity: { value: 1 },
|
|
200
|
-
backgroundColor: { value: new
|
|
204
|
+
backgroundColor: { value: new h.Color() },
|
|
201
205
|
backgroundOpacity: { value: 0 },
|
|
202
|
-
borderColor: { value: new
|
|
206
|
+
borderColor: { value: new h.Color() },
|
|
203
207
|
borderOpacity: { value: 0 },
|
|
204
208
|
opacity: { value: 1 },
|
|
205
209
|
flicker: { value: 1 },
|
|
@@ -207,7 +211,7 @@ class B {
|
|
|
207
211
|
vOffset: { value: 0 }
|
|
208
212
|
}
|
|
209
213
|
});
|
|
210
|
-
this.mesh = new
|
|
214
|
+
this.mesh = new h.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
215
|
}
|
|
212
216
|
get panoGroup() {
|
|
213
217
|
return this._panoGroup;
|
|
@@ -216,6 +220,14 @@ class B {
|
|
|
216
220
|
get visibleFloorIndexes() {
|
|
217
221
|
return this._visibleFloorIndexes;
|
|
218
222
|
}
|
|
223
|
+
/** THREE Curve 路径 */
|
|
224
|
+
get curvePath() {
|
|
225
|
+
return this._curvePath;
|
|
226
|
+
}
|
|
227
|
+
/** THREE Curve 路径上的点 */
|
|
228
|
+
get curvePoints() {
|
|
229
|
+
return this._curvePoints;
|
|
230
|
+
}
|
|
219
231
|
/** 自定义展示 */
|
|
220
232
|
setCustomVisible(e) {
|
|
221
233
|
if (this.disposed)
|
|
@@ -246,28 +258,28 @@ class B {
|
|
|
246
258
|
return this.logError("disposed");
|
|
247
259
|
if (!this.five.work)
|
|
248
260
|
return this.logError("setPathByPanoGroup: work is not ready");
|
|
249
|
-
const
|
|
250
|
-
if (this._panoGroup =
|
|
251
|
-
const
|
|
252
|
-
this.skippedPositions =
|
|
261
|
+
const s = S(e);
|
|
262
|
+
if (this._panoGroup = s, (i == null ? void 0 : i.skipPanoGroup) !== void 0) {
|
|
263
|
+
const r = i.skipPanoGroup ? s.map((o) => this.five.work.observers[o]).map((o) => o.standingPosition.clone()) : null;
|
|
264
|
+
this.skippedPositions = r;
|
|
253
265
|
}
|
|
254
|
-
const
|
|
255
|
-
this.path =
|
|
266
|
+
const a = this.getPathFromPanoGroup(s, this.five.work, i);
|
|
267
|
+
this.path = a, this.setGeometryByPath(a, i);
|
|
256
268
|
}
|
|
257
269
|
/** 通过路径设置线条形状 */
|
|
258
270
|
setGeometryByPath(e, i) {
|
|
259
|
-
var
|
|
271
|
+
var m, g, p;
|
|
260
272
|
if (this.disposed)
|
|
261
273
|
return this.logError("disposed");
|
|
262
|
-
const
|
|
263
|
-
this.path = e, this.scale =
|
|
264
|
-
const { geometry:
|
|
274
|
+
const s = (m = i == null ? void 0 : i.scale) != null ? m : this.scale, a = (g = i == null ? void 0 : i.width) != null ? g : this.width, r = (p = i == null ? void 0 : i.unit_length) != null ? p : this.unitLength;
|
|
275
|
+
this.path = e, this.scale = s, this.width = a, this.unitLength = r;
|
|
276
|
+
const { geometry: o, maxU: d, curvePath: u, curvePoints: l } = U({
|
|
265
277
|
path: e,
|
|
266
|
-
width:
|
|
267
|
-
unitLength:
|
|
278
|
+
width: a * s,
|
|
279
|
+
unitLength: r * s,
|
|
268
280
|
skipPositions: this.skippedPositions
|
|
269
281
|
});
|
|
270
|
-
this.mesh.geometry =
|
|
282
|
+
this._curvePath = u, this._curvePoints = l, this.mesh.geometry = o, this.mesh.material.needsUpdate = !0, this.mesh.material.uniforms.maxU.value = d, this.five.needsRender = !0;
|
|
271
283
|
}
|
|
272
284
|
/** 设置线条材质 */
|
|
273
285
|
setMartial(e) {
|
|
@@ -280,13 +292,13 @@ class B {
|
|
|
280
292
|
setColor(e) {
|
|
281
293
|
if (this.disposed)
|
|
282
294
|
return this.logError("disposed");
|
|
283
|
-
e && (this.mesh.material.uniforms.mapColor.value = new
|
|
295
|
+
e && (this.mesh.material.uniforms.mapColor.value = new h.Color().set(e)), this.mesh.material.uniforms.useMapColor.value = e ? 1 : 0, this.mesh.material.uniformsNeedUpdate = !0, this.five.needsRender = !0;
|
|
284
296
|
}
|
|
285
297
|
/** 设置边框 */
|
|
286
298
|
setBorderColor(e) {
|
|
287
299
|
if (this.disposed)
|
|
288
300
|
return this.logError("disposed");
|
|
289
|
-
this.mesh.material.uniforms.borderColor.value = new
|
|
301
|
+
this.mesh.material.uniforms.borderColor.value = new h.Color().set(e), this.mesh.material.uniformsNeedUpdate = !0, this.five.needsRender = !0;
|
|
290
302
|
}
|
|
291
303
|
/** 设置边框透明度 */
|
|
292
304
|
setBorderOpacity(e) {
|
|
@@ -298,7 +310,7 @@ class B {
|
|
|
298
310
|
setBackgroundColor(e) {
|
|
299
311
|
if (this.disposed)
|
|
300
312
|
return this.logError("disposed");
|
|
301
|
-
this.mesh.material.uniforms.backgroundColor.value = new
|
|
313
|
+
this.mesh.material.uniforms.backgroundColor.value = new h.Color().set(e), this.mesh.material.uniformsNeedUpdate = !0, this.five.needsRender = !0;
|
|
302
314
|
}
|
|
303
315
|
/** 设置背景透明度 */
|
|
304
316
|
setBackgroundOpacity(e) {
|
|
@@ -322,15 +334,15 @@ class B {
|
|
|
322
334
|
setTextureUrl(e) {
|
|
323
335
|
if (this.disposed)
|
|
324
336
|
return this.logError("disposed");
|
|
325
|
-
this.textureUrl = e,
|
|
326
|
-
this.disposed || this.textureUrl === e && (i.wrapT =
|
|
337
|
+
this.textureUrl = e, E(e).then((i) => {
|
|
338
|
+
this.disposed || this.textureUrl === e && (i.wrapT = h.RepeatWrapping, this.textureHasLoaded = !0, this.mesh.material.uniforms.map.value = i, this.mesh.material.uniformsNeedUpdate = !0, this.mesh.material.needsUpdate = !0, this.five.needsRender = !0, this.updateVisible());
|
|
327
339
|
});
|
|
328
340
|
}
|
|
329
341
|
setVisibleFloorIndexes(e) {
|
|
330
|
-
var i,
|
|
342
|
+
var i, s;
|
|
331
343
|
if (this.disposed)
|
|
332
344
|
return this.logError("disposed");
|
|
333
|
-
this._visibleFloorIndexes = e, this.onFiveModelShownFloorChange((
|
|
345
|
+
this._visibleFloorIndexes = e, this.onFiveModelShownFloorChange((s = (i = this.five.model) == null ? void 0 : i.shownFloor) != null ? s : null);
|
|
334
346
|
}
|
|
335
347
|
setStartTag(e) {
|
|
336
348
|
this.setTag("start", e);
|
|
@@ -344,22 +356,42 @@ class B {
|
|
|
344
356
|
return this.logError("disposed");
|
|
345
357
|
this.flickerAnime.play();
|
|
346
358
|
}
|
|
359
|
+
/** 求起点到 panoIndex 曲线长度
|
|
360
|
+
* @param index panoIndex 在 panoGroup 中的索引
|
|
361
|
+
*
|
|
362
|
+
* @description 为什么不使用 panoIndex 作为参数?
|
|
363
|
+
* - panoIndex 在一个曲线中可能出现多次,无法确定是哪一个。
|
|
364
|
+
*/
|
|
365
|
+
getLengthByPanoGroupIndex(e) {
|
|
366
|
+
return this.disposed ? this.logError("disposed") : this.cacheLengths.length !== 0 ? this.cacheLengths[e] : (this.cacheLengths = this.getPanoGroupLengths(), this.cacheLengths[e]);
|
|
367
|
+
}
|
|
368
|
+
getPanoGroupLengths() {
|
|
369
|
+
const e = this.panoGroup.map((l) => this.five.work.observers[l]), i = this.curvePoints.length, s = this.curvePath.getLength(), a = i - 1, r = s / a, o = this.curvePath.getLengths(a), d = [];
|
|
370
|
+
let u = 0;
|
|
371
|
+
for (let l = 0; l < i; l++) {
|
|
372
|
+
const m = this.curvePoints[l], g = e[u];
|
|
373
|
+
if (!g)
|
|
374
|
+
break;
|
|
375
|
+
g.standingPosition.clone().setY(0).distanceTo(m.clone().setY(0)) < r && (d.push(o[l]), u += 1);
|
|
376
|
+
}
|
|
377
|
+
return d;
|
|
378
|
+
}
|
|
347
379
|
setTag(e, i) {
|
|
348
|
-
const
|
|
349
|
-
i ||
|
|
350
|
-
const
|
|
380
|
+
const s = e === "start" ? this.startTagContainer : this.endTagContainer;
|
|
381
|
+
i || s.plugin.clearTags();
|
|
382
|
+
const r = A({}, {
|
|
351
383
|
contentType: "Custom",
|
|
352
384
|
stickType: "2DPoint",
|
|
353
385
|
config: { visibleConfig: { visibleFiveMode: ["Floorplan", "Mapview"], followModelVisibility: !1 } },
|
|
354
386
|
style: { point: { enabled: !1 } },
|
|
355
387
|
data: {}
|
|
356
388
|
}, i);
|
|
357
|
-
|
|
358
|
-
var
|
|
359
|
-
(
|
|
360
|
-
const d = new O({ target:
|
|
361
|
-
return
|
|
362
|
-
}),
|
|
389
|
+
s.tag = r, b(r) && (s.tag.element = (o) => {
|
|
390
|
+
var u;
|
|
391
|
+
(u = s.app) == null || u.$destroy();
|
|
392
|
+
const d = new O({ target: o, intro: !0, props: r.data });
|
|
393
|
+
return s.app = d, () => d.$destroy();
|
|
394
|
+
}), s.plugin.load({ tagList: [s.tag] });
|
|
363
395
|
}
|
|
364
396
|
doShow() {
|
|
365
397
|
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 +400,21 @@ class B {
|
|
|
368
400
|
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
401
|
}
|
|
370
402
|
/** 通过 panoIndex 数组计算路径 */
|
|
371
|
-
getPathFromPanoGroup(e, i,
|
|
403
|
+
getPathFromPanoGroup(e, i, s) {
|
|
372
404
|
if (e.length < 2)
|
|
373
405
|
return [];
|
|
374
|
-
const
|
|
375
|
-
return [
|
|
406
|
+
const r = e.map((o) => i.observers[o]).map((o) => o.standingPosition.toArray());
|
|
407
|
+
return [f({ type: "CatmullRomCurve3", points: r }, s)];
|
|
376
408
|
}
|
|
377
409
|
}
|
|
378
|
-
function
|
|
379
|
-
return
|
|
410
|
+
function b(n) {
|
|
411
|
+
return n.contentType === "Custom";
|
|
380
412
|
}
|
|
381
|
-
const
|
|
413
|
+
const ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
382
414
|
__proto__: null,
|
|
383
|
-
GuideLineModeItem:
|
|
415
|
+
GuideLineModeItem: R
|
|
384
416
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
385
417
|
export {
|
|
386
|
-
|
|
387
|
-
|
|
418
|
+
R as GuideLineModeItem,
|
|
419
|
+
ie as GuideLineModeItem$1
|
|
388
420
|
};
|
|
@@ -18,12 +18,18 @@ 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[];
|
|
21
25
|
startTagContainer: GuideLineTagContainer;
|
|
22
26
|
endTagContainer: GuideLineTagContainer;
|
|
23
27
|
readonly mesh: THREE.Mesh<THREE.BufferGeometry, THREE.ShaderMaterial>;
|
|
24
28
|
private five;
|
|
25
29
|
private mode;
|
|
26
30
|
private path;
|
|
31
|
+
private _curvePath;
|
|
32
|
+
private _curvePoints;
|
|
27
33
|
private _panoGroup;
|
|
28
34
|
private skippedPositions;
|
|
29
35
|
private textureUrl;
|
|
@@ -47,6 +53,8 @@ declare class GuideLineModeItem {
|
|
|
47
53
|
private disposed;
|
|
48
54
|
private flowAnime;
|
|
49
55
|
private flickerAnime;
|
|
56
|
+
/** 缓存 panoGroup 中每个点距离起点的长度 */
|
|
57
|
+
private cacheLengths;
|
|
50
58
|
constructor(five: Five, options: {
|
|
51
59
|
mode: PluginType.GuideLineModeItemMode;
|
|
52
60
|
plugin: GuideLinePlugin;
|
|
@@ -90,6 +98,14 @@ declare class GuideLineModeItem {
|
|
|
90
98
|
setEndTag(tag: Tag | PluginType.ModelGuideLineTagData | null): void;
|
|
91
99
|
/** 闪烁 */
|
|
92
100
|
flicker(): void;
|
|
101
|
+
/** 求起点到 panoIndex 曲线长度
|
|
102
|
+
* @param index panoIndex 在 panoGroup 中的索引
|
|
103
|
+
*
|
|
104
|
+
* @description 为什么不使用 panoIndex 作为参数?
|
|
105
|
+
* - panoIndex 在一个曲线中可能出现多次,无法确定是哪一个。
|
|
106
|
+
*/
|
|
107
|
+
getLengthByPanoGroupIndex(index: number): number | void;
|
|
108
|
+
private getPanoGroupLengths;
|
|
93
109
|
private setTag;
|
|
94
110
|
/** 开始走点动画 */
|
|
95
111
|
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) {
|