@realsee/dnalogel 2.6.4 → 2.6.7-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CSS3DRenderPlugin/Controller.d.ts +1 -1
- package/dist/Object3DHelperPlugin/Controller.d.ts +25 -10
- package/dist/Object3DHelperPlugin/FiveControllerWrapper.d.ts +6 -8
- package/dist/Object3DHelperPlugin/typings.d.ts +14 -0
- package/dist/PanoTagPlugin/controller/TagCacheController.d.ts +1 -0
- package/dist/PanoTagPlugin/controller/TagComputer.d.ts +22 -6
- package/dist/PanoTagPlugin/controller/index.d.ts +32 -6
- package/dist/PanoTagPlugin/typings/controller.d.ts +17 -2
- package/dist/PanoTagPlugin/typings/tag/Tag.d.ts +5 -2
- package/dist/PanoTagPlugin/typings/tag/TagData.d.ts +19 -3
- package/dist/PanoTagPlugin/typings/tag/Utils.d.ts +1 -1
- package/dist/PanoTagPlugin/utils/tag/index.d.ts +2 -0
- package/dist/PanoTagPlugin/utils/tag/tagCheck.d.ts +2 -1
- package/dist/PanoTagPlugin/utils/tagPosition.d.ts +3 -1
- package/dist/index.cjs.js +43 -43
- package/dist/index.js +5078 -4667
- package/dist/index.umd.js +32 -32
- package/dist/shared-utils/Object3DHelper/Base/BaseController.d.ts +41 -15
- package/dist/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +27 -20
- package/dist/shared-utils/Object3DHelper/Controller/BoundingBoxController.d.ts +7 -0
- package/dist/shared-utils/Object3DHelper/Controller/CSS3DScaleController.d.ts +1 -0
- package/dist/shared-utils/Object3DHelper/Controller/MoveController.d.ts +24 -0
- package/dist/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +6 -1
- package/dist/shared-utils/Object3DHelper/Controller/RotateController.d.ts +14 -0
- package/dist/shared-utils/Object3DHelper/Controller/ScaleController.d.ts +12 -0
- package/dist/shared-utils/Object3DHelper/Helper/{OutlineHelper.d.ts → BoundingBoxHelper.d.ts} +3 -2
- package/{libs/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts → dist/shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.d.ts} +3 -8
- package/dist/shared-utils/Object3DHelper/Helper/RotateHelper.d.ts +14 -11
- package/dist/shared-utils/Object3DHelper/Helper/ScaleHelper.d.ts +5 -0
- package/dist/shared-utils/Object3DHelper/Helper/index.d.ts +2 -2
- package/dist/shared-utils/Object3DHelper/index.d.ts +4 -27
- package/dist/shared-utils/Object3DHelper/typings/Hooks.d.ts +22 -12
- package/dist/shared-utils/Object3DHelper/typings/index.d.ts +22 -0
- package/dist/shared-utils/Object3DHelper/utils/boundingBox.d.ts +2 -0
- package/dist/shared-utils/three/GLTFLoader.d.ts +2 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +31 -31
- package/docs/classes/CruisePluginController.html +24 -24
- package/docs/classes/Magnifier.html +20 -20
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +40 -33
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoMeasurePluginLine.html +23 -23
- package/docs/classes/PanoMeasurePluginModel.html +22 -22
- package/docs/classes/PanoMeasurePluginPoint.html +14 -14
- package/docs/classes/PanoMeasurePluginPolyline.html +26 -26
- package/docs/classes/PanoTagPluginController.html +205 -77
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.FivePointSelector.html +12 -12
- package/docs/classes/Util.Interval.html +12 -12
- package/docs/classes/Util.Magnifier.html +17 -17
- package/docs/classes/Util.PointDomHelper.html +11 -11
- package/docs/classes/Util.PointHelper.html +11 -11
- package/docs/classes/Util.Rectangle.html +13 -13
- package/docs/enums/CameraMovementEffect.html +7 -7
- package/docs/enums/ContentType.html +34 -16
- package/docs/enums/DIRECTION.html +9 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/DimensionType.html +7 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/PaintBrushTypeEnum.html +8 -8
- package/docs/enums/PointType.html +7 -7
- package/docs/enums/Rotation.html +8 -8
- package/docs/functions/CSS3DRenderPlugin.html +10 -5
- package/docs/functions/CameraMovementPlugin.html +10 -5
- package/docs/functions/CruisePlugin.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/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 +15 -10
- package/docs/functions/TopviewFloorplanPlugin.html +10 -5
- package/docs/functions/Util.getCoordsFromClient.html +5 -5
- package/docs/functions/Util.getCoordsFromElement.html +5 -5
- package/docs/functions/Util.getFrameTime.html +5 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
- package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
- package/docs/functions/Util.isNil.html +5 -5
- package/docs/functions/Util.nextFrame.html +5 -5
- package/docs/functions/Util.notNil.html +5 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
- package/docs/functions/Util.tweenProgress.html +5 -5
- package/docs/functions/pluginFlag.html +10 -5
- package/docs/index.html +9 -4
- package/docs/interfaces/AddTagConfig.html +6 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/EventMap.html +19 -19
- package/docs/interfaces/FloorplanBounding.html +8 -8
- package/docs/interfaces/FloorplanData.html +10 -10
- package/docs/interfaces/FloorplanEntrance.html +11 -11
- package/docs/interfaces/FloorplanExtraObject.html +10 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
- package/docs/interfaces/FloorplanFloorData.html +9 -9
- package/docs/interfaces/FloorplanImagePosition.html +7 -7
- package/docs/interfaces/FloorplanObserver.html +9 -9
- package/docs/interfaces/FloorplanOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanPosition.html +7 -7
- package/docs/interfaces/FloorplanRoomItem.html +13 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
- package/docs/interfaces/FloorplanServerBounding.html +8 -8
- package/docs/interfaces/FloorplanServerComputedData.html +10 -10
- package/docs/interfaces/FloorplanServerData.html +7 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
- package/docs/interfaces/FloorplanServerEntrance.html +11 -11
- package/docs/interfaces/FloorplanServerFloorData.html +9 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
- package/docs/interfaces/FloorplanServerObserver.html +9 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanServerPosition.html +7 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
- package/docs/interfaces/HelperOffset.html +78 -0
- package/docs/interfaces/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- package/docs/interfaces/MinMax.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
- package/docs/interfaces/ModelViewPluginExportType.html +11 -11
- package/docs/interfaces/Object3DHelperState.html +8 -8
- package/docs/interfaces/ObjectHelperControllers.html +85 -0
- package/docs/interfaces/PaintBrushAction.html +12 -12
- package/docs/interfaces/PaintBrushConfigs.html +12 -12
- package/docs/interfaces/PaintBrushState.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +10 -5
- package/docs/interfaces/PanoMeasureParameterType.html +12 -12
- package/docs/interfaces/PanoMeasurePluginLineJson.html +8 -8
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +7 -7
- package/docs/interfaces/PanoMeasurePluginPointJson.html +7 -7
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +8 -8
- package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
- package/docs/interfaces/PanoRulerProPluginState.html +8 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +10 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +10 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
- package/docs/interfaces/Point.html +8 -8
- package/docs/interfaces/Room.html +9 -9
- package/docs/interfaces/RoomInfo.html +7 -7
- package/docs/interfaces/RoomLabel.html +14 -14
- package/docs/interfaces/RoomRules.html +10 -5
- package/docs/interfaces/Rooms.html +10 -5
- package/docs/interfaces/Scissor.html +9 -9
- package/docs/interfaces/State.html +8 -8
- package/docs/interfaces/TagCache.html +25 -16
- package/docs/interfaces/TagConfig.html +10 -10
- package/docs/interfaces/TagIconUrl.html +9 -9
- package/docs/interfaces/Tags.html +11 -11
- package/docs/interfaces/TemporaryState.html +6 -6
- package/docs/interfaces/Util.MagnifierParameter.html +11 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
- package/docs/modules/Util.html +5 -5
- package/docs/modules.html +14 -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 +268 -0
- 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/Direction-1.html +10 -5
- package/docs/types/Direction4.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/HelperEventMap.html +174 -21
- 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/ModelElement.html +266 -0
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +10 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +10 -5
- package/docs/types/ModelFloorplanPluginReturnType.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 +10 -5
- 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/PlaneTag.html +10 -5
- package/docs/types/PlaneTagElement.html +10 -5
- package/docs/types/Point2DElement.html +10 -5
- package/docs/types/Point2DTag.html +10 -5
- package/docs/types/Point3DElement.html +10 -5
- package/docs/types/Point3DTag.html +10 -5
- package/docs/types/PointTag.html +10 -5
- package/docs/types/PointTagElement.html +10 -5
- package/docs/types/Position.html +10 -5
- 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/StickType.html +11 -6
- package/docs/types/Tag.html +11 -6
- package/docs/types/Tag2D.html +10 -5
- package/docs/types/Tag3D.html +10 -5
- package/docs/types/TagContentType.html +11 -6
- package/docs/types/TagDimensionType.html +10 -5
- package/docs/types/TagElement.html +11 -6
- package/docs/types/TagEvents.html +10 -5
- package/docs/types/TagGLTFObject.html +261 -0
- package/docs/types/TagHooks.html +10 -5
- package/docs/types/TagIconSize.html +10 -5
- package/docs/types/TagId.html +10 -5
- package/docs/types/TagPointType.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 +10 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +10 -5
- package/docs/variables/ROOM_TYPE_MAP.html +10 -5
- package/docs/variables/VERSION.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/CSS3DRenderPlugin/CSS3DRender.js +43 -43
- package/libs/CSS3DRenderPlugin/Controller.d.ts +1 -1
- package/libs/CSS3DRenderPlugin/utils/generateBehindFiveElement.js +16 -15
- package/libs/Object3DHelperPlugin/Controller.d.ts +25 -10
- package/libs/Object3DHelperPlugin/Controller.js +117 -97
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.d.ts +6 -8
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +29 -22
- package/libs/Object3DHelperPlugin/index.js +16 -11
- package/libs/Object3DHelperPlugin/typings.d.ts +14 -0
- package/libs/PanoTagPlugin/Components/Common/Media.js +3 -2
- package/libs/PanoTagPlugin/Components/Common/MediaItem.js +1 -1
- package/libs/PanoTagPlugin/Components/Common/Text/FlyMText.js +3 -2
- package/libs/PanoTagPlugin/Components/Common/Text/FlyText.js +3 -2
- package/libs/PanoTagPlugin/Components/Common/Text/MText.js +68 -68
- package/libs/PanoTagPlugin/Components/Tag/AudioTag/AudioPlaneTag.js +3 -2
- package/libs/PanoTagPlugin/Components/Tag/AudioTag/AudioTag.js +3 -2
- package/libs/PanoTagPlugin/Components/Tag/AudioTag/index.js +12 -11
- package/libs/PanoTagPlugin/Components/Tag/CustomTag.js +33 -33
- package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +3 -2
- package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +46 -46
- package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +12 -11
- package/libs/PanoTagPlugin/Components/Tag/TextTag/TextTag.js +26 -25
- package/libs/PanoTagPlugin/Components/Tag/TextTag/index.js +29 -28
- package/libs/PanoTagPlugin/Components/Tag/index.js +126 -119
- package/libs/PanoTagPlugin/Components/TagContainer.js +4 -2
- package/libs/PanoTagPlugin/Components/TagItem.js +67 -65
- package/libs/PanoTagPlugin/controller/TagCacheController.d.ts +1 -0
- package/libs/PanoTagPlugin/controller/TagCacheController.js +14 -12
- package/libs/PanoTagPlugin/controller/TagComputer.d.ts +22 -6
- package/libs/PanoTagPlugin/controller/TagComputer.js +242 -176
- package/libs/PanoTagPlugin/controller/index.d.ts +32 -6
- package/libs/PanoTagPlugin/controller/index.js +176 -91
- package/libs/PanoTagPlugin/index.js +15 -12
- package/libs/PanoTagPlugin/tag.config.js +9 -0
- package/libs/PanoTagPlugin/typings/controller.d.ts +17 -2
- package/libs/PanoTagPlugin/typings/controller.js +1 -1
- package/libs/PanoTagPlugin/typings/index.js +6 -5
- package/libs/PanoTagPlugin/typings/tag/Tag.d.ts +5 -2
- package/libs/PanoTagPlugin/typings/tag/TagData.d.ts +19 -3
- package/libs/PanoTagPlugin/typings/tag/TagData.js +1 -1
- package/libs/PanoTagPlugin/typings/tag/Utils.d.ts +1 -1
- package/libs/PanoTagPlugin/utils/addDebugPoints.js +5 -4
- package/libs/PanoTagPlugin/utils/color.js +5 -5
- package/libs/PanoTagPlugin/utils/index.js +37 -34
- package/libs/PanoTagPlugin/utils/planeNormal.js +3 -2
- package/libs/PanoTagPlugin/utils/tag/index.d.ts +2 -0
- package/libs/PanoTagPlugin/utils/tag/index.js +11 -0
- package/libs/PanoTagPlugin/utils/tag/tagCheck.d.ts +2 -1
- package/libs/PanoTagPlugin/utils/tag/tagCheck.js +6 -2
- package/libs/PanoTagPlugin/utils/tagPosition.d.ts +3 -1
- package/libs/PanoTagPlugin/utils/tagPosition.js +20 -8
- package/libs/index.js +111 -104
- package/libs/shared-utils/Object3DHelper/Base/BaseController.d.ts +41 -15
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +112 -90
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +27 -20
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +55 -22
- package/libs/shared-utils/Object3DHelper/Controller/BoundingBoxController.d.ts +7 -0
- package/libs/shared-utils/Object3DHelper/Controller/BoundingBoxController.js +14 -0
- package/libs/shared-utils/Object3DHelper/Controller/CSS3DScaleController.d.ts +1 -0
- package/libs/shared-utils/Object3DHelper/Controller/CSS3DScaleController.js +14 -10
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.d.ts +24 -0
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +80 -37
- package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +6 -1
- package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +44 -41
- package/libs/shared-utils/Object3DHelper/Controller/RotateController.d.ts +14 -0
- package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +95 -67
- package/libs/shared-utils/Object3DHelper/Controller/ScaleController.d.ts +12 -0
- package/libs/shared-utils/Object3DHelper/Controller/ScaleController.js +21 -0
- package/libs/shared-utils/Object3DHelper/Helper/{OutlineHelper.d.ts → BoundingBoxHelper.d.ts} +3 -2
- package/libs/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js +87 -0
- package/{dist/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts → libs/shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.d.ts} +3 -8
- package/libs/shared-utils/Object3DHelper/Helper/{RectangleScaleHelper.js → CSS3DScaleHelper.js} +5 -7
- package/libs/shared-utils/Object3DHelper/Helper/MoveHelper.js +7 -9
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.d.ts +14 -11
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +72 -66
- package/libs/shared-utils/Object3DHelper/Helper/ScaleHelper.d.ts +5 -0
- package/libs/shared-utils/Object3DHelper/Helper/ScaleHelper.js +9 -0
- package/libs/shared-utils/Object3DHelper/Helper/index.d.ts +2 -2
- package/libs/shared-utils/Object3DHelper/Helper/index.js +0 -2
- package/libs/shared-utils/Object3DHelper/index.d.ts +4 -27
- package/libs/shared-utils/Object3DHelper/index.js +48 -96
- package/libs/shared-utils/Object3DHelper/typings/Hooks.d.ts +22 -12
- package/libs/shared-utils/Object3DHelper/typings/index.d.ts +22 -0
- package/libs/shared-utils/Object3DHelper/typings/index.js +2 -1
- package/libs/shared-utils/Object3DHelper/utils/boundingBox.d.ts +2 -0
- package/libs/shared-utils/Object3DHelper/utils/boundingBox.js +24 -0
- package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.js +2 -2
- package/libs/shared-utils/three/GLTFLoader.d.ts +2 -0
- package/libs/shared-utils/three/GLTFLoader.js +16 -0
- package/libs/typings/math.type.js +1 -0
- package/package.json +4 -4
- package/dist/shared-utils/Object3DHelper/utils/getPoint.d.ts +0 -3
- package/libs/shared-utils/Object3DHelper/Helper/OutlineHelper.js +0 -2
- package/libs/shared-utils/Object3DHelper/utils/getPoint.d.ts +0 -3
- package/libs/shared-utils/Object3DHelper/utils/getPoint.js +0 -1
|
@@ -3,7 +3,12 @@ import type * as THREE from 'three';
|
|
|
3
3
|
import { Mesh, Object3D, Vector3 } from 'three';
|
|
4
4
|
import type { Direction, Direction4 } from '../typings';
|
|
5
5
|
import type { tipsDom } from '../Helper/HTML/tipsDom';
|
|
6
|
-
|
|
6
|
+
declare type NonVoid<T> = T extends void ? never : T;
|
|
7
|
+
declare class IObject3D extends Object3D {
|
|
8
|
+
constructor();
|
|
9
|
+
removeFromParent(): this;
|
|
10
|
+
}
|
|
11
|
+
export declare abstract class BaseHelper<OriginObject3D extends Object3D = Object3D> extends IObject3D {
|
|
7
12
|
protected originObject3D: OriginObject3D;
|
|
8
13
|
protected onRender: () => any;
|
|
9
14
|
get helperObject(): Object3D;
|
|
@@ -11,17 +16,16 @@ export declare abstract class BaseHelper<OriginObject3D extends Object3D = Objec
|
|
|
11
16
|
onRender?: () => any;
|
|
12
17
|
});
|
|
13
18
|
render(): void;
|
|
19
|
+
enable(): void;
|
|
20
|
+
disable(): void;
|
|
14
21
|
show(): void;
|
|
15
22
|
hide(): void;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
applyHelperScaleMatrix4(matrix: THREE.Matrix4,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
applyHelperQuaternion(quaternion: THREE.Quaternion, origin?: THREE.Vector3): void;
|
|
23
|
-
abstract showDraggingHelper(directions?: Direction[]): void;
|
|
24
|
-
abstract dispose(): void;
|
|
23
|
+
initialPosition(): void;
|
|
24
|
+
initQuaternion(): void;
|
|
25
|
+
applyHelperScaleMatrix4(matrix: THREE.Matrix4, origin?: Vector3): void;
|
|
26
|
+
setHelperQuaternion(quaternion: THREE.Quaternion, origin?: Vector3): void;
|
|
27
|
+
applyHelperQuaternion(quaternion: THREE.Quaternion, origin?: Vector3): void;
|
|
28
|
+
dispose(): void;
|
|
25
29
|
}
|
|
26
30
|
export declare abstract class MoveHelperAbstract<OriginObject3D extends Object3D = Object3D> extends BaseHelper<OriginObject3D> {
|
|
27
31
|
abstract xArrow?: Object3D & {
|
|
@@ -39,29 +43,32 @@ export declare abstract class MoveHelperAbstract<OriginObject3D extends Object3D
|
|
|
39
43
|
line?: Object3D;
|
|
40
44
|
direction: Direction;
|
|
41
45
|
};
|
|
46
|
+
abstract showDraggingHelper(directions?: Direction[]): void;
|
|
47
|
+
}
|
|
48
|
+
export declare abstract class BoundingBoxHelperAbstract<OriginObject3D extends Object3D = Object3D> extends BaseHelper<OriginObject3D> {
|
|
42
49
|
}
|
|
43
50
|
export declare abstract class RotateHelperAbstract<OriginObject3D extends Object3D = Object3D> extends BaseHelper<OriginObject3D> {
|
|
44
|
-
abstract xyCircle
|
|
51
|
+
abstract xyCircle?: Mesh & {
|
|
45
52
|
direction: Direction;
|
|
46
53
|
};
|
|
47
|
-
abstract xzCircle
|
|
54
|
+
abstract xzCircle?: Mesh & {
|
|
48
55
|
direction: Direction;
|
|
49
56
|
};
|
|
50
|
-
abstract yzCircle
|
|
57
|
+
abstract yzCircle?: Mesh & {
|
|
51
58
|
direction: Direction;
|
|
52
59
|
};
|
|
53
|
-
abstract xRingHelper
|
|
54
|
-
abstract yRingHelper
|
|
55
|
-
abstract zRingHelper
|
|
56
|
-
abstract xAngleHelper
|
|
60
|
+
abstract xRingHelper?: Object3D;
|
|
61
|
+
abstract yRingHelper?: Object3D;
|
|
62
|
+
abstract zRingHelper?: Object3D;
|
|
63
|
+
abstract xAngleHelper?: Object3D & {
|
|
57
64
|
baseAxes: Vector3;
|
|
58
65
|
direction: Direction;
|
|
59
66
|
};
|
|
60
|
-
abstract yAngleHelper
|
|
67
|
+
abstract yAngleHelper?: Object3D & {
|
|
61
68
|
baseAxes: Vector3;
|
|
62
69
|
direction: Direction;
|
|
63
70
|
};
|
|
64
|
-
abstract zAngleHelper
|
|
71
|
+
abstract zAngleHelper?: Object3D & {
|
|
65
72
|
baseAxes: Vector3;
|
|
66
73
|
direction: Direction;
|
|
67
74
|
};
|
|
@@ -71,7 +78,6 @@ export declare abstract class RotateHelperAbstract<OriginObject3D extends Object
|
|
|
71
78
|
}
|
|
72
79
|
export declare abstract class ScaleHelperAbstract<OriginObject3D extends Object3D = Object3D> extends BaseHelper<OriginObject3D> {
|
|
73
80
|
}
|
|
74
|
-
declare type NonVoid<T> = T extends void ? never : T;
|
|
75
81
|
export declare abstract class RectangleScaleHelperAbstract<OriginObject3D extends Object3D, PointType extends Object3D | HTMLElement> extends ScaleHelperAbstract<OriginObject3D> {
|
|
76
82
|
abstract points: PointType extends Object3D ? {
|
|
77
83
|
point: PointType;
|
|
@@ -84,6 +90,7 @@ export declare abstract class RectangleScaleHelperAbstract<OriginObject3D extend
|
|
|
84
90
|
abstract cornerPositions: Vector3[];
|
|
85
91
|
abstract css3DInstance?: NonVoid<Create3DElementReturnType>;
|
|
86
92
|
abstract plane?: THREE.Mesh;
|
|
93
|
+
abstract showDraggingHelper(directions?: Direction[]): void;
|
|
87
94
|
abstract updatePoints(): void;
|
|
88
95
|
abstract enable(): void;
|
|
89
96
|
abstract disable(): void;
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { Object3D as
|
|
5
|
-
class
|
|
6
|
-
constructor(
|
|
7
|
-
var a;
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var l = (t, i, e) => i in t ? p(t, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[i] = e;
|
|
3
|
+
var o = (t, i, e) => (l(t, typeof i != "symbol" ? i + "" : i, e), e);
|
|
4
|
+
import { Vector3 as a, Object3D as c } from "three";
|
|
5
|
+
class h extends c {
|
|
6
|
+
constructor() {
|
|
8
7
|
super();
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
}
|
|
9
|
+
removeFromParent() {
|
|
10
|
+
const i = this.parent;
|
|
11
|
+
return i !== null && i.remove(this), this;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
class n extends h {
|
|
15
|
+
constructor(e, s) {
|
|
16
|
+
var r;
|
|
17
|
+
super();
|
|
18
|
+
o(this, "originObject3D");
|
|
19
|
+
o(this, "onRender");
|
|
20
|
+
this.originObject3D = e, this.onRender = (r = s == null ? void 0 : s.onRender) != null ? r : () => {
|
|
12
21
|
};
|
|
13
22
|
}
|
|
14
23
|
get helperObject() {
|
|
@@ -17,35 +26,59 @@ class n extends l {
|
|
|
17
26
|
render() {
|
|
18
27
|
this.onRender();
|
|
19
28
|
}
|
|
29
|
+
enable() {
|
|
30
|
+
this.parent.children.includes(this) || this.parent.add(this);
|
|
31
|
+
}
|
|
32
|
+
disable() {
|
|
33
|
+
this.removeFromParent();
|
|
34
|
+
}
|
|
20
35
|
show() {
|
|
21
36
|
this.visible = !0, this.render();
|
|
22
37
|
}
|
|
23
38
|
hide() {
|
|
24
39
|
this.visible = !1, this.render();
|
|
25
40
|
}
|
|
26
|
-
|
|
27
|
-
this.position.
|
|
41
|
+
initialPosition() {
|
|
42
|
+
this.position.add(this.originObject3D.position);
|
|
28
43
|
}
|
|
29
|
-
|
|
44
|
+
initQuaternion() {
|
|
30
45
|
this.quaternion.copy(this.originObject3D.quaternion);
|
|
31
46
|
}
|
|
32
|
-
applyHelperScaleMatrix4(e,
|
|
47
|
+
applyHelperScaleMatrix4(e, s) {
|
|
33
48
|
this.scale.applyMatrix4(e);
|
|
34
49
|
}
|
|
35
|
-
|
|
50
|
+
setHelperQuaternion(e, s) {
|
|
51
|
+
if (s) {
|
|
52
|
+
const r = new a().subVectors(this.position, s).applyQuaternion(e).add(s);
|
|
53
|
+
this.position.copy(r);
|
|
54
|
+
}
|
|
55
|
+
this.quaternion.copy(e);
|
|
56
|
+
}
|
|
57
|
+
applyHelperQuaternion(e, s) {
|
|
58
|
+
if (s) {
|
|
59
|
+
const r = new a().subVectors(this.position, s).applyQuaternion(e).add(s);
|
|
60
|
+
this.position.copy(r);
|
|
61
|
+
}
|
|
36
62
|
this.applyQuaternion(e);
|
|
37
63
|
}
|
|
64
|
+
dispose() {
|
|
65
|
+
this.removeFromParent();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
class x extends n {
|
|
38
69
|
}
|
|
39
|
-
class
|
|
70
|
+
class y extends n {
|
|
40
71
|
}
|
|
41
|
-
class
|
|
72
|
+
class m extends n {
|
|
42
73
|
}
|
|
43
|
-
class
|
|
74
|
+
class d extends n {
|
|
44
75
|
}
|
|
45
|
-
class
|
|
76
|
+
class v extends d {
|
|
46
77
|
}
|
|
47
78
|
export {
|
|
48
|
-
|
|
49
|
-
x as
|
|
50
|
-
|
|
79
|
+
y as BoundingBoxHelperAbstract,
|
|
80
|
+
x as MoveHelperAbstract,
|
|
81
|
+
v as RectangleScaleHelperAbstract,
|
|
82
|
+
m as RotateHelperAbstract,
|
|
83
|
+
d as ScaleHelperAbstract
|
|
51
84
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseController } from '../Base/BaseController';
|
|
2
|
+
import type { BoundingBoxHelperAbstract } from '../Helper';
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
export declare class BoundingBoxController<OriginObject3D extends THREE.Object3D = THREE.Object3D> extends BaseController<BoundingBoxHelperAbstract<OriginObject3D>> {
|
|
5
|
+
protected name: string;
|
|
6
|
+
constructor(...params: ConstructorParameters<typeof BaseController<BoundingBoxHelperAbstract<OriginObject3D>>>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var t = Object.defineProperty;
|
|
2
|
+
var l = (n, o, r) => o in n ? t(n, o, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[o] = r;
|
|
3
|
+
var e = (n, o, r) => (l(n, typeof o != "symbol" ? o + "" : o, r), r);
|
|
4
|
+
import { BaseController as s } from "../Base/BaseController.js";
|
|
5
|
+
import "three";
|
|
6
|
+
class p extends s {
|
|
7
|
+
constructor(...r) {
|
|
8
|
+
super(...r);
|
|
9
|
+
e(this, "name", "BoundingBoxController");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
p as BoundingBoxController
|
|
14
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer';
|
|
2
2
|
import { RectangleScaleController } from './RectangleScaleController';
|
|
3
3
|
export declare class CSS3DScaleController extends RectangleScaleController<CSS3DObject, HTMLElement> {
|
|
4
|
+
protected name: string;
|
|
4
5
|
constructor(...params: ConstructorParameters<typeof RectangleScaleController<CSS3DObject, HTMLElement>>);
|
|
5
6
|
private addHTMLEventListener;
|
|
6
7
|
}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var g = Object.defineProperty;
|
|
2
|
+
var c = (r, t, e) => t in r ? g(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
|
+
var d = (r, t, e) => (c(r, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
import { RectangleScaleController as l } from "./RectangleScaleController.js";
|
|
5
|
+
class E extends l {
|
|
6
|
+
constructor(...e) {
|
|
7
|
+
super(...e);
|
|
8
|
+
d(this, "name", "CSS3DScaleController");
|
|
9
|
+
this.addHTMLEventListener();
|
|
6
10
|
}
|
|
7
11
|
addHTMLEventListener() {
|
|
8
|
-
this.helperObject3D.points.forEach((
|
|
9
|
-
if (!
|
|
12
|
+
this.helperObject3D.points.forEach((e) => {
|
|
13
|
+
if (!e)
|
|
10
14
|
return;
|
|
11
|
-
const
|
|
12
|
-
|
|
15
|
+
const n = e.point, a = (o) => this.dragStart(o, e), s = this.dragging.bind(this), i = this.dragEnd.bind(this);
|
|
16
|
+
n.addEventListener("dragstart", a), n.addEventListener("drag", s), n.addEventListener("dragend", i);
|
|
13
17
|
});
|
|
14
18
|
}
|
|
15
19
|
}
|
|
16
20
|
export {
|
|
17
|
-
|
|
21
|
+
E as CSS3DScaleController
|
|
18
22
|
};
|
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
import { BaseController } from '../Base/BaseController';
|
|
2
|
+
import * as THREE from 'three';
|
|
2
3
|
import type { MoveHelperAbstract } from '../Helper';
|
|
3
4
|
export declare class MoveController<T extends MoveHelperAbstract = MoveHelperAbstract> extends BaseController<T> {
|
|
5
|
+
get moveByMouseEnable(): boolean;
|
|
6
|
+
protected name: string;
|
|
4
7
|
private startInfo?;
|
|
8
|
+
private _moveByMouseEnable;
|
|
9
|
+
private mouseInfo?;
|
|
10
|
+
private mousedownEventListenerDisposer;
|
|
5
11
|
constructor(...params: ConstructorParameters<typeof BaseController<T>>);
|
|
12
|
+
dispose(): void;
|
|
13
|
+
/**
|
|
14
|
+
* @description: 跟随鼠标移动
|
|
15
|
+
*/
|
|
16
|
+
moveByMouse(): void;
|
|
17
|
+
/**
|
|
18
|
+
* @description: 禁用跟随鼠标移动
|
|
19
|
+
*/
|
|
20
|
+
disableMoveByMouse(): void;
|
|
21
|
+
onIntersectionOnModelUpdate(intersection: {
|
|
22
|
+
point: THREE.Vector3;
|
|
23
|
+
}): void;
|
|
24
|
+
protected onApplyOriginObjectScale(params: {
|
|
25
|
+
matrix4: THREE.Matrix4;
|
|
26
|
+
origin?: THREE.Vector3;
|
|
27
|
+
}): void;
|
|
28
|
+
private handleMouseDown;
|
|
29
|
+
private handleMouseUp;
|
|
6
30
|
/**
|
|
7
31
|
* @description: 拖动开始,找出拖的Direction
|
|
8
32
|
*/
|
|
@@ -1,66 +1,109 @@
|
|
|
1
1
|
var p = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var u = (
|
|
4
|
-
import { BaseController as
|
|
5
|
-
import * as
|
|
6
|
-
import { getMouseRaycaster as
|
|
7
|
-
class
|
|
8
|
-
constructor(...
|
|
9
|
-
super(...
|
|
2
|
+
var v = (c, i, e) => i in c ? p(c, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[i] = e;
|
|
3
|
+
var u = (c, i, e) => (v(c, typeof i != "symbol" ? i + "" : i, e), e);
|
|
4
|
+
import { BaseController as g } from "../Base/BaseController.js";
|
|
5
|
+
import * as d from "three";
|
|
6
|
+
import { getMouseRaycaster as f } from "../utils/getMouseRaycaster.js";
|
|
7
|
+
class w extends g {
|
|
8
|
+
constructor(...e) {
|
|
9
|
+
super(...e);
|
|
10
|
+
u(this, "name", "MoveController");
|
|
10
11
|
u(this, "startInfo");
|
|
11
|
-
|
|
12
|
-
this
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
u(this, "_moveByMouseEnable", !1);
|
|
13
|
+
u(this, "mouseInfo");
|
|
14
|
+
u(this, "mousedownEventListenerDisposer");
|
|
15
|
+
const o = this.helperObject3D;
|
|
16
|
+
this.hoverListener([o.xArrow, o.yArrow, o.zArrow]);
|
|
17
|
+
const t = this.dragStart.bind(this), r = this.dragging.bind(this), a = this.dragEnd.bind(this), s = this.show.bind(this), n = this.hide.bind(this);
|
|
18
|
+
this.domEvents.addEventListener(this.helperObject3D, "mousedown", t), document.addEventListener("mousemove", r), document.addEventListener("mouseup", a), this.hooks.on("rotateStart", n), this.hooks.on("rotateEnd", s), this.hooks.on("moveByMouseEnable", n), this.hooks.on("moveByMouseDisable", s), this.disposers.push(() => {
|
|
19
|
+
this.domEvents.removeEventListener(this.helperObject3D, "mousedown", t), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", a), this.hooks.off("rotateStart", n), this.hooks.off("rotateEnd", s), this.hooks.off("moveByMouseEnable", n), this.hooks.off("moveByMouseDisable", s);
|
|
20
|
+
}), this.moveByMouseEnable && this.moveByMouse();
|
|
15
21
|
}
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
get moveByMouseEnable() {
|
|
23
|
+
return this._moveByMouseEnable;
|
|
24
|
+
}
|
|
25
|
+
dispose() {
|
|
26
|
+
var e;
|
|
27
|
+
super.dispose(), (e = this.disposers) == null || e.forEach((o) => o == null ? void 0 : o());
|
|
28
|
+
}
|
|
29
|
+
moveByMouse() {
|
|
30
|
+
this._moveByMouseEnable = !0;
|
|
31
|
+
const e = this.handleMouseDown.bind(this), o = this.handleMouseUp.bind(this);
|
|
32
|
+
this.hooks.emit("moveByMouseEnable"), setTimeout(() => {
|
|
33
|
+
this.container.addEventListener("mousedown", e), this.container.addEventListener("mouseup", o);
|
|
34
|
+
}), this.mousedownEventListenerDisposer = () => {
|
|
35
|
+
this.container.removeEventListener("mousedown", e), this.container.removeEventListener("mouseup", o);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
disableMoveByMouse() {
|
|
39
|
+
var e;
|
|
40
|
+
this._moveByMouseEnable = !1, this.hooks.emit("moveByMouseDisable"), (e = this.mousedownEventListenerDisposer) == null || e.call(this);
|
|
41
|
+
}
|
|
42
|
+
onIntersectionOnModelUpdate(e) {
|
|
43
|
+
!this.moveByMouseEnable || this.hooks.emit("wantToMove", e.point) || (this.originObject3D.position.copy(e.point), this.hooks.emit("setObjectPosition", e.point), this.hooks.emit("move", e.point));
|
|
44
|
+
}
|
|
45
|
+
onApplyOriginObjectScale(e) {
|
|
46
|
+
}
|
|
47
|
+
handleMouseDown(e) {
|
|
48
|
+
const { x: o, y: t } = e;
|
|
49
|
+
this.mouseInfo = { x: o, y: t, mouseDownTimestamp: Date.now() };
|
|
50
|
+
}
|
|
51
|
+
handleMouseUp(e) {
|
|
52
|
+
if (!this.mouseInfo)
|
|
18
53
|
return;
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
54
|
+
const { x: o, y: t } = e;
|
|
55
|
+
this.mouseInfo.x === o && this.mouseInfo.y === t && Date.now() - this.mouseInfo.mouseDownTimestamp < 500 && (this.disableMoveByMouse(), this.mouseInfo = void 0);
|
|
56
|
+
}
|
|
57
|
+
dragStart(e) {
|
|
58
|
+
if (this._moveByMouseEnable || this.isDragging)
|
|
59
|
+
return;
|
|
60
|
+
const o = e == null ? void 0 : e.intersect;
|
|
23
61
|
if (!o)
|
|
24
62
|
return this.dragEnd();
|
|
25
|
-
const
|
|
26
|
-
|
|
63
|
+
const t = (o == null ? void 0 : o.object).direction;
|
|
64
|
+
if (!t)
|
|
65
|
+
return this.dragEnd();
|
|
66
|
+
const r = new d.Vector3(1, 0, 0).applyQuaternion(this.helperObject3D.quaternion), a = new d.Vector3(0, 1, 0).applyQuaternion(this.helperObject3D.quaternion), s = new d.Vector3(0, 0, 1).applyQuaternion(this.helperObject3D.quaternion), n = (() => {
|
|
67
|
+
switch (t) {
|
|
27
68
|
case "x":
|
|
28
|
-
return
|
|
69
|
+
return r;
|
|
29
70
|
case "y":
|
|
30
71
|
return a;
|
|
31
72
|
case "z":
|
|
32
|
-
return
|
|
73
|
+
return s;
|
|
33
74
|
}
|
|
34
|
-
})(),
|
|
35
|
-
switch (
|
|
75
|
+
})(), l = (() => {
|
|
76
|
+
switch (t) {
|
|
36
77
|
case "x":
|
|
37
78
|
case "y":
|
|
38
|
-
return
|
|
79
|
+
return s;
|
|
39
80
|
case "z":
|
|
40
|
-
return
|
|
81
|
+
return r;
|
|
41
82
|
}
|
|
42
|
-
})(),
|
|
43
|
-
|
|
83
|
+
})(), h = o.point.clone(), m = new d.Plane();
|
|
84
|
+
m.setFromNormalAndCoplanarPoint(l, h), this.startInfo = { startVectorProject: h.clone().projectOnVector(n), directionVector: n, plane: m }, this.helperObject3D.showDraggingHelper([t]), this.hooks.emit("moveStart"), this.isDragging = !0, console.log("%c MoveController dragStart", "color: #e5af2e");
|
|
44
85
|
}
|
|
45
|
-
dragging(
|
|
86
|
+
dragging(e) {
|
|
46
87
|
if (!this.isDragging || !this.startInfo)
|
|
47
88
|
return;
|
|
48
|
-
const
|
|
49
|
-
return
|
|
89
|
+
const o = f(this.camera, e, this.container);
|
|
90
|
+
return o ? (console.log("%c MoveController dragging", "color: #49de1b"), this.move(o), !1) : this.dragEnd();
|
|
50
91
|
}
|
|
51
|
-
move(
|
|
92
|
+
move(e) {
|
|
52
93
|
if (!this.startInfo)
|
|
53
94
|
return this.dragEnd();
|
|
54
|
-
const { plane:
|
|
55
|
-
if (!
|
|
95
|
+
const { plane: o, directionVector: t, startVectorProject: r } = this.startInfo, a = this.originObject3D, s = e.ray.intersectPlane(o, new d.Vector3());
|
|
96
|
+
if (!s)
|
|
56
97
|
return;
|
|
57
|
-
const
|
|
58
|
-
|
|
98
|
+
const n = s.clone().projectOnVector(t), l = n.clone().sub(r), h = new d.Matrix4();
|
|
99
|
+
h.setPosition(l);
|
|
100
|
+
const m = a.position.clone().applyMatrix4(h);
|
|
101
|
+
this.hooks.emit("wantToMove", m) || (a.applyMatrix4(h), r.copy(n), this.hooks.emit("applyObjectPosition", { matrix4: h }), this.hooks.emit("move", m));
|
|
59
102
|
}
|
|
60
103
|
dragEnd() {
|
|
61
104
|
!this.isDragging || (console.log("%c MoveController dragEnd", "color: #e94e4e"), this.startInfo = void 0, this.isDragging = !1, this.helperObject3D.show(), this.hooks.emit("moveEnd"));
|
|
62
105
|
}
|
|
63
106
|
}
|
|
64
107
|
export {
|
|
65
|
-
|
|
108
|
+
w as MoveController
|
|
66
109
|
};
|
|
@@ -12,13 +12,18 @@ interface StartInfo {
|
|
|
12
12
|
dragPointInCenterLeft?: boolean | null;
|
|
13
13
|
plane: THREE.Plane;
|
|
14
14
|
}
|
|
15
|
-
export declare
|
|
15
|
+
export declare class RectangleScaleController<OriginObject3D extends THREE.Object3D, PointType extends THREE.Object3D | HTMLElement> extends BaseController<RectangleScaleHelperAbstract<OriginObject3D, PointType>> {
|
|
16
16
|
protected startInfo?: StartInfo;
|
|
17
|
+
protected name: string;
|
|
17
18
|
constructor(...params: ConstructorParameters<typeof BaseController<RectangleScaleHelperAbstract<OriginObject3D, PointType>>>);
|
|
18
19
|
enable(): void;
|
|
19
20
|
disable(): void;
|
|
20
21
|
show(): void;
|
|
21
22
|
hide(): void;
|
|
23
|
+
protected onApplyOriginObjectScale(params: {
|
|
24
|
+
matrix4: THREE.Matrix4;
|
|
25
|
+
origin?: THREE.Vector3;
|
|
26
|
+
}): void;
|
|
22
27
|
protected getDragPlane(): THREE.Plane;
|
|
23
28
|
protected dragStart(mousePoint: {
|
|
24
29
|
x: number;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
var X = Object.defineProperty;
|
|
2
|
-
var Y = (h, a,
|
|
3
|
-
var
|
|
4
|
-
import { BaseController as
|
|
5
|
-
import * as
|
|
2
|
+
var Y = (h, a, e) => a in h ? X(h, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[a] = e;
|
|
3
|
+
var I = (h, a, e) => (Y(h, typeof a != "symbol" ? a + "" : a, e), e);
|
|
4
|
+
import { BaseController as H } from "../Base/BaseController.js";
|
|
5
|
+
import * as j from "three";
|
|
6
6
|
import { Vector3 as n } from "three";
|
|
7
|
-
import { getMouseRaycaster as
|
|
8
|
-
import { vectorIsEqual as
|
|
9
|
-
class _ extends
|
|
10
|
-
constructor(...
|
|
11
|
-
super(...
|
|
12
|
-
|
|
7
|
+
import { getMouseRaycaster as T } from "../utils/getMouseRaycaster.js";
|
|
8
|
+
import { vectorIsEqual as G } from "../utils/vectorIsEqual.js";
|
|
9
|
+
class _ extends H {
|
|
10
|
+
constructor(...e) {
|
|
11
|
+
super(...e);
|
|
12
|
+
I(this, "startInfo");
|
|
13
|
+
I(this, "name", "RectangleScaleController");
|
|
13
14
|
}
|
|
14
15
|
enable() {
|
|
15
16
|
this.helperObject3D.enable(), super.enable();
|
|
@@ -23,56 +24,58 @@ class _ extends A {
|
|
|
23
24
|
hide() {
|
|
24
25
|
this.helperObject3D.hide(), super.hide();
|
|
25
26
|
}
|
|
27
|
+
onApplyOriginObjectScale(e) {
|
|
28
|
+
}
|
|
26
29
|
getDragPlane() {
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
29
|
-
return
|
|
30
|
+
const e = new j.Plane(), s = this.helperObject3D.cornerPositions;
|
|
31
|
+
if (s.length !== 0)
|
|
32
|
+
return s.length < 3 ? e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new n()), s[0]) : e.setFromCoplanarPoints(s[0], s[1], s[2]), e;
|
|
30
33
|
}
|
|
31
|
-
dragStart(
|
|
34
|
+
dragStart(e, s) {
|
|
32
35
|
var g, o;
|
|
33
36
|
(o = (g = this.helperObject3D).updatePoints) == null || o.call(g);
|
|
34
37
|
const f = this.getDragPlane();
|
|
35
38
|
if (!f)
|
|
36
39
|
return this.dragEnd();
|
|
37
|
-
this.startInfo = { startPoint: { position:
|
|
40
|
+
this.startInfo = { startPoint: { position: s.position.clone(), direction: s.direction }, plane: f }, this.hooks.emit("scaleStart"), this.render(), this.isDragging = !0, console.log("%c RectangleScaleController dragStart", "color: #e5af2e");
|
|
38
41
|
}
|
|
39
|
-
dragging(
|
|
42
|
+
dragging(e) {
|
|
40
43
|
if (!this.isDragging)
|
|
41
44
|
return;
|
|
42
|
-
const
|
|
43
|
-
if (!
|
|
45
|
+
const s = T(this.camera, e, this.container);
|
|
46
|
+
if (!s)
|
|
44
47
|
return this.dragEnd();
|
|
45
|
-
this.scale(
|
|
48
|
+
this.scale(s), console.log("%c RectangleScaleController dragging", "color: #49de1b");
|
|
46
49
|
}
|
|
47
|
-
scale(
|
|
48
|
-
var
|
|
50
|
+
scale(e) {
|
|
51
|
+
var x, E;
|
|
49
52
|
if (!this.startInfo)
|
|
50
53
|
return;
|
|
51
|
-
const
|
|
54
|
+
const s = this.originObject3D, { startPoint: f, plane: g } = this.startInfo, o = this.helperObject3D.cornerPositions;
|
|
52
55
|
if (o.length < 4)
|
|
53
56
|
return this.dragEnd();
|
|
54
|
-
const p =
|
|
55
|
-
if (!p ||
|
|
57
|
+
const p = e.ray.intersectPlane(g, new n());
|
|
58
|
+
if (!p || G(p, this.camera.position))
|
|
56
59
|
return;
|
|
57
|
-
const
|
|
60
|
+
const O = new n().addVectors(o[0], o[2]).divideScalar(2), { position: k, direction: R } = f, D = new n().subVectors(o[1], o[0]), y = new n().subVectors(o[3], o[0]), S = (r) => {
|
|
58
61
|
const i = new n(0, 0, 0);
|
|
59
62
|
if (!this.startInfo)
|
|
60
63
|
return i;
|
|
61
|
-
const t = (r === "ew" ?
|
|
64
|
+
const t = (r === "ew" ? D : y).clone(), c = k.clone().projectOnVector(t), b = p.clone().projectOnVector(t), v = O.clone().projectOnVector(t);
|
|
62
65
|
if (b.equals(c))
|
|
63
66
|
return i;
|
|
64
67
|
if (r === "ns" && typeof this.startInfo.dragPointInCenterBottom != "boolean") {
|
|
65
|
-
const l = new n().subVectors(b,
|
|
66
|
-
this.startInfo.dragPointInCenterBottom =
|
|
68
|
+
const l = new n().subVectors(b, v), w = l.x < 0 && t.x >= 0, P = l.y < 0 && t.y >= 0, m = l.z < 0 && t.z >= 0;
|
|
69
|
+
this.startInfo.dragPointInCenterBottom = w || P || m;
|
|
67
70
|
}
|
|
68
71
|
if (r === "ew" && typeof this.startInfo.dragPointInCenterLeft != "boolean") {
|
|
69
|
-
const l = new n().subVectors(b,
|
|
70
|
-
this.startInfo.dragPointInCenterLeft =
|
|
72
|
+
const l = new n().subVectors(b, v), w = l.x < 0 && t.x >= 0, P = l.y < 0 && t.y >= 0, m = l.z < 0 && t.z >= 0;
|
|
73
|
+
this.startInfo.dragPointInCenterLeft = w || P || m;
|
|
71
74
|
}
|
|
72
|
-
const
|
|
73
|
-
return
|
|
74
|
-
},
|
|
75
|
-
const r =
|
|
75
|
+
const M = new n().subVectors(b, c), N = M.length();
|
|
76
|
+
return N > 0.3 ? (console.warn("offset.length() > 0.3, skipped", N), i) : M;
|
|
77
|
+
}, z = S("ew"), B = S("ns"), V = () => {
|
|
78
|
+
const r = z;
|
|
76
79
|
this.helperObject3D.cornerPositions.forEach((i, t) => {
|
|
77
80
|
var c;
|
|
78
81
|
(c = this.startInfo) != null && c.dragPointInCenterLeft ? (t === 0 || t === 3) && i.add(r) : (t === 1 || t === 2) && i.add(r);
|
|
@@ -84,21 +87,21 @@ class _ extends A {
|
|
|
84
87
|
(c = this.startInfo) != null && c.dragPointInCenterBottom ? (t === 0 || t === 1) && i.add(r) : (t === 2 || t === 3) && i.add(r);
|
|
85
88
|
});
|
|
86
89
|
};
|
|
87
|
-
switch (
|
|
90
|
+
switch (R) {
|
|
88
91
|
case "ew":
|
|
89
|
-
|
|
92
|
+
V();
|
|
90
93
|
break;
|
|
91
94
|
case "ns":
|
|
92
95
|
C();
|
|
93
96
|
break;
|
|
94
97
|
case "nesw":
|
|
95
98
|
case "nwse":
|
|
96
|
-
|
|
99
|
+
V(), C();
|
|
97
100
|
}
|
|
98
|
-
const L = new n().subVectors(o[1], o[0]).length() /
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
|
|
101
|
+
const L = new n().subVectors(o[1], o[0]).length() / D.length(), q = new n().subVectors(o[3], o[0]).length() / y.length(), A = new n(L, q, 1), u = new j.Matrix4().scale(A);
|
|
102
|
+
s.isCSS3DObjectPlus ? s.applyScaleMatrix4(u) : s.scale.applyMatrix4(u), f.position.copy(p);
|
|
103
|
+
const F = new n().addVectors(o[0], o[2]).divideScalar(2), W = new n().subVectors(F, O), d = new j.Matrix4().setPosition(W);
|
|
104
|
+
s.applyMatrix4(d), (x = this.helperObject3D.css3DInstance) == null || x.css3DObject.applyMatrix4(d), (E = this.helperObject3D.plane) == null || E.applyMatrix4(d), this.hooks.emit("applyObjectScale", { matrix4: u }), this.hooks.emit("applyObjectPosition", { matrix4: d }), this.render();
|
|
102
105
|
}
|
|
103
106
|
dragEnd() {
|
|
104
107
|
!this.isDragging || (this.startInfo = void 0, this.isDragging = !1, this.hooks.emit("scaleEnd"), this.render(), console.log("%c RectangleScaleController dragEnd", "color: #e94e4e"));
|
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
import { BaseController } from '../Base/BaseController';
|
|
2
2
|
import type { RotateHelperAbstract } from '../Helper';
|
|
3
|
+
import * as THREE from 'three';
|
|
3
4
|
export declare class RotateController<T extends RotateHelperAbstract = RotateHelperAbstract> extends BaseController<T> {
|
|
5
|
+
protected name: string;
|
|
6
|
+
private get rotateCenter();
|
|
4
7
|
private startInfo?;
|
|
5
8
|
private lastRotation?;
|
|
6
9
|
private rotations;
|
|
7
10
|
private helperObject3DQuaternion;
|
|
11
|
+
private removeListener;
|
|
8
12
|
constructor(...params: ConstructorParameters<typeof BaseController<T>>);
|
|
9
13
|
initialHelperQuaternion(): void;
|
|
14
|
+
setRotateAngle(angle: {
|
|
15
|
+
x?: number;
|
|
16
|
+
y?: number;
|
|
17
|
+
z?: number;
|
|
18
|
+
}): void;
|
|
19
|
+
dispose(): void;
|
|
20
|
+
protected onApplyOriginObjectScale(params: {
|
|
21
|
+
matrix4: THREE.Matrix4;
|
|
22
|
+
origin?: THREE.Vector3;
|
|
23
|
+
}): void;
|
|
10
24
|
/**
|
|
11
25
|
* @description: 拖动开始,找出拖的Direction
|
|
12
26
|
*/
|