@realsee/dnalogel 2.1.2-alpha.0 → 2.1.2-alpha.10
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 +3 -12
- package/dist/CSS3DRenderPlugin/index..js +88 -0
- package/dist/CSS3DRenderPlugin/index.cjs.js +1 -0
- package/dist/CameraMovementPlugin/index..js +11 -0
- package/dist/CameraMovementPlugin/index.cjs.js +1 -0
- package/dist/CruisePlugin/index..js +527 -0
- package/dist/CruisePlugin/index.cjs.js +1 -0
- package/dist/GuideLinePlugin/index..js +214 -0
- package/dist/GuideLinePlugin/index.cjs.js +1 -0
- package/dist/ItemLabelPlugin/index..js +508 -0
- package/dist/ItemLabelPlugin/index.cjs.js +10 -0
- package/dist/ModelChassisCompassPlugin/index..js +9 -0
- package/dist/ModelChassisCompassPlugin/index.cjs.js +1 -0
- package/dist/ModelEntryDoorGuidePlugin/index..js +9 -0
- package/dist/ModelEntryDoorGuidePlugin/index.cjs.js +1 -0
- package/dist/ModelItemLabelPlugin/index..js +334 -0
- package/dist/ModelItemLabelPlugin/index.cjs.js +10 -0
- package/dist/ModelRoomLabelPlugin/index..js +274 -0
- package/dist/ModelRoomLabelPlugin/index.cjs.js +1 -0
- package/dist/ModelTVVideoPlugin/index..js +12 -0
- package/dist/ModelTVVideoPlugin/index.cjs.js +1 -0
- package/dist/ModelViewPlugin/index..js +8 -0
- package/dist/ModelViewPlugin/index.cjs.js +1 -0
- package/dist/Object3DHelperPlugin/index..js +1414 -0
- package/dist/Object3DHelperPlugin/index.cjs.js +1 -0
- package/dist/PanoCompassPlugin/index..js +258 -0
- package/dist/PanoCompassPlugin/index.cjs.js +1 -0
- package/dist/PanoCursorRaycasterPlugin/index..js +63 -0
- package/dist/PanoCursorRaycasterPlugin/index.cjs.js +1 -0
- package/dist/PanoDoorLabelPlugin/index..js +340 -0
- package/dist/PanoDoorLabelPlugin/index.cjs.js +1 -0
- package/dist/PanoMeasurePlugin/index..js +15 -0
- package/dist/PanoMeasurePlugin/index.cjs.js +1 -0
- package/dist/PanoRulerPlugin/index..js +9 -0
- package/dist/PanoRulerPlugin/index.cjs.js +1 -0
- package/dist/PanoRulerProPlugin/index..js +395 -0
- package/dist/PanoRulerProPlugin/index.cjs.js +1 -0
- package/dist/PanoSpatialTagPlugin/index..js +15 -0
- package/dist/PanoSpatialTagPlugin/index.cjs.js +1 -0
- package/dist/PanoTagPlugin/index..js +4522 -0
- package/dist/PanoTagPlugin/index.cjs.js +17 -0
- package/dist/chunks/cjs/BasePlugin.57e5204f.cjs.js +1 -0
- package/dist/chunks/cjs/BasePluginWithData.0a28882d.cjs.js +1 -0
- package/dist/chunks/cjs/CSS3DRender.15349564.cjs.js +1 -0
- package/dist/chunks/cjs/CameraMovementPlugin.2b342576.cjs.js +1 -0
- package/dist/chunks/cjs/Plugin.5f616fb3.cjs.js +1 -0
- package/dist/chunks/cjs/Plugin.609da4aa.cjs.js +94 -0
- package/dist/chunks/cjs/Plugin.67936d0e.cjs.js +16 -0
- package/dist/chunks/cjs/Plugin.8a110c53.cjs.js +1 -0
- package/dist/chunks/cjs/Plugin.9971108a.cjs.js +1 -0
- package/dist/chunks/cjs/Plugin.fd42bf8a.cjs.js +1 -0
- package/dist/chunks/cjs/Subscribe.5398d5c6.cjs.js +1 -0
- package/dist/chunks/cjs/changeModelCanvasOpacity.8d84f111.cjs.js +1 -0
- package/dist/chunks/cjs/correctFiveState.4c8472bd.cjs.js +1 -0
- package/dist/chunks/cjs/debounce.93dfb637.cjs.js +1 -0
- package/dist/chunks/cjs/equal.e9fcbd4e.cjs.js +1 -0
- package/dist/chunks/cjs/filter.cf9ebbb3.cjs.js +1 -0
- package/dist/chunks/cjs/formatData.81e95011.cjs.js +10 -0
- package/dist/chunks/cjs/index.30b7baeb.cjs.js +101 -0
- package/dist/chunks/cjs/index.686e84d1.cjs.js +290 -0
- package/dist/chunks/cjs/index.7d2010ce.cjs.js +1 -0
- package/dist/chunks/cjs/isNil.b3a58990.cjs.js +1 -0
- package/dist/chunks/cjs/planimetry.7fce816a.cjs.js +1 -0
- package/dist/chunks/cjs/throttle.86c209eb.cjs.js +1 -0
- package/dist/chunks/cjs/transfromToMeshBasicMaterial.9db6d46a.cjs.js +1 -0
- package/dist/chunks/cjs/uuid.29ed9c88.cjs.js +1 -0
- package/dist/chunks/es/BasePlugin.813e25f7.es.js +18 -0
- package/dist/chunks/es/BasePluginWithData.4bf4e649.es.js +6 -0
- package/dist/chunks/es/CSS3DRender.5652510e.es.js +393 -0
- package/dist/chunks/es/CameraMovementPlugin.4a7c3e46.es.js +120 -0
- package/dist/chunks/es/Plugin.26c2df05.es.js +106 -0
- package/dist/chunks/es/Plugin.435485ed.es.js +584 -0
- package/dist/chunks/es/Plugin.a98418f0.es.js +82 -0
- package/dist/chunks/es/Plugin.ae4ee6f8.es.js +82 -0
- package/dist/chunks/es/Plugin.dd11e0ad.es.js +180 -0
- package/dist/chunks/es/Plugin.f4cf895f.es.js +355 -0
- package/dist/chunks/es/Subscribe.c73e0f91.es.js +50 -0
- package/dist/chunks/es/changeModelCanvasOpacity.45ef9fd6.es.js +1551 -0
- package/dist/chunks/es/correctFiveState.e7feab9f.es.js +66 -0
- package/dist/chunks/es/debounce.ef83f417.es.js +11 -0
- package/dist/chunks/es/equal.7db4a6f7.es.js +56 -0
- package/dist/chunks/es/filter.97ec06c4.es.js +12 -0
- package/dist/chunks/es/formatData.a2b39ef9.es.js +483 -0
- package/dist/chunks/es/index.a273f06e.es.js +532 -0
- package/dist/chunks/es/index.b8fdb59b.es.js +50 -0
- package/dist/chunks/es/index.f74f4851.es.js +1787 -0
- package/dist/chunks/es/isNil.212842d9.es.js +10 -0
- package/dist/chunks/es/planimetry.b0b4a28d.es.js +43 -0
- package/dist/chunks/es/throttle.db66bac3.es.js +11 -0
- package/dist/chunks/es/transfromToMeshBasicMaterial.849ee069.es.js +24 -0
- package/dist/chunks/es/uuid.676cb2c8.es.js +9 -0
- package/dist/components/PaintBrush/index..js +6 -0
- package/dist/components/PaintBrush/index.cjs.js +1 -0
- package/dist/components/index..js +7 -0
- package/dist/components/index.cjs.js +1 -0
- package/dist/floorplan/MapviewFloorplanPlugin/index..js +324 -0
- package/dist/floorplan/MapviewFloorplanPlugin/index.cjs.js +1 -0
- package/dist/floorplan/ModelFloorplanPlugin/index..js +320 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.cjs.js +1 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index..js +613 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.cjs.js +1 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index..js +277 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.cjs.js +1 -0
- package/dist/index..js +530 -0
- package/dist/index.cjs.js +3 -543
- package/docs/classes/CruisePluginController.html +24 -24
- package/docs/classes/Magnifier.html +16 -16
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoTagPluginController.html +39 -39
- 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 +12 -12
- 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/LinkType.html +7 -7
- 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 +4 -4
- package/docs/functions/CameraMovementPlugin.html +4 -4
- package/docs/functions/CruisePlugin.html +4 -4
- package/docs/functions/GuideLinePlugin.html +5 -5
- package/docs/functions/ItemLabelPlugin.html +4 -4
- package/docs/functions/MapviewFloorplanPlugin.html +4 -4
- package/docs/functions/ModelChassisCompassPlugin.html +4 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
- package/docs/functions/ModelFloorplanPlugin.html +4 -4
- package/docs/functions/ModelItemLabelPlugin.html +4 -4
- package/docs/functions/ModelRoomLabelPlugin.html +4 -4
- package/docs/functions/ModelTVVideoPlugin.html +4 -4
- package/docs/functions/ModelViewPlugin.html +4 -4
- package/docs/functions/Object3DHelperPlugin.html +4 -4
- package/docs/functions/PanoCompassPlugin.html +4 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
- package/docs/functions/PanoDoorLabelPlugin.html +4 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
- package/docs/functions/PanoMeasurePlugin.html +4 -4
- package/docs/functions/PanoRulerPlugin.html +4 -4
- package/docs/functions/PanoRulerProPlugin.html +4 -4
- package/docs/functions/PanoSpatialTagPlugin.html +4 -4
- package/docs/functions/PanoTagPlugin.html +4 -4
- package/docs/functions/TopviewFloorplanPlugin.html +4 -4
- 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 +6 -11
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/ContentTypeMap.html +12 -12
- 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/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- package/docs/interfaces/LineJson.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 +8 -8
- package/docs/interfaces/Object3DHelperState.html +8 -8
- package/docs/interfaces/OpenParameter.html +7 -7
- 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 +11 -11
- 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/PointJson.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/TagConfig.html +10 -10
- package/docs/interfaces/Tags.html +9 -9
- 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/CSS3DRenderExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
- package/docs/types/Color.html +5 -5
- package/docs/types/ContentTypeConfigKey.html +5 -5
- package/docs/types/ContentTypeConfigKeyArray.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/MapviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/MediaData.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/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/PointTag.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/Tag.html +5 -5
- package/docs/types/Tag2D.html +5 -5
- package/docs/types/Tag3D.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.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/CSS3DRenderPlugin/CSS3DRender.js +1 -5
- package/libs/CSS3DRenderPlugin/Controller.js +6 -7
- package/libs/CSS3DRenderPlugin/index.js +3 -4
- package/libs/CSS3DRenderPlugin/typing.js +1 -0
- package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +1 -3
- package/libs/CSS3DRenderPlugin/utils/index.js +1 -0
- package/libs/CSS3DRenderPlugin/utils/positionToVector3.js +1 -2
- package/libs/CSS3DRenderPlugin/utils/random.js +1 -0
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +16 -17
- package/libs/CameraMovementPlugin/index.js +3 -0
- package/libs/CruisePlugin/Controller.js +4 -4
- package/libs/CruisePlugin/index.js +3 -6
- package/libs/CruisePlugin/utils/linerValue.js +4 -4
- package/libs/GuideLinePlugin/Controller.js +3 -4
- package/libs/GuideLinePlugin/index.js +3 -4
- package/libs/GuideLinePlugin/utils/getLineGeometries.js +1 -1
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +34 -32
- package/libs/ItemLabelPlugin/Plugin.js +5 -6
- package/libs/ModelChassisCompassPlugin/Plugin.js +3 -4
- package/libs/ModelChassisCompassPlugin/index.js +2 -0
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +22 -23
- package/libs/ModelEntryDoorGuidePlugin/index.js +2 -0
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +4 -3
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +5 -6
- package/libs/ModelItemLabelPlugin/events.type.js +1 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +11 -10
- package/libs/ModelRoomLabelPlugin/index.js +0 -1
- package/libs/ModelTVVideoPlugin/Plugin.js +1 -2
- package/libs/ModelTVVideoPlugin/index.js +2 -0
- package/libs/ModelViewPlugin/Plugin.js +1 -2
- package/libs/ModelViewPlugin/index.js +2 -0
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +6 -7
- package/libs/Object3DHelperPlugin/index.js +1 -6
- package/libs/PanoCompassPlugin/index.js +3 -4
- package/libs/PanoCursorRaycasterPlugin/index.js +7 -8
- package/libs/PanoDoorLabelPlugin/index.js +1 -2
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +3 -3
- package/libs/PanoMeasurePlugin/Controller/EditController.js +5 -5
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +17 -17
- package/libs/PanoMeasurePlugin/Controller/ViewController.js +3 -3
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +9 -9
- package/libs/PanoMeasurePlugin/Controller/index.js +8 -8
- package/libs/PanoMeasurePlugin/Model/index.js +3 -3
- package/libs/PanoMeasurePlugin/Model/line.js +11 -11
- package/libs/PanoMeasurePlugin/Model/point.js +7 -7
- package/libs/PanoMeasurePlugin/Model/polyline.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +4 -4
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +3 -3
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +30 -30
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +2 -2
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +2 -2
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +3 -3
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +3 -4
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +5 -5
- package/libs/PanoMeasurePlugin/index.js +3 -4
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +1 -1
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +1 -1
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +2 -2
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +3 -3
- package/libs/PanoMeasurePlugin/utils/line.js +0 -1
- package/libs/PanoMeasurePlugin/utils/math.js +1 -2
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +2 -2
- package/libs/PanoRulerPlugin/Plugin.js +2 -3
- package/libs/PanoRulerPlugin/index.js +2 -0
- package/libs/PanoRulerPlugin/style.js +1 -1
- package/libs/PanoRulerProPlugin/Controller.js +15 -15
- package/libs/PanoRulerProPlugin/RulerItems.js +7 -4
- package/libs/PanoRulerProPlugin/index.js +3 -4
- package/libs/PanoSpatialTagPlugin/Components/origins.js +3 -2
- package/libs/PanoSpatialTagPlugin/Components/tag.js +3 -2
- package/libs/PanoSpatialTagPlugin/Plugin.js +2 -3
- package/libs/PanoSpatialTagPlugin/index.js +6 -0
- package/libs/PanoSpatialTagPlugin/typings.js +1 -0
- package/libs/PanoTagPlugin/Components/Common/Line/Polyline.js +1 -1
- package/libs/PanoTagPlugin/Components/Common/Line/Straight.js +1 -1
- package/libs/PanoTagPlugin/Components/Common/Media.js +43 -36
- package/libs/PanoTagPlugin/Components/Common/MultiLineText.js +88 -78
- package/libs/PanoTagPlugin/Components/Common/Point/CustomPoint.js +5 -4
- package/libs/PanoTagPlugin/Components/Common/Point/DefaultPoint.js +3 -2
- package/libs/PanoTagPlugin/Components/Common/Point/PointSwitch.js +30 -27
- package/libs/PanoTagPlugin/Components/Common/TextItem.js +106 -0
- package/libs/PanoTagPlugin/Components/Tag/AudioTag.js +20 -14
- package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +114 -92
- package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +3 -2
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +3 -2
- package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +71 -52
- package/libs/PanoTagPlugin/Components/Tag/TextTag.js +62 -50
- package/libs/PanoTagPlugin/Components/Tag/index.js +92 -63
- package/libs/PanoTagPlugin/Components/TagContainer.js +108 -64
- package/libs/PanoTagPlugin/Components/TagWrapper.js +113 -75
- package/libs/PanoTagPlugin/controller/index.js +0 -1
- package/libs/PanoTagPlugin/index.js +3 -7
- package/libs/PanoTagPlugin/tag.config.js +1 -2
- package/libs/PanoTagPlugin/typings/controller.js +1 -0
- package/libs/PanoTagPlugin/typings/index.js +1 -0
- package/libs/PanoTagPlugin/utils/constants.js +1 -2
- package/libs/PanoTagPlugin/utils/doUtil.js +6 -6
- package/libs/PanoTagPlugin/utils/index.js +1 -0
- package/libs/components/PaintBrush/Controller.js +3 -3
- package/libs/components/PaintBrush/style.js +1 -1
- package/libs/components/PaintBrush/tween.js +4 -4
- package/libs/components/index.js +2 -0
- package/libs/floorplan/Components/Camera.js +1 -1
- package/libs/floorplan/Components/CurrentFloor.js +51 -41
- package/libs/floorplan/Components/Main.js +41 -22
- package/libs/floorplan/Components/RoomHighlight/Room.js +3 -3
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +3 -2
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +37 -36
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +7 -7
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +3 -4
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +7 -7
- package/libs/floorplan/ModelFloorplanPlugin/index.js +2 -3
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +6 -2
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +74 -65
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +2 -2
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +2 -3
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +5 -5
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +3 -4
- package/libs/floorplan/index.js +6 -0
- package/libs/floorplan/typings/floorplanData.js +1 -0
- package/libs/floorplan/utils/correctFiveState.js +19 -19
- package/libs/floorplan/utils/formatData.js +16 -16
- package/libs/floorplan/utils/formatPosition.js +7 -7
- package/libs/index.js +344 -90
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +2 -3
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +1 -3
- package/libs/shared-utils/Object3DHelper/Constants/color.js +0 -1
- package/libs/shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js +1 -2
- package/libs/shared-utils/Object3DHelper/Helper/index.js +3 -0
- package/libs/shared-utils/Object3DHelper/typings/Direction.js +1 -0
- package/libs/shared-utils/Object3DHelper/typings/Hooks.js +1 -0
- package/libs/shared-utils/Object3DHelper/typings/Scissor.js +1 -0
- package/libs/shared-utils/Object3DHelper/typings/index.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/filterNotColinearPoints.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/getPoint.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/index.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/normalPositionToPositions.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/object3DBoundingPosition.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.js +1 -1
- package/libs/shared-utils/animationFrame/index.js +13 -16
- package/libs/shared-utils/animationFrame/tween.js +0 -2
- package/libs/shared-utils/changeModelCanvasOpacity.js +1 -1
- package/libs/shared-utils/createCanvasTextTexture.js +6 -6
- package/libs/shared-utils/createLine/index.js +3 -3
- package/libs/shared-utils/debounce.js +5 -5
- package/libs/shared-utils/equal.js +16 -16
- package/libs/shared-utils/filter.js +1 -1
- package/libs/shared-utils/five/changeMode.js +14 -14
- package/libs/shared-utils/getPxmm.js +7 -8
- package/libs/shared-utils/index.js +33 -29
- package/libs/shared-utils/isTruelyObject.js +1 -1
- package/libs/shared-utils/math/index.js +1 -0
- package/libs/shared-utils/math/planimetry.js +1 -6
- package/libs/shared-utils/math/rad2Deg.js +3 -3
- package/libs/shared-utils/nearlyEqual.js +3 -3
- package/libs/shared-utils/noop.js +1 -1
- package/libs/shared-utils/object3d2LocalMatrix.js +6 -7
- package/libs/shared-utils/removeArrayItem.js +5 -5
- package/libs/shared-utils/tap.js +3 -3
- package/libs/shared-utils/three/index.js +6 -0
- package/libs/shared-utils/three/transformPositionToVector3.js +2 -2
- package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +12 -12
- package/libs/shared-utils/throttle.js +2 -2
- package/libs/shared-utils/tinyEJSrender.js +7 -7
- package/libs/shared-utils/to.js +14 -15
- package/libs/shared-utils/uuid.js +0 -1
- package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/get-changed-params.js +0 -0
- package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/get-params.js +0 -0
- package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/mount-swiper.js +0 -0
- package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/params-list.js +0 -0
- package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/update-swiper.js +0 -0
- package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/utils.js +0 -0
- package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/svelte/swiper-slide.js +1 -1
- package/libs/vendor/swiper/svelte/swiper-svelte.js +3 -0
- package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/svelte/swiper.js +1 -1
- package/package.json +19 -17
- package/dist/index.es.js +0 -16650
- package/dist/index.js +0 -16650
- package/dist/index.umd.js +0 -556
|
@@ -0,0 +1,532 @@
|
|
|
1
|
+
var U = Object.defineProperty;
|
|
2
|
+
var j = (o, n, t) => n in o ? U(o, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[n] = t;
|
|
3
|
+
var g = (o, n, t) => (j(o, typeof n != "symbol" ? n + "" : n, t), t);
|
|
4
|
+
import { Tween as W, Easing as $ } from "@tweenjs/tween.js";
|
|
5
|
+
import { uuid as q } from "./uuid.676cb2c8.es.js";
|
|
6
|
+
function H() {
|
|
7
|
+
}
|
|
8
|
+
const L = () => Promise.resolve(), k = {
|
|
9
|
+
__queue: Promise.resolve()
|
|
10
|
+
};
|
|
11
|
+
function M(o = L) {
|
|
12
|
+
k.__queue = k.__queue.then(o).catch(L);
|
|
13
|
+
}
|
|
14
|
+
function C(o, n, t) {
|
|
15
|
+
const e = o.x, s = o.y, i = Math.floor(e / n * 1e4) / 1e4, c = Math.floor(s / t * 1e4) / 1e4;
|
|
16
|
+
return { x: i, y: c };
|
|
17
|
+
}
|
|
18
|
+
function N(o, n, t) {
|
|
19
|
+
const { x: e, y: s } = o, i = e * n, c = s * t;
|
|
20
|
+
return { x: i, y: c };
|
|
21
|
+
}
|
|
22
|
+
function b(o) {
|
|
23
|
+
if (o.length < 2)
|
|
24
|
+
return {};
|
|
25
|
+
const n = o.slice(-2), t = n[0], e = {
|
|
26
|
+
x: (n[0].x + n[1].x) / 2,
|
|
27
|
+
y: (n[0].y + n[1].y) / 2
|
|
28
|
+
};
|
|
29
|
+
return { control: t, end: e };
|
|
30
|
+
}
|
|
31
|
+
function O(o, n, t = H) {
|
|
32
|
+
new Promise((e) => {
|
|
33
|
+
setTimeout(() => {
|
|
34
|
+
t(), e(!0);
|
|
35
|
+
}, n * o);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
const I = window, S = window.requestAnimationFrame || I.webkitRequestAnimationFrame || ((o) => setTimeout(o, 16));
|
|
39
|
+
function E(o, n = 0) {
|
|
40
|
+
n <= 0 ? S(o) : S(() => E(o, n - 1));
|
|
41
|
+
}
|
|
42
|
+
function A(o, n, t, e = $.Linear.None) {
|
|
43
|
+
const s = new W(o).to(n, t).easing(e).start();
|
|
44
|
+
function i(c) {
|
|
45
|
+
!s.update(c) || requestAnimationFrame(i);
|
|
46
|
+
}
|
|
47
|
+
return requestAnimationFrame(i), s;
|
|
48
|
+
}
|
|
49
|
+
var m = /* @__PURE__ */ ((o) => (o.Drawline = "Drawline", o.Undo = "Undo", o.Exit = "Exit", o))(m || {});
|
|
50
|
+
const w = Symbol("$$PAINT_BRUSH_EVENT$$");
|
|
51
|
+
function B(o) {
|
|
52
|
+
return o[w] || (o[w] = {}), o[w];
|
|
53
|
+
}
|
|
54
|
+
function F(o) {
|
|
55
|
+
o[w] || delete o[w];
|
|
56
|
+
}
|
|
57
|
+
class P {
|
|
58
|
+
hasListener(n) {
|
|
59
|
+
const t = B(this);
|
|
60
|
+
return t && t[n] && t[n].length > 0;
|
|
61
|
+
}
|
|
62
|
+
on(n, t, e) {
|
|
63
|
+
const s = B(this);
|
|
64
|
+
return s[n] || (s[n] = []), s[n].push([t, e || !1]), () => this.off(n, t);
|
|
65
|
+
}
|
|
66
|
+
once(n, t) {
|
|
67
|
+
return this.on(n, t, !0);
|
|
68
|
+
}
|
|
69
|
+
off(n, t) {
|
|
70
|
+
if (n === void 0) {
|
|
71
|
+
F(this);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const e = B(this);
|
|
75
|
+
if (e[n] || (e[n] = []), t === void 0) {
|
|
76
|
+
e[n].length = 0;
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
let s = 0;
|
|
80
|
+
for (; s < e[n].length && e[n][s][0] !== t; s++)
|
|
81
|
+
;
|
|
82
|
+
s < e[n].length && e[n].splice(s, 1);
|
|
83
|
+
}
|
|
84
|
+
emit(n, ...t) {
|
|
85
|
+
let e = !1;
|
|
86
|
+
const i = B(this)[n] || [];
|
|
87
|
+
for (let c of i.slice()) {
|
|
88
|
+
const [r, u = !1] = c, f = r(...t);
|
|
89
|
+
u && this.off(n, r), f === !1 && (e = !0);
|
|
90
|
+
}
|
|
91
|
+
return e;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
const R = `
|
|
95
|
+
<style type="text/css">
|
|
96
|
+
|
|
97
|
+
#_gl_paintBrush {
|
|
98
|
+
position: fixed;
|
|
99
|
+
top: 0;
|
|
100
|
+
bottom: 0;
|
|
101
|
+
left: 0;
|
|
102
|
+
right: 0;
|
|
103
|
+
transform: translateZ(0);
|
|
104
|
+
z-index: 1997;
|
|
105
|
+
pointer-events: none;
|
|
106
|
+
opacity: 0;
|
|
107
|
+
transition: all 500ms;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
#_gl_paintBrush.brushing {
|
|
111
|
+
opacity: 1;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
#_gl_paintBrush ._paintBrush-canvas {
|
|
115
|
+
position: absolute;
|
|
116
|
+
width: 100%;
|
|
117
|
+
height: 100%;
|
|
118
|
+
left: 0;
|
|
119
|
+
top: 0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
#_gl_paintBrush ._paintBrush-canvas--sync {
|
|
123
|
+
pointer-events: none;
|
|
124
|
+
z-index: 0;
|
|
125
|
+
position: absolute;
|
|
126
|
+
width: 100%;
|
|
127
|
+
height: 100%;
|
|
128
|
+
left: 0;
|
|
129
|
+
top: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
#_gl_paintBrush ._paintBrush-canvas {
|
|
133
|
+
pointer-events: none;
|
|
134
|
+
z-index: 1;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
#_gl_paintBrush.brushing ._paintBrush-canvas {
|
|
138
|
+
pointer-events: auto;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
#_gl_paintBrush ._paintBrush-ctrl {
|
|
142
|
+
width: 140px;
|
|
143
|
+
height: 52px;
|
|
144
|
+
position: absolute;
|
|
145
|
+
bottom: 28px;
|
|
146
|
+
right: 50%;
|
|
147
|
+
transform: translateX(50%);
|
|
148
|
+
font-size: 10px;
|
|
149
|
+
color: white;
|
|
150
|
+
z-index: 2;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
#_gl_paintBrush.brushing ._paintBrush-ctrl {
|
|
154
|
+
pointer-events: auto;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
#_gl_paintBrush ._paintBrush-ctrl ._paintBrush-ctrlinner {
|
|
158
|
+
display: flex;
|
|
159
|
+
justify-content: space-between;
|
|
160
|
+
align-items: center;
|
|
161
|
+
width: 100%;
|
|
162
|
+
height: 100%;
|
|
163
|
+
border-radius: 26px;
|
|
164
|
+
padding: 8px 16px;
|
|
165
|
+
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.2);
|
|
166
|
+
background-image: linear-gradient(180deg, hsl(0deg 0% 0% / 57%), hsl(0deg 0% 0% / 70%) 117%);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
._paintBrush-ctrlitem {
|
|
170
|
+
display: flex;
|
|
171
|
+
flex-direction: column;
|
|
172
|
+
justify-content: center;
|
|
173
|
+
align-items: center;
|
|
174
|
+
width: 38px;
|
|
175
|
+
height: 38px;
|
|
176
|
+
cursor: pointer;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
._paintBrush-ctrlitem--undo >.brush-icon{
|
|
180
|
+
background-image: url("//vrlab-static.ljcdn.com/release/web/revoke.ab7694ef.svg");
|
|
181
|
+
background-size: 100%;
|
|
182
|
+
width: 22px;
|
|
183
|
+
height: 22px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
._paintBrush-ctrlitem--close >.brush-icon {
|
|
187
|
+
background-image: url("//vrlab-static.ljcdn.com/release/web/exit_paintbrush.02bc1341.svg");
|
|
188
|
+
background-size: 100%;
|
|
189
|
+
width: 22px;
|
|
190
|
+
height: 22px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
</style>
|
|
194
|
+
`;
|
|
195
|
+
class z extends P {
|
|
196
|
+
constructor(t) {
|
|
197
|
+
super();
|
|
198
|
+
g(this, "configs");
|
|
199
|
+
g(this, "clientWidth");
|
|
200
|
+
g(this, "clientHeight");
|
|
201
|
+
g(this, "ready", !1);
|
|
202
|
+
g(this, "uuid", q());
|
|
203
|
+
g(this, "tween");
|
|
204
|
+
g(this, "tweening", !1);
|
|
205
|
+
g(this, "container");
|
|
206
|
+
g(this, "canvas");
|
|
207
|
+
g(this, "data", {});
|
|
208
|
+
g(this, "tempLine", {});
|
|
209
|
+
this.configs = t, this.clientWidth = document.body.clientWidth, this.clientHeight = document.body.clientHeight, this.container = this.ifInsertToDOM(), this.canvas = {}, this.initCtrl();
|
|
210
|
+
}
|
|
211
|
+
get color() {
|
|
212
|
+
return this.configs.currentColor;
|
|
213
|
+
}
|
|
214
|
+
get state() {
|
|
215
|
+
return this.data;
|
|
216
|
+
}
|
|
217
|
+
get dpr() {
|
|
218
|
+
return this.configs.DPR || 1;
|
|
219
|
+
}
|
|
220
|
+
ifInsertToDOM() {
|
|
221
|
+
if (this.container)
|
|
222
|
+
return this.container;
|
|
223
|
+
if (this.configs.container)
|
|
224
|
+
this.configs.container.id = "_gl_paintBrush", this.container = this.configs.container;
|
|
225
|
+
else if (document.getElementById("_gl_paintBrush"))
|
|
226
|
+
this.container = document.getElementById("_gl_paintBrush");
|
|
227
|
+
else {
|
|
228
|
+
const t = document.createElement("div");
|
|
229
|
+
t.id = "_gl_paintBrush", document.body.appendChild(t), this.container = t;
|
|
230
|
+
}
|
|
231
|
+
return this.container.innerHTML = R, this.container;
|
|
232
|
+
}
|
|
233
|
+
initCanvas(t) {
|
|
234
|
+
const e = document.createElement("canvas");
|
|
235
|
+
e.className = t, e.width = this.clientWidth, e.height = this.clientHeight;
|
|
236
|
+
const s = e.getContext("2d");
|
|
237
|
+
if (!!s)
|
|
238
|
+
return s.lineWidth = 5 * this.dpr, s.lineCap = "round", s.lineJoin = "round", this.container.appendChild(e), e;
|
|
239
|
+
}
|
|
240
|
+
initCtrl() {
|
|
241
|
+
const t = document.createElement("div");
|
|
242
|
+
t.className = "_paintBrush-ctrl";
|
|
243
|
+
const e = document.createElement("div");
|
|
244
|
+
e.className = "_paintBrush-ctrlinner";
|
|
245
|
+
const s = document.createElement("a");
|
|
246
|
+
s.className = "_paintBrush-ctrlitem _paintBrush-ctrlitem--undo", s.addEventListener("click", (r) => {
|
|
247
|
+
var h;
|
|
248
|
+
if (r.stopPropagation(), this.configs.onClickUndo && this.configs.onClickUndo(), !this.canvas[this.uuid] || !this.data[this.uuid] || this.data[this.uuid].length === 0)
|
|
249
|
+
return;
|
|
250
|
+
const u = this.data[this.uuid].pop();
|
|
251
|
+
u && this.emitStateChange({
|
|
252
|
+
type: m.Undo,
|
|
253
|
+
color: this.color,
|
|
254
|
+
ready: this.ready,
|
|
255
|
+
state: u,
|
|
256
|
+
uuid: this.uuid
|
|
257
|
+
});
|
|
258
|
+
const f = (h = this.canvas[this.uuid]) == null ? void 0 : h.getContext("2d");
|
|
259
|
+
if (!this.canvas[this.uuid])
|
|
260
|
+
return;
|
|
261
|
+
const { width: v, height: l } = this.canvas[this.uuid];
|
|
262
|
+
f && f.clearRect(0, 0, v, l), this.data[this.uuid].forEach((a) => this.handleDrawLine(this.uuid, a, { withUndo: !0 }));
|
|
263
|
+
});
|
|
264
|
+
const i = document.createElement("a");
|
|
265
|
+
return i.className = "_paintBrush-ctrlitem _paintBrush-ctrlitem--close", i.addEventListener("click", (r) => {
|
|
266
|
+
r.stopPropagation(), this.closeBrush(), this.configs.onClickClose && this.configs.onClickClose();
|
|
267
|
+
}), [s, i].forEach((r) => {
|
|
268
|
+
const u = document.createElement("i");
|
|
269
|
+
u.className = "brush-icon";
|
|
270
|
+
const f = document.createElement("span");
|
|
271
|
+
f.className = "brush-txt", f.innerText = r.className.endsWith("undo") ? this.configs.onUndoText : this.configs.onExitText, r.appendChild(u), r.appendChild(f);
|
|
272
|
+
}), e.appendChild(s), e.appendChild(i), t.appendChild(e), this.container.appendChild(t), t;
|
|
273
|
+
}
|
|
274
|
+
openBrush() {
|
|
275
|
+
if (this.ready)
|
|
276
|
+
return;
|
|
277
|
+
this.canvas[this.uuid] || (this.canvas[this.uuid] = this.initCanvas("_paintBrush-canvas")), this.container.className = "brushing";
|
|
278
|
+
const t = this.canvas[this.uuid];
|
|
279
|
+
t.getContext("2d").clearRect(0, 0, t.width, t.height), this.openBrushHandle(), this.ready = !0, this.emit("readyChange", !0);
|
|
280
|
+
}
|
|
281
|
+
closeBrush() {
|
|
282
|
+
!this.ready || (this.container.className = "", this.data = {}, this.tempLine = {}, Object.keys(this.canvas).forEach((t) => {
|
|
283
|
+
this.canvas[t].ontouchstart = () => !1, this.canvas[t].ontouchmove = () => !1, this.canvas[t].ontouchend = () => !1, this.canvas[t].ontouchcancel = () => !1;
|
|
284
|
+
const e = this.canvas[t].getContext("2d");
|
|
285
|
+
e && e.clearRect(0, 0, this.canvas[t].width, this.canvas[t].height);
|
|
286
|
+
}), this.ready = !1, this.emit("readyChange", !1), this.emitStateChange({
|
|
287
|
+
type: m.Exit,
|
|
288
|
+
color: this.color,
|
|
289
|
+
ready: !1,
|
|
290
|
+
uuid: this.uuid
|
|
291
|
+
}));
|
|
292
|
+
}
|
|
293
|
+
updateCurrentColor(t) {
|
|
294
|
+
const e = this.canvas[this.uuid];
|
|
295
|
+
if (!e)
|
|
296
|
+
return;
|
|
297
|
+
const s = e.getContext("2d");
|
|
298
|
+
!s || (this.configs.currentColor = t, s.strokeStyle = t);
|
|
299
|
+
}
|
|
300
|
+
openBrushHandle() {
|
|
301
|
+
const t = this.canvas[this.uuid];
|
|
302
|
+
if (!t)
|
|
303
|
+
return;
|
|
304
|
+
const e = t.getContext("2d");
|
|
305
|
+
if (!e)
|
|
306
|
+
return;
|
|
307
|
+
const s = this.color || "#6D92FF";
|
|
308
|
+
e.strokeStyle = s;
|
|
309
|
+
let i = null, c = [], r, u = [], f = 0;
|
|
310
|
+
const v = (l, h, a) => {
|
|
311
|
+
const p = this.color || "#ff0000";
|
|
312
|
+
e.strokeStyle = p, e.beginPath(), e.moveTo(l.x, l.y), e.quadraticCurveTo(h.x, h.y, a.x, a.y), e.stroke();
|
|
313
|
+
};
|
|
314
|
+
t.onmousedown = (l) => {
|
|
315
|
+
l.preventDefault(), f = Date.now();
|
|
316
|
+
const h = l.clientX, a = l.clientY;
|
|
317
|
+
c = [], c.push({ x: h, y: a }), i = { x: h, y: a }, r = C({ x: h, y: a }, this.clientWidth, this.clientHeight), u = [];
|
|
318
|
+
}, t.onmousemove = (l) => {
|
|
319
|
+
if (l.preventDefault(), !i)
|
|
320
|
+
return;
|
|
321
|
+
const h = Number(l.clientX), a = Number(l.clientY);
|
|
322
|
+
if (Math.abs(h - i.x) < 5 && Math.abs(a - i.y) < 5 || (c.push({ x: h, y: a }), u.push(C({ x: h, y: a }, this.clientWidth, this.clientHeight)), c.length < 3))
|
|
323
|
+
return;
|
|
324
|
+
const { control: p, end: d } = b(c);
|
|
325
|
+
!p || !d || (v(i, p, d), i = d);
|
|
326
|
+
}, t.onmouseup = (l) => {
|
|
327
|
+
if (l.preventDefault(), i = null, c.length < 3)
|
|
328
|
+
return;
|
|
329
|
+
this.data[this.uuid] || (this.data[this.uuid] = []);
|
|
330
|
+
const h = Date.now() - f, a = {
|
|
331
|
+
move: Object.assign({}, r),
|
|
332
|
+
uuid: this.uuid,
|
|
333
|
+
line: [...u],
|
|
334
|
+
color: this.color,
|
|
335
|
+
duration: h < 1280 ? h : h < 2e3 ? 1280 : 0
|
|
336
|
+
};
|
|
337
|
+
this.data[this.uuid].push(a), E(() => {
|
|
338
|
+
this.emitStateChange({
|
|
339
|
+
type: m.Drawline,
|
|
340
|
+
color: this.color,
|
|
341
|
+
ready: this.ready,
|
|
342
|
+
state: a,
|
|
343
|
+
uuid: this.uuid
|
|
344
|
+
});
|
|
345
|
+
});
|
|
346
|
+
}, t.ontouchstart = (l) => {
|
|
347
|
+
l.preventDefault(), f = Date.now();
|
|
348
|
+
const h = l.touches[0].clientX, a = l.touches[0].clientY;
|
|
349
|
+
c = [], c.push({ x: h, y: a }), i = { x: h, y: a }, console.log("ontouchstart", h, a, i), r = C({ x: h, y: a }, this.clientWidth, this.clientHeight), u = [];
|
|
350
|
+
}, t.ontouchmove = (l) => {
|
|
351
|
+
if (l.preventDefault(), !i)
|
|
352
|
+
return;
|
|
353
|
+
const h = Number(l.touches[0].clientX), a = Number(l.touches[0].clientY);
|
|
354
|
+
if (Math.abs(h - i.x) < 5 && Math.abs(a - i.y) < 5 || (c.push({ x: h, y: a }), u.push(C({ x: h, y: a }, this.clientWidth, this.clientHeight)), c.length < 3))
|
|
355
|
+
return;
|
|
356
|
+
const { control: p, end: d } = b(c);
|
|
357
|
+
!p || !d || (v(i, p, d), i = d);
|
|
358
|
+
}, t.ontouchend = t.ontouchcancel = (l) => {
|
|
359
|
+
if (l.preventDefault(), i = null, c.length < 3)
|
|
360
|
+
return;
|
|
361
|
+
this.data[this.uuid] || (this.data[this.uuid] = []);
|
|
362
|
+
const h = Date.now() - f, a = {
|
|
363
|
+
move: Object.assign({}, r),
|
|
364
|
+
line: [...u],
|
|
365
|
+
uuid: this.uuid,
|
|
366
|
+
color: this.color,
|
|
367
|
+
duration: h < 1280 ? h : h < 2e3 ? 1280 : 0
|
|
368
|
+
};
|
|
369
|
+
this.data[this.uuid].push(a), E(() => {
|
|
370
|
+
this.emitStateChange({
|
|
371
|
+
type: m.Drawline,
|
|
372
|
+
color: this.color,
|
|
373
|
+
ready: this.ready,
|
|
374
|
+
state: a,
|
|
375
|
+
uuid: this.uuid
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
emitStateChange(t, e = !0) {
|
|
381
|
+
if (t.type !== m.Drawline) {
|
|
382
|
+
this.emit("stateChange", t, e);
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
const s = Date.now(), i = t.state;
|
|
386
|
+
if (!i || !i.line)
|
|
387
|
+
return;
|
|
388
|
+
const c = Math.ceil(i.line.length / 100);
|
|
389
|
+
for (let r = 0; r < c; r++) {
|
|
390
|
+
const u = {
|
|
391
|
+
uuid: this.uuid,
|
|
392
|
+
color: this.color,
|
|
393
|
+
ready: this.ready,
|
|
394
|
+
type: t.type,
|
|
395
|
+
state: {
|
|
396
|
+
uuid: this.uuid,
|
|
397
|
+
move: i.move,
|
|
398
|
+
duration: i.duration,
|
|
399
|
+
color: this.color,
|
|
400
|
+
line: i.line.slice(r * 100, (r + 1) * 100)
|
|
401
|
+
},
|
|
402
|
+
timestamp: s,
|
|
403
|
+
end: r === c - 1
|
|
404
|
+
};
|
|
405
|
+
O(r, 20, () => {
|
|
406
|
+
this.emit("stateChange", u, e);
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
action(t) {
|
|
411
|
+
const { ready: e, type: s, uuid: i } = t;
|
|
412
|
+
if (!e && this.ready) {
|
|
413
|
+
this.closeBrush();
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
if (e && !this.ready) {
|
|
417
|
+
this.openBrush();
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
if (!!this.ready)
|
|
421
|
+
switch (s) {
|
|
422
|
+
case m.Drawline:
|
|
423
|
+
const { state: c, timestamp: r, end: u } = t;
|
|
424
|
+
if (!r || !c)
|
|
425
|
+
return;
|
|
426
|
+
this.tempLine[r] = [].concat(this.tempLine[r] || [], c.line), u && (Object.assign(c, { line: this.tempLine[r] }), this.handleDrawLine(i, c, {}, () => delete this.tempLine[r]));
|
|
427
|
+
break;
|
|
428
|
+
case m.Undo:
|
|
429
|
+
this.handleUndo(i);
|
|
430
|
+
break;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
handleDrawLine(t, e, { withUndo: s = !1 }, i = H) {
|
|
434
|
+
!e || Object.prototype.toString.call(e) != "[object Object]" || Object.keys(e).length === 0 || (console.log("handleDrawLine", e, e.line), M(() => new Promise((c) => {
|
|
435
|
+
if (s || (this.canvas[t] || (this.canvas[t] = this.initCanvas("_paintBrush-canvas--sync")), this.data[t] || (this.data[t] = []), this.data[t].push(e)), !this.canvas[t])
|
|
436
|
+
return;
|
|
437
|
+
const r = this.canvas[t].getContext("2d");
|
|
438
|
+
if (!r)
|
|
439
|
+
return;
|
|
440
|
+
const { line: u = [], color: f = "black", duration: v = 0, uuid: l } = e, h = N(e.move || {}, this.clientWidth, this.clientHeight);
|
|
441
|
+
let a = [h];
|
|
442
|
+
if (r.strokeStyle = f, r.beginPath(), r.moveTo(h.x, h.y), v && !s) {
|
|
443
|
+
let p = [];
|
|
444
|
+
const d = this;
|
|
445
|
+
d.tween = A({ step: 0 }, { step: u.length - 1 }, v).onUpdate(({ step: x }) => {
|
|
446
|
+
var T;
|
|
447
|
+
if (d.tweening = !0, !d.ready)
|
|
448
|
+
return r.clearRect(0, 0, d.canvas[l].width, d.canvas[l].height), (T = d.tween) == null ? void 0 : T.stop();
|
|
449
|
+
const y = Math.floor(x);
|
|
450
|
+
if (!p.find((_) => _ === y)) {
|
|
451
|
+
if (p.push(y), console.log("__debug__", u, u[y], y), a.push(N(u[y], d.clientWidth, d.clientHeight)), a.length < 3)
|
|
452
|
+
return;
|
|
453
|
+
const { control: _, end: D } = b(a);
|
|
454
|
+
if (!_ || !D)
|
|
455
|
+
return;
|
|
456
|
+
r.quadraticCurveTo(_.x, _.y, D.x, D.y), r.stroke();
|
|
457
|
+
}
|
|
458
|
+
}).onComplete((x) => {
|
|
459
|
+
d.tween = void 0, d.tweening = !1, p = [], a = [], i && i(), c();
|
|
460
|
+
});
|
|
461
|
+
} else {
|
|
462
|
+
for (let p = 0; p < u.length; p++) {
|
|
463
|
+
if (a.push(N(u[p], this.clientWidth, this.clientHeight)), a.length < 3)
|
|
464
|
+
continue;
|
|
465
|
+
const { control: d, end: x } = b(a);
|
|
466
|
+
!d || !x || r.quadraticCurveTo(d.x, d.y, x.x, x.y);
|
|
467
|
+
}
|
|
468
|
+
r.stroke(), a = [], i && i(), c();
|
|
469
|
+
}
|
|
470
|
+
})));
|
|
471
|
+
}
|
|
472
|
+
handleUndo(t) {
|
|
473
|
+
if (console.log("handleUndo", t, this.canvas[t]), !this.canvas[t] || !this.data[t] || this.data[t].length === 0)
|
|
474
|
+
return;
|
|
475
|
+
this.data[t].pop();
|
|
476
|
+
const e = () => {
|
|
477
|
+
var i;
|
|
478
|
+
const s = (i = this.canvas[t]) == null ? void 0 : i.getContext("2d");
|
|
479
|
+
s && s.clearRect(0, 0, this.canvas[t].width, this.canvas[t].height), this.data[t].forEach((c) => this.handleDrawLine(t, c, { withUndo: !0 }));
|
|
480
|
+
};
|
|
481
|
+
if (this.tween && this.tweening) {
|
|
482
|
+
this.tween.stop(), E(e, 60);
|
|
483
|
+
return;
|
|
484
|
+
}
|
|
485
|
+
e();
|
|
486
|
+
}
|
|
487
|
+
destroyBrush() {
|
|
488
|
+
this.closeBrush(), this.ready = !1, this.emit("readyChange", !0);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
class J {
|
|
492
|
+
constructor(n = {}) {
|
|
493
|
+
g(this, "controller");
|
|
494
|
+
const t = Object.assign({
|
|
495
|
+
currentColor: "#f44336",
|
|
496
|
+
onUndoText: "\u56DE\u9000",
|
|
497
|
+
onExitText: "\u5173\u95ED"
|
|
498
|
+
}, n);
|
|
499
|
+
this.controller = new z(t);
|
|
500
|
+
}
|
|
501
|
+
on(n, t) {
|
|
502
|
+
this.controller.on(n, t);
|
|
503
|
+
}
|
|
504
|
+
off(n, t) {
|
|
505
|
+
this.controller.off(n, t);
|
|
506
|
+
}
|
|
507
|
+
once(n, t) {
|
|
508
|
+
this.controller.once(n, t);
|
|
509
|
+
}
|
|
510
|
+
show() {
|
|
511
|
+
this.controller.openBrush();
|
|
512
|
+
}
|
|
513
|
+
action(n) {
|
|
514
|
+
this.controller.action(n);
|
|
515
|
+
}
|
|
516
|
+
get state() {
|
|
517
|
+
return this.controller.state;
|
|
518
|
+
}
|
|
519
|
+
get configs() {
|
|
520
|
+
return this.controller.configs;
|
|
521
|
+
}
|
|
522
|
+
dispose() {
|
|
523
|
+
return this.controller.destroyBrush();
|
|
524
|
+
}
|
|
525
|
+
setCurrentColor(n) {
|
|
526
|
+
this.controller.updateCurrentColor(n);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
export {
|
|
530
|
+
J as PaintBrush,
|
|
531
|
+
m as PaintBrushTypeEnum
|
|
532
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var c = (t, i, e) => i in t ? p(t, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[i] = e;
|
|
3
|
+
var s = (t, i, e) => (c(t, typeof i != "symbol" ? i + "" : i, e), e);
|
|
4
|
+
import m from "@tweenjs/tween.js";
|
|
5
|
+
class h extends m.Tween {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
s(this, "disposeMethods", []);
|
|
9
|
+
s(this, "animationFrameDisposer");
|
|
10
|
+
s(this, "onDispose", (e) => (this.disposeMethods.push(e), this));
|
|
11
|
+
s(this, "play", () => (this.start(0), this.animationFrameDisposer = w((e) => this.update(e)), this));
|
|
12
|
+
s(this, "dispose", () => {
|
|
13
|
+
var e;
|
|
14
|
+
this.stop(), (e = this.animationFrameDisposer) == null || e.call(this), this.disposeMethods.forEach((r) => r()), this.disposeMethods = [], m.remove(this);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function g(t, i = m.Easing.Linear.None) {
|
|
19
|
+
const e = new h({ progress: 0 }).to({ progress: 1 });
|
|
20
|
+
return t !== void 0 && e.duration(t), i !== void 0 && e.easing(i), e;
|
|
21
|
+
}
|
|
22
|
+
const o = window.requestAnimationFrame || ((t) => setTimeout(t, 16)), l = window.cancelAnimationFrame || clearTimeout;
|
|
23
|
+
function f(t, i = 0) {
|
|
24
|
+
i <= 0 ? o(t) : o(() => f(t, i - 1));
|
|
25
|
+
}
|
|
26
|
+
function w(t, i = 60) {
|
|
27
|
+
let e = -1, r = 0, a = -1;
|
|
28
|
+
const d = 1e3 / i;
|
|
29
|
+
function u(n) {
|
|
30
|
+
a === -1 && (a = n), e = o(u), !(n - r < d) && (r = n, t && t(n - a));
|
|
31
|
+
}
|
|
32
|
+
return e = o(u), function() {
|
|
33
|
+
l(e);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function A() {
|
|
37
|
+
const t = Date.now();
|
|
38
|
+
return new Promise((i) => {
|
|
39
|
+
o(() => {
|
|
40
|
+
i(Date.now() - t);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
h as BetterTween,
|
|
46
|
+
A as getFrameTime,
|
|
47
|
+
f as nextFrame,
|
|
48
|
+
w as requestAnimationFrameInterval,
|
|
49
|
+
g as tweenProgress
|
|
50
|
+
};
|