@realsee/dnalogel 3.47.4 → 3.47.6

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 (127) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/Sculpt/Meshes/Polygon.d.ts +1 -1
  3. package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
  4. package/dist/Sculpt/utils/Meshes/getLengthHTML.d.ts +1 -0
  5. package/dist/Sculpt/utils/three/ColoredMesh.d.ts +2 -2
  6. package/dist/index.cjs.js +62 -40
  7. package/dist/index.js +2453 -2428
  8. package/dist/index.umd.js +65 -43
  9. package/dist/shared-utils/five/vector3ToScreen.d.ts +4 -4
  10. package/dist/shared-utils/tag.d.ts +4 -4
  11. package/dist/shared-utils/three/index.d.ts +0 -2
  12. package/dist/shared-utils/three/raycaster.d.ts +2 -0
  13. package/libs/AreaMakerPlugin/Controller.js +16 -14
  14. package/libs/AreaMakerPlugin/index.js +18 -16
  15. package/libs/AreaMakerPlugin/utils/Item.js +55 -53
  16. package/libs/CSS3DRenderPlugin/Controller.js +14 -12
  17. package/libs/CSS3DRenderPlugin/index.js +21 -19
  18. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +15 -13
  19. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +16 -14
  20. package/libs/CruisePlugin/BaseController.js +29 -27
  21. package/libs/CruisePlugin/Move.js +21 -19
  22. package/libs/CruisePlugin/Work.js +16 -14
  23. package/libs/CruisePlugin/index.js +22 -20
  24. package/libs/CurrentPanoImagePlugin/Controller.js +25 -23
  25. package/libs/CurrentPanoImagePlugin/index.js +19 -17
  26. package/libs/GuideLinePlugin/Controller.js +18 -16
  27. package/libs/GuideLinePlugin/GuideLineItem.js +18 -16
  28. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -4
  29. package/libs/GuideLinePlugin/GuideLineModeItem.js +18 -16
  30. package/libs/GuideLinePlugin/index.js +22 -20
  31. package/libs/ModelMakerPlugin/Controller.js +22 -20
  32. package/libs/ModelMakerPlugin/index.js +18 -16
  33. package/libs/ModelMakerPlugin/item/baseItem.js +14 -13
  34. package/libs/ModelMakerPlugin/item/boxItem.js +3 -2
  35. package/libs/ModelMakerPlugin/item/polygonItem.js +6 -5
  36. package/libs/ModelMakerPlugin/item/prismItem.js +3 -2
  37. package/libs/ModelTVVideoPlugin/Plugin.js +17 -15
  38. package/libs/ModelTVVideoPlugin/index.js +16 -14
  39. package/libs/Object3DHelperPlugin/Controller.js +17 -15
  40. package/libs/Object3DHelperPlugin/index.js +21 -19
  41. package/libs/PanoCompassPlugin/Controller.js +18 -16
  42. package/libs/PanoCompassPlugin/index.js +19 -17
  43. package/libs/PanoDoorLabelPlugin/BaseController.js +18 -16
  44. package/libs/PanoDoorLabelPlugin/Controller.js +38 -36
  45. package/libs/PanoDoorLabelPlugin/index.js +19 -17
  46. package/libs/PanoMeasurePlugin/Components/Controller0.js +15 -13
  47. package/libs/PanoMeasurePlugin/Components/Controller1.js +15 -13
  48. package/libs/PanoMeasurePlugin/Controller/EditController.js +14 -12
  49. package/libs/PanoMeasurePlugin/Controller/WatchController.js +15 -13
  50. package/libs/PanoMeasurePlugin/Controller/index.js +13 -11
  51. package/libs/PanoMeasurePlugin/Model/area.js +15 -13
  52. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +15 -13
  53. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +15 -13
  54. package/libs/PanoMeasurePlugin/index.js +24 -22
  55. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +15 -13
  56. package/libs/PanoSpatialTagPlugin/Plugin.js +17 -15
  57. package/libs/PanoSpatialTagPlugin/index.js +14 -12
  58. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +17 -15
  59. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +16 -14
  60. package/libs/PanoTagPlugin/Components/Tag/index.js +16 -14
  61. package/libs/PanoTagPlugin/Components/TagContainer.js +16 -14
  62. package/libs/PanoTagPlugin/Components/TagItem.js +16 -14
  63. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +60 -60
  64. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +16 -14
  65. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +16 -14
  66. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +18 -16
  67. package/libs/PanoTagPlugin/controller/TagRender.js +15 -13
  68. package/libs/PanoTagPlugin/controller/TagUtil.js +16 -14
  69. package/libs/PanoTagPlugin/controller/index.js +18 -16
  70. package/libs/PanoTagPlugin/index.js +24 -22
  71. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +17 -15
  72. package/libs/PanoVideoPlugin/Controller.js +18 -16
  73. package/libs/PanoVideoPlugin/VideoMeshController.js +18 -16
  74. package/libs/PanoVideoPlugin/index.js +21 -19
  75. package/libs/PipelinePlugin/Controller.js +17 -15
  76. package/libs/PipelinePlugin/index.js +19 -17
  77. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +18 -16
  78. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +18 -16
  79. package/libs/PipelinePlugin/utils/Objects/Pipe.js +35 -33
  80. package/libs/Sculpt/Meshes/Box.js +6 -7
  81. package/libs/Sculpt/Meshes/Cylinder.js +15 -16
  82. package/libs/Sculpt/Meshes/Line.js +28 -28
  83. package/libs/Sculpt/Meshes/Point.js +6 -7
  84. package/libs/Sculpt/Meshes/Polygon.d.ts +1 -1
  85. package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
  86. package/libs/Sculpt/Meshes/Polyline.js +5 -6
  87. package/libs/Sculpt/Meshes/Rectangle.js +3 -4
  88. package/libs/Sculpt/Objects/Line/Editor.js +15 -16
  89. package/libs/Sculpt/Objects/Line/index.js +35 -35
  90. package/libs/Sculpt/Objects/Polygon/index.js +55 -61
  91. package/libs/Sculpt/Objects/Polyline/index.js +45 -45
  92. package/libs/Sculpt/index.js +1 -1
  93. package/libs/Sculpt/utils/Meshes/getLengthHTML.d.ts +1 -0
  94. package/libs/Sculpt/utils/Meshes/getLengthHTML.js +34 -0
  95. package/libs/Sculpt/utils/three/ColoredMesh.d.ts +2 -2
  96. package/libs/Sculpt/utils/three/ColoredMesh.js +3 -4
  97. package/libs/base/BasePlugin.js +14 -15
  98. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +15 -13
  99. package/libs/floorplan/MapviewFloorplanPlugin/index.js +19 -17
  100. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +15 -13
  101. package/libs/floorplan/ModelFloorplanPlugin/index.js +19 -17
  102. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +18 -16
  103. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +19 -17
  104. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +15 -13
  105. package/libs/floorplan/TopviewFloorplanPlugin/index.js +19 -17
  106. package/libs/floorplan/index.js +1 -2
  107. package/libs/index.js +15 -15
  108. package/libs/shared-utils/Object3DHelper/utils/getMouseRaycaster.js +7 -7
  109. package/libs/shared-utils/five/index.js +3 -4
  110. package/libs/shared-utils/five/lookObject.js +3 -4
  111. package/libs/shared-utils/five/vector3ToScreen.d.ts +4 -4
  112. package/libs/shared-utils/five/vector3ToScreen.js +9 -4
  113. package/libs/shared-utils/index.js +45 -49
  114. package/libs/shared-utils/logger.js +1 -1
  115. package/libs/shared-utils/tag.d.ts +4 -4
  116. package/libs/shared-utils/tag.js +60 -46
  117. package/libs/shared-utils/three/index.d.ts +0 -2
  118. package/libs/shared-utils/three/index.js +1 -2
  119. package/libs/shared-utils/three/raycaster.d.ts +2 -0
  120. package/libs/shared-utils/three/raycaster.js +6 -0
  121. package/package.json +1 -1
  122. package/dist/shared-utils/three/getIntersect.d.ts +0 -21
  123. package/dist/shared-utils/three/getRaycaster.d.ts +0 -6
  124. package/libs/shared-utils/three/getIntersect.d.ts +0 -21
  125. package/libs/shared-utils/three/getIntersect.js +0 -24
  126. package/libs/shared-utils/three/getRaycaster.d.ts +0 -6
  127. package/libs/shared-utils/three/getRaycaster.js +0 -12
