@realsee/dnalogel 3.50.13 → 3.50.15-alpha.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 (113) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/README.md +116 -0
  3. package/dist/Sculpt/Objects/Base/index.d.ts +1 -1
  4. package/dist/Sculpt/index.d.ts +2 -2
  5. package/dist/index.cjs.js +264 -264
  6. package/dist/index.js +4111 -4089
  7. package/dist/index.umd.js +266 -266
  8. package/dist/shared-utils/equal.d.ts +1 -1
  9. package/dist/shared-utils/index.d.ts +2 -1
  10. package/dist/shared-utils/tag.d.ts +19 -8
  11. package/dist/shared-utils/three/index.d.ts +1 -0
  12. package/libs/AreaMakerPlugin/Controller.js +107 -77
  13. package/libs/AreaMakerPlugin/index.js +39 -9
  14. package/libs/AreaMakerPlugin/utils/Item.js +68 -38
  15. package/libs/CSS3DRenderPlugin/Controller.js +38 -18
  16. package/libs/CSS3DRenderPlugin/index.js +41 -21
  17. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +63 -38
  18. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +103 -83
  19. package/libs/CruisePlugin/BaseController.js +72 -42
  20. package/libs/CruisePlugin/Move.js +35 -16
  21. package/libs/CruisePlugin/Work.js +67 -48
  22. package/libs/CruisePlugin/index.js +45 -26
  23. package/libs/CurrentPanoImagePlugin/Controller.js +71 -41
  24. package/libs/CurrentPanoImagePlugin/index.js +40 -10
  25. package/libs/GuideLinePlugin/Controller.js +76 -57
  26. package/libs/GuideLinePlugin/GuideLineItem.js +40 -21
  27. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +4 -3
  28. package/libs/GuideLinePlugin/GuideLineModeItem.js +34 -15
  29. package/libs/GuideLinePlugin/index.js +45 -26
  30. package/libs/ModelMakerPlugin/Controller.js +53 -35
  31. package/libs/ModelMakerPlugin/index.js +40 -22
  32. package/libs/ModelTVVideoPlugin/Plugin.js +52 -32
  33. package/libs/ModelTVVideoPlugin/index.js +28 -8
  34. package/libs/Object3DHelperPlugin/Controller.js +55 -36
  35. package/libs/Object3DHelperPlugin/index.js +43 -24
  36. package/libs/PanoCompassPlugin/Controller.js +39 -19
  37. package/libs/PanoCompassPlugin/index.js +40 -20
  38. package/libs/PanoDoorLabelPlugin/BaseController.js +62 -32
  39. package/libs/PanoDoorLabelPlugin/Controller.js +105 -75
  40. package/libs/PanoDoorLabelPlugin/index.js +40 -10
  41. package/libs/PanoMeasurePlugin/Components/Controller0.js +9 -9
  42. package/libs/PanoMeasurePlugin/Components/Controller1.js +9 -9
  43. package/libs/PanoMeasurePlugin/Controller/EditController.js +5 -5
  44. package/libs/PanoMeasurePlugin/Controller/WatchController.js +79 -53
  45. package/libs/PanoMeasurePlugin/Controller/index.js +18 -18
  46. package/libs/PanoMeasurePlugin/Model/area.js +46 -20
  47. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +36 -7
  48. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +9 -9
  49. package/libs/PanoMeasurePlugin/index.js +4 -4
  50. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +46 -18
  51. package/libs/PanoRulerProPlugin/Controller.js +88 -39
  52. package/libs/PanoRulerProPlugin/RulerItems.js +151 -102
  53. package/libs/PanoRulerProPlugin/index.js +53 -4
  54. package/libs/PanoSpatialTagPlugin/Plugin.js +58 -38
  55. package/libs/PanoSpatialTagPlugin/index.js +26 -6
  56. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +82 -52
  57. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +238 -209
  58. package/libs/PanoTagPlugin/Components/Tag/index.js +155 -128
  59. package/libs/PanoTagPlugin/Components/TagContainer.js +103 -76
  60. package/libs/PanoTagPlugin/Components/TagItem.js +34 -7
  61. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +32 -5
  62. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +62 -35
  63. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +60 -33
  64. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +61 -34
  65. package/libs/PanoTagPlugin/controller/TagRender.js +53 -34
  66. package/libs/PanoTagPlugin/controller/TagUtil.js +37 -18
  67. package/libs/PanoTagPlugin/controller/index.js +48 -29
  68. package/libs/PanoTagPlugin/index.js +46 -27
  69. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +62 -32
  70. package/libs/PanoVideoPlugin/Controller.js +98 -68
  71. package/libs/PanoVideoPlugin/VideoMeshController.js +58 -28
  72. package/libs/PanoVideoPlugin/index.js +43 -13
  73. package/libs/PipelinePlugin/Controller.js +95 -66
  74. package/libs/PipelinePlugin/index.js +40 -11
  75. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +46 -16
  76. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +45 -15
  77. package/libs/PipelinePlugin/utils/Objects/Pipe.js +63 -33
  78. package/libs/Sculpt/Meshes/Box.js +4 -3
  79. package/libs/Sculpt/Meshes/Cylinder.js +4 -3
  80. package/libs/Sculpt/Meshes/Line.js +13 -12
  81. package/libs/Sculpt/Meshes/LineWithDots.js +9 -7
  82. package/libs/Sculpt/Meshes/Point.js +4 -3
  83. package/libs/Sculpt/Meshes/Polygon.js +3 -2
  84. package/libs/Sculpt/Meshes/Prism.js +12 -10
  85. package/libs/Sculpt/Meshes/Rectangle.js +4 -3
  86. package/libs/Sculpt/Objects/Base/index.d.ts +1 -1
  87. package/libs/Sculpt/Objects/Line/Editor.js +8 -7
  88. package/libs/Sculpt/index.d.ts +2 -2
  89. package/libs/Sculpt/index.js +4 -3
  90. package/libs/Sculpt/utils/three/ColoredMesh.js +7 -6
  91. package/libs/base/BasePlugin.js +5 -4
  92. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +91 -62
  93. package/libs/floorplan/MapviewFloorplanPlugin/index.js +40 -11
  94. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +82 -53
  95. package/libs/floorplan/ModelFloorplanPlugin/index.js +40 -11
  96. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +75 -45
  97. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +41 -11
  98. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +107 -78
  99. package/libs/floorplan/TopviewFloorplanPlugin/index.js +40 -11
  100. package/libs/floorplan/index.js +2 -1
  101. package/libs/index.js +34 -34
  102. package/libs/shared-utils/equal.d.ts +1 -1
  103. package/libs/shared-utils/five/index.js +4 -3
  104. package/libs/shared-utils/five/lookObject.js +4 -3
  105. package/libs/shared-utils/index.d.ts +2 -1
  106. package/libs/shared-utils/index.js +60 -55
  107. package/libs/shared-utils/logger.js +1 -1
  108. package/libs/shared-utils/tag.d.ts +19 -8
  109. package/libs/shared-utils/tag.js +68 -49
  110. package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +3 -2
  111. package/libs/shared-utils/three/index.d.ts +1 -0
  112. package/libs/shared-utils/three/index.js +2 -1
  113. package/package.json +1 -1
