@realsee/dnalogel 3.50.17-alpha.0 → 3.51.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 (118) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/dist/ModelMakerPlugin/Controller.d.ts +2 -0
  3. package/dist/Sculpt/utils/export.d.ts +18 -0
  4. package/dist/index.cjs.js +207 -207
  5. package/dist/index.js +34866 -34775
  6. package/dist/index.umd.js +211 -211
  7. package/dist/shared-utils/five/fiveEveryReadyListener.d.ts +2 -0
  8. package/dist/shared-utils/index.d.ts +1 -0
  9. package/dist/shared-utils/tag.d.ts +40 -1
  10. package/dist/shared-utils/three/temp.d.ts +2 -2
  11. package/libs/AreaMakerPlugin/Controller.js +100 -46
  12. package/libs/AreaMakerPlugin/index.js +64 -10
  13. package/libs/AreaMakerPlugin/utils/Item.js +156 -100
  14. package/libs/CSS3DRenderPlugin/Controller.js +93 -44
  15. package/libs/CSS3DRenderPlugin/index.js +62 -13
  16. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +105 -49
  17. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +130 -77
  18. package/libs/CruisePlugin/BaseController.js +143 -89
  19. package/libs/CruisePlugin/Move.js +83 -39
  20. package/libs/CruisePlugin/Work.js +95 -51
  21. package/libs/CruisePlugin/index.js +66 -22
  22. package/libs/CurrentPanoImagePlugin/Controller.js +139 -85
  23. package/libs/CurrentPanoImagePlugin/index.js +63 -9
  24. package/libs/GuideLinePlugin/Controller.js +57 -13
  25. package/libs/GuideLinePlugin/GuideLineItem.js +63 -19
  26. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +6 -2
  27. package/libs/GuideLinePlugin/GuideLineModeItem.js +58 -14
  28. package/libs/GuideLinePlugin/index.js +66 -22
  29. package/libs/ModelMakerPlugin/Controller.d.ts +2 -0
  30. package/libs/ModelMakerPlugin/Controller.js +190 -129
  31. package/libs/ModelMakerPlugin/index.js +63 -21
  32. package/libs/ModelMakerPlugin/item/baseItem.js +4 -2
  33. package/libs/ModelMakerPlugin/item/boxItem.js +5 -3
  34. package/libs/ModelMakerPlugin/item/polygonItem.js +9 -7
  35. package/libs/ModelMakerPlugin/item/prismItem.js +5 -3
  36. package/libs/ModelTVVideoPlugin/Plugin.js +96 -47
  37. package/libs/ModelTVVideoPlugin/index.js +55 -6
  38. package/libs/Object3DHelperPlugin/Controller.js +42 -25
  39. package/libs/Object3DHelperPlugin/index.js +28 -12
  40. package/libs/PanoCompassPlugin/Controller.js +92 -44
  41. package/libs/PanoCompassPlugin/index.js +63 -15
  42. package/libs/PanoDoorLabelPlugin/BaseController.js +79 -25
  43. package/libs/PanoDoorLabelPlugin/Controller.js +132 -78
  44. package/libs/PanoDoorLabelPlugin/index.js +63 -9
  45. package/libs/PanoMeasurePlugin/Components/Controller0.js +126 -77
  46. package/libs/PanoMeasurePlugin/Components/Controller1.js +139 -90
  47. package/libs/PanoMeasurePlugin/Controller/EditController.js +120 -71
  48. package/libs/PanoMeasurePlugin/Controller/WatchController.js +120 -70
  49. package/libs/PanoMeasurePlugin/Controller/index.js +132 -86
  50. package/libs/PanoMeasurePlugin/Model/area.js +72 -22
  51. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +56 -0
  52. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +64 -15
  53. package/libs/PanoMeasurePlugin/index.js +62 -16
  54. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +57 -2
  55. package/libs/PanoRulerProPlugin/Controller.js +88 -33
  56. package/libs/PanoRulerProPlugin/RulerItems.js +146 -91
  57. package/libs/PanoRulerProPlugin/index.js +64 -9
  58. package/libs/PanoSpatialTagPlugin/Plugin.js +177 -128
  59. package/libs/PanoSpatialTagPlugin/index.js +53 -4
  60. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +116 -60
  61. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +192 -136
  62. package/libs/PanoTagPlugin/Components/Tag/index.js +194 -139
  63. package/libs/PanoTagPlugin/Components/TagContainer.js +112 -57
  64. package/libs/PanoTagPlugin/Components/TagItem.js +204 -149
  65. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +157 -101
  66. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +75 -20
  67. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +86 -31
  68. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +93 -37
  69. package/libs/PanoTagPlugin/controller/TagRender.js +62 -18
  70. package/libs/PanoTagPlugin/controller/TagUtil.js +123 -79
  71. package/libs/PanoTagPlugin/controller/index.js +110 -72
  72. package/libs/PanoTagPlugin/index.js +72 -28
  73. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +77 -21
  74. package/libs/PanoVideoPlugin/Controller.js +95 -41
  75. package/libs/PanoVideoPlugin/VideoMeshController.js +119 -63
  76. package/libs/PanoVideoPlugin/index.js +66 -12
  77. package/libs/PipelinePlugin/Controller.js +173 -119
  78. package/libs/PipelinePlugin/index.js +63 -9
  79. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +70 -14
  80. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +58 -2
  81. package/libs/PipelinePlugin/utils/Objects/Pipe.js +98 -42
  82. package/libs/Sculpt/Meshes/Box.js +3 -2
  83. package/libs/Sculpt/Meshes/Cylinder.js +10 -6
  84. package/libs/Sculpt/Meshes/Line.js +43 -38
  85. package/libs/Sculpt/Meshes/LineWithDots.js +14 -10
  86. package/libs/Sculpt/Meshes/Point.js +24 -20
  87. package/libs/Sculpt/Meshes/Polygon.js +5 -2
  88. package/libs/Sculpt/Meshes/Prism.js +19 -16
  89. package/libs/Sculpt/Objects/Line/Editor.js +6 -5
  90. package/libs/Sculpt/index.js +15 -14
  91. package/libs/Sculpt/utils/export.d.ts +18 -0
  92. package/libs/Sculpt/utils/export.js +21 -0
  93. package/libs/Sculpt/utils/three/ColoredMesh.js +26 -22
  94. package/libs/base/BasePlugin.js +14 -10
  95. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +146 -94
  96. package/libs/floorplan/MapviewFloorplanPlugin/index.js +62 -10
  97. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +109 -56
  98. package/libs/floorplan/ModelFloorplanPlugin/index.js +62 -9
  99. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +116 -63
  100. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +62 -9
  101. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +105 -52
  102. package/libs/floorplan/TopviewFloorplanPlugin/index.js +62 -9
  103. package/libs/floorplan/index.js +4 -0
  104. package/libs/index.js +208 -206
  105. package/libs/shared-utils/five/fiveEveryReadyListener.d.ts +2 -0
  106. package/libs/shared-utils/five/fiveEveryReadyListener.js +15 -0
  107. package/libs/shared-utils/five/index.js +6 -2
  108. package/libs/shared-utils/five/lookObject.js +31 -27
  109. package/libs/shared-utils/index.d.ts +1 -0
  110. package/libs/shared-utils/index.js +19 -17
  111. package/libs/shared-utils/logger.js +1 -1
  112. package/libs/shared-utils/tag.d.ts +40 -1
  113. package/libs/shared-utils/tag.js +139 -86
  114. package/libs/shared-utils/three/index.js +4 -0
  115. package/libs/shared-utils/three/temp.d.ts +2 -2
  116. package/libs/shared-utils/three/temp.js +4 -4
  117. package/package.json +1 -1
  118. package/README.md +0 -116