@@ -40,38 +40,44 @@ import "../../base/BasePlugin.js";
40
40
  import "../../shared-utils/Subscribe.js";
41
41
  import "hammerjs";
42
42
  import "three/examples/jsm/renderers/CSS3DRenderer";
43
+ import "../../Sculpt/Meshes/Line.js";
44
+ import "../../Sculpt/typings/style.js";
45
+ import "../../shared-utils/five/FiveLine.js";
43
46
  import "@realsee/five/line";
47
+ import "../../shared-utils/positionToVector3.js";
48
+ import "../../shared-utils/three/IObject3D.js";
49
+ import "../../shared-utils/three/centerPoint.js";
50
+ import "../../shared-utils/three/THREESphere.js";
51
+ import "animejs";
52
+ import "../../shared-utils/isNil.js";
53
+ import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
54
+ import "../../shared-utils/tag.js";
55
+ import "../../shared-utils/five/vector3ToScreen.js";
56
+ import "../../shared-utils/five/getFiveModel.js";
57
+ import "../../shared-utils/three/raycaster.js";
44
58
  import "../../Sculpt/utils/Modules/Global.js";
45
59
  import "../../Sculpt/utils/Modules/Cursor.js";
46
60
  import "../../Object3DHelperPlugin/Controller.js";
47
- import "../../shared-utils/three/THREESphere.js";
48
61
  import "../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
49
62
  import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
50
63
  import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
51
- import "../../shared-utils/three/IObject3D.js";
52
64
  import "../../shared-utils/three/boundingBox.js";
53
65
  import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
54
66
  import "../../shared-utils/Object3DHelper/utils/direction.js";
55
67
  import "../../shared-utils/Object3DHelper/Constants/color.js";
56
68
  import "../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
57
69
  import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
58
- import "../../shared-utils/positionToVector3.js";
59
70
  import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
60
71
  import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
61
72
  import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
62
73
  import "../../CSS3DRenderPlugin/utils/even.js";
