@realsee/dnalogel 2.6.2 → 2.6.3-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/dist/PanoTagPlugin/controller/TagCacheController.d.ts +3 -3
  2. package/dist/PanoTagPlugin/controller/index.d.ts +1 -1
  3. package/dist/PanoTagPlugin/typings/controller.d.ts +4 -0
  4. package/dist/PanoTagPlugin/typings/tag/TagData.d.ts +0 -1
  5. package/dist/index.cjs.js +1 -1
  6. package/dist/index.js +55 -26
  7. package/dist/index.umd.js +1 -1
  8. package/docs/assets/search.js +1 -1
  9. package/docs/classes/CSS3DRender.html +4 -4
  10. package/docs/classes/CruisePluginController.html +4 -4
  11. package/docs/classes/Magnifier.html +4 -4
  12. package/docs/classes/ModelRoomLabelController.html +4 -4
  13. package/docs/classes/Object3DHelperController.html +4 -4
  14. package/docs/classes/PaintBrush.html +4 -4
  15. package/docs/classes/PanoMeasurePluginLine.html +4 -4
  16. package/docs/classes/PanoMeasurePluginModel.html +4 -4
  17. package/docs/classes/PanoMeasurePluginPoint.html +4 -4
  18. package/docs/classes/PanoMeasurePluginPolyline.html +4 -4
  19. package/docs/classes/PanoTagPluginController.html +11 -11
  20. package/docs/classes/Util.BetterTween.html +4 -4
  21. package/docs/classes/Util.FivePointSelector.html +4 -4
  22. package/docs/classes/Util.Interval.html +4 -4
  23. package/docs/classes/Util.Magnifier.html +4 -4
  24. package/docs/classes/Util.PointDomHelper.html +4 -4
  25. package/docs/classes/Util.PointHelper.html +4 -4
  26. package/docs/classes/Util.Rectangle.html +4 -4
  27. package/docs/enums/CameraMovementEffect.html +4 -4
  28. package/docs/enums/ContentType.html +52 -56
  29. package/docs/enums/DIRECTION.html +4 -4
  30. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +4 -4
  31. package/docs/enums/DimensionType.html +4 -4
  32. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +4 -4
  33. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +4 -4
  34. package/docs/enums/PaintBrushTypeEnum.html +4 -4
  35. package/docs/enums/PointType.html +4 -4
  36. package/docs/enums/Rotation.html +4 -4
  37. package/docs/functions/CSS3DRenderPlugin.html +5 -5
  38. package/docs/functions/CameraMovementPlugin.html +5 -5
  39. package/docs/functions/CruisePlugin.html +5 -5
  40. package/docs/functions/GuideLinePlugin.html +5 -5
  41. package/docs/functions/ItemLabelPlugin.html +5 -5
  42. package/docs/functions/MapviewFloorplanPlugin.html +5 -5
  43. package/docs/functions/ModelChassisCompassPlugin.html +5 -5
  44. package/docs/functions/ModelEntryDoorGuidePlugin.html +5 -5
  45. package/docs/functions/ModelFloorplanPlugin.html +5 -5
  46. package/docs/functions/ModelItemLabelPlugin.html +5 -5
  47. package/docs/functions/ModelRoomLabelPlugin.html +5 -5
  48. package/docs/functions/ModelTVVideoPlugin.html +5 -5
  49. package/docs/functions/ModelViewPlugin.html +5 -5
  50. package/docs/functions/Object3DHelperPlugin.html +5 -5
  51. package/docs/functions/PanoCompassPlugin.html +5 -5
  52. package/docs/functions/PanoCursorRaycasterPlugin.html +5 -5
  53. package/docs/functions/PanoDoorLabelPlugin.html +5 -5
  54. package/docs/functions/PanoFloorplanRadarPlugin.html +5 -5
  55. package/docs/functions/PanoMeasurePlugin.html +5 -5
  56. package/docs/functions/PanoRulerPlugin.html +5 -5
  57. package/docs/functions/PanoRulerProPlugin.html +5 -5
  58. package/docs/functions/PanoSpatialTagPlugin.html +5 -5
  59. package/docs/functions/PanoTagPlugin.html +5 -5
  60. package/docs/functions/TopviewFloorplanPlugin.html +5 -5
  61. package/docs/functions/Util.getCoordsFromClient.html +4 -4
  62. package/docs/functions/Util.getCoordsFromElement.html +4 -4
  63. package/docs/functions/Util.getFrameTime.html +4 -4
  64. package/docs/functions/Util.getIntersectFromRelativePosition.html +4 -4
  65. package/docs/functions/Util.getRaycasterFromFivePointer.html +4 -4
  66. package/docs/functions/Util.isNil.html +4 -4
  67. package/docs/functions/Util.nextFrame.html +4 -4
  68. package/docs/functions/Util.notNil.html +4 -4
  69. package/docs/functions/Util.requestAnimationFrameInterval.html +4 -4
  70. package/docs/functions/Util.tweenProgress.html +4 -4
  71. package/docs/functions/pluginFlag.html +5 -5
  72. package/docs/index.html +5 -5
  73. package/docs/interfaces/AddTagConfig.html +4 -4
  74. package/docs/interfaces/CSS3DRenderPluginEventMap.html +4 -4
  75. package/docs/interfaces/CSS3DRenderPluginState.html +4 -4
  76. package/docs/interfaces/CameraMovementPluginExportType.html +4 -4
  77. package/docs/interfaces/EventMap.html +4 -4
  78. package/docs/interfaces/FloorplanBounding.html +4 -4
  79. package/docs/interfaces/FloorplanData.html +4 -4
  80. package/docs/interfaces/FloorplanEntrance.html +4 -4
  81. package/docs/interfaces/FloorplanExtraObject.html +4 -4
  82. package/docs/interfaces/FloorplanExtraObject3D.html +4 -4
  83. package/docs/interfaces/FloorplanFloorData.html +4 -4
  84. package/docs/interfaces/FloorplanImagePosition.html +4 -4
  85. package/docs/interfaces/FloorplanObserver.html +4 -4
  86. package/docs/interfaces/FloorplanOutlineItem.html +4 -4
  87. package/docs/interfaces/FloorplanPosition.html +4 -4
  88. package/docs/interfaces/FloorplanRoomItem.html +4 -4
  89. package/docs/interfaces/FloorplanRoomLabelItem.html +4 -4
  90. package/docs/interfaces/FloorplanServerBounding.html +4 -4
  91. package/docs/interfaces/FloorplanServerComputedData.html +4 -4
  92. package/docs/interfaces/FloorplanServerData.html +4 -4
  93. package/docs/interfaces/FloorplanServerDoorItem.html +4 -4
  94. package/docs/interfaces/FloorplanServerDoorPosition.html +4 -4
  95. package/docs/interfaces/FloorplanServerEntrance.html +4 -4
  96. package/docs/interfaces/FloorplanServerFloorData.html +4 -4
  97. package/docs/interfaces/FloorplanServerImagePosition.html +4 -4
  98. package/docs/interfaces/FloorplanServerObserver.html +4 -4
  99. package/docs/interfaces/FloorplanServerOutlineItem.html +4 -4
  100. package/docs/interfaces/FloorplanServerPosition.html +4 -4
  101. package/docs/interfaces/FloorplanServerRoomItem.html +4 -4
  102. package/docs/interfaces/FloorplanServerRoomLabelItem.html +4 -4
  103. package/docs/interfaces/ItemLabelPluginData.html +4 -4
  104. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +4 -4
  105. package/docs/interfaces/ItemLabelPluginParametersType.html +4 -4
  106. package/docs/interfaces/MinMax.html +4 -4
  107. package/docs/interfaces/ModelChassisCompassPluginData.html +4 -4
  108. package/docs/interfaces/ModelChassisCompassPluginExportType.html +4 -4
  109. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +4 -4
  110. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +4 -4
  111. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +4 -4
  112. package/docs/interfaces/ModelItemLabelPluginData.html +4 -4
  113. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +4 -4
  114. package/docs/interfaces/ModelItemLabelPluginParametersType.html +4 -4
  115. package/docs/interfaces/ModelRoomLabelPluginData.html +4 -4
  116. package/docs/interfaces/ModelTVVideoPluginData.html +4 -4
  117. package/docs/interfaces/ModelTVVideoPluginExportType.html +4 -4
  118. package/docs/interfaces/ModelTVVideoPluginParameterType.html +4 -4
  119. package/docs/interfaces/ModelViewPluginExportType.html +4 -4
  120. package/docs/interfaces/Object3DHelperState.html +4 -4
  121. package/docs/interfaces/PaintBrushAction.html +4 -4
  122. package/docs/interfaces/PaintBrushConfigs.html +4 -4
  123. package/docs/interfaces/PaintBrushState.html +4 -4
  124. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +4 -4
  125. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
  126. package/docs/interfaces/PanoMeasureParameterType.html +4 -4
  127. package/docs/interfaces/PanoMeasurePluginLineJson.html +4 -4
  128. package/docs/interfaces/PanoMeasurePluginOpenParameter.html +4 -4
  129. package/docs/interfaces/PanoMeasurePluginPointJson.html +4 -4
  130. package/docs/interfaces/PanoMeasurePluginPolylineJson.html +4 -4
  131. package/docs/interfaces/PanoRulerPluginExportType.html +4 -4
  132. package/docs/interfaces/PanoRulerPluginOptions.html +4 -4
  133. package/docs/interfaces/PanoRulerPluginParameterType.html +4 -4
  134. package/docs/interfaces/PanoRulerProPluginExportType.html +4 -4
  135. package/docs/interfaces/PanoRulerProPluginOptions.html +4 -4
  136. package/docs/interfaces/PanoRulerProPluginParameterType.html +4 -4
  137. package/docs/interfaces/PanoRulerProPluginState.html +4 -4
  138. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
  139. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
  140. package/docs/interfaces/PanoSpatialTagPluginData.html +4 -4
  141. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +4 -4
  142. package/docs/interfaces/PanoSpatialTagPluginExportType.html +4 -4
  143. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +4 -4
  144. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +4 -4
  145. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +4 -4
  146. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +4 -4
  147. package/docs/interfaces/Point.html +4 -4
  148. package/docs/interfaces/Room.html +4 -4
  149. package/docs/interfaces/RoomInfo.html +4 -4
  150. package/docs/interfaces/RoomLabel.html +4 -4
  151. package/docs/interfaces/RoomRules.html +5 -5
  152. package/docs/interfaces/Rooms.html +5 -5
  153. package/docs/interfaces/Scissor.html +4 -4
  154. package/docs/interfaces/State.html +4 -4
  155. package/docs/interfaces/TagCache.html +20 -6
  156. package/docs/interfaces/TagConfig.html +4 -4
  157. package/docs/interfaces/TagIconUrl.html +4 -4
  158. package/docs/interfaces/Tags.html +4 -4
  159. package/docs/interfaces/TemporaryState.html +4 -4
  160. package/docs/interfaces/Util.MagnifierParameter.html +4 -4
  161. package/docs/interfaces/Util.MouseGroupParameter.html +4 -4
  162. package/docs/modules/Util.html +4 -4
  163. package/docs/modules.html +6 -6
  164. package/docs/types/ArrayPosition.html +5 -5
  165. package/docs/types/AudioAppearance.html +5 -5
  166. package/docs/types/AudioTagTypeConfigKey.html +5 -5
  167. package/docs/types/CSS3DRenderExportType.html +5 -5
  168. package/docs/types/CSS3DRenderPluginExportType.html +5 -5
  169. package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
  170. package/docs/types/Color.html +5 -5
  171. package/docs/types/ContentTypeConfigKey.html +5 -5
  172. package/docs/types/ContentTypeConfigKeySplit.html +5 -5
  173. package/docs/types/ContentTypeMap.html +6 -6
  174. package/docs/types/Create3DDomContainerReturnType.html +5 -5
  175. package/docs/types/Create3DElementReturnType.html +5 -5
  176. package/docs/types/CruisePluginExportType.html +5 -5
  177. package/docs/types/Direction-1.html +5 -5
  178. package/docs/types/Direction4.html +5 -5
  179. package/docs/types/FloorplanRuleLabels.html +5 -5
  180. package/docs/types/FloorplanServerRuleLabels.html +5 -5
  181. package/docs/types/GuideLinePluginExportType.html +5 -5
  182. package/docs/types/HelperEventMap.html +5 -5
  183. package/docs/types/LoadTagConfig.html +5 -5
  184. package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
  185. package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
  186. package/docs/types/MediaData.html +5 -5
  187. package/docs/types/MediaStore.html +6 -6
  188. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
  189. package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
  190. package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
  191. package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
  192. package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
  193. package/docs/types/MoveArgs.html +5 -5
  194. package/docs/types/MoveOpts.html +5 -5
  195. package/docs/types/Object3DHelperEventMap.html +5 -5
  196. package/docs/types/ObjectFit.html +5 -5
  197. package/docs/types/PaintBrushEventMap.html +5 -5
  198. package/docs/types/PanoCompassPluginData.html +5 -5
  199. package/docs/types/PanoCompassPluginExportType.html +5 -5
  200. package/docs/types/PanoCompassPluginParameterType.html +5 -5
  201. package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
  202. package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
  203. package/docs/types/PanoIndex.html +5 -5
  204. package/docs/types/PanoMeasurePluginEvent.html +5 -5
  205. package/docs/types/PanoMeasureReturnType.html +5 -5
  206. package/docs/types/PanoSpatialTagPluginId.html +5 -5
  207. package/docs/types/PanoTagPluginExportInterface.html +5 -5
  208. package/docs/types/PanoTagPluginParamsInterface.html +5 -5
  209. package/docs/types/PlaneTag.html +5 -5
  210. package/docs/types/PlaneTagElement.html +6 -6
  211. package/docs/types/Point2DElement.html +6 -6
  212. package/docs/types/Point2DTag.html +5 -5
  213. package/docs/types/Point3DElement.html +6 -6
  214. package/docs/types/Point3DTag.html +5 -5
  215. package/docs/types/PointTag.html +5 -5
  216. package/docs/types/PointTagElement.html +6 -6
  217. package/docs/types/Position.html +5 -5
  218. package/docs/types/RotateArgs.html +5 -5
  219. package/docs/types/RotateOpts.html +5 -5
  220. package/docs/types/RuleLabelsKey.html +5 -5
  221. package/docs/types/RuleLabelsValue.html +5 -5
  222. package/docs/types/StickType.html +5 -5
  223. package/docs/types/Tag.html +5 -5
  224. package/docs/types/Tag2D.html +5 -5
  225. package/docs/types/Tag3D.html +5 -5
  226. package/docs/types/TagContentType.html +6 -6
  227. package/docs/types/TagDimensionType.html +5 -5
  228. package/docs/types/TagElement.html +6 -6
  229. package/docs/types/TagEvents.html +5 -5
  230. package/docs/types/TagHooks.html +5 -5
  231. package/docs/types/TagIconSize.html +5 -5
  232. package/docs/types/TagId.html +5 -5
  233. package/docs/types/TagPointType.html +5 -5
  234. package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
  235. package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
  236. package/docs/types/WorkCode.html +5 -5
  237. package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
  238. package/docs/variables/PLUGIN.html +5 -5
  239. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
  240. package/docs/variables/ROOM_TYPE_MAP.html +5 -5
  241. package/docs/variables/VERSION.html +5 -5
  242. package/docs/variables/itemLabelPluginServerParams.html +5 -5
  243. package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
  244. package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
  245. package/libs/PanoTagPlugin/controller/TagCacheController.d.ts +3 -3
  246. package/libs/PanoTagPlugin/controller/TagCacheController.js +6 -6
  247. package/libs/PanoTagPlugin/controller/TagComputer.js +159 -130
  248. package/libs/PanoTagPlugin/controller/index.d.ts +1 -1
  249. package/libs/PanoTagPlugin/typings/controller.d.ts +4 -0
  250. package/libs/PanoTagPlugin/typings/tag/TagData.d.ts +0 -1
  251. package/package.json +1 -1
