@realsee/dnalogel 2.16.0-10 → 2.16.0-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/components/index.js +688 -240
- package/dist/GuideLinePlugin/Controller.d.ts +4 -3
- package/dist/GuideLinePlugin/GuideLineModeItem.d.ts +6 -0
- package/dist/GuideLinePlugin/typing.d.ts +0 -1
- package/dist/index.cjs.js +100 -86
- package/dist/index.js +14560 -7717
- package/dist/index.umd.js +93 -79
- package/dist/shared-utils/animationFrame/BetterTween.d.ts +3 -2
- package/dist/shared-utils/animationFrame/index.d.ts +1 -1
- package/dist/shared-utils/animationFrame/tween.d.ts +32 -23
- package/dist/shared-utils/svelte/resizeObserver.d.ts +2 -10
- package/dist/shared-utils/svelte/resizeObserverGlobal.d.ts +10 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +31 -31
- package/docs/classes/CruisePluginController.html +26 -26
- package/docs/classes/GuideLineItem.GuideLineItem.html +16 -16
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +38 -26
- package/docs/classes/Magnifier.html +20 -20
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +25 -25
- 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 +47 -47
- package/docs/classes/Util.BetterTween.html +29 -18
- 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 +19 -19
- 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/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/PanoVideoPlugin.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.isAbsoluteURL.html +5 -5
- package/docs/functions/Util.isModelLike.html +5 -5
- package/docs/functions/Util.isNil.html +5 -5
- package/docs/functions/Util.isPanoramaLike.html +5 -5
- package/docs/functions/Util.nextFrame.html +18 -7
- package/docs/functions/Util.notNil.html +5 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
- package/docs/functions/Util.tweenProgress.html +7 -18
- package/docs/functions/Util.uuid.html +5 -5
- package/docs/functions/pluginFlag.html +5 -5
- package/docs/index.html +4 -4
- package/docs/interfaces/AddTagConfig.html +6 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/CruisePluginTypes.Config.html +8 -8
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +12 -12
- package/docs/interfaces/CruisePluginTypes.EventMap.html +20 -20
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +12 -12
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +14 -14
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +14 -14
- package/docs/interfaces/CruisePluginTypes.PluginData.html +9 -9
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +7 -7
- package/docs/interfaces/CruisePluginTypes.PluginState.html +11 -11
- 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/GuideLinePluginType.CatmullRomCurve3.html +10 -10
- package/docs/interfaces/GuideLinePluginType.EventMap.html +13 -13
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +8 -8
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +6 -6
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +11 -11
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +8 -8
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +16 -16
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTag.html +19 -19
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +16 -16
- package/docs/interfaces/GuideLinePluginType.PluginDataV1.html +7 -7
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +6 -6
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +7 -7
- package/docs/interfaces/GuideLinePluginType.PluginState.html +8 -15
- package/docs/interfaces/GuideLinePluginType.Route.html +10 -10
- package/docs/interfaces/GuideLinePluginType.RouteConfig.html +9 -9
- package/docs/interfaces/HelperOffset.html +8 -8
- package/docs/interfaces/ImagePlaneGroup.html +6 -6
- 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 +14 -14
- 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/PanoVideoPluginType.LoadParams.html +6 -6
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +8 -8
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +6 -6
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +9 -9
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +6 -6
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +8 -8
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.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/TagCacheInterface.html +12 -12
- package/docs/interfaces/TagConfig.html +11 -11
- package/docs/interfaces/TagGLTFObjectGroup.html +6 -6
- package/docs/interfaces/TagIconUrl.html +12 -12
- package/docs/interfaces/TagObjectGroup.html +6 -6
- package/docs/interfaces/TagStyle.html +6 -6
- 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/CruisePluginTypes.html +5 -5
- package/docs/modules/GuideLineItem.html +5 -5
- package/docs/modules/GuideLineModeItem.html +5 -5
- package/docs/modules/GuideLinePluginType.html +5 -5
- package/docs/modules/PanoVideoPluginType.html +5 -5
- 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/CruisePluginTypes.CruiseData.html +5 -5
- package/docs/types/CruisePluginTypes.MoveEffect.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/GuideLinePluginType.GuideLineItem.html +5 -5
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +5 -5
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +5 -5
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +5 -5
- package/docs/types/GuideLinePluginType.PathItem.html +5 -5
- package/docs/types/GuideLinePluginType.PluginData.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/PanoVideoPluginParameterType.html +5 -5
- package/docs/types/PanoVideoPluginReturnType.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/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/itemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
- package/libs/CSS3DRenderPlugin/Controller.js +47 -13
- package/libs/CSS3DRenderPlugin/index.js +6 -8
- package/libs/CSS3DRenderPlugin/utils/even.js +1 -1
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +3 -0
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +37 -2
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRenderer.js +1 -1
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +22 -18
- package/libs/CameraMovementPlugin/index.js +7 -9
- package/libs/CruisePlugin/Controller.js +161 -52
- package/libs/CruisePlugin/index.js +36 -30
- package/libs/CruisePlugin/utils/coordinatesToVector.js +3 -0
- package/libs/GuideLinePlugin/Components/Tag.js +14 -2
- package/libs/GuideLinePlugin/Controller.d.ts +4 -3
- package/libs/GuideLinePlugin/Controller.js +119 -100
- package/libs/GuideLinePlugin/GuideLineItem/index.js +6 -6
- package/libs/GuideLinePlugin/GuideLineItem.js +29 -22
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +129 -73
- package/libs/GuideLinePlugin/GuideLineModeItem.d.ts +6 -0
- package/libs/GuideLinePlugin/GuideLineModeItem.js +28 -21
- package/libs/GuideLinePlugin/index.js +37 -30
- package/libs/GuideLinePlugin/typing.d.ts +0 -1
- package/libs/GuideLinePlugin/typing.js +7 -9
- package/libs/GuideLinePlugin/utils/createLineGeometry.js +24 -18
- package/libs/GuideLinePlugin/utils/getPoint.js +4 -0
- package/libs/GuideLinePlugin/utils/index.js +17 -14
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +83 -34
- package/libs/ItemLabelPlugin/ItemLabelItem.js +91 -14
- package/libs/ItemLabelPlugin/Plugin.js +2 -2
- package/libs/ItemLabelPlugin/index.js +8 -9
- package/libs/ModelChassisCompassPlugin/Plugin.js +25 -25
- package/libs/ModelChassisCompassPlugin/index.js +3 -4
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +14 -14
- package/libs/ModelEntryDoorGuidePlugin/index.js +3 -4
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +46 -10
- package/libs/ModelItemLabelPlugin/ItemLabelItem.js +60 -7
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +3 -3
- package/libs/ModelItemLabelPlugin/index.js +6 -7
- package/libs/ModelRoomLabelPlugin/Controller.js +18 -1
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +58 -4
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +50 -20
- package/libs/ModelTVVideoPlugin/Plugin.js +6 -8
- package/libs/ModelTVVideoPlugin/index.js +6 -9
- package/libs/ModelViewPlugin/Plugin.js +3 -3
- package/libs/ModelViewPlugin/index.js +3 -4
- package/libs/Object3DHelperPlugin/Controller.js +62 -42
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +2 -1
- package/libs/Object3DHelperPlugin/index.js +7 -9
- package/libs/PanoCompassPlugin/Controller.js +54 -4
- package/libs/PanoCompassPlugin/getRoomInfoInstance.js +1 -1
- package/libs/PanoCompassPlugin/index.js +3 -3
- package/libs/PanoDoorLabelPlugin/BaseController.js +37 -12
- package/libs/PanoDoorLabelPlugin/Controller.js +9 -6
- package/libs/PanoDoorLabelPlugin/DoorLabelItem.js +39 -13
- package/libs/PanoDoorLabelPlugin/index.js +5 -7
- package/libs/PanoMeasurePlugin/Controller/EditController.js +22 -4
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +9 -5
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +2 -2
- package/libs/PanoMeasurePlugin/Controller/ViewController.js +3 -3
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +5 -5
- package/libs/PanoMeasurePlugin/Controller/index.js +42 -12
- package/libs/PanoMeasurePlugin/Model/index.js +4 -4
- package/libs/PanoMeasurePlugin/Model/line.js +8 -8
- package/libs/PanoMeasurePlugin/Model/polyline.js +25 -24
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +2 -2
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +2 -1
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +21 -20
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +14 -10
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +6 -4
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.js +3 -3
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +15 -12
- package/libs/PanoMeasurePlugin/index.js +14 -15
- package/libs/PanoMeasurePlugin/typings/index.js +1 -3
- package/libs/PanoRulerPlugin/Plugin.js +54 -54
- package/libs/PanoRulerPlugin/index.js +3 -4
- package/libs/PanoRulerProPlugin/Controller.js +14 -15
- package/libs/PanoRulerProPlugin/RulerItem.js +134 -45
- package/libs/PanoRulerProPlugin/RulerItems.js +49 -40
- package/libs/PanoRulerProPlugin/index.js +4 -5
- package/libs/PanoSpatialTagPlugin/Components/origins.js +47 -8
- package/libs/PanoSpatialTagPlugin/Components/tag.js +79 -3
- package/libs/PanoSpatialTagPlugin/Plugin.js +5 -7
- package/libs/PanoSpatialTagPlugin/index.js +4 -7
- package/libs/PanoTagPlugin/Components/Common/Arrow.js +45 -20
- package/libs/PanoTagPlugin/Components/Common/Audio.js +46 -8
- package/libs/PanoTagPlugin/Components/Common/Icon/Icon.js +218 -54
- package/libs/PanoTagPlugin/Components/Common/Icon/audioIcon.js +64 -11
- package/libs/PanoTagPlugin/Components/Common/Line/Polyline.js +50 -27
- package/libs/PanoTagPlugin/Components/Common/Line/Straight.js +151 -26
- package/libs/PanoTagPlugin/Components/Common/Media.js +222 -89
- package/libs/PanoTagPlugin/Components/Common/MediaItem.js +171 -22
- package/libs/PanoTagPlugin/Components/Common/Shadow.js +100 -28
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +87 -8
- package/libs/PanoTagPlugin/Components/Common/Text/FlyMText.js +66 -13
- package/libs/PanoTagPlugin/Components/Common/Text/FlyText.js +69 -27
- package/libs/PanoTagPlugin/Components/Common/Text/MText.js +87 -13
- package/libs/PanoTagPlugin/Components/Common/TextItem.js +29 -6
- package/libs/PanoTagPlugin/Components/Tag/AudioTag/AudioPlaneTag.js +99 -14
- package/libs/PanoTagPlugin/Components/Tag/AudioTag/AudioTag.js +169 -44
- package/libs/PanoTagPlugin/Components/Tag/AudioTag/index.js +31 -6
- package/libs/PanoTagPlugin/Components/Tag/CustomTag.js +11 -4
- package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +90 -35
- package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +33 -7
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +174 -35
- package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +76 -24
- package/libs/PanoTagPlugin/Components/Tag/TextTag/TextPlaneTag.js +87 -14
- package/libs/PanoTagPlugin/Components/Tag/TextTag/TextTag.js +84 -17
- package/libs/PanoTagPlugin/Components/Tag/TextTag/index.js +23 -6
- package/libs/PanoTagPlugin/Components/Tag/index.js +265 -41
- package/libs/PanoTagPlugin/Components/TagContainer.js +111 -58
- package/libs/PanoTagPlugin/Components/TagItem.js +201 -28
- package/libs/PanoTagPlugin/controller/TagCache.js +21 -19
- package/libs/PanoTagPlugin/controller/TagComputer.js +39 -18
- package/libs/PanoTagPlugin/controller/TagRender.js +46 -15
- package/libs/PanoTagPlugin/controller/TagUtil.js +25 -9
- package/libs/PanoTagPlugin/controller/index.js +90 -28
- package/libs/PanoTagPlugin/index.js +18 -19
- package/libs/PanoTagPlugin/tag.config.js +4 -0
- package/libs/PanoTagPlugin/utils/addDebugPoints.js +4 -0
- package/libs/PanoTagPlugin/utils/audio/SharedAudio.js +7 -7
- package/libs/PanoTagPlugin/utils/normalPositionToPositions.js +4 -0
- package/libs/PanoTagPlugin/utils/tagPosition.js +1 -1
- package/libs/PanoVideoPlugin/Controller.js +53 -39
- package/libs/PanoVideoPlugin/VideoMeshController.js +89 -43
- package/libs/PanoVideoPlugin/index.js +6 -7
- package/libs/_commonjsHelpers.js +4 -0
- package/libs/base/BasePlugin.js +23 -15
- package/libs/base/BasePluginWithData.js +2 -2
- package/libs/components/PaintBrush/Controller.js +15 -4
- package/libs/components/PaintBrush/Subscribe.js +37 -0
- package/libs/components/PaintBrush/index.js +17 -4
- package/libs/components/PaintBrush/tween.js +2 -2
- package/libs/components/index.js +1 -1
- package/libs/floorplan/Components/BaseImage.js +24 -6
- package/libs/floorplan/Components/Camera.js +73 -27
- package/libs/floorplan/Components/Compass.js +20 -3
- package/libs/floorplan/Components/CurrentFloor.js +189 -50
- package/libs/floorplan/Components/Main.js +202 -54
- package/libs/floorplan/Components/Normalmage.js +5 -2
- package/libs/floorplan/Components/RoomHighlight/Room.js +38 -5
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +105 -58
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +91 -18
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +106 -37
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +42 -13
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +15 -3
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +40 -3
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +37 -3
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +125 -51
- package/libs/floorplan/Components/RuleLabels/RuleLabels.js +80 -15
- package/libs/floorplan/Components/SvgImage.js +18 -6
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +117 -75
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +4 -6
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +96 -53
- package/libs/floorplan/ModelFloorplanPlugin/index.js +4 -6
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +43 -15
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +83 -22
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +61 -39
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +128 -33
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +39 -36
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -6
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +83 -64
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +4 -6
- package/libs/floorplan/index.js +1 -3
- package/libs/floorplan/typings/floorplanServerData.js +80 -80
- package/libs/index.js +136 -129
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +29 -1
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +10 -1
- package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +1 -1
- package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +5 -2
- package/libs/shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js +9 -8
- package/libs/shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js +1 -0
- package/libs/shared-utils/Object3DHelper/Helper/HTML/tipsDom.js +1 -1
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +4 -1
- package/libs/shared-utils/Object3DHelper/index.js +15 -0
- package/libs/shared-utils/Subscribe.js +38 -1
- package/libs/shared-utils/animationFrame/BetterTween.d.ts +3 -2
- package/libs/shared-utils/animationFrame/BetterTween.js +19 -12
- package/libs/shared-utils/animationFrame/index.d.ts +1 -1
- package/libs/shared-utils/animationFrame/index.js +14 -14
- package/libs/shared-utils/animationFrame/tween.d.ts +32 -23
- package/libs/shared-utils/animationFrame/tween.js +15 -15
- package/libs/shared-utils/audio.js +9 -9
- package/libs/shared-utils/changeModelCanvasOpacity.js +1 -1
- package/libs/shared-utils/createCanvasTextTexture.js +3 -3
- package/libs/shared-utils/five/changeMode.js +11 -11
- package/libs/shared-utils/index.js +15 -15
- package/libs/shared-utils/log.js +2 -2
- package/libs/shared-utils/math/Interval.js +2 -0
- package/libs/shared-utils/math/Rectangle.js +2 -0
- package/libs/shared-utils/svelte/resizeObserver.d.ts +2 -10
- package/libs/shared-utils/svelte/resizeObserverGlobal.d.ts +10 -0
- package/libs/shared-utils/three/FivePointSelector.js +1 -1
- package/libs/shared-utils/three/Magnifier.js +10 -7
- package/libs/shared-utils/three/PointDomHelper.js +11 -10
- package/libs/shared-utils/three/index.js +1 -2
- package/libs/shared-utils/three/loadTexture.js +10 -10
- package/libs/shared-utils/threex/domevents/index.js +2 -2
- package/libs/vendor/@tweenjs/tween/dist/tween.esm.js.js +403 -0
- package/libs/vendor/classnames/index.js +47 -0
- package/libs/vendor/easy-reactive/main.js +3 -0
- package/libs/vendor/{simply-reactive → easy-reactive}/src/simply-reactive.js +8 -8
- package/libs/vendor/{simply-reactive → easy-reactive}/src/utils/object.js +1 -1
- package/libs/vendor/gl-vec2/add.js +7 -0
- package/libs/vendor/gl-vec2/dot.js +7 -0
- package/libs/vendor/gl-vec2/normalize.js +8 -0
- package/libs/vendor/gl-vec2/set.js +7 -0
- package/libs/vendor/gl-vec2/subtract.js +7 -0
- package/libs/vendor/lodash.clonedeep/index.js +457 -0
- package/libs/vendor/lodash.get/index.js +236 -0
- package/libs/vendor/lodash.isequal/index.js +489 -0
- package/libs/vendor/object-assign-deep/objectAssignDeep.js +62 -0
- package/libs/vendor/polyline-miter-util/index.js +18 -0
- package/libs/vendor/polyline-normals/index.js +28 -0
- package/libs/vendor/resize-observer-polyfill/dist/ResizeObserver.es.js +155 -134
- package/libs/vendor/svelte/easing/index.js +4 -5
- package/libs/vendor/svelte/index.js +1 -1
- package/libs/vendor/svelte/internal/index.js +412 -388
- package/libs/vendor/svelte/store/index.js +6 -6
- package/libs/vendor/svelte/transition/index.js +23 -20
- package/libs/vendor/svelte-carousel/src/components/Arrow/Arrow.js +41 -3
- package/libs/vendor/svelte-carousel/src/components/Carousel/Carousel.js +338 -71
- package/libs/vendor/svelte-carousel/src/components/Carousel/createCarousel.js +7 -1
- package/libs/vendor/svelte-carousel/src/components/Dot/Dot.js +19 -3
- package/libs/vendor/svelte-carousel/src/components/Dots/Dots.js +30 -7
- package/libs/vendor/svelte-carousel/src/components/Progress/Progress.js +15 -3
- package/libs/vendor/svelte-carousel/src/utils/clones.js +1 -0
- package/libs/vendor/svelte-carousel/src/utils/lazy.js +3 -0
- package/package.json +11 -13
- package/dist/GuideLinePlugin/utils/getArrowMaterial.d.ts +0 -4
- package/libs/vendor/simply-reactive/main.js +0 -3
- /package/libs/vendor/{simply-reactive → easy-reactive}/src/utils/subscription.js +0 -0
- /package/libs/vendor/{simply-reactive → easy-reactive}/src/utils/watcher.js +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var g = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var t = (
|
|
4
|
-
import { vertexShader as
|
|
2
|
+
var I = (v, e, i) => e in v ? g(v, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : v[e] = i;
|
|
3
|
+
var t = (v, e, i) => (I(v, typeof e != "symbol" ? e + "" : e, i), i);
|
|
4
|
+
import { vertexShader as P, fragmentShader as F } from "./utils/shader.js";
|
|
5
5
|
import "@realsee/five";
|
|
6
6
|
import "hammerjs";
|
|
7
|
-
import { VideoTexture as
|
|
8
|
-
import "
|
|
7
|
+
import { VideoTexture as M, LinearFilter as m, ShaderMaterial as x, Vector4 as L, SphereBufferGeometry as V, Mesh as y, Vector3 as f, Quaternion as b } from "three";
|
|
8
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
9
9
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
10
10
|
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
11
|
-
import { requestAnimationFrameInterval as
|
|
12
|
-
import
|
|
11
|
+
import { requestAnimationFrameInterval as A } from "../shared-utils/animationFrame/index.js";
|
|
12
|
+
import W from "./utils/index.js";
|
|
13
13
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
14
14
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
15
15
|
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
@@ -22,22 +22,35 @@ import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
|
22
22
|
import "../shared-utils/three/centerPoint.js";
|
|
23
23
|
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
24
24
|
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
class K {
|
|
26
|
+
/** 初始化视频、模型以及相关事件监听。 */
|
|
27
27
|
constructor(e, i) {
|
|
28
28
|
t(this, "_id");
|
|
29
|
+
/** 视频资源地址 */
|
|
29
30
|
t(this, "url");
|
|
31
|
+
/** Five Instance */
|
|
30
32
|
t(this, "five");
|
|
33
|
+
/** 视频对应的点位 */
|
|
31
34
|
t(this, "panoIndex");
|
|
35
|
+
/** 视频对应的 Work Observer */
|
|
32
36
|
t(this, "observer");
|
|
37
|
+
/** 视频在球面的 uv:[left, top, width, height] */
|
|
33
38
|
t(this, "origin");
|
|
39
|
+
/** Video DOM */
|
|
34
40
|
t(this, "video");
|
|
41
|
+
/** Video Mesh */
|
|
35
42
|
t(this, "videoMesh");
|
|
36
43
|
t(this, "_enabled", !0);
|
|
37
44
|
t(this, "_disposed", !1);
|
|
45
|
+
/** 视频资源是否满足播放条件 */
|
|
38
46
|
t(this, "videoDataLoaded", !1);
|
|
47
|
+
/** 视频是否曾经播放过 */
|
|
39
48
|
t(this, "hasVideoEverPlayed", !1);
|
|
49
|
+
/** 自动 render five 的销毁函数
|
|
50
|
+
* @remark 由于 render video 依赖 Five render,因此需要自动 render five。
|
|
51
|
+
*/
|
|
40
52
|
t(this, "renderFiveDisposer");
|
|
53
|
+
/** 把 uv 值转换成位置 */
|
|
41
54
|
t(this, "uv2Position", (e, i) => {
|
|
42
55
|
var c;
|
|
43
56
|
const o = Math.PI, a = Math.PI * 2, d = e, s = 1 - i, r = new f(
|
|
@@ -46,121 +59,145 @@ class Y {
|
|
|
46
59
|
1 * Math.sin(a * d) * Math.sin(o * s)
|
|
47
60
|
);
|
|
48
61
|
r.setX(-r.x);
|
|
49
|
-
const
|
|
50
|
-
if (!
|
|
51
|
-
return this.logWarning(
|
|
52
|
-
const l =
|
|
53
|
-
return
|
|
62
|
+
const h = (c = this.five.work) == null ? void 0 : c.observers[this.panoIndex];
|
|
63
|
+
if (!h)
|
|
64
|
+
return this.logWarning(`点位 ${this.panoIndex} 不存在,请检查 Five 数据是否正常。`);
|
|
65
|
+
const l = h.position.clone(), p = h.quaternion.clone(), u = r.clone();
|
|
66
|
+
return u.applyAxisAngle(new f(0, 1, 0), Math.PI / 2), u.applyQuaternion(p), u.add(l), u;
|
|
54
67
|
});
|
|
68
|
+
/** Five 数据加载后需要根据点位位姿调整点位模型位置 */
|
|
55
69
|
t(this, "onFiveDataLoaded", () => {
|
|
56
70
|
var r;
|
|
57
71
|
const e = (r = this.five.work) == null ? void 0 : r.observers[this.panoIndex];
|
|
58
72
|
if (!e)
|
|
59
|
-
return this.logWarning(
|
|
73
|
+
return this.logWarning(`点位 ${this.panoIndex} 不存在,请检查 Five 数据是否正常。`);
|
|
60
74
|
this.observer = e;
|
|
61
|
-
const { x: i, y: n, z: o, w: a } = e.quaternion, d = new
|
|
75
|
+
const { x: i, y: n, z: o, w: a } = e.quaternion, d = new b(i, n, o, a), s = e.position;
|
|
62
76
|
this.videoMesh.position.fromArray([s.x, s.y, s.z]), this.videoMesh.quaternion.set(0, 0, 0, 1), this.videoMesh.rotateOnAxis(new f(0, 1, 0), Math.PI / 2), this.videoMesh.applyQuaternion(d);
|
|
63
77
|
});
|
|
78
|
+
/** 兼容视频播放 */
|
|
64
79
|
t(this, "onFiveWantsMoveToPano", (e) => {
|
|
65
80
|
e === this.panoIndex && (this.hasVideoEverPlayed || this.video.play().catch((i) => {
|
|
66
|
-
console.error("
|
|
81
|
+
console.error("🐶 ==> error:", i);
|
|
67
82
|
}));
|
|
68
83
|
});
|
|
84
|
+
/** 走到某个点位上时,挂载/卸载视频 */
|
|
69
85
|
t(this, "onFivePanoArrived", (e) => {
|
|
70
86
|
if (this.disposed)
|
|
71
|
-
return this.logWarning("
|
|
72
|
-
|
|
87
|
+
return this.logWarning("实例已被销毁");
|
|
88
|
+
this.enabled && this.panoIndex === e && this.mount();
|
|
73
89
|
});
|
|
74
90
|
t(this, "onFivePanoWillArrive", (e) => {
|
|
75
91
|
if (e !== this.panoIndex)
|
|
76
92
|
return this.unmount();
|
|
77
93
|
this.panoIndex !== e && this.unmount();
|
|
78
94
|
});
|
|
95
|
+
/** Five 模型变化 */
|
|
79
96
|
t(this, "onFiveModeChange", (e) => {
|
|
80
97
|
e !== "Panorama" && this.hide();
|
|
81
98
|
});
|
|
99
|
+
/** Five mode change 动画结束 */
|
|
82
100
|
t(this, "onFiveInitAnimationEnded", () => {
|
|
83
101
|
const e = this.five.getCurrentState();
|
|
84
102
|
e.mode === "Panorama" && e.panoIndex === this.panoIndex && this.mount();
|
|
85
103
|
});
|
|
104
|
+
/** Five Canvas 点击 */
|
|
86
105
|
t(this, "onFiveWantsTapGesture", (e) => {
|
|
87
106
|
if (!this.five.scene.children.includes(this.videoMesh))
|
|
88
107
|
return;
|
|
89
108
|
if (this.disposed)
|
|
90
|
-
return this.logWarning("
|
|
109
|
+
return this.logWarning("实例已被销毁");
|
|
91
110
|
if (!this.enabled)
|
|
92
|
-
return this.logWarning("
|
|
111
|
+
return this.logWarning("实例已被禁用");
|
|
93
112
|
const [i] = e.intersectObject(this.videoMesh);
|
|
94
113
|
if (!i)
|
|
95
114
|
return;
|
|
96
115
|
if (this.checkIntersectionInBounding(this.origin, i))
|
|
97
116
|
return this.video.muted = !this.video.muted, !1;
|
|
98
117
|
});
|
|
118
|
+
/** video canplaythrough 事件触发 */
|
|
99
119
|
t(this, "onVideoDataLoaded", () => {
|
|
100
120
|
this.videoDataLoaded = !0, this.video.paused === !1 && this.video.src !== "" && this.onVideoPlayingAndLoaded();
|
|
101
121
|
});
|
|
122
|
+
/** video playing 事件触发
|
|
123
|
+
* @remarks
|
|
124
|
+
* 事件触发时机:
|
|
125
|
+
* - video is ready to start after having been paused.
|
|
126
|
+
* - video is ready to play after delayed due to lack of data.
|
|
127
|
+
* @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
|
|
128
|
+
*/
|
|
102
129
|
t(this, "onVideoPlaying", () => {
|
|
103
130
|
this.hasVideoEverPlayed = !0, this.video.src !== "" && this.videoDataLoaded && this.onVideoPlayingAndLoaded();
|
|
104
131
|
});
|
|
132
|
+
/** 触发 playing 和 canplaythrough */
|
|
105
133
|
t(this, "onVideoPlayingAndLoaded", () => {
|
|
106
134
|
if (!this.videoDataLoaded)
|
|
107
|
-
return this.logWarning("
|
|
135
|
+
return this.logWarning("视频数据未加载");
|
|
108
136
|
if (this.video.paused === !0)
|
|
109
|
-
return this.logWarning("
|
|
137
|
+
return this.logWarning("视频已暂停");
|
|
110
138
|
this.video.addEventListener(
|
|
111
139
|
"timeupdate",
|
|
112
140
|
() => {
|
|
113
|
-
this.video.src !== "" && this.panoIndex === this.five.getCurrentState().panoIndex && this.five.getCurrentState().mode === "Panorama" && (this.renderFiveDisposer || (this.renderFiveDisposer =
|
|
141
|
+
this.video.src !== "" && this.panoIndex === this.five.getCurrentState().panoIndex && this.five.getCurrentState().mode === "Panorama" && (this.renderFiveDisposer || (this.renderFiveDisposer = A(() => {
|
|
114
142
|
this.five.needsRender = !0;
|
|
115
143
|
}, 30)), this.five.scene.add(this.videoMesh));
|
|
116
144
|
},
|
|
117
145
|
{ once: !0 }
|
|
118
146
|
);
|
|
119
147
|
});
|
|
148
|
+
/** video pause 事件触发 */
|
|
120
149
|
t(this, "onVideoPaused", () => {
|
|
121
150
|
var e;
|
|
122
151
|
(e = this.renderFiveDisposer) == null || e.call(this), this.renderFiveDisposer = void 0;
|
|
123
152
|
});
|
|
124
|
-
var r,
|
|
125
|
-
this.five = e, this.panoIndex = i.panoIndex, this._id = i.renderID, this.url = i.url, this.origin = i.origin.slice(), this._enabled = (
|
|
153
|
+
var r, h;
|
|
154
|
+
this.five = e, this.panoIndex = i.panoIndex, this._id = i.renderID, this.url = i.url, this.origin = i.origin.slice(), this._enabled = (h = (r = i.initialState) == null ? void 0 : r.enabled) != null ? h : !0;
|
|
126
155
|
const n = document.createElement("video");
|
|
127
156
|
n.crossOrigin = "anonymous", n.autoplay = !1, n.muted = !0, n.loop = !0, n.playsInline = !0, this.video = n;
|
|
128
|
-
const o = new
|
|
157
|
+
const o = new M(this.video);
|
|
129
158
|
o.minFilter = m, o.magFilter = m;
|
|
130
|
-
const a = new
|
|
131
|
-
vertexShader:
|
|
132
|
-
fragmentShader:
|
|
159
|
+
const a = new x({
|
|
160
|
+
vertexShader: P,
|
|
161
|
+
fragmentShader: F,
|
|
133
162
|
uniforms: {
|
|
134
163
|
map: { value: o },
|
|
135
164
|
size: {
|
|
136
|
-
value: new
|
|
165
|
+
value: new L(this.origin[0], 1 - this.origin[1] - this.origin[3], this.origin[2], this.origin[3])
|
|
137
166
|
}
|
|
138
167
|
},
|
|
139
168
|
depthTest: !0,
|
|
140
169
|
transparent: !0
|
|
141
|
-
}), d = new
|
|
170
|
+
}), d = new V(1, 64, 64);
|
|
142
171
|
d.scale(-1, 1, 1);
|
|
143
|
-
const s = new
|
|
172
|
+
const s = new y(d, a);
|
|
144
173
|
s.name = "pano-video", this.videoMesh = s, this.five.work && this.onFiveDataLoaded(), this.enabled && this.addEventListeners(), this.mountIfNeeded();
|
|
145
174
|
}
|
|
175
|
+
/** 传入的 ID,不可更改 */
|
|
146
176
|
get renderID() {
|
|
147
177
|
return this._id;
|
|
148
178
|
}
|
|
179
|
+
/** 是否已经销毁 */
|
|
149
180
|
get disposed() {
|
|
150
181
|
return this._disposed;
|
|
151
182
|
}
|
|
183
|
+
/** 是否已经启用 */
|
|
152
184
|
get enabled() {
|
|
153
185
|
return this._enabled;
|
|
154
186
|
}
|
|
187
|
+
/** 彻底销毁,不响应之后的任何事件 */
|
|
155
188
|
dispose() {
|
|
156
189
|
this.disposed || (this.disable(), this._disposed = !0);
|
|
157
190
|
}
|
|
158
191
|
enable() {
|
|
159
192
|
this.disposed || this.enabled || (this._enabled = !0, this.addEventListeners(), this.mountIfNeeded());
|
|
160
193
|
}
|
|
194
|
+
/** 禁用插件 */
|
|
161
195
|
disable() {
|
|
162
|
-
this.disposed ||
|
|
196
|
+
this.disposed || this.enabled && (this._enabled = !1, this.removeEventListeners(), this.unmount());
|
|
163
197
|
}
|
|
198
|
+
/** 切换到全景模式并看向视频
|
|
199
|
+
* @remark 如果遇到不能自动播放的问题,需要放到用户交互事件中调用。
|
|
200
|
+
*/
|
|
164
201
|
lookAtVideo() {
|
|
165
202
|
if (!this.observer)
|
|
166
203
|
return;
|
|
@@ -170,54 +207,63 @@ class Y {
|
|
|
170
207
|
const i = this.uv2Position(e[0], e[1]);
|
|
171
208
|
if (!i)
|
|
172
209
|
return;
|
|
173
|
-
const n = new f().subVectors(i, this.observer.position).normalize(), { longitude: o, latitude: a } =
|
|
210
|
+
const n = new f().subVectors(i, this.observer.position).normalize(), { longitude: o, latitude: a } = W(n);
|
|
174
211
|
this.five.setState({ panoIndex: this.panoIndex, longitude: o, latitude: a }), this.onFiveWantsMoveToPano(this.panoIndex);
|
|
175
212
|
}
|
|
213
|
+
/** 获取视频中心点的 uv */
|
|
176
214
|
getUVCenter() {
|
|
177
215
|
if (!this.origin)
|
|
178
216
|
return;
|
|
179
217
|
const e = this.origin[0] + this.origin[2] / 2, i = this.origin[1] + this.origin[3] / 2;
|
|
180
218
|
return [e, i];
|
|
181
219
|
}
|
|
220
|
+
/** 添加时间监听 */
|
|
182
221
|
addEventListeners() {
|
|
183
222
|
this.five.on("loaded", this.onFiveDataLoaded), this.five.on("modeChange", this.onFiveModeChange), this.five.on("panoArrived", this.onFivePanoArrived), this.five.on("panoWillArrive", this.onFivePanoWillArrive), this.five.on("wantsMoveToPano", this.onFiveWantsMoveToPano), this.five.on("wantsTapGesture", this.onFiveWantsTapGesture), this.five.on("initAnimationEnded", this.onFiveInitAnimationEnded), this.video.addEventListener("canplaythrough", this.onVideoDataLoaded), this.video.addEventListener("playing", this.onVideoPlaying), this.video.addEventListener("pause", this.onVideoPaused);
|
|
184
223
|
}
|
|
224
|
+
/** 移除事件监听 */
|
|
185
225
|
removeEventListeners() {
|
|
186
226
|
this.five.off("loaded", this.onFiveDataLoaded), this.five.off("modeChange", this.onFiveModeChange), this.five.off("panoArrived", this.onFivePanoArrived), this.five.off("panoWillArrive", this.onFivePanoWillArrive), this.five.off("wantsMoveToPano", this.onFiveWantsMoveToPano), this.five.off("wantsTapGesture", this.onFiveWantsTapGesture), this.five.off("initAnimationEnded", this.onFiveInitAnimationEnded), this.video.removeEventListener("canplaythrough", this.onVideoDataLoaded), this.video.removeEventListener("playing", this.onVideoPlaying), this.video.removeEventListener("pause", this.onVideoPaused);
|
|
187
227
|
}
|
|
228
|
+
/** 如果满足 mount 条件,mount */
|
|
188
229
|
mountIfNeeded() {
|
|
189
230
|
const e = this.five.getCurrentState();
|
|
190
231
|
e.mode === "Panorama" && e.panoIndex === this.panoIndex && this.enabled && this.mount();
|
|
191
232
|
}
|
|
233
|
+
/** 挂载:加载视频资源;添加模型。 */
|
|
192
234
|
mount() {
|
|
193
235
|
if (this.disposed)
|
|
194
|
-
return this.logWarning("
|
|
236
|
+
return this.logWarning("插件已经销毁,无法挂载。");
|
|
195
237
|
if (this.url === "")
|
|
196
|
-
return this.logWarning("
|
|
238
|
+
return this.logWarning("视频资源不存在。");
|
|
197
239
|
this.video.src !== this.url && (this.video.src = this.url), this.video.paused && this.video.play().catch((e) => {
|
|
198
|
-
this.logWarning(e instanceof Error ? e.message : "
|
|
240
|
+
this.logWarning(e instanceof Error ? e.message : "视频播放失败。"), this.five.once("gesture", () => {
|
|
199
241
|
this.video.play().catch((i) => {
|
|
200
|
-
this.logWarning(i instanceof Error ? i.message : "
|
|
242
|
+
this.logWarning(i instanceof Error ? i.message : "自动播放视频失败。");
|
|
201
243
|
});
|
|
202
244
|
});
|
|
203
245
|
});
|
|
204
246
|
}
|
|
247
|
+
/** 卸载:销毁视频资源;移除模型。 */
|
|
205
248
|
unmount() {
|
|
206
249
|
this.video.pause(), this.video.src !== "" && (this.video.src = ""), this.five.scene.remove(this.videoMesh);
|
|
207
250
|
}
|
|
251
|
+
/** 暂停视频,去除模型。 */
|
|
208
252
|
hide() {
|
|
209
253
|
this.video.pause(), this.five.scene.remove(this.videoMesh);
|
|
210
254
|
}
|
|
255
|
+
/** 控制台打印警告 */
|
|
211
256
|
logWarning(e) {
|
|
212
|
-
console.warn("
|
|
257
|
+
console.warn("⛔ ==> [VideoMeshController]:", e);
|
|
213
258
|
}
|
|
259
|
+
/** 检测射线与模型的交点是不是在视频的范围内 */
|
|
214
260
|
checkIntersectionInBounding(e, i) {
|
|
215
261
|
if (!i.uv)
|
|
216
262
|
return !1;
|
|
217
|
-
const [n, o] = i.uv.toArray(), [a, d, s, r] = e,
|
|
218
|
-
return n >= a && n <= l && o >=
|
|
263
|
+
const [n, o] = i.uv.toArray(), [a, d, s, r] = e, h = 1 - d - r, l = a + s, p = h + r;
|
|
264
|
+
return n >= a && n <= l && o >= h && o <= p;
|
|
219
265
|
}
|
|
220
266
|
}
|
|
221
267
|
export {
|
|
222
|
-
|
|
268
|
+
K as VideoMeshController
|
|
223
269
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PanoVideoPluginController as r } from "./Controller.js";
|
|
2
|
-
import { typings as
|
|
2
|
+
import { typings as A } from "./typings/index.js";
|
|
3
3
|
import "./VideoMeshController.js";
|
|
4
4
|
import "./utils/shader.js";
|
|
5
5
|
import "@realsee/five";
|
|
6
6
|
import "hammerjs";
|
|
7
7
|
import "three";
|
|
8
|
-
import "
|
|
8
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
9
9
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
10
10
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
11
11
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
@@ -21,13 +21,12 @@ import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
|
21
21
|
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
22
22
|
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
23
23
|
import "../shared-utils/animationFrame/index.js";
|
|
24
|
-
import "../shared-utils/animationFrame/BetterTween.js";
|
|
25
24
|
import "./utils/index.js";
|
|
26
25
|
import "../base/BasePlugin.js";
|
|
27
26
|
import "../shared-utils/isAbsoluteURL.js";
|
|
28
|
-
const
|
|
27
|
+
const q = (o) => new r(o);
|
|
29
28
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
q as PanoVideoPlugin,
|
|
30
|
+
A as PanoVideoPluginType,
|
|
31
|
+
q as default
|
|
33
32
|
};
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,30 +1,38 @@
|
|
|
1
|
-
var
|
|
2
|
-
var o = (i, t, r) => t in i ?
|
|
3
|
-
var
|
|
4
|
-
import { Subscribe as
|
|
1
|
+
var s = Object.defineProperty;
|
|
2
|
+
var o = (i, t, r) => t in i ? s(i, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : i[t] = r;
|
|
3
|
+
var e = (i, t, r) => (o(i, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
import { Subscribe as a } from "../shared-utils/Subscribe.js";
|
|
5
5
|
import "@realsee/five";
|
|
6
6
|
import "hammerjs";
|
|
7
7
|
import "three";
|
|
8
|
-
import "
|
|
8
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
9
9
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
10
10
|
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
11
|
-
import { isAbsoluteURL as
|
|
12
|
-
|
|
13
|
-
class R {
|
|
11
|
+
import { isAbsoluteURL as m } from "../shared-utils/isAbsoluteURL.js";
|
|
12
|
+
let n = class {
|
|
14
13
|
constructor(t, r) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @realsee/dnalogel 版本号
|
|
16
|
+
*/
|
|
17
|
+
e(this, "VERSION", "2.16.0-11");
|
|
18
|
+
e(this, "five");
|
|
19
|
+
/**
|
|
20
|
+
* 插件事件钩子
|
|
21
|
+
*/
|
|
22
|
+
e(this, "hooks", new a());
|
|
23
|
+
e(this, "staticPrefix", "//vrlab-static.ljcdn.com");
|
|
19
24
|
this.five = t, r != null && r.staticPrefix && (this.staticPrefix = r.staticPrefix);
|
|
20
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* 获取当前的插件状态,如果当初插件内存在需要通过动画变更的 state 值,则通过此方法可以得到中间状态
|
|
28
|
+
*/
|
|
21
29
|
getCurrentState() {
|
|
22
30
|
return this.state;
|
|
23
31
|
}
|
|
24
32
|
isAbsoluteURL(t) {
|
|
25
|
-
return
|
|
33
|
+
return m(t) ? t : `${this.staticPrefix}${t}`;
|
|
26
34
|
}
|
|
27
|
-
}
|
|
35
|
+
};
|
|
28
36
|
export {
|
|
29
|
-
|
|
37
|
+
n as Controller
|
|
30
38
|
};
|
|
@@ -45,13 +45,22 @@ class X extends k {
|
|
|
45
45
|
}
|
|
46
46
|
return this.container.innerHTML = O, this.container;
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @param className 初始化画板
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
48
53
|
initCanvas(t) {
|
|
49
54
|
const e = document.createElement("canvas");
|
|
50
55
|
e.className = t, e.width = this.clientWidth, e.height = this.clientHeight;
|
|
51
56
|
const h = e.getContext("2d");
|
|
52
|
-
if (
|
|
57
|
+
if (h)
|
|
53
58
|
return h.lineWidth = 5 * this.dpr, h.lineCap = "round", h.lineJoin = "round", this.container.appendChild(e), e;
|
|
54
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* 初始化操作面板
|
|
62
|
+
* @returns
|
|
63
|
+
*/
|
|
55
64
|
initCtrl() {
|
|
56
65
|
const t = document.createElement("div");
|
|
57
66
|
t.className = "_paintBrush-ctrl";
|
|
@@ -94,7 +103,7 @@ class X extends k {
|
|
|
94
103
|
t.getContext("2d").clearRect(0, 0, t.width, t.height), this.openBrushHandle(), this.ready = !0, this.emit("readyChange", !0);
|
|
95
104
|
}
|
|
96
105
|
closeBrush() {
|
|
97
|
-
|
|
106
|
+
this.ready && (this.container.className = "", this.data = {}, this.tempLine = {}, Object.keys(this.canvas).forEach((t) => {
|
|
98
107
|
this.canvas[t].ontouchstart = () => !1, this.canvas[t].ontouchmove = () => !1, this.canvas[t].ontouchend = () => !1, this.canvas[t].ontouchcancel = () => !1;
|
|
99
108
|
const e = this.canvas[t].getContext("2d");
|
|
100
109
|
e && e.clearRect(0, 0, this.canvas[t].width, this.canvas[t].height);
|
|
@@ -110,7 +119,7 @@ class X extends k {
|
|
|
110
119
|
if (!e)
|
|
111
120
|
return;
|
|
112
121
|
const h = e.getContext("2d");
|
|
113
|
-
|
|
122
|
+
h && (this.configs.currentColor = t, h.strokeStyle = t);
|
|
114
123
|
}
|
|
115
124
|
openBrushHandle() {
|
|
116
125
|
const t = this.canvas[this.uuid];
|
|
@@ -148,6 +157,7 @@ class X extends k {
|
|
|
148
157
|
line: [...u],
|
|
149
158
|
color: this.color,
|
|
150
159
|
duration: a < 1280 ? a : a < 2e3 ? 1280 : 0
|
|
160
|
+
// 单次笔迹时长超过2000ms不加动画
|
|
151
161
|
};
|
|
152
162
|
this.data[this.uuid].push(s), D(() => {
|
|
153
163
|
this.emitStateChange({
|
|
@@ -180,6 +190,7 @@ class X extends k {
|
|
|
180
190
|
uuid: this.uuid,
|
|
181
191
|
color: this.color,
|
|
182
192
|
duration: a < 1280 ? a : a < 2e3 ? 1280 : 0
|
|
193
|
+
// 单次笔迹时长超过2000ms不加动画
|
|
183
194
|
};
|
|
184
195
|
this.data[this.uuid].push(s), D(() => {
|
|
185
196
|
this.emitStateChange({
|
|
@@ -232,7 +243,7 @@ class X extends k {
|
|
|
232
243
|
this.openBrush();
|
|
233
244
|
return;
|
|
234
245
|
}
|
|
235
|
-
if (
|
|
246
|
+
if (this.ready)
|
|
236
247
|
switch (h) {
|
|
237
248
|
case g.Drawline:
|
|
238
249
|
const { state: o, timestamp: n, end: u } = t;
|
|
@@ -6,17 +6,47 @@ function v(f) {
|
|
|
6
6
|
f[i] || delete f[i];
|
|
7
7
|
}
|
|
8
8
|
class E {
|
|
9
|
+
/**
|
|
10
|
+
* 判断是否注册了事件
|
|
11
|
+
* @param name 事件类型
|
|
12
|
+
*/
|
|
9
13
|
hasListener(t) {
|
|
10
14
|
const e = r(this);
|
|
11
15
|
return e && e[t] && e[t].length > 0;
|
|
12
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* 注册事件
|
|
19
|
+
* @param name 事件类型
|
|
20
|
+
* @param callback 事件回调函数
|
|
21
|
+
* @param once 是否只执行一次
|
|
22
|
+
* @returns 解除事件
|
|
23
|
+
* @template K 预设的监听事件名称
|
|
24
|
+
* @template C 回调函数函数上下文
|
|
25
|
+
*/
|
|
13
26
|
on(t, e, s) {
|
|
14
27
|
const o = r(this);
|
|
15
28
|
return o[t] || (o[t] = []), o[t].push([e, s || !1]), () => this.off(t, e);
|
|
16
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* 注册事件(是否只执行一次)
|
|
32
|
+
* @param name 事件类型
|
|
33
|
+
* @param callback 事件回调函数
|
|
34
|
+
* @returns 解除事件
|
|
35
|
+
* @template K 预设的监听事件名称
|
|
36
|
+
* @template C 回调函数函数上下文
|
|
37
|
+
*/
|
|
17
38
|
once(t, e) {
|
|
18
39
|
return this.on(t, e, !0);
|
|
19
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* 解除事件
|
|
43
|
+
*
|
|
44
|
+
* 如果 name 不传的话解除对应所有事件
|
|
45
|
+
* 如果 name, callback 不传的话解除所有name的所有事件
|
|
46
|
+
* @param name 事件类型
|
|
47
|
+
* @param callback 事件回调函数
|
|
48
|
+
* @template K 预设的监听事件名称
|
|
49
|
+
*/
|
|
20
50
|
off(t, e) {
|
|
21
51
|
if (t === void 0) {
|
|
22
52
|
v(this);
|
|
@@ -32,6 +62,13 @@ class E {
|
|
|
32
62
|
;
|
|
33
63
|
o < s[t].length && s[t].splice(o, 1);
|
|
34
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* 触发事件
|
|
67
|
+
* @param name 事件类型
|
|
68
|
+
* @param data 触发事件的数据
|
|
69
|
+
* @returns canceled 是否被触发取消
|
|
70
|
+
* @template K 预设的监听事件名称
|
|
71
|
+
*/
|
|
35
72
|
emit(t, ...e) {
|
|
36
73
|
let s = !1;
|
|
37
74
|
const l = r(this)[t] || [];
|
|
@@ -2,13 +2,13 @@ var e = Object.defineProperty;
|
|
|
2
2
|
var s = (r, o, t) => o in r ? e(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t;
|
|
3
3
|
var n = (r, o, t) => (s(r, typeof o != "symbol" ? o + "" : o, t), t);
|
|
4
4
|
import { Controller as l } from "./Controller.js";
|
|
5
|
-
class
|
|
5
|
+
class h {
|
|
6
6
|
constructor(o = {}) {
|
|
7
7
|
n(this, "controller");
|
|
8
8
|
const t = Object.assign({
|
|
9
9
|
currentColor: "#f44336",
|
|
10
|
-
onUndoText: "
|
|
11
|
-
onExitText: "
|
|
10
|
+
onUndoText: "回退",
|
|
11
|
+
onExitText: "关闭"
|
|
12
12
|
}, o);
|
|
13
13
|
this.controller = new l(t);
|
|
14
14
|
}
|
|
@@ -21,18 +21,31 @@ class u {
|
|
|
21
21
|
once(o, t) {
|
|
22
22
|
this.controller.once(o, t);
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* 显示画笔。
|
|
26
|
+
*/
|
|
24
27
|
show() {
|
|
25
28
|
this.controller.openBrush();
|
|
26
29
|
}
|
|
27
30
|
action(o) {
|
|
28
31
|
this.controller.action(o);
|
|
29
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* 获取画笔状态。
|
|
35
|
+
*/
|
|
30
36
|
get state() {
|
|
31
37
|
return this.controller.state;
|
|
32
38
|
}
|
|
33
39
|
get configs() {
|
|
34
40
|
return this.controller.configs;
|
|
35
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* 销毁。
|
|
44
|
+
*
|
|
45
|
+
* @deprecated
|
|
46
|
+
*
|
|
47
|
+
* @description 画笔应该维护一个 **全局单例**,重复利用。
|
|
48
|
+
*/
|
|
36
49
|
dispose() {
|
|
37
50
|
return this.controller.destroyBrush();
|
|
38
51
|
}
|
|
@@ -41,5 +54,5 @@ class u {
|
|
|
41
54
|
}
|
|
42
55
|
}
|
|
43
56
|
export {
|
|
44
|
-
|
|
57
|
+
h as PaintBrush
|
|
45
58
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Tween as m, Easing as s } from "
|
|
1
|
+
import { Tween as m, Easing as s } from "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
2
2
|
function c(t, r, a, i = s.Linear.None) {
|
|
3
3
|
const e = new m(t).to(r, a).easing(i).start();
|
|
4
4
|
function n(o) {
|
|
5
|
-
|
|
5
|
+
e.update(o) && requestAnimationFrame(n);
|
|
6
6
|
}
|
|
7
7
|
return requestAnimationFrame(n), e;
|
|
8
8
|
}
|
package/libs/components/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "./PaintBrush/utils.js";
|
|
2
|
-
import "
|
|
2
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|