@realsee/dnalogel 3.20.6 → 3.21.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/Object3DHelperPlugin/Controller.d.ts +25 -18
- package/dist/Object3DHelperPlugin/FiveControllerWrapper.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Model/area.d.ts +2 -1
- package/dist/PanoMeasurePlugin/Model/line.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +2 -55
- package/dist/PanoMeasurePlugin/utils/line.d.ts +1 -1
- 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 +11554 -9325
- 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/createLine/index.d.ts +2 -2
- package/dist/shared-utils/five/FiveDomEvents.d.ts +50 -13
- package/dist/shared-utils/five/FiveLine.d.ts +8 -0
- 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 +12 -7
- 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 +11 -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/PanoCursorRaycasterPlugin/index.js +9 -8
- package/libs/PanoMeasurePlugin/Components/Controller0.js +5 -5
- package/libs/PanoMeasurePlugin/Components/Controller1.js +5 -5
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/EditController.js +6 -6
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +10 -9
- package/libs/PanoMeasurePlugin/Controller/ViewController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +5 -4
- package/libs/PanoMeasurePlugin/Controller/index.js +8 -7
- package/libs/PanoMeasurePlugin/Model/area.d.ts +2 -1
- package/libs/PanoMeasurePlugin/Model/area.js +16 -8
- package/libs/PanoMeasurePlugin/Model/index.js +3 -2
- package/libs/PanoMeasurePlugin/Model/line.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Model/line.js +1 -0
- package/libs/PanoMeasurePlugin/Model/polygon.js +1 -1
- package/libs/PanoMeasurePlugin/Model/polyline.js +26 -25
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +2 -55
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +22 -156
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +5 -5
- package/libs/PanoMeasurePlugin/index.js +13 -13
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +1 -1
- package/libs/PanoMeasurePlugin/utils/line.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/line.js +5 -4
- 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 +173 -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/createLine/index.d.ts +2 -2
- package/libs/shared-utils/createLine/index.js +5 -5
- package/libs/shared-utils/five/FiveDomEvents.d.ts +50 -13
- package/libs/shared-utils/five/FiveDomEvents.js +135 -90
- package/libs/shared-utils/five/FiveLine.d.ts +8 -0
- package/libs/shared-utils/five/FiveLine.js +15 -0
- 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,184 @@
|
|
|
1
|
+
import type { Five } from '@realsee/five';
|
|
2
|
+
import type * as THREE from 'three';
|
|
3
|
+
import type { BaseObject, BaseObjectConfig } from './Objects/Base';
|
|
4
|
+
import { Subscribe } from '../shared-utils/Subscribe';
|
|
5
|
+
import { IObject3D } from '../shared-utils/three/IObject3D';
|
|
6
|
+
import type { PartialDeep } from 'type-fest';
|
|
7
|
+
import { Polyline } from './Objects/Polyline';
|
|
8
|
+
import { Point } from './Objects/Point';
|
|
9
|
+
import { Polygon } from './Objects/Polygon';
|
|
10
|
+
import { Prism } from './Objects/Prism';
|
|
11
|
+
import { Rectangle } from './Objects/Rectangle';
|
|
12
|
+
import { Circle } from './Objects/Circle';
|
|
13
|
+
import { Cylinder } from './Objects/Cylinder';
|
|
14
|
+
import { Box } from './Objects/Box';
|
|
15
|
+
import type { PolylineImportData, PointImportData, PolygonImportData, PrismImportData, RectangleImportData, CircleImportData, CylinderImportData, BoxImportData } from './typings';
|
|
16
|
+
import type { AreaStyle, PointStyle, PolylineStyle, PrismStyle, RectangleStyle, CircleStyle, CylinderStyle, BoxStyle } from './typings';
|
|
17
|
+
type BuiltInData = PolylineImportData | PointImportData | PolygonImportData | PrismImportData | RectangleImportData | CircleImportData | CylinderImportData | BoxImportData;
|
|
18
|
+
type BuiltInItem = Polyline | Point | Polygon | Prism | Rectangle | Circle | Cylinder | Box;
|
|
19
|
+
type Theme = PartialDeep<{
|
|
20
|
+
point: PointStyle;
|
|
21
|
+
polyline: PolylineStyle;
|
|
22
|
+
polygon: AreaStyle;
|
|
23
|
+
prism: PrismStyle;
|
|
24
|
+
rectangle: RectangleStyle;
|
|
25
|
+
circle: CircleStyle;
|
|
26
|
+
cylinder: CylinderStyle;
|
|
27
|
+
box: BoxStyle;
|
|
28
|
+
}>;
|
|
29
|
+
interface Data {
|
|
30
|
+
items: Array<BuiltInData>;
|
|
31
|
+
}
|
|
32
|
+
type Event = {
|
|
33
|
+
/**
|
|
34
|
+
* @description: 点击事件
|
|
35
|
+
* @param {BuiltInItem} item 点击的物体
|
|
36
|
+
* 返回 false 来禁用 Five 默认行为
|
|
37
|
+
*/
|
|
38
|
+
click: (item: BuiltInItem) => void | false;
|
|
39
|
+
};
|
|
40
|
+
export declare class Sculpt extends Subscribe<Event> {
|
|
41
|
+
static modules: {
|
|
42
|
+
five: Five;
|
|
43
|
+
_cursor: import("./Modules/Cursor").Cursor;
|
|
44
|
+
_pointSelector: import("../shared-utils/three/PointSelector").PointSelector;
|
|
45
|
+
_fiveDomEvents: import("../shared-utils/five/FiveDomEvents").FiveDomEvents;
|
|
46
|
+
_object3DHelper: import("..").Object3DHelperController;
|
|
47
|
+
inited: boolean;
|
|
48
|
+
readonly cursor: import("./Modules/Cursor").Cursor;
|
|
49
|
+
readonly pointSelector: import("../shared-utils/three/PointSelector").PointSelector;
|
|
50
|
+
readonly fiveDomEvents: import("../shared-utils/five/FiveDomEvents").FiveDomEvents;
|
|
51
|
+
readonly object3DHelper: import("..").Object3DHelperController;
|
|
52
|
+
init: (five: Five) => void;
|
|
53
|
+
};
|
|
54
|
+
get data(): {
|
|
55
|
+
items: ({
|
|
56
|
+
points: [number, number, number][];
|
|
57
|
+
style: {
|
|
58
|
+
lineColor: number;
|
|
59
|
+
lineWidth: number;
|
|
60
|
+
dashed: boolean;
|
|
61
|
+
};
|
|
62
|
+
id: string;
|
|
63
|
+
type: string;
|
|
64
|
+
} | {
|
|
65
|
+
point: [number, number, number];
|
|
66
|
+
style: {
|
|
67
|
+
color: number;
|
|
68
|
+
size: number;
|
|
69
|
+
};
|
|
70
|
+
id: string;
|
|
71
|
+
type: string;
|
|
72
|
+
} | {
|
|
73
|
+
points: [number, number, number][];
|
|
74
|
+
style: {
|
|
75
|
+
color: number;
|
|
76
|
+
lineColor: number;
|
|
77
|
+
lineWidth: number;
|
|
78
|
+
};
|
|
79
|
+
id: string;
|
|
80
|
+
type: string;
|
|
81
|
+
} | {
|
|
82
|
+
readonly points: [number, number, number][];
|
|
83
|
+
readonly heightPoint: [number, number, number];
|
|
84
|
+
readonly style: {
|
|
85
|
+
readonly color: number;
|
|
86
|
+
readonly lineWidth: number;
|
|
87
|
+
readonly lineColor: number;
|
|
88
|
+
};
|
|
89
|
+
readonly id: string;
|
|
90
|
+
readonly type: string;
|
|
91
|
+
} | {
|
|
92
|
+
points: [import("..").ArrayPosition, import("..").ArrayPosition, import("..").ArrayPosition];
|
|
93
|
+
style: {
|
|
94
|
+
color: number;
|
|
95
|
+
lineWidth: number;
|
|
96
|
+
lineColor: number;
|
|
97
|
+
};
|
|
98
|
+
id: string;
|
|
99
|
+
type: string;
|
|
100
|
+
} | {
|
|
101
|
+
center: [number, number, number];
|
|
102
|
+
normal: [number, number, number];
|
|
103
|
+
radius: number;
|
|
104
|
+
style: {
|
|
105
|
+
color: number;
|
|
106
|
+
};
|
|
107
|
+
id: string;
|
|
108
|
+
type: string;
|
|
109
|
+
} | {
|
|
110
|
+
bottomCenter: [number, number, number];
|
|
111
|
+
topCenter: [number, number, number];
|
|
112
|
+
radius: number;
|
|
113
|
+
style: {
|
|
114
|
+
color: number;
|
|
115
|
+
};
|
|
116
|
+
id: string;
|
|
117
|
+
type: string;
|
|
118
|
+
})[];
|
|
119
|
+
};
|
|
120
|
+
group: IObject3D;
|
|
121
|
+
get items(): BuiltInItem[];
|
|
122
|
+
private five;
|
|
123
|
+
private theme;
|
|
124
|
+
constructor(five: Five, theme?: Theme);
|
|
125
|
+
/**
|
|
126
|
+
* @description: 加载数据 展示
|
|
127
|
+
*/
|
|
128
|
+
load(data: Data, config?: Partial<BaseObjectConfig>): void;
|
|
129
|
+
/**
|
|
130
|
+
* @description: 获取物体实例
|
|
131
|
+
*/
|
|
132
|
+
getItemById(id: string): BuiltInItem;
|
|
133
|
+
/**
|
|
134
|
+
* @description: 放置物体
|
|
135
|
+
*/
|
|
136
|
+
putObject(object: THREE.Object3D): import("..").Object3DHelperController;
|
|
137
|
+
/**
|
|
138
|
+
* @description: 开始绘制点
|
|
139
|
+
*/
|
|
140
|
+
createPoint(params?: Parameters<Point['create']>[0]): Promise<BaseObject<any, any, BaseObjectConfig>>;
|
|
141
|
+
/**
|
|
142
|
+
* @description: 开始绘制空间折线
|
|
143
|
+
*/
|
|
144
|
+
createPolyline(params?: Parameters<Polyline['create']>[0]): Promise<BaseObject<any, any, BaseObjectConfig>>;
|
|
145
|
+
/**
|
|
146
|
+
* @description: 开始绘制平面多边形
|
|
147
|
+
*/
|
|
148
|
+
createPolygon(params?: Parameters<Polygon['create']>[0]): Promise<BaseObject<any, any, BaseObjectConfig>>;
|
|
149
|
+
/**
|
|
150
|
+
* @description: 开始绘制多棱柱
|
|
151
|
+
*/
|
|
152
|
+
createPrism(params?: Parameters<Prism['create']>[0]): Promise<BaseObject<any, any, BaseObjectConfig>>;
|
|
153
|
+
/**
|
|
154
|
+
* @description: 开始绘制矩形
|
|
155
|
+
*/
|
|
156
|
+
createRectangle(params?: Parameters<Rectangle['create']>[0]): Promise<BaseObject<any, any, BaseObjectConfig>>;
|
|
157
|
+
/**
|
|
158
|
+
* @description: 开始绘制圆形
|
|
159
|
+
*/
|
|
160
|
+
createCircle(params?: Parameters<Circle['create']>[0]): Promise<BaseObject<any, any, BaseObjectConfig>>;
|
|
161
|
+
/**
|
|
162
|
+
* @description: 开始绘制圆柱
|
|
163
|
+
*/
|
|
164
|
+
createCylinder(params?: Parameters<Cylinder['create']>[0]): Promise<BaseObject<any, any, BaseObjectConfig>>;
|
|
165
|
+
/**
|
|
166
|
+
* @description: 开始绘制 Box
|
|
167
|
+
*/
|
|
168
|
+
createBox(params?: Parameters<Box['create']>[0]): Promise<BaseObject<any, any, BaseObjectConfig>>;
|
|
169
|
+
/**
|
|
170
|
+
* @description: 撤销
|
|
171
|
+
*/
|
|
172
|
+
undo(): void;
|
|
173
|
+
/**
|
|
174
|
+
* @description: 重做
|
|
175
|
+
*/
|
|
176
|
+
redo(): void;
|
|
177
|
+
/**
|
|
178
|
+
* @description: 清空数据
|
|
179
|
+
*/
|
|
180
|
+
clear(): void;
|
|
181
|
+
private createItem;
|
|
182
|
+
private needsRender;
|
|
183
|
+
}
|
|
184
|
+
export {};
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
var R = Object.defineProperty, B = Object.defineProperties;
|
|
2
|
+
var D = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var f = Object.getOwnPropertySymbols;
|
|
4
|
+
var O = Object.prototype.hasOwnProperty, H = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var y = (m, i, e) => i in m ? R(m, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[i] = e, r = (m, i) => {
|
|
6
|
+
for (var e in i || (i = {}))
|
|
7
|
+
O.call(i, e) && y(m, e, i[e]);
|
|
8
|
+
if (f)
|
|
9
|
+
for (var e of f(i))
|
|
10
|
+
H.call(i, e) && y(m, e, i[e]);
|
|
11
|
+
return m;
|
|
12
|
+
}, g = (m, i) => B(m, D(i));
|
|
13
|
+
var a = (m, i, e) => (y(m, typeof i != "symbol" ? i + "" : i, e), e);
|
|
14
|
+
var u = (m, i, e) => new Promise((t, o) => {
|
|
15
|
+
var l = (c) => {
|
|
16
|
+
try {
|
|
17
|
+
n(e.next(c));
|
|
18
|
+
} catch (p) {
|
|
19
|
+
o(p);
|
|
20
|
+
}
|
|
21
|
+
}, s = (c) => {
|
|
22
|
+
try {
|
|
23
|
+
n(e.throw(c));
|
|
24
|
+
} catch (p) {
|
|
25
|
+
o(p);
|
|
26
|
+
}
|
|
27
|
+
}, n = (c) => c.done ? t(c.value) : Promise.resolve(c.value).then(l, s);
|
|
28
|
+
n((e = e.apply(m, i)).next());
|
|
29
|
+
});
|
|
30
|
+
import { globalModules as k } from "./Modules/Global.js";
|
|
31
|
+
import { Subscribe as E } from "../shared-utils/Subscribe.js";
|
|
32
|
+
import { IObject3D as L } from "../shared-utils/three/IObject3D.js";
|
|
33
|
+
import "hammerjs";
|
|
34
|
+
import "three";
|
|
35
|
+
import "@realsee/five";
|
|
36
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
37
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
38
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
39
|
+
import { notNil as M } from "../shared-utils/isNil.js";
|
|
40
|
+
import { recurveFindObject as S } from "../shared-utils/three/recurveFindObject.js";
|
|
41
|
+
import { Polyline as w } from "./Objects/Polyline/index.js";
|
|
42
|
+
import { Point as I } from "./Objects/Point/index.js";
|
|
43
|
+
import { Polygon as P } from "./Objects/Polygon/index.js";
|
|
44
|
+
import { Prism as b } from "./Objects/Prism/index.js";
|
|
45
|
+
import { Rectangle as C } from "./Objects/Rectangle/index.js";
|
|
46
|
+
import { Circle as v } from "./Objects/Circle/index.js";
|
|
47
|
+
import { Cylinder as j } from "./Objects/Cylinder/index.js";
|
|
48
|
+
import { Box as x } from "./Objects/Box/index.js";
|
|
49
|
+
const h = class extends E {
|
|
50
|
+
constructor(e, t) {
|
|
51
|
+
super();
|
|
52
|
+
a(this, "group");
|
|
53
|
+
a(this, "five");
|
|
54
|
+
a(this, "theme");
|
|
55
|
+
console.log(e), this.five = e, this.theme = t, this.group = new L(), this.group.name = "Sculpt", e.scene.add(this.group), h.modules.init(e), h.modules.fiveDomEvents.addEventListener(this.group, "click", ({ intersects: o }) => {
|
|
56
|
+
var s;
|
|
57
|
+
const l = S((s = o == null ? void 0 : o[0]) == null ? void 0 : s.object, (n) => n.isSculptObject);
|
|
58
|
+
return l ? this.emit("click", l) : !1;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
get data() {
|
|
62
|
+
return {
|
|
63
|
+
items: this.items.map((e) => {
|
|
64
|
+
try {
|
|
65
|
+
return e.data;
|
|
66
|
+
} catch (t) {
|
|
67
|
+
return console.error(t), null;
|
|
68
|
+
}
|
|
69
|
+
}).filter(M)
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
get items() {
|
|
73
|
+
return this.group.children;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @description: 加载数据 展示
|
|
77
|
+
*/
|
|
78
|
+
load(e, t) {
|
|
79
|
+
var l;
|
|
80
|
+
this.clear();
|
|
81
|
+
const o = (l = e == null ? void 0 : e.items) == null ? void 0 : l.map((s) => {
|
|
82
|
+
var c;
|
|
83
|
+
const n = g(r({}, s), {
|
|
84
|
+
style: r(r({}, (c = this.theme) == null ? void 0 : c[s.type.toLowerCase()]), s.style)
|
|
85
|
+
});
|
|
86
|
+
return s.type === "Point" ? new I(n, t) : s.type === "Polyline" ? new w(n, t) : s.type === "Polygon" ? new P(n, t) : s.type === "Prism" ? new b(n, t) : s.type === "Rectangle" ? new C(n, t) : s.type === "Circle" ? new v(n, t) : s.type === "Cylinder" ? new j(n, t) : s.type === "Box" ? new x(n, t) : null;
|
|
87
|
+
});
|
|
88
|
+
this.group.add(...o), this.needsRender();
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* @description: 获取物体实例
|
|
92
|
+
*/
|
|
93
|
+
getItemById(e) {
|
|
94
|
+
return this.items.find((t) => t.uuid === e);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* @description: 放置物体
|
|
98
|
+
*/
|
|
99
|
+
putObject(e) {
|
|
100
|
+
var l;
|
|
101
|
+
this.group.add(e);
|
|
102
|
+
const t = h.modules.object3DHelper, o = t.addObject3DHelper(e);
|
|
103
|
+
return (l = o == null ? void 0 : o.moveController) == null || l.moveByMouse(), t;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* @description: 开始绘制点
|
|
107
|
+
*/
|
|
108
|
+
createPoint(e) {
|
|
109
|
+
return u(this, null, function* () {
|
|
110
|
+
var t;
|
|
111
|
+
return this.createItem(I, r(r({}, (t = this.theme) == null ? void 0 : t.point), e));
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @description: 开始绘制空间折线
|
|
116
|
+
*/
|
|
117
|
+
createPolyline(e) {
|
|
118
|
+
return u(this, null, function* () {
|
|
119
|
+
var t;
|
|
120
|
+
return this.createItem(w, r(r({}, (t = this.theme) == null ? void 0 : t.polyline), e));
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* @description: 开始绘制平面多边形
|
|
125
|
+
*/
|
|
126
|
+
createPolygon(e) {
|
|
127
|
+
return u(this, null, function* () {
|
|
128
|
+
var t;
|
|
129
|
+
return this.createItem(P, r(r({}, (t = this.theme) == null ? void 0 : t.polygon), e));
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* @description: 开始绘制多棱柱
|
|
134
|
+
*/
|
|
135
|
+
createPrism(e) {
|
|
136
|
+
return u(this, null, function* () {
|
|
137
|
+
var t;
|
|
138
|
+
return this.createItem(b, r(r({}, (t = this.theme) == null ? void 0 : t.prism), e));
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* @description: 开始绘制矩形
|
|
143
|
+
*/
|
|
144
|
+
createRectangle(e) {
|
|
145
|
+
return u(this, null, function* () {
|
|
146
|
+
var t;
|
|
147
|
+
return this.createItem(C, r(r({}, (t = this.theme) == null ? void 0 : t.rectangle), e));
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* @description: 开始绘制圆形
|
|
152
|
+
*/
|
|
153
|
+
createCircle(e) {
|
|
154
|
+
return u(this, null, function* () {
|
|
155
|
+
var t;
|
|
156
|
+
return this.createItem(v, r(r({}, (t = this.theme) == null ? void 0 : t.circle), e));
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* @description: 开始绘制圆柱
|
|
161
|
+
*/
|
|
162
|
+
createCylinder(e) {
|
|
163
|
+
return u(this, null, function* () {
|
|
164
|
+
var t;
|
|
165
|
+
return this.createItem(j, r(r({}, (t = this.theme) == null ? void 0 : t.cylinder), e));
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* @description: 开始绘制 Box
|
|
170
|
+
*/
|
|
171
|
+
createBox(e) {
|
|
172
|
+
return u(this, null, function* () {
|
|
173
|
+
var t;
|
|
174
|
+
return this.createItem(x, r(r({}, (t = this.theme) == null ? void 0 : t.box), e));
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* @description: 撤销
|
|
179
|
+
*/
|
|
180
|
+
undo() {
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* @description: 重做
|
|
184
|
+
*/
|
|
185
|
+
redo() {
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* @description: 清空数据
|
|
189
|
+
*/
|
|
190
|
+
clear() {
|
|
191
|
+
this.group.removeChildren();
|
|
192
|
+
}
|
|
193
|
+
createItem(e, ...t) {
|
|
194
|
+
return u(this, null, function* () {
|
|
195
|
+
const o = new e();
|
|
196
|
+
return this.group.add(o), yield o.create(...t).catch((l) => {
|
|
197
|
+
console.error(l), this.group.remove(o);
|
|
198
|
+
}), o;
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
needsRender() {
|
|
202
|
+
this.five.needsRender = !0;
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
let d = h;
|
|
206
|
+
a(d, "modules", k);
|
|
207
|
+
export {
|
|
208
|
+
d as Sculpt
|
|
209
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type { Polyline, PolylineImportData } from '../Objects/Polyline';
|
|
2
|
+
export type { Point, PointImportData } from '../Objects/Point';
|
|
3
|
+
export type { Polygon, PolygonImportData } from '../Objects/Polygon';
|
|
4
|
+
export type { Prism, PrismImportData } from '../Objects/Prism';
|
|
5
|
+
export type { Rectangle, RectangleImportData } from '../Objects/Rectangle';
|
|
6
|
+
export type { Circle, CircleImportData } from '../Objects/Circle';
|
|
7
|
+
export type { Cylinder, CylinderImportData } from '../Objects/Cylinder';
|
|
8
|
+
export type { Box, BoxImportData } from '../Objects/Box';
|
|
9
|
+
export type { PointStyle } from '../Meshes/Point';
|
|
10
|
+
export type { PolylineStyle } from '../Meshes/Polyline';
|
|
11
|
+
export type { PrismStyle } from '../Meshes/Prism';
|
|
12
|
+
export type { RectangleWithEdgeMeshStyle as RectangleStyle } from '../Meshes/RectangleWithEdge';
|
|
13
|
+
export type { CircleWithEdgeMeshStyle as CircleStyle } from '../Meshes/CircleWithEdge';
|
|
14
|
+
export type { CylinderStyle } from '../Meshes/Cylinder';
|
|
15
|
+
export type { BoxStyle } from '../Meshes/Box';
|
|
16
|
+
export type { AreaStyle } from '../Meshes/Area';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as THREE from 'three';
|
|
2
|
+
import type { LiteralUnion, UnknownArray } from 'type-fest';
|
|
3
|
+
import type { IsNull, NonRecursiveType } from 'type-fest/source/internal';
|
|
4
|
+
export type LiteralString<T> = LiteralUnion<T, string>;
|
|
5
|
+
export type JsonVector3<T> = ReplaceDeep<T, THREE.Vector3, number[]>;
|
|
6
|
+
export type JsonColor<T> = ReplaceDeep<T, THREE.Color>;
|
|
7
|
+
export type JsonData<T> = JsonColor<JsonVector3<T>>;
|
|
8
|
+
type SafeType<T, SourceType, TargetType = null> = IsNull<TargetType> extends true ? Exclude<T, SourceType> : TargetType;
|
|
9
|
+
export type ReplaceDeep<T, SourceType, TargetType = null> = T extends SourceType ? SafeType<T, SourceType, TargetType> : T extends THREE.Vector3 | THREE.Color | NonRecursiveType ? T : T extends UnknownArray ? T[number] extends SourceType ? SafeType<T[number], SourceType, TargetType>[] : T : T extends object ? {
|
|
10
|
+
[K in keyof T]: T[K] extends SourceType ? SafeType<T[K], SourceType, TargetType> : SourceType extends T[K] ? SafeType<T[K], SourceType, TargetType> : ReplaceDeep<T[K], SourceType, TargetType>;
|
|
11
|
+
} : T;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type * as THREE from 'three';
|
|
2
|
+
export type Color = THREE.Color | string | number;
|
|
3
|
+
export declare const DEFAULT_COLOR = 16777215;
|
|
4
|
+
export declare const DEFAULT_LINE_COLOR = 16777215;
|
|
5
|
+
export declare const DEFAULT_LINE_WIDTH = 2;
|
|
6
|
+
export declare const DEFAULT_HIGHLIGHT_OPACITY = 0.6;
|
|
7
|
+
export type OpacityStyle = {
|
|
8
|
+
/**
|
|
9
|
+
* @description: 透明度
|
|
10
|
+
*/
|
|
11
|
+
opacity?: number;
|
|
12
|
+
};
|
|
13
|
+
export type ColorStyle = {
|
|
14
|
+
/**
|
|
15
|
+
* @description: 颜色
|
|
16
|
+
* @default 0x1193fa
|
|
17
|
+
*/
|
|
18
|
+
color?: Color;
|
|
19
|
+
};
|
|
20
|
+
export type LineColorStyle = {
|
|
21
|
+
/**
|
|
22
|
+
* @description: 边框线颜色
|
|
23
|
+
* @default 0x1193fa
|
|
24
|
+
*/
|
|
25
|
+
lineColor?: Color;
|
|
26
|
+
};
|
|
27
|
+
export type LineWidthStyle = {
|
|
28
|
+
/**
|
|
29
|
+
* @description: 线宽
|
|
30
|
+
* @default 2
|
|
31
|
+
*/
|
|
32
|
+
lineWidth?: number;
|
|
33
|
+
};
|
|
34
|
+
export type OcclusionStyle = {
|
|
35
|
+
/**
|
|
36
|
+
* @description: 是否以一种半透明的方式显示遮挡的部分
|
|
37
|
+
*/
|
|
38
|
+
occlusionVisibility: boolean;
|
|
39
|
+
};
|
|
40
|
+
export type LineStyle = LineColorStyle & LineWidthStyle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function radiusToSegments(radius: number): number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { type ColorStyle, type OpacityStyle, type OcclusionStyle } from '../color';
|
|
3
|
+
import { IObject3D } from '../../../shared-utils/three/IObject3D';
|
|
4
|
+
export type ColoredMeshStyle = OpacityStyle & ColorStyle & OcclusionStyle;
|
|
5
|
+
export default class ColoredMesh<TGeometry extends THREE.Geometry | THREE.BufferGeometry = THREE.Geometry | THREE.BufferGeometry> extends IObject3D {
|
|
6
|
+
name: string;
|
|
7
|
+
meshFont: THREE.Mesh<TGeometry, THREE.MeshBasicMaterial>;
|
|
8
|
+
meshBackground: THREE.Mesh<TGeometry, THREE.MeshBasicMaterial>;
|
|
9
|
+
get color(): THREE.Color;
|
|
10
|
+
get opacity(): number;
|
|
11
|
+
get occlusionVisibility(): boolean;
|
|
12
|
+
set geometry(geometry: TGeometry);
|
|
13
|
+
get geometry(): TGeometry;
|
|
14
|
+
private _geometry;
|
|
15
|
+
constructor(params?: Partial<ColoredMeshStyle>);
|
|
16
|
+
setStyle(params: Partial<ColoredMeshStyle>): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var y = (i, t, e) => t in i ? m(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
+
var r = (i, t, e) => (y(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
import * as o from "three";
|
|
5
|
+
import { DEFAULT_COLOR as g } from "../color.js";
|
|
6
|
+
import { IObject3D as a } from "../../../shared-utils/three/IObject3D.js";
|
|
7
|
+
import "hammerjs";
|
|
8
|
+
import "@realsee/five";
|
|
9
|
+
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
10
|
+
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
11
|
+
import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
12
|
+
import { notNil as h } from "../../../shared-utils/isNil.js";
|
|
13
|
+
class O extends a {
|
|
14
|
+
constructor(e) {
|
|
15
|
+
var l, d;
|
|
16
|
+
super();
|
|
17
|
+
r(this, "name", "ColoredMesh");
|
|
18
|
+
r(this, "meshFont");
|
|
19
|
+
r(this, "meshBackground");
|
|
20
|
+
r(this, "_geometry", new o.BufferGeometry());
|
|
21
|
+
const c = new o.MeshBasicMaterial({
|
|
22
|
+
color: (l = e == null ? void 0 : e.color) != null ? l : g,
|
|
23
|
+
transparent: !0,
|
|
24
|
+
side: o.DoubleSide,
|
|
25
|
+
depthTest: !0,
|
|
26
|
+
opacity: (d = e == null ? void 0 : e.opacity) != null ? d : 0.5
|
|
27
|
+
}), u = new o.MeshBasicMaterial({
|
|
28
|
+
color: 16777215,
|
|
29
|
+
transparent: !0,
|
|
30
|
+
side: o.DoubleSide,
|
|
31
|
+
depthTest: !1,
|
|
32
|
+
depthWrite: !1,
|
|
33
|
+
opacity: 0.3 / 0.5 * c.opacity
|
|
34
|
+
}), s = new o.Mesh(this.geometry, c), n = new o.Mesh(this.geometry, u);
|
|
35
|
+
s.name = "MeshFront", n.name = "MeshBackground", s.renderOrder = 1, n.renderOrder = 0, this.meshFont = s, this.meshBackground = n, this.add(s, n), h(e == null ? void 0 : e.occlusionVisibility) && (e.occlusionVisibility ? this.addIfNotExists(this.meshBackground) : this.remove(this.meshBackground));
|
|
36
|
+
}
|
|
37
|
+
get color() {
|
|
38
|
+
return this.meshFont.material.color;
|
|
39
|
+
}
|
|
40
|
+
get opacity() {
|
|
41
|
+
return this.meshFont.material.opacity;
|
|
42
|
+
}
|
|
43
|
+
get occlusionVisibility() {
|
|
44
|
+
return !!this.meshBackground.parent;
|
|
45
|
+
}
|
|
46
|
+
set geometry(e) {
|
|
47
|
+
this._geometry = e, this.meshFont.geometry = e, this.meshBackground.geometry = e;
|
|
48
|
+
}
|
|
49
|
+
get geometry() {
|
|
50
|
+
return this._geometry;
|
|
51
|
+
}
|
|
52
|
+
setStyle(e) {
|
|
53
|
+
h(e.color) && (this.meshFont.material.color.set(e.color), this.needsRender = !0), h(e.opacity) && (this.meshFont.material.opacity = e.opacity, this.meshBackground.material.opacity = 0.3 / 0.5 * e.opacity, this.needsRender = !0), h(e.occlusionVisibility) && (e.occlusionVisibility ? this.addIfNotExists(this.meshBackground) : this.remove(this.meshBackground));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
O as ColoredMesh
|
|
58
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var i = Object.defineProperty;
|
|
2
|
+
var a = (r, t, e) => t in r ? i(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
|
+
var n = (r, t, e) => (a(r, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
import * as o from "three";
|
|
5
|
+
class l extends o.BufferGeometry {
|
|
6
|
+
constructor(e) {
|
|
7
|
+
super();
|
|
8
|
+
n(this, "name", "RectangleGeometry");
|
|
9
|
+
n(this, "points");
|
|
10
|
+
if (e.length !== 4) {
|
|
11
|
+
console.error("Invalid number of points, it's not a rectangle");
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
this.points = e.slice(0, 4), this.setAttribute("position", new o.BufferAttribute(new Float32Array(this.points.flatMap((s) => s.toArray())), 3)), this.setIndex(new o.BufferAttribute(new Uint16Array([0, 1, 2, 0, 1, 3]), 1));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
l as RectangleGeometry
|
|
19
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as n from "three";
|
|
2
|
+
function l(e, i, t) {
|
|
3
|
+
const o = new n.Plane().setFromNormalAndCoplanarPoint(i.direction.clone().normalize(), e), r = o.projectPoint(t.start, new n.Vector3()), a = o.projectPoint(t.end, new n.Vector3()), c = new n.Line3(r, a), s = c.closestPointToPoint(e, !0, new n.Vector3()).distanceTo(r) / c.distance();
|
|
4
|
+
return new n.Vector3().lerpVectors(t.start, t.end, s);
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
l as rayOnLine
|
|
8
|
+
};
|
package/libs/base/BasePlugin.js
CHANGED