@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
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var d = (
|
|
4
|
-
import { BaseController as
|
|
5
|
-
import * as
|
|
6
|
-
import { getMouseRaycaster as
|
|
7
|
-
import { setObjectQuaternion as
|
|
8
|
-
import { rad2Deg as
|
|
1
|
+
var v = Object.defineProperty;
|
|
2
|
+
var w = (u, h, n) => h in u ? v(u, h, { enumerable: !0, configurable: !0, writable: !0, value: n }) : u[h] = n;
|
|
3
|
+
var d = (u, h, n) => (w(u, typeof h != "symbol" ? h + "" : h, n), n);
|
|
4
|
+
import { BaseController as C } from "../Base/BaseController.js";
|
|
5
|
+
import * as a from "three";
|
|
6
|
+
import { getMouseRaycaster as D } from "../utils/getMouseRaycaster.js";
|
|
7
|
+
import { setObjectQuaternion as O } from "../utils/setObjectQuaternion.js";
|
|
8
|
+
import { rad2Deg as k } from "../../math/rad2Deg.js";
|
|
9
9
|
import { deg2Rad as f } from "../../math/deg2Rad.js";
|
|
10
|
-
|
|
10
|
+
const y = new a.Quaternion();
|
|
11
|
+
class P extends C {
|
|
11
12
|
constructor(...n) {
|
|
12
|
-
var
|
|
13
|
+
var l, c, m;
|
|
13
14
|
super(...n);
|
|
14
15
|
d(this, "name", "RotateController");
|
|
15
16
|
d(this, "startInfo");
|
|
16
17
|
d(this, "removeListener");
|
|
17
18
|
const e = this.helperObject3D;
|
|
18
|
-
this.hoverListener([(
|
|
19
|
-
const t = this.dragStart.bind(this), i = this.dragging.bind(this),
|
|
20
|
-
this.domEvents.addEventListener(this.helperObject3D, "mousedown", t), document.addEventListener("mousemove", i), document.addEventListener("mouseup",
|
|
21
|
-
this.domEvents.removeEventListener(this.helperObject3D, "mousedown", t), document.removeEventListener("mousemove", i), document.removeEventListener("mouseup",
|
|
19
|
+
this.hoverListener([(l = e.xCircle) == null ? void 0 : l.circle, (c = e.yCircle) == null ? void 0 : c.circle, (m = e.zCircle) == null ? void 0 : m.circle].filter(Boolean));
|
|
20
|
+
const t = this.dragStart.bind(this), i = this.dragging.bind(this), s = this.dragEnd.bind(this), r = this.show.bind(this), o = this.hide.bind(this);
|
|
21
|
+
this.domEvents.addEventListener(this.helperObject3D, "mousedown", t), document.addEventListener("mousemove", i), document.addEventListener("mouseup", s), this.hooks.on("moveStart", o), this.hooks.on("moveEnd", r), this.hooks.on("scaleStart", o), this.hooks.on("scaleEnd", r), this.hooks.on("moveByMouseEnable", o), this.hooks.on("moveByMouseDisable", r), this.removeListener = () => {
|
|
22
|
+
this.domEvents.removeEventListener(this.helperObject3D, "mousedown", t), document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", s), this.hooks.off("moveStart", o), this.hooks.off("moveEnd", r), this.hooks.off("scaleStart", o), this.hooks.off("scaleEnd", r), this.hooks.off("moveByMouseEnable", o), this.hooks.off("moveByMouseDisable", r);
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
25
|
get rotateCenter() {
|
|
25
26
|
return this.helperObject3D.position.clone();
|
|
26
27
|
}
|
|
27
|
-
initialHelperQuaternion() {
|
|
28
|
-
|
|
29
|
-
}
|
|
28
|
+
// public initialHelperQuaternion() {
|
|
29
|
+
// this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion)
|
|
30
|
+
// }
|
|
30
31
|
setRotateAngle(n) {
|
|
31
|
-
const { x: e = 0, y: t = 0, z: i = 0 } = n,
|
|
32
|
+
const { x: e = 0, y: t = 0, z: i = 0 } = n, s = new a.Euler(f(e), f(t), f(i)), r = new a.Quaternion().setFromEuler(s);
|
|
32
33
|
if (this.hooks.emit("wantToRotate", r))
|
|
33
34
|
return;
|
|
34
|
-
const { originObject3D:
|
|
35
|
-
|
|
35
|
+
const { originObject3D: l, rotateCenter: c } = this;
|
|
36
|
+
O(l, r, c), this.internalHooks.emit("setObjectRotate", r, c), this.hooks.emit("rotate", r), this.render();
|
|
36
37
|
}
|
|
37
38
|
dispose() {
|
|
38
39
|
this.removeListener(), super.dispose();
|
|
@@ -54,53 +55,53 @@ class P extends v {
|
|
|
54
55
|
const t = (e == null ? void 0 : e.object).direction;
|
|
55
56
|
if (!t)
|
|
56
57
|
return this.dragEnd();
|
|
57
|
-
const i = e.point,
|
|
58
|
+
const i = e.point, s = this.getAngleHelper(t);
|
|
58
59
|
this.setTipsAngle(0);
|
|
59
60
|
const r = i.clone();
|
|
60
61
|
r.y += 0.2, this.setTipsPosition(r);
|
|
61
|
-
const
|
|
62
|
+
const o = this.helperObject3D.quaternion.clone(), l = (() => {
|
|
62
63
|
if (t === "x")
|
|
63
|
-
return new
|
|
64
|
+
return new a.Vector3(1, 0, 0).applyQuaternion(o);
|
|
64
65
|
if (t === "y")
|
|
65
|
-
return new
|
|
66
|
+
return new a.Vector3(0, 1, 0).applyQuaternion(o);
|
|
66
67
|
if (t === "z")
|
|
67
|
-
return new
|
|
68
|
-
})(), c = new
|
|
69
|
-
this.setAngleHelperStart(t,
|
|
68
|
+
return new a.Vector3(0, 0, 1).applyQuaternion(o);
|
|
69
|
+
})(), c = new a.Plane().setFromNormalAndCoplanarPoint(l, i), p = c.projectPoint(i.clone(), new a.Vector3()).clone().sub(this.rotateCenter), g = p.angleTo(s.baseAxes.clone().applyQuaternion(o));
|
|
70
|
+
this.setAngleHelperStart(t, g), this.setAngleHelperLength(t, 0), this.startInfo = { direction: t, startVector: p, plane: c, angleHelper: s, angle: 0, helperQuaternion: o.clone() }, y.copy(o), this.helperObject3D.showDraggingHelper([t]), this.hooks.emit("rotateStart"), this.isDragging = !0;
|
|
70
71
|
}
|
|
71
72
|
dragging(n) {
|
|
72
73
|
if (!this.isDragging)
|
|
73
74
|
return;
|
|
74
|
-
const e =
|
|
75
|
+
const e = D(this.camera, n, this.container);
|
|
75
76
|
return e ? (this.rotate(e), !1) : this.dragEnd();
|
|
76
77
|
}
|
|
77
78
|
rotate(n) {
|
|
78
79
|
if (!this.startInfo)
|
|
79
80
|
return this.dragEnd();
|
|
80
|
-
const { startVector: e, plane: t, angleHelper: i, direction:
|
|
81
|
-
if (!
|
|
81
|
+
const { startVector: e, plane: t, angleHelper: i, direction: s, helperQuaternion: r } = this.startInfo, { originObject3D: o } = this, l = n.ray.intersectPlane(t, new a.Vector3());
|
|
82
|
+
if (!l)
|
|
82
83
|
return;
|
|
83
|
-
const
|
|
84
|
-
if (e.angleTo(
|
|
84
|
+
const c = this.rotateCenter.clone(), p = t.projectPoint(l.clone(), new a.Vector3()).clone().sub(c);
|
|
85
|
+
if (e.angleTo(p) === 0)
|
|
85
86
|
return;
|
|
86
|
-
const
|
|
87
|
+
const g = new a.Quaternion().setFromUnitVectors(e.clone().normalize(), p.clone().normalize()), b = o.quaternion.clone().premultiply(g);
|
|
87
88
|
if (this.hooks.emit("wantToRotate", b))
|
|
88
89
|
return;
|
|
89
|
-
const
|
|
90
|
-
new
|
|
90
|
+
const E = new a.Euler().setFromQuaternion(
|
|
91
|
+
new a.Quaternion().setFromUnitVectors(
|
|
91
92
|
e.clone().normalize().applyQuaternion(r.clone().inverse()),
|
|
92
|
-
|
|
93
|
+
p.clone().normalize().applyQuaternion(r.clone().inverse())
|
|
93
94
|
),
|
|
94
|
-
`${
|
|
95
|
-
)[
|
|
96
|
-
if (this.startInfo.angle +=
|
|
97
|
-
const j = new
|
|
98
|
-
|
|
95
|
+
`${s.toUpperCase()}${"XZY".replace(s.toUpperCase(), "")}`
|
|
96
|
+
)[s] * i.angleDirection;
|
|
97
|
+
if (this.startInfo.angle += E, this.setAngleHelperLength(s, this.startInfo.angle), this.setTipsAngle(k(this.startInfo.angle)), c) {
|
|
98
|
+
const j = new a.Vector3().subVectors(o.position, c).applyQuaternion(g).add(c);
|
|
99
|
+
o.position.copy(j);
|
|
99
100
|
}
|
|
100
|
-
|
|
101
|
+
o.applyQuaternion(g), y.premultiply(g), this.internalHooks.emit("applyObjectRotate", { quaternion: g, origin: c }), this.hooks.emit("rotate", o.quaternion), this.startInfo.startVector = p;
|
|
101
102
|
}
|
|
102
103
|
dragEnd() {
|
|
103
|
-
this.isDragging && (this.internalHooks.emit("setObjectRotate",
|
|
104
|
+
this.isDragging && (this.internalHooks.emit("setObjectRotate", y, this.rotateCenter), this.startInfo = void 0, this.isDragging = !1, this.helperObject3D.show(), this.hooks.emit("rotateEnd"));
|
|
104
105
|
}
|
|
105
106
|
getAngleHelper(n) {
|
|
106
107
|
var e, t, i;
|
|
@@ -119,17 +120,17 @@ class P extends v {
|
|
|
119
120
|
console.warn("angleHelper is undefined");
|
|
120
121
|
return;
|
|
121
122
|
}
|
|
122
|
-
if (t instanceof
|
|
123
|
-
const { radius: i, segments:
|
|
124
|
-
t.geometry = new
|
|
123
|
+
if (t instanceof a.Mesh && t.geometry instanceof a.CircleGeometry) {
|
|
124
|
+
const { radius: i, segments: s, thetaLength: r } = t.geometry.parameters;
|
|
125
|
+
t.geometry = new a.CircleGeometry(i, s, e, r);
|
|
125
126
|
} else
|
|
126
127
|
console.warn("only support THREE.CircleGeometry");
|
|
127
128
|
}
|
|
128
129
|
setAngleHelperLength(n, e) {
|
|
129
|
-
const i = e >= 0 ? Math.max(e, 1e-3) : Math.min(e, -1e-3),
|
|
130
|
-
if (
|
|
131
|
-
const { radius: r, thetaStart:
|
|
132
|
-
|
|
130
|
+
const i = e >= 0 ? Math.max(e, 1e-3) : Math.min(e, -1e-3), s = this.getAngleHelper(n);
|
|
131
|
+
if (s instanceof a.Mesh && s.geometry instanceof a.CircleGeometry) {
|
|
132
|
+
const { radius: r, thetaStart: o } = s.geometry.parameters, l = Math.ceil(Math.abs(i) * (40 / (2 * Math.PI)));
|
|
133
|
+
s.geometry = new a.CircleGeometry(r, l, o, i);
|
|
133
134
|
} else
|
|
134
135
|
console.warn("only support THREE.CircleGeometry");
|
|
135
136
|
}
|
|
@@ -142,11 +143,11 @@ class P extends v {
|
|
|
142
143
|
const e = this.helperObject3D.angleTips;
|
|
143
144
|
if (!e)
|
|
144
145
|
return;
|
|
145
|
-
const t = n.project(this.camera), { x: i, y:
|
|
146
|
+
const t = n.project(this.camera), { x: i, y: s, z: r } = t;
|
|
146
147
|
if (r > 1)
|
|
147
148
|
return;
|
|
148
|
-
const
|
|
149
|
-
e.setLeftTop(
|
|
149
|
+
const o = (i + 1) / 2 * 100 + "%", l = (-s + 1) / 2 * 100 + "%";
|
|
150
|
+
e.setLeftTop(o, l);
|
|
150
151
|
}
|
|
151
152
|
}
|
|
152
153
|
export {
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { BaseController } from '../Base/BaseController';
|
|
2
2
|
import type { ScaleHelperAbstract } from '../Helper';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
|
-
export declare class ScaleController<
|
|
4
|
+
export declare class ScaleController<T extends ScaleHelperAbstract = ScaleHelperAbstract> extends BaseController<T> {
|
|
5
5
|
protected name: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
private startInfo?;
|
|
7
|
+
constructor(...params: ConstructorParameters<typeof BaseController<T>>);
|
|
8
|
+
initialHelperQuaternion(): void;
|
|
9
|
+
initialHelperPosition(): void;
|
|
10
|
+
dragStart: (params: {
|
|
11
|
+
intersect: THREE.Intersection;
|
|
12
|
+
}) => void;
|
|
13
|
+
dragging: (point: {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
}) => false | void;
|
|
17
|
+
scale: (raycaster: THREE.Raycaster) => void;
|
|
18
|
+
dragEnd: () => void;
|
|
12
19
|
}
|
|
@@ -1,21 +1,55 @@
|
|
|
1
1
|
var f = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { BaseController as
|
|
5
|
-
import * as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
var u = (o, i, t) => i in o ? f(o, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[i] = t;
|
|
3
|
+
var s = (o, i, t) => (u(o, typeof i != "symbol" ? i + "" : i, t), t);
|
|
4
|
+
import { BaseController as P } from "../Base/BaseController.js";
|
|
5
|
+
import * as m from "three";
|
|
6
|
+
import { getMouseRaycaster as b } from "../utils/getMouseRaycaster.js";
|
|
7
|
+
import { rayOnLine as p } from "../../../Sculpt/utils/three/rayOnLine.js";
|
|
8
|
+
class H extends P {
|
|
9
|
+
constructor(...t) {
|
|
10
|
+
super(...t);
|
|
11
|
+
s(this, "name", "ScaleController");
|
|
12
|
+
s(this, "startInfo");
|
|
13
|
+
s(this, "dragStart", (t) => {
|
|
14
|
+
if (this.isDragging)
|
|
15
|
+
return;
|
|
16
|
+
this.isDragging = !0;
|
|
17
|
+
const { intersect: n } = t, l = this.camera.position, r = n.object, a = r.scalePosition.basePosition.clone(), d = r.scalePosition.handlePosition.clone().clone().sub(a).clone(), e = new m.Line3(a, a.clone().add(d.normalize().multiplyScalar(5)));
|
|
18
|
+
e.applyMatrix4(this.helperObject3D.matrixWorld);
|
|
19
|
+
const c = new m.Ray(l, n.point.clone().sub(l)), h = p(l, c, e);
|
|
20
|
+
this.startInfo = { line: e, scaleStartPoint: h, draggingObject: r }, this.hooks.emit("scaleStart");
|
|
21
|
+
});
|
|
22
|
+
s(this, "dragging", (t) => {
|
|
23
|
+
if (!this.isDragging || !this.startInfo)
|
|
24
|
+
return;
|
|
25
|
+
const n = b(this.camera, t, this.container);
|
|
26
|
+
return n ? (this.scale(n), !1) : this.dragEnd();
|
|
27
|
+
});
|
|
28
|
+
s(this, "scale", (t) => {
|
|
29
|
+
var c, h;
|
|
30
|
+
if (!this.startInfo)
|
|
31
|
+
return;
|
|
32
|
+
const { line: n, scaleStartPoint: l, draggingObject: r } = this.startInfo, { scalePosition: a } = r, { basePosition: g } = a, d = this.camera.position, e = p(d, t.ray, n);
|
|
33
|
+
e.applyMatrix4(new m.Matrix4().getInverse(this.helperObject3D.matrixWorld.clone())), (h = (c = this.config) == null ? void 0 : c.scaleCallback) == null || h.call(c, {
|
|
34
|
+
ratio: e.distanceTo(g) / l.distanceTo(g),
|
|
35
|
+
intersectPoint: e,
|
|
36
|
+
scalePosition: a
|
|
37
|
+
}), r.position.copy(e.clone());
|
|
38
|
+
});
|
|
39
|
+
s(this, "dragEnd", () => {
|
|
40
|
+
this.isDragging && (this.startInfo = void 0, this.isDragging = !1, this.internalHooks.emit("initialHelperPosition"), this.hooks.emit("scaleEnd"));
|
|
41
|
+
});
|
|
42
|
+
this.domEvents.addEventListener(this.helperObject3D, "mousedown", this.dragStart), document.addEventListener("mousemove", this.dragging), document.addEventListener("mouseup", this.dragEnd);
|
|
10
43
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
44
|
+
initialHelperQuaternion() {
|
|
45
|
+
this.helperObject3D.initQuaternion();
|
|
46
|
+
}
|
|
47
|
+
initialHelperPosition() {
|
|
48
|
+
this.helperObject3D.initialPosition();
|
|
49
|
+
const t = this;
|
|
50
|
+
t.offHoverListener && t.offHoverListener(), t.offHoverListener = this.hoverListener(this.helperObject3D.scaleMeshes);
|
|
17
51
|
}
|
|
18
52
|
}
|
|
19
53
|
export {
|
|
20
|
-
|
|
54
|
+
H as ScaleController
|
|
21
55
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Object3D } from 'three';
|
|
2
2
|
import type { Direction } from '../typings';
|
|
3
|
-
import { MoveHelperAbstract } from '.';
|
|
3
|
+
import { MoveHelperAbstract, type BaseHelperConfig } from '.';
|
|
4
4
|
import { ArrowGroup } from './Objects/ArrowGroup';
|
|
5
|
+
import type * as THREE from 'three';
|
|
5
6
|
export declare class MoveHelper extends MoveHelperAbstract {
|
|
6
7
|
xArrow?: ArrowGroup;
|
|
7
8
|
yArrow?: ArrowGroup;
|
|
@@ -10,8 +11,9 @@ export declare class MoveHelper extends MoveHelperAbstract {
|
|
|
10
11
|
xArrowEnable?: boolean;
|
|
11
12
|
yArrowEnable?: boolean;
|
|
12
13
|
zArrowEnable?: boolean;
|
|
13
|
-
});
|
|
14
|
+
} & BaseHelperConfig);
|
|
14
15
|
show(): void;
|
|
16
|
+
setScaleByCamera(camera: THREE.PerspectiveCamera): void;
|
|
15
17
|
showDraggingHelper(directions: Direction[]): void;
|
|
16
18
|
dispose(): void;
|
|
17
19
|
}
|
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { MoveHelperAbstract as
|
|
1
|
+
var l = Object.defineProperty;
|
|
2
|
+
var A = (o, i, r) => i in o ? l(o, i, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[i] = r;
|
|
3
|
+
var e = (o, i, r) => (A(o, typeof i != "symbol" ? i + "" : i, r), r);
|
|
4
|
+
import { MoveHelperAbstract as h } from "../Base/BaseHelper.js";
|
|
5
5
|
import { ArrowGroup as t } from "./Objects/ArrowGroup.js";
|
|
6
6
|
import { AXES_THREE_COLOR as w } from "../Constants/color.js";
|
|
7
|
+
import { calculateScaleByCamera as a } from "../utils/calculateScaleByCamera.js";
|
|
7
8
|
import "three";
|
|
8
9
|
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
9
|
-
class
|
|
10
|
-
constructor(r,
|
|
11
|
-
super(r);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
class u extends h {
|
|
11
|
+
constructor(r, s) {
|
|
12
|
+
super(r, s);
|
|
13
|
+
e(this, "xArrow");
|
|
14
|
+
e(this, "yArrow");
|
|
15
|
+
e(this, "zArrow");
|
|
16
|
+
s.xArrowEnable !== !1 && (this.xArrow = new t({ direction: "x", color: w.X })), s.yArrowEnable !== !1 && (this.yArrow = new t({ direction: "y", color: w.Y })), s.zArrowEnable !== !1 && (this.zArrow = new t({ direction: "z", color: w.Z })), this.add(...[this.xArrow, this.yArrow, this.zArrow].filter(Boolean));
|
|
16
17
|
}
|
|
17
18
|
show() {
|
|
18
19
|
super.show(), this.xArrow && (this.xArrow.visible = !0), this.yArrow && (this.yArrow.visible = !0), this.zArrow && (this.zArrow.visible = !0);
|
|
19
20
|
}
|
|
21
|
+
setScaleByCamera(r) {
|
|
22
|
+
this.scale.setScalar(a(r, this.position));
|
|
23
|
+
}
|
|
20
24
|
showDraggingHelper(r) {
|
|
21
25
|
this.xArrow && (this.xArrow.visible = r.includes("x")), this.yArrow && (this.yArrow.visible = r.includes("y")), this.zArrow && (this.zArrow.visible = r.includes("z"));
|
|
22
26
|
}
|
|
@@ -25,5 +29,5 @@ class y extends l {
|
|
|
25
29
|
}
|
|
26
30
|
}
|
|
27
31
|
export {
|
|
28
|
-
|
|
32
|
+
u as MoveHelper
|
|
29
33
|
};
|
|
@@ -12,16 +12,19 @@ class G extends f {
|
|
|
12
12
|
i(this, "lineHeight", 0.4);
|
|
13
13
|
i(this, "arrowHeight", 0.1);
|
|
14
14
|
this.name = "ArrowGroup";
|
|
15
|
-
const
|
|
16
|
-
color:
|
|
15
|
+
const d = new o.Color((c = e.color) != null ? c : 16214315), n = new o.MeshBasicMaterial({
|
|
16
|
+
color: d,
|
|
17
17
|
depthTest: !1,
|
|
18
|
+
depthWrite: !1,
|
|
18
19
|
opacity: 1,
|
|
19
20
|
transparent: !0,
|
|
20
21
|
side: o.DoubleSide
|
|
21
|
-
})
|
|
22
|
+
});
|
|
23
|
+
this.renderOrder = 50;
|
|
24
|
+
const w = new o.ConeGeometry(0.04, 0.1, 32), s = new l(w, n.clone(), e.direction);
|
|
22
25
|
s.name = `arrow-${e.direction}`, this.arrow = s;
|
|
23
|
-
const
|
|
24
|
-
|
|
26
|
+
const h = 4e-3, m = new o.CylinderGeometry(h, h, 0.4, 32), a = new l(m, n.clone(), e.direction);
|
|
27
|
+
a.name = `line-${e.direction}`, this.line = a, this.formatArrow(), this.formatLine(), this.add(this.arrow, this.line);
|
|
25
28
|
}
|
|
26
29
|
formatArrow() {
|
|
27
30
|
this.arrow.geometry.translate(0, this.lineHeight + this.arrowHeight / 2, 0), this.direction === "x" ? (this.arrow.geometry.rotateX(Math.PI / 2), this.arrow.geometry.rotateY(Math.PI / 2)) : this.direction === "z" && this.arrow.geometry.rotateX(Math.PI / 2);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import type { Object3D } from 'three';
|
|
3
|
-
import { RotateHelperAbstract } from '../Base/BaseHelper';
|
|
3
|
+
import { RotateHelperAbstract, type BaseHelperConfig } from '../Base/BaseHelper';
|
|
4
4
|
import type { Color, Direction } from '../typings';
|
|
5
5
|
import { tipsDom } from './HTML/tipsDom';
|
|
6
6
|
export declare class RotateHelper extends RotateHelperAbstract {
|
|
@@ -16,9 +16,10 @@ export declare class RotateHelper extends RotateHelperAbstract {
|
|
|
16
16
|
xzCircleEnable?: boolean;
|
|
17
17
|
xyCircleEnable?: boolean;
|
|
18
18
|
angleTipsEnable?: boolean;
|
|
19
|
-
});
|
|
19
|
+
} & BaseHelperConfig);
|
|
20
20
|
hide(): void;
|
|
21
21
|
show(): void;
|
|
22
|
+
setScaleByCamera(camera: THREE.PerspectiveCamera): void;
|
|
22
23
|
showDraggingHelper(directions: Direction[]): void;
|
|
23
24
|
dispose(): void;
|
|
24
25
|
}
|
|
@@ -5,9 +5,10 @@ import * as r from "three";
|
|
|
5
5
|
import { RotateHelperAbstract as u } from "../Base/BaseHelper.js";
|
|
6
6
|
import { AXES_THREE_COLOR as l } from "../Constants/color.js";
|
|
7
7
|
import { tipsDom as y } from "./HTML/tipsDom.js";
|
|
8
|
-
|
|
8
|
+
import { calculateScaleByCamera as C } from "../utils/calculateScaleByCamera.js";
|
|
9
|
+
class D extends u {
|
|
9
10
|
constructor(t, e) {
|
|
10
|
-
super(t);
|
|
11
|
+
super(t, e);
|
|
11
12
|
i(this, "xCircle");
|
|
12
13
|
i(this, "yCircle");
|
|
13
14
|
i(this, "zCircle");
|
|
@@ -23,6 +24,9 @@ class T extends u {
|
|
|
23
24
|
var t;
|
|
24
25
|
this.children.forEach((e) => e.showCircle()), (t = this.angleTips) == null || t.hide();
|
|
25
26
|
}
|
|
27
|
+
setScaleByCamera(t) {
|
|
28
|
+
this.scale.setScalar(C(t, this.position));
|
|
29
|
+
}
|
|
26
30
|
showDraggingHelper(t) {
|
|
27
31
|
var e;
|
|
28
32
|
this.hide(), this.children.filter((h) => t.includes(h.direction)).forEach((h) => h.showRing()), (e = this.angleTips) == null || e.show();
|
|
@@ -42,7 +46,7 @@ class n extends r.Group {
|
|
|
42
46
|
i(this, "ring");
|
|
43
47
|
/** 旋转过程中表示角度的扇形 */
|
|
44
48
|
i(this, "angleSector");
|
|
45
|
-
this.direction = t.direction, this.circle = new
|
|
49
|
+
this.direction = t.direction, this.circle = new x(t), this.ring = new b(t), this.angleSector = new M(t), this.add(this.circle, this.ring, this.angleSector), this.direction === "y" ? this.rotateX(Math.PI / 2) : this.direction === "x" && this.rotateY(-Math.PI / 2);
|
|
46
50
|
}
|
|
47
51
|
showCircle() {
|
|
48
52
|
this.add(this.circle), this.remove(this.ring, this.angleSector);
|
|
@@ -54,7 +58,7 @@ class n extends r.Group {
|
|
|
54
58
|
this.remove(this.ring, this.angleSector, this.circle);
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
|
-
class
|
|
61
|
+
class x extends r.Mesh {
|
|
58
62
|
constructor(t) {
|
|
59
63
|
var e;
|
|
60
64
|
super();
|
|
@@ -66,29 +70,33 @@ class C extends r.Mesh {
|
|
|
66
70
|
color: (e = t.color) != null ? e : 16777215,
|
|
67
71
|
transparent: !0,
|
|
68
72
|
side: r.DoubleSide,
|
|
69
|
-
depthTest: !1
|
|
70
|
-
|
|
73
|
+
depthTest: !1,
|
|
74
|
+
depthWrite: !1
|
|
75
|
+
}), this.renderOrder = 50, this.direction = t.direction, this.geometry.name = `RotateHelperCircleGeometry-${this.direction}`;
|
|
71
76
|
}
|
|
72
77
|
}
|
|
73
|
-
class
|
|
78
|
+
class b extends r.Group {
|
|
74
79
|
constructor(t) {
|
|
75
80
|
super();
|
|
76
81
|
i(this, "direction");
|
|
77
82
|
this.direction = t.direction;
|
|
78
|
-
const e = 0.015, h = new Array(8).fill(null).map((
|
|
83
|
+
const e = 0.015, h = new Array(8).fill(null).map((S, c) => {
|
|
79
84
|
const d = new r.RingGeometry(0.25, 0.3, 20, 8, Math.PI / 4 * c + e, Math.PI / 4 - e * 2), p = new r.MeshBasicMaterial({
|
|
80
85
|
opacity: 1,
|
|
81
86
|
color: 16777215,
|
|
82
87
|
depthTest: !1,
|
|
88
|
+
depthWrite: !1,
|
|
83
89
|
transparent: !0,
|
|
84
90
|
side: r.DoubleSide
|
|
85
|
-
})
|
|
91
|
+
});
|
|
92
|
+
this.renderOrder = 50;
|
|
93
|
+
const o = new r.Mesh(d, p);
|
|
86
94
|
return o.name = `AxesDashedRing-${this.direction}-${c}`, o;
|
|
87
95
|
});
|
|
88
96
|
this.add(...h);
|
|
89
97
|
}
|
|
90
98
|
}
|
|
91
|
-
class
|
|
99
|
+
class M extends r.Mesh {
|
|
92
100
|
constructor(t) {
|
|
93
101
|
var h;
|
|
94
102
|
super();
|
|
@@ -111,11 +119,12 @@ class b extends r.Mesh {
|
|
|
111
119
|
opacity: 0.4,
|
|
112
120
|
color: (h = t.color) != null ? h : 16777215,
|
|
113
121
|
depthTest: !1,
|
|
122
|
+
depthWrite: !1,
|
|
114
123
|
transparent: !0,
|
|
115
124
|
side: r.DoubleSide
|
|
116
|
-
}), this.direction = t.direction, this.angleDirection = this.direction === "z" ? 1 : -1;
|
|
125
|
+
}), this.renderOrder = 50, this.direction = t.direction, this.angleDirection = this.direction === "z" ? 1 : -1;
|
|
117
126
|
}
|
|
118
127
|
}
|
|
119
128
|
export {
|
|
120
|
-
|
|
129
|
+
D as RotateHelper
|
|
121
130
|
};
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ScaleHelperAbstract } from '../Base/BaseHelper';
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { ScaleHelperAbstract, type BaseHelperConfig } from '../Base/BaseHelper';
|
|
3
|
+
import type { ScalePosition } from '../typings';
|
|
3
4
|
export declare class ScaleHelper<T extends THREE.Object3D = THREE.Object3D> extends ScaleHelperAbstract<T> {
|
|
4
|
-
|
|
5
|
+
scaleMeshes: Array<THREE.Mesh & {
|
|
6
|
+
scalePosition: ScalePosition;
|
|
7
|
+
}>;
|
|
8
|
+
private positions;
|
|
9
|
+
constructor(originObject3D: T, config?: {
|
|
10
|
+
positions?: Array<ScalePosition> | (() => Array<ScalePosition>);
|
|
11
|
+
} & BaseHelperConfig);
|
|
12
|
+
initialPosition(offset?: THREE.Vector3): void;
|
|
13
|
+
setScaleByCamera(camera: THREE.PerspectiveCamera): void;
|
|
5
14
|
}
|
|
@@ -1,9 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var l = (i, t, s) => t in i ? c(i, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : i[t] = s;
|
|
3
|
+
var r = (i, t, s) => (l(i, typeof t != "symbol" ? t + "" : t, s), s);
|
|
4
|
+
import * as o from "three";
|
|
5
|
+
import { ScaleHelperAbstract as h } from "../Base/BaseHelper.js";
|
|
6
|
+
import { calculateScaleByCamera as p } from "../utils/calculateScaleByCamera.js";
|
|
7
|
+
class M extends h {
|
|
8
|
+
constructor(s, e) {
|
|
9
|
+
super(s, e);
|
|
10
|
+
r(this, "scaleMeshes", []);
|
|
11
|
+
r(this, "positions", []);
|
|
12
|
+
e && (this.positions = e.positions);
|
|
5
13
|
}
|
|
14
|
+
initialPosition(s) {
|
|
15
|
+
this.position.copy(this.originObject3D.position), this.scaleMeshes.length && this.remove(...this.scaleMeshes);
|
|
16
|
+
const e = typeof this.positions == "function" ? this.positions() : this.positions;
|
|
17
|
+
e && (this.scaleMeshes = e.map((n) => {
|
|
18
|
+
const a = m();
|
|
19
|
+
return a.position.copy(n.handlePosition), a.scalePosition = n, a;
|
|
20
|
+
}), this.add(...this.scaleMeshes));
|
|
21
|
+
}
|
|
22
|
+
setScaleByCamera(s) {
|
|
23
|
+
this.scaleMeshes.forEach((e) => {
|
|
24
|
+
e.scale.setScalar(
|
|
25
|
+
p(s, e.scalePosition.handlePosition.clone().applyMatrix4(this.matrixWorld))
|
|
26
|
+
);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function m() {
|
|
31
|
+
const t = new o.BoxGeometry(0.05, 0.05, 0.05), s = new o.MeshBasicMaterial({
|
|
32
|
+
color: 16776960,
|
|
33
|
+
depthTest: !1,
|
|
34
|
+
depthWrite: !1,
|
|
35
|
+
transparent: !0,
|
|
36
|
+
side: o.DoubleSide
|
|
37
|
+
}), e = new o.Mesh(t, s);
|
|
38
|
+
return e.renderOrder = 10, e;
|
|
6
39
|
}
|
|
7
40
|
export {
|
|
8
|
-
|
|
41
|
+
M as ScaleHelper
|
|
9
42
|
};
|
|
@@ -16,6 +16,7 @@ export type HelperEventMap = {
|
|
|
16
16
|
moveByMouseDisable: () => void;
|
|
17
17
|
};
|
|
18
18
|
export type InternalHelperEventMap = {
|
|
19
|
+
initialHelperPosition: () => void;
|
|
19
20
|
setObjectPosition: (position: THREE.Vector3) => void;
|
|
20
21
|
setObjectRotate: (quaternion: THREE.Quaternion, origin?: THREE.Vector3) => void;
|
|
21
22
|
setObjectScale: (scale: THREE.Vector3) => void;
|
|
@@ -19,9 +19,20 @@ export interface HelperOffset {
|
|
|
19
19
|
}
|
|
20
20
|
export type Color = THREE.Color | string | number;
|
|
21
21
|
export type ClassFunctionParameters<C extends new (...params: any[]) => any, F extends keyof InstanceType<C>> = Parameters<InstanceType<C>[F]>;
|
|
22
|
+
export type PositionFrom = 'objectPosition' | 'boundingBox' | THREE.Vector3 | (() => THREE.Vector3);
|
|
22
23
|
export interface ObjectHelperControllers {
|
|
23
24
|
moveController?: MoveController;
|
|
24
25
|
rotateController?: RotateController;
|
|
25
26
|
scaleController?: ScaleController;
|
|
26
27
|
boundingBoxController?: BoundingBoxController;
|
|
27
28
|
}
|
|
29
|
+
export type ScaleCallback = (params: {
|
|
30
|
+
ratio: number;
|
|
31
|
+
intersectPoint: THREE.Vector3;
|
|
32
|
+
scalePosition: ScalePosition;
|
|
33
|
+
}) => any;
|
|
34
|
+
export type ScalePosition = {
|
|
35
|
+
id?: string;
|
|
36
|
+
handlePosition: THREE.Vector3;
|
|
37
|
+
basePosition: THREE.Vector3;
|
|
38
|
+
};
|