@@ -1,4 +1,4 @@
1
- import * as p from "three";
1
+ import * as m from "three";
2
2
  import { Subscribe as yo, Five as To } from "@realsee/five";
3
3
  import { CSS3DRenderPlugin as Mo } from "../CSS3DRenderPlugin/index.js";
4
4
  import Po from "./Components/origins.js";
@@ -26,7 +26,10 @@ import "../shared-utils/Utils/BaseUtil.js";
26
26
  import "../shared-utils/Utils/WorkUtil.js";
27
27
  import "../shared-utils/five/transformPosition.js";
28
28
  import "../shared-utils/three/temp.js";
29
+ import "../shared-utils/three/core/Raycaster.js";
29
30
  import "../shared-utils/dom/resizeObserver.js";
31
+ import "../shared-utils/five/fiveEveryReadyListener.js";
32
+ import "../shared-utils/throttle.js";
30
33
  import "hammerjs";
31
34
  import "../shared-utils/three/PointSelector/index.js";
32
35
  import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
@@ -52,24 +55,70 @@ import "../shared-utils/three/core/Sphere.js";
52
55
  import "animejs";
53
56
  import "../shared-utils/isNil.js";
54
57
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
55
- import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
58
+ import "../Sculpt/Meshes/Polygon.js";
59
+ import "../shared-utils/three/generatePolygonGeometry.js";
60
+ import "../shared-utils/three/earcut3D.js";
61
+ import "earcut";
62
+ import "../shared-utils/three/getNormal.js";
63
+ import "../PanoMeasurePlugin/utils/isIntersecting.js";
64
+ import "../Sculpt/utils/three/ColoredMesh.js";
65
+ import "../Sculpt/utils/Modules/Global.js";
66
+ import "../Sculpt/utils/Modules/Cursor.js";
67
+ import "../Object3DHelperPlugin/Controller.js";
68
+ import "../base/BasePlugin.js";
69
+ import "../shared-utils/url/absoluteUrl.js";
70
+ import "../vendor/hotkeys-js/dist/hotkeys.esm.js";
71
+ import "../Sculpt/utils/three/rayOnLine.js";
72
+ import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
73
+ import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
74
+ import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
75
+ import "../shared-utils/three/boundingBox.js";
76
+ import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
77
+ import "../shared-utils/Object3DHelper/utils/direction.js";
78
+ import "../shared-utils/Object3DHelper/Constants/color.js";
79
+ import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
80
+ import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
81
+ import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
82
+ import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
83
+ import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
84
+ import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
85
+ import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
86
+ import "../shared-utils/Object3DHelper/Controller/MoveController.js";
87
+ import "../shared-utils/Object3DHelper/Base/BaseController.js";
88
+ import "../shared-utils/threex/domevents/index.js";
89
+ import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
90
+ import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
91
+ import "../Object3DHelperPlugin/FiveControllerWrapper.js";
92
+ import "../shared-utils/Object3DHelper/index.js";
93
+ import "../shared-utils/Object3DHelper/Controller/RotateController.js";
94
+ import "../shared-utils/math/rad2Deg.js";
95
+ import "../shared-utils/math/deg2Rad.js";
96
+ import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
97
+ import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
98
+ import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
99
+ import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
100
+ import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
101
+ import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
102
+ import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
103
+ import "../shared-utils/five/fiveModelLoad.js";
104
+ import "../shared-utils/five/FiveDomEvents.js";
105
+ import "../shared-utils/five/calculateThreeMouse.js";
56
106
  import "../shared-utils/isTouchDevice.js";