63
74
  import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
64
75
  import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
65
- import "../../shared-utils/three/centerPoint.js";
66
76
  import "../../shared-utils/three/getObjectVisible.js";
67
- import "animejs";
68
- import "../../shared-utils/isNil.js";
69
- import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
70
77
  import "../../shared-utils/Utils/FiveUtil.js";
71
78
  import "../../shared-utils/Utils/BaseUtil.js";
72
79
  import "../../shared-utils/Utils/WorkUtil.js";
73
80
  import "../../shared-utils/five/transformPosition.js";
74
- import "../../shared-utils/five/getFiveModel.js";
75
81
  import "../../shared-utils/url/absoluteUrl.js";
76
82
  import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
77
83
  import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
@@ -112,23 +118,19 @@ import "../../shared-utils/three/Assets/index.js";
112
118
  import "../../shared-utils/three/PointSelector/utils/html.js";
113
119
  import "../../shared-utils/five/initialCSS3DRender.js";
114
120
  import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
115
- import "../../Sculpt/Meshes/Line.js";
116
- import "../../Sculpt/typings/style.js";
117
- import "../../shared-utils/five/FiveLine.js";
118
- import "../../shared-utils/tag.js";
119
- import "../../shared-utils/five/vector3ToScreen.js";
120
- import "../../Sculpt/utils/removeAllTag.js";
121
121
  import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
122
122
  import "../../shared-utils/isTouchDevice.js";
123
123
  import "../../shared-utils/five/getPosition.js";
124
124
  import "../../shared-utils/five/getRaycasterByNdcPosition.js";
125
+ import "../../Sculpt/utils/removeAllTag.js";
126
+ import "../../Sculpt/utils/Meshes/getLengthHTML.js";
125
127
  import "../../shared-utils/five/changeMode.js";
126
128
  import "../../shared-utils/nearlyEqual.js";
127
129
  import "../../shared-utils/to.js";
128
130
  import "../../shared-utils/getPxmm.js";
129
131
  import "../../shared-utils/changeModelCanvasOpacity.js";
130
- const jr = (o, r) => new t(o, r);
132
+ const qr = (o, r) => new t(o, r);
131
133
  export {
132
- jr as TopviewFloorplanPlugin,
133
- jr as default
134
+ qr as TopviewFloorplanPlugin,
135
+ qr as default
134
136
  };
@@ -2,8 +2,7 @@ import "../vendor/resize-observer-polyfill/dist/ResizeObserver.es.js";
2
2
  import "three";
3
3
  import "hammerjs";
4
4
  import "three/examples/jsm/renderers/CSS3DRenderer";
5
- import "@realsee/five/line";
6
- import "../Sculpt/utils/Modules/Global.js";
5
+ import "../Sculpt/Meshes/Line.js";
7
6
  import "../shared-utils/three/THREESphere.js";
8
7
  import "animejs";
9
8
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
package/libs/index.js CHANGED
@@ -70,13 +70,25 @@ import "./CSS3DRenderPlugin/Controller.js";
70
70
  import "./CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
71
71
  import "hammerjs";
72
72
  import "three/examples/jsm/renderers/CSS3DRenderer";
73
+ import "./Sculpt/Meshes/Line.js";
74
+ import "./Sculpt/typings/style.js";
75
+ import "./shared-utils/five/FiveLine.js";
73
76
  import "@realsee/five/line";
77
+ import "./shared-utils/positionToVector3.js";
78
+ import "./shared-utils/three/IObject3D.js";
79
+ import "./shared-utils/three/centerPoint.js";
80
+ import "./shared-utils/three/THREESphere.js";
81
+ import "animejs";
82
+ import "./shared-utils/isNil.js";
83
+ import "./shared-utils/tag.js";
84
+ import "./shared-utils/five/vector3ToScreen.js";
85
+ import "./shared-utils/five/getFiveModel.js";
86
+ import "./shared-utils/three/raycaster.js";
74
87
  import "./Sculpt/utils/Modules/Global.js";
75
88
  import "./Sculpt/utils/Modules/Cursor.js";
76
89
  import "./shared-utils/five/FiveDomEvents.js";
77
90
  import "./shared-utils/three/getObjectVisible.js";
78
91
  import "./shared-utils/five/calculateThreeMouse.js";
79
- import "./shared-utils/five/getFiveModel.js";
80
92
  import "./shared-utils/three/THREERaycaster.js";
81
93
  import "./shared-utils/three/PointSelector/index.js";
82
94
  import "./shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
@@ -86,10 +98,6 @@ import "./CSS3DRenderPlugin/utils/three/CSS3DObject.js";
86
98
  import "./CSS3DRenderPlugin/utils/even.js";
87
99
  import "./shared-utils/Subscribe.js";
88
100
  import "./CSS3DRenderPlugin/utils/three/OpacityMesh.js";
89
- import "./shared-utils/three/centerPoint.js";
90
- import "./shared-utils/three/THREESphere.js";
91
- import "animejs";
92
- import "./shared-utils/isNil.js";
93
101
  import "./base/BasePlugin.js";
94
102
  import "./shared-utils/Utils/FiveUtil.js";
95
103
  import "./shared-utils/Utils/BaseUtil.js";
