@realsee/dnalogel 2.15.0 → 2.16.0-0
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/CSS3DRenderPlugin/Controller.d.ts +1 -0
- package/dist/CruisePlugin/Controller.d.ts +1 -2
- package/dist/CruisePlugin/typing.d.ts +12 -2
- package/dist/GuideLinePlugin/Controller.d.ts +17 -11
- package/dist/GuideLinePlugin/GuideLineItem.d.ts +26 -0
- package/dist/GuideLinePlugin/GuideLineModeItem.d.ts +61 -0
- package/dist/GuideLinePlugin/index.d.ts +3 -0
- package/dist/GuideLinePlugin/typing.d.ts +78 -1
- package/dist/GuideLinePlugin/utils/createLineGeometry.d.ts +19 -0
- package/dist/GuideLinePlugin/utils/index.d.ts +7 -0
- package/dist/base/BasePlugin.d.ts +1 -0
- package/dist/index.cjs.js +118 -118
- package/dist/index.js +4431 -4294
- package/dist/index.umd.js +117 -117
- package/dist/shared-utils/five/index.d.ts +1 -0
- package/dist/shared-utils/five/mode.d.ts +3 -0
- package/dist/shared-utils/index.d.ts +3 -0
- package/dist/shared-utils/isAbsoluteURL.d.ts +1 -0
- package/dist/shared-utils/log.d.ts +2 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +33 -31
- package/docs/classes/CruisePluginController.html +43 -25
- package/docs/classes/GuideLineItem.GuideLineItem.html +168 -0
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +283 -0
- package/docs/classes/Magnifier.html +22 -20
- package/docs/classes/ModelRoomLabelController.html +13 -11
- package/docs/classes/Object3DHelperController.html +42 -24
- package/docs/classes/PaintBrush.html +17 -15
- package/docs/classes/PanoMeasurePluginLine.html +25 -23
- package/docs/classes/PanoMeasurePluginModel.html +24 -22
- package/docs/classes/PanoMeasurePluginPoint.html +16 -14
- package/docs/classes/PanoMeasurePluginPolyline.html +28 -26
- package/docs/classes/PanoTagPluginController.html +64 -46
- package/docs/classes/Util.BetterTween.html +10 -8
- package/docs/classes/Util.FivePointSelector.html +14 -12
- package/docs/classes/Util.Interval.html +14 -12
- package/docs/classes/Util.Magnifier.html +19 -17
- package/docs/classes/Util.PointDomHelper.html +13 -11
- package/docs/classes/Util.PointHelper.html +13 -11
- package/docs/classes/Util.Rectangle.html +15 -13
- package/docs/enums/CameraMovementEffect.html +9 -7
- package/docs/enums/ContentType.html +21 -19
- package/docs/enums/DIRECTION.html +11 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +11 -9
- package/docs/enums/DimensionType.html +9 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +10 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +11 -9
- package/docs/enums/PaintBrushTypeEnum.html +10 -8
- package/docs/enums/Rotation.html +10 -8
- package/docs/functions/CSS3DRenderPlugin.html +6 -4
- package/docs/functions/CameraMovementPlugin.html +6 -4
- package/docs/functions/CruisePlugin.html +6 -4
- package/docs/functions/GuideLinePlugin.html +7 -5
- package/docs/functions/ItemLabelPlugin.html +6 -4
- package/docs/functions/MapviewFloorplanPlugin.html +6 -4
- package/docs/functions/ModelChassisCompassPlugin.html +6 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +6 -4
- package/docs/functions/ModelFloorplanPlugin.html +6 -4
- package/docs/functions/ModelItemLabelPlugin.html +6 -4
- package/docs/functions/ModelRoomLabelPlugin.html +6 -4
- package/docs/functions/ModelTVVideoPlugin.html +6 -4
- package/docs/functions/ModelViewPlugin.html +6 -4
- package/docs/functions/Object3DHelperPlugin.html +6 -4
- package/docs/functions/PanoCompassPlugin.html +6 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +6 -4
- package/docs/functions/PanoDoorLabelPlugin.html +6 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +6 -4
- package/docs/functions/PanoMeasurePlugin.html +6 -4
- package/docs/functions/PanoRulerPlugin.html +6 -4
- package/docs/functions/PanoRulerProPlugin.html +6 -4
- package/docs/functions/PanoSpatialTagPlugin.html +6 -4
- package/docs/functions/PanoTagPlugin.html +6 -4
- package/docs/functions/PanoVideoPlugin.html +6 -4
- package/docs/functions/TopviewFloorplanPlugin.html +6 -4
- package/docs/functions/Util.getCoordsFromClient.html +12 -6
- package/docs/functions/Util.getCoordsFromElement.html +12 -6
- package/docs/functions/Util.getFrameTime.html +12 -6
- package/docs/functions/Util.getIntersectFromRelativePosition.html +12 -6
- package/docs/functions/Util.getRaycasterFromFivePointer.html +12 -6
- package/docs/functions/Util.isAbsoluteURL.html +78 -0
- package/docs/functions/Util.isModelLike.html +78 -0
- package/docs/functions/Util.isNil.html +12 -6
- package/docs/functions/Util.isPanoramaLike.html +78 -0
- package/docs/functions/Util.nextFrame.html +12 -6
- package/docs/functions/Util.notNil.html +12 -6
- package/docs/functions/Util.requestAnimationFrameInterval.html +12 -6
- package/docs/functions/Util.tweenProgress.html +12 -6
- package/docs/functions/Util.uuid.html +75 -0
- package/docs/functions/pluginFlag.html +7 -5
- package/docs/index.html +6 -4
- package/docs/interfaces/AddTagConfig.html +8 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +13 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +10 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +9 -7
- package/docs/interfaces/EventMap.html +17 -15
- package/docs/interfaces/FloorplanBounding.html +10 -8
- package/docs/interfaces/FloorplanData.html +12 -10
- package/docs/interfaces/FloorplanEntrance.html +13 -11
- package/docs/interfaces/FloorplanExtraObject.html +12 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +10 -8
- package/docs/interfaces/FloorplanFloorData.html +11 -9
- package/docs/interfaces/FloorplanImagePosition.html +9 -7
- package/docs/interfaces/FloorplanObserver.html +11 -9
- package/docs/interfaces/FloorplanOutlineItem.html +11 -9
- package/docs/interfaces/FloorplanPosition.html +9 -7
- package/docs/interfaces/FloorplanRoomItem.html +15 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +9 -7
- package/docs/interfaces/FloorplanServerBounding.html +10 -8
- package/docs/interfaces/FloorplanServerComputedData.html +12 -10
- package/docs/interfaces/FloorplanServerData.html +9 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +12 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +10 -8
- package/docs/interfaces/FloorplanServerEntrance.html +13 -11
- package/docs/interfaces/FloorplanServerFloorData.html +11 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +9 -7
- package/docs/interfaces/FloorplanServerObserver.html +11 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +11 -9
- package/docs/interfaces/FloorplanServerPosition.html +9 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +16 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +9 -7
- package/docs/interfaces/HelperOffset.html +10 -8
- package/docs/interfaces/ImagePlaneGroup.html +8 -6
- package/docs/interfaces/ItemLabelPluginData.html +8 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +13 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +11 -9
- package/docs/interfaces/MinMax.html +9 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +9 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +10 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +9 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +10 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +10 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +8 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +13 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +9 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +8 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +11 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +10 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +8 -6
- package/docs/interfaces/ModelViewPluginExportType.html +13 -11
- package/docs/interfaces/Object3DHelperState.html +10 -8
- package/docs/interfaces/ObjectHelperControllers.html +11 -9
- package/docs/interfaces/PaintBrushAction.html +14 -12
- package/docs/interfaces/PaintBrushConfigs.html +14 -12
- package/docs/interfaces/PaintBrushState.html +12 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +12 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +7 -5
- package/docs/interfaces/PanoMeasureParameterType.html +16 -14
- package/docs/interfaces/PanoMeasurePluginLineJson.html +10 -8
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +9 -7
- package/docs/interfaces/PanoMeasurePluginPointJson.html +9 -7
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +10 -8
- package/docs/interfaces/PanoRulerPluginExportType.html +12 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +9 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +10 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +11 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +9 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +9 -7
- package/docs/interfaces/PanoRulerProPluginState.html +10 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +7 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +7 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +13 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +12 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +15 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +12 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +15 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +13 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +12 -10
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +8 -6
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +10 -8
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +8 -6
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +11 -9
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +8 -6
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +10 -8
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +12 -10
- package/docs/interfaces/Point.html +10 -8
- package/docs/interfaces/Room.html +11 -9
- package/docs/interfaces/RoomInfo.html +9 -7
- package/docs/interfaces/RoomLabel.html +16 -14
- package/docs/interfaces/RoomRules.html +7 -5
- package/docs/interfaces/Rooms.html +7 -5
- package/docs/interfaces/Scissor.html +11 -9
- package/docs/interfaces/State.html +10 -8
- package/docs/interfaces/TagCacheInterface.html +14 -12
- package/docs/interfaces/TagConfig.html +13 -11
- package/docs/interfaces/TagGLTFObjectGroup.html +8 -6
- package/docs/interfaces/TagIconUrl.html +13 -11
- package/docs/interfaces/TagObjectGroup.html +8 -6
- package/docs/interfaces/TagStyle.html +8 -6
- package/docs/interfaces/Tags.html +11 -9
- package/docs/interfaces/TemporaryState.html +8 -6
- package/docs/interfaces/Util.MagnifierParameter.html +13 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +10 -8
- package/docs/modules/GuideLineItem.html +52 -0
- package/docs/modules/GuideLineModeItem.html +52 -0
- package/docs/modules/PanoVideoPluginType.html +7 -5
- package/docs/modules/Util.html +16 -6
- package/docs/modules.html +9 -5
- package/docs/types/ArrayPosition.html +7 -5
- package/docs/types/AudioAppearance.html +7 -5
- package/docs/types/AudioTagTypeConfigKey.html +7 -5
- package/docs/types/CSS3DRenderExportType.html +7 -5
- package/docs/types/CSS3DRenderPluginExportType.html +7 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +7 -5
- package/docs/types/ClassFunctionParameters.html +7 -5
- package/docs/types/Color.html +7 -5
- package/docs/types/ContentTypeConfigKey.html +7 -5
- package/docs/types/ContentTypeConfigKeySplit.html +7 -5
- package/docs/types/ContentTypeMap.html +7 -5
- package/docs/types/Create3DDomContainerReturnType.html +7 -5
- package/docs/types/Create3DElementReturnType.html +7 -5
- package/docs/types/CruisePluginExportType.html +7 -5
- package/docs/types/Direction-1.html +7 -5
- package/docs/types/Direction4.html +7 -5
- package/docs/types/FloorplanRuleLabels.html +7 -5
- package/docs/types/FloorplanServerRuleLabels.html +7 -5
- package/docs/types/GuideLinePluginExportType.html +7 -5
- package/docs/types/HelperEventMap.html +7 -5
- package/docs/types/LoadTagConfig.html +7 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +7 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +7 -5
- package/docs/types/MediaData.html +7 -5
- package/docs/types/MediaStore.html +7 -5
- package/docs/types/ModelElement.html +7 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +7 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +7 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +7 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +7 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +7 -5
- package/docs/types/MoveArgs.html +7 -5
- package/docs/types/MoveOpts.html +7 -5
- package/docs/types/Object3DHelperEventMap.html +7 -5
- package/docs/types/ObjectFit.html +7 -5
- package/docs/types/PaintBrushEventMap.html +7 -5
- package/docs/types/PanoCompassPluginData.html +7 -5
- package/docs/types/PanoCompassPluginExportType.html +7 -5
- package/docs/types/PanoCompassPluginParameterType.html +7 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +7 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +7 -5
- package/docs/types/PanoIndex.html +7 -5
- package/docs/types/PanoMeasurePluginEvent.html +7 -5
- package/docs/types/PanoMeasureReturnType.html +7 -5
- package/docs/types/PanoSpatialTagPluginId.html +7 -5
- package/docs/types/PanoTagPluginExportInterface.html +7 -5
- package/docs/types/PanoTagPluginParamsInterface.html +7 -5
- package/docs/types/PanoVideoPluginParameterType.html +7 -5
- package/docs/types/PanoVideoPluginReturnType.html +7 -5
- package/docs/types/PlaneTag.html +7 -5
- package/docs/types/PlaneTagElement.html +7 -5
- package/docs/types/Point2DElement.html +7 -5
- package/docs/types/Point2DTag.html +7 -5
- package/docs/types/Point3DElement.html +7 -5
- package/docs/types/Point3DTag.html +7 -5
- package/docs/types/PointTag.html +7 -5
- package/docs/types/PointTagElement.html +7 -5
- package/docs/types/Position.html +7 -5
- package/docs/types/RotateArgs.html +7 -5
- package/docs/types/RotateOpts.html +7 -5
- package/docs/types/RuleLabelsKey.html +7 -5
- package/docs/types/RuleLabelsValue.html +7 -5
- package/docs/types/StickType.html +7 -5
- package/docs/types/Tag.html +7 -5
- package/docs/types/Tag2D.html +7 -5
- package/docs/types/Tag3D.html +7 -5
- package/docs/types/TagContentType.html +7 -5
- package/docs/types/TagDimensionType.html +7 -5
- package/docs/types/TagElement.html +7 -5
- package/docs/types/TagEvents.html +7 -5
- package/docs/types/TagGLTFObject.html +7 -5
- package/docs/types/TagHooks.html +7 -5
- package/docs/types/TagIconSize.html +7 -5
- package/docs/types/TagId.html +7 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +7 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +7 -5
- package/docs/types/WorkCode.html +7 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +7 -5
- package/docs/variables/PLUGIN.html +7 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +7 -5
- package/docs/variables/ROOM_TYPE_MAP.html +7 -5
- package/docs/variables/itemLabelPluginServerParams.html +7 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +7 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +7 -5
- package/libs/CSS3DRenderPlugin/Controller.d.ts +1 -0
- package/libs/CSS3DRenderPlugin/Controller.js +40 -31
- package/libs/CSS3DRenderPlugin/index.js +12 -6
- package/libs/CruisePlugin/Controller.d.ts +1 -2
- package/libs/CruisePlugin/Controller.js +197 -174
- package/libs/CruisePlugin/index.js +33 -10
- package/libs/CruisePlugin/typing.d.ts +12 -2
- package/libs/GuideLinePlugin/Controller.d.ts +17 -11
- package/libs/GuideLinePlugin/Controller.js +111 -85
- package/libs/GuideLinePlugin/GuideLineItem/index.js +35 -0
- package/libs/GuideLinePlugin/GuideLineItem.d.ts +26 -0
- package/libs/GuideLinePlugin/GuideLineItem.js +31 -0
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +148 -0
- package/libs/GuideLinePlugin/GuideLineModeItem.d.ts +61 -0
- package/libs/GuideLinePlugin/GuideLineModeItem.js +29 -0
- package/libs/GuideLinePlugin/index.d.ts +3 -0
- package/libs/GuideLinePlugin/index.js +33 -7
- package/libs/GuideLinePlugin/typing.d.ts +78 -1
- package/libs/GuideLinePlugin/utils/createLineGeometry.d.ts +19 -0
- package/libs/GuideLinePlugin/utils/createLineGeometry.js +35 -0
- package/libs/GuideLinePlugin/utils/dataFormatter.d.ts +2 -0
- package/libs/GuideLinePlugin/utils/dataFormatter.js +6 -0
- package/libs/GuideLinePlugin/utils/index.d.ts +7 -0
- package/libs/GuideLinePlugin/utils/index.js +32 -0
- package/libs/ModelTVVideoPlugin/Plugin.js +37 -31
- package/libs/ModelTVVideoPlugin/index.js +11 -5
- package/libs/Object3DHelperPlugin/Controller.js +33 -28
- package/libs/Object3DHelperPlugin/index.js +18 -13
- package/libs/PanoCompassPlugin/Controller.js +8 -6
- package/libs/PanoCompassPlugin/index.js +12 -10
- package/libs/PanoDoorLabelPlugin/BaseController.js +47 -28
- package/libs/PanoDoorLabelPlugin/Controller.js +40 -22
- package/libs/PanoDoorLabelPlugin/index.js +21 -3
- package/libs/PanoMeasurePlugin/typings/index.js +20 -1
- package/libs/PanoSpatialTagPlugin/Plugin.js +8 -3
- package/libs/PanoSpatialTagPlugin/index.js +8 -3
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +1 -1
- package/libs/PanoTagPlugin/Components/Tag/index.js +1 -1
- package/libs/PanoTagPlugin/Components/TagContainer.js +1 -1
- package/libs/PanoTagPlugin/Components/TagItem.js +1 -1
- package/libs/PanoTagPlugin/controller/TagCache.js +42 -22
- package/libs/PanoTagPlugin/controller/TagComputer.js +4 -3
- package/libs/PanoTagPlugin/controller/TagRender.js +3 -2
- package/libs/PanoTagPlugin/controller/TagUtil.js +8 -3
- package/libs/PanoTagPlugin/controller/index.js +6 -5
- package/libs/PanoTagPlugin/index.js +11 -10
- package/libs/PanoVideoPlugin/Controller.js +4 -3
- package/libs/PanoVideoPlugin/VideoMeshController.js +1 -1
- package/libs/PanoVideoPlugin/index.js +7 -6
- package/libs/base/BasePlugin.d.ts +1 -0
- package/libs/base/BasePlugin.js +21 -10
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +57 -38
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +22 -3
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +48 -29
- package/libs/floorplan/ModelFloorplanPlugin/index.js +22 -3
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +31 -11
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +23 -3
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +59 -40
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +22 -3
- package/libs/floorplan/index.js +6 -0
- package/libs/index.js +116 -110
- package/libs/shared-utils/five/index.d.ts +1 -0
- package/libs/shared-utils/five/index.js +1 -0
- package/libs/shared-utils/five/mode.d.ts +3 -0
- package/libs/shared-utils/five/mode.js +11 -0
- package/libs/shared-utils/index.d.ts +3 -0
- package/libs/shared-utils/index.js +36 -29
- package/libs/shared-utils/isAbsoluteURL.d.ts +1 -0
- package/libs/shared-utils/isAbsoluteURL.js +6 -0
- package/libs/shared-utils/log.d.ts +2 -0
- package/libs/shared-utils/log.js +10 -0
- package/libs/shared-utils/three/PointDomHelper.js +1 -1
- package/package.json +2 -2
- package/dist/GuideLinePlugin/utils/getLineGeometries.d.ts +0 -16
- package/libs/GuideLinePlugin/utils/getLineGeometries.d.ts +0 -16
- package/libs/GuideLinePlugin/utils/getLineGeometries.js +0 -64
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type GuideLinePlugin from './Controller';
|
|
2
|
+
import type { Five } from '@realsee/five';
|
|
3
|
+
import type * as PluginType from './typing';
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
/** @link https://threejs.org/docs/index.html#api/en/extras/curves/CatmullRomCurve3 */
|
|
6
|
+
declare type CatmullRomCurve3RestParams = Omit<PluginType.CatmullRomCurve3, 'type' | 'points'>;
|
|
7
|
+
/** 在不同模态下的 GuideLine */
|
|
8
|
+
declare class GuideLineModeItem {
|
|
9
|
+
readonly mesh: THREE.Mesh<THREE.BufferGeometry, THREE.MeshBasicMaterial>;
|
|
10
|
+
private five;
|
|
11
|
+
private mode;
|
|
12
|
+
private path;
|
|
13
|
+
private color;
|
|
14
|
+
private opacity;
|
|
15
|
+
private textureUrl;
|
|
16
|
+
private scale;
|
|
17
|
+
private width;
|
|
18
|
+
private unitLength;
|
|
19
|
+
private visible;
|
|
20
|
+
/** 在当前模态下,是否展示 */
|
|
21
|
+
private modeVisible;
|
|
22
|
+
private customVisible;
|
|
23
|
+
private plugin;
|
|
24
|
+
private textureHasLoaded;
|
|
25
|
+
private disposed;
|
|
26
|
+
constructor(five: Five, options: {
|
|
27
|
+
mode: PluginType.GuideLineModeItemMode;
|
|
28
|
+
plugin: GuideLinePlugin;
|
|
29
|
+
});
|
|
30
|
+
/** 自定义展示 */
|
|
31
|
+
setCustomVisible(visible: boolean | null): void;
|
|
32
|
+
/** 设置模型态展示 */
|
|
33
|
+
setModeVisible(visible: boolean): void;
|
|
34
|
+
dispose(): void;
|
|
35
|
+
/** 基础宽、长 */
|
|
36
|
+
setUnitSize(width: number, length: number): void;
|
|
37
|
+
/** 设置缩放 */
|
|
38
|
+
setScale(scale: number): void;
|
|
39
|
+
/** 通过点位设置线条形状 */
|
|
40
|
+
setGeometryByPanoGroup(panoGroup: number[], options?: CatmullRomCurve3RestParams & PluginType.GuideLineGeometryStyle): void;
|
|
41
|
+
/** 通过路径设置线条形状 */
|
|
42
|
+
setGeometryByPath(path: PluginType.PathItem[], options?: PluginType.GuideLineGeometryStyle): void;
|
|
43
|
+
/** 设置线条材质 */
|
|
44
|
+
setMartial(options?: PluginType.GuideLineMaterialStyle): void;
|
|
45
|
+
setColor(color: number[]): void;
|
|
46
|
+
setOpacity(opacity: number): void;
|
|
47
|
+
setTextureUrl(url: string): void;
|
|
48
|
+
private onPluginShow;
|
|
49
|
+
private onPluginHide;
|
|
50
|
+
private onPluginEnable;
|
|
51
|
+
private onPluginDisable;
|
|
52
|
+
/** 模型状态变更 */
|
|
53
|
+
private onFiveModeChange;
|
|
54
|
+
private updateVisible;
|
|
55
|
+
private doShow;
|
|
56
|
+
private doHide;
|
|
57
|
+
private getPathFromPanoGroup;
|
|
58
|
+
private logWarning;
|
|
59
|
+
private logError;
|
|
60
|
+
}
|
|
61
|
+
export { GuideLineModeItem };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import "three";
|
|
2
|
+
import "../shared-utils/log.js";
|
|
3
|
+
import "./utils/createLineGeometry.js";
|
|
4
|
+
import "../shared-utils/five/mode.js";
|
|
5
|
+
import "hammerjs";
|
|
6
|
+
import "@realsee/five";
|
|
7
|
+
import "@tweenjs/tween.js";
|
|
8
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
9
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
10
|
+
import "../shared-utils/animationFrame/BetterTween.js";
|
|
11
|
+
import "../shared-utils/three/loadTexture.js";
|
|
12
|
+
import { GuideLineModeItem as w } from "./GuideLineModeItem/index.js";
|
|
13
|
+
import "polyline-normals";
|
|
14
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
15
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
16
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
17
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
18
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
19
|
+
import "../shared-utils/Subscribe.js";
|
|
20
|
+
import "../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
21
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
22
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
23
|
+
import "../shared-utils/three/centerPoint.js";
|
|
24
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
25
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
26
|
+
import "../shared-utils/animationFrame/index.js";
|
|
27
|
+
export {
|
|
28
|
+
w as GuideLineModeItem
|
|
29
|
+
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { Five } from '@realsee/five';
|
|
2
2
|
import Controller from './Controller';
|
|
3
|
+
import * as GuideLineItem from './GuideLineItem';
|
|
4
|
+
import * as GuideLineModeItem from './GuideLineModeItem';
|
|
3
5
|
export declare const GuideLinePlugin: (five: Five, config?: ConstructorParameters<typeof Controller>[1]) => Controller;
|
|
4
6
|
export type { GuideLinePluginExportType } from './typing';
|
|
5
7
|
export default GuideLinePlugin;
|
|
8
|
+
export { GuideLineItem, GuideLineModeItem };
|
|
@@ -1,16 +1,42 @@
|
|
|
1
1
|
import t from "./Controller.js";
|
|
2
|
+
import { GuideLineItem$1 as J } from "./GuideLineItem/index.js";
|
|
3
|
+
import { GuideLineModeItem$1 as N } from "./GuideLineModeItem/index.js";
|
|
2
4
|
import "../base/BasePluginWithData.js";
|
|
3
5
|
import "../base/BasePlugin.js";
|
|
4
6
|
import "../shared-utils/Subscribe.js";
|
|
7
|
+
import "@realsee/five";
|
|
8
|
+
import "hammerjs";
|
|
5
9
|
import "three";
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
9
|
-
import "
|
|
10
|
+
import "@tweenjs/tween.js";
|
|
11
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
12
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
13
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
14
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
15
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
16
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
17
|
+
import "../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
18
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
19
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
20
|
+
import "../shared-utils/three/centerPoint.js";
|
|
21
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
22
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
23
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
24
|
+
import "../shared-utils/isAbsoluteURL.js";
|
|
25
|
+
import "../shared-utils/animationFrame/BetterTween.js";
|
|
26
|
+
import "../shared-utils/animationFrame/index.js";
|
|
10
27
|
import "../shared-utils/equal.js";
|
|
11
28
|
import "../shared-utils/isTruelyObject.js";
|
|
12
|
-
|
|
29
|
+
import "polyline-normals";
|
|
30
|
+
import "../shared-utils/uuid.js";
|
|
31
|
+
import "../shared-utils/three/loadTexture.js";
|
|
32
|
+
import "object-assign-deep";
|
|
33
|
+
import "../shared-utils/log.js";
|
|
34
|
+
import "./utils/createLineGeometry.js";
|
|
35
|
+
import "../shared-utils/five/mode.js";
|
|
36
|
+
const E = (i, o) => new t(i, o);
|
|
13
37
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
38
|
+
J as GuideLineItem,
|
|
39
|
+
N as GuideLineModeItem,
|
|
40
|
+
E as GuideLinePlugin,
|
|
41
|
+
E as default
|
|
16
42
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type GuideLinePlugin from '.';
|
|
2
|
+
import type { RequireAtLeastOne } from 'type-fest';
|
|
2
3
|
import type * as BasePluginWithData from '../base/BasePluginWithData';
|
|
3
4
|
export interface RouteConfig {
|
|
4
5
|
arrowTextureUrl?: string;
|
|
@@ -9,10 +10,15 @@ export interface RouteConfig {
|
|
|
9
10
|
export interface Route extends RouteConfig {
|
|
10
11
|
panoIndexList: number[];
|
|
11
12
|
}
|
|
12
|
-
export interface
|
|
13
|
+
export interface PluginDataV1 {
|
|
13
14
|
routes: Route[];
|
|
14
15
|
config?: RouteConfig;
|
|
15
16
|
}
|
|
17
|
+
export interface PluginDataV2 {
|
|
18
|
+
/** 路线数据 */
|
|
19
|
+
lines: GuideLineItem[];
|
|
20
|
+
}
|
|
21
|
+
export declare type PluginData = PluginDataV1 | PluginDataV2;
|
|
16
22
|
export interface PluginServerData extends BasePluginWithData.ServerData {
|
|
17
23
|
data: PluginData;
|
|
18
24
|
}
|
|
@@ -35,3 +41,74 @@ export interface EventMap extends BasePluginWithData.EventMap<PluginState, Plugi
|
|
|
35
41
|
}) => void;
|
|
36
42
|
}
|
|
37
43
|
export declare type GuideLinePluginExportType = ReturnType<typeof GuideLinePlugin>;
|
|
44
|
+
export interface LineGeometriesConfig {
|
|
45
|
+
/** 是否越过点位圆环。可以开启此选项来使越过点位,使其不会重叠显示 */
|
|
46
|
+
skipPanoIndexMesh?: boolean;
|
|
47
|
+
unitWidth?: number;
|
|
48
|
+
unitLength?: number;
|
|
49
|
+
}
|
|
50
|
+
export declare type GuideLineModeItemMode = 'panorama' | 'model';
|
|
51
|
+
export interface GuideLineItemContainer<T> {
|
|
52
|
+
onChildRemoved?: (child: T) => void;
|
|
53
|
+
}
|
|
54
|
+
/** 单条路线的数据 */
|
|
55
|
+
export declare type GuideLineItem = RequireAtLeastOne<{
|
|
56
|
+
/** server ID */
|
|
57
|
+
id?: number;
|
|
58
|
+
/** client ID,不存在时,会使用 String(id) 作为 client ID */
|
|
59
|
+
render_id?: string;
|
|
60
|
+
/** 路线名称 */
|
|
61
|
+
name?: string;
|
|
62
|
+
/** 可展示的楼层 */
|
|
63
|
+
visible_floor_indexes?: null | number[];
|
|
64
|
+
/** 点位数组 */
|
|
65
|
+
pano_group?: number[];
|
|
66
|
+
/** 路径:由多个曲线组合而成的路径,路径为空时,会使用 pano_group 自动创建 */
|
|
67
|
+
path?: PathItem[];
|
|
68
|
+
/** 全景态是默认否展示
|
|
69
|
+
* - 全景态包括:
|
|
70
|
+
* - Panorama
|
|
71
|
+
* - DepthPanorama
|
|
72
|
+
* - VRPanorama
|
|
73
|
+
* - XRPanorama
|
|
74
|
+
*/
|
|
75
|
+
panorama_like_visible?: boolean;
|
|
76
|
+
/** 模型态是默认否展示,不是全景态的都算模型态 */
|
|
77
|
+
model_like_visible?: boolean;
|
|
78
|
+
/** 全景态使用的数据 */
|
|
79
|
+
panorama_style?: GuideLineStyle;
|
|
80
|
+
/** 模型态使用的数据 */
|
|
81
|
+
model_style?: GuideLineStyle;
|
|
82
|
+
}, 'id' | 'render_id'>;
|
|
83
|
+
/** 影响形状的样式 */
|
|
84
|
+
export interface GuideLineGeometryStyle {
|
|
85
|
+
/** scale 之前的路线宽度,默认值是 0.5 */
|
|
86
|
+
width?: number;
|
|
87
|
+
/** 每一段 scale 之前的 长度,默认值是 0.5 */
|
|
88
|
+
unit_length?: number;
|
|
89
|
+
/** 线宽缩放 */
|
|
90
|
+
scale?: number;
|
|
91
|
+
}
|
|
92
|
+
/** 影响材质的样式 */
|
|
93
|
+
export interface GuideLineMaterialStyle {
|
|
94
|
+
/** rgb 颜色 [r, g, b] */
|
|
95
|
+
color?: number[];
|
|
96
|
+
/** 透明度 */
|
|
97
|
+
opacity?: number;
|
|
98
|
+
/** 贴图 */
|
|
99
|
+
texture?: {
|
|
100
|
+
/** 贴图地址 */
|
|
101
|
+
url: string;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/** 不同模态下的路线数据 */
|
|
105
|
+
export declare type GuideLineStyle = GuideLineGeometryStyle & GuideLineMaterialStyle;
|
|
106
|
+
/** 目前只支持 CatmullRomCurve3 */
|
|
107
|
+
export declare type PathItem = CatmullRomCurve3;
|
|
108
|
+
export interface CatmullRomCurve3 {
|
|
109
|
+
type: 'CatmullRomCurve3';
|
|
110
|
+
points: number[][];
|
|
111
|
+
closed?: boolean;
|
|
112
|
+
curve_type?: string;
|
|
113
|
+
tension?: number;
|
|
114
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import type * as PluginType from '../typing';
|
|
3
|
+
/** 生成曲线参数 */
|
|
4
|
+
interface LineGeometryOption {
|
|
5
|
+
/** 路径 */
|
|
6
|
+
path: PluginType.PathItem[];
|
|
7
|
+
/** 线宽,默认是 0.5 */
|
|
8
|
+
width: number;
|
|
9
|
+
/** 每一段的长度,默认是 0.5 */
|
|
10
|
+
unitLength: number;
|
|
11
|
+
}
|
|
12
|
+
/** 创建路线的几何体
|
|
13
|
+
* @param curvePoints 三维点位
|
|
14
|
+
* @param unitWidth 线段宽度
|
|
15
|
+
* @param unitLength 每一段的长度
|
|
16
|
+
* @returns THREE BufferGeometry
|
|
17
|
+
*/
|
|
18
|
+
export declare function createLineGeometry(options: LineGeometryOption): THREE.BufferGeometry;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as c from "three";
|
|
2
|
+
import { Vector3 as b } from "three";
|
|
3
|
+
import U from "polyline-normals";
|
|
4
|
+
const F = 2, V = 3, z = 3, G = 2;
|
|
5
|
+
function D(e) {
|
|
6
|
+
const u = e.width, g = e.unitLength / u, s = u / 2, y = e.path, m = new c.CurvePath();
|
|
7
|
+
y.forEach((t) => {
|
|
8
|
+
const a = M(t);
|
|
9
|
+
a && m.add(a);
|
|
10
|
+
});
|
|
11
|
+
const d = Math.ceil(m.getLength() * 1.5), n = m.getPoints(d), L = n.length, P = U(n.map((t) => [t.x, t.z])), x = (n.length - 1) * F * V, E = 2 * L, C = E * z, B = E * G, o = new Uint32Array(x), r = new Float32Array(C), i = new Float32Array(B);
|
|
12
|
+
let N = 0;
|
|
13
|
+
for (let t = 0; t < n.length; t++) {
|
|
14
|
+
const [a, R] = P[t][0], T = n[t], { x: p, y: w, z: A } = T, v = new b(p + a * s, w + 0.05, A + R * s);
|
|
15
|
+
r[t * 6 + 0] = v.x, r[t * 6 + 1] = v.y, r[t * 6 + 2] = v.z;
|
|
16
|
+
const h = new b(p - a * s, w + 0.05, A - R * s);
|
|
17
|
+
r[t * 6 + 3] = h.x, r[t * 6 + 4] = h.y, r[t * 6 + 5] = h.z, N += t > 0 ? n[t - 1].clone().sub(n[t]).length() : 0;
|
|
18
|
+
const _ = N / u / g;
|
|
19
|
+
i[t * 4 + 0] = 0, i[t * 4 + 1] = _, i[t * 4 + 2] = 1, i[t * 4 + 3] = _, t !== n.length - 1 && (o[t * 6 + 0] = t * 2 + 0, o[t * 6 + 1] = t * 2 + 2, o[t * 6 + 2] = t * 2 + 1, o[t * 6 + 3] = t * 2 + 2, o[t * 6 + 4] = t * 2 + 3, o[t * 6 + 5] = t * 2 + 1);
|
|
20
|
+
}
|
|
21
|
+
const l = new c.BufferGeometry();
|
|
22
|
+
return l.setAttribute("position", new c.BufferAttribute(r, 3)), l.setAttribute("uv", new c.BufferAttribute(i, 2)), l.setIndex(new c.BufferAttribute(o, 1)), l;
|
|
23
|
+
}
|
|
24
|
+
function M(e) {
|
|
25
|
+
if (X(e)) {
|
|
26
|
+
const u = [e.closed, e.curve_type, e.tension], f = e.points.map((s) => new c.Vector3().fromArray(s));
|
|
27
|
+
return new c.CatmullRomCurve3(f, ...u);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function X(e) {
|
|
31
|
+
return e.type === "CatmullRomCurve3";
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
D as createLineGeometry
|
|
35
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GuideLineModeItem } from '../GuideLineModeItem';
|
|
2
|
+
import type * as PluginType from '../typing';
|
|
3
|
+
export declare function updateGuideLineModeItemByData(options: {
|
|
4
|
+
item: GuideLineModeItem;
|
|
5
|
+
data: PluginType.GuideLineItem;
|
|
6
|
+
mode: PluginType.GuideLineModeItemMode;
|
|
7
|
+
}): void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import "three";
|
|
2
|
+
import "polyline-normals";
|
|
3
|
+
import "@realsee/five";
|
|
4
|
+
import "hammerjs";
|
|
5
|
+
import "@tweenjs/tween.js";
|
|
6
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
7
|
+
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
8
|
+
import "../../shared-utils/animationFrame/BetterTween.js";
|
|
9
|
+
import "../../shared-utils/three/loadTexture.js";
|
|
10
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
11
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
12
|
+
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
13
|
+
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
14
|
+
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
15
|
+
import "../../shared-utils/Subscribe.js";
|
|
16
|
+
import "../../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
17
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
18
|
+
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
19
|
+
import "../../shared-utils/three/centerPoint.js";
|
|
20
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
21
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
22
|
+
import "../../shared-utils/animationFrame/index.js";
|
|
23
|
+
function k(o) {
|
|
24
|
+
const t = o.data, m = o.item, r = o.mode === "panorama" ? t.panorama_style : t.model_style;
|
|
25
|
+
if (!r)
|
|
26
|
+
return;
|
|
27
|
+
const e = t.path, p = r, i = r;
|
|
28
|
+
t.path ? m.setGeometryByPath(e, p) : t.pano_group && m.setGeometryByPanoGroup(t.pano_group, p), m.setMartial(i);
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
k as updateGuideLineModeItemByData
|
|
32
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var F = (
|
|
1
|
+
var F = (i, b, e) => new Promise((m, x) => {
|
|
2
2
|
var w = (l) => {
|
|
3
3
|
try {
|
|
4
4
|
h(e.next(l));
|
|
@@ -12,7 +12,7 @@ var F = (s, b, e) => new Promise((m, x) => {
|
|
|
12
12
|
x(y);
|
|
13
13
|
}
|
|
14
14
|
}, h = (l) => l.done ? m(l.value) : Promise.resolve(l.value).then(w, E);
|
|
15
|
-
h((e = e.apply(
|
|
15
|
+
h((e = e.apply(i, b)).next());
|
|
16
16
|
});
|
|
17
17
|
import * as d from "three";
|
|
18
18
|
import { parseModelTVVideoPoints as I } from "./utils/parseData.js";
|
|
@@ -34,7 +34,13 @@ import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
|
34
34
|
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
35
35
|
import "../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
|
|
36
36
|
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
37
|
-
|
|
37
|
+
import "@realsee/five";
|
|
38
|
+
import "hammerjs";
|
|
39
|
+
import "@tweenjs/tween.js";
|
|
40
|
+
import "../shared-utils/isAbsoluteURL.js";
|
|
41
|
+
import "../shared-utils/animationFrame/BetterTween.js";
|
|
42
|
+
import "../shared-utils/animationFrame/index.js";
|
|
43
|
+
const se = (i, { videoElement: b }) => {
|
|
38
44
|
const e = {
|
|
39
45
|
videoMeshes: [],
|
|
40
46
|
videoTextureEnabled: !1,
|
|
@@ -42,20 +48,20 @@ const te = (s, { videoElement: b }) => {
|
|
|
42
48
|
rectPoints: [],
|
|
43
49
|
enabled: !1,
|
|
44
50
|
videoElement: b
|
|
45
|
-
}, m = O(
|
|
51
|
+
}, m = O(i), x = /* @__PURE__ */ new Map(), w = (t) => {
|
|
46
52
|
e.videoTexture && (e.videoTexture.image.muted = t);
|
|
47
53
|
}, E = () => e.videoTexture ? e.videoTexture.image.muted : !0, h = () => {
|
|
48
54
|
if (e.enabled || !e.videoTexture)
|
|
49
55
|
return;
|
|
50
|
-
e.enabled = !0, e.videoMeshes = y(), e.videoMeshes.forEach((o) =>
|
|
56
|
+
e.enabled = !0, e.videoMeshes = y(), e.videoMeshes.forEach((o) => i.scene.add(o));
|
|
51
57
|
const t = () => {
|
|
52
58
|
if (!e.videoTexture)
|
|
53
59
|
return;
|
|
54
60
|
const o = () => {
|
|
55
|
-
var
|
|
56
|
-
!e.videoTexture || ((
|
|
61
|
+
var s;
|
|
62
|
+
!e.videoTexture || ((s = e.videoTexture) == null || s.image.removeEventListener("timeupdate", o), e.videoTextureEnabled = !0, e.videoMeshes.forEach((n) => {
|
|
57
63
|
n.material.map !== e.videoTexture && (n.material.map = e.videoTexture);
|
|
58
|
-
}),
|
|
64
|
+
}), i.needsRender = !0);
|
|
59
65
|
};
|
|
60
66
|
e.videoTexture.image.addEventListener("timeupdate", o), e.videoTexture && e.videoMeshes.length && (e.videoTexture.image.play(), e.videoTexture.image.onplay = () => {
|
|
61
67
|
m.hide();
|
|
@@ -65,16 +71,16 @@ const te = (s, { videoElement: b }) => {
|
|
|
65
71
|
e.videoTexture.image.muted = !1, e.videoTexture.image.play();
|
|
66
72
|
});
|
|
67
73
|
};
|
|
68
|
-
if (
|
|
74
|
+
if (i.model.loaded)
|
|
69
75
|
t();
|
|
70
76
|
else
|
|
71
|
-
return
|
|
77
|
+
return i.once("modelLoaded", () => t());
|
|
72
78
|
}, l = () => {
|
|
73
79
|
!e.enabled || (e.enabled = !1, e.videoMeshes.forEach((t) => {
|
|
74
|
-
t.geometry.dispose(), t.material.dispose(),
|
|
75
|
-
}), e.videoMeshes = [],
|
|
80
|
+
t.geometry.dispose(), t.material.dispose(), i.scene.remove(t), e.videoTexture && e.videoTexture.image.pause();
|
|
81
|
+
}), e.videoMeshes = [], i.needsRender = !0);
|
|
76
82
|
}, y = () => e.rectPoints.map((t, o) => {
|
|
77
|
-
const
|
|
83
|
+
const s = new d.BufferGeometry(), n = 128, a = [];
|
|
78
84
|
a.push(...t[0].toArray());
|
|
79
85
|
for (let r = 1; r < n; r++)
|
|
80
86
|
a.push(
|
|
@@ -101,13 +107,13 @@ const te = (s, { videoElement: b }) => {
|
|
|
101
107
|
const u = [];
|
|
102
108
|
for (let r = 0; r < n; r++)
|
|
103
109
|
u.push(r, r + 1, n * 2 - r, r, n * 2 - r, n * 2 + 1 - r);
|
|
104
|
-
|
|
110
|
+
s.setAttribute("position", new d.BufferAttribute(new Float32Array(a), 3)), s.setAttribute("uv", new d.BufferAttribute(new Float32Array(c), 2)), s.setIndex(new d.BufferAttribute(new Uint32Array(u), 1));
|
|
105
111
|
const p = new d.AxesHelper(10);
|
|
106
|
-
|
|
112
|
+
i.scene.add(p);
|
|
107
113
|
const f = new d.MeshBasicMaterial({
|
|
108
114
|
map: e.videoTextureEnabled ? e.videoTexture : e.imageTexture,
|
|
109
115
|
side: d.DoubleSide
|
|
110
|
-
}), v = new d.Mesh(
|
|
116
|
+
}), v = new d.Mesh(s, f);
|
|
111
117
|
v.renderOrder = 1, v.name = `ModelTVVideoPlugin-${o}-${performance.now()}`;
|
|
112
118
|
const z = [t[1], t[2], t[3], t[0]], T = m.create3DDomContainer(z);
|
|
113
119
|
if (T != null && T.container) {
|
|
@@ -122,7 +128,7 @@ const te = (s, { videoElement: b }) => {
|
|
|
122
128
|
}), L = (t) => {
|
|
123
129
|
const o = new d.TextureLoader().load(t);
|
|
124
130
|
return o.minFilter = d.LinearFilter, o.magFilter = d.LinearFilter, o.format = d.RGBFormat, o;
|
|
125
|
-
}, P = (t, o) => new Promise((
|
|
131
|
+
}, P = (t, o) => new Promise((s, n) => {
|
|
126
132
|
const a = new XMLHttpRequest();
|
|
127
133
|
a.onreadystatechange = () => {
|
|
128
134
|
if (a.readyState == 4)
|
|
@@ -130,13 +136,13 @@ const te = (s, { videoElement: b }) => {
|
|
|
130
136
|
const c = window.URL || window.webkitURL;
|
|
131
137
|
o = o || document.createElement("video"), o.crossOrigin = "anonymous", o.muted = !0, o.loop = !0, o.playsInline = !0, o.src = c.createObjectURL(a.response);
|
|
132
138
|
const u = new d.VideoTexture(o);
|
|
133
|
-
u.minFilter = d.LinearFilter, u.magFilter = d.LinearFilter, u.format = d.RGBFormat,
|
|
139
|
+
u.minFilter = d.LinearFilter, u.magFilter = d.LinearFilter, u.format = d.RGBFormat, s(Object.assign(u, { videoSource: t }));
|
|
134
140
|
} else
|
|
135
141
|
n(new Error("Video download Error: " + a.status));
|
|
136
142
|
}, a.onerror = (c) => n(c), a.open("GET", t), a.responseType = "blob", a.send();
|
|
137
143
|
}), V = (t, o) => F(void 0, null, function* () {
|
|
138
|
-
const { video_src:
|
|
139
|
-
e.videoSource =
|
|
144
|
+
const { video_src: s, video_poster_src: n, points: a } = t;
|
|
145
|
+
e.videoSource = s, e.rectPoints = I(a).map((c) => c.map(({ x: u, y: p, z: f }) => new d.Vector3(u, p, f))), e.imageTexture = L(n), o && (e.videoElement = o), e.videoTexture = yield P(e.videoSource, e.videoElement), e.enabled = !!t.enable, e.enabled && h();
|
|
140
146
|
}), M = (t) => {
|
|
141
147
|
if (!e.enabled)
|
|
142
148
|
return;
|
|
@@ -148,34 +154,34 @@ const te = (s, { videoElement: b }) => {
|
|
|
148
154
|
}, R = () => {
|
|
149
155
|
if (!e.enabled)
|
|
150
156
|
return;
|
|
151
|
-
const t =
|
|
152
|
-
if (x.forEach((o,
|
|
153
|
-
const n = o.css3DObject.position.clone(), a = n.clone().sub(t).normalize(), c = new d.Raycaster(t, a), u =
|
|
157
|
+
const t = i.camera.position;
|
|
158
|
+
if (x.forEach((o, s) => {
|
|
159
|
+
const n = o.css3DObject.position.clone(), a = n.clone().sub(t).normalize(), c = new d.Raycaster(t, a), u = i.model.intersectRaycaster(c)[0], p = n.distanceTo(t), f = 0.01;
|
|
154
160
|
u && u.distance + f < p ? o.hide() : o.show();
|
|
155
161
|
}), !E()) {
|
|
156
|
-
const o = e.rectPoints.find((
|
|
157
|
-
const n =
|
|
158
|
-
return
|
|
159
|
-
const c = a.distanceTo(t), u = new d.Raycaster(t, a.clone().sub(t).normalize()), p =
|
|
162
|
+
const o = e.rectPoints.find((s) => {
|
|
163
|
+
const n = s[0].clone().add(s[1]).add(s[2]).add(s[3]).divideScalar(4);
|
|
164
|
+
return s.map((a) => a.clone().add(n).divideScalar(2)).filter((a) => {
|
|
165
|
+
const c = a.distanceTo(t), u = new d.Raycaster(t, a.clone().sub(t).normalize()), p = i.model.intersectRaycaster(u)[0], f = 0.01;
|
|
160
166
|
return !(p && p.distance + f < c);
|
|
161
167
|
}).length >= 2;
|
|
162
168
|
});
|
|
163
169
|
(!o || o.length === 0) && w(!0);
|
|
164
170
|
}
|
|
165
171
|
}, S = () => {
|
|
166
|
-
l(), e.videoTexture = void 0,
|
|
172
|
+
l(), e.videoTexture = void 0, i.off("modeChange", A), i.off("wantsTapGesture", M), i.off("panoArrived", R), i.off("renderFrame", () => {
|
|
167
173
|
e.videoMeshes.forEach((t) => {
|
|
168
174
|
t && (t.needsRender = !0);
|
|
169
175
|
});
|
|
170
176
|
});
|
|
171
177
|
};
|
|
172
|
-
return
|
|
178
|
+
return i.on("modeChange", A), i.on("wantsTapGesture", M), i.on("panoArrived", R), i.on("renderFrame", () => {
|
|
173
179
|
e.videoMeshes.forEach((t) => {
|
|
174
180
|
t && (t.needsRender = !0);
|
|
175
181
|
});
|
|
176
182
|
}), { enable: h, disable: l, load: V, dispose: S, state: e, css3DRenderPlugin: m };
|
|
177
183
|
};
|
|
178
184
|
export {
|
|
179
|
-
|
|
180
|
-
|
|
185
|
+
se as ModelTVVideoPlugin,
|
|
186
|
+
se as default
|
|
181
187
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./Plugin.js";
|
|
2
|
-
import { ModelTVVideoPlugin as
|
|
3
|
-
import { DIRECTION as
|
|
2
|
+
import { ModelTVVideoPlugin as h, ModelTVVideoPlugin as j } from "./Plugin.js";
|
|
3
|
+
import { DIRECTION as q } from "./typings.js";
|
|
4
4
|
import "three";
|
|
5
5
|
import "./utils/parseData.js";
|
|
6
6
|
import "../CSS3DRenderPlugin/index.js";
|
|
@@ -20,8 +20,14 @@ import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
|
20
20
|
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
21
21
|
import "../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
|
|
22
22
|
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
23
|
+
import "@realsee/five";
|
|
24
|
+
import "hammerjs";
|
|
25
|
+
import "@tweenjs/tween.js";
|
|
26
|
+
import "../shared-utils/isAbsoluteURL.js";
|
|
27
|
+
import "../shared-utils/animationFrame/BetterTween.js";
|
|
28
|
+
import "../shared-utils/animationFrame/index.js";
|
|
23
29
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
q as DIRECTION,
|
|
31
|
+
h as ModelTVVideoPlugin,
|
|
32
|
+
j as default
|
|
27
33
|
};
|