107
+ import "../shared-utils/three/geometryUtil.js";
108
+ import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
57
109
  import "../shared-utils/five/getPosition.js";
58
110
  import "../shared-utils/five/getRaycasterByNdcPosition.js";
59
111
  import "../shared-utils/three/PointSelector/utils/contents.js";
60
112
  import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
61
113
  import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
62
114
  import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
63
- import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
64
- import "../shared-utils/five/fiveModelLoad.js";
65
- import "../shared-utils/url/absoluteUrl.js";
66
115
  import "../vendor/svelte/internal/index.js";
67
116
  import "./store.js";
68
117
  import "../vendor/svelte/store/index.js";
69
- const D = 1e-3, v = 0.01, Io = "https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png", Fe = (n, r) => {
118
+ const D = 1e-3, v = 0.01, Io = "https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png", Le = (i, r) => {
70
119
  var k, z, q, B, G, J, K, Q;
71
120
  let j = r == null ? void 0 : r.container, y = 1.4;
72
- const oo = (k = r == null ? void 0 : r.wait) != null ? k : 200, eo = (z = r == null ? void 0 : r.maxNumberOnScreen) != null ? z : 3, I = (q = r == null ? void 0 : r.minRad) != null ? q : Math.PI / 4, L = (B = r == null ? void 0 : r.nearTolerance) != null ? B : 100, to = (G = r == null ? void 0 : r.upsideHeight) != null ? G : 1.6, A = (J = r == null ? void 0 : r.minDistance) != null ? J : 1.2, f = (K = r == null ? void 0 : r.maxDistance) != null ? K : 3.5, C = Mo(n), S = document.createElement("div");
121
+ const oo = (k = r == null ? void 0 : r.wait) != null ? k : 200, to = (z = r == null ? void 0 : r.maxNumberOnScreen) != null ? z : 3, I = (q = r == null ? void 0 : r.minRad) != null ? q : Math.PI / 4, L = (B = r == null ? void 0 : r.nearTolerance) != null ? B : 100, eo = (G = r == null ? void 0 : r.upsideHeight) != null ? G : 1.6, A = (J = r == null ? void 0 : r.minDistance) != null ? J : 1.2, f = (K = r == null ? void 0 : r.maxDistance) != null ? K : 3.5, C = Mo(i), S = document.createElement("div");
73
122
  S.classList.add("PanoSpatialTagPlugin"), Object.assign(S.style, Eo);
74
123
  const V = new yo();
75
124
  let Z = new Image();
@@ -87,203 +136,203 @@ const D = 1e-3, v = 0.01, Io = "https://vrlab-image4.ljcdn.com/release/web/PanoS
87
136
  }, Y = new Po({
88
137
  target: S,
89
138
  props: { origins: o.origins }
90
- }), _ = (e, s) => {
139
+ }), _ = (t, s) => {
91
140
  T(), s && M();
92
141
  }, F = () => {
93
142
  o.forbidden && (o.forbidden = !1, M());
94
- }, H = (e, s) => {
143
+ }, H = (t, s) => {
95
144
  if (o.tags.length === 0)
96
145
  return;
97
- const a = s.longitude - n.state.longitude, t = n.camera.clone();
98
- t.position.copy(s.offset), t.rotateOnWorldAxis(new p.Vector3(0, 1, 0), a), t.updateProjectionMatrix(), t.updateMatrixWorld(!0);
99
- const g = new p.Frustum(), P = new p.Matrix4();
100
- P.multiplyMatrices(t.projectionMatrix, t.matrixWorldInverse), g.setFromProjectionMatrix(P), o.tags.forEach((i) => {
101
- const $ = t.position.clone().setY(y).distanceTo(i.position);
102
- if ($ < A || $ > f || !g.containsPoint(i.position))
103
- return i.destroying = !0;
104
- const x = i.position.clone().sub(t.position).setY(0);
105
- if (x.angleTo(i.normal) > Math.PI / 2 - I && x.angleTo(i.normal) < Math.PI / 2 + I)
106
- return i.destroying = !0;
107
- }), o.tags.forEach((i) => {
108
- i.destroying ? i.app.$set({
109
- contentZoom: 0.1 + t.position.distanceTo(i.position) / f,
110
- lineWidthZoom: 0.38 * (0.01 + t.position.distanceTo(i.position) / f),
111
- destroying: i.destroying
112
- }) : i.app.$set({
113
- lineWidthZoom: 0.38 * (0.01 + t.position.distanceTo(i.position) / f),
114
- lineHeightZoom: 0.4 + (t.position.distanceTo(i.position) - A) / f * 0.6,
115
- contentZoom: 0.1 + t.position.distanceTo(i.position) / f
146
+ const l = s.longitude - i.state.longitude, e = i.camera.clone();
147
+ e.position.copy(s.offset), e.rotateOnWorldAxis(new m.Vector3(0, 1, 0), l), e.updateProjectionMatrix(), e.updateMatrixWorld(!0);
148
+ const g = new m.Frustum(), P = new m.Matrix4();
149
+ P.multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse), g.setFromProjectionMatrix(P), o.tags.forEach((n) => {
150
+ const $ = e.position.clone().setY(y).distanceTo(n.position);
151
+ if ($ < A || $ > f || !g.containsPoint(n.position))
152
+ return n.destroying = !0;
153
+ const x = n.position.clone().sub(e.position).setY(0);
154
+ if (x.angleTo(n.normal) > Math.PI / 2 - I && x.angleTo(n.normal) < Math.PI / 2 + I)
155
+ return n.destroying = !0;
156
+ }), o.tags.forEach((n) => {
157
+ n.destroying ? n.app.$set({
158
+ contentZoom: 0.1 + e.position.distanceTo(n.position) / f,
159
+ lineWidthZoom: 0.38 * (0.01 + e.position.distanceTo(n.position) / f),
160
+ destroying: n.destroying
161
+ }) : n.app.$set({
162
+ lineWidthZoom: 0.38 * (0.01 + e.position.distanceTo(n.position) / f),
163
+ lineHeightZoom: 0.4 + (e.position.distanceTo(n.position) - A) / f * 0.6,
164
+ contentZoom: 0.1 + e.position.distanceTo(n.position) / f
116
165
  });
117
166
  }), setTimeout(() => {
118
- o.tags.forEach((i) => {
119
- i.destroying && (i.app.$destroy(), i = null);
120
- }), o.tags = o.tags.filter((i) => !i.destroying), T();
167
+ o.tags.forEach((n) => {
168
+ n.destroying && (n.app.$destroy(), n = null);
169
+ }), o.tags = o.tags.filter((n) => !n.destroying), T();
121
170
  }, 1900);
122
- }, N = (e) => {
123
- e !== To.Mode.Panorama && !o.forbidden && (Y.$set({ origins: [] }), o.tags.forEach((s) => {
171
+ }, N = (t) => {
172
+ t !== To.Mode.Panorama && !o.forbidden && (Y.$set({ origins: [] }), o.tags.forEach((s) => {
124
173
  s.app.$destroy(), s = null;
125
174
  }), o.origins = [], o.tags = [], o.forbidden = !0);
126
175
  }, T = () => {
127
176
  if (o.forbidden || !o.enabled)
128
177
  return;
129
- const e = n.camera, s = e.getWorldDirection(new p.Vector3());
130
- o.origins = o.tags.map((a) => {
131
- const t = a.position.clone().project(e), g = a.position.clone().sub(e.position).setY(0).angleTo(s.setY(0)) < Math.PI / 2;
178
+ const t = i.camera, s = t.getWorldDirection(new m.Vector3());
179
+ o.origins = o.tags.map((l) => {
180
+ const e = l.position.clone().project(t), g = l.position.clone().sub(t.position).setY(0).angleTo(s.setY(0)) < Math.PI / 2;
132
181
  return {
133
- id: a.id,
182
+ id: l.id,
134
183
  front: g,
135
- left: (t.x + 1) / 2 * 100,
136
- top: (-t.y + 1) / 2 * 100,
137
- destroying: a.destroying
184
+ left: (e.x + 1) / 2 * 100,
185
+ top: (-e.y + 1) / 2 * 100,
186
+ destroying: l.destroying
138
187
  };
139
188
  }), Y.$set({ origins: o.origins });
140
189
  }, M = () => {
141
190
  o.forbidden || !o.enabled || (o.timeoutId && clearTimeout(o.timeoutId), o.timeoutId = setTimeout(() => {
142
191
  o.timeoutId = void 0;
143
- const e = no();
144
- e.length && (o.tags = o.tags.concat(e), T());
192
+ const t = io();
193
+ t.length && (o.tags = o.tags.concat(t), T());
145
194
  }, oo));
146
- }, no = () => {
147
- const { clientWidth: e, clientHeight: s } = n.getElement(), a = [], t = n.camera, g = new p.Frustum(), P = new p.Matrix4(), i = t.getWorldDirection(new p.Vector3());
148
- P.multiplyMatrices(t.projectionMatrix, t.matrixWorldInverse), g.setFromProjectionMatrix(P);
149
- const $ = o.tags.filter((d) => g.containsPoint(d.position) && !d.destroying).length, x = o.points.reduce((d, m) => {
150
- if (o.tags.find((l) => m.id === l.id && !l.destroying))
151
- return d;
152
- const u = t.position.clone().setY(y).distanceTo(m.position);
153
- if (u < A || u > f || !g.containsPoint(m.position))
154
- return d;
155
- const E = m.position.clone().sub(t.position).setY(0);
156
- if (E.angleTo(m.normal) > Math.PI / 2 - I && E.angleTo(m.normal) < Math.PI / 2 + I)
157
- return d;
158
- const w = m.position.clone().project(t);
159
- if (!o.tags.every((l) => {
160
- if (l.position.clone().sub(t.position).setY(0).angleTo(i.setY(0)) > Math.PI / 2)
195
+ }, io = () => {
196
+ const { clientWidth: t, clientHeight: s } = i.getElement(), l = [], e = i.camera, g = new m.Frustum(), P = new m.Matrix4(), n = e.getWorldDirection(new m.Vector3());
197
+ P.multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse), g.setFromProjectionMatrix(P);
198
+ const $ = o.tags.filter((p) => g.containsPoint(p.position) && !p.destroying).length, x = o.points.reduce((p, a) => {
199
+ if (o.tags.find((d) => a.id === d.id && !d.destroying))
200
+ return p;
201
+ const u = e.position.clone().setY(y).distanceTo(a.position);
202
+ if (u < A || u > f || !g.containsPoint(a.position))
203
+ return p;
204
+ const E = a.position.clone().sub(e.position).setY(0);
205
+ if (E.angleTo(a.normal) > Math.PI / 2 - I && E.angleTo(a.normal) < Math.PI / 2 + I)
206
+ return p;
207
+ const w = a.position.clone().project(e);
208
+ if (!o.tags.every((d) => {
209
+ if (d.position.clone().sub(e.position).setY(0).angleTo(n.setY(0)) > Math.PI / 2)
161
210
  return !0;
162
- const b = l.position.clone().project(t);
163
- return Math.sqrt(Math.pow((w.x - b.x) / 2 * e, 2) + Math.pow((w.y - b.y) / 2 * s, 2)) > L;
211
+ const b = d.position.clone().project(e);
212
+ return Math.sqrt(Math.pow((w.x - b.x) / 2 * t, 2) + Math.pow((w.y - b.y) / 2 * s, 2)) > L;
164
213
  }))
165
- return d;
214
+ return p;
166
215
  const h = {
167
- id: m.id,
168
- position: m.position,
169
- normal: m.normal,
170
- replacement: m.replacement,
171
- weight: m.weight,
216
+ id: a.id,
217
+ position: a.position,
218
+ normal: a.normal,
219
+ replacement: a.replacement,
220
+ weight: a.weight,
172
221
  distance: u
173
222
  };
174
223
  let c;
175
- for (let l = 0, b = d.length; l < b; l++) {
176
- const O = d[l];
224
+ for (let d = 0, b = p.length; d < b; d++) {
225
+ const O = p[d];
177
226
  if (h.weight > O.weight) {
178
- c = l;
227
+ c = d;
179
228
  break;
180
229
  }
181
230
  if (h.distance < O.distance) {
182
- c = l;
231
+ c = d;
183
232
  break;
184
233
  }
185
234
  }
186
- return c !== void 0 ? d.splice(c, 0, h) : d.push(h), d;
235
+ return c !== void 0 ? p.splice(c, 0, h) : p.push(h), p;
187
236
  }, []);
188
- for (let d = 0, m = x.length; d < m && !($ + a.length >= eo); d++) {
189
- const u = x[d];
190
- if (a.find((c) => u.id === c.id))
237
+ for (let p = 0, a = x.length; p < a && !($ + l.length >= to); p++) {
238
+ const u = x[p];
239
+ if (l.find((c) => u.id === c.id))
191
240
  continue;
192
- const E = u.position.clone().project(t);
193
- if (!o.tags.concat(a).every((c) => {
194
- if (c.position.clone().sub(t.position).setY(0).angleTo(i.setY(0)) > Math.PI / 2)
241
+ const E = u.position.clone().project(e);
242
+ if (!o.tags.concat(l).every((c) => {
243
+ if (c.position.clone().sub(e.position).setY(0).angleTo(n.setY(0)) > Math.PI / 2)
195
244
  return !0;
196
- const l = c.position.clone().project(t);
197
- return Math.sqrt(Math.pow((E.x - l.x) / 2 * e, 2) + Math.pow((E.y - l.y) / 2 * s, 2)) > L;
245
+ const d = c.position.clone().project(e);
246
+ return Math.sqrt(Math.pow((E.x - d.x) / 2 * t, 2) + Math.pow((E.y - d.y) / 2 * s, 2)) > L;
198
247
  }))
199
248
  continue;
200
- const w = new p.Raycaster(
201
- t.position.clone().setY(y),
202
- u.position.clone().sub(t.position.clone().setY(y)).normalize(),
249
+ const w = new m.Raycaster(
250
+ e.position.clone().setY(y),
251
+ u.position.clone().sub(e.position.clone().setY(y)).normalize(),
203
252
  0,
204
253
  u.distance + v
205
- ), [h] = o.intersectObjects ? w.intersectObjects(o.intersectObjects, !0) : n.model.loaded ? n.model.intersectRaycaster(w) : w.intersectObjects(n.model.children, !0);
254
+ ), [h] = o.intersectObjects ? w.intersectObjects(o.intersectObjects, !0) : i.model.loaded ? i.model.intersectRaycaster(w) : w.intersectObjects(i.model.children, !0);
206
255
  if (h && u.distance - h.distance < v) {
207
- const { position: c, normal: l, id: b, replacement: O } = u, fo = new p.Plane().setFromNormalAndCoplanarPoint(l, c), X = c.clone().sub(t.position).cross(new p.Vector3(0, 1, 0)).setLength(D), uo = [
256
+ const { position: c, normal: d, id: b, replacement: O } = u, fo = new m.Plane().setFromNormalAndCoplanarPoint(d, c), X = c.clone().sub(e.position).cross(new m.Vector3(0, 1, 0)).setLength(D), uo = [
208
257
  c.clone(),
209
258
  c.clone().add(X),
210
- c.clone().add(new p.Vector3(0, D, 0)).add(X),
211
- c.clone().add(new p.Vector3(0, D, 0))
212
- ].map((wo) => fo.projectPoint(wo, new p.Vector3())), { container: go, dispose: ho } = C.create3DDomContainer(uo) || {}, bo = new xo({
259
+ c.clone().add(new m.Vector3(0, D, 0)).add(X),
260
+ c.clone().add(new m.Vector3(0, D, 0))
261
+ ].map((wo) => fo.projectPoint(wo, new m.Vector3())), { container: go, dispose: ho } = C.create3DDomContainer(uo) || {}, bo = new xo({
213
262
  target: go,
214
263
  props: {
215
264
  id: b,
216
265
  content: o.render(o.template, O),
217
- lineWidthZoom: 0.38 * (0.01 + t.position.distanceTo(c) / f),
218
- lineHeightZoom: 0.4 + (t.position.distanceTo(c) - A) / f * 0.6,
219
- contentZoom: 0.1 + t.position.distanceTo(c) / f,
220
- upsideDown: c.y > to,
266
+ lineWidthZoom: 0.38 * (0.01 + e.position.distanceTo(c) / f),
267
+ lineHeightZoom: 0.4 + (e.position.distanceTo(c) - A) / f * 0.6,
268
+ contentZoom: 0.1 + e.position.distanceTo(c) / f,
269
+ upsideDown: c.y > eo,
221
270
  folded: o.folded,
222
271
  events: o.events,
223
272
  hooks: V,
224
273
  dispose: ho
225
274
  }
226
275
  });
227
- a.push({
276
+ l.push({
228
277
  position: c,
229
- normal: l,
278
+ normal: d,
230
279
  id: b,
231
280
  app: bo
232
281
  });
233
282
  }
234
283
  }
235
- return a;
236
- }, io = (e) => {
237
- o.points = e.points.map((s) => {
238
- var a, t;
284
+ return l;
285
+ }, no = (t) => {
286
+ o.points = t.points.map((s) => {
287
+ var l, e;
239
288
  return {
240
289
  id: s.id,
241
- position: new p.Vector3().fromArray(s.position),
242
- normal: new p.Vector3().fromArray(s.normal),
243
- replacement: (a = s.replacement) != null ? a : {},
244
- weight: (t = s.weight) != null ? t : -1
290
+ position: new m.Vector3().fromArray(s.position),
291
+ normal: new m.Vector3().fromArray(s.normal),
292
+ replacement: (l = s.replacement) != null ? l : {},
293
+ weight: (e = s.weight) != null ? e : -1
245
294
  };
246
- }), e.render && (o.render = e.render), e.template && (o.template = e.template), e.events && (o.events = e.events), e.enabled === !1 && (o.enabled = e.enabled), e.folded === !0 && (o.folded = e.folded);
247
- }, ro = (e) => {
248
- o.intersectObjects = e, M();
295
+ }), t.render && (o.render = t.render), t.template && (o.template = t.template), t.events && (o.events = t.events), t.enabled === !1 && (o.enabled = t.enabled), t.folded === !0 && (o.folded = t.folded);
296
+ }, ro = (t) => {
297
+ o.intersectObjects = t, M();
249
298
  }, so = () => {
250
299
  o.enabled = !0, M();
251
300
  }, co = () => {
252
- o.enabled = !1, Y.$set({ origins: [] }), o.tags.forEach((e) => {
253
- e.app.$destroy(), e = null;
301
+ o.enabled = !1, Y.$set({ origins: [] }), o.tags.forEach((t) => {
302
+ t.app.$destroy(), t = null;
254
303
  }), o.origins = [], o.tags = [];
255
- }, lo = () => {
256
- o.folded = !1, o.tags.forEach((e) => {
257
- e.app.$set({ folded: o.folded });
258
- });
259
304
  }, po = () => {
260
- o.folded = !0, o.tags.forEach((e) => {
261
- e.app.$set({ folded: o.folded });
305
+ o.folded = !1, o.tags.forEach((t) => {
306
+ t.app.$set({ folded: o.folded });
307
+ });
308
+ }, mo = () => {
309
+ o.folded = !0, o.tags.forEach((t) => {
310
+ t.app.$set({ folded: o.folded });
262
311
  });
263
- }, ao = (e) => {
312
+ }, lo = (t) => {
264
313
  o.tags.forEach((s) => {
265
- s.id === e && s.app.$set({ folded: !1 });
314
+ s.id === t && s.app.$set({ folded: !1 });
266
315
  });
267
- }, mo = (e) => {
316
+ }, ao = (t) => {
268
317
  o.tags.forEach((s) => {
269
- s.id === e && s.app.$set({ folded: !0 });
318
+ s.id === t && s.app.$set({ folded: !0 });
270
319
  });
271
320
  }, U = () => {
272
- n.once("renderFrame", T);
321
+ i.once("renderFrame", T);
273
322
  }, R = () => {
274
- j || (j = n.getElement().parentElement), j && j.appendChild(S), o.forbidden = !1, y = n.model.bounding.getCenter(new p.Vector3()).y, M(), n.on("panoWillArrive", H), n.on("panoArrived", F), n.on("modeChange", N), n.on("cameraUpdate", _);
323
+ j || (j = i.getElement().parentElement), j && j.appendChild(S), o.forbidden = !1, y = i.model.bounding.getCenter(new m.Vector3()).y, M(), i.on("panoWillArrive", H), i.on("panoArrived", F), i.on("modeChange", N), i.on("cameraUpdate", _);
275
324
  }, W = () => {
276
- Z = null, C.disposeAll(), Y.$destroy(), o.tags.forEach((e) => {
277
- e.app.$destroy(), e = null;
278
- }), o.origins = [], o.tags = [], n.off("modelLoaded", R), n.off("renderFrame", T), n.off("panoWillArrive", H), n.off("panoArrived", F), n.off("modeChange", N), n.off("cameraUpdate", _), n.off("dispose", W), window.removeEventListener("resize", U, !1);
325
+ Z = null, C.disposeAll(), Y.$destroy(), o.tags.forEach((t) => {
326
+ t.app.$destroy(), t = null;
327
+ }), o.origins = [], o.tags = [], i.off("modelLoaded", R), i.off("renderFrame", T), i.off("panoWillArrive", H), i.off("panoArrived", F), i.off("modeChange", N), i.off("cameraUpdate", _), i.off("dispose", W), window.removeEventListener("resize", U, !1);
279
328
  };
280
- return window.addEventListener("resize", U, !1), (Q = n == null ? void 0 : n.model) != null && Q.loaded ? R() : n.once("modelLoaded", R), n.on("dispose", W), {
281
- load: io,
329
+ return window.addEventListener("resize", U, !1), (Q = i == null ? void 0 : i.model) != null && Q.loaded ? R() : i.once("modelLoaded", R), i.on("dispose", W), {
330
+ load: no,
282
331
  setIntersectObjects: ro,
283
- unfoldAll: lo,
284
- foldAll: po,
285
- unfold: ao,
286
- fold: mo,
332
+ unfoldAll: po,
333
+ foldAll: mo,
334
+ unfold: lo,
335
+ fold: ao,
287
336
  enable: so,
288
337
  disable: co,
289
338
  hooks: V,
@@ -291,6 +340,6 @@ const D = 1e-3, v = 0.01, Io = "https://vrlab-image4.ljcdn.com/release/web/PanoS
291
340
  };
292
341
  };
293
342
  export {
294
- Fe as PanoSpatialTagPlugin,
295
- Fe as default
343
+ Le as PanoSpatialTagPlugin,
344
+ Le as default
296
345
  };
@@ -23,7 +23,10 @@ import "../shared-utils/Utils/BaseUtil.js";
23
23
  import "../shared-utils/Utils/WorkUtil.js";
24
24
  import "../shared-utils/five/transformPosition.js";
25
25
  import "../shared-utils/three/temp.js";
26
+ import "../shared-utils/three/core/Raycaster.js";
26
27
  import "../shared-utils/dom/resizeObserver.js";
28
+ import "../shared-utils/five/fiveEveryReadyListener.js";
29
+ import "../shared-utils/throttle.js";
27
30
  import "hammerjs";
28
31
  import "../shared-utils/three/PointSelector/index.js";
29
32
  import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
@@ -49,17 +52,63 @@ import "../shared-utils/three/core/Sphere.js";
49
52
  import "animejs";
50
53
  import "../shared-utils/isNil.js";
51
54
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
52
- import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
55
+ import "../Sculpt/Meshes/Polygon.js";
56
+ import "../shared-utils/three/generatePolygonGeometry.js";
57
+ import "../shared-utils/three/earcut3D.js";
58
+ import "earcut";
59
+ import "../shared-utils/three/getNormal.js";
60
+ import "../PanoMeasurePlugin/utils/isIntersecting.js";
61
+ import "../Sculpt/utils/three/ColoredMesh.js";
62
+ import "../Sculpt/utils/Modules/Global.js";
63
+ import "../Sculpt/utils/Modules/Cursor.js";
64
+ import "../Object3DHelperPlugin/Controller.js";
65
+ import "../base/BasePlugin.js";
66
+ import "../shared-utils/url/absoluteUrl.js";
67
+ import "../vendor/hotkeys-js/dist/hotkeys.esm.js";
68
+ import "../Sculpt/utils/three/rayOnLine.js";
69
+ import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
70
+ import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
71
+ import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
72
+ import "../shared-utils/three/boundingBox.js";
73
+ import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
74
+ import "../shared-utils/Object3DHelper/utils/direction.js";
75
+ import "../shared-utils/Object3DHelper/Constants/color.js";
76
+ import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
77
+ import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
78
+ import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
79
+ import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
80
+ import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
81
+ import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
82
+ import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
83
+ import "../shared-utils/Object3DHelper/Controller/MoveController.js";
84
+ import "../shared-utils/Object3DHelper/Base/BaseController.js";
85
+ import "../shared-utils/threex/domevents/index.js";
86
+ import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
87
+ import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
88
+ import "../Object3DHelperPlugin/FiveControllerWrapper.js";
89
+ import "../shared-utils/Object3DHelper/index.js";
90
+ import "../shared-utils/Object3DHelper/Controller/RotateController.js";
91
+ import "../shared-utils/math/rad2Deg.js";
92
+ import "../shared-utils/math/deg2Rad.js";
93
+ import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
94
+ import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
95
+ import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
96
+ import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
97
+ import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
98
+ import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
99
+ import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
100
+ import "../shared-utils/five/fiveModelLoad.js";
101
+ import "../shared-utils/five/FiveDomEvents.js";
102
+ import "../shared-utils/five/calculateThreeMouse.js";
53
103
  import "../shared-utils/isTouchDevice.js";
104
+ import "../shared-utils/three/geometryUtil.js";
105
+ import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
54
106
  import "../shared-utils/five/getPosition.js";
55
107
  import "../shared-utils/five/getRaycasterByNdcPosition.js";
56
108
  import "../shared-utils/three/PointSelector/utils/contents.js";
57
109
  import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
58
110
  import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
59
111
  import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
60
- import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
61
- import "../shared-utils/five/fiveModelLoad.js";
62
- import "../shared-utils/url/absoluteUrl.js";
63
112
  import "./Components/origins.js";
64
113
  import "../vendor/svelte/internal/index.js";
65
114
  import "./store.js";