@realsee/dnalogel 3.78.0-alpha.0 → 3.78.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PanoTagPlugin/controller/Tag/BoxTag.d.ts +1 -0
- package/dist/PanoTagPlugin/controller/Tag/MaskTag.d.ts +116 -16
- package/dist/PanoTagPlugin/controller/Tag/MaskTag.shaders.d.ts +4 -1
- package/dist/PanoTagPlugin/controller/index.d.ts +20 -2
- package/dist/PanoTagPlugin/typings/tag/Tag.d.ts +2 -2
- package/dist/PanoTagPlugin/typings/tag/Utils.d.ts +2 -2
- package/dist/PanoTagPlugin/utils/tagPosition.d.ts +9 -1
- package/dist/index.cjs.js +154 -149
- package/dist/index.js +8398 -8018
- package/dist/index.umd.js +144 -139
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +11 -11
- package/libs/PanoTagPlugin/controller/Tag/BoxTag.d.ts +1 -0
- package/libs/PanoTagPlugin/controller/Tag/BoxTag.js +17 -10
- package/libs/PanoTagPlugin/controller/Tag/MaskTag.d.ts +116 -16
- package/libs/PanoTagPlugin/controller/Tag/MaskTag.js +539 -220
- package/libs/PanoTagPlugin/controller/Tag/MaskTag.shaders.d.ts +4 -1
- package/libs/PanoTagPlugin/controller/Tag/MaskTag.shaders.js +134 -41
- package/libs/PanoTagPlugin/controller/Tag/MaskTag1.d.ts +202 -0
- package/libs/PanoTagPlugin/controller/Tag/MaskTag1.js +617 -0
- package/libs/PanoTagPlugin/controller/TagUtil.js +11 -11
- package/libs/PanoTagPlugin/controller/index.d.ts +20 -2
- package/libs/PanoTagPlugin/controller/index.js +168 -120
- package/libs/PanoTagPlugin/typings/tag/Tag.d.ts +2 -2
- package/libs/PanoTagPlugin/typings/tag/Utils.d.ts +2 -2
- package/libs/PanoTagPlugin/utils/index.js +25 -23
- package/libs/PanoTagPlugin/utils/tagPosition.d.ts +9 -1
- package/libs/PanoTagPlugin/utils/tagPosition.js +3 -1
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
- package/docs/.nojekyll +0 -1
- package/docs/assets/custom.css +0 -0
- package/docs/assets/highlight.css +0 -127
- package/docs/assets/icons.js +0 -18
- package/docs/assets/icons.svg +0 -1
- package/docs/assets/main.js +0 -60
- package/docs/assets/navigation.js +0 -1
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1493
- package/docs/classes/AreaMakerPluginType.AreaMakerController.html +0 -59
- package/docs/classes/AreaMakerPluginType.AreaMakerItem.html +0 -71
- package/docs/classes/CSS3DRender.html +0 -100
- package/docs/classes/GuideLineItem.GuideLineItem.html +0 -21
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +0 -70
- package/docs/classes/ModelMakerPluginInstance.html +0 -116
- package/docs/classes/ModelMakerPluginType.ModelMakerBoxItem.html +0 -52
- package/docs/classes/ModelMakerPluginType.ModelMakerPolygonItem.html +0 -52
- package/docs/classes/ModelMakerPluginType.ModelMakerPrismItem.html +0 -53
- package/docs/classes/ModelRoomLabelController.html +0 -19
- package/docs/classes/MoveController.html +0 -45
- package/docs/classes/Object3DHelperController.html +0 -45
- package/docs/classes/PaintBrush.html +0 -15
- package/docs/classes/PanoMeasurePluginLine.html +0 -24
- package/docs/classes/PanoMeasurePluginModel.html +0 -23
- package/docs/classes/PanoMeasurePluginPoint.html +0 -7
- package/docs/classes/PanoMeasurePluginPolyline.html +0 -27
- package/docs/classes/PanoTagPluginController.html +0 -119
- package/docs/classes/Sculpt.html +0 -77
- package/docs/classes/Util.BetterTween.html +0 -6
- package/docs/classes/Util.FiveDomEvents.html +0 -13
- package/docs/classes/Util.FivePuppet.html +0 -20
- package/docs/classes/Util.Interval.html +0 -11
- package/docs/classes/Util.LegacyPointHelper.html +0 -7
- package/docs/classes/Util.LightTag.html +0 -47
- package/docs/classes/Util.LineSegments.html +0 -4
- package/docs/classes/Util.Magnifier.html +0 -26
- package/docs/classes/Util.Object3D.html +0 -8
- package/docs/classes/Util.PointDomHelper.html +0 -8
- package/docs/classes/Util.PointHelper.html +0 -10
- package/docs/classes/Util.PointSelector.html +0 -66
- package/docs/classes/Util.PointSelectorHelper.html +0 -14
- package/docs/classes/Util.Rectangle.html +0 -12
- package/docs/classes/Util.sculpt.BaseEditor.html +0 -17
- package/docs/classes/Util.sculpt.BoxMesh.html +0 -48
- package/docs/classes/Util.sculpt.BoxMeshEditor.html +0 -18
- package/docs/classes/Util.sculpt.CircleMesh.html +0 -26
- package/docs/classes/Util.sculpt.CircleMeshEditor.html +0 -18
- package/docs/classes/Util.sculpt.CircleWithEdgeMesh.html +0 -26
- package/docs/classes/Util.sculpt.CylinderMesh.html +0 -25
- package/docs/classes/Util.sculpt.CylinderMeshEditor.html +0 -18
- package/docs/classes/Util.sculpt.LineMesh.html +0 -34
- package/docs/classes/Util.sculpt.PointMesh.html +0 -24
- package/docs/classes/Util.sculpt.PolygonMesh.html +0 -40
- package/docs/classes/Util.sculpt.PrismMesh.html +0 -48
- package/docs/classes/Util.sculpt.PrismMeshEditor.html +0 -18
- package/docs/classes/Util.sculpt.RectangleMesh.html +0 -41
- package/docs/classes/Util.sculpt.RectangleMeshEditor.html +0 -18
- package/docs/classes/Util.sculpt.RectangleWithEdgeMesh.html +0 -44
- package/docs/classes/WalkController.html +0 -42
- package/docs/enums/CameraMovementEffect.html +0 -4
- package/docs/enums/ContentType.html +0 -34
- package/docs/enums/DIRECTION.html +0 -5
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +0 -5
- package/docs/enums/DimensionType.html +0 -4
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +0 -4
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +0 -5
- package/docs/enums/PaintBrushTypeEnum.html +0 -4
- package/docs/enums/PointType.html +0 -4
- package/docs/enums/Rotation.html +0 -5
- package/docs/functions/AreaMakerPlugin.html +0 -1
- package/docs/functions/CSS3DRenderPlugin.html +0 -1
- package/docs/functions/CameraMovementPlugin.html +0 -2
- package/docs/functions/CruisePlugin.html +0 -1
- package/docs/functions/CurrentPanoImagePlugin.html +0 -1
- package/docs/functions/FloorplanGuidePlugin.html +0 -1
- package/docs/functions/GuideLinePlugin.html +0 -1
- package/docs/functions/ItemLabelPlugin.html +0 -1
- package/docs/functions/MapviewFloorplanPlugin.html +0 -1
- package/docs/functions/MeasurePlugin.html +0 -1
- package/docs/functions/ModelChassisCompassPlugin.html +0 -2
- package/docs/functions/ModelEntryDoorGuidePlugin.html +0 -2
- package/docs/functions/ModelFloorplanPlugin.html +0 -1
- package/docs/functions/ModelItemLabelPlugin.html +0 -1
- package/docs/functions/ModelMakerPlugin.html +0 -1
- package/docs/functions/ModelRoomLabelPlugin.html +0 -1
- package/docs/functions/ModelTVVideoPlugin.html +0 -1
- package/docs/functions/ModelViewPlugin.html +0 -2
- package/docs/functions/MovePlugin.html +0 -1
- package/docs/functions/Object3DHelperPlugin.html +0 -1
- package/docs/functions/PanoCompassPlugin.html +0 -1
- package/docs/functions/PanoCursorRaycasterPlugin.html +0 -2
- package/docs/functions/PanoDoorLabelPlugin.html +0 -1
- package/docs/functions/PanoFloorplanRadarPlugin.html +0 -1
- package/docs/functions/PanoMeasurePlugin.html +0 -1
- package/docs/functions/PanoRulerPlugin.html +0 -2
- package/docs/functions/PanoRulerProPlugin.html +0 -2
- package/docs/functions/PanoSpatialTagPlugin.html +0 -2
- package/docs/functions/PanoTagPlugin.html +0 -1
- package/docs/functions/PanoVideoPlugin.html +0 -10
- package/docs/functions/PipelinePlugin.html +0 -1
- package/docs/functions/SculptPlugin.html +0 -2
- package/docs/functions/SculptPluginForFive.html +0 -2
- package/docs/functions/TopviewFloorplanPlugin.html +0 -1
- package/docs/functions/Util.awaitNextFrame.html +0 -1
- package/docs/functions/Util.blink.html +0 -13
- package/docs/functions/Util.blinkWithPreset.html +0 -6
- package/docs/functions/Util.bounding.html +0 -1
- package/docs/functions/Util.boundingBox.html +0 -1
- package/docs/functions/Util.boundingSphere.html +0 -1
- package/docs/functions/Util.boxVertex.html +0 -7
- package/docs/functions/Util.boxVertexes.html +0 -1
- package/docs/functions/Util.checkFiveModelLoaded.html +0 -2
- package/docs/functions/Util.cleanup.html +0 -3
- package/docs/functions/Util.convexHull.html +0 -2
- package/docs/functions/Util.equal.html +0 -5
- package/docs/functions/Util.fiveModelIsLoaded.html +0 -2
- package/docs/functions/Util.generatePolygonGeometry.html +0 -2
- package/docs/functions/Util.getCoordsFromClient.html +0 -1
- package/docs/functions/Util.getCoordsFromElement.html +0 -1
- package/docs/functions/Util.getFrameTime.html +0 -3
- package/docs/functions/Util.getGeometryArea.html +0 -1
- package/docs/functions/Util.getGeometryInfo.html +0 -1
- package/docs/functions/Util.getIntersectFromRelativePosition.html +0 -1
- package/docs/functions/Util.getRaycasterFromFivePointer.html +0 -1
- package/docs/functions/Util.initialCSS3DRender.html +0 -1
- package/docs/functions/Util.inside.html +0 -1
- package/docs/functions/Util.isModelLike.html +0 -1
- package/docs/functions/Util.isNil.html +0 -2
- package/docs/functions/Util.isPanoramaLike.html +0 -1
- package/docs/functions/Util.lookObject.html +0 -7
- package/docs/functions/Util.lookPoint.html +0 -5
- package/docs/functions/Util.nextFrame.html +0 -1
- package/docs/functions/Util.notNil.html +0 -2
- package/docs/functions/Util.reblink.html +0 -13
- package/docs/functions/Util.replaceStaticPrefix.html +0 -8
- package/docs/functions/Util.requestAnimationFrameInterval.html +0 -5
- package/docs/functions/Util.sculpt.createBox.html +0 -1
- package/docs/functions/Util.sculpt.createCircle.html +0 -1
- package/docs/functions/Util.sculpt.createCylinder.html +0 -1
- package/docs/functions/Util.sculpt.createLine.html +0 -2
- package/docs/functions/Util.sculpt.createPoint.html +0 -1
- package/docs/functions/Util.sculpt.createPolygon.html +0 -1
- package/docs/functions/Util.sculpt.createPrism.html +0 -1
- package/docs/functions/Util.sculpt.createRectangle.html +0 -2
- package/docs/functions/Util.sculpt.transformUnit.html +0 -1
- package/docs/functions/Util.sculpt.transformUnitSquare.html +0 -1
- package/docs/functions/Util.tag.html +0 -1
- package/docs/functions/Util.triangleArea.html +0 -2
- package/docs/functions/Util.triangleCenter.html +0 -2
- package/docs/functions/Util.tweenProgress.html +0 -1
- package/docs/functions/Util.uuid.html +0 -2
- package/docs/functions/Util.waitFiveModelLoaded.html +0 -2
- package/docs/functions/Util.worldBounding.html +0 -1
- package/docs/functions/Util.worldBoundingBox.html +0 -1
- package/docs/functions/Util.worldBoundingSphere.html +0 -1
- package/docs/functions/createPolyline.html +0 -2
- package/docs/functions/pluginFlag.html +0 -1
- package/docs/functions/validatePolygon.html +0 -1
- package/docs/hierarchy.html +0 -1
- package/docs/index.html +0 -70
- package/docs/interfaces/AreaMakerPluginType.AnimeOptions.html +0 -4
- package/docs/interfaces/AreaMakerPluginType.Config.html +0 -8
- package/docs/interfaces/AreaMakerPluginType.EventMap.html +0 -25
- package/docs/interfaces/AreaMakerPluginType.Params.html +0 -4
- package/docs/interfaces/AreaMakerPluginType.ServerAreaMakerItem.html +0 -20
- package/docs/interfaces/AreaMakerPluginType.ServerAreaMakerItemV1.html +0 -13
- package/docs/interfaces/AreaMakerPluginType.ServerDataV1.html +0 -9
- package/docs/interfaces/AreaMakerPluginType.ServerDataV2.html +0 -3
- package/docs/interfaces/AreaMakerPluginType.ShowHideOptions.html +0 -3
- package/docs/interfaces/AreaMakerPluginType.State.html +0 -8
- package/docs/interfaces/BoxAnimationConfig.html +0 -6
- package/docs/interfaces/BoxPosition.html +0 -8
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +0 -9
- package/docs/interfaces/CSS3DRenderPluginState.html +0 -7
- package/docs/interfaces/CameraMovementPluginExportType.html +0 -11
- package/docs/interfaces/ContentTypeMapInterface.html +0 -73
- package/docs/interfaces/CruisePluginTypes.Config.html +0 -7
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +0 -8
- package/docs/interfaces/CruisePluginTypes.EventMap.html +0 -33
- package/docs/interfaces/CruisePluginTypes.GuildLineConfig.html +0 -6
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +0 -16
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +0 -19
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +0 -20
- package/docs/interfaces/CruisePluginTypes.PluginData.html +0 -8
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +0 -2
- package/docs/interfaces/CruisePluginTypes.PluginState.html +0 -15
- package/docs/interfaces/CurrentPanoImagePluginType.Config.html +0 -13
- package/docs/interfaces/CurrentPanoImagePluginType.EventMap.html +0 -15
- package/docs/interfaces/CurrentPanoImagePluginType.Params.html +0 -4
- package/docs/interfaces/CurrentPanoImagePluginType.ShowHideOptions.html +0 -3
- package/docs/interfaces/CurrentPanoImagePluginType.State.html +0 -7
- package/docs/interfaces/FloorplanBounding.html +0 -9
- package/docs/interfaces/FloorplanData.html +0 -7
- package/docs/interfaces/FloorplanEntrance.html +0 -14
- package/docs/interfaces/FloorplanExtraObject.html +0 -9
- package/docs/interfaces/FloorplanExtraObject3D.html +0 -5
- package/docs/interfaces/FloorplanFloorData.html +0 -9
- package/docs/interfaces/FloorplanImagePosition.html +0 -4
- package/docs/interfaces/FloorplanObserver.html +0 -8
- package/docs/interfaces/FloorplanOutlineItem.html +0 -6
- package/docs/interfaces/FloorplanPosition.html +0 -4
- package/docs/interfaces/FloorplanRoomItem.html +0 -24
- package/docs/interfaces/FloorplanRoomLabelItem.html +0 -6
- package/docs/interfaces/FloorplanServerBounding.html +0 -9
- package/docs/interfaces/FloorplanServerComputedData.html +0 -6
- package/docs/interfaces/FloorplanServerData.html +0 -4
- package/docs/interfaces/FloorplanServerDoorItem.html +0 -6
- package/docs/interfaces/FloorplanServerDoorPosition.html +0 -4
- package/docs/interfaces/FloorplanServerEntrance.html +0 -14
- package/docs/interfaces/FloorplanServerFloorData.html +0 -8
- package/docs/interfaces/FloorplanServerImagePosition.html +0 -4
- package/docs/interfaces/FloorplanServerObserver.html +0 -8
- package/docs/interfaces/FloorplanServerOutlineItem.html +0 -6
- package/docs/interfaces/FloorplanServerPosition.html +0 -4
- package/docs/interfaces/FloorplanServerRoomItem.html +0 -27
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +0 -6
- package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +0 -4
- package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +0 -7
- package/docs/interfaces/GuideLinePluginType.EventMap.html +0 -13
- package/docs/interfaces/GuideLinePluginType.ExtraRouteData.html +0 -5
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +0 -8
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +0 -2
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +0 -32
- package/docs/interfaces/GuideLinePluginType.GuideLineMeshStyle.html +0 -4
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +0 -5
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +0 -42
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +0 -3
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +0 -57
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +0 -1
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +0 -2
- package/docs/interfaces/GuideLinePluginType.PluginState.html +0 -7
- package/docs/interfaces/GuideLinePluginType.Route.html +0 -13
- package/docs/interfaces/HelperOffset.html +0 -4
- package/docs/interfaces/ImagePlaneGroup.html +0 -3
- package/docs/interfaces/ItemLabelPluginData.html +0 -2
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +0 -7
- package/docs/interfaces/ItemLabelPluginParametersType.html +0 -5
- package/docs/interfaces/MinMax.html +0 -3
- package/docs/interfaces/ModelChassisCompassPluginData.html +0 -3
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +0 -4
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +0 -3
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +0 -4
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +0 -4
- package/docs/interfaces/ModelItemLabelPluginData.html +0 -2
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +0 -7
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +0 -3
- package/docs/interfaces/ModelMakerPluginType.BoxItemObjectData.html +0 -17
- package/docs/interfaces/ModelMakerPluginType.EventMap.html +0 -18
- package/docs/interfaces/ModelMakerPluginType.PrismItemObjectData.html +0 -23
- package/docs/interfaces/ModelMakerPluginType.ServerBaseItem.html +0 -11
- package/docs/interfaces/ModelMakerPluginType.ServerBoxItem.html +0 -10
- package/docs/interfaces/ModelMakerPluginType.ServerData.html +0 -3
- package/docs/interfaces/ModelMakerPluginType.ServerPrismItem.html +0 -10
- package/docs/interfaces/ModelMakerPluginType.ServerTrianglesItem.html +0 -10
- package/docs/interfaces/ModelMakerPluginType.State.html +0 -8
- package/docs/interfaces/ModelMakerPluginType.TrianglesItemObjectData.html +0 -11
- package/docs/interfaces/ModelRoomLabelPluginData.html +0 -2
- package/docs/interfaces/ModelTVVideoPluginData.html +0 -5
- package/docs/interfaces/ModelTVVideoPluginExportType.html +0 -4
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +0 -2
- package/docs/interfaces/ModelViewPluginExportType.html +0 -8
- package/docs/interfaces/Object3DHelperState.html +0 -4
- package/docs/interfaces/ObjectHelperControllers.html +0 -5
- package/docs/interfaces/PaintBrushAction.html +0 -14
- package/docs/interfaces/PaintBrushConfigs.html +0 -8
- package/docs/interfaces/PaintBrushState.html +0 -6
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +0 -16
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +0 -1
- package/docs/interfaces/PanoMeasureParameterType.html +0 -20
- package/docs/interfaces/PanoMeasurePluginLineJson.html +0 -4
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +0 -4
- package/docs/interfaces/PanoMeasurePluginPointJson.html +0 -3
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +0 -7
- package/docs/interfaces/PanoRulerPluginExportType.html +0 -6
- package/docs/interfaces/PanoRulerPluginOptions.html +0 -3
- package/docs/interfaces/PanoRulerPluginParameterType.html +0 -4
- package/docs/interfaces/PanoRulerProPluginExportType.html +0 -5
- package/docs/interfaces/PanoRulerProPluginOptions.html +0 -3
- package/docs/interfaces/PanoRulerProPluginParameterType.html +0 -3
- package/docs/interfaces/PanoRulerProPluginState.html +0 -4
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +0 -1
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +0 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +0 -7
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +0 -6
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +0 -9
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +0 -6
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +0 -9
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +0 -7
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +0 -6
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +0 -3
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +0 -8
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +0 -2
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +0 -15
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +0 -2
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +0 -14
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +0 -13
- package/docs/interfaces/PluginEventMap.html +0 -16
- package/docs/interfaces/Point.html +0 -4
- package/docs/interfaces/Room.html +0 -5
- package/docs/interfaces/RoomInfo.html +0 -3
- package/docs/interfaces/RoomLabel.html +0 -16
- package/docs/interfaces/RoomRules.html +0 -1
- package/docs/interfaces/Rooms.html +0 -1
- package/docs/interfaces/Scissor.html +0 -13
- package/docs/interfaces/SculptConfig.html +0 -19
- package/docs/interfaces/State.html +0 -7
- package/docs/interfaces/TagCacheInterface.html +0 -9
- package/docs/interfaces/TagConfig.html +0 -174
- package/docs/interfaces/TagGLTFObjectGroup.html +0 -3
- package/docs/interfaces/TagIconAnimationConfig.html +0 -7
- package/docs/interfaces/TagIconUrl.html +0 -22
- package/docs/interfaces/TagObjectGroup.html +0 -3
- package/docs/interfaces/TagState.html +0 -3
- package/docs/interfaces/TagStyle.html +0 -17
- package/docs/interfaces/Tags.html +0 -8
- package/docs/interfaces/TemporaryState.html +0 -2
- package/docs/interfaces/Util.AnimeInstance.html +0 -14
- package/docs/interfaces/Util.BlinkAnimeOptions.html +0 -21
- package/docs/interfaces/Util.EventHandlerConfig.html +0 -21
- package/docs/interfaces/Util.FiveDomEvent.html +0 -7
- package/docs/interfaces/Util.FiveDomEventMap.html +0 -20
- package/docs/interfaces/Util.LegacyMouseGroupParameter.html +0 -4
- package/docs/interfaces/Util.MagnifierParameter.html +0 -13
- package/docs/interfaces/Util.MouseGroupParameter.html +0 -4
- package/docs/interfaces/Util.ObjectInitialState.html +0 -9
- package/docs/interfaces/Util.PointIntersection.html +0 -21
- package/docs/interfaces/Util.PointSelectorHelperConfig.html +0 -6
- package/docs/interfaces/Util.ReBlinkAnimeOptions.html +0 -27
- package/docs/modules/AreaMakerPluginType.html +0 -17
- package/docs/modules/CruisePluginTypes.html +0 -14
- package/docs/modules/CurrentPanoImagePluginType.html +0 -6
- package/docs/modules/GuideLineItem.html +0 -2
- package/docs/modules/GuideLineModeItem.html +0 -3
- package/docs/modules/GuideLinePluginType.html +0 -25
- package/docs/modules/ModelMakerPluginType.html +0 -19
- package/docs/modules/PanoVideoPluginType.html +0 -8
- package/docs/modules/SculptData.html +0 -9
- package/docs/modules/SculptType.html +0 -2
- package/docs/modules/Util.html +0 -91
- package/docs/modules/Util.sculpt.html +0 -27
- package/docs/modules.html +0 -287
- package/docs/types/AddObject3DHelperConfig.html +0 -19
- package/docs/types/AreaMakerPluginType.AreaMakerItemEventMap.html +0 -7
- package/docs/types/AreaMakerPluginType.ItemRenderer.html +0 -1
- package/docs/types/AreaMakerPluginType.PluginData.html +0 -2
- package/docs/types/AreaMakerPluginType.ServerData.html +0 -2
- package/docs/types/ArrayPosition.html +0 -1
- package/docs/types/AudioAppearance.html +0 -1
- package/docs/types/BoxTag.html +0 -2
- package/docs/types/CSS3DRenderExportType.html +0 -1
- package/docs/types/CSS3DRenderPluginExportType.html +0 -1
- package/docs/types/CSS3DRenderPluginParameterType.html +0 -1
- package/docs/types/ClassFunctionParameters.html +0 -1
- package/docs/types/Color.html +0 -1
- package/docs/types/ContentTypeConfigKey.html +0 -1
- package/docs/types/ContentTypeConfigKeySplit.html +0 -1
- package/docs/types/ContentTypeMap.html +0 -1
- package/docs/types/Create3DDomContainerReturnType.html +0 -1
- package/docs/types/Create3DElementReturnType.html +0 -1
- package/docs/types/CruisePluginExportType.html +0 -1
- package/docs/types/CruisePluginTypes.CruiseData.html +0 -6
- package/docs/types/CruisePluginTypes.MoveEffect.html +0 -1
- package/docs/types/CurrentPanoImagePluginExportType.html +0 -1
- package/docs/types/DeprecatedMediaPlaneProperty.html +0 -3
- package/docs/types/DeprecatedTagProperty.html +0 -3
- package/docs/types/Direction-1.html +0 -1
- package/docs/types/Direction4.html +0 -1
- package/docs/types/ElementRenderer.html +0 -2
- package/docs/types/FloorplanGuidePluginParameterType.html +0 -1
- package/docs/types/FloorplanGuidePluginReturnType.html +0 -1
- package/docs/types/FloorplanRuleLabels.html +0 -2
- package/docs/types/FloorplanServerRuleLabels.html +0 -1
- package/docs/types/GuideLinePluginExportType.html +0 -1
- package/docs/types/GuideLinePluginType.GuideLineItem.html +0 -2
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +0 -1
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +0 -1
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +0 -2
- package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +0 -2
- package/docs/types/GuideLinePluginType.PathItem.html +0 -2
- package/docs/types/GuideLinePluginType.PluginData.html +0 -2
- package/docs/types/GuideLinePluginType.RouteConfig.html +0 -4
- package/docs/types/HelperEventMap.html +0 -1
- package/docs/types/InternalHelperEventMap.html +0 -1
- package/docs/types/MapviewFloorplanPluginParameterType.html +0 -1
- package/docs/types/MapviewFloorplanPluginReturnType.html +0 -1
- package/docs/types/MaskPosition.html +0 -3
- package/docs/types/MaskTag.html +0 -2
- package/docs/types/MeasureEndReason.html +0 -1
- package/docs/types/MeasurePluginConfig.html +0 -5
- package/docs/types/MeasurePluginEventMap.html +0 -1
- package/docs/types/MediaData.html +0 -2
- package/docs/types/MediaStore.html +0 -1
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +0 -1
- package/docs/types/ModelFloorplanPluginParameterType.html +0 -1
- package/docs/types/ModelFloorplanPluginReturnType.html +0 -1
- package/docs/types/ModelId.html +0 -1
- package/docs/types/ModelMakerPluginType.ElementRenderer.html +0 -1
- package/docs/types/ModelMakerPluginType.ItemType.html +0 -2
- package/docs/types/ModelMakerPluginType.MarkerItem.html +0 -1
- package/docs/types/ModelMakerPluginType.ServerItem.html +0 -2
- package/docs/types/ModelRoomLabelPluginParameters.html +0 -1
- package/docs/types/ModelRoomLabelPluginReturnType.html +0 -1
- package/docs/types/MoveArgs.html +0 -2
- package/docs/types/MoveOpts.html +0 -2
- package/docs/types/Object3DHelperEventMap.html +0 -1
- package/docs/types/ObjectFit.html +0 -1
- package/docs/types/PaintBrushEventMap.html +0 -1
- package/docs/types/PanoCompassPluginData.html +0 -1
- package/docs/types/PanoCompassPluginExportType.html +0 -1
- package/docs/types/PanoCompassPluginParameterType.html +0 -1
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +0 -1
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +0 -1
- package/docs/types/PanoIndex.html +0 -1
- package/docs/types/PanoMeasurePluginEvent.html +0 -1
- package/docs/types/PanoMeasureReturnType.html +0 -1
- package/docs/types/PanoSpatialTagPluginId.html +0 -1
- package/docs/types/PanoTagPluginExportInterface.html +0 -1
- package/docs/types/PanoTagPluginParamsInterface.html +0 -1
- package/docs/types/PanoVideoPluginParameterType.html +0 -1
- package/docs/types/PanoVideoPluginReturnType.html +0 -1
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +0 -2
- package/docs/types/PipelinePluginParameterType.html +0 -1
- package/docs/types/PipelinePluginReturnType.html +0 -1
- package/docs/types/PlaneTag.html +0 -2
- package/docs/types/Point2DTag.html +0 -2
- package/docs/types/Point3DTag.html +0 -2
- package/docs/types/PointTagInstance.html +0 -1
- package/docs/types/PolygonPosition.html +0 -3
- package/docs/types/PolygonTag.html +0 -2
- package/docs/types/Position.html +0 -1
- package/docs/types/PositionFrom.html +0 -1
- package/docs/types/RotateArgs.html +0 -2
- package/docs/types/RotateOpts.html +0 -2
- package/docs/types/RuleLabelsKey.html +0 -1
- package/docs/types/RuleLabelsValue.html +0 -1
- package/docs/types/ScaleCallback.html +0 -1
- package/docs/types/ScalePosition.html +0 -3
- package/docs/types/SculptData.BoxData.html +0 -1
- package/docs/types/SculptData.CircleData.html +0 -1
- package/docs/types/SculptData.CylinderData.html +0 -1
- package/docs/types/SculptData.PointData.html +0 -1
- package/docs/types/SculptData.PolygonData.html +0 -1
- package/docs/types/SculptData.PolylineData.html +0 -1
- package/docs/types/SculptData.PrismData.html +0 -1
- package/docs/types/SculptData.RectangleData.html +0 -1
- package/docs/types/SculptType.Theme.html +0 -10
- package/docs/types/StickType.html +0 -1
- package/docs/types/Tag.html +0 -17
- package/docs/types/Tag2D.html +0 -2
- package/docs/types/Tag3D.html +0 -2
- package/docs/types/TagClickParams.html +0 -1
- package/docs/types/TagConfigByKey.html +0 -1
- package/docs/types/TagContentType.html +0 -1
- package/docs/types/TagContentTypeMapping.html +0 -1
- package/docs/types/TagDimensionType.html +0 -1
- package/docs/types/TagElement.html +0 -2
- package/docs/types/TagEvents.html +0 -1
- package/docs/types/TagGLTFObject.html +0 -1
- package/docs/types/TagHooks.html +0 -1
- package/docs/types/TagId.html +0 -1
- package/docs/types/TagInstance.html +0 -1
- package/docs/types/TagPlacement.html +0 -5
- package/docs/types/TagPointType.html +0 -2
- package/docs/types/TagRendererMap.html +0 -1
- package/docs/types/TopviewFloorplanPluginParameterType.html +0 -1
- package/docs/types/TopviewFloorplanPluginReturnType.html +0 -1
- package/docs/types/Util.ActionIfNoIntersection.html +0 -1
- package/docs/types/Util.AdherePoint.html +0 -2
- package/docs/types/Util.PointSelectorConfig.html +0 -1
- package/docs/types/Util.SupportedTarget.html +0 -2
- package/docs/types/Util.Target.html +0 -2
- package/docs/types/Util.ThreeObject.html +0 -2
- package/docs/types/WorkCode.html +0 -1
- package/docs/variables/FLOOR_TYPE_MAP.html +0 -2
- package/docs/variables/PLUGIN.html +0 -1
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +0 -2
- package/docs/variables/ROOM_TYPE_MAP.html +0 -2
- package/docs/variables/Util.ANIME_PRESETS.html +0 -2
- package/docs/variables/Util.CURRENT_PANO_IMAGE_DEFAULT_IMAGE.html +0 -2
- package/docs/variables/Util.DEFAULT_ANIME_CONFIG.html +0 -2
- package/docs/variables/Util.DEFAULT_STATIC_PREFIX.html +0 -2
- package/docs/variables/Util.DNALOGEL_DEFAULT_ASSETS.html +0 -2
- package/docs/variables/Util.ENTRY_DOOR_DEFAULT_IMAGE.html +0 -2
- package/docs/variables/Util.FLOORPLAN_DEFAULT_IMAGE.html +0 -2
- package/docs/variables/Util.GUIDELINE_DEFAULT_ARROW_TEXTURE.html +0 -2
- package/docs/variables/Util.GUIDELINE_WHITE_ARROW_TEXTURE.html +0 -2
- package/docs/variables/Util.MODEL_CHASSIS_COMPASS_DEFAULT_MODEL.html +0 -2
- package/docs/variables/Util.MODEL_ENTRY_DOOR_GUIDE_PLUGIN_DEFAULT_MODEL.html +0 -2
- package/docs/variables/Util.PANO_COMPASS_DEFAULT_IMAGE.html +0 -2
- package/docs/variables/Util.PANO_SPATIAL_TAG_BLUR_IMAGE.html +0 -2
- package/docs/variables/Util.PANO_TAG_DEFAULT_LINK_ICON.html +0 -2
- package/docs/variables/defaultGlobalConfig.html +0 -1
- package/docs/variables/itemLabelPluginServerParams.html +0 -1
- package/docs/variables/modelItemLabelPluginServerParams.html +0 -1
- package/docs/variables/modelRoomLabelPluginServerParams.html +0 -1
|
@@ -0,0 +1,617 @@
|
|
|
1
|
+
var U = Object.defineProperty;
|
|
2
|
+
var E = Object.getOwnPropertySymbols;
|
|
3
|
+
var I = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var w = (n, r, e) => r in n ? U(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e, M = (n, r) => {
|
|
5
|
+
for (var e in r || (r = {}))
|
|
6
|
+
I.call(r, e) && w(n, e, r[e]);
|
|
7
|
+
if (E)
|
|
8
|
+
for (var e of E(r))
|
|
9
|
+
P.call(r, e) && w(n, e, r[e]);
|
|
10
|
+
return n;
|
|
11
|
+
};
|
|
12
|
+
var c = (n, r, e) => (w(n, typeof r != "symbol" ? r + "" : r, e), e);
|
|
13
|
+
var v = (n, r, e) => new Promise((t, s) => {
|
|
14
|
+
var a = (l) => {
|
|
15
|
+
try {
|
|
16
|
+
i(e.next(l));
|
|
17
|
+
} catch (u) {
|
|
18
|
+
s(u);
|
|
19
|
+
}
|
|
20
|
+
}, o = (l) => {
|
|
21
|
+
try {
|
|
22
|
+
i(e.throw(l));
|
|
23
|
+
} catch (u) {
|
|
24
|
+
s(u);
|
|
25
|
+
}
|
|
26
|
+
}, i = (l) => l.done ? t(l.value) : Promise.resolve(l.value).then(a, o);
|
|
27
|
+
i((e = e.apply(n, r)).next());
|
|
28
|
+
});
|
|
29
|
+
import { BaseTag as F } from "./BaseTag.js";
|
|
30
|
+
import * as m from "three";
|
|
31
|
+
import { maskVertexShader as V, maskFragmentShader as R } from "./MaskTag.shaders.js";
|
|
32
|
+
import { transformPosition as $ } from "../../../shared-utils/five/transformPosition.js";
|
|
33
|
+
import "../../../shared-utils/Subscribe.js";
|
|
34
|
+
import "../../utils/tag/calculateTagConfig.js";
|
|
35
|
+
import "../../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
36
|
+
import "../../../shared-utils/typescript/entries.js";
|
|
37
|
+
import "../../utils/tag/adaptConfig.js";
|
|
38
|
+
import "../../typings/tag/TagConfig.js";
|
|
39
|
+
import "@realsee/five";
|
|
40
|
+
import "../../../shared-utils/tag.js";
|
|
41
|
+
import "../../../shared-utils/positionToVector3.js";
|
|
42
|
+
import "../../../shared-utils/five/vector3ToScreen.js";
|
|
43
|
+
import "../../../shared-utils/five/getFiveModel.js";
|
|
44
|
+
import "../../../shared-utils/Utils/FiveUtil.js";
|
|
45
|
+
import "../../../shared-utils/Utils/BaseUtil.js";
|
|
46
|
+
import "../../../shared-utils/Utils/WorkUtil.js";
|
|
47
|
+
import "../../../shared-utils/three/temp.js";
|
|
48
|
+
import "../../../shared-utils/three/core/Raycaster.js";
|
|
49
|
+
import "../../../shared-utils/dom/resizeObserver.js";
|
|
50
|
+
import "../../../shared-utils/five/fiveEveryReadyListener.js";
|
|
51
|
+
import "../../../shared-utils/throttle.js";
|
|
52
|
+
import "../../../vendor/hammerjs/hammer.js";
|
|
53
|
+
import "../../../shared-utils/three/PointSelector/index.js";
|
|
54
|
+
import "../../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
55
|
+
import "../../../shared-utils/three/Magnifier.js";
|
|
56
|
+
import "../../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
57
|
+
import "../../../shared-utils/three/Assets/index.js";
|
|
58
|
+
import "../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
59
|
+
import "../../../shared-utils/even.js";
|
|
60
|
+
import "../../../shared-utils/CSS3DRender/OpacityMesh.js";
|
|
61
|
+
import "../../../shared-utils/three/centerPoint.js";
|
|
62
|
+
import "../../../shared-utils/three/getObjectVisible.js";
|
|
63
|
+
import "../../../shared-utils/three/CSS3DRenderer/index.js";
|
|
64
|
+
import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
65
|
+
import "@realsee/five/line";
|
|
66
|
+
import "../../../shared-utils/isNil.js";
|
|
67
|
+
import "../../../shared-utils/three/core/Five_LineMaterial2.js";
|
|
68
|
+
import "../../../shared-utils/three/core/Sphere.js";
|
|
69
|
+
import "../../../shared-utils/three/blink.js";
|
|
70
|
+
import "../../../vendor/animejs/lib/anime.es.js";
|
|
71
|
+
import "../../../shared-utils/util.js";
|
|
72
|
+
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
73
|
+
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
74
|
+
import "../../../shared-utils/CSS3DRender/CSS3DRenderer.js";
|
|
75
|
+
import "../../../shared-utils/createResizeObserver.js";
|
|
76
|
+
import "../../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
77
|
+
import "../../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
78
|
+
import "../../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
79
|
+
import "../../../shared-utils/three/PointSelector/utils/html.js";
|
|
80
|
+
import "../../../shared-utils/CSS3DRender/index.js";
|
|
81
|
+
import "../../../shared-utils/five/fiveModelLoad.js";
|
|
82
|
+
import "../../../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
83
|
+
import "../../../Sculpt/Meshes/Line.js";
|
|
84
|
+
import "../../../Sculpt/typings/style.js";
|
|
85
|
+
import "../../../shared-utils/three/IObject3D.js";
|
|
86
|
+
import "../../../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
87
|
+
import "../../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
88
|
+
import "../../../shared-utils/three/core/LineGeometry.js";
|
|
89
|
+
import "../../../shared-utils/three/core/LineMaterial.js";
|
|
90
|
+
import "../../../shared-utils/three/core/Line2.js";
|
|
91
|
+
import "../../../shared-utils/three/core/LineMaterial2.js";
|
|
92
|
+
import "../../../Sculpt/utils/unit.js";
|
|
93
|
+
import "../../../Sculpt/utils/renderDom.js";
|
|
94
|
+
import "../../../vendor/earcut/src/earcut.js";
|
|
95
|
+
import "../../../shared-utils/five/FivePuppet.js";
|
|
96
|
+
import "../../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
97
|
+
import "../../../shared-utils/isTouchDevice.js";
|
|
98
|
+
import "../../../shared-utils/five/getPosition.js";
|
|
99
|
+
import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
100
|
+
import "../../../shared-utils/three/PointSelector/utils/contents.js";
|
|
101
|
+
import "../../../Sculpt/utils/three/rayOnLine.js";
|
|
102
|
+
import "../../../shared-utils/five/mode.js";
|
|
103
|
+
import "../../utils/tag/format.js";
|
|
104
|
+
import "../../../shared-utils/url/defaultUrls.js";
|
|
105
|
+
import "../../../shared-utils/vectorToCoordinate.js";
|
|
106
|
+
import "../../../shared-utils/formatRad.js";
|
|
107
|
+
import "../../../shared-utils/five/lookPoint.js";
|
|
108
|
+
import "../../../shared-utils/uuid.js";
|
|
109
|
+
import "../../utils/tagPosition.js";
|
|
110
|
+
import "../../utils/tag/tagCheck.js";
|
|
111
|
+
import "../../utils/checkRange.js";
|
|
112
|
+
import "../../../shared-utils/url/getUrl.js";
|
|
113
|
+
import "../../../shared-utils/five/getFloorIndex.js";
|
|
114
|
+
import "../../../shared-utils/safeObj.js";
|
|
115
|
+
import "../../utils/Cache.js";
|
|
116
|
+
import "../../../shared-utils/promise/withResolvers.js";
|
|
117
|
+
function C(n) {
|
|
118
|
+
if (Array.isArray(n))
|
|
119
|
+
return n;
|
|
120
|
+
if (typeof n == "number")
|
|
121
|
+
return [n >> 16 & 255, n >> 8 & 255, n & 255];
|
|
122
|
+
if (typeof n == "string") {
|
|
123
|
+
let r = n.trim().replace(/^#/, "");
|
|
124
|
+
if (r.length === 3 && (r = r[0] + r[0] + r[1] + r[1] + r[2] + r[2]), r.length === 6) {
|
|
125
|
+
const e = parseInt(r.substring(0, 2), 16), t = parseInt(r.substring(2, 4), 16), s = parseInt(r.substring(4, 6), 16);
|
|
126
|
+
if (!isNaN(e) && !isNaN(t) && !isNaN(s))
|
|
127
|
+
return [e, t, s];
|
|
128
|
+
}
|
|
129
|
+
console.warn("[MaskTag] Invalid hex color string:", n);
|
|
130
|
+
}
|
|
131
|
+
return [0, 0, 0];
|
|
132
|
+
}
|
|
133
|
+
const h = class extends F {
|
|
134
|
+
constructor(e, t) {
|
|
135
|
+
super(e, t);
|
|
136
|
+
/**
|
|
137
|
+
* mask 图片 URL 或 Canvas 元素(2:1 全景图格式)
|
|
138
|
+
*/
|
|
139
|
+
c(this, "maskUrl");
|
|
140
|
+
/**
|
|
141
|
+
* 目标颜色(RGB 格式)
|
|
142
|
+
*/
|
|
143
|
+
c(this, "targetColor");
|
|
144
|
+
/**
|
|
145
|
+
* mask 渲染的 mesh 对象(使用 Sphere)
|
|
146
|
+
*/
|
|
147
|
+
c(this, "maskMesh");
|
|
148
|
+
/**
|
|
149
|
+
* mask 纹理对象
|
|
150
|
+
*/
|
|
151
|
+
c(this, "maskTexture");
|
|
152
|
+
/**
|
|
153
|
+
* 是否正在加载 mask
|
|
154
|
+
*/
|
|
155
|
+
c(this, "loadingMask", !1);
|
|
156
|
+
/**
|
|
157
|
+
* 资源是否已释放
|
|
158
|
+
*/
|
|
159
|
+
c(this, "_disposed", !1);
|
|
160
|
+
/**
|
|
161
|
+
* 标签样式配置
|
|
162
|
+
*/
|
|
163
|
+
c(this, "tagStyle");
|
|
164
|
+
/**
|
|
165
|
+
* 点击事件清理函数
|
|
166
|
+
*/
|
|
167
|
+
c(this, "clickEventDispose");
|
|
168
|
+
const s = t.maskUrl;
|
|
169
|
+
s instanceof HTMLCanvasElement ? this.maskUrl = s : typeof s == "string" && s ? this.maskUrl = s : this.maskUrl = "";
|
|
170
|
+
const a = t.color;
|
|
171
|
+
this.targetColor = C(a), a || console.warn(`[MaskTag] No color provided for tag ${t.id}, using default [0, 0, 0]`), this.tagStyle = t.style, this.updateVisible(), this.currentVisible ? this.initializeMaskMesh() : console.log(`[MaskTag] Tag ${t.id} is not visible initially`);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* 计算法向量
|
|
175
|
+
* Mask 标签返回向上的法向量(因为是贴在 cube 面上)
|
|
176
|
+
*/
|
|
177
|
+
computeNormal() {
|
|
178
|
+
return new m.Vector3(0, 1, 0);
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* 获取额外的闪烁目标
|
|
182
|
+
* 返回 maskMesh 用于 blink 动画
|
|
183
|
+
*/
|
|
184
|
+
getAdditionalBlinkTargets() {
|
|
185
|
+
return this.maskMesh || null;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* 更新标签数据
|
|
189
|
+
*/
|
|
190
|
+
set(e, t = !0) {
|
|
191
|
+
var a, o;
|
|
192
|
+
super.set(e, t), e.style && (this.tagStyle = M(M({}, this.tagStyle), e.style), (a = e.style) != null && a.mask && this.updateMaskStyle());
|
|
193
|
+
const s = (o = e.mask) != null ? o : e.maskUrl;
|
|
194
|
+
if (s) {
|
|
195
|
+
const i = this.maskUrl;
|
|
196
|
+
this.maskUrl = s, this.reloadMask(i);
|
|
197
|
+
}
|
|
198
|
+
e.color !== void 0 && (this.targetColor = C(e.color), this.updateMaskStyle());
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* 重写 getVisible 方法
|
|
202
|
+
* Mask 标签仅在当前点位可见
|
|
203
|
+
*/
|
|
204
|
+
getVisible(e) {
|
|
205
|
+
var t;
|
|
206
|
+
try {
|
|
207
|
+
if (!this.enabled || !this.plugin.state.enabled || !this.fiveUtil.model || !this.maskUrl)
|
|
208
|
+
return !1;
|
|
209
|
+
const s = M(M({}, this.five.getCurrentState()), e), { panoIndex: a } = s;
|
|
210
|
+
return a !== ((t = this.fiveState) == null ? void 0 : t.panoIndex) ? !1 : super.getVisible(s);
|
|
211
|
+
} catch (s) {
|
|
212
|
+
return !1;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* 重写 computeVisible 方法
|
|
217
|
+
* 增加 Mask 特有的可见性检查逻辑,用于 whyHide 功能
|
|
218
|
+
*/
|
|
219
|
+
computeVisible(e) {
|
|
220
|
+
var a, o, i;
|
|
221
|
+
const t = M(M({}, this.five.getCurrentState()), e), { panoIndex: s } = t;
|
|
222
|
+
return this.maskUrl ? s !== ((a = this.fiveState) == null ? void 0 : a.panoIndex) ? {
|
|
223
|
+
value: !1,
|
|
224
|
+
reason: {
|
|
225
|
+
type: "panoIndex mismatch",
|
|
226
|
+
detail: `Mask 标签仅在当前点位可见。当前点位: ${s}, 标签点位: ${(o = this.fiveState) == null ? void 0 : o.panoIndex}`,
|
|
227
|
+
currentPanoIndex: s,
|
|
228
|
+
tagPanoIndex: (i = this.fiveState) == null ? void 0 : i.panoIndex
|
|
229
|
+
}
|
|
230
|
+
} : super.computeVisible(e) : {
|
|
231
|
+
value: !1,
|
|
232
|
+
reason: {
|
|
233
|
+
type: "maskUrl invalid",
|
|
234
|
+
detail: `Mask 标签 ${this.id} 的 maskUrl 无效`,
|
|
235
|
+
maskUrl: this.maskUrl
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* 点击事件处理
|
|
241
|
+
*/
|
|
242
|
+
onClick(e) {
|
|
243
|
+
e.target === "TagMaskModel" && this.unfoldAndFoldOthers();
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* 展开自己,收起其他标签
|
|
247
|
+
*/
|
|
248
|
+
unfoldAndFoldOthers() {
|
|
249
|
+
if (this.isPopoverConfigEnabled())
|
|
250
|
+
return;
|
|
251
|
+
const e = this.can("fold"), t = this.can("unfold");
|
|
252
|
+
e && t && (this.state.unfolded = !this.state.unfolded, this.manuallyOperated = !0, this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] }), this.state.unfolded && this.plugin.tags.forEach((s) => {
|
|
253
|
+
s.id !== this.id && s.fold();
|
|
254
|
+
}));
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* 展开标签详情
|
|
258
|
+
*/
|
|
259
|
+
unfold() {
|
|
260
|
+
this.isPopoverConfigEnabled() || this.setUnfold(!0);
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* 折叠标签详情
|
|
264
|
+
*/
|
|
265
|
+
fold() {
|
|
266
|
+
this.isPopoverConfigEnabled() || this.setUnfold(!1);
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* 设置展开/折叠状态
|
|
270
|
+
*/
|
|
271
|
+
setUnfold(e) {
|
|
272
|
+
if (this.isPopoverConfigEnabled())
|
|
273
|
+
return;
|
|
274
|
+
const t = this.can("fold"), s = this.can("unfold");
|
|
275
|
+
t && s && (this.state.unfolded = e, this.hooks.emit(e ? "unfolded" : "folded"), this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] }));
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* 更新屏幕位置
|
|
279
|
+
*/
|
|
280
|
+
updateScreenPosition() {
|
|
281
|
+
if (!this.currentVisible || !this.position || !Array.isArray(this.position)) {
|
|
282
|
+
this.screenPosition = null, this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] });
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
const t = new m.Vector3(...this.position).clone().project(this.five.camera);
|
|
286
|
+
if (this.five.renderer) {
|
|
287
|
+
const s = this.five.renderer.getSize(new m.Vector2());
|
|
288
|
+
this.screenPosition = {
|
|
289
|
+
leftPx: (t.x + 1) / 2 * s.x,
|
|
290
|
+
topPx: (-t.y + 1) / 2 * s.y,
|
|
291
|
+
scale: 1
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] });
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* 应用可见性变化
|
|
298
|
+
*/
|
|
299
|
+
applyVisible() {
|
|
300
|
+
try {
|
|
301
|
+
if (!this.maskUrl) {
|
|
302
|
+
console.warn(`[MaskTag] ${this.id} cannot apply visible: maskUrl is invalid`);
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
this.visible && !this.maskMesh && !this.loadingMask && this.initializeMaskMesh(), this.maskMesh && (this.maskMesh.visible = this.visible, this.updateMeshTransform()), this.updateScreenPosition();
|
|
306
|
+
} catch (e) {
|
|
307
|
+
console.error(`[MaskTag] Error in applyVisible for tag ${this.id}:`, e);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* 更新 mesh 的位置和旋转(跟随观察者)
|
|
312
|
+
* 参考 itemMask 实现
|
|
313
|
+
*/
|
|
314
|
+
updateMeshTransform() {
|
|
315
|
+
var s;
|
|
316
|
+
if (!this.maskMesh)
|
|
317
|
+
return;
|
|
318
|
+
const e = (s = this.fiveState) == null ? void 0 : s.panoIndex;
|
|
319
|
+
if (e === void 0)
|
|
320
|
+
return;
|
|
321
|
+
const t = this.workUtil.getObserver(e);
|
|
322
|
+
t && (this.maskMesh.position.copy($(t.position, this.workUtil.transform)), this.maskMesh.quaternion.copy(t.quaternion), this.five.needsRender = !0);
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* 初始化 Mask Mesh(使用 Sphere)
|
|
326
|
+
*/
|
|
327
|
+
initializeMaskMesh() {
|
|
328
|
+
return v(this, null, function* () {
|
|
329
|
+
if (this.maskMesh || this.loadingMask || !this.maskUrl)
|
|
330
|
+
return;
|
|
331
|
+
this.loadingMask = !0;
|
|
332
|
+
const e = performance.now();
|
|
333
|
+
try {
|
|
334
|
+
this.maskTexture = yield h.loadMaskTexture(this.maskUrl), this.maskMesh = this.createSphereMesh(this.maskTexture), this.plugin.imagePlaneGroup.add(this.maskMesh), this.applyVisible(), this.five.needsRender = !0, this.setupClickEvents(), this.updateScreenPosition();
|
|
335
|
+
const t = performance.now() - e;
|
|
336
|
+
console.log(`[MaskTag Performance] Mesh initialized in ${t.toFixed(2)}ms for tag ${this.id}`);
|
|
337
|
+
} catch (t) {
|
|
338
|
+
console.error("[MaskTag] Failed to initialize mask mesh:", t);
|
|
339
|
+
} finally {
|
|
340
|
+
this.loadingMask = !1;
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* 创建 Sphere mesh(参考 itemMask 实现)
|
|
346
|
+
*/
|
|
347
|
+
createSphereMesh(e) {
|
|
348
|
+
const t = this.getMaskStyle(), s = new m.Vector4(this.targetColor[0] / 255, this.targetColor[1] / 255, this.targetColor[2] / 255, 1), a = new m.ShaderMaterial({
|
|
349
|
+
vertexShader: V,
|
|
350
|
+
fragmentShader: R,
|
|
351
|
+
uniforms: {
|
|
352
|
+
map: { value: e },
|
|
353
|
+
color: { value: s },
|
|
354
|
+
tolerance: { value: t.tolerance / 255 },
|
|
355
|
+
// 归一化容差
|
|
356
|
+
highlightColor: {
|
|
357
|
+
value: new m.Vector3(t.highlightColor[0] / 255, t.highlightColor[1] / 255, t.highlightColor[2] / 255)
|
|
358
|
+
},
|
|
359
|
+
opacity: { value: t.opacity }
|
|
360
|
+
},
|
|
361
|
+
depthWrite: !1,
|
|
362
|
+
depthTest: !1,
|
|
363
|
+
transparent: !0
|
|
364
|
+
}), o = new m.SphereGeometry(1, 60, 40);
|
|
365
|
+
o.rotateY(-Math.PI / 2), o.scale(-1, 1, 1);
|
|
366
|
+
const i = new m.Mesh(o, a);
|
|
367
|
+
i.renderOrder = -1e3;
|
|
368
|
+
let l = null;
|
|
369
|
+
const u = () => {
|
|
370
|
+
if (l)
|
|
371
|
+
return l;
|
|
372
|
+
if (!e.image)
|
|
373
|
+
return null;
|
|
374
|
+
try {
|
|
375
|
+
const f = document.createElement("canvas"), d = f.getContext("2d");
|
|
376
|
+
if (!d)
|
|
377
|
+
return null;
|
|
378
|
+
const p = e.image;
|
|
379
|
+
return f.width = p.width, f.height = p.height, d.drawImage(p, 0, 0), l = d.getImageData(0, 0, p.width, p.height), l;
|
|
380
|
+
} catch (f) {
|
|
381
|
+
return console.error("[MaskTag] Failed to get image data:", f), null;
|
|
382
|
+
}
|
|
383
|
+
}, g = i.raycast.bind(i);
|
|
384
|
+
return i.raycast = (f, d) => {
|
|
385
|
+
const p = [];
|
|
386
|
+
if (g(f, p), p.length > 0) {
|
|
387
|
+
const y = p[0];
|
|
388
|
+
if (y.uv && e.image) {
|
|
389
|
+
const k = u();
|
|
390
|
+
if (k) {
|
|
391
|
+
const S = Math.floor(y.uv.x * k.width), T = (Math.floor((1 - y.uv.y) * k.height) * k.width + S) * 4, b = [k.data[T], k.data[T + 1], k.data[T + 2]];
|
|
392
|
+
Math.abs(b[0] / 255 - this.targetColor[0] / 255) + Math.abs(b[1] / 255 - this.targetColor[1] / 255) + Math.abs(b[2] / 255 - this.targetColor[2] / 255) < t.tolerance && d.push(y);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}, i.__maskTag = this.id, i.__maskMesh = !0, i;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* 获取 Mask 样式配置(合并用户配置和默认值)
|
|
400
|
+
*/
|
|
401
|
+
getMaskStyle() {
|
|
402
|
+
var s, a, o;
|
|
403
|
+
const e = ((s = this.tagStyle) == null ? void 0 : s.mask) || {};
|
|
404
|
+
let t = [255, 255, 255];
|
|
405
|
+
return e.color !== void 0 ? t = C(e.color) : e.highlightColor !== void 0 && (t = C(e.highlightColor)), {
|
|
406
|
+
tolerance: (a = e.tolerance) != null ? a : 1e-3,
|
|
407
|
+
// 参考 itemMask 默认 0.001(归一化后的值)
|
|
408
|
+
highlightColor: t,
|
|
409
|
+
opacity: (o = e.opacity) != null ? o : 0.6
|
|
410
|
+
// 默认 0.6(用于填充区域)
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* 设置点击事件
|
|
415
|
+
*/
|
|
416
|
+
setupClickEvents() {
|
|
417
|
+
if (!this.maskMesh || this.config.clickable === !1)
|
|
418
|
+
return;
|
|
419
|
+
this.cleanupClickEvents();
|
|
420
|
+
const e = (t) => {
|
|
421
|
+
this.plugin.hooks.emit("click", { event: t, target: "TagMaskModel", tag: this });
|
|
422
|
+
};
|
|
423
|
+
requestAnimationFrame(() => {
|
|
424
|
+
!this.maskMesh || !this.plugin.domEvents || (this.clickEventDispose = this.addObjectClickHandler(this, this.maskMesh, e));
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* 清理点击事件
|
|
429
|
+
*/
|
|
430
|
+
cleanupClickEvents() {
|
|
431
|
+
this.clickEventDispose && (this.clickEventDispose(), this.clickEventDispose = void 0);
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* 重新加载 mask 图
|
|
435
|
+
* @param oldMaskUrl 旧的 mask 源,用于正确释放纹理缓存(调用 set 时已更新 this.maskUrl,需传入旧值)
|
|
436
|
+
*/
|
|
437
|
+
reloadMask(e) {
|
|
438
|
+
return v(this, null, function* () {
|
|
439
|
+
this.maskMesh && (this.maskMesh.parent && this.maskMesh.parent.remove(this.maskMesh), this.maskMesh.geometry.dispose(), this.maskMesh.material && (Array.isArray(this.maskMesh.material) ? this.maskMesh.material.forEach((s) => s.dispose()) : this.maskMesh.material.dispose()), this.maskMesh = void 0);
|
|
440
|
+
const t = e != null ? e : this.maskUrl;
|
|
441
|
+
this.maskTexture && t && (h.releaseMaskTexture(t), this.maskTexture = void 0), yield this.initializeMaskMesh();
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* 更新 mask 样式
|
|
446
|
+
*/
|
|
447
|
+
updateMaskStyle() {
|
|
448
|
+
if (!this.maskMesh)
|
|
449
|
+
return;
|
|
450
|
+
const e = this.getMaskStyle(), t = this.maskMesh.material;
|
|
451
|
+
t.uniforms && (t.uniforms.color.value.set(this.targetColor[0] / 255, this.targetColor[1] / 255, this.targetColor[2] / 255, 1), t.uniforms.tolerance.value = e.tolerance / 255, t.uniforms.highlightColor.value.set(
|
|
452
|
+
e.highlightColor[0] / 255,
|
|
453
|
+
e.highlightColor[1] / 255,
|
|
454
|
+
e.highlightColor[2] / 255
|
|
455
|
+
), t.uniforms.opacity.value = e.opacity), this.five.needsRender = !0;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* 更新 Canvas 纹理(仅当 maskUrl 为 Canvas 时有效)
|
|
459
|
+
* 当 canvas 内容发生变化时,调用此方法更新渲染
|
|
460
|
+
*/
|
|
461
|
+
updateCanvasTexture() {
|
|
462
|
+
if (!this.maskTexture || typeof this.maskUrl == "string") {
|
|
463
|
+
console.warn("[MaskTag] updateCanvasTexture only works for Canvas-based masks");
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
this.maskTexture instanceof m.CanvasTexture && (this.maskTexture.needsUpdate = !0, this.five.needsRender = !0, console.log("[MaskTag] Canvas texture updated"));
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* 清理 MaskTag 特有的资源(内部方法,避免重复调用)
|
|
470
|
+
*/
|
|
471
|
+
disposeMaskResources() {
|
|
472
|
+
this._disposed || (this._disposed = !0, this.cleanupClickEvents(), this.maskMesh && (this.maskMesh.parent && this.maskMesh.parent.remove(this.maskMesh), this.maskMesh.geometry.dispose(), this.maskMesh.material && (Array.isArray(this.maskMesh.material) ? this.maskMesh.material.forEach((e) => e.dispose()) : this.maskMesh.material.dispose()), this.maskMesh = void 0), this.maskTexture && this.maskUrl && (h.releaseMaskTexture(this.maskUrl), this.maskTexture = void 0));
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* 清理 MaskTag 特有的资源(公开方法)
|
|
476
|
+
*/
|
|
477
|
+
dispose() {
|
|
478
|
+
this.disposeMaskResources();
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* 禁用标签(重写父类方法)
|
|
482
|
+
*/
|
|
483
|
+
disable() {
|
|
484
|
+
this.maskMesh && (this.maskMesh.visible = !1), super.disable();
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* 销毁标签(重写父类方法)
|
|
488
|
+
*/
|
|
489
|
+
destroy() {
|
|
490
|
+
this.disposeMaskResources(), super.destroy();
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* 获取 mask 的缓存 key
|
|
494
|
+
* @param maskSource mask URL 或 Canvas
|
|
495
|
+
* @returns 缓存 key
|
|
496
|
+
*/
|
|
497
|
+
static getMaskCacheKey(e) {
|
|
498
|
+
if (typeof e == "string")
|
|
499
|
+
return e;
|
|
500
|
+
{
|
|
501
|
+
let t = h.canvasSymbolMap.get(e);
|
|
502
|
+
return t || (t = Symbol("canvas-mask"), h.canvasSymbolMap.set(e, t)), t;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* 加载 Mask 纹理(静态方法,支持缓存和引用计数)
|
|
507
|
+
* @param maskSource mask 图片 URL 或 Canvas 元素
|
|
508
|
+
* @returns Promise<THREE.Texture>
|
|
509
|
+
*/
|
|
510
|
+
static loadMaskTexture(e) {
|
|
511
|
+
return v(this, null, function* () {
|
|
512
|
+
const t = h.getMaskCacheKey(e), s = h.maskTextureCache.get(t);
|
|
513
|
+
if (s)
|
|
514
|
+
return s.refCount++, s.texture;
|
|
515
|
+
const a = performance.now(), o = new AbortController();
|
|
516
|
+
try {
|
|
517
|
+
let i;
|
|
518
|
+
if (typeof e == "string") {
|
|
519
|
+
const g = new m.TextureLoader();
|
|
520
|
+
i = yield new Promise((f, d) => {
|
|
521
|
+
if (o.signal.aborted) {
|
|
522
|
+
d(new Error("Load aborted"));
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
g.load(
|
|
526
|
+
e,
|
|
527
|
+
(p) => {
|
|
528
|
+
o.signal.aborted ? (p.dispose(), d(new Error("Load aborted"))) : f(p);
|
|
529
|
+
},
|
|
530
|
+
void 0,
|
|
531
|
+
(p) => {
|
|
532
|
+
d(p);
|
|
533
|
+
}
|
|
534
|
+
), o.signal.addEventListener("abort", () => {
|
|
535
|
+
d(new Error("Load aborted"));
|
|
536
|
+
});
|
|
537
|
+
});
|
|
538
|
+
} else
|
|
539
|
+
i = new m.CanvasTexture(e), i.needsUpdate = !0, console.log("[MaskTag] Created texture from canvas, size:", e.width, "x", e.height);
|
|
540
|
+
i.wrapS = m.ClampToEdgeWrapping, i.wrapT = m.ClampToEdgeWrapping, i.minFilter = m.LinearFilter, i.magFilter = m.LinearFilter, i.anisotropy = 4, i instanceof m.CanvasTexture && (i.needsUpdate = !0), h.maskTextureCache.set(t, {
|
|
541
|
+
texture: i,
|
|
542
|
+
refCount: 1,
|
|
543
|
+
abortController: o
|
|
544
|
+
});
|
|
545
|
+
const l = performance.now() - a, u = typeof e == "string" ? e.substring(0, 50) : "Canvas";
|
|
546
|
+
if (console.log(`[MaskTag Performance] Texture loaded in ${l.toFixed(2)}ms, source: ${u}`), i.image) {
|
|
547
|
+
const g = (i.image.width * i.image.height * 4 / 1048576).toFixed(2);
|
|
548
|
+
console.log(`[MaskTag Memory] Texture size: ${i.image.width}x${i.image.height}, estimated memory: ${g}MB`);
|
|
549
|
+
}
|
|
550
|
+
return i;
|
|
551
|
+
} catch (i) {
|
|
552
|
+
throw console.error("[MaskTag] Failed to load mask texture:", typeof e == "string" ? e : "Canvas", i), i;
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* 释放 Mask 纹理(静态方法)
|
|
558
|
+
* @param maskSource mask 图片 URL 或 Canvas 元素
|
|
559
|
+
*/
|
|
560
|
+
static releaseMaskTexture(e) {
|
|
561
|
+
var a;
|
|
562
|
+
const t = h.getMaskCacheKey(e), s = h.maskTextureCache.get(t);
|
|
563
|
+
if (s && (s.refCount--, s.refCount <= 0)) {
|
|
564
|
+
const o = typeof e == "string" ? e.substring(0, 50) : "Canvas";
|
|
565
|
+
console.log(`[MaskTag Memory] Releasing texture (refCount=0): ${o}`), (a = s.abortController) == null || a.abort(), s.texture.dispose(), h.maskTextureCache.delete(t);
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* 获取当前缓存的纹理统计信息(用于性能监控和调试)
|
|
570
|
+
* @returns 缓存统计信息
|
|
571
|
+
*/
|
|
572
|
+
static getCacheStats() {
|
|
573
|
+
let e = 0, t = 0;
|
|
574
|
+
const s = [];
|
|
575
|
+
return h.maskTextureCache.forEach((a, o) => {
|
|
576
|
+
e += a.refCount;
|
|
577
|
+
let i = 0;
|
|
578
|
+
if (a.texture.image) {
|
|
579
|
+
const u = a.texture.image.width || 0, g = a.texture.image.height || 0;
|
|
580
|
+
i = u * g * 4 / (1024 * 1024), t += i;
|
|
581
|
+
}
|
|
582
|
+
const l = typeof o == "string" ? o.substring(0, 80) : "[Canvas]";
|
|
583
|
+
s.push({
|
|
584
|
+
source: l,
|
|
585
|
+
refCount: a.refCount,
|
|
586
|
+
sizeMB: parseFloat(i.toFixed(2))
|
|
587
|
+
});
|
|
588
|
+
}), {
|
|
589
|
+
totalCached: h.maskTextureCache.size,
|
|
590
|
+
totalRefCount: e,
|
|
591
|
+
estimatedMemoryMB: parseFloat(t.toFixed(2)),
|
|
592
|
+
cacheEntries: s
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* 强制清理所有缓存的纹理(用于内存管理,谨慎使用)
|
|
597
|
+
* 注意:这会释放所有纹理,即使它们仍在使用中
|
|
598
|
+
*/
|
|
599
|
+
static clearAllCache() {
|
|
600
|
+
console.warn("[MaskTag] Clearing all texture cache"), h.maskTextureCache.forEach((e) => {
|
|
601
|
+
var t;
|
|
602
|
+
(t = e.abortController) == null || t.abort(), e.texture.dispose();
|
|
603
|
+
}), h.maskTextureCache.clear();
|
|
604
|
+
}
|
|
605
|
+
};
|
|
606
|
+
let x = h;
|
|
607
|
+
/**
|
|
608
|
+
* Mask 纹理缓存(静态,所有 MaskTag 实例共享)
|
|
609
|
+
* key: mask URL 或 canvas 的 symbol, value: { texture: THREE.Texture, refCount: number, abortController?: AbortController }
|
|
610
|
+
*/
|
|
611
|
+
c(x, "maskTextureCache", /* @__PURE__ */ new Map()), /**
|
|
612
|
+
* Canvas 到 Symbol 的映射(用于缓存 canvas 纹理)
|
|
613
|
+
*/
|
|
614
|
+
c(x, "canvasSymbolMap", /* @__PURE__ */ new WeakMap());
|
|
615
|
+
export {
|
|
616
|
+
x as MaskTag
|
|
617
|
+
};
|
|
@@ -38,7 +38,7 @@ import { FiveDomEvents as V } from "../../shared-utils/five/FiveDomEvents.js";
|
|
|
38
38
|
import "../../shared-utils/five/FivePuppet.js";
|
|
39
39
|
import { Cache as se } from "../utils/Cache.js";
|
|
40
40
|
import { Controller as ce } from "../../base/BasePlugin.js";
|
|
41
|
-
import { objectAssignDeepExports as
|
|
41
|
+
import { objectAssignDeepExports as P } from "../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
42
42
|
import { entries as B } from "../../shared-utils/typescript/entries.js";
|
|
43
43
|
import H from "../utils/tag/adaptConfig.js";
|
|
44
44
|
import "../../vendor/svelte/internal/index.js";
|
|
@@ -181,7 +181,7 @@ class Xt extends ce {
|
|
|
181
181
|
// eslint-disable-next-line accessor-pairs
|
|
182
182
|
set tagsLengthWillUpdate(e) {
|
|
183
183
|
e && (this._cache_pointTag = this.tags.filter(
|
|
184
|
-
(t) => t.stickType === "2DPoint" || t.stickType === "3DPoint" || t.stickType === "3DBox" || t.stickType === "Polygon"
|
|
184
|
+
(t) => t.stickType === "2DPoint" || t.stickType === "3DPoint" || t.stickType === "3DBox" || t.stickType === "Polygon" || t.stickType === "Mask"
|
|
185
185
|
).filter((t) => t.position), this._cache_2DPointTag = this.tags.filter((t) => t.stickType === "2DPoint").filter((t) => t.position), this._cache_css3DTag = this.tags.filter(
|
|
186
186
|
(t) => t.stickType === "3DPoint" || t.stickType === "Plane" || t.stickType === "Model" && t.contentType === "MediaModel"
|
|
187
187
|
).filter((t) => {
|
|
@@ -285,29 +285,29 @@ class Xt extends ce {
|
|
|
285
285
|
(e.contentType === g || g === "Any") && (M[m] = h);
|
|
286
286
|
}
|
|
287
287
|
if (y.length === 2) {
|
|
288
|
-
const [g = "Any",
|
|
289
|
-
g === "Mixin" && e.contentType ===
|
|
288
|
+
const [g = "Any", k = "Any"] = y;
|
|
289
|
+
g === "Mixin" && e.contentType === k && (M[m] = h), (e.stickType === g || g === "Any") && (e.contentType === k || k === "Any") && (M[m] = h);
|
|
290
290
|
}
|
|
291
291
|
if (y.length === 3) {
|
|
292
|
-
const [g = "Any",
|
|
293
|
-
if (
|
|
292
|
+
const [g = "Any", k, R] = y;
|
|
293
|
+
if (k === "Audio" && e.contentType === "Audio") {
|
|
294
294
|
const O = e;
|
|
295
295
|
(O.stickType === g || g === "Any") && O.data.appearance === R && (M[m] = h);
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
});
|
|
300
|
-
const l = (F = e.initialConfig) != null ? F : {}, r =
|
|
300
|
+
const l = (F = e.initialConfig) != null ? F : {}, r = P({}, J, this.config.globalConfig, ...Object.values(o)), f = P({}, r, l), T = {}, d = Object.values(ie.Mode);
|
|
301
301
|
B(c).forEach(([u, h]) => {
|
|
302
302
|
d.forEach((m) => {
|
|
303
|
-
(u === "PanoramaLike" && re(m) || u === "ModelLike" && ne(m)) && (T[m] =
|
|
303
|
+
(u === "PanoramaLike" && re(m) || u === "ModelLike" && ne(m)) && (T[m] = P({}, r, ...Object.values(h), l, { _isMerged: !0 }));
|
|
304
304
|
});
|
|
305
305
|
}), B(p).forEach(([u, h]) => {
|
|
306
306
|
const m = T[u];
|
|
307
|
-
T[u] =
|
|
307
|
+
T[u] = P({}, r, m, ...Object.values(h), l, { _isMerged: !0 });
|
|
308
308
|
});
|
|
309
|
-
const
|
|
310
|
-
return H(
|
|
309
|
+
const _ = Q(W({}, f), { configWithFiveMode: T });
|
|
310
|
+
return H(_), Object.values(T).forEach((u) => H(u)), _._isMerged = !0, _;
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
export {
|