@realsee/dnalogel 3.20.7 → 3.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/Object3DHelperPlugin/Controller.d.ts +25 -18
- package/dist/Object3DHelperPlugin/FiveControllerWrapper.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +2 -55
- package/dist/Sculpt/Meshes/Area.d.ts +30 -0
- package/dist/Sculpt/Meshes/Box.d.ts +35 -0
- package/dist/Sculpt/Meshes/Circle.d.ts +26 -0
- package/dist/Sculpt/Meshes/CircleWithEdge.d.ts +11 -0
- package/dist/Sculpt/Meshes/Cylinder.d.ts +34 -0
- package/dist/Sculpt/Meshes/Line.d.ts +27 -0
- package/dist/Sculpt/Meshes/LineWithDots.d.ts +30 -0
- package/dist/Sculpt/Meshes/Point.d.ts +22 -0
- package/dist/Sculpt/Meshes/Polygon.d.ts +31 -0
- package/dist/Sculpt/Meshes/Polyline.d.ts +34 -0
- package/dist/Sculpt/Meshes/Prism.d.ts +31 -0
- package/dist/Sculpt/Meshes/Rectangle.d.ts +24 -0
- package/dist/Sculpt/Meshes/RectangleWithEdge.d.ts +20 -0
- package/dist/Sculpt/Modules/Cursor.d.ts +13 -0
- package/dist/Sculpt/Modules/Global.d.ts +20 -0
- package/dist/Sculpt/Objects/Base/Editor.d.ts +21 -0
- package/dist/Sculpt/Objects/Base/index.d.ts +60 -0
- package/dist/Sculpt/Objects/Box/Editor.d.ts +5 -0
- package/dist/Sculpt/Objects/Box/index.d.ts +28 -0
- package/dist/Sculpt/Objects/Circle/Editor.d.ts +5 -0
- package/dist/Sculpt/Objects/Circle/index.d.ts +28 -0
- package/dist/Sculpt/Objects/Cylinder/Editor.d.ts +5 -0
- package/dist/Sculpt/Objects/Cylinder/index.d.ts +30 -0
- package/dist/Sculpt/Objects/Point/Editor.d.ts +8 -0
- package/dist/Sculpt/Objects/Point/index.d.ts +35 -0
- package/dist/Sculpt/Objects/Polygon/Editor.d.ts +8 -0
- package/dist/Sculpt/Objects/Polygon/index.d.ts +28 -0
- package/dist/Sculpt/Objects/Polyline/Editor.d.ts +25 -0
- package/dist/Sculpt/Objects/Polyline/index.d.ts +31 -0
- package/dist/Sculpt/Objects/Prism/Editor.d.ts +5 -0
- package/dist/Sculpt/Objects/Prism/index.d.ts +28 -0
- package/dist/Sculpt/Objects/Rectangle/Editor.d.ts +5 -0
- package/dist/Sculpt/Objects/Rectangle/index.d.ts +29 -0
- package/dist/Sculpt/index.d.ts +184 -0
- package/dist/Sculpt/typings/index.d.ts +16 -0
- package/dist/Sculpt/typings/utils.type.d.ts +12 -0
- package/dist/Sculpt/utils/color.d.ts +40 -0
- package/dist/Sculpt/utils/data.d.ts +7 -0
- package/dist/Sculpt/utils/getBetterNormal.d.ts +2 -0
- package/dist/Sculpt/utils/radiusToSegments.d.ts +1 -0
- package/dist/Sculpt/utils/three/ColoredMesh.d.ts +17 -0
- package/dist/Sculpt/utils/three/RectangleGeometry.d.ts +6 -0
- package/dist/Sculpt/utils/three/rayOnLine.d.ts +5 -0
- package/dist/index.cjs.js +70 -70
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11538 -9326
- package/dist/index.umd.js +63 -63
- package/dist/shared-utils/Object3DHelper/Base/BaseController.d.ts +13 -5
- package/dist/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +17 -6
- package/dist/shared-utils/Object3DHelper/Controller/RotateController.d.ts +0 -1
- package/dist/shared-utils/Object3DHelper/Controller/ScaleController.d.ts +14 -7
- package/dist/shared-utils/Object3DHelper/Helper/MoveHelper.d.ts +4 -2
- package/dist/shared-utils/Object3DHelper/Helper/RotateHelper.d.ts +3 -2
- package/dist/shared-utils/Object3DHelper/Helper/ScaleHelper.d.ts +12 -3
- package/dist/shared-utils/Object3DHelper/typings/Hooks.d.ts +1 -0
- package/dist/shared-utils/Object3DHelper/typings/index.d.ts +11 -0
- package/dist/shared-utils/Object3DHelper/utils/calculateScaleByCamera.d.ts +2 -0
- package/dist/shared-utils/audio.d.ts +3 -1
- package/dist/shared-utils/five/FiveDomEvents.d.ts +50 -13
- package/dist/shared-utils/five/getPosition.d.ts +14 -0
- package/dist/shared-utils/five/getRaycasterByNdcPosition.d.ts +6 -0
- package/dist/shared-utils/positionToVector3.d.ts +1 -0
- package/dist/shared-utils/three/IObject3D.d.ts +4 -0
- package/dist/shared-utils/three/Magnifier.d.ts +33 -19
- package/dist/shared-utils/three/PointSelector.d.ts +25 -11
- package/dist/shared-utils/three/PointSelectorHelper.d.ts +2 -0
- package/{libs/PanoMeasurePlugin/utils → dist/shared-utils/three}/geometryUtil.d.ts +1 -1
- package/dist/shared-utils/three/getIntersect.d.ts +16 -2
- package/dist/shared-utils/three/getNormal.d.ts +1 -1
- package/dist/shared-utils/three/recurveFindObject.d.ts +2 -0
- package/dist/shared-utils/three/vector3ToArray.d.ts +3 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/AreaMakerPluginType.AreaMakerController.html +9 -4
- package/docs/classes/AreaMakerPluginType.AreaMakerItem.html +9 -4
- package/docs/classes/CSS3DRender.html +10 -5
- package/docs/classes/GuideLineItem.GuideLineItem.html +10 -5
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +10 -5
- package/docs/classes/ModelRoomLabelController.html +10 -5
- package/docs/classes/MoveController.html +10 -5
- package/docs/classes/Object3DHelperController.html +26 -39
- package/docs/classes/PaintBrush.html +10 -5
- package/docs/classes/PanoMeasurePluginLine.html +10 -5
- package/docs/classes/PanoMeasurePluginModel.html +10 -5
- package/docs/classes/PanoMeasurePluginPoint.html +10 -5
- package/docs/classes/PanoMeasurePluginPolyline.html +10 -5
- package/docs/classes/PanoTagPluginController.html +10 -5
- package/docs/classes/Sculpt.html +847 -0
- package/docs/classes/Util.BetterTween.html +10 -5
- package/docs/classes/Util.Interval.html +10 -5
- package/docs/classes/Util.LineSegments.html +10 -5
- package/docs/classes/Util.Magnifier.html +82 -58
- package/docs/classes/Util.Object3D.html +10 -5
- package/docs/classes/Util.PointDomHelper.html +10 -5
- package/docs/classes/Util.PointHelper.html +10 -5
- package/docs/classes/Util.PointSelectorHelper.html +23 -18
- package/docs/classes/Util.Rectangle.html +10 -5
- package/docs/classes/WalkController.html +10 -5
- package/docs/enums/CameraMovementEffect.html +10 -5
- package/docs/enums/ContentType.html +10 -5
- package/docs/enums/DIRECTION.html +10 -5
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +10 -5
- package/docs/enums/DimensionType.html +10 -5
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +10 -5
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +10 -5
- package/docs/enums/PaintBrushTypeEnum.html +10 -5
- package/docs/enums/PointType.html +10 -5
- package/docs/enums/Rotation.html +10 -5
- package/docs/functions/AreaMakerPlugin.html +10 -5
- package/docs/functions/CSS3DRenderPlugin.html +10 -5
- package/docs/functions/CameraMovementPlugin.html +10 -5
- package/docs/functions/CruisePlugin.html +10 -5
- package/docs/functions/CurrentPanoImagePlugin.html +10 -5
- package/docs/functions/GuideLinePlugin.html +10 -5
- package/docs/functions/ItemLabelPlugin.html +10 -5
- package/docs/functions/MapviewFloorplanPlugin.html +10 -5
- package/docs/functions/ModelChassisCompassPlugin.html +10 -5
- package/docs/functions/ModelEntryDoorGuidePlugin.html +10 -5
- package/docs/functions/ModelFloorplanPlugin.html +10 -5
- package/docs/functions/ModelItemLabelPlugin.html +10 -5
- package/docs/functions/ModelRoomLabelPlugin.html +10 -5
- package/docs/functions/ModelTVVideoPlugin.html +10 -5
- package/docs/functions/ModelViewPlugin.html +10 -5
- package/docs/functions/MovePlugin.html +10 -5
- package/docs/functions/Object3DHelperPlugin.html +10 -5
- package/docs/functions/PanoCompassPlugin.html +10 -5
- package/docs/functions/PanoCursorRaycasterPlugin.html +10 -5
- package/docs/functions/PanoDoorLabelPlugin.html +10 -5
- package/docs/functions/PanoFloorplanRadarPlugin.html +10 -5
- package/docs/functions/PanoMeasurePlugin.html +10 -5
- package/docs/functions/PanoRulerPlugin.html +10 -5
- package/docs/functions/PanoRulerProPlugin.html +10 -5
- package/docs/functions/PanoSpatialTagPlugin.html +10 -5
- package/docs/functions/PanoTagPlugin.html +10 -5
- package/docs/functions/PanoVideoPlugin.html +10 -5
- package/docs/functions/PipelinePlugin.html +10 -5
- package/docs/functions/TopviewFloorplanPlugin.html +10 -5
- package/docs/functions/Util.absoluteUrl.html +10 -5
- package/docs/functions/Util.checkFiveModelLoaded.html +10 -5
- package/docs/functions/Util.equal.html +10 -5
- package/docs/functions/Util.getCoordsFromClient.html +10 -5
- package/docs/functions/Util.getCoordsFromElement.html +10 -5
- package/docs/functions/Util.getFrameTime.html +10 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +17 -7
- package/docs/functions/Util.getRaycasterFromFivePointer.html +10 -5
- package/docs/functions/Util.isAbsoluteURL.html +10 -5
- package/docs/functions/Util.isModelLike.html +10 -5
- package/docs/functions/Util.isNil.html +10 -5
- package/docs/functions/Util.isPanoramaLike.html +10 -5
- package/docs/functions/Util.nextFrame.html +10 -5
- package/docs/functions/Util.notNil.html +10 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +10 -5
- package/docs/functions/Util.tweenProgress.html +10 -5
- package/docs/functions/Util.uuid.html +10 -5
- package/docs/functions/pluginFlag.html +10 -5
- package/docs/index.html +12 -6
- package/docs/interfaces/AddTagConfig.html +10 -5
- package/docs/interfaces/AreaMakerPluginType.AnimeOptions.html +9 -4
- package/docs/interfaces/AreaMakerPluginType.Config.html +9 -4
- package/docs/interfaces/AreaMakerPluginType.EventMap.html +9 -4
- package/docs/interfaces/AreaMakerPluginType.Params.html +9 -4
- package/docs/interfaces/AreaMakerPluginType.ServerAreaMakerItem.html +9 -4
- package/docs/interfaces/AreaMakerPluginType.ServerAreaMakerItemV1.html +9 -4
- package/docs/interfaces/AreaMakerPluginType.ServerDataV1.html +9 -4
- package/docs/interfaces/AreaMakerPluginType.ServerDataV2.html +9 -4
- package/docs/interfaces/AreaMakerPluginType.ShowHideOptions.html +9 -4
- package/docs/interfaces/AreaMakerPluginType.State.html +9 -4
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +10 -5
- package/docs/interfaces/CSS3DRenderPluginState.html +10 -5
- package/docs/interfaces/CameraMovementPluginExportType.html +10 -5
- package/docs/interfaces/CruisePluginTypes.Config.html +9 -4
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +9 -4
- package/docs/interfaces/CruisePluginTypes.EventMap.html +9 -4
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +9 -4
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +9 -4
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +9 -4
- package/docs/interfaces/CruisePluginTypes.PluginData.html +9 -4
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +9 -4
- package/docs/interfaces/CruisePluginTypes.PluginState.html +9 -4
- package/docs/interfaces/CurrentPanoImagePluginType.Config.html +10 -5
- package/docs/interfaces/CurrentPanoImagePluginType.EventMap.html +10 -5
- package/docs/interfaces/CurrentPanoImagePluginType.Params.html +10 -5
- package/docs/interfaces/CurrentPanoImagePluginType.ShowHideOptions.html +10 -5
- package/docs/interfaces/CurrentPanoImagePluginType.State.html +10 -5
- package/docs/interfaces/EventMap.html +10 -5
- package/docs/interfaces/FloorplanBounding.html +10 -5
- package/docs/interfaces/FloorplanData.html +10 -5
- package/docs/interfaces/FloorplanEntrance.html +10 -5
- package/docs/interfaces/FloorplanExtraObject.html +10 -5
- package/docs/interfaces/FloorplanExtraObject3D.html +10 -5
- package/docs/interfaces/FloorplanFloorData.html +10 -5
- package/docs/interfaces/FloorplanImagePosition.html +10 -5
- package/docs/interfaces/FloorplanObserver.html +10 -5
- package/docs/interfaces/FloorplanOutlineItem.html +10 -5
- package/docs/interfaces/FloorplanPosition.html +10 -5
- package/docs/interfaces/FloorplanRoomItem.html +10 -5
- package/docs/interfaces/FloorplanRoomLabelItem.html +10 -5
- package/docs/interfaces/FloorplanServerBounding.html +10 -5
- package/docs/interfaces/FloorplanServerComputedData.html +10 -5
- package/docs/interfaces/FloorplanServerData.html +10 -5
- package/docs/interfaces/FloorplanServerDoorItem.html +10 -5
- package/docs/interfaces/FloorplanServerDoorPosition.html +10 -5
- package/docs/interfaces/FloorplanServerEntrance.html +10 -5
- package/docs/interfaces/FloorplanServerFloorData.html +10 -5
- package/docs/interfaces/FloorplanServerImagePosition.html +10 -5
- package/docs/interfaces/FloorplanServerObserver.html +10 -5
- package/docs/interfaces/FloorplanServerOutlineItem.html +10 -5
- package/docs/interfaces/FloorplanServerPosition.html +10 -5
- package/docs/interfaces/FloorplanServerRoomItem.html +10 -5
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +10 -5
- package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +10 -5
- package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +9 -4
- package/docs/interfaces/GuideLinePluginType.EventMap.html +9 -4
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +9 -4
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +9 -4
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +9 -4
- package/docs/interfaces/GuideLinePluginType.GuideLineMeshStyle.html +9 -4
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +9 -4
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +9 -4
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +9 -4
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +9 -4
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +9 -4
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +9 -4
- package/docs/interfaces/GuideLinePluginType.PluginState.html +9 -4
- package/docs/interfaces/GuideLinePluginType.Route.html +9 -4
- package/docs/interfaces/GuideLinePluginType.RouteConfig.html +9 -4
- package/docs/interfaces/HelperOffset.html +10 -5
- package/docs/interfaces/ImagePlaneGroup.html +10 -5
- package/docs/interfaces/ItemLabelPluginData.html +10 -5
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +10 -5
- package/docs/interfaces/ItemLabelPluginParametersType.html +10 -5
- package/docs/interfaces/MinMax.html +10 -5
- package/docs/interfaces/ModelChassisCompassPluginData.html +10 -5
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +10 -5
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +10 -5
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +10 -5
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +10 -5
- package/docs/interfaces/ModelItemLabelPluginData.html +10 -5
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +10 -5
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +10 -5
- package/docs/interfaces/ModelRoomLabelPluginData.html +10 -5
- package/docs/interfaces/ModelTVVideoPluginData.html +10 -5
- package/docs/interfaces/ModelTVVideoPluginExportType.html +10 -5
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +10 -5
- package/docs/interfaces/ModelViewPluginExportType.html +10 -5
- package/docs/interfaces/Object3DHelperState.html +14 -9
- package/docs/interfaces/ObjectHelperControllers.html +16 -11
- package/docs/interfaces/PaintBrushAction.html +10 -5
- package/docs/interfaces/PaintBrushConfigs.html +10 -5
- package/docs/interfaces/PaintBrushState.html +10 -5
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -5
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +10 -5
- package/docs/interfaces/PanoMeasureParameterType.html +10 -5
- package/docs/interfaces/PanoMeasurePluginLineJson.html +10 -5
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +10 -5
- package/docs/interfaces/PanoMeasurePluginPointJson.html +10 -5
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +10 -5
- package/docs/interfaces/PanoRulerPluginExportType.html +10 -5
- package/docs/interfaces/PanoRulerPluginOptions.html +10 -5
- package/docs/interfaces/PanoRulerPluginParameterType.html +10 -5
- package/docs/interfaces/PanoRulerProPluginExportType.html +10 -5
- package/docs/interfaces/PanoRulerProPluginOptions.html +10 -5
- package/docs/interfaces/PanoRulerProPluginParameterType.html +10 -5
- package/docs/interfaces/PanoRulerProPluginState.html +10 -5
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +10 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +10 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +10 -5
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -5
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +10 -5
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -5
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +10 -5
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +10 -5
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -5
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +10 -5
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +10 -5
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +10 -5
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +10 -5
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +10 -5
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +10 -5
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +10 -5
- package/docs/interfaces/Point.html +10 -5
- package/docs/interfaces/Room.html +10 -5
- package/docs/interfaces/RoomInfo.html +10 -5
- package/docs/interfaces/RoomLabel.html +10 -5
- package/docs/interfaces/RoomRules.html +10 -5
- package/docs/interfaces/Rooms.html +10 -5
- package/docs/interfaces/Scissor.html +10 -5
- package/docs/interfaces/State.html +10 -5
- package/docs/interfaces/TagCacheInterface.html +10 -5
- package/docs/interfaces/TagConfig.html +12 -7
- package/docs/interfaces/TagGLTFObjectGroup.html +10 -5
- package/docs/interfaces/TagIconUrl.html +10 -5
- package/docs/interfaces/TagObjectGroup.html +10 -5
- package/docs/interfaces/TagStyle.html +10 -5
- package/docs/interfaces/Tags.html +10 -5
- package/docs/interfaces/TemporaryState.html +10 -5
- package/docs/interfaces/Util.MagnifierParameter.html +32 -22
- package/docs/interfaces/Util.MouseGroupParameter.html +10 -5
- package/docs/interfaces/Util.PointIntersection.html +19 -7
- package/docs/modules/AreaMakerPluginType.html +9 -4
- package/docs/modules/CruisePluginTypes.html +9 -4
- package/docs/modules/CurrentPanoImagePluginType.html +10 -5
- package/docs/modules/GuideLineItem.html +10 -5
- package/docs/modules/GuideLineModeItem.html +10 -5
- package/docs/modules/GuideLinePluginType.html +9 -4
- package/docs/modules/PanoVideoPluginType.html +10 -5
- package/docs/modules/Util.html +10 -5
- package/docs/modules.html +22 -9
- package/docs/types/AddObject3DHelperConfig.html +310 -0
- package/docs/types/AreaMakerPluginType.AreaMakerItemEventMap.html +9 -4
- package/docs/types/AreaMakerPluginType.ItemRenderer.html +9 -4
- package/docs/types/AreaMakerPluginType.PluginData.html +9 -4
- package/docs/types/AreaMakerPluginType.ServerData.html +9 -4
- package/docs/types/ArrayPosition.html +10 -5
- package/docs/types/AudioAppearance.html +10 -5
- package/docs/types/AudioTagTypeConfigKey.html +10 -5
- package/docs/types/CSS3DRenderExportType.html +10 -5
- package/docs/types/CSS3DRenderPluginExportType.html +10 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +10 -5
- package/docs/types/ClassFunctionParameters.html +10 -5
- package/docs/types/Color.html +10 -5
- package/docs/types/ContentTypeConfigKey.html +10 -5
- package/docs/types/ContentTypeConfigKeySplit.html +10 -5
- package/docs/types/ContentTypeMap.html +10 -5
- package/docs/types/Create3DDomContainerReturnType.html +10 -5
- package/docs/types/Create3DElementReturnType.html +10 -5
- package/docs/types/CruisePluginExportType.html +10 -5
- package/docs/types/CruisePluginTypes.CruiseData.html +9 -4
- package/docs/types/CruisePluginTypes.MoveEffect.html +9 -4
- package/docs/types/CurrentPanoImagePluginExportType.html +10 -5
- package/docs/types/DeprecatedMediaPlaneProperty.html +10 -5
- package/docs/types/DeprecatedTagProperty.html +10 -5
- package/docs/types/Direction-1.html +10 -5
- package/docs/types/Direction4.html +10 -5
- package/docs/types/ElementRenderer.html +10 -5
- package/docs/types/FloorplanRuleLabels.html +10 -5
- package/docs/types/FloorplanServerRuleLabels.html +10 -5
- package/docs/types/GuideLinePluginExportType.html +10 -5
- package/docs/types/GuideLinePluginType.GuideLineItem.html +9 -4
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +9 -4
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +9 -4
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +9 -4
- package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +9 -4
- package/docs/types/GuideLinePluginType.PathItem.html +9 -4
- package/docs/types/GuideLinePluginType.PluginData.html +9 -4
- package/docs/types/HelperEventMap.html +10 -5
- package/docs/types/InternalHelperEventMap.html +22 -9
- package/docs/types/LoadTagConfig.html +10 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +10 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +10 -5
- package/docs/types/MediaData.html +10 -5
- package/docs/types/MediaStore.html +10 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +10 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +10 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +10 -5
- package/docs/types/ModelId.html +10 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +10 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +10 -5
- package/docs/types/MoveArgs.html +10 -5
- package/docs/types/MoveOpts.html +10 -5
- package/docs/types/Object3DHelperEventMap.html +11 -6
- package/docs/types/ObjectFit.html +10 -5
- package/docs/types/PaintBrushEventMap.html +10 -5
- package/docs/types/PanoCompassPluginData.html +10 -5
- package/docs/types/PanoCompassPluginExportType.html +10 -5
- package/docs/types/PanoCompassPluginParameterType.html +10 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +10 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +10 -5
- package/docs/types/PanoIndex.html +10 -5
- package/docs/types/PanoMeasurePluginEvent.html +10 -5
- package/docs/types/PanoMeasureReturnType.html +10 -5
- package/docs/types/PanoSpatialTagPluginId.html +10 -5
- package/docs/types/PanoTagPluginExportInterface.html +10 -5
- package/docs/types/PanoTagPluginParamsInterface.html +10 -5
- package/docs/types/PanoVideoPluginParameterType.html +10 -5
- package/docs/types/PanoVideoPluginReturnType.html +10 -5
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +10 -5
- package/docs/types/PipelinePluginParameterType.html +10 -5
- package/docs/types/PipelinePluginReturnType.html +10 -5
- package/docs/types/PlaneTag.html +10 -5
- package/docs/types/Point2DTag.html +10 -5
- package/docs/types/Point3DTag.html +10 -5
- package/docs/types/PointTag.html +10 -5
- package/docs/types/PointTagInstance.html +10 -5
- package/docs/types/Position.html +10 -5
- package/docs/types/PositionFrom.html +297 -0
- package/docs/types/RotateArgs.html +10 -5
- package/docs/types/RotateOpts.html +10 -5
- package/docs/types/RuleLabelsKey.html +10 -5
- package/docs/types/RuleLabelsValue.html +10 -5
- package/docs/types/ScaleCallback.html +309 -0
- package/docs/types/ScalePosition.html +298 -0
- package/docs/types/StickType.html +10 -5
- package/docs/types/Tag.html +10 -5
- package/docs/types/Tag2D.html +10 -5
- package/docs/types/Tag3D.html +10 -5
- package/docs/types/TagConfigByKey.html +10 -5
- package/docs/types/TagContentType.html +10 -5
- package/docs/types/TagContentTypeMapping.html +10 -5
- package/docs/types/TagDimensionType.html +10 -5
- package/docs/types/TagElement.html +10 -5
- package/docs/types/TagEvents.html +10 -5
- package/docs/types/TagGLTFObject.html +10 -5
- package/docs/types/TagHooks.html +10 -5
- package/docs/types/TagId.html +10 -5
- package/docs/types/TagInstance.html +10 -5
- package/docs/types/TagPointType.html +10 -5
- package/docs/types/TagRendererMap.html +10 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +10 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +10 -5
- package/docs/types/WorkCode.html +10 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +10 -5
- package/docs/variables/PLUGIN.html +11 -6
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +10 -5
- package/docs/variables/ROOM_TYPE_MAP.html +10 -5
- package/docs/variables/defaultGlobalConfig.html +10 -5
- package/docs/variables/itemLabelPluginServerParams.html +10 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +10 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +10 -5
- package/libs/GuideLinePlugin/Controller.js +15 -15
- package/libs/Object3DHelperPlugin/Controller.d.ts +25 -18
- package/libs/Object3DHelperPlugin/Controller.js +91 -91
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.d.ts +1 -0
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +22 -18
- package/libs/Object3DHelperPlugin/index.js +8 -6
- package/libs/PanoMeasurePlugin/Components/Controller0.js +6 -7
- package/libs/PanoMeasurePlugin/Components/Controller1.js +6 -7
- package/libs/PanoMeasurePlugin/Controller/EditController.js +7 -8
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +7 -7
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +2 -2
- package/libs/PanoMeasurePlugin/Controller/index.js +5 -5
- package/libs/PanoMeasurePlugin/Model/area.js +2 -2
- package/libs/PanoMeasurePlugin/Model/polygon.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +2 -55
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +22 -156
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +6 -7
- package/libs/PanoMeasurePlugin/index.js +24 -25
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +1 -1
- package/libs/PanoTagPlugin/controller/TagRender.js +18 -13
- package/libs/PanoTagPlugin/utils/model/mediaPlane.js +20 -10
- package/libs/Sculpt/Meshes/Area.d.ts +30 -0
- package/libs/Sculpt/Meshes/Area.js +56 -0
- package/libs/Sculpt/Meshes/Box.d.ts +35 -0
- package/libs/Sculpt/Meshes/Box.js +88 -0
- package/libs/Sculpt/Meshes/Circle.d.ts +26 -0
- package/libs/Sculpt/Meshes/Circle.js +42 -0
- package/libs/Sculpt/Meshes/CircleWithEdge.d.ts +11 -0
- package/libs/Sculpt/Meshes/CircleWithEdge.js +41 -0
- package/libs/Sculpt/Meshes/Cylinder.d.ts +34 -0
- package/libs/Sculpt/Meshes/Cylinder.js +88 -0
- package/libs/Sculpt/Meshes/Line.d.ts +27 -0
- package/libs/Sculpt/Meshes/Line.js +108 -0
- package/libs/Sculpt/Meshes/LineWithDots.d.ts +30 -0
- package/libs/Sculpt/Meshes/LineWithDots.js +70 -0
- package/libs/Sculpt/Meshes/Point.d.ts +22 -0
- package/libs/Sculpt/Meshes/Point.js +74 -0
- package/libs/Sculpt/Meshes/Polygon.d.ts +31 -0
- package/libs/Sculpt/Meshes/Polygon.js +52 -0
- package/libs/Sculpt/Meshes/Polyline.d.ts +34 -0
- package/libs/Sculpt/Meshes/Polyline.js +105 -0
- package/libs/Sculpt/Meshes/Prism.d.ts +31 -0
- package/libs/Sculpt/Meshes/Prism.js +78 -0
- package/libs/Sculpt/Meshes/Rectangle.d.ts +24 -0
- package/libs/Sculpt/Meshes/Rectangle.js +49 -0
- package/libs/Sculpt/Meshes/RectangleWithEdge.d.ts +20 -0
- package/libs/Sculpt/Meshes/RectangleWithEdge.js +49 -0
- package/libs/Sculpt/Modules/Cursor.d.ts +13 -0
- package/libs/Sculpt/Modules/Cursor.js +37 -0
- package/libs/Sculpt/Modules/Global.d.ts +20 -0
- package/libs/Sculpt/Modules/Global.js +45 -0
- package/libs/Sculpt/Objects/Base/Editor.d.ts +21 -0
- package/libs/Sculpt/Objects/Base/Editor.js +52 -0
- package/libs/Sculpt/Objects/Base/index.d.ts +60 -0
- package/libs/Sculpt/Objects/Base/index.js +77 -0
- package/libs/Sculpt/Objects/Box/Editor.d.ts +5 -0
- package/libs/Sculpt/Objects/Box/Editor.js +44 -0
- package/libs/Sculpt/Objects/Box/index.d.ts +28 -0
- package/libs/Sculpt/Objects/Box/index.js +107 -0
- package/libs/Sculpt/Objects/Circle/Editor.d.ts +5 -0
- package/libs/Sculpt/Objects/Circle/Editor.js +9 -0
- package/libs/Sculpt/Objects/Circle/index.d.ts +28 -0
- package/libs/Sculpt/Objects/Circle/index.js +114 -0
- package/libs/Sculpt/Objects/Cylinder/Editor.d.ts +5 -0
- package/libs/Sculpt/Objects/Cylinder/Editor.js +41 -0
- package/libs/Sculpt/Objects/Cylinder/index.d.ts +30 -0
- package/libs/Sculpt/Objects/Cylinder/index.js +100 -0
- package/libs/Sculpt/Objects/Point/Editor.d.ts +8 -0
- package/libs/Sculpt/Objects/Point/Editor.js +25 -0
- package/libs/Sculpt/Objects/Point/index.d.ts +35 -0
- package/libs/Sculpt/Objects/Point/index.js +92 -0
- package/libs/Sculpt/Objects/Polygon/Editor.d.ts +8 -0
- package/libs/Sculpt/Objects/Polygon/Editor.js +23 -0
- package/libs/Sculpt/Objects/Polygon/index.d.ts +28 -0
- package/libs/Sculpt/Objects/Polygon/index.js +113 -0
- package/libs/Sculpt/Objects/Polyline/Editor.d.ts +25 -0
- package/libs/Sculpt/Objects/Polyline/Editor.js +68 -0
- package/libs/Sculpt/Objects/Polyline/index.d.ts +31 -0
- package/libs/Sculpt/Objects/Polyline/index.js +96 -0
- package/libs/Sculpt/Objects/Prism/Editor.d.ts +5 -0
- package/libs/Sculpt/Objects/Prism/Editor.js +44 -0
- package/libs/Sculpt/Objects/Prism/index.d.ts +28 -0
- package/libs/Sculpt/Objects/Prism/index.js +105 -0
- package/libs/Sculpt/Objects/Rectangle/Editor.d.ts +5 -0
- package/libs/Sculpt/Objects/Rectangle/Editor.js +9 -0
- package/libs/Sculpt/Objects/Rectangle/index.d.ts +29 -0
- package/libs/Sculpt/Objects/Rectangle/index.js +105 -0
- package/libs/Sculpt/index.d.ts +184 -0
- package/libs/Sculpt/index.js +209 -0
- package/libs/Sculpt/typings/index.d.ts +16 -0
- package/libs/Sculpt/typings/utils.type.d.ts +12 -0
- package/libs/Sculpt/utils/color.d.ts +40 -0
- package/libs/Sculpt/utils/color.js +7 -0
- package/libs/Sculpt/utils/data.d.ts +7 -0
- package/libs/Sculpt/utils/getBetterNormal.d.ts +2 -0
- package/libs/Sculpt/utils/getBetterNormal.js +8 -0
- package/libs/Sculpt/utils/radiusToSegments.d.ts +1 -0
- package/libs/Sculpt/utils/radiusToSegments.js +6 -0
- package/libs/Sculpt/utils/three/ColoredMesh.d.ts +17 -0
- package/libs/Sculpt/utils/three/ColoredMesh.js +58 -0
- package/libs/Sculpt/utils/three/RectangleGeometry.d.ts +6 -0
- package/libs/Sculpt/utils/three/RectangleGeometry.js +19 -0
- package/libs/Sculpt/utils/three/rayOnLine.d.ts +5 -0
- package/libs/Sculpt/utils/three/rayOnLine.js +8 -0
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.d.ts +1 -0
- package/libs/index.js +172 -127
- package/libs/shared-utils/Object3DHelper/Base/BaseController.d.ts +13 -5
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +95 -80
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +17 -6
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +40 -35
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +9 -9
- package/libs/shared-utils/Object3DHelper/Controller/RotateController.d.ts +0 -1
- package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +54 -53
- package/libs/shared-utils/Object3DHelper/Controller/ScaleController.d.ts +14 -7
- package/libs/shared-utils/Object3DHelper/Controller/ScaleController.js +49 -15
- package/libs/shared-utils/Object3DHelper/Helper/MoveHelper.d.ts +4 -2
- package/libs/shared-utils/Object3DHelper/Helper/MoveHelper.js +16 -12
- package/libs/shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js +8 -5
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.d.ts +3 -2
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +21 -12
- package/libs/shared-utils/Object3DHelper/Helper/ScaleHelper.d.ts +12 -3
- package/libs/shared-utils/Object3DHelper/Helper/ScaleHelper.js +38 -5
- package/libs/shared-utils/Object3DHelper/typings/Hooks.d.ts +1 -0
- package/libs/shared-utils/Object3DHelper/typings/index.d.ts +11 -0
- package/libs/shared-utils/Object3DHelper/utils/boundingBox.js +22 -21
- package/libs/shared-utils/Object3DHelper/utils/calculateScaleByCamera.d.ts +2 -0
- package/libs/shared-utils/Object3DHelper/utils/calculateScaleByCamera.js +7 -0
- package/libs/shared-utils/Subscribe.js +1 -1
- package/libs/shared-utils/audio.d.ts +3 -1
- package/libs/shared-utils/audio.js +4 -3
- package/libs/shared-utils/five/FiveDomEvents.d.ts +50 -13
- package/libs/shared-utils/five/FiveDomEvents.js +135 -90
- package/libs/shared-utils/five/getPosition.d.ts +14 -0
- package/libs/shared-utils/five/getPosition.js +45 -0
- package/libs/shared-utils/five/getRaycasterByNdcPosition.d.ts +6 -0
- package/libs/shared-utils/five/getRaycasterByNdcPosition.js +8 -0
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/positionToVector3.d.ts +1 -0
- package/libs/shared-utils/positionToVector3.js +7 -4
- package/libs/shared-utils/three/IObject3D.d.ts +4 -0
- package/libs/shared-utils/three/IObject3D.js +22 -9
- package/libs/shared-utils/three/Magnifier.d.ts +33 -19
- package/libs/shared-utils/three/Magnifier.js +112 -70
- package/libs/shared-utils/three/PointSelector.d.ts +25 -11
- package/libs/shared-utils/three/PointSelector.js +70 -78
- package/libs/shared-utils/three/PointSelectorHelper.d.ts +2 -0
- package/libs/shared-utils/three/PointSelectorHelper.js +14 -14
- package/libs/shared-utils/three/generatePolygonGeometry.js +15 -0
- package/{dist/PanoMeasurePlugin/utils → libs/shared-utils/three}/geometryUtil.d.ts +1 -1
- package/libs/shared-utils/three/geometryUtil.js +37 -0
- package/libs/shared-utils/three/getIntersect.d.ts +16 -2
- package/libs/shared-utils/three/getIntersect.js +20 -5
- package/libs/shared-utils/three/getNormal.d.ts +1 -1
- package/libs/shared-utils/three/getNormal.js +8 -7
- package/libs/shared-utils/three/recurveFindObject.d.ts +2 -0
- package/libs/shared-utils/three/recurveFindObject.js +6 -0
- package/libs/shared-utils/three/vector3ToArray.d.ts +3 -0
- package/libs/shared-utils/three/vector3ToArray.js +6 -0
- package/libs/vendor/hotkeys-js/dist/hotkeys.esm.js +372 -0
- package/package.json +4 -3
- package/dist/shared-utils/getIntersectionFromEvent.d.ts +0 -4
- package/docs/classes/Magnifier.html +0 -485
- package/libs/PanoMeasurePlugin/utils/generatePolygonGeometry.js +0 -13
- package/libs/PanoMeasurePlugin/utils/geometryUtil.js +0 -39
- package/libs/shared-utils/getIntersectionFromEvent.d.ts +0 -4
- package/libs/shared-utils/getIntersectionFromEvent.js +0 -9
- /package/dist/{PanoMeasurePlugin/utils → shared-utils/three}/generatePolygonGeometry.d.ts +0 -0
- /package/libs/{PanoMeasurePlugin/utils → shared-utils/three}/generatePolygonGeometry.d.ts +0 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
var H = Object.defineProperty, T = Object.defineProperties;
|
|
2
|
+
var j = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var b = Object.getOwnPropertySymbols;
|
|
4
|
+
var A = Object.prototype.hasOwnProperty, D = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var g = (i, t, e) => t in i ? H(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, c = (i, t) => {
|
|
6
|
+
for (var e in t || (t = {}))
|
|
7
|
+
A.call(t, e) && g(i, e, t[e]);
|
|
8
|
+
if (b)
|
|
9
|
+
for (var e of b(t))
|
|
10
|
+
D.call(t, e) && g(i, e, t[e]);
|
|
11
|
+
return i;
|
|
12
|
+
}, W = (i, t) => T(i, j(t));
|
|
13
|
+
var m = (i, t, e) => (g(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
var E = (i, t, e) => new Promise((r, s) => {
|
|
15
|
+
var d = (o) => {
|
|
16
|
+
try {
|
|
17
|
+
l(e.next(o));
|
|
18
|
+
} catch (a) {
|
|
19
|
+
s(a);
|
|
20
|
+
}
|
|
21
|
+
}, n = (o) => {
|
|
22
|
+
try {
|
|
23
|
+
l(e.throw(o));
|
|
24
|
+
} catch (a) {
|
|
25
|
+
s(a);
|
|
26
|
+
}
|
|
27
|
+
}, l = (o) => o.done ? r(o.value) : Promise.resolve(o.value).then(d, n);
|
|
28
|
+
l((e = e.apply(i, t)).next());
|
|
29
|
+
});
|
|
30
|
+
import { hotkeys as L } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
31
|
+
import { BaseObject as O } from "../Base/index.js";
|
|
32
|
+
import { PolylineMesh as x } from "../../Meshes/Polyline.js";
|
|
33
|
+
import { AreaMesh as M } from "../../Meshes/Area.js";
|
|
34
|
+
import { PolygonEditor as U } from "./Editor.js";
|
|
35
|
+
import { vector3ToArray as k } from "../../../shared-utils/three/vector3ToArray.js";
|
|
36
|
+
class K extends O {
|
|
37
|
+
constructor(e, r) {
|
|
38
|
+
super(e, r);
|
|
39
|
+
m(this, "type", "Polygon");
|
|
40
|
+
m(this, "areaMesh");
|
|
41
|
+
this.editor = new U(this), e && (this.areaMesh = new M(c(c({}, e.style), e)), this.add(this.areaMesh)), L("esc", () => {
|
|
42
|
+
this.stopCreating();
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
get data() {
|
|
46
|
+
return W(c({}, this.baseData), {
|
|
47
|
+
points: k(this.applyObjectMatrixWorld(this.areaMesh.points)),
|
|
48
|
+
style: {
|
|
49
|
+
color: this.areaMesh.color.getHex(),
|
|
50
|
+
lineColor: this.areaMesh.lineColor.getHex(),
|
|
51
|
+
lineWidth: this.areaMesh.lineWidth
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
highlight() {
|
|
56
|
+
var e;
|
|
57
|
+
(e = this.areaMesh) == null || e.highlight();
|
|
58
|
+
}
|
|
59
|
+
unhighlight() {
|
|
60
|
+
var e;
|
|
61
|
+
(e = this.areaMesh) == null || e.unhighlight();
|
|
62
|
+
}
|
|
63
|
+
create(e) {
|
|
64
|
+
return E(this, null, function* () {
|
|
65
|
+
this.children.forEach((s) => {
|
|
66
|
+
s.parent === this && this.remove(s);
|
|
67
|
+
}), this.children.length = 0;
|
|
68
|
+
const r = new M(e);
|
|
69
|
+
this.areaMesh = r, this.add(this.areaMesh), yield B(this.areaMesh, this.pointSelector), this.editor.enable();
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function B(i, t) {
|
|
74
|
+
return new Promise((e, r) => {
|
|
75
|
+
const s = i.parent;
|
|
76
|
+
if (!s) {
|
|
77
|
+
r(new Error("No container"));
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const d = new x({ dashed: !0, lineColor: i.lineColor, lineWidth: i.lineWidth });
|
|
81
|
+
s == null || s.add(d);
|
|
82
|
+
const n = new x({ dashed: !0, lineColor: i.lineColor, lineWidth: i.lineWidth });
|
|
83
|
+
s == null || s.add(n), t.enable();
|
|
84
|
+
const l = [];
|
|
85
|
+
let o, a = !1;
|
|
86
|
+
const u = (h) => {
|
|
87
|
+
const p = l.length === 0 ? h.point : o.clone();
|
|
88
|
+
l.push(p.clone()), i.setPoints(l, !1), a && (y(), e());
|
|
89
|
+
}, P = (h) => {
|
|
90
|
+
var v;
|
|
91
|
+
if (!((v = i.points) != null && v.length) || !h)
|
|
92
|
+
return;
|
|
93
|
+
const p = l.at(-1).clone();
|
|
94
|
+
if (i.points.length <= 2)
|
|
95
|
+
o = h.point, d.setPoints([p, o]), s != null && s.children.includes(n) && s.remove(n);
|
|
96
|
+
else {
|
|
97
|
+
o = i.projectPoint(h.point);
|
|
98
|
+
const f = i.points[0], C = 0.2;
|
|
99
|
+
f.distanceTo(o) < C || f.distanceTo(h.point) < C ? (o = f, h.point.copy(f), t.pointSelectorHelper.updateWithIntersect(h, { emitEvent: !1 }), a = !0) : a = !1, n.setPoints([o, h.point]), s != null && s.children.includes(n) || s == null || s.add(n);
|
|
100
|
+
}
|
|
101
|
+
d.setPoints([p, o]), l.length >= 2 && i.polygon.setPoints([...l, o]);
|
|
102
|
+
}, y = () => {
|
|
103
|
+
t.off("select", u), t.off("intersectionUpdate", P), t.off("disable", w), t.disable(), s == null || s.remove(d, n);
|
|
104
|
+
}, w = () => {
|
|
105
|
+
y(), s == null || s.remove(i, n, d), r(new Error("Cancelled"));
|
|
106
|
+
};
|
|
107
|
+
t.on("select", u), t.on("intersectionUpdate", P), t.on("disable", w);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
export {
|
|
111
|
+
K as Polygon,
|
|
112
|
+
B as createPolygon
|
|
113
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseEditor } from '../Base/Editor';
|
|
2
|
+
import type { FiveDomEvent } from '../../../shared-utils/five/FiveDomEvents';
|
|
3
|
+
import type { Polyline } from '.';
|
|
4
|
+
import type * as THREE from 'three';
|
|
5
|
+
import { PointMesh } from '../../Meshes/Point';
|
|
6
|
+
import type { LineWithDotsMesh } from '../../Meshes/LineWithDots';
|
|
7
|
+
export declare abstract class LineEditor<OriginObject extends THREE.Object3D = THREE.Object3D> extends BaseEditor<OriginObject> {
|
|
8
|
+
protected draggingPoints: PointMesh[];
|
|
9
|
+
protected get points(): PointMesh[];
|
|
10
|
+
abstract get lines(): LineWithDotsMesh[];
|
|
11
|
+
get pointHandles(): PointMesh[];
|
|
12
|
+
constructor(originObject: OriginObject);
|
|
13
|
+
enable(): void;
|
|
14
|
+
disable(): void;
|
|
15
|
+
protected onDragstart: (event: FiveDomEvent) => void;
|
|
16
|
+
protected onDragend: (event: FiveDomEvent) => void;
|
|
17
|
+
protected abstract onDrag(event: FiveDomEvent): void;
|
|
18
|
+
}
|
|
19
|
+
export declare class PolylineEditor extends LineEditor<Polyline> {
|
|
20
|
+
get lines(): LineWithDotsMesh[];
|
|
21
|
+
constructor(originObject: Polyline);
|
|
22
|
+
enable(): void;
|
|
23
|
+
disable(): void;
|
|
24
|
+
protected onDrag: (event: FiveDomEvent) => void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var a = Object.defineProperty;
|
|
2
|
+
var d = (s, i, t) => i in s ? a(s, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[i] = t;
|
|
3
|
+
var r = (s, i, t) => (d(s, typeof i != "symbol" ? i + "" : i, t), t);
|
|
4
|
+
import { BaseEditor as g } from "../Base/Editor.js";
|
|
5
|
+
import { Sculpt as o } from "../../index.js";
|
|
6
|
+
import { PointMesh as l } from "../../Meshes/Point.js";
|
|
7
|
+
import { getIntersectByRaycaster as p } from "../../../shared-utils/five/getPosition.js";
|
|
8
|
+
import "hammerjs";
|
|
9
|
+
import "three";
|
|
10
|
+
import "@realsee/five";
|
|
11
|
+
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
12
|
+
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
13
|
+
import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
14
|
+
import { notNil as h } from "../../../shared-utils/isNil.js";
|
|
15
|
+
class m extends g {
|
|
16
|
+
constructor(t) {
|
|
17
|
+
super(t);
|
|
18
|
+
r(this, "draggingPoints", []);
|
|
19
|
+
r(this, "onDragstart", (t) => {
|
|
20
|
+
const e = t.target;
|
|
21
|
+
this.draggingPoints = this.points.filter((n) => n.position.equals(e.position));
|
|
22
|
+
});
|
|
23
|
+
r(this, "onDragend", (t) => {
|
|
24
|
+
this.draggingPoints = [];
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
get points() {
|
|
28
|
+
return this.children.filter((t) => t instanceof l);
|
|
29
|
+
}
|
|
30
|
+
get pointHandles() {
|
|
31
|
+
return this.children;
|
|
32
|
+
}
|
|
33
|
+
enable() {
|
|
34
|
+
super.enable(), this.lines.flatMap((t) => t.visiblePointMeshes).filter(h).forEach((t) => {
|
|
35
|
+
const e = t.clone();
|
|
36
|
+
e.visible = !1, e.draggable = !0, o.modules.fiveDomEvents.addEventListener(e, "drag", this.onDrag), o.modules.fiveDomEvents.addEventListener(e, "dragstart", this.onDragstart), o.modules.fiveDomEvents.addEventListener(e, "dragend", this.onDragend), this.add(e);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
disable() {
|
|
40
|
+
super.disable(), this.removeChildren();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
class j extends m {
|
|
44
|
+
constructor(t) {
|
|
45
|
+
super(t);
|
|
46
|
+
r(this, "onDrag", (t) => {
|
|
47
|
+
if (!this.draggingPoints || this.draggingPoints.length === 0)
|
|
48
|
+
return;
|
|
49
|
+
const e = p(o.modules.five, t.raycaster);
|
|
50
|
+
this.draggingPoints.forEach((n) => n.position.copy(e.point)), this.originObject.polyLineMesh.setPoints(this.points.map((n) => n.position));
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
get lines() {
|
|
54
|
+
return this.originObject.polyLineMesh.lines;
|
|
55
|
+
}
|
|
56
|
+
enable() {
|
|
57
|
+
super.enable();
|
|
58
|
+
}
|
|
59
|
+
disable() {
|
|
60
|
+
super.disable();
|
|
61
|
+
}
|
|
62
|
+
// private onDblclick = (event: FiveDomEvent) => {
|
|
63
|
+
// }
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
m as LineEditor,
|
|
67
|
+
j as PolylineEditor
|
|
68
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Color } from '../../../Object3DHelperPlugin';
|
|
2
|
+
import { PolylineMesh, PolylineWithDotsMesh, type PolylineData, type PolylineStyle } from '../../Meshes/Polyline';
|
|
3
|
+
import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
|
|
4
|
+
import type { PointSelector } from '../../../shared-utils/three/PointSelector';
|
|
5
|
+
import type { LiteralString } from '../../typings/utils.type';
|
|
6
|
+
export interface PolylineImportData extends BaseImportData, PolylineData {
|
|
7
|
+
type: LiteralString<'Polyline'>;
|
|
8
|
+
style?: Partial<PolylineStyle>;
|
|
9
|
+
}
|
|
10
|
+
export declare class Polyline extends BaseObject<PolylineImportData> {
|
|
11
|
+
readonly type = "Polyline";
|
|
12
|
+
polyLineMesh: PolylineWithDotsMesh;
|
|
13
|
+
get data(): {
|
|
14
|
+
points: [number, number, number][];
|
|
15
|
+
style: {
|
|
16
|
+
lineColor: number;
|
|
17
|
+
lineWidth: number;
|
|
18
|
+
dashed: boolean;
|
|
19
|
+
};
|
|
20
|
+
id: string;
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
23
|
+
constructor(data?: PolylineImportData, config?: Partial<BaseObjectConfig>);
|
|
24
|
+
highlight(): void;
|
|
25
|
+
unhighlight(): void;
|
|
26
|
+
create(params?: {
|
|
27
|
+
color?: Color;
|
|
28
|
+
lineWidth?: number;
|
|
29
|
+
}): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
export declare function createPolyline(polyLineMesh: PolylineMesh, pointSelector: PointSelector): Promise<void>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
var M = Object.defineProperty, C = Object.defineProperties;
|
|
2
|
+
var L = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var m = Object.getOwnPropertySymbols;
|
|
4
|
+
var v = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var d = (i, t, e) => t in i ? M(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, p = (i, t) => {
|
|
6
|
+
for (var e in t || (t = {}))
|
|
7
|
+
v.call(t, e) && d(i, e, t[e]);
|
|
8
|
+
if (m)
|
|
9
|
+
for (var e of m(t))
|
|
10
|
+
b.call(t, e) && d(i, e, t[e]);
|
|
11
|
+
return i;
|
|
12
|
+
}, g = (i, t) => C(i, L(t));
|
|
13
|
+
var y = (i, t, e) => (d(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
var u = (i, t, e) => new Promise((n, l) => {
|
|
15
|
+
var a = (o) => {
|
|
16
|
+
try {
|
|
17
|
+
h(e.next(o));
|
|
18
|
+
} catch (s) {
|
|
19
|
+
l(s);
|
|
20
|
+
}
|
|
21
|
+
}, r = (o) => {
|
|
22
|
+
try {
|
|
23
|
+
h(e.throw(o));
|
|
24
|
+
} catch (s) {
|
|
25
|
+
l(s);
|
|
26
|
+
}
|
|
27
|
+
}, h = (o) => o.done ? n(o.value) : Promise.resolve(o.value).then(a, r);
|
|
28
|
+
h((e = e.apply(i, t)).next());
|
|
29
|
+
});
|
|
30
|
+
import { hotkeys as W } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
31
|
+
import { PolylineWithDotsMesh as P, PolylineMesh as x } from "../../Meshes/Polyline.js";
|
|
32
|
+
import { BaseObject as E } from "../Base/index.js";
|
|
33
|
+
import * as j from "three";
|
|
34
|
+
import { PolylineEditor as D } from "./Editor.js";
|
|
35
|
+
import { vector3ToArray as H } from "../../../shared-utils/three/vector3ToArray.js";
|
|
36
|
+
class q extends E {
|
|
37
|
+
constructor(e, n) {
|
|
38
|
+
super(e, n);
|
|
39
|
+
y(this, "type", "Polyline");
|
|
40
|
+
y(this, "polyLineMesh");
|
|
41
|
+
e && (this.polyLineMesh = new P(p(p({}, e.style), e)), this.add(this.polyLineMesh)), this.editor = new D(this), W("esc", () => {
|
|
42
|
+
this.stopCreating();
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
get data() {
|
|
46
|
+
return g(p({}, this.baseData), {
|
|
47
|
+
points: H(this.applyObjectMatrixWorld(this.polyLineMesh.points)),
|
|
48
|
+
style: {
|
|
49
|
+
lineColor: new j.Color(this.polyLineMesh.lineColor).getHex(),
|
|
50
|
+
lineWidth: this.polyLineMesh.lineWidth,
|
|
51
|
+
dashed: this.polyLineMesh.dashed
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
highlight() {
|
|
56
|
+
var e;
|
|
57
|
+
(e = this.polyLineMesh) == null || e.highlight();
|
|
58
|
+
}
|
|
59
|
+
unhighlight() {
|
|
60
|
+
var e;
|
|
61
|
+
(e = this.polyLineMesh) == null || e.unhighlight();
|
|
62
|
+
}
|
|
63
|
+
create(e) {
|
|
64
|
+
return u(this, null, function* () {
|
|
65
|
+
this.removeChildren();
|
|
66
|
+
const n = new P(e);
|
|
67
|
+
this.polyLineMesh = n, this.add(this.polyLineMesh), yield O(n, this.pointSelector), this.editor.enable();
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function O(i, t) {
|
|
72
|
+
const e = i.parent;
|
|
73
|
+
if (!e)
|
|
74
|
+
return;
|
|
75
|
+
const n = new x({ dashed: !0, lineColor: i.lineColor, lineWidth: i.lineWidth });
|
|
76
|
+
return e.add(n), t.enable(), new Promise((l, a) => {
|
|
77
|
+
const r = [], h = (s) => {
|
|
78
|
+
const c = s.point;
|
|
79
|
+
r.push(c.clone()), i.setPoints(r);
|
|
80
|
+
}, o = (s) => {
|
|
81
|
+
var f;
|
|
82
|
+
if (!((f = i.points) != null && f.length) || !s)
|
|
83
|
+
return;
|
|
84
|
+
const c = r.at(-1).clone(), w = s.point;
|
|
85
|
+
n.setPoints([c, w]);
|
|
86
|
+
};
|
|
87
|
+
t.on("select", h), t.on("intersectionUpdate", o), t.on("disable", () => {
|
|
88
|
+
if (t.off("select", h), t.off("intersectionUpdate", o), e.remove(n), r.length < 2)
|
|
89
|
+
return e.remove(i), a(new Error("Cancelled"));
|
|
90
|
+
l();
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
export {
|
|
95
|
+
q as Polyline
|
|
96
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { BaseEditorWithObjectHelper as l } from "../Base/Editor.js";
|
|
2
|
+
import * as m from "three";
|
|
3
|
+
class P extends l {
|
|
4
|
+
constructor(t) {
|
|
5
|
+
super(t, () => {
|
|
6
|
+
const i = () => {
|
|
7
|
+
var n, e;
|
|
8
|
+
const o = (n = t.prismMesh.topPolygon.getGeometryInfo()) == null ? void 0 : n.center, s = (e = t.prismMesh.bottomPolygon.getGeometryInfo()) == null ? void 0 : e.center, r = new m.Vector3().lerpVectors(o, s, 0.5);
|
|
9
|
+
return { topCenter: o, bottomCenter: s, boxCenter: r };
|
|
10
|
+
};
|
|
11
|
+
return {
|
|
12
|
+
positionFrom: () => i().boxCenter.clone().applyMatrix4(t.matrixWorld),
|
|
13
|
+
yAxis: t.prismMesh.up,
|
|
14
|
+
scaleHelper: {
|
|
15
|
+
enable: !0,
|
|
16
|
+
positions: () => {
|
|
17
|
+
const o = i();
|
|
18
|
+
return [
|
|
19
|
+
{
|
|
20
|
+
id: "top",
|
|
21
|
+
handlePosition: o.topCenter,
|
|
22
|
+
basePosition: o.bottomCenter
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "bottom",
|
|
26
|
+
handlePosition: o.bottomCenter,
|
|
27
|
+
basePosition: o.topCenter
|
|
28
|
+
}
|
|
29
|
+
];
|
|
30
|
+
},
|
|
31
|
+
scaleCallback: (o) => {
|
|
32
|
+
const { intersectPoint: s, scalePosition: r } = o, { id: n } = r, { prismMesh: e } = t;
|
|
33
|
+
n === "top" ? e.setPoints({ heightPoint: s }) : n === "bottom" && e.setPoints({
|
|
34
|
+
points: e.topPolygon.points.map((p) => p.clone().add(s.clone().sub(r.basePosition)))
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
P as PrismEditor
|
|
44
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
|
|
2
|
+
import { PrismMesh, type PrismData, type PrismStyle } from '../../Meshes/Prism';
|
|
3
|
+
import type { PointSelector } from '../../../shared-utils/three/PointSelector';
|
|
4
|
+
import type { LiteralString } from '../../typings/utils.type';
|
|
5
|
+
export interface PrismImportData extends BaseImportData, PrismData {
|
|
6
|
+
type: LiteralString<'Prism'>;
|
|
7
|
+
style?: Partial<PrismStyle>;
|
|
8
|
+
}
|
|
9
|
+
export declare class Prism extends BaseObject<PrismImportData> {
|
|
10
|
+
readonly type = "Prism";
|
|
11
|
+
prismMesh: PrismMesh;
|
|
12
|
+
get data(): {
|
|
13
|
+
readonly points: [number, number, number][];
|
|
14
|
+
readonly heightPoint: [number, number, number];
|
|
15
|
+
readonly style: {
|
|
16
|
+
readonly color: number;
|
|
17
|
+
readonly lineWidth: number;
|
|
18
|
+
readonly lineColor: number;
|
|
19
|
+
};
|
|
20
|
+
readonly id: string;
|
|
21
|
+
readonly type: string;
|
|
22
|
+
};
|
|
23
|
+
constructor(data?: PrismImportData, config?: Partial<BaseObjectConfig>);
|
|
24
|
+
highlight(): void;
|
|
25
|
+
unhighlight(): void;
|
|
26
|
+
create(params?: Partial<PrismStyle>): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
export declare function createPrism(prismMesh: PrismMesh, pointSelector: PointSelector): Promise<void>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
var v = Object.defineProperty, E = Object.defineProperties;
|
|
2
|
+
var L = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var M = Object.getOwnPropertySymbols;
|
|
4
|
+
var O = Object.prototype.hasOwnProperty, C = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var p = (e, i, t) => i in e ? v(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, c = (e, i) => {
|
|
6
|
+
for (var t in i || (i = {}))
|
|
7
|
+
O.call(i, t) && p(e, t, i[t]);
|
|
8
|
+
if (M)
|
|
9
|
+
for (var t of M(i))
|
|
10
|
+
C.call(i, t) && p(e, t, i[t]);
|
|
11
|
+
return e;
|
|
12
|
+
}, w = (e, i) => E(e, L(i));
|
|
13
|
+
var d = (e, i, t) => (p(e, typeof i != "symbol" ? i + "" : i, t), t);
|
|
14
|
+
var f = (e, i, t) => new Promise((s, n) => {
|
|
15
|
+
var m = (o) => {
|
|
16
|
+
try {
|
|
17
|
+
r(t.next(o));
|
|
18
|
+
} catch (h) {
|
|
19
|
+
n(h);
|
|
20
|
+
}
|
|
21
|
+
}, l = (o) => {
|
|
22
|
+
try {
|
|
23
|
+
r(t.throw(o));
|
|
24
|
+
} catch (h) {
|
|
25
|
+
n(h);
|
|
26
|
+
}
|
|
27
|
+
}, r = (o) => o.done ? s(o.value) : Promise.resolve(o.value).then(m, l);
|
|
28
|
+
r((t = t.apply(e, i)).next());
|
|
29
|
+
});
|
|
30
|
+
import { BaseObject as W } from "../Base/index.js";
|
|
31
|
+
import * as j from "three";
|
|
32
|
+
import { createPolygon as T } from "../Polygon/index.js";
|
|
33
|
+
import { PrismMesh as x } from "../../Meshes/Prism.js";
|
|
34
|
+
import { Sculpt as U } from "../../index.js";
|
|
35
|
+
import { LineMesh as k } from "../../Meshes/Line.js";
|
|
36
|
+
import { PrismEditor as z } from "./Editor.js";
|
|
37
|
+
import { hotkeys as A } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
38
|
+
import { rayOnLine as B } from "../../utils/three/rayOnLine.js";
|
|
39
|
+
import { getNormal as D } from "../../../shared-utils/three/getNormal.js";
|
|
40
|
+
import { vector3ToArray as H } from "../../../shared-utils/three/vector3ToArray.js";
|
|
41
|
+
class Z extends W {
|
|
42
|
+
constructor(t, s) {
|
|
43
|
+
super(t, s);
|
|
44
|
+
d(this, "type", "Prism");
|
|
45
|
+
d(this, "prismMesh");
|
|
46
|
+
this.editor = new z(this), t && (this.prismMesh = new x(c(c({}, t.style), t)), this.add(this.prismMesh)), A("esc", () => {
|
|
47
|
+
this.stopCreating();
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
get data() {
|
|
51
|
+
return w(c({}, this.baseData), {
|
|
52
|
+
points: H(this.applyObjectMatrixWorld(this.prismMesh.bottomPolygon.points)),
|
|
53
|
+
heightPoint: H(this.applyObjectMatrixWorld(this.prismMesh.heightPoint)),
|
|
54
|
+
style: {
|
|
55
|
+
color: this.prismMesh.color.getHex(),
|
|
56
|
+
lineWidth: this.prismMesh.lineWidth,
|
|
57
|
+
lineColor: this.prismMesh.lineColor.getHex()
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
highlight() {
|
|
62
|
+
var t;
|
|
63
|
+
(t = this.prismMesh) == null || t.highlight();
|
|
64
|
+
}
|
|
65
|
+
unhighlight() {
|
|
66
|
+
var t;
|
|
67
|
+
(t = this.prismMesh) == null || t.unhighlight();
|
|
68
|
+
}
|
|
69
|
+
create(t) {
|
|
70
|
+
return f(this, null, function* () {
|
|
71
|
+
this.prismMesh = new x(t), this.add(this.prismMesh), yield N(this.prismMesh, this.pointSelector), this.editor.enable();
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function N(e, i) {
|
|
76
|
+
return f(this, null, function* () {
|
|
77
|
+
const t = e.parent;
|
|
78
|
+
yield T(e.bottomPolygon, i);
|
|
79
|
+
const s = new k();
|
|
80
|
+
s.name = "LineHelper", t.add(s);
|
|
81
|
+
const n = e.bottomPolygon.points.at(-1), m = D(e.bottomPolygon.points).normalize(), l = n.clone().add(m.clone().multiplyScalar(10)), r = n.clone().sub(m.clone().multiplyScalar(10));
|
|
82
|
+
return s.setPoints([l, r]), i.enable(), new Promise((o, h) => {
|
|
83
|
+
const g = (a) => {
|
|
84
|
+
P(), o();
|
|
85
|
+
}, y = (a) => {
|
|
86
|
+
if (!(a != null && a.raycaster))
|
|
87
|
+
return;
|
|
88
|
+
const u = B(
|
|
89
|
+
U.modules.five.camera.position,
|
|
90
|
+
a.raycaster.ray,
|
|
91
|
+
new j.Line3(l, r)
|
|
92
|
+
);
|
|
93
|
+
u && e.setPoints({ heightPoint: u });
|
|
94
|
+
}, P = () => {
|
|
95
|
+
i.off("select", g), i.off("intersectionUpdate", y), i.off("disable", b), t.remove(s), i.disable();
|
|
96
|
+
}, b = () => {
|
|
97
|
+
P(), t.remove(e), h(new Error("Cancelled"));
|
|
98
|
+
};
|
|
99
|
+
i.on("select", g), i.on("intersectionUpdate", y), i.on("disable", b);
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
export {
|
|
104
|
+
Z as Prism
|
|
105
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
|
|
2
|
+
import type { PointSelector } from '../../../shared-utils/three/PointSelector';
|
|
3
|
+
import type { ArrayPosition } from '../../../PanoTagPlugin';
|
|
4
|
+
import type { RectangleData, RectangleMesh } from '../../Meshes/Rectangle';
|
|
5
|
+
import { RectangleWithEdgeMesh, type RectangleWithEdgeMeshStyle } from '../../Meshes/RectangleWithEdge';
|
|
6
|
+
import type { LiteralString } from '../../typings/utils.type';
|
|
7
|
+
export interface RectangleImportData extends BaseImportData, RectangleData {
|
|
8
|
+
type: LiteralString<'Rectangle'>;
|
|
9
|
+
style?: Partial<RectangleWithEdgeMeshStyle>;
|
|
10
|
+
}
|
|
11
|
+
export declare class Rectangle extends BaseObject<RectangleImportData> {
|
|
12
|
+
readonly type = "Rectangle";
|
|
13
|
+
rectangleMesh: RectangleWithEdgeMesh;
|
|
14
|
+
get data(): {
|
|
15
|
+
points: [ArrayPosition, ArrayPosition, ArrayPosition];
|
|
16
|
+
style: {
|
|
17
|
+
color: number;
|
|
18
|
+
lineWidth: number;
|
|
19
|
+
lineColor: number;
|
|
20
|
+
};
|
|
21
|
+
id: string;
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
constructor(data?: RectangleImportData, config?: Partial<BaseObjectConfig>);
|
|
25
|
+
highlight(): void;
|
|
26
|
+
unhighlight(): void;
|
|
27
|
+
create(params?: Partial<RectangleWithEdgeMeshStyle>): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
export declare function createRectangle(rectangleMesh: RectangleMesh, pointSelector: PointSelector): Promise<void>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
var D = Object.defineProperty, L = Object.defineProperties;
|
|
2
|
+
var N = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var M = Object.getOwnPropertySymbols;
|
|
4
|
+
var O = Object.prototype.hasOwnProperty, T = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var f = (n, t, e) => t in n ? D(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, d = (n, t) => {
|
|
6
|
+
for (var e in t || (t = {}))
|
|
7
|
+
O.call(t, e) && f(n, e, t[e]);
|
|
8
|
+
if (M)
|
|
9
|
+
for (var e of M(t))
|
|
10
|
+
T.call(t, e) && f(n, e, t[e]);
|
|
11
|
+
return n;
|
|
12
|
+
}, E = (n, t) => L(n, N(t));
|
|
13
|
+
var m = (n, t, e) => (f(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
var V = (n, t, e) => new Promise((l, r) => {
|
|
15
|
+
var h = (o) => {
|
|
16
|
+
try {
|
|
17
|
+
s(e.next(o));
|
|
18
|
+
} catch (a) {
|
|
19
|
+
r(a);
|
|
20
|
+
}
|
|
21
|
+
}, g = (o) => {
|
|
22
|
+
try {
|
|
23
|
+
s(e.throw(o));
|
|
24
|
+
} catch (a) {
|
|
25
|
+
r(a);
|
|
26
|
+
}
|
|
27
|
+
}, s = (o) => o.done ? l(o.value) : Promise.resolve(o.value).then(h, g);
|
|
28
|
+
s((e = e.apply(n, t)).next());
|
|
29
|
+
});
|
|
30
|
+
import { hotkeys as U } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
31
|
+
import { BaseObject as k } from "../Base/index.js";
|
|
32
|
+
import * as c from "three";
|
|
33
|
+
import { PolylineWithDotsMesh as v } from "../../Meshes/Polyline.js";
|
|
34
|
+
import { RectangleEditor as z } from "./Editor.js";
|
|
35
|
+
import { RectangleWithEdgeMesh as R } from "../../Meshes/RectangleWithEdge.js";
|
|
36
|
+
class K extends k {
|
|
37
|
+
constructor(e, l) {
|
|
38
|
+
super(e, l);
|
|
39
|
+
m(this, "type", "Rectangle");
|
|
40
|
+
m(this, "rectangleMesh");
|
|
41
|
+
this.config.canEdit && (this.editor = new z(this)), e && (this.rectangleMesh = new R(d(d({}, e.style), e)), this.add(this.rectangleMesh)), U("esc", () => {
|
|
42
|
+
this.stopCreating();
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
get data() {
|
|
46
|
+
return E(d({}, this.baseData), {
|
|
47
|
+
points: this.rectangleMesh.builtPoints.map((e) => e.toArray()),
|
|
48
|
+
style: {
|
|
49
|
+
color: this.rectangleMesh.color.getHex(),
|
|
50
|
+
lineWidth: this.rectangleMesh.lineWidth,
|
|
51
|
+
lineColor: this.rectangleMesh.lineColor.getHex()
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
highlight() {
|
|
56
|
+
var e;
|
|
57
|
+
(e = this.rectangleMesh) == null || e.highlight();
|
|
58
|
+
}
|
|
59
|
+
unhighlight() {
|
|
60
|
+
var e;
|
|
61
|
+
(e = this.rectangleMesh) == null || e.unhighlight();
|
|
62
|
+
}
|
|
63
|
+
create(e) {
|
|
64
|
+
return V(this, null, function* () {
|
|
65
|
+
this.removeChildren();
|
|
66
|
+
const l = new R(e);
|
|
67
|
+
this.rectangleMesh = l, this.add(this.rectangleMesh), yield B(this.rectangleMesh, this.pointSelector), this.editor.enable();
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function B(n, t) {
|
|
72
|
+
return new Promise((e, l) => {
|
|
73
|
+
var P, C;
|
|
74
|
+
const r = n.parent;
|
|
75
|
+
if (!r) {
|
|
76
|
+
l(new Error("No container"));
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const h = new v({ dashed: !0, lineColor: (P = n.lineColor) != null ? P : n.color }), g = new v({ dashed: !1, lineColor: (C = n.lineColor) != null ? C : n.color });
|
|
80
|
+
r.add(h, g), t.enable();
|
|
81
|
+
const s = [], o = new c.Vector3(), a = new c.Plane(), p = (i) => {
|
|
82
|
+
s.push(o.clone()), s.length !== 1 && (s.length === 2 ? g.setPoints([s[0], s[1]]) : s.length === 3 && (u(), e()));
|
|
83
|
+
}, w = (i) => {
|
|
84
|
+
if (i != null && i.raycaster) {
|
|
85
|
+
if (s.length === 0)
|
|
86
|
+
o.copy(i.point), a.setFromNormalAndCoplanarPoint(i.face.normal, i.point.clone());
|
|
87
|
+
else if (s.length === 1)
|
|
88
|
+
i.raycaster.ray.intersectPlane(a, o), h.setPoints([s.at(-1), o]);
|
|
89
|
+
else if (s.length === 2) {
|
|
90
|
+
const x = i.raycaster.ray.intersectPlane(a, new c.Vector3()), W = s[0].distanceTo(s[1]) / 2, b = new c.Vector3().lerpVectors(s[0], s[1], 0.5), A = new c.Vector3().subVectors(x, b).normalize(), H = new c.Vector3().addVectors(b, A.multiplyScalar(W));
|
|
91
|
+
o.copy(H), r.remove(h), n.setPoints([...s, o]);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}, u = () => {
|
|
95
|
+
t.off("select", p), t.off("intersectionUpdate", w), t.off("disable", y), t.disable(), r == null || r.remove(h, g);
|
|
96
|
+
}, y = () => {
|
|
97
|
+
u(), r == null || r.remove(n), l(new Error("Cancelled"));
|
|
98
|
+
};
|
|
99
|
+
t.on("select", p), t.on("intersectionUpdate", w), t.on("disable", y);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
export {
|
|
103
|
+
K as Rectangle,
|
|
104
|
+
B as createRectangle
|
|
105
|
+
};
|