@realsee/dnalogel 2.6.7-dev.1 → 2.6.7-dev.11
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 +0 -20
- package/dist/PanoTagPlugin/controller/TagComputer.d.ts +4 -3
- package/dist/PanoTagPlugin/controller/index.d.ts +1 -0
- package/dist/PanoTagPlugin/typings/tag/TagData.d.ts +4 -4
- package/dist/index.cjs.js +55 -52
- package/dist/index.js +6793 -6068
- package/dist/index.umd.js +45 -42
- package/dist/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.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 +24 -24
- 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 +197 -51
- 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 +18 -18
- 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 +5 -5
- package/docs/functions/CameraMovementPlugin.html +5 -5
- package/docs/functions/CruisePlugin.html +5 -5
- package/docs/functions/GuideLinePlugin.html +5 -5
- package/docs/functions/ItemLabelPlugin.html +5 -5
- package/docs/functions/MapviewFloorplanPlugin.html +5 -5
- package/docs/functions/ModelChassisCompassPlugin.html +5 -5
- package/docs/functions/ModelEntryDoorGuidePlugin.html +5 -5
- package/docs/functions/ModelFloorplanPlugin.html +5 -5
- package/docs/functions/ModelItemLabelPlugin.html +5 -5
- package/docs/functions/ModelRoomLabelPlugin.html +5 -5
- package/docs/functions/ModelTVVideoPlugin.html +5 -5
- package/docs/functions/ModelViewPlugin.html +5 -5
- package/docs/functions/Object3DHelperPlugin.html +5 -5
- package/docs/functions/PanoCompassPlugin.html +5 -5
- package/docs/functions/PanoCursorRaycasterPlugin.html +5 -5
- package/docs/functions/PanoDoorLabelPlugin.html +5 -5
- package/docs/functions/PanoFloorplanRadarPlugin.html +5 -5
- package/docs/functions/PanoMeasurePlugin.html +5 -5
- package/docs/functions/PanoRulerPlugin.html +5 -5
- package/docs/functions/PanoRulerProPlugin.html +5 -5
- package/docs/functions/PanoSpatialTagPlugin.html +5 -5
- package/docs/functions/PanoTagPlugin.html +5 -5
- package/docs/functions/TopviewFloorplanPlugin.html +5 -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 +5 -5
- package/docs/index.html +4 -12
- 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 +15 -15
- 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 +8 -8
- 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 +9 -9
- 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 +5 -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 +5 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -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 +5 -5
- package/docs/interfaces/Rooms.html +5 -5
- package/docs/interfaces/Scissor.html +9 -9
- package/docs/interfaces/State.html +8 -8
- package/docs/interfaces/TagCache.html +12 -12
- package/docs/interfaces/TagConfig.html +10 -10
- package/docs/interfaces/TagIconUrl.html +9 -9
- package/docs/interfaces/Tags.html +9 -9
- 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 +4 -4
- package/docs/types/ArrayPosition.html +5 -5
- package/docs/types/AudioAppearance.html +5 -5
- package/docs/types/AudioTagTypeConfigKey.html +5 -5
- package/docs/types/CSS3DRenderExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
- package/docs/types/ClassFunctionParameters.html +5 -5
- package/docs/types/Color.html +5 -5
- package/docs/types/ContentTypeConfigKey.html +5 -5
- package/docs/types/ContentTypeConfigKeySplit.html +5 -5
- package/docs/types/ContentTypeMap.html +5 -5
- package/docs/types/Create3DDomContainerReturnType.html +5 -5
- package/docs/types/Create3DElementReturnType.html +5 -5
- package/docs/types/CruisePluginExportType.html +5 -5
- package/docs/types/Direction-1.html +5 -5
- package/docs/types/Direction4.html +5 -5
- package/docs/types/FloorplanRuleLabels.html +5 -5
- package/docs/types/FloorplanServerRuleLabels.html +5 -5
- package/docs/types/GuideLinePluginExportType.html +5 -5
- package/docs/types/HelperEventMap.html +5 -5
- package/docs/types/LoadTagConfig.html +5 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/MediaData.html +5 -5
- package/docs/types/MediaStore.html +5 -5
- package/docs/types/ModelElement.html +5 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
- package/docs/types/MoveArgs.html +5 -5
- package/docs/types/MoveOpts.html +5 -5
- package/docs/types/Object3DHelperEventMap.html +5 -5
- package/docs/types/ObjectFit.html +5 -5
- package/docs/types/PaintBrushEventMap.html +5 -5
- package/docs/types/PanoCompassPluginData.html +5 -5
- package/docs/types/PanoCompassPluginExportType.html +5 -5
- package/docs/types/PanoCompassPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
- package/docs/types/PanoIndex.html +5 -5
- package/docs/types/PanoMeasurePluginEvent.html +5 -5
- package/docs/types/PanoMeasureReturnType.html +5 -5
- package/docs/types/PanoSpatialTagPluginId.html +5 -5
- package/docs/types/PanoTagPluginExportInterface.html +5 -5
- package/docs/types/PanoTagPluginParamsInterface.html +5 -5
- package/docs/types/PlaneTag.html +5 -5
- package/docs/types/PlaneTagElement.html +5 -5
- package/docs/types/Point2DElement.html +5 -5
- package/docs/types/Point2DTag.html +5 -5
- package/docs/types/Point3DElement.html +5 -5
- package/docs/types/Point3DTag.html +5 -5
- package/docs/types/PointTag.html +5 -5
- package/docs/types/PointTagElement.html +5 -5
- package/docs/types/Position.html +5 -5
- package/docs/types/RotateArgs.html +5 -5
- package/docs/types/RotateOpts.html +5 -5
- package/docs/types/RuleLabelsKey.html +5 -5
- package/docs/types/RuleLabelsValue.html +5 -5
- package/docs/types/StickType.html +5 -5
- package/docs/types/Tag.html +5 -5
- package/docs/types/Tag2D.html +5 -5
- package/docs/types/Tag3D.html +5 -5
- package/docs/types/TagContentType.html +5 -5
- package/docs/types/TagDimensionType.html +5 -5
- package/docs/types/TagElement.html +5 -5
- package/docs/types/TagEvents.html +5 -5
- package/docs/types/TagGLTFObject.html +5 -5
- package/docs/types/TagHooks.html +5 -5
- package/docs/types/TagIconSize.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TagPointType.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/WorkCode.html +5 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
- package/docs/variables/PLUGIN.html +5 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
- package/docs/variables/ROOM_TYPE_MAP.html +5 -5
- package/docs/variables/VERSION.html +5 -5
- package/docs/variables/itemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
- package/libs/CruisePlugin/Controller.js +26 -26
- package/libs/GuideLinePlugin/Controller.js +43 -43
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +10 -10
- package/libs/PanoTagPlugin/Components/Common/Media.js +240 -318
- package/libs/PanoTagPlugin/Components/Common/MediaItem.js +137 -123
- package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +89 -72
- package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +86 -72
- package/libs/PanoTagPlugin/Components/Tag/index.js +110 -92
- package/libs/PanoTagPlugin/Components/TagContainer.js +98 -80
- package/libs/PanoTagPlugin/Components/TagItem.js +69 -51
- package/libs/PanoTagPlugin/controller/TagComputer.d.ts +4 -3
- package/libs/PanoTagPlugin/controller/TagComputer.js +70 -65
- package/libs/PanoTagPlugin/controller/index.d.ts +1 -0
- package/libs/PanoTagPlugin/controller/index.js +160 -136
- package/libs/PanoTagPlugin/index.js +41 -24
- package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.d.ts +4 -0
- package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.js +6 -0
- package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.d.ts +93 -0
- package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.js +5622 -0
- package/libs/PanoTagPlugin/mocks/v1/mock-test3-realsee-cn-4zr0A5.js +1325 -0
- package/libs/PanoTagPlugin/mocks/v1/mock1.d.ts +173 -0
- package/libs/PanoTagPlugin/mocks/v1/mock1.js +122 -0
- package/libs/PanoTagPlugin/mocks/v1/mock2.d.ts +233 -0
- package/libs/PanoTagPlugin/mocks/v1/mock2.js +296 -0
- package/libs/PanoTagPlugin/mocks/v1/mock3.d.ts +22 -0
- package/libs/PanoTagPlugin/mocks/v1/mock3.js +32 -0
- package/libs/PanoTagPlugin/mocks/v1/mock4.d.ts +56 -0
- package/libs/PanoTagPlugin/mocks/v1/mock4.js +60 -0
- package/libs/PanoTagPlugin/mocks/v1/mock5.d.ts +13 -0
- package/libs/PanoTagPlugin/mocks/v1/mock5.js +17 -0
- package/libs/PanoTagPlugin/mocks/v1/mock6.d.ts +16 -0
- package/libs/PanoTagPlugin/mocks/v1/mock6.js +27 -0
- package/libs/PanoTagPlugin/mocks/v1/mock7.d.ts +22 -0
- package/libs/PanoTagPlugin/mocks/v1/mock7.js +228 -0
- package/libs/PanoTagPlugin/tag.config.js +1 -0
- package/libs/PanoTagPlugin/typings/tag/TagData.d.ts +4 -4
- package/libs/index.js +130 -113
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +38 -38
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +26 -23
- package/libs/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.d.ts +2 -0
- package/libs/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js +28 -22
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +12 -12
- package/libs/vendor/simply-reactive/main.js +3 -0
- package/libs/vendor/simply-reactive/src/simply-reactive.js +44 -0
- package/libs/vendor/simply-reactive/src/utils/object.js +12 -0
- package/libs/vendor/simply-reactive/src/utils/subscription.js +28 -0
- package/libs/vendor/simply-reactive/src/utils/watcher.js +17 -0
- package/libs/vendor/svelte/internal/index.js +267 -274
- package/libs/vendor/svelte-carousel/src/actions/hoverable/event.js +18 -0
- package/libs/vendor/svelte-carousel/src/actions/hoverable/hoverable.js +19 -0
- package/libs/vendor/svelte-carousel/src/actions/hoverable/index.js +1 -0
- package/libs/vendor/svelte-carousel/src/actions/swipeable/event.js +26 -0
- package/libs/vendor/svelte-carousel/src/actions/swipeable/index.js +1 -0
- package/libs/vendor/svelte-carousel/src/actions/swipeable/swipeable.js +51 -0
- package/libs/vendor/svelte-carousel/src/actions/tappable/event.js +18 -0
- package/libs/vendor/svelte-carousel/src/actions/tappable/index.js +1 -0
- package/libs/vendor/svelte-carousel/src/actions/tappable/tappable.js +36 -0
- package/libs/vendor/svelte-carousel/src/components/Arrow/Arrow.js +41 -0
- package/libs/vendor/svelte-carousel/src/components/Carousel/Carousel.js +522 -0
- package/libs/vendor/svelte-carousel/src/components/Carousel/createCarousel.js +255 -0
- package/libs/vendor/svelte-carousel/src/components/Dot/Dot.js +42 -0
- package/libs/vendor/svelte-carousel/src/components/Dots/Dots.js +104 -0
- package/libs/vendor/svelte-carousel/src/components/Progress/Progress.js +40 -0
- package/libs/vendor/svelte-carousel/src/direction.js +5 -0
- package/libs/vendor/svelte-carousel/src/main.js +1 -0
- package/libs/vendor/svelte-carousel/src/units.js +7 -0
- package/libs/vendor/svelte-carousel/src/utils/ProgressManager.js +52 -0
- package/libs/vendor/svelte-carousel/src/utils/clones.js +59 -0
- package/libs/vendor/svelte-carousel/src/utils/event.js +12 -0
- package/libs/vendor/svelte-carousel/src/utils/interval.js +4 -0
- package/libs/vendor/svelte-carousel/src/utils/lazy.js +45 -0
- package/libs/vendor/svelte-carousel/src/utils/math.js +11 -0
- package/libs/vendor/svelte-carousel/src/utils/object.js +13 -0
- package/libs/vendor/svelte-carousel/src/utils/page.js +154 -0
- package/package.json +5 -2
- package/dist/PanoTagPlugin/utils/tag/index.d.ts +0 -2
- package/libs/PanoTagPlugin/utils/tag/index.d.ts +0 -2
- package/libs/PanoTagPlugin/utils/tag/index.js +0 -11
- package/libs/vendor/swiper/components-shared/get-changed-params.js +0 -29
- package/libs/vendor/swiper/components-shared/get-params.js +0 -23
- package/libs/vendor/swiper/components-shared/mount-swiper.js +0 -14
- package/libs/vendor/swiper/components-shared/params-list.js +0 -120
- package/libs/vendor/swiper/components-shared/update-swiper.js +0 -36
- package/libs/vendor/swiper/components-shared/utils.js +0 -32
- package/libs/vendor/swiper/svelte/swiper-slide.js +0 -181
- package/libs/vendor/swiper/svelte/swiper-svelte.js +0 -2
- package/libs/vendor/swiper/svelte/swiper.js +0 -253
|
@@ -27,12 +27,12 @@ class k {
|
|
|
27
27
|
if (this.getIntersectObject(e))
|
|
28
28
|
return !1;
|
|
29
29
|
});
|
|
30
|
-
var
|
|
31
|
-
this.hooks = (
|
|
30
|
+
var a, d;
|
|
31
|
+
this.hooks = (a = e.sharedHooks) != null ? a : new u(), this.camera = e.camera, this.model = e.model, this.originObject3D = e.originObject3D, this.helperObject3D = e.helperObject3D, this.container = e.container, this.scene = e.scene, this.domEvents = new y(e.camera, e.container), this.onRender = (d = e.onRender) != null ? d : () => {
|
|
32
32
|
}, this.offset = t == null ? void 0 : t.offset, this.initialHelperPosition(), this.initialHelperQuaternion(), this.enable();
|
|
33
|
-
const h = (...c) => this.onSetOriginObjectScale(...c),
|
|
34
|
-
this.hooks.on("setObjectScale", h), this.hooks.on("setObjectRotate",
|
|
35
|
-
this.hooks.off("setObjectScale", h), this.hooks.off("setObjectRotate",
|
|
33
|
+
const h = (...c) => this.onSetOriginObjectScale(...c), n = (...c) => this.onSetOriginObjectRotate(...c), r = (...c) => this.onSetOriginObjectPosition(...c), i = (...c) => this.onApplyOriginObjectScale(...c), l = (...c) => this.onApplyOriginObjectRotate(...c), O = (...c) => this.onApplyOriginObjectPosition(...c);
|
|
34
|
+
this.hooks.on("setObjectScale", h), this.hooks.on("setObjectRotate", n), this.hooks.on("setObjectPosition", r), this.hooks.on("applyObjectPosition", O), this.hooks.on("applyObjectRotate", l), this.hooks.on("applyObjectScale", i), this.disposers.push(() => {
|
|
35
|
+
this.hooks.off("setObjectScale", h), this.hooks.off("setObjectRotate", n), this.hooks.off("setObjectPosition", r), this.hooks.off("applyObjectPosition", O), this.hooks.off("applyObjectRotate", l), this.hooks.off("applyObjectScale", i);
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
initialHelperPosition() {
|
|
@@ -95,34 +95,34 @@ class k {
|
|
|
95
95
|
}
|
|
96
96
|
updateOffsetByScale(e) {
|
|
97
97
|
if (this.boundingBox && this.offset) {
|
|
98
|
-
const t = this.originObject3D.position, h = new p.Vector3().subVectors(this.boundingBox.max, t).multiply(e).add(t),
|
|
98
|
+
const t = this.originObject3D.position, h = new p.Vector3().subVectors(this.boundingBox.max, t).multiply(e).add(t), n = new p.Vector3().subVectors(this.boundingBox.min, t).multiply(e).add(t), r = this.calculateOffset(this.offset, { min: n, max: h });
|
|
99
99
|
this.helperObject3D.position.copy(r), this.helperObject3D.initialPosition();
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
hoverListener(e, t = 16777215, h = 1) {
|
|
103
|
-
const
|
|
104
|
-
for (const i of
|
|
103
|
+
const n = (Array.isArray(e) ? e : [e]).filter(m), r = [];
|
|
104
|
+
for (const i of n)
|
|
105
105
|
if (i instanceof p.Mesh || i instanceof p.Group) {
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
const l = i instanceof p.Group ? i.children.filter((o) => o instanceof p.Mesh) : [i];
|
|
107
|
+
l.forEach((o) => {
|
|
108
|
+
o.__originalColor__ = o.material.color.clone(), o.__originalOpacity__ = o.material.opacity;
|
|
109
109
|
});
|
|
110
110
|
const O = () => {
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
l.forEach((o) => {
|
|
112
|
+
o.material.color.set(t), o.material.opacity = h;
|
|
113
113
|
}), this.render();
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
}, a = () => {
|
|
115
|
+
l.forEach((o) => {
|
|
116
|
+
o.material.color.copy(o.__originalColor__), o.material.opacity = o.__originalOpacity__;
|
|
117
117
|
}), this.render();
|
|
118
118
|
}, d = () => {
|
|
119
119
|
this.isDragging || O();
|
|
120
120
|
}, c = () => {
|
|
121
|
-
this.isDragging ||
|
|
121
|
+
this.isDragging || a();
|
|
122
122
|
};
|
|
123
|
-
for (const
|
|
124
|
-
this.domEvents.addEventListener(
|
|
125
|
-
this.domEvents.removeEventListener(
|
|
123
|
+
for (const o of l)
|
|
124
|
+
this.domEvents.addEventListener(o, "mouseover", d), this.domEvents.addEventListener(o, "mouseout", c), this.hooks.on("moveStart", O), this.hooks.on("moveEnd", a), this.hooks.on("rotateEnd", a), r.push(() => {
|
|
125
|
+
this.domEvents.removeEventListener(o, "mouseover", d), this.domEvents.removeEventListener(o, "mouseout", c), this.hooks.off("moveStart", O), this.hooks.off("moveEnd", a), this.hooks.off("rotateEnd", a);
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
return () => r.forEach((i) => i == null ? void 0 : i());
|
|
@@ -131,41 +131,41 @@ class k {
|
|
|
131
131
|
const t = this.camera.position, h = this.helperObject3D;
|
|
132
132
|
if (!h)
|
|
133
133
|
return;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
return o.object;
|
|
134
|
+
const n = this.helperObject3D.raycasterIntersectObject(e)[0];
|
|
135
|
+
if (!n)
|
|
136
|
+
return;
|
|
137
|
+
const r = n;
|
|
138
|
+
if (r.object = h, this.model.intersectRaycaster) {
|
|
139
|
+
const i = this.model.intersectRaycaster(e)[0];
|
|
140
|
+
if (i && i.point.distanceTo(t) < r.point.distanceTo(t))
|
|
141
|
+
return;
|
|
143
142
|
}
|
|
143
|
+
return r.object;
|
|
144
144
|
}
|
|
145
145
|
calculateOffset(e, t) {
|
|
146
|
-
const h = this.originObject3D,
|
|
146
|
+
const h = this.originObject3D, n = new p.Vector3(0, 0, 0);
|
|
147
147
|
if (!e)
|
|
148
|
-
return
|
|
148
|
+
return n;
|
|
149
149
|
const r = () => t || (this.boundingBox ? this.boundingBox : (this.boundingBox = g(h), this.boundingBox));
|
|
150
150
|
if (typeof e.x == "number")
|
|
151
|
-
|
|
151
|
+
n.setX(e.x);
|
|
152
152
|
else if (typeof e.x == "object") {
|
|
153
153
|
const i = r();
|
|
154
|
-
|
|
154
|
+
n.setX((i.max.x - i.min.x) * e.x.percents);
|
|
155
155
|
}
|
|
156
156
|
if (typeof e.y == "number")
|
|
157
|
-
|
|
157
|
+
n.setY(e.y);
|
|
158
158
|
else if (typeof e.y == "object") {
|
|
159
159
|
const i = r();
|
|
160
|
-
|
|
160
|
+
n.setY((i.max.y - i.min.y) * e.y.percents);
|
|
161
161
|
}
|
|
162
162
|
if (typeof e.z == "number")
|
|
163
|
-
|
|
163
|
+
n.setZ(e.z);
|
|
164
164
|
else if (typeof e.z == "object") {
|
|
165
165
|
const i = r();
|
|
166
|
-
|
|
166
|
+
n.setZ((i.max.z - i.min.z) * e.z.percents);
|
|
167
167
|
}
|
|
168
|
-
return
|
|
168
|
+
return n;
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
export {
|
|
@@ -20,6 +20,7 @@ export declare abstract class BaseHelper<OriginObject3D extends Object3D = Objec
|
|
|
20
20
|
disable(): void;
|
|
21
21
|
show(): void;
|
|
22
22
|
hide(): void;
|
|
23
|
+
raycasterIntersectObject(raycaster: THREE.Raycaster, intersection?: THREE.Intersection[]): THREE.Intersection[];
|
|
23
24
|
initialPosition(): void;
|
|
24
25
|
initQuaternion(): void;
|
|
25
26
|
applyHelperScaleMatrix4(matrix: THREE.Matrix4, origin?: Vector3): void;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var o = (
|
|
4
|
-
import { Vector3 as a, Object3D as
|
|
5
|
-
class h extends
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var p = (s, r, e) => r in s ? c(s, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[r] = e;
|
|
3
|
+
var o = (s, r, e) => (p(s, typeof r != "symbol" ? r + "" : r, e), e);
|
|
4
|
+
import { Vector3 as a, Object3D as l } from "three";
|
|
5
|
+
class h extends l {
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
8
8
|
}
|
|
9
9
|
removeFromParent() {
|
|
10
|
-
const
|
|
11
|
-
return
|
|
10
|
+
const r = this.parent;
|
|
11
|
+
return r !== null && r.remove(this), this;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
class n extends h {
|
|
15
|
-
constructor(e,
|
|
16
|
-
var
|
|
15
|
+
constructor(e, t) {
|
|
16
|
+
var i;
|
|
17
17
|
super();
|
|
18
18
|
o(this, "originObject3D");
|
|
19
19
|
o(this, "onRender");
|
|
20
|
-
this.originObject3D = e, this.onRender = (
|
|
20
|
+
this.originObject3D = e, this.onRender = (i = t == null ? void 0 : t.onRender) != null ? i : () => {
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
get helperObject() {
|
|
@@ -38,26 +38,29 @@ class n extends h {
|
|
|
38
38
|
hide() {
|
|
39
39
|
this.visible = !1, this.render();
|
|
40
40
|
}
|
|
41
|
+
raycasterIntersectObject(e, t = []) {
|
|
42
|
+
return e.intersectObject(this, !0, t);
|
|
43
|
+
}
|
|
41
44
|
initialPosition() {
|
|
42
45
|
this.position.add(this.originObject3D.position);
|
|
43
46
|
}
|
|
44
47
|
initQuaternion() {
|
|
45
48
|
this.quaternion.copy(this.originObject3D.quaternion);
|
|
46
49
|
}
|
|
47
|
-
applyHelperScaleMatrix4(e,
|
|
50
|
+
applyHelperScaleMatrix4(e, t) {
|
|
48
51
|
this.scale.applyMatrix4(e);
|
|
49
52
|
}
|
|
50
|
-
setHelperQuaternion(e,
|
|
51
|
-
if (
|
|
52
|
-
const
|
|
53
|
-
this.position.copy(
|
|
53
|
+
setHelperQuaternion(e, t) {
|
|
54
|
+
if (t) {
|
|
55
|
+
const i = new a().subVectors(this.position, t).applyQuaternion(e).add(t);
|
|
56
|
+
this.position.copy(i);
|
|
54
57
|
}
|
|
55
58
|
this.quaternion.copy(e);
|
|
56
59
|
}
|
|
57
|
-
applyHelperQuaternion(e,
|
|
58
|
-
if (
|
|
59
|
-
const
|
|
60
|
-
this.position.copy(
|
|
60
|
+
applyHelperQuaternion(e, t) {
|
|
61
|
+
if (t) {
|
|
62
|
+
const i = new a().subVectors(this.position, t).applyQuaternion(e).add(t);
|
|
63
|
+
this.position.copy(i);
|
|
61
64
|
}
|
|
62
65
|
this.applyQuaternion(e);
|
|
63
66
|
}
|
|
@@ -69,16 +72,16 @@ class x extends n {
|
|
|
69
72
|
}
|
|
70
73
|
class y extends n {
|
|
71
74
|
}
|
|
72
|
-
class
|
|
75
|
+
class j extends n {
|
|
73
76
|
}
|
|
74
77
|
class d extends n {
|
|
75
78
|
}
|
|
76
|
-
class
|
|
79
|
+
class m extends d {
|
|
77
80
|
}
|
|
78
81
|
export {
|
|
79
82
|
y as BoundingBoxHelperAbstract,
|
|
80
83
|
x as MoveHelperAbstract,
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
m as RectangleScaleHelperAbstract,
|
|
85
|
+
j as RotateHelperAbstract,
|
|
83
86
|
d as ScaleHelperAbstract
|
|
84
87
|
};
|
|
@@ -6,6 +6,8 @@ export declare class BoundingBoxHelper<T extends THREE.Object3D = THREE.Object3D
|
|
|
6
6
|
private originObject;
|
|
7
7
|
private positionAttribute;
|
|
8
8
|
constructor(originObject: T);
|
|
9
|
+
raycasterIntersectObject(raycaster: THREE.Raycaster, intersection: THREE.Intersection[]): THREE.Intersection[];
|
|
10
|
+
raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection[]): void;
|
|
9
11
|
private update;
|
|
10
12
|
private createOutline;
|
|
11
13
|
private createBox;
|
|
@@ -1,40 +1,46 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var r = (n,
|
|
4
|
-
import * as
|
|
1
|
+
var u = Object.defineProperty;
|
|
2
|
+
var c = (n, o, e) => o in n ? u(n, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[o] = e;
|
|
3
|
+
var r = (n, o, e) => (c(n, typeof o != "symbol" ? o + "" : o, e), e);
|
|
4
|
+
import * as s from "three";
|
|
5
5
|
import { BoundingBoxHelperAbstract as b } from "../Base/BaseHelper.js";
|
|
6
|
-
import { boundingBox as
|
|
6
|
+
import { boundingBox as p } from "../utils/boundingBox.js";
|
|
7
7
|
class A extends b {
|
|
8
|
-
constructor(
|
|
9
|
-
super(
|
|
8
|
+
constructor(e) {
|
|
9
|
+
super(e);
|
|
10
10
|
r(this, "box");
|
|
11
11
|
r(this, "outline");
|
|
12
12
|
r(this, "originObject");
|
|
13
13
|
r(this, "positionAttribute");
|
|
14
|
-
this.originObject =
|
|
14
|
+
this.originObject = e, this.positionAttribute = new s.BufferAttribute(new Float32Array(8 * 3), 3), this.box = this.createBox(), this.outline = this.createOutline(), this.add(this.box, this.outline), this.update();
|
|
15
|
+
}
|
|
16
|
+
raycasterIntersectObject(e, t) {
|
|
17
|
+
return e.intersectObject(this, !1, t);
|
|
18
|
+
}
|
|
19
|
+
raycast(e, t) {
|
|
20
|
+
this.box.raycast(e, t);
|
|
15
21
|
}
|
|
16
22
|
update() {
|
|
17
|
-
const
|
|
18
|
-
if (!
|
|
23
|
+
const e = p(this.originObject);
|
|
24
|
+
if (!e)
|
|
19
25
|
return;
|
|
20
|
-
const { min: t, max:
|
|
21
|
-
this.positionAttribute.setXYZ(0,
|
|
26
|
+
const { min: t, max: i } = e;
|
|
27
|
+
this.positionAttribute.setXYZ(0, i.x, i.y, i.z), this.positionAttribute.setXYZ(1, t.x, i.y, i.z), this.positionAttribute.setXYZ(2, t.x, t.y, i.z), this.positionAttribute.setXYZ(3, i.x, t.y, i.z), this.positionAttribute.setXYZ(4, i.x, i.y, t.z), this.positionAttribute.setXYZ(5, t.x, i.y, t.z), this.positionAttribute.setXYZ(6, t.x, t.y, t.z), this.positionAttribute.setXYZ(7, i.x, t.y, t.z), this.positionAttribute.needsUpdate = !0;
|
|
22
28
|
}
|
|
23
29
|
createOutline() {
|
|
24
|
-
const
|
|
25
|
-
t.setIndex(new
|
|
26
|
-
const
|
|
30
|
+
const e = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]), t = new s.BufferGeometry();
|
|
31
|
+
t.setIndex(new s.BufferAttribute(e, 1)), t.setAttribute("position", this.positionAttribute);
|
|
32
|
+
const i = new s.LineBasicMaterial({
|
|
27
33
|
color: 64767,
|
|
28
34
|
linewidth: 1,
|
|
29
35
|
opacity: 1,
|
|
30
36
|
depthTest: !1,
|
|
31
37
|
transparent: !0,
|
|
32
38
|
toneMapped: !1
|
|
33
|
-
}),
|
|
34
|
-
return
|
|
39
|
+
}), a = new s.LineSegments(t, i);
|
|
40
|
+
return a.matrixAutoUpdate = !1, a;
|
|
35
41
|
}
|
|
36
42
|
createBox() {
|
|
37
|
-
const
|
|
43
|
+
const e = new Uint16Array([
|
|
38
44
|
0,
|
|
39
45
|
1,
|
|
40
46
|
2,
|
|
@@ -71,15 +77,15 @@ class A extends b {
|
|
|
71
77
|
6,
|
|
72
78
|
7,
|
|
73
79
|
3
|
|
74
|
-
]), t = new
|
|
75
|
-
t.setIndex(new
|
|
76
|
-
const
|
|
80
|
+
]), t = new s.BufferGeometry();
|
|
81
|
+
t.setIndex(new s.BufferAttribute(e, 1)), t.setAttribute("position", this.positionAttribute);
|
|
82
|
+
const i = new s.MeshBasicMaterial({
|
|
77
83
|
color: 64767,
|
|
78
84
|
opacity: 0.1,
|
|
79
85
|
depthTest: !1,
|
|
80
86
|
transparent: !0
|
|
81
87
|
});
|
|
82
|
-
return new
|
|
88
|
+
return new s.Mesh(t, i);
|
|
83
89
|
}
|
|
84
90
|
}
|
|
85
91
|
export {
|
|
@@ -20,18 +20,18 @@ class P extends m {
|
|
|
20
20
|
t(this, "zAngleHelper");
|
|
21
21
|
t(this, "angleTips");
|
|
22
22
|
t(this, "container");
|
|
23
|
-
(e == null ? void 0 : e.yzCircleEnable) !== !1 && (this.yzCircle = new d({ direction: "x", color: y.X }), this.xRingHelper = new H({ direction: "x" }), this.xAngleHelper = new
|
|
23
|
+
(e == null ? void 0 : e.yzCircleEnable) !== !1 && (this.yzCircle = new d({ direction: "x", color: y.X }), this.xRingHelper = new H({ direction: "x" }), this.xAngleHelper = new x({ direction: "x", color: y.X })), (e == null ? void 0 : e.xzCircleEnable) !== !1 && (this.xzCircle = new d({ direction: "y", color: y.Y }), this.yRingHelper = new H({ direction: "y" }), this.yAngleHelper = new x({ direction: "y", color: y.Y })), (e == null ? void 0 : e.xyCircleEnable) !== !1 && (this.xyCircle = new d({ direction: "z", color: y.Z }), this.zRingHelper = new H({ direction: "z" }), this.zAngleHelper = new x({ direction: "z", color: y.Z })), e != null && e.container && (this.container = e == null ? void 0 : e.container, this.angleTips = w({ display: "none" }), (s = this.container) == null || s.appendChild(this.angleTips.element)), this.show();
|
|
24
24
|
}
|
|
25
25
|
updateAngleHelperQuaternion() {
|
|
26
|
-
var i, e, s, c,
|
|
27
|
-
(e = this.xAngleHelper) == null || e.quaternion.copy((i = this.yzCircle) == null ? void 0 : i.quaternion), (c = this.yAngleHelper) == null || c.quaternion.copy((s = this.xzCircle) == null ? void 0 : s.quaternion), (o = this.zAngleHelper) == null || o.quaternion.copy((
|
|
26
|
+
var i, e, s, c, a, o, p, h, g, A, u, z;
|
|
27
|
+
(e = this.xAngleHelper) == null || e.quaternion.copy((i = this.yzCircle) == null ? void 0 : i.quaternion), (c = this.yAngleHelper) == null || c.quaternion.copy((s = this.xzCircle) == null ? void 0 : s.quaternion), (o = this.zAngleHelper) == null || o.quaternion.copy((a = this.xyCircle) == null ? void 0 : a.quaternion), (h = this.xRingHelper) == null || h.quaternion.copy((p = this.yzCircle) == null ? void 0 : p.quaternion), (A = this.yRingHelper) == null || A.quaternion.copy((g = this.xzCircle) == null ? void 0 : g.quaternion), (z = this.zRingHelper) == null || z.quaternion.copy((u = this.xyCircle) == null ? void 0 : u.quaternion);
|
|
28
28
|
}
|
|
29
29
|
applyHelperQuaternion(i, e) {
|
|
30
|
-
var s, c,
|
|
31
|
-
(s = this.yzCircle) == null || s.applyQuaternion(i), (c = this.xzCircle) == null || c.applyQuaternion(i), (
|
|
30
|
+
var s, c, a, o, p, h;
|
|
31
|
+
(s = this.yzCircle) == null || s.applyQuaternion(i), (c = this.xzCircle) == null || c.applyQuaternion(i), (a = this.xyCircle) == null || a.applyQuaternion(i), (o = this.xAngleHelper) == null || o.baseAxes.applyQuaternion(i), (p = this.yAngleHelper) == null || p.baseAxes.applyQuaternion(i), (h = this.zAngleHelper) == null || h.baseAxes.applyQuaternion(i);
|
|
32
32
|
}
|
|
33
33
|
hide() {
|
|
34
|
-
|
|
34
|
+
this.remove(
|
|
35
35
|
this.yzCircle,
|
|
36
36
|
this.xzCircle,
|
|
37
37
|
this.xyCircle,
|
|
@@ -45,7 +45,7 @@ class P extends m {
|
|
|
45
45
|
}
|
|
46
46
|
show() {
|
|
47
47
|
var i;
|
|
48
|
-
|
|
48
|
+
this.add(...[this.xyCircle, this.xzCircle, this.yzCircle].filter(Boolean)), this.remove(
|
|
49
49
|
...[this.xRingHelper, this.yRingHelper, this.zRingHelper, this.xAngleHelper, this.yAngleHelper, this.zAngleHelper].filter(Boolean)
|
|
50
50
|
), (i = this.angleTips) == null || i.hide();
|
|
51
51
|
}
|
|
@@ -97,20 +97,20 @@ class H extends r.Group {
|
|
|
97
97
|
super();
|
|
98
98
|
t(this, "direction");
|
|
99
99
|
this.direction = i.direction;
|
|
100
|
-
const e = 0.015, s = new Array(8).fill(null).map((c,
|
|
101
|
-
const o = new r.RingGeometry(0.25, 0.3, 20, 8, Math.PI / 4 *
|
|
100
|
+
const e = 0.015, s = new Array(8).fill(null).map((c, a) => {
|
|
101
|
+
const o = new r.RingGeometry(0.25, 0.3, 20, 8, Math.PI / 4 * a + e, Math.PI / 4 - e * 2), p = new r.MeshBasicMaterial({
|
|
102
102
|
opacity: 1,
|
|
103
103
|
color: 16777215,
|
|
104
104
|
depthTest: !1,
|
|
105
105
|
transparent: !0,
|
|
106
106
|
side: r.DoubleSide
|
|
107
|
-
}),
|
|
108
|
-
return
|
|
107
|
+
}), h = new r.Mesh(o, p);
|
|
108
|
+
return h.name = `AxesDashedRing-${this.direction}-${a}`, h;
|
|
109
109
|
});
|
|
110
110
|
this.add(...s), this.direction === "y" ? this.rotateX(Math.PI / 2) : this.direction === "x" && this.rotateY(-Math.PI / 2);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
class
|
|
113
|
+
class x extends r.Mesh {
|
|
114
114
|
constructor(i) {
|
|
115
115
|
var s;
|
|
116
116
|
super();
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import c from "lodash.get";
|
|
2
|
+
import w from "lodash.clonedeep";
|
|
3
|
+
import { createSubscription as x } from "./utils/subscription.js";
|
|
4
|
+
import { createTargetWatcher as C } from "./utils/watcher.js";
|
|
5
|
+
function E(s, l) {
|
|
6
|
+
const h = c(s, "data", {}), m = c(s, "watch", {}), b = c(s, "methods", {}), i = c(l, "onChange", () => {
|
|
7
|
+
}), { subscribe: d, notify: p, subscribers: y } = x(), { targetWatcher: _, getTarget: a } = C();
|
|
8
|
+
let n;
|
|
9
|
+
const o = {}, f = () => ({
|
|
10
|
+
data: n,
|
|
11
|
+
methods: o
|
|
12
|
+
});
|
|
13
|
+
let u = !1;
|
|
14
|
+
const j = (e) => (...t) => {
|
|
15
|
+
u = !0;
|
|
16
|
+
const r = e(...t);
|
|
17
|
+
return u = !1, r;
|
|
18
|
+
};
|
|
19
|
+
Object.entries(b).forEach(([e, t]) => {
|
|
20
|
+
o[e] = j(
|
|
21
|
+
(...r) => t(f(), ...r)
|
|
22
|
+
), Object.defineProperty(o[e], "name", { value: e });
|
|
23
|
+
}), n = new Proxy(w(h), {
|
|
24
|
+
get(e, t) {
|
|
25
|
+
return a() && !u && d(a(), { prop: t, value: e[t] }), Reflect.get(...arguments);
|
|
26
|
+
},
|
|
27
|
+
set(e, t, r) {
|
|
28
|
+
return e[t] === r || (Reflect.set(...arguments), a() || (i && i(t, r), p(n, t))), !0;
|
|
29
|
+
}
|
|
30
|
+
}), Object.entries(m).forEach(([e, t]) => {
|
|
31
|
+
_(e, () => {
|
|
32
|
+
t(f());
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
const g = [n, o];
|
|
36
|
+
return g._internal = {
|
|
37
|
+
_getSubscribers() {
|
|
38
|
+
return y;
|
|
39
|
+
}
|
|
40
|
+
}, g;
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
E as simplyReactive
|
|
44
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import o from "lodash.isequal";
|
|
2
|
+
const p = (e, t) => o(e, t), c = (e) => Object.keys(e || {}), u = (e, t) => {
|
|
3
|
+
const r = {};
|
|
4
|
+
return e.forEach((s) => {
|
|
5
|
+
r[s] = t[s];
|
|
6
|
+
}), r;
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
p as depsAreEqual,
|
|
10
|
+
c as getDepNames,
|
|
11
|
+
u as getUpdatedDeps
|
|
12
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { getUpdatedDeps as d, depsAreEqual as a, getDepNames as f } from "./object.js";
|
|
2
|
+
const m = () => {
|
|
3
|
+
const e = {}, i = (s, t) => {
|
|
4
|
+
const { watcherName: c, fn: n } = s, { prop: p, value: o } = t;
|
|
5
|
+
e[c] || (e[c] = {
|
|
6
|
+
deps: {},
|
|
7
|
+
fn: n
|
|
8
|
+
}), e[c].deps[p] = o;
|
|
9
|
+
};
|
|
10
|
+
return {
|
|
11
|
+
subscribers: e,
|
|
12
|
+
subscribe(s, t) {
|
|
13
|
+
s && i(s, t);
|
|
14
|
+
},
|
|
15
|
+
notify(s, t) {
|
|
16
|
+
Object.entries(e).forEach(([c, { deps: n, fn: p }]) => {
|
|
17
|
+
const o = f(n);
|
|
18
|
+
if (o.includes(t)) {
|
|
19
|
+
const r = d(o, s);
|
|
20
|
+
a(n, r) || (e[c].deps = r, p());
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
m as createSubscription
|
|
28
|
+
};
|