@@ -99,13 +107,11 @@ import "./shared-utils/url/absoluteUrl.js";
99
107
  import "./shared-utils/Object3DHelper/Helper/MoveHelper.js";
100
108
  import "./shared-utils/Object3DHelper/Base/BaseHelper.js";
101
109
  import "./shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
102
- import "./shared-utils/three/IObject3D.js";
103
110
  import "./shared-utils/three/boundingBox.js";
104
111
  import "./shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
105
112
  import "./shared-utils/Object3DHelper/utils/direction.js";
106
113
  import "./shared-utils/Object3DHelper/Constants/color.js";
107
114
  import "./shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
108
- import "./shared-utils/positionToVector3.js";
109
115
  import "./CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
110
116
  import "./CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
111
117
  import "./CSS3DRenderPlugin/utils/createResizeObserver.js";
@@ -140,16 +146,12 @@ import "./shared-utils/five/fiveModelLoad.js";
140
146
  import "./shared-utils/three/PointSelector/utils/html.js";
141
147
  import "./shared-utils/five/initialCSS3DRender.js";
142
148
  import "./shared-utils/three/PointSelector/utils/PointHelper2.js";
143
- import "./Sculpt/Meshes/Line.js";
144
- import "./Sculpt/typings/style.js";
145
- import "./shared-utils/five/FiveLine.js";
146
- import "./shared-utils/tag.js";
147
- import "./shared-utils/five/vector3ToScreen.js";
148
- import "./Sculpt/utils/removeAllTag.js";
149
149
  import "./CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
150
150
  import "./shared-utils/isTouchDevice.js";
151
151
  import "./shared-utils/five/getPosition.js";
152
152
  import "./shared-utils/five/getRaycasterByNdcPosition.js";
153
+ import "./Sculpt/utils/removeAllTag.js";
154
+ import "./Sculpt/utils/Meshes/getLengthHTML.js";
153
155
  import "./shared-utils/createLine/index.js";
154
156
  import "./ModelRoomLabelPlugin/Controller.js";
155
157
  import "./ModelRoomLabelPlugin/RoomLabelItems.js";
@@ -501,8 +503,6 @@ import "./shared-utils/math/convexHull.js";
501
503
  import "./shared-utils/math/inside.js";
502
504
  import "./shared-utils/five/index.js";
503
505
  import "./shared-utils/three/getCoords.js";
504
- import "./shared-utils/three/getRaycaster.js";
505
- import "./shared-utils/three/getIntersect.js";
506
506
  import "./shared-utils/five/lookObject.js";
507
507
  r();
508
508
  o();