@@ -1,22 +1,22 @@
1
- var U = Object.defineProperty, j = Object.defineProperties;
2
- var w = Object.getOwnPropertyDescriptors;
3
- var m = Object.getOwnPropertySymbols;
4
- var A = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable;
5
- var P = (u, c, e) => c in u ? U(u, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[c] = e, k = (u, c) => {
1
+ var j = Object.defineProperty, w = Object.defineProperties;
2
+ var $ = Object.getOwnPropertyDescriptors;
3
+ var k = Object.getOwnPropertySymbols;
4
+ var R = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
5
+ var P = (g, c, e) => c in g ? j(g, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : g[c] = e, x = (g, c) => {
6
6
  for (var e in c || (c = {}))
7
- A.call(c, e) && P(u, e, c[e]);
8
- if (m)
9
- for (var e of m(c))
10
- B.call(c, e) && P(u, e, c[e]);
11
- return u;
12
- }, x = (u, c) => j(u, w(c));
13
- var b = (u, c, e) => (P(u, typeof c != "symbol" ? c + "" : c, e), e);
7
+ R.call(c, e) && P(g, e, c[e]);
8
+ if (k)
9
+ for (var e of k(c))
10
+ A.call(c, e) && P(g, e, c[e]);
11
+ return g;
12
+ }, I = (g, c) => w(g, $(c));
13
+ var b = (g, c, e) => (P(g, typeof c != "symbol" ? c + "" : c, e), e);
14
14
  import D from "object-assign-deep";
15
- import * as I from "three";
16
- import { DefaultConfig as E } from "../tag.config.js";
17
- import { is3DTag as R, isPointTag as V } from "../utils/tag/tagCheck.js";
15
+ import * as U from "three";
16
+ import { DefaultConfig as B } from "../tag.config.js";
17
+ import { is3DTag as E, isPointTag as V } from "../utils/tag/tagCheck.js";
18
18
  import { arrayPositionToVector3 as M, anyPositionToVector3 as S } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
19
- import { planeNormal as $ } from "../utils/planeNormal.js";
19
+ import { planeNormal as _ } from "../utils/planeNormal.js";
20
20
  import { tagPosition as T } from "../utils/tagPosition.js";
21
21
  import { checkRange as y } from "../utils/checkRange.js";
22
22
  import { TagCacheController as z } from "./TagCacheController.js";
@@ -27,89 +27,118 @@ class Y extends z {
27
27
  constructor(e) {
28
28
  super(e);
29
29
  b(this, "tags", []);
30
- b(this, "config", E);
31
- b(this, "raycaster", new I.Raycaster());
30
+ b(this, "config", B);
31
+ b(this, "raycaster", new U.Raycaster());
32
32
  }
33
33
  get isPanorama() {
34
34
  return this.five.currentMode === "Panorama";
35
35
  }
36
36
  getTagById(e) {
37
- const t = this.tags.find((i) => i.id === e);
38
- if (!t) {
39
- console.error(`getTagById(): tag is ${t}, id is ${e}`);
37
+ const n = this.tags.find((i) => i.id === e);
38
+ if (!n) {
39
+ console.error(`getTagById(): tag is ${n}, id is ${e}`);
40
40
  return;
41
41
  }
42
- return t;
42
+ return n;
43
43
  }
44
- changeContentTypeConfig(e, t, i = !0) {
45
- this.config.contentTypeConfig || (this.config.contentTypeConfig = {}), i ? this.config.contentTypeConfig[e] = D({}, this.config.contentTypeConfig[e], t) : this.config.contentTypeConfig[e] = t, this.clearCache();
44
+ changeContentTypeConfig(e, n, i = !0) {
45
+ this.config.contentTypeConfig || (this.config.contentTypeConfig = {}), i ? this.config.contentTypeConfig[e] = D({}, this.config.contentTypeConfig[e], n) : this.config.contentTypeConfig[e] = n, this.clearCache();
46
46
  }
47
- getVisibleByPanoIndex(e, t) {
47
+ getVisibleByPanoIndex(e, n) {
48
48
  var o;
49
- const i = this.getCaches({ panoIndex: t, id: e.id }), s = (o = this.five.panoIndex) != null ? o : t;
49
+ const i = this.getCache({ panoIndex: n, id: e.id }), s = (o = this.five.panoIndex) != null ? o : n;
50
50
  if (i.visible !== void 0)
51
51
  return i.visible;
52
52
  {
53
- const f = (() => {
54
- var d, g, r;
55
- const n = (d = this.getTagConfig(e).visibleConfig) != null ? d : {}, l = this.getDistance(e);
56
- if (typeof n == "function")
57
- return n(this.five, { tag: e, distance: l });
58
- if (n.keep === "hidden")
59
- return !1;
60
- if (n.keep === "visible")
61
- return !0;
62
- if (n.visiblePanoIndex !== void 0 && n.visiblePanoIndex !== "all" && s !== void 0 && (Array.isArray(n.visiblePanoIndex) && !n.visiblePanoIndex.includes(s) || n.visiblePanoIndex === "current" && s !== ((g = e.fiveState) == null ? void 0 : g.panoIndex)) || n.visibleDistance !== void 0 && n.visibleDistance !== "unLimited" && y(l, n.visibleDistance) === !1)
63
- return !1;
64
- if (n.intersectRaycaster !== !1 && (typeof n.intersectRaycaster != "object" || n.intersectRaycaster.enabled !== !1)) {
53
+ const a = (() => {
54
+ var d, h, f, l;
55
+ const t = (d = this.getTagConfig(e).visibleConfig) != null ? d : {}, r = this.getDistance(e);
56
+ if (typeof t == "function")
57
+ return { value: t(this.five, { tag: e, distance: r }), reason: "config function result" };
58
+ if (t.keep === "hidden")
59
+ return { value: !1, reason: "config.keep is hidden" };
60
+ if (t.keep === "visible")
61
+ return { value: !0, reason: "config.keep is visible" };
62
+ if (t.visiblePanoIndex !== void 0 && t.visiblePanoIndex !== "all" && s !== void 0) {
63
+ if (Array.isArray(t.visiblePanoIndex) && !t.visiblePanoIndex.includes(s))
64
+ return {
65
+ value: !1,
66
+ reason: `current panoIndex is not included in visiblePano. currentPanoIndex: ${s}, visiblePanoIndex: ${t.visiblePanoIndex}`
67
+ };
68
+ if (t.visiblePanoIndex === "current" && s !== ((h = e.fiveState) == null ? void 0 : h.panoIndex))
69
+ return {
70
+ value: !1,
71
+ reason: `current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${s}, tag.panoIndex: ${(f = e.fiveState) == null ? void 0 : f.panoIndex}`
72
+ };
73
+ }
74
+ if (t.visibleDistance !== void 0 && t.visibleDistance !== "unLimited" && y(r, t.visibleDistance) === !1)
75
+ return {
76
+ value: !1,
77
+ reason: `distance is not in visibleDistance. distance: ${r}, visibleDistance: ${t.visibleDistance}`
78
+ };
79
+ if (t.intersectRaycaster !== !1 && (typeof t.intersectRaycaster != "object" || t.intersectRaycaster.enabled !== !1)) {
65
80
  if (s === void 0)
66
- return !1;
67
- const a = (r = this.five.work.observers[s]) == null ? void 0 : r.position;
68
- if (a === void 0)
69
- throw new Error(`getVisible(): observerPosition is ${a}`);
70
- const p = T(e.position).sub(a).normalize();
71
- this.raycaster.set(a, p);
72
- const [h] = this.five.model.intersectRaycaster(this.raycaster), v = (() => {
73
- var C;
74
- return typeof n.intersectRaycaster == "object" && (C = n.intersectRaycaster.distanceAccuracy) != null ? C : 0.01;
81
+ return {
82
+ value: !1,
83
+ reason: `intersectRaycaster check failed: fivePanoIndex is ${s}`
84
+ };
85
+ const u = (l = this.five.work.observers[s]) == null ? void 0 : l.position;
86
+ if (u === void 0)
87
+ throw new Error(`getVisible(): observerPosition is ${u}`);
88
+ const p = T(e.position).sub(u).normalize();
89
+ this.raycaster.set(u, p);
90
+ const [v] = this.five.model.intersectRaycaster(this.raycaster), C = (() => {
91
+ var m;
92
+ return typeof t.intersectRaycaster == "object" && (m = t.intersectRaycaster.distanceAccuracy) != null ? m : 0.01;
75
93
  })();
76
- if (h && h.distance + v < l)
77
- return !1;
94
+ if (v && v.distance + C < r)
95
+ return {
96
+ value: !1,
97
+ reason: `intersectRaycaster check failed: distance is ${r}, intersection.distance is ${v.distance}, distanceError is ${C}`
98
+ };
99
+ }
100
+ if (t.angleRange && E(e)) {
101
+ const u = this.getAngle(e);
102
+ if (y(u, t.angleRange) === !1)
103
+ return { value: !1, reason: `angle is not in angleRange. angle: ${u}, angleRange: ${t.angleRange}` };
78
104
  }
79
- return !(n.angleRange && R(e) && y(this.getAngle(e), n.angleRange) === !1);
105
+ return {
106
+ value: !0,
107
+ reason: "all check passed"
108
+ };
80
109
  })();
81
- return i.visible = f, i.visible;
110
+ return i.visible = a.value, i.__debug_visiblereason__ = a, i.visible;
82
111
  }
83
112
  }
84
- getUnfoldedByPanoIndex(e, t) {
113
+ getUnfoldedByPanoIndex(e, n) {
85
114
  if (!this.getVisibleByPanoIndex(e))
86
115
  return;
87
- const s = this.getCaches({ panoIndex: t, id: e.id });
116
+ const s = this.getCache({ panoIndex: n, id: e.id });
88
117
  if (s.unfolded !== void 0)
89
118
  return s.unfolded;
90
119
  {
91
120
  const o = this.getTagConfig(e).unfoldedConfig;
92
121
  if (!o)
93
122
  return;
94
- const f = (() => {
95
- const l = this.getDistance(e);
123
+ const a = (() => {
124
+ const r = this.getDistance(e);
96
125
  if (typeof o == "function")
97
- return o(this.five, { tag: e, distance: l });
126
+ return o(this.five, { tag: e, distance: r });
98
127
  if (o.keep === "folded")
99
128
  return !1;
100
129
  if (o.keep === "unfolded")
101
130
  return !0;
102
- if (o.unfoldDistance && y(l, o.unfoldDistance) === !1)
131
+ if (o.unfoldDistance && y(r, o.unfoldDistance) === !1)
103
132
  return !1;
104
133
  })();
105
- s.unfolded = f;
106
- const n = this.getUnfoldedByCamera(e);
107
- return n !== void 0 ? n : s.unfolded;
134
+ s.unfolded = a;
135
+ const t = this.getUnfoldedByCamera(e);
136
+ return t !== void 0 ? t : s.unfolded;
108
137
  }
109
138
  }
110
139
  getUnfoldedByCamera(e) {
111
140
  return this.getVisibleByPanoIndex(e) ? (() => {
112
- var f;
141
+ var a;
113
142
  const s = this.getDistance(e), o = this.getTagConfig(e).unfoldedConfig;
114
143
  if (!!o) {
115
144
  if (typeof o == "function")
@@ -121,97 +150,97 @@ class Y extends z {
121
150
  if (o.autoUnfold === void 0 || o.autoUnfold === !1 || o.autoUnfold.enable === !1)
122
151
  return;
123
152
  if (o.autoUnfold.strategy === "ScreenPostion") {
124
- const n = this.getTagProject(e);
125
- if (n && y(n.x, o.autoUnfold.autoUnfoldProjectX) === !1)
153
+ const t = this.getTagProject(e);
154
+ if (t && y(t.x, o.autoUnfold.autoUnfoldProjectX) === !1)
126
155
  return !1;
127
156
  }
128
157
  if (o.autoUnfold.strategy === "MinimumDistance") {
129
- const d = this.filterPointTag().filter((r) => this.getVisibleByPanoIndex(r)).filter((r) => {
130
- const a = this.getTagProject(r);
131
- if (!a)
158
+ const d = this.filterPointTag().filter((f) => this.getVisibleByPanoIndex(f)).filter((f) => {
159
+ const l = this.getTagProject(f);
160
+ if (!l)
132
161
  return !1;
133
- const { x: p, y: h, z: v } = a;
134
- return !(Math.abs(v) > 1 || Math.abs(p) > 1 || Math.abs(h) > 1);
135
- }).map((r) => ({ tag: r, id: r.id, tagConfig: this.getTagConfig(r).unfoldedConfig })).filter(({ tag: r, tagConfig: a }) => {
136
- var p, h;
137
- return !(typeof a != "object" || a.keep || a.autoUnfold === !1 || ((p = a.autoUnfold) == null ? void 0 : p.enable) === !1 || ((h = a.autoUnfold) == null ? void 0 : h.strategy) !== "MinimumDistance");
138
- }).map((r) => x(k({}, r), { distance: this.getDistance(r.tag) })).filter(({ distance: r, tagConfig: a }) => {
139
- var p, h;
140
- return !(r === void 0 || typeof a != "object" || a.autoUnfold === !1 || ((p = a.autoUnfold) == null ? void 0 : p.enable) === !1 || ((h = a.autoUnfold) == null ? void 0 : h.strategy) !== "MinimumDistance" || a.autoUnfold.distance && y(r, a.autoUnfold.distance) === !1);
141
- }).sort((r, a) => r.distance - a.distance).findIndex((r) => r.id === e.id);
142
- if (d === -1 || d <= ((f = o.autoUnfold.maxNumber) != null ? f : 1) - 1 === !1)
162
+ const { x: u, y: p, z: v } = l;
163
+ return !(Math.abs(v) > 1 || Math.abs(u) > 1 || Math.abs(p) > 1);
164
+ }).map((f) => ({ tag: f, id: f.id, tagConfig: this.getTagConfig(f).unfoldedConfig })).filter(({ tag: f, tagConfig: l }) => {
165
+ var u, p;
166
+ return !(typeof l != "object" || l.keep || l.autoUnfold === !1 || ((u = l.autoUnfold) == null ? void 0 : u.enable) === !1 || ((p = l.autoUnfold) == null ? void 0 : p.strategy) !== "MinimumDistance");
167
+ }).map((f) => I(x({}, f), { distance: this.getDistance(f.tag) })).filter(({ distance: f, tagConfig: l }) => {
168
+ var u, p;
169
+ return !(f === void 0 || typeof l != "object" || l.autoUnfold === !1 || ((u = l.autoUnfold) == null ? void 0 : u.enable) === !1 || ((p = l.autoUnfold) == null ? void 0 : p.strategy) !== "MinimumDistance" || l.autoUnfold.distance && y(f, l.autoUnfold.distance) === !1);
170
+ }).sort((f, l) => f.distance - l.distance).findIndex((f) => f.id === e.id);
171
+ if (d === -1 || d <= ((a = o.autoUnfold.maxNumber) != null ? a : 1) - 1 === !1)
143
172
  return !1;
144
173
  }
145
174
  return !0;
146
175
  }
147
176
  })() : void 0;
148
177
  }
149
- getDistance(e, t) {
150
- var o, f, n;
151
- const i = (o = this.five.panoIndex) != null ? o : t;
178
+ getDistance(e, n) {
179
+ var o, a, t;
180
+ const i = (o = this.five.panoIndex) != null ? o : n;
152
181
  if (i === void 0)
153
182
  throw new Error(`getDistance(): fivePanoIndex is ${i}`);
154
- const s = this.getCaches({ panoIndex: t, id: e.id });
183
+ const s = this.getCache({ panoIndex: n, id: e.id });
155
184
  if (s.distance !== void 0)
156
185
  return s.distance;
157
186
  {
158
- const l = (n = (f = this.five.work) == null ? void 0 : f.observers[i]) == null ? void 0 : n.position;
159
- if (l === void 0)
160
- throw new Error(`getDistance(): observerPosition is ${l}`);
161
- const d = (() => V(e) ? M(e == null ? void 0 : e.position) : T(e.position))(), g = l.distanceTo(d);
162
- return s.distance = g, g;
187
+ const r = (t = (a = this.five.work) == null ? void 0 : a.observers[i]) == null ? void 0 : t.position;
188
+ if (r === void 0)
189
+ throw new Error(`getDistance(): observerPosition is ${r}`);
190
+ const d = (() => V(e) ? M(e == null ? void 0 : e.position) : T(e.position))(), h = r.distanceTo(d);
191
+ return s.distance = h, h;
163
192
  }
164
193
  }
165
- getAngle(e, t) {
166
- var o, f, n;
167
- const i = (o = this.five.panoIndex) != null ? o : t;
194
+ getAngle(e, n) {
195
+ var o, a, t;
196
+ const i = (o = this.five.panoIndex) != null ? o : n;
168
197
  if (i === void 0)
169
198
  throw new Error(`getDistance(): fivePanoIndex is ${i}`);
170
- const s = this.getCaches({ panoIndex: t, id: e.id });
199
+ const s = this.getCache({ panoIndex: n, id: e.id });
171
200
  if (s.angle !== void 0)
172
201
  return s.angle;
173
202
  {
174
- const l = (n = (f = this.five.work) == null ? void 0 : f.observers[i]) == null ? void 0 : n.position;
175
- if (l === void 0)
176
- throw new Error(`getAngleRange(): observerPosition is ${l}`);
177
- const d = (() => e.stickType === "3DPoint" ? S(e.normal) : $(e.position))();
203
+ const r = (t = (a = this.five.work) == null ? void 0 : a.observers[i]) == null ? void 0 : t.position;
204
+ if (r === void 0)
205
+ throw new Error(`getAngleRange(): observerPosition is ${r}`);
206
+ const d = (() => e.stickType === "3DPoint" ? S(e.normal) : _(e.position))();
178
207
  if (!d)
179
208
  return;
180
- const g = new I.Vector3().copy(l).sub(T(e.position)), r = d.angleTo(g) * 180 / Math.PI;
181
- return s.angle = r, s.angle;
209
+ const h = new U.Vector3().copy(r).sub(T(e.position)), f = d.angleTo(h) * 180 / Math.PI;
210
+ return s.angle = f, s.angle;
182
211
  }
183
212
  }
184
213
  getTagConfig(e) {
185
214
  var s;
186
215
  if (!e)
187
216
  return (s = this.config.globalConfig) != null ? s : {};
188
- const t = {};
217
+ const n = {};
189
218
  this.config.contentTypeConfig && Object.keys(this.config.contentTypeConfig).forEach((o) => {
190
- const f = o;
191
- if (t[f])
219
+ const a = o;
220
+ if (n[a])
192
221
  return;
193
- const n = f.split("-");
194
- if (n.length === 1) {
195
- const [l] = n;
196
- e.contentType === l && (t[f] = this.config.contentTypeConfig[f]);
222
+ const t = a.split("-");
223
+ if (t.length === 1) {
224
+ const [r] = t;
225
+ e.contentType === r && (n[a] = this.config.contentTypeConfig[a]);
197
226
  }
198
- if (n.length === 2) {
199
- const [l = "Any", d = "Any"] = n;
200
- (e.stickType === l || l === "Any") && (e.contentType === d || d === "Any") && (t[f] = this.config.contentTypeConfig[f]);
227
+ if (t.length === 2) {
228
+ const [r = "Any", d = "Any"] = t;
229
+ (e.stickType === r || r === "Any") && (e.contentType === d || d === "Any") && (n[a] = this.config.contentTypeConfig[a]);
201
230
  }
202
- if (n.length === 3) {
203
- const [l = "Any", d, g] = n;
231
+ if (t.length === 3) {
232
+ const [r = "Any", d, h] = t;
204
233
  if (d === "Audio" && e.contentType === "Audio") {
205
- const r = e;
206
- (r.stickType === l || l === "Any") && r.data.appearance === g && (t[f] = this.config.contentTypeConfig[f]);
234
+ const f = e;
235
+ (f.stickType === r || r === "Any") && f.data.appearance === h && (n[a] = this.config.contentTypeConfig[a]);
207
236
  }
208
237
  }
209
238
  });
210
- const i = D({}, this.config.globalConfig, ...Object.values(t), e.config);
239
+ const i = D({}, this.config.globalConfig, ...Object.values(n), e.config);
211
240
  return typeof i.unfoldedConfig == "object" && (i.unfoldedConfig.disableFold && (i.unfoldedConfig = { keep: "unfolded" }), i.unfoldedConfig.disableUnfold && (i.unfoldedConfig = { keep: "folded" }), i.unfoldedConfig.keep && (i.unfoldedConfig = { keep: i.unfoldedConfig.keep })), typeof i.visibleConfig == "object" && i.visibleConfig.keep && (i.visibleConfig = { keep: i.visibleConfig.keep }), i;
212
241
  }
213
- can(e, t) {
214
- const i = this.getTagConfig(t);
242
+ can(e, n) {
243
+ const i = this.getTagConfig(n);
215
244
  if (!i || typeof i != "object")
216
245
  return !0;
217
246
  if (e === "show" || e === "hide") {
@@ -229,37 +258,37 @@ class Y extends z {
229
258
  return !0;
230
259
  }
231
260
  sort(e) {
232
- return e.sort((t, i) => {
233
- const s = this.getDistance(t), o = this.getDistance(i);
261
+ return e.sort((n, i) => {
262
+ const s = this.getDistance(n), o = this.getDistance(i);
234
263
  return s === void 0 || o === void 0 ? 0 : o - s;
235
264
  });
236
265
  }
237
266
  setPointTagPosition() {
238
267
  const e = this.filterPointTag();
239
- e.length !== 0 && e.forEach((t) => {
268
+ e.length !== 0 && e.forEach((n) => {
240
269
  var s;
241
- if (!((s = t.state) != null && s.visible)) {
242
- t.pointTagStyle = void 0;
270
+ if (!((s = n.state) != null && s.visible)) {
271
+ n.pointTagStyle = null;
243
272
  return;
244
273
  }
245
- const i = this.getTagProject(t);
274
+ const i = this.getTagProject(n);
246
275
  if (!i) {
247
- t.pointTagStyle = void 0;
276
+ n.pointTagStyle = null;
248
277
  return;
249
278
  }
250
- t.pointTagStyle = { leftPercent: (i.x + 1) / 2 * 100, topPercent: (-i.y + 1) / 2 * 100 };
279
+ n.pointTagStyle = { leftPercent: (i.x + 1) / 2 * 100, topPercent: (-i.y + 1) / 2 * 100 };
251
280
  });
252
281
  }
253
282
  setVisibleByPanoIndex() {
254
283
  this.tags.forEach((e) => {
255
- const t = this.getVisibleByPanoIndex(e);
256
- e.state && (e.state.visible = t);
284
+ const n = this.getVisibleByPanoIndex(e);
285
+ e.state && (e.state.visible = n);
257
286
  });
258
287
  }
259
288
  setUnfoldedByPanoIndex() {
260
289
  this.tags.forEach((e) => {
261
- const t = this.getUnfoldedByPanoIndex(e);
262
- if (!!e.state && (t !== void 0 && (e.state.unfolded = t), t && !e.state.visible)) {
290
+ const n = this.getUnfoldedByPanoIndex(e);
291
+ if (!!e.state && (n !== void 0 && (e.state.unfolded = n), n && !e.state.visible)) {
263
292
  const i = this.getTagConfig(e);
264
293
  typeof i.unfoldedConfig == "object" && i.unfoldedConfig.autoUnfoldWhenHide !== !1 && (e.state.unfolded = !1);
265
294
  }
@@ -268,9 +297,9 @@ class Y extends z {
268
297
  getTagProject(e) {
269
298
  if (!this.getVisibleByPanoIndex(e))
270
299
  return;
271
- const i = T(e.position), { x: s, y: o, z: f } = i.project(this.five.camera);
272
- if (!(f > 1))
273
- return { x: s, y: o, z: f };
300
+ const i = T(e.position), { x: s, y: o, z: a } = i.project(this.five.camera);
301
+ if (!(a > 1))
302
+ return { x: s, y: o, z: a };
274
303
  }
275
304
  filterPointTag() {
276
305
  return this.tags.filter((e) => e.stickType === "2DPoint" || e.stickType === "3DPoint");
@@ -288,9 +317,9 @@ class Y extends z {
288
317
  return this.tags.filter((e) => e.stickType === "Plane");
289
318
  }
290
319
  updateTagConfig(e) {
291
- e != null && e.force && this.clearCache(), this.tags.forEach((t) => {
292
- const i = this.getTagConfig(t);
293
- t.mergedConfig = i;
320
+ e != null && e.force && this.clearCache(), this.tags.forEach((n) => {
321
+ const i = this.getTagConfig(n);
322
+ n.mergedConfig = i;
294
323
  });
295
324
  }
296
325
  }
@@ -90,7 +90,7 @@ declare class PanoTagPluginController extends TagComputer {
90
90
  * @description: 改变tag任意属性
91
91
  */
92
92
  changeTagById<C extends TagContentType = any>(id: TagId, tag: PartialDeep<{
93
- [P in keyof Pick<Tag<C>, 'enabled' | 'style' | 'stickType' | 'contentType' | 'data' | 'normal'>]: Tag[P];
93
+ [P in keyof Pick<Tag<C>, 'enabled' | 'style' | 'stickType' | 'contentType' | 'data' | 'normal' | 'config'>]: Tag[P];
94
94
  }>, deepMerge?: boolean): void;
95
95
  /**
96
96
  * @description: 销毁tag
@@ -73,6 +73,10 @@ export interface TagCache {
73
73
  minimumDistanceResult?: boolean;
74
74
  distance?: number;
75
75
  angle?: number;
76
+ __debug_visiblereason__?: {
77
+ value: boolean;
78
+ reason?: string;
79
+ };
76
80
  }
77
81
  export declare type TagElement<C extends TagContentType = TagContentType, S extends StickType = StickType> = Tag<C, S> & Partial<{
78
82
  pointTagStyle: {
@@ -9,7 +9,6 @@ export declare type MediaData = {
9
9
  };
10
10
  declare type Object = Record<string | number | symbol, any>;
11
11
  export declare type ObjectFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
12
- /** @deprecated 改用具体的string */
13
12
  export declare enum ContentType {
14
13
  /** 音频标签 */
15
14
  Audio = "Audio",
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "repository": "https://github.com/realsee-developer/dnalogel.git",
8
8
  "description": "如视 VR 看房插件合集",
9
9
  "private": false,
10
- "version": "2.6.2",
10
+ "version": "2.6.3-dev.0",
11
11
  "license": "SEE LICENSE IN TERMS.txt",
12
12
  "scripts": {
13
13
  "clean": "rm -rf components dist docs libs types ./vite.config.js.timestamp*",