@@ -1,13 +1,14 @@
1
1
  var b = Object.defineProperty;
2
- var k = (n, e, t) => e in n ? b(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var i = (n, e, t) => (k(n, typeof e != "symbol" ? e + "" : e, t), t);
4
- import * as a from "three";
2
+ var k = (a, e, t) => e in a ? b(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
+ var i = (a, e, t) => (k(a, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import * as r from "three";
5
+ import "../../shared-utils/tag.js";
5
6
  import "hammerjs";
6
7
  import { Subscribe as y } from "../../shared-utils/Subscribe.js";
8
+ import "../../shared-utils/three/PointSelector/index.js";
7
9
  import "three/examples/jsm/renderers/CSS3DRenderer";
8
10
  import "@realsee/five/line";
9
11
  import "../../vendor/three/examples/jsm/lines/LineGeometry.js";
10
- import "../../shared-utils/tag.js";
11
12
  import { Object3D as T } from "../../shared-utils/three/core/Object3D.js";
12
13
  import { LineSegments as C } from "../../shared-utils/three/core/LineSegments.js";
13
14
  import "../../shared-utils/three/core/Sphere.js";
@@ -17,8 +18,6 @@ import { LabelItem as v } from "../../components/AreaLabel/LabelItem.js";
17
18
  import { getCenterPointOfPoints as M } from "../../shared-utils/math/planimetry.js";
18
19
  import { resizeObserver as V } from "../../shared-utils/dom/resizeObserver.js";
19
20
  import { _raycaster as d } from "../../shared-utils/three/temp.js";
20
- import "../../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
21
- import "../../vendor/three/build/three.module.js";
22
21
  import "../../shared-utils/positionToVector3.js";
23
22
  import "../../shared-utils/five/vector3ToScreen.js";
24
23
  import "../../shared-utils/five/getFiveModel.js";
@@ -26,7 +25,38 @@ import "../../shared-utils/Utils/FiveUtil.js";
26
25
  import "../../shared-utils/Utils/BaseUtil.js";
27
26
  import "../../shared-utils/Utils/WorkUtil.js";
28
27
  import "../../shared-utils/five/transformPosition.js";
28
+ import "../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
29
+ import "../../shared-utils/three/Magnifier.js";
30
+ import "../../shared-utils/three/PointSelector/utils/PointHelper.js";
31
+ import "../../shared-utils/three/Assets/index.js";
32
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
33
+ import "../../CSS3DRenderPlugin/utils/even.js";
34
+ import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
35
+ import "../../shared-utils/three/centerPoint.js";
36
+ import "../../shared-utils/three/getObjectVisible.js";
37
+ import "../../shared-utils/isNil.js";
29
38
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
39
+ import "../../shared-utils/three/PointSelector/utils/html.js";
40
+ import "../../shared-utils/five/initialCSS3DRender.js";
41
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
42
+ import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
43
+ import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
44
+ import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
45
+ import "../../Sculpt/Meshes/Line.js";
46
+ import "../../Sculpt/typings/style.js";
47
+ import "../../shared-utils/five/FiveLine.js";
48
+ import "../../shared-utils/three/IObject3D.js";
49
+ import "../../Sculpt/utils/removeAllTag.js";
50
+ import "../../Sculpt/utils/Meshes/getLengthHTML.js";
51
+ import "../../shared-utils/three/applyObjectMatrixWorld.js";
52
+ import "../../shared-utils/util.js";
53
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
54
+ import "../../shared-utils/isTouchDevice.js";
55
+ import "../../shared-utils/five/getPosition.js";
56
+ import "../../shared-utils/five/getRaycasterByNdcPosition.js";
57
+ import "../../shared-utils/three/PointSelector/utils/contents.js";
58
+ import "../../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
59
+ import "../../vendor/three/build/three.module.js";
30
60
  import "../../shared-utils/animationFrame/index.js";
31
61
  import "../../vendor/svelte/internal/index.js";
32
62
  import "../../components/AreaLabel/Assets/roomLabelBg.js";
@@ -40,7 +70,7 @@ class P extends T {
40
70
  this.areaMakerItem.makerObject.raycast(t, s);
41
71
  }
42
72
  }
43
- class st {
73
+ class At {
44
74
  constructor(e, t) {
45
75
  i(this, "id");
46
76
  /** 标注名称 */
@@ -78,9 +108,9 @@ class st {
78
108
  /** 标注标签是否可见 */
79
109
  i(this, "tagVisible", null);
80
110
  /** 标注标签的世界坐标 */
81
- i(this, "tagPosition", new a.Vector3());
111
+ i(this, "tagPosition", new r.Vector3());
82
112
  /** 标注标签的 NDC 坐标 */
83
- i(this, "tagNDCPosition", new a.Vector3());
113
+ i(this, "tagNDCPosition", new r.Vector3());
84
114
  /** 标注标签的 transform */
85
115
  i(this, "tagTransform", { left: 0, top: 0 });
86
116
  /** 标注标签的显示层级 */
@@ -120,21 +150,21 @@ class st {
120
150
  // }
121
151
  /** 透明度动画 */
122
152
  i(this, "doOpacityAnime", (e) => {
123
- var l;
124
- (l = this.opacityAnime) == null || l.dispose();
125
- const t = e.duration, [s, o] = e.makerObjectOpacity, [h, r] = e.outlineOpacity;
153
+ var m;
154
+ (m = this.opacityAnime) == null || m.dispose();
155
+ const t = e.duration, [s, o] = e.makerObjectOpacity, [h, n] = e.outlineOpacity;
126
156
  if (t === 0) {
127
- this.makerObject.material.opacity = o, this.outline.material.opacity = r;
157
+ this.makerObject.material.opacity = o, this.outline.material.opacity = n;
128
158
  return;
129
159
  }
130
- return new Promise((m) => {
160
+ return new Promise((p) => {
131
161
  this.opacityAnime = new O({ makerObjectOpacity: s, outlineOpacity: h }).to({
132
162
  makerObjectOpacity: o,
133
- outlineOpacity: r
134
- }).onUpdate(({ makerObjectOpacity: p, outlineOpacity: c }) => {
135
- this.makerObject.material.opacity = p, this.outline.material.opacity = c, this.plugin.five.needsRender = !0;
136
- }).onComplete(() => m(!0)).onDispose(() => {
137
- this.makerObject.material.opacity = o, this.outline.material.opacity = r, this.plugin.five.needsRender = !0, m(!1);
163
+ outlineOpacity: n
164
+ }).onUpdate(({ makerObjectOpacity: l, outlineOpacity: c }) => {
165
+ this.makerObject.material.opacity = l, this.outline.material.opacity = c, this.plugin.five.needsRender = !0;
166
+ }).onComplete(() => p(!0)).onDispose(() => {
167
+ this.makerObject.material.opacity = o, this.outline.material.opacity = n, this.plugin.five.needsRender = !0, p(!1);
138
168
  }).play();
139
169
  });
140
170
  });
@@ -195,8 +225,8 @@ class st {
195
225
  const [o] = this.plugin.fiveUtil.model.intersectRaycaster(d), h = this.tagPosition.distanceTo(t.camera.position);
196
226
  if (o && o.distance + 0.1 < h)
197
227
  return { result: !1, msg: "标注标签被 Five 模型遮挡" };
198
- const r = this.tagNDCPosition;
199
- return Math.abs(r.x) > 1.2 || Math.abs(r.y) > 1.2 || Math.abs(r.z) > 1 ? { result: !1, msg: "标注标签不在屏幕内" } : { result: !0, msg: "" };
228
+ const n = this.tagNDCPosition;
229
+ return Math.abs(n.x) > 1.2 || Math.abs(n.y) > 1.2 || Math.abs(n.z) > 1 ? { result: !1, msg: "标注标签不在屏幕内" } : { result: !0, msg: "" };
200
230
  });
201
231
  /** 相机位姿发生变化时,更新标签 */
202
232
  i(this, "onFiveCameraUpdate", () => {
@@ -210,11 +240,11 @@ class st {
210
240
  };
211
241
  this.containerResizeTimeoutID && clearTimeout(this.containerResizeTimeoutID), this.containerResizeTimeoutID = setTimeout(t, 100);
212
242
  });
213
- var m, p, c, g;
214
- const s = t.object_data, o = s.bottom_y, h = s.height, r = new a.Color((m = s.color) != null ? m : "#FFFFFF"), l = (p = s.opacity) != null ? p : 0.4;
215
- this.data = t, this.id = t.id, this.name = (c = t.name) != null ? c : "", this.plugin = e, this.height = h, this.bottomY = o, this.opacity = l, this.shape = new a.Shape().fromJSON(s.shape), this.floorIndex = t.floor_index, this.makerObject = new a.Mesh(f(this.shape, h), j(r, l)), u(this.makerObject, o), this.makerObject.material.depthTest = this.plugin.config.modelDepthTest, this.outline = new C(
216
- new a.EdgesGeometry(this.makerObject.geometry),
217
- new a.LineBasicMaterial({ color: r, transparent: !0 })
243
+ var p, l, c, g;
244
+ const s = t.object_data, o = s.bottom_y, h = s.height, n = new r.Color((p = s.color) != null ? p : "#FFFFFF"), m = (l = s.opacity) != null ? l : 0.4;
245
+ this.data = t, this.id = t.id, this.name = (c = t.name) != null ? c : "", this.plugin = e, this.height = h, this.bottomY = o, this.opacity = m, this.shape = new r.Shape().fromJSON(s.shape), this.floorIndex = t.floor_index, this.makerObject = new r.Mesh(f(this.shape, h), j(n, m)), u(this.makerObject, o), this.makerObject.material.depthTest = this.plugin.config.modelDepthTest, this.outline = new C(
246
+ new r.EdgesGeometry(this.makerObject.geometry),
247
+ new r.LineBasicMaterial({ color: n, transparent: !0 })
218
248
  ), u(this.outline, o), this.outline.material.depthTest = this.plugin.config.modelDepthTest, this.setHeight(h), this.modelGroup = new P(this), this.modelGroup.visible = (g = s.visible) != null ? g : !0;
219
249
  }
220
250
  /** 挂载标注 */
@@ -252,7 +282,7 @@ class st {
252
282
  * @example setColor('#FF0000')
253
283
  */
254
284
  setColor(e) {
255
- const t = new a.Color(e);
285
+ const t = new r.Color(e);
256
286
  this.makerObject.material.color = t, this.outline.material.color = t, this.plugin.five.needsRender = !0;
257
287
  }
258
288
  /** 更改标注高度
@@ -261,8 +291,8 @@ class st {
261
291
  setHeight(e) {
262
292
  if (e <= 0)
263
293
  throw new Error("高度必须大于 0");
264
- this.height = e, this.makerObject.geometry = f(this.shape, e), this.outline.geometry = new a.EdgesGeometry(this.makerObject.geometry);
265
- const t = this.shape.extractPoints(10).shape.slice(0, -1), s = M(t), o = new a.Vector3(s.x, s.y, e);
294
+ this.height = e, this.makerObject.geometry = f(this.shape, e), this.outline.geometry = new r.EdgesGeometry(this.makerObject.geometry);
295
+ const t = this.shape.extractPoints(10).shape.slice(0, -1), s = M(t), o = new r.Vector3(s.x, s.y, e);
266
296
  u(o, this.bottomY), this.tagPosition.copy(o), this.updateTag(), this.plugin.five.needsRender = !0;
267
297
  }
268
298
  /** 更改标注标签的显示层级
@@ -278,23 +308,23 @@ class st {
278
308
  this.tagZIndex !== e && ((t = this.tagApp) == null || t.$set({ zIndex: e }));
279
309
  }
280
310
  }
281
- function f(n, e) {
282
- return new a.ExtrudeBufferGeometry(n, {
311
+ function f(a, e) {
312
+ return new r.ExtrudeBufferGeometry(a, {
283
313
  depth: e,
284
314
  bevelEnabled: !1
285
315
  });
286
316
  }
287
- function j(n, e) {
288
- return new a.MeshBasicMaterial({
289
- color: n,
317
+ function j(a, e) {
318
+ return new r.MeshBasicMaterial({
319
+ color: a,
290
320
  opacity: e,
291
321
  transparent: !0
292
322
  });
293
323
  }
294
- function u(n, e) {
295
- const t = new a.Matrix4(), s = new a.Matrix4().makeRotationX(Math.PI / 2), o = new a.Matrix4().makeTranslation(0, 0, -e), h = new a.Matrix4().makeScale(1, 1, -1);
296
- t.multiply(s), t.multiply(o), t.multiply(h), n.applyMatrix4(t);
324
+ function u(a, e) {
325
+ const t = new r.Matrix4(), s = new r.Matrix4().makeRotationX(Math.PI / 2), o = new r.Matrix4().makeTranslation(0, 0, -e), h = new r.Matrix4().makeScale(1, 1, -1);
326
+ t.multiply(s), t.multiply(o), t.multiply(h), a.applyMatrix4(t);
297
327
  }
298
328
  export {
299
- st as AreaMakerItem
329
+ At as AreaMakerItem
300
330
  };
@@ -2,23 +2,24 @@ var R = Object.defineProperty, F = Object.defineProperties;
2
2
  var C = Object.getOwnPropertyDescriptors;
3
3
  var f = Object.getOwnPropertySymbols;
4
4
  var O = Object.prototype.hasOwnProperty, S = Object.prototype.propertyIsEnumerable;
5
- var p = (o, i, e) => i in o ? R(o, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[i] = e, a = (o, i) => {
5
+ var d = (o, i, e) => i in o ? R(o, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[i] = e, a = (o, i) => {
6
6
  for (var e in i || (i = {}))
7
- O.call(i, e) && p(o, e, i[e]);
7
+ O.call(i, e) && d(o, e, i[e]);
8
8
  if (f)
9
9
  for (var e of f(i))
10
- S.call(i, e) && p(o, e, i[e]);
10
+ S.call(i, e) && d(o, e, i[e]);
11
11
  return o;
12
12
  }, l = (o, i) => F(o, C(i));
13
- var s = (o, i, e) => (p(o, typeof i != "symbol" ? i + "" : i, e), e);
13
+ var s = (o, i, e) => (d(o, typeof i != "symbol" ? i + "" : i, e), e);
14
14
  import { CSS3DRender as j } from "./utils/three/CSS3DRender.js";
15
15
  import x from "./utils/generateBehindFiveElement.js";
16
+ import "../shared-utils/tag.js";
16
17
  import "three";
17
18
  import "hammerjs";
19
+ import "../shared-utils/three/PointSelector/index.js";
18
20
  import "three/examples/jsm/renderers/CSS3DRenderer";
19
21
  import "@realsee/five/line";
20
22
  import "../vendor/three/examples/jsm/lines/LineGeometry.js";
21
- import "../shared-utils/tag.js";
22
23
  import "../shared-utils/three/core/Sphere.js";
23
24
  import "animejs";
24
25
  import { absoluteUrl as P } from "../shared-utils/url/absoluteUrl.js";
@@ -39,8 +40,6 @@ import "./utils/three/CSS3DScene.js";
39
40
  import "./utils/getAllCSS3DObject.js";
40
41
  import "../shared-utils/util.js";
41
42
  import "./utils/three/CSS3DGroup.js";
42
- import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
43
- import "../vendor/three/build/three.module.js";
44
43
  import "../shared-utils/five/vector3ToScreen.js";
45
44
  import "../shared-utils/five/getFiveModel.js";
46
45
  import "../shared-utils/Utils/FiveUtil.js";
@@ -49,8 +48,29 @@ import "../shared-utils/Utils/WorkUtil.js";
49
48
  import "../shared-utils/five/transformPosition.js";
50
49
  import "../shared-utils/three/temp.js";
51
50
  import "../shared-utils/dom/resizeObserver.js";
51
+ import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
52
+ import "../shared-utils/three/Magnifier.js";
53
+ import "../shared-utils/three/PointSelector/utils/PointHelper.js";
54
+ import "../shared-utils/three/Assets/index.js";
55
+ import "../shared-utils/three/PointSelector/utils/html.js";
56
+ import "../shared-utils/five/initialCSS3DRender.js";
57
+ import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
58
+ import "../Sculpt/Meshes/Line.js";
59
+ import "../Sculpt/typings/style.js";
60
+ import "../shared-utils/five/FiveLine.js";
61
+ import "../shared-utils/three/IObject3D.js";
62
+ import "../Sculpt/utils/removeAllTag.js";
63
+ import "../Sculpt/utils/Meshes/getLengthHTML.js";
64
+ import "../shared-utils/three/applyObjectMatrixWorld.js";
65
+ import "./utils/three/CSS3DSprite.js";
66
+ import "../shared-utils/isTouchDevice.js";
67
+ import "../shared-utils/five/getPosition.js";
68
+ import "../shared-utils/five/getRaycasterByNdcPosition.js";
69
+ import "../shared-utils/three/PointSelector/utils/contents.js";
70
+ import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
71
+ import "../vendor/three/build/three.module.js";
52
72
  const b = "v2.0.1", E = `CSS3DRenderPlugin@${b}`;
53
- class ue extends j {
73
+ class Ue extends j {
54
74
  constructor(e) {
55
75
  super();
56
76
  s(this, "five");
@@ -98,16 +118,16 @@ class ue extends j {
98
118
  if (this.state.disposed)
99
119
  return;
100
120
  const n = (() => {
101
- var m;
121
+ var p;
102
122
  (t == null ? void 0 : t.dpr) !== void 0 && console.warn(`${E}: please use "config.devicePixelRatio" replace "config.dpr"`);
103
- const d = {
123
+ const m = {
104
124
  ratio: 216e-5,
105
- devicePixelRatio: (m = t == null ? void 0 : t.dpr) != null ? m : 1,
125
+ devicePixelRatio: (p = t == null ? void 0 : t.dpr) != null ? p : 1,
106
126
  mode: "front",
107
127
  autoRender: !0,
108
128
  wrapperStyle: {}
109
129
  };
110
- return Object.assign(d, t, (t == null ? void 0 : t.mode) === "behind" ? { scene: this.five.scene } : void 0);
130
+ return Object.assign(m, t, (t == null ? void 0 : t.mode) === "behind" ? { scene: this.five.scene } : void 0);
111
131
  })(), { autoRender: h } = n;
112
132
  n.mode === "behind" && n.behindFiveContainer && (this.behindFiveContainer = n.behindFiveContainer);
113
133
  const r = this.create3DElement(this.five.camera, e, l(a({}, n), { autoRender: !1 }));
@@ -116,11 +136,11 @@ class ue extends j {
116
136
  const D = r.dispose;
117
137
  r.dispose = () => (this.created3DElementResults.includes(r) && this.created3DElementResults.splice(this.created3DElementResults.indexOf(r), 1), D());
118
138
  const c = () => {
119
- var m, v;
120
- const d = r.css3DObject.mode === "front" ? (v = this.frontFiveContainer) != null ? v : (m = this.five.getElement()) == null ? void 0 : m.parentElement : this.getBehindFiveElement();
121
- if (!d)
122
- return console.error(`${E}: wrapper is ${d}; mode is ${r.css3DObject.mode}`);
123
- r.appendToElement(d), r.render(), this.created3DElementResults.push(r);
139
+ var p, v;
140
+ const m = r.css3DObject.mode === "front" ? (v = this.frontFiveContainer) != null ? v : (p = this.five.getElement()) == null ? void 0 : p.parentElement : this.getBehindFiveElement();
141
+ if (!m)
142
+ return console.error(`${E}: wrapper is ${m}; mode is ${r.css3DObject.mode}`);
143
+ r.appendToElement(m), r.render(), this.created3DElementResults.push(r);
124
144
  }, u = () => {
125
145
  r.css3DObject.mode === "front" && c(), r.css3DObject.mode === "behind" && w(this.five).then(() => c());
126
146
  };
@@ -163,5 +183,5 @@ class ue extends j {
163
183
  }
164
184
  export {
165
185
  E as PLUGIN_NAME,
166
- ue as default
186
+ Ue as default
167
187
  };
@@ -1,15 +1,9 @@
1
1
  import o from "./Controller.js";
2
- import { CSS3DRender as O } from "./utils/three/CSS3DRender.js";
2
+ import { CSS3DRender as Sr } from "./utils/three/CSS3DRender.js";
3
3
  import "./utils/generateBehindFiveElement.js";
4
- import "three";
5
- import "hammerjs";
6
- import "three/examples/jsm/renderers/CSS3DRenderer";
7
- import "@realsee/five/line";
8
- import "../vendor/three/examples/jsm/lines/LineGeometry.js";
9
- import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
10
- import "../vendor/three/build/three.module.js";
11
4
  import "../shared-utils/tag.js";
12
5
  import "../shared-utils/positionToVector3.js";
6
+ import "three";
13
7
  import "../shared-utils/five/vector3ToScreen.js";
14
8
  import "../shared-utils/five/getFiveModel.js";
15
9
  import "../shared-utils/Utils/FiveUtil.js";
@@ -19,27 +13,53 @@ import "../shared-utils/Utils/WorkUtil.js";
19
13
  import "../shared-utils/five/transformPosition.js";
20
14
  import "../shared-utils/three/temp.js";
21
15
  import "../shared-utils/dom/resizeObserver.js";
16
+ import "hammerjs";
17
+ import "../shared-utils/three/PointSelector/index.js";
18
+ import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
19
+ import "../shared-utils/three/Magnifier.js";
20
+ import "../shared-utils/three/PointSelector/utils/PointHelper.js";
21
+ import "../shared-utils/three/Assets/index.js";
22
+ import "./utils/three/CSS3DObject.js";
23
+ import "three/examples/jsm/renderers/CSS3DRenderer";
24
+ import "./utils/even.js";
25
+ import "./utils/three/OpacityMesh.js";
26
+ import "../shared-utils/three/centerPoint.js";
27
+ import "../shared-utils/three/getObjectVisible.js";
28
+ import "@realsee/five/line";
29
+ import "../vendor/three/examples/jsm/lines/LineGeometry.js";
30
+ import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
31
+ import "../vendor/three/build/three.module.js";
22
32
  import "../shared-utils/three/core/Sphere.js";
23
33
  import "animejs";
24
- import "../shared-utils/url/absoluteUrl.js";
34
+ import "../shared-utils/isNil.js";
25
35
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
26
- import "../shared-utils/five/fiveModelLoad.js";
36
+ import "../shared-utils/three/PointSelector/utils/html.js";
37
+ import "../shared-utils/five/initialCSS3DRender.js";
27
38
  import "./utils/three/CSS3DRenderer.js";
28
39
  import "./utils/three/THREEJS_CSS3DRenderer.js";
29
40
  import "./utils/createResizeObserver.js";
30
- import "./utils/even.js";
31
- import "./utils/three/CSS3DObject.js";
32
- import "./utils/three/OpacityMesh.js";
33
- import "../shared-utils/three/centerPoint.js";
34
- import "../shared-utils/three/getObjectVisible.js";
35
- import "../shared-utils/isNil.js";
41
+ import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
42
+ import "../Sculpt/Meshes/Line.js";
43
+ import "../Sculpt/typings/style.js";
44
+ import "../shared-utils/five/FiveLine.js";
45
+ import "../shared-utils/three/IObject3D.js";
46
+ import "../Sculpt/utils/removeAllTag.js";
47
+ import "../Sculpt/utils/Meshes/getLengthHTML.js";
48
+ import "../shared-utils/three/applyObjectMatrixWorld.js";
49
+ import "../shared-utils/util.js";
50
+ import "./utils/three/CSS3DSprite.js";
51
+ import "../shared-utils/isTouchDevice.js";
52
+ import "../shared-utils/five/getPosition.js";
53
+ import "../shared-utils/five/getRaycasterByNdcPosition.js";
54
+ import "../shared-utils/three/PointSelector/utils/contents.js";
55
+ import "../shared-utils/url/absoluteUrl.js";
56
+ import "../shared-utils/five/fiveModelLoad.js";
36
57
  import "./utils/three/CSS3DScene.js";
37
58
  import "./utils/getAllCSS3DObject.js";
38
- import "../shared-utils/util.js";
39
59
  import "./utils/three/CSS3DGroup.js";
40
- const L = (r) => new o(r);
60
+ const er = (r) => new o(r);
41
61
  export {
42
- O as CSS3DRender,
43
- L as CSS3DRenderPlugin,
44
- L as default
62
+ Sr as CSS3DRender,
63
+ er as CSS3DRenderPlugin,
64
+ er as default
45
65
  };
@@ -1,6 +1,6 @@
1
1
  var A = Object.defineProperty;
2
- var D = (p, h, t) => h in p ? A(p, h, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[h] = t;
3
- var o = (p, h, t) => (D(p, typeof h != "symbol" ? h + "" : h, t), t);
2
+ var D = (c, p, t) => p in c ? A(c, p, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[p] = t;
3
+ var o = (c, p, t) => (D(c, typeof p != "symbol" ? p + "" : p, t), t);
4
4
  import { CSS3DObject as N } from "three/examples/jsm/renderers/CSS3DRenderer";
5
5
  import { Vector3 as n } from "three";
6
6
  import { even as E } from "../even.js";
@@ -8,16 +8,15 @@ import { Subscribe as Q } from "../../../shared-utils/Subscribe.js";
8
8
  import R from "./OpacityMesh.js";
9
9
  import { centerPoint as L } from "../../../shared-utils/three/centerPoint.js";
10
10
  import { getObjectVisible as T } from "../../../shared-utils/three/getObjectVisible.js";
11
+ import "../../../shared-utils/tag.js";
11
12
  import "hammerjs";
13
+ import "../../../shared-utils/three/PointSelector/index.js";
12
14
  import "@realsee/five/line";
13
15
  import "../../../vendor/three/examples/jsm/lines/LineGeometry.js";
14
- import "../../../shared-utils/tag.js";
15
16
  import "../../../shared-utils/three/core/Sphere.js";
16
17
  import "animejs";
17
18
  import { isNil as O } from "../../../shared-utils/isNil.js";
18
19
  import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
19
- import "../../../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
20
- import "../../../vendor/three/build/three.module.js";
21
20
  import "../../../shared-utils/positionToVector3.js";
22
21
  import "../../../shared-utils/five/vector3ToScreen.js";
23
22
  import "../../../shared-utils/five/getFiveModel.js";
@@ -27,29 +26,55 @@ import "../../../shared-utils/Utils/WorkUtil.js";
27
26
  import "../../../shared-utils/five/transformPosition.js";
28
27
  import "../../../shared-utils/three/temp.js";
29
28
  import "../../../shared-utils/dom/resizeObserver.js";
29
+ import "../../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
30
+ import "../../../shared-utils/three/Magnifier.js";
31
+ import "../../../shared-utils/three/PointSelector/utils/PointHelper.js";
32
+ import "../../../shared-utils/three/Assets/index.js";
33
+ import "./CSS3DObject.js";
34
+ import "../../../shared-utils/three/PointSelector/utils/html.js";
35
+ import "../../../shared-utils/five/initialCSS3DRender.js";
36
+ import "./CSS3DRenderer.js";
37
+ import "./THREEJS_CSS3DRenderer.js";
38
+ import "../createResizeObserver.js";
39
+ import "../../../shared-utils/three/PointSelector/utils/PointHelper2.js";
40
+ import "../../../Sculpt/Meshes/Line.js";
41
+ import "../../../Sculpt/typings/style.js";
42
+ import "../../../shared-utils/five/FiveLine.js";
43
+ import "../../../shared-utils/three/IObject3D.js";
44
+ import "../../../Sculpt/utils/removeAllTag.js";
45
+ import "../../../Sculpt/utils/Meshes/getLengthHTML.js";
46
+ import "../../../shared-utils/three/applyObjectMatrixWorld.js";
47
+ import "../../../shared-utils/util.js";
48
+ import "./CSS3DSprite.js";
49
+ import "../../../shared-utils/isTouchDevice.js";
50
+ import "../../../shared-utils/five/getPosition.js";
51
+ import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
52
+ import "../../../shared-utils/three/PointSelector/utils/contents.js";
53
+ import "../../../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
54
+ import "../../../vendor/three/build/three.module.js";
30
55
  const $ = 1, W = `CSS3DObjectPlus@${$}`, k = 216e-5, z = 3e-3;
31
- class Pt extends N {
56
+ class kt extends N {
32
57
  constructor(t) {
33
58
  var x, b, w, g, V;
34
59
  if (O(t.cornerPoints) && O(t.width))
35
60
  throw new Error("cornerPoints and width cannot be both empty");
36
- const e = (x = t.container) != null ? x : document.createElement("div"), s = (b = t.cornerPoints) != null ? b : (() => {
37
- const i = t.width / 2;
61
+ const i = (x = t.container) != null ? x : document.createElement("div"), s = (b = t.cornerPoints) != null ? b : (() => {
62
+ const e = t.width / 2;
38
63
  return [
39
- new n(-i, i, 0),
40
- new n(-i, -i, 0),
41
- new n(i, -i, 0),
42
- new n(i, i, 0)
64
+ new n(-e, e, 0),
65
+ new n(-e, -e, 0),
66
+ new n(e, -e, 0),
67
+ new n(e, e, 0)
43
68
  ];
44
- })(), r = (w = t.ratio) != null ? w : z, P = (g = t.dpr) != null ? g : 1, F = (V = t.pointerEvents) != null ? V : "auto", c = Math.max(k, r), m = s[0].distanceTo(s[1]), d = s[1].distanceTo(s[2]), a = E(m / r * P), l = E(d / r * P), y = L(...s);
69
+ })(), r = (w = t.ratio) != null ? w : z, P = (g = t.dpr) != null ? g : 1, F = (V = t.pointerEvents) != null ? V : "auto", h = Math.max(k, r), l = s[0].distanceTo(s[1]), d = s[1].distanceTo(s[2]), m = E(l / r * P), a = E(d / r * P), y = L(...s);
45
70
  let u;
46
- if (c === r)
47
- e.style.width = `${a}px`, e.style.height = `${l}px`, u = e;
71
+ if (h === r)
72
+ i.style.width = `${m}px`, i.style.height = `${a}px`, u = i;
48
73
  else {
49
- const i = document.createElement("div");
50
- i.style.width = `${a}px`, i.style.height = `${l}px`, i.style.pointerEvents = "none";
51
- const S = r / c;
52
- e.style.position = "absolute", e.style.left = "0", e.style.top = "0", e.style.width = `${S * a}px`, e.style.height = `${S * l}px`, i.appendChild(e), u = i;
74
+ const e = document.createElement("div");
75
+ e.style.width = `${m}px`, e.style.height = `${a}px`, e.style.pointerEvents = "none";
76
+ const S = r / h;
77
+ i.style.position = "absolute", i.style.left = "0", i.style.top = "0", i.style.width = `${S * m}px`, i.style.height = `${S * a}px`, e.appendChild(i), u = e;
53
78
  }
54
79
  super(u);
55
80
  o(this, "version", $);
@@ -78,31 +103,31 @@ class Pt extends N {
78
103
  * @description: 生成透明Mesh
79
104
  */
80
105
  o(this, "createOpacityMesh", (t) => {
81
- const { domWidthPx: e, domHeightPx: s } = t, r = new R(e, s);
106
+ const { domWidthPx: i, domHeightPx: s } = t, r = new R(i, s);
82
107
  return r.position.copy(t.position), r.rotation.copy(t.rotation), r.scale.copy(t.scale), r;
83
108
  });
84
- if (e.style.pointerEvents = F, Object.assign(e.style, t.style), this.scale.set(c, c, c), this.cornerPoints = s, this.ratio = r, this.container = e, t.mode && (this.mode = t.mode), c === r)
85
- this.width = m, this.height = d, this.domWidthPx = a, this.domHeightPx = l, this.centerPosition = y;
109
+ if (i.style.pointerEvents = F, Object.assign(i.style, t.style), this.scale.set(h, h, h), this.cornerPoints = s, this.ratio = r, this.container = i, t.mode && (this.mode = t.mode), h === r)
110
+ this.width = l, this.height = d, this.domWidthPx = m, this.domHeightPx = a, this.centerPosition = y;
86
111
  else {
87
- const i = r / c;
88
- this.width = i * m, this.height = i * d, this.domWidthPx = i * a, this.domHeightPx = i * l, this.centerPosition = new n().subVectors(y, s[0]).multiplyScalar(i).add(s[0]);
112
+ const e = r / h;
113
+ this.width = e * l, this.height = e * d, this.domWidthPx = e * m, this.domHeightPx = e * a, this.centerPosition = new n().subVectors(y, s[0]).multiplyScalar(e).add(s[0]);
89
114
  }
90
- e.classList.add(`${W}__container`);
115
+ i.classList.add(`${W}__container`);
91
116
  const C = new n().subVectors(s[1], s[0]), M = new n().subVectors(s[3], s[0]), H = new n().crossVectors(C, M).normalize();
92
117
  this.lookAt(H);
93
118
  const f = this.up.clone().applyQuaternion(this.quaternion), v = M.clone(), j = new n().crossVectors(f, v).normalize();
94
119
  this.rotateOnWorldAxis(j, f.angleTo(v)), this.position.copy(y), this.addEventListener("added", () => {
95
- var i;
96
- this.mode === "front" && ((i = this.opacityMesh) == null || i.removeFromParent());
120
+ var e;
121
+ this.mode === "front" && ((e = this.opacityMesh) == null || e.removeFromParent());
97
122
  }), this.addEventListener("removed", () => {
98
- var i;
99
- (i = this.opacityMesh) == null || i.removeFromParent();
123
+ var e;
124
+ (e = this.opacityMesh) == null || e.removeFromParent();
100
125
  });
101
126
  }
102
127
  removeFromParent() {
103
- var e;
128
+ var i;
104
129
  const t = this.parent;
105
- return t !== null && t.remove(this), (e = this.opacityMesh) == null || e.removeFromParent(), this;
130
+ return t !== null && t.remove(this), (i = this.opacityMesh) == null || i.removeFromParent(), this;
106
131
  }
107
132
  removeOpacityMesh() {
108
133
  var t;
@@ -121,20 +146,20 @@ class Pt extends N {
121
146
  }
122
147
  }
123
148
  applyMatrix4(t) {
124
- var e;
125
- super.applyMatrix4(t), (e = this.opacityMesh) == null || e.applyMatrix4(t);
149
+ var i;
150
+ super.applyMatrix4(t), (i = this.opacityMesh) == null || i.applyMatrix4(t);
126
151
  }
127
152
  applyQuaternion(t) {
128
- var e;
129
- return super.applyQuaternion(t), (e = this.opacityMesh) == null || e.applyQuaternion(t), this;
153
+ var i;
154
+ return super.applyQuaternion(t), (i = this.opacityMesh) == null || i.applyQuaternion(t), this;
130
155
  }
131
156
  applyScaleMatrix4(t) {
132
- var e;
133
- this.scale.applyMatrix4(t), (e = this.opacityMesh) == null || e.scale.applyMatrix4(t);
157
+ var i;
158
+ this.scale.applyMatrix4(t), (i = this.opacityMesh) == null || i.scale.applyMatrix4(t);
134
159
  }
135
160
  }
136
161
  export {
137
- Pt as CSS3DObjectPlus,
162
+ kt as CSS3DObjectPlus,
138
163
  z as DefaultRatio,
139
164
  k as MinRatio
140
165
  };