@@ -1,13 +1,13 @@
1
- import * as s from "three";
2
- import { calculateThreeMouse as c } from "./calculateThreeMouse.js";
3
- function u(t, e, a) {
4
- if (!e || !a || !t)
1
+ import * as o from "three";
2
+ import { calculateThreeMouse as n } from "./calculateThreeMouse.js";
3
+ function u(a, e, s) {
4
+ if (!e || !s || !a)
5
5
  return;
6
- const r = c(e, a);
6
+ const r = n(e, s);
7
7
  if (Math.abs(r.x) === 1 || Math.abs(r.y) === 1)
8
8
  return;
9
- const o = new s.Raycaster();
10
- return o.setFromCamera(r, t), o;
9
+ const t = new o.Raycaster();
10
+ return t.setFromCamera(r, a), t.params.Points.threshold = 0.1, t;
11
11
  }
12
12
  export {
13
13
  u as getMouseRaycaster
@@ -2,13 +2,12 @@ import "three";
2
2
  import "hammerjs";
3
3
  import "three/examples/jsm/renderers/CSS3DRenderer";
4
4
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
5
- import "@realsee/five/line";
6
- import "../../Sculpt/utils/Modules/Global.js";
5
+ import "../../Sculpt/Meshes/Line.js";
7
6
  import "../three/THREESphere.js";
8
7
  import "animejs";
9
- function f(e) {
8
+ function d(e) {
10
9
  return e.model ? e.work ? e.model.loaded ? e.model.name !== e.work.model.file ? { result: !1, msg: "five.model.name 与 five.work.model.file 不一致" } : { result: !0, msg: "" } : { result: !1, msg: "five.model 未加载完成" } : { result: !1, msg: "five 数据未加载" } : { result: !1, msg: "five.model 不存在" };
11
10
  }
12
11
  export {
13
- f as checkFiveModelLoaded
12
+ d as checkFiveModelLoaded
14
13
  };
@@ -32,11 +32,10 @@ import { vectorToCoordinates as N } from "../vectorToCoordinate.js";
32
32
  import { FiveUtil as O } from "../Utils/FiveUtil.js";
33
33
  import { notNil as Y } from "../isNil.js";
34
34
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
35
- import "@realsee/five/line";
36
- import "../../Sculpt/utils/Modules/Global.js";
35
+ import "../../Sculpt/Meshes/Line.js";
37
36
  import { worldBoundingSphere as j } from "../three/boundingBox.js";
38
37
  import "animejs";
39
- function tt(e, o, t) {
38
+ function $(e, o, t) {
40
39
  return g(this, null, function* () {
41
40
  var P, x, z;
42
41
  if (!o)
@@ -79,5 +78,5 @@ function tt(e, o, t) {
79
78
  });
80
79
  }
81
80
  export {
82
- tt as lookObject
81
+ $ as lookObject
83
82
  };
@@ -1,5 +1,5 @@
1
- import type * as THREE from 'three';
2
- export default function vector3ToScreen(camera: THREE.Camera, vector3: THREE.Vector3): {
3
- leftPercent: number;
4
- topPercent: number;
1
+ import * as THREE from 'three';
2
+ export default function vector3ToScreen(camera: THREE.Camera, vector3: THREE.Vector3, rendererSize: THREE.Vector2): {
3
+ leftPx: number;
4
+ topPx: number;
5
5
  };
@@ -1,7 +1,12 @@
1
- function i(e, n) {
2
- const { x: t, y: o, z: r } = n.clone().project(e);
3
- return r > 1 ? void 0 : { leftPercent: (t + 1) / 2 * 100, topPercent: (-o + 1) / 2 * 100 };
1
+ import * as s from "three";
2
+ new s.Vector2();
3
+ function x(t, n, o) {
4
+ const { x: e, y: c, z: r } = n.clone().project(t);
5
+ return r > 1 ? void 0 : {
6
+ leftPx: (e + 1) / 2 * o.x,
7
+ topPx: (-c + 1) / 2 * o.y
8
+ };
4
9
  }
5
10
  export {
6
- i as vector3ToScreen
11
+ x as vector3ToScreen
7
12
  };
@@ -4,69 +4,65 @@ import { convexHull as t } from "./math/convexHull.js";
4
4
  import { inside as o } from "./math/inside.js";
5
5
  import { checkFiveModelLoaded as i } from "./five/index.js";
6
6
  import { Magnifier as m } from "./three/Magnifier.js";
7
- import { getCoordsFromClient as n, getCoordsFromElement as p } from "./three/getCoords.js";
8
- import { getRaycasterFromFivePointer as l } from "./three/getRaycaster.js";
9
- import { getIntersectFromRelativePosition as f } from "./three/getIntersect.js";
10
- import { PointHelper as a } from "./three/PointSelector/utils/PointHelper.js";
11
- import { PointSelectorHelper as d } from "./three/PointSelector/utils/PointSelectorHelper.js";
12
- import { Object3D as g } from "./three/core/Object3D.js";
13
- import { LineSegments as s } from "./three/objects/LineSegments.js";
14
- import { bounding as u, boundingBox as b, boundingSphere as c, boxVertex as x, boxVertexes as F, worldBounding as P, worldBoundingBox as k, worldBoundingSphere as v } from "./three/boundingBox.js";
15
- import { animeMap as w, blink as B, reblink as S } from "./three/blink.js";
16
- import { isNil as L, notNil as M } from "./isNil.js";
17
- import { uuid as j } from "./uuid.js";
18
- import { absoluteUrl as y, isAbsoluteURL as I } from "./url/absoluteUrl.js";
19
- import { awaitNextFrame as O, getFrameTime as R, nextFrame as _, requestAnimationFrameInterval as h } from "./animationFrame/index.js";
7
+ import { getCoordsFromClient as n, getCoordsFromElement as l } from "./three/getCoords.js";
8
+ import { PointHelper as p } from "./three/PointSelector/utils/PointHelper.js";
9
+ import { PointSelectorHelper as f } from "./three/PointSelector/utils/PointSelectorHelper.js";
10
+ import { Object3D as a } from "./three/core/Object3D.js";
11
+ import { LineSegments as d } from "./three/objects/LineSegments.js";
12
+ import { bounding as g, boundingBox as u, boundingSphere as s, boxVertex as b, boxVertexes as x, worldBounding as c, worldBoundingBox as k, worldBoundingSphere as F } from "./three/boundingBox.js";
13
+ import { animeMap as P, blink as w, reblink as B } from "./three/blink.js";
14
+ import { isNil as S, notNil as v } from "./isNil.js";
15
+ import { uuid as L } from "./uuid.js";
16
+ import { absoluteUrl as M, isAbsoluteURL as j } from "./url/absoluteUrl.js";
17
+ import { awaitNextFrame as O, getFrameTime as _, nextFrame as h, requestAnimationFrameInterval as y } from "./animationFrame/index.js";
20
18
  import { equal as C } from "./equal.js";
21
- import { isModelLike as H, isPanoramaLike as N } from "./five/mode.js";
22
- import { lookObject as T } from "./five/lookObject.js";
23
- import { lookPoint as q } from "./five/lookPoint.js";
24
- import { BetterTween as A, tweenProgress as U } from "./animationFrame/BetterTween.js";
25
- const go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
19
+ import { isModelLike as H, isPanoramaLike as I } from "./five/mode.js";
20
+ import { lookObject as N } from "./five/lookObject.js";
21
+ import { lookPoint as T } from "./five/lookPoint.js";
22
+ import { BetterTween as q, tweenProgress as A } from "./animationFrame/BetterTween.js";
23
+ const lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
26
24
  __proto__: null,
27
- BetterTween: A,
25
+ BetterTween: q,
28
26
  Interval: r,
29
- LineSegments: s,
27
+ LineSegments: d,
30
28
  Magnifier: m,
31
- Object3D: g,
32
- PointHelper: a,
33
- PointSelectorHelper: d,
29
+ Object3D: a,
30
+ PointHelper: p,
31
+ PointSelectorHelper: f,
34
32
  Rectangle: e,
35
- absoluteUrl: y,
36
- animeMap: w,
33
+ absoluteUrl: M,
34
+ animeMap: P,
37
35
  awaitNextFrame: O,
38
- blink: B,
39
- bounding: u,
40
- boundingBox: b,
41
- boundingSphere: c,
42
- boxVertex: x,
43
- boxVertexes: F,
36
+ blink: w,
37
+ bounding: g,
38
+ boundingBox: u,
39
+ boundingSphere: s,
40
+ boxVertex: b,
41
+ boxVertexes: x,
44
42
  checkFiveModelLoaded: i,
45
43
  convexHull: t,
46
44
  equal: C,
47
45
  getCoordsFromClient: n,
48
- getCoordsFromElement: p,
49
- getFrameTime: R,
50
- getIntersectFromRelativePosition: f,
51
- getRaycasterFromFivePointer: l,
46
+ getCoordsFromElement: l,
47
+ getFrameTime: _,
52
48
  inside: o,
53
- isAbsoluteURL: I,
49
+ isAbsoluteURL: j,
54
50
  isModelLike: H,
55
- isNil: L,
56
- isPanoramaLike: N,
57
- lookObject: T,
58
- lookPoint: q,
59
- nextFrame: _,
60
- notNil: M,
51
+ isNil: S,
52
+ isPanoramaLike: I,
53
+ lookObject: N,
54
+ lookPoint: T,
55
+ nextFrame: h,
56
+ notNil: v,
61
57
  pointInPolygon: o,
62
- reblink: S,
63
- requestAnimationFrameInterval: h,
64
- tweenProgress: U,
65
- uuid: j,
66
- worldBounding: P,
58
+ reblink: B,
59
+ requestAnimationFrameInterval: y,
60
+ tweenProgress: A,
61
+ uuid: L,
62
+ worldBounding: c,
67
63
  worldBoundingBox: k,
68
- worldBoundingSphere: v
64
+ worldBoundingSphere: F
69
65
  }, Symbol.toStringTag, { value: "Module" }));
70
66
  export {
71
- go as index
67
+ lo as index
72
68
  };
@@ -1,6 +1,6 @@
1
1
  function A() {
2
2
  console.debug(
3
- "%c %c@realsee/dnalogel %cv3.47.4",
3
+ "%c %c@realsee/dnalogel %cv3.47.6",
4
4
  [
5
5
  "background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
6
6
  "background-repeat: no-repeat",
@@ -6,6 +6,7 @@ export declare class LightTag {
6
6
  visible: boolean;
7
7
  enabled: boolean;
8
8
  wrapper: HTMLElement;
9
+ positionsForRotate?: THREE.Vector3[];
9
10
  private tagWrapper;
10
11
  private five;
11
12
  private originPosition?;
@@ -14,16 +15,15 @@ export declare class LightTag {
14
15
  private config;
15
16
  constructor(five: Five, position?: AnyPosition, config?: {
16
17
  wrapper?: HTMLElement;
18
+ positionsForRotate?: AnyPosition[];
17
19
  });
18
20
  show(): void;
19
- hide(params?: {
20
- withAnimation?: boolean;
21
- }): void;
21
+ hide(): void;
22
22
  enable(): void;
23
23
  disable(): void;
24
24
  destroy(): void;
25
25
  setTransformMatrix(matrix: THREE.Matrix4): void;
26
- setPosition(position: THREE.Vector3): void;
26
+ setPosition(position: THREE.Vector3, positionsForRotate?: THREE.Vector3[]): void;
27
27
  updateScreenPosition(): void;
28
28
  private onCameraUpdate;
29
29
  private onFiveEveryReady;
@@ -1,54 +1,55 @@
1
- var c = Object.defineProperty;
2
- var p = (n, t, e) => t in n ? c(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var i = (n, t, e) => (p(n, typeof t != "symbol" ? t + "" : t, e), e);
4
- import { anyPositionToVector3 as d } from "./positionToVector3.js";
5
- import * as f from "three";
6
- import { vector3ToScreen as y } from "./five/vector3ToScreen.js";
7
- import { getFiveModel as m } from "./five/getFiveModel.js";
8
- const l = "LightTagContainer_shgjakdhwakjdhsja";
9
- class v {
10
- constructor(t, e, s) {
11
- i(this, "container");
12
- i(this, "visible", !1);
13
- i(this, "enabled", !1);
14
- i(this, "wrapper");
15
- i(this, "tagWrapper");
16
- i(this, "five");
17
- i(this, "originPosition");
18
- i(this, "transformedPosition");
19
- i(this, "disposer");
20
- i(this, "config");
21
- i(this, "onCameraUpdate", () => {
1
+ var u = Object.defineProperty;
2
+ var g = (h, t, e) => t in h ? u(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
3
+ var o = (h, t, e) => (g(h, typeof t != "symbol" ? t + "" : t, e), e);
4
+ import { anyPositionToVector3 as f } from "./positionToVector3.js";
5
+ import * as b from "three";
6
+ import { vector3ToScreen as p } from "./five/vector3ToScreen.js";
7
+ import { getFiveModel as x } from "./five/getFiveModel.js";
8
+ import { _raycaster as m } from "./three/raycaster.js";
9
+ const v = "LightTagContainer_shgjakdhwakjdhsja", E = new b.Vector2();
10
+ class w {
11
+ constructor(t, e, i) {
12
+ o(this, "container");
13
+ o(this, "visible", !1);
14
+ o(this, "enabled", !1);
15
+ o(this, "wrapper");
16
+ o(this, "positionsForRotate");
17
+ o(this, "tagWrapper");
18
+ o(this, "five");
19
+ o(this, "originPosition");
20
+ o(this, "transformedPosition");
21
+ o(this, "disposer");
22
+ o(this, "config");
23
+ o(this, "onCameraUpdate", () => {
22
24
  this.visible !== !1 && this.updateScreenPosition();
23
25
  });
24
- i(this, "onFiveEveryReady", () => {
26
+ o(this, "onFiveEveryReady", () => {
25
27
  var t;
26
28
  if (this.visible && this.five.state.mode !== "Panorama") {
27
- const e = new f.Raycaster();
28
- e.set(this.five.camera.position, this.transformedPosition.clone().sub(this.five.camera.position));
29
- const s = (t = m(this.five).intersectRaycaster(e)) == null ? void 0 : t[0];
30
- (s == null ? void 0 : s.distance) > this.transformedPosition.distanceTo(this.five.camera.position) ? (this.container.style.opacity = "1", this.container.style.pointerEvents = "auto") : (this.container.style.opacity = "0", this.container.style.pointerEvents = "none");
29
+ m.set(this.five.camera.position, this.transformedPosition.clone().sub(this.five.camera.position));
30
+ const i = (t = x(this.five).intersectRaycaster(m)) == null ? void 0 : t[0];
31
+ (i == null ? void 0 : i.distance) + 0.01 > this.transformedPosition.distanceTo(this.five.camera.position) ? (this.container.style.opacity = "1", this.container.style.pointerEvents = "auto") : (this.container.style.opacity = "0", this.container.style.pointerEvents = "none");
31
32
  }
32
33
  });
33
- var a;
34
- this.five = t, this.originPosition = e ? d(e).clone() : void 0, this.transformedPosition = (a = this.originPosition) == null ? void 0 : a.clone(), this.container = (() => {
35
- const r = document.createElement("div");
36
- return r.style.width = "0", r.style.height = "0", r.style.position = "absolute", r;
37
- })(), this.config = s != null ? s : {}, this.enable(), this.show();
34
+ var r, a;
35
+ this.five = t, this.originPosition = e ? f(e).clone() : void 0, this.transformedPosition = (r = this.originPosition) == null ? void 0 : r.clone(), this.positionsForRotate = (a = i == null ? void 0 : i.positionsForRotate) == null ? void 0 : a.map((s) => f(s).clone()), this.container = (() => {
36
+ const s = document.createElement("div");
37
+ return s.style.width = "0", s.style.height = "0", s.style.position = "absolute", s.style.transition = "opacity 0.2s linear", s;
38
+ })(), this.config = i != null ? i : {}, this.enable(), this.show();
38
39
  }
39
40
  show() {
40
- this.visible = !0, this.container.style.opacity = "1", this.container.style.pointerEvents = "auto", this.container.style.transition = "opacity 0.2s linear", this.onCameraUpdate();
41
+ this.visible = !0, this.container.style.opacity = "1", this.container.style.pointerEvents = "auto", this.onCameraUpdate();
41
42
  }
42
- hide(t) {
43
- this.visible = !1, t != null && t.withAnimation ? this.container.style.transition = "opacity 0.2s linear" : this.container.style.transition = "", this.container.style.opacity = "0", this.container.style.pointerEvents = "none";
43
+ hide() {
44
+ this.visible = !1, this.container.style.opacity = "0", this.container.style.pointerEvents = "none";
44
45
  }
45
46
  enable() {
46
- var s, a, r, h;
47
+ var i, r, a, s;
47
48
  if (this.enabled)
48
49
  return;
49
- this.enabled = !0, this.wrapper = (r = (a = this.config.wrapper) != null ? a : (s = this.five.getElement()) == null ? void 0 : s.parentElement) != null ? r : document.body, this.tagWrapper || (this.tagWrapper = (h = document.getElementById(l)) != null ? h : (() => {
50
- const o = document.createElement("div");
51
- return o.id = l, o.style.position = "absolute", o.style.top = "0", o.style.left = "0", o.style.width = "100%", o.style.height = "100%", o.style.pointerEvents = "none", o;
50
+ this.enabled = !0, this.wrapper = (a = (r = this.config.wrapper) != null ? r : (i = this.five.getElement()) == null ? void 0 : i.parentElement) != null ? a : document.body, this.tagWrapper || (this.tagWrapper = (s = document.getElementById(v)) != null ? s : (() => {
51
+ const n = document.createElement("div");
52
+ return n.id = v, n.style.position = "absolute", n.style.top = "0", n.style.left = "0", n.style.width = "100%", n.style.height = "100%", n.style.pointerEvents = "none", n;
52
53
  })(), this.wrapper.contains(this.tagWrapper) || this.wrapper.appendChild(this.tagWrapper)), this.tagWrapper.appendChild(this.container);
53
54
  let t = !1;
54
55
  const e = () => {
@@ -71,22 +72,35 @@ class v {
71
72
  var e;
72
73
  this.transformedPosition = (e = this.originPosition) == null ? void 0 : e.clone().applyMatrix4(t), this.onCameraUpdate();
73
74
  }
74
- setPosition(t) {
75
- this.transformedPosition = t, this.onCameraUpdate();
75
+ setPosition(t, e) {
76
+ this.transformedPosition = t, this.positionsForRotate = e, this.onCameraUpdate();
76
77
  }
77
78
  updateScreenPosition() {
78
79
  if (!this.transformedPosition) {
79
80
  this.container.style.left = "-100%", this.container.style.top = "-100%";
80
81
  return;
81
82
  }
82
- const t = y(this.five.camera, this.transformedPosition);
83
- t ? (this.container.style.left = t.leftPercent + "%", this.container.style.top = t.topPercent + "%") : (this.container.style.left = "-100%", this.container.style.top = "-100%");
83
+ const t = this.five.renderer.getSize(E), e = p(this.five.camera, this.transformedPosition, t);
84
+ if (!e) {
85
+ this.container.style.left = "-100%", this.container.style.top = "-100%";
86
+ return;
87
+ }
88
+ const i = (() => {
89
+ const a = 2 * Math.tan(0.5 * this.five.camera.fov / 180 * Math.PI), s = this.transformedPosition.distanceTo(this.five.camera.position);
90
+ return Math.max(Math.min(1 - a * s / 40, 1), 0.5);
91
+ })(), r = (() => {
92
+ if (this.positionsForRotate === void 0 || this.positionsForRotate.length !== 2)
93
+ return 0;
94
+ const [a, s] = this.positionsForRotate, n = p(this.five.camera, a, t), c = p(this.five.camera, s, t), l = n.leftPx > c.leftPx ? c : n, d = n.leftPx > c.leftPx ? n : c, y = d.leftPx - l.leftPx, P = d.topPx - l.topPx;
95
+ return Math.atan2(P, y) * (180 / Math.PI);
96
+ })();
97
+ this.container.style.left = e.leftPx + "px", this.container.style.top = e.topPx + "px", this.container.style.transformOrigin = "center", this.container.style.transform = `scale(${i})`, r && (this.container.style.transform += ` rotate(${r}deg)`);
84
98
  }
85
99
  }
86
- function w(n, t, e) {
87
- return new v(n, t, e);
100
+ function M(h, t, e) {
101
+ return new w(h, t, e);
88
102
  }
89
103
  export {
90
- v as LightTag,
91
- w as tag
104
+ w as LightTag,
105
+ M as tag
92
106
  };
@@ -1,7 +1,5 @@
1
1
  export * from './Magnifier';
2
2
  export * from './getCoords';
3
- export * from './getRaycaster';
4
- export * from './getIntersect';
5
3
  export * from './PointSelector/utils/PointHelper';
6
4
  export * from './PointSelector/utils/PointSelectorHelper';
7
5
  export * from './core/Object3D';
@@ -1,8 +1,7 @@
1
1
  import "hammerjs";
2
2
  import "three";
3
3
  import "three/examples/jsm/renderers/CSS3DRenderer";
4
- import "@realsee/five/line";
5
- import "../../Sculpt/utils/Modules/Global.js";
4
+ import "../../Sculpt/Meshes/Line.js";
6
5
  import "./THREESphere.js";
7
6
  import "animejs";
8
7
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
@@ -0,0 +1,2 @@
1
+ import * as THREE from 'three';
2
+ export declare const _raycaster: THREE.Raycaster;
@@ -0,0 +1,6 @@
1
+ import * as r from "three";
2
+ const a = new r.Raycaster();
3
+ a.params.Points.threshold = 0.02;
4
+ export {
5
+ a as _raycaster
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/dnalogel",
3
- "version": "3.47.4",
3
+ "version": "3.47.6",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./libs/index.js",
6
6
  "types": "./libs/index.d.ts",
@@ -1,21 +0,0 @@
1
- import * as THREE from 'three';
2
- import type { Five } from '@realsee/five';
3
- export declare function getIntersectFromRelativePosition(five: Five, position: {
4
- x: number;
5
- y: number;
6
- }): {
7
- raycaster: THREE.Raycaster;
8
- isVirtual: boolean;
9
- floor: number;
10
- model?: import("@realsee/five").Model;
11
- viewLayer?: import("@realsee/five").ModelViewLayer;
12
- distance: number;
13
- distanceToRay?: number;
14
- point: THREE.Vector3;
15
- index?: number;
16
- face?: THREE.Face3;
17
- faceIndex?: number;
18
- object: THREE.Object3D;
19
- uv?: THREE.Vector2;
20
- instanceId?: number;
21
- };
@@ -1,6 +0,0 @@
1
- import * as THREE from 'three';
2
- import type { Five } from '@realsee/five';
3
- export declare function getRaycasterFromFivePointer(five: Five, pointer: {
4
- x: number;
5
- y: number;
6
- }): THREE.Raycaster;