@realsee/dnalogel 4.0.0-webgpu.14 → 4.0.0-webgpu.16

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 (108) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/TERMS.txt +24 -87
  3. package/dist/floorplan.js +1 -1
  4. package/dist/index.d.ts +2 -2
  5. package/dist/index.js +34 -32
  6. package/dist/index.js.map +1 -1
  7. package/dist/internal/{BasePlugin-CPJ1ahrJ.js → BasePlugin-89hE8Cux.js} +2 -2
  8. package/dist/internal/{BasePlugin-CPJ1ahrJ.js.map → BasePlugin-89hE8Cux.js.map} +1 -1
  9. package/dist/internal/BasePluginWithData-BLOUilj_.js +7 -0
  10. package/dist/internal/{BasePluginWithData-Uq1cY5sC.js.map → BasePluginWithData-BLOUilj_.js.map} +1 -1
  11. package/dist/internal/{pano-measure-BEUknZ_O.js → Controller-B-10xO2H.js} +56 -42
  12. package/dist/internal/Controller-B-10xO2H.js.map +1 -0
  13. package/dist/internal/{measure-CTsB8Z-c.js → Controller-Bt2czarX.js} +10 -7
  14. package/dist/internal/Controller-Bt2czarX.js.map +1 -0
  15. package/dist/internal/{Controller-B9xMQukV.js → Controller-CTQsxSIv.js} +2 -2
  16. package/dist/internal/{Controller-B9xMQukV.js.map → Controller-CTQsxSIv.js.map} +1 -1
  17. package/dist/internal/{PointHelper-Bgbt0S7b.js → PointHelper-grrf8vu1.js} +23 -8
  18. package/dist/internal/PointHelper-grrf8vu1.js.map +1 -0
  19. package/dist/internal/{Rectangle-Dyjp88lU.js → Rectangle-CrP2ewnA.js} +3 -3
  20. package/dist/internal/{Rectangle-Dyjp88lU.js.map → Rectangle-CrP2ewnA.js.map} +1 -1
  21. package/dist/internal/{Work-nlQCCreU.js → Work-BeXbgDwp.js} +4 -4
  22. package/dist/internal/{Work-nlQCCreU.js.map → Work-BeXbgDwp.js.map} +1 -1
  23. package/dist/internal/{area-maker-DwPBgIH_.js → area-maker-CPQF8Zvc.js} +2 -2
  24. package/dist/internal/{area-maker-DwPBgIH_.js.map → area-maker-CPQF8Zvc.js.map} +1 -1
  25. package/dist/internal/{controller-B3u-PyQb.js → controller-18q1jMVV.js} +16 -16
  26. package/dist/internal/{controller-B3u-PyQb.js.map → controller-18q1jMVV.js.map} +1 -1
  27. package/dist/internal/{cruise-XCsWQQtZ.js → cruise-CVIrFchH.js} +2 -2
  28. package/dist/internal/{cruise-XCsWQQtZ.js.map → cruise-CVIrFchH.js.map} +1 -1
  29. package/dist/internal/{current-pano-image-Yt0ptdOO.js → current-pano-image-BaYriyS_.js} +2 -2
  30. package/dist/internal/{current-pano-image-Yt0ptdOO.js.map → current-pano-image-BaYriyS_.js.map} +1 -1
  31. package/dist/internal/edgeSnap-8fdFCcXB.js +469 -0
  32. package/dist/internal/edgeSnap-8fdFCcXB.js.map +1 -0
  33. package/dist/internal/{floorplan-Bnk3Jg8m.js → floorplan-CofR5nkn.js} +2 -2
  34. package/dist/internal/{floorplan-Bnk3Jg8m.js.map → floorplan-CofR5nkn.js.map} +1 -1
  35. package/dist/internal/measure-BEPx6Dxe.js +7 -0
  36. package/dist/internal/measure-BEPx6Dxe.js.map +1 -0
  37. package/dist/internal/measure-v2-sRY76hly.js +83 -0
  38. package/dist/internal/measure-v2-sRY76hly.js.map +1 -0
  39. package/dist/internal/{model-maker-tbF87kJz.js → model-maker-ggAsocXZ.js} +2 -2
  40. package/dist/internal/{model-maker-tbF87kJz.js.map → model-maker-ggAsocXZ.js.map} +1 -1
  41. package/dist/internal/object3d-helper-DFamC2FE.js +7 -0
  42. package/dist/internal/{object3d-helper-BgYvVhp2.js.map → object3d-helper-DFamC2FE.js.map} +1 -1
  43. package/dist/internal/{pano-compass-BwxmzCPI.js → pano-compass-DGHhaCBJ.js} +2 -2
  44. package/dist/internal/{pano-compass-BwxmzCPI.js.map → pano-compass-DGHhaCBJ.js.map} +1 -1
  45. package/dist/internal/{pano-door-label-Bwvaf5xx.js → pano-door-label-CWY7Kxkk.js} +2 -2
  46. package/dist/internal/{pano-door-label-Bwvaf5xx.js.map → pano-door-label-CWY7Kxkk.js.map} +1 -1
  47. package/dist/internal/pano-measure-CQ_ZZzz5.js +9 -0
  48. package/dist/internal/pano-measure-CQ_ZZzz5.js.map +1 -0
  49. package/dist/internal/pano-measure-v2-CzOdP5Yv.js +301 -0
  50. package/dist/internal/pano-measure-v2-CzOdP5Yv.js.map +1 -0
  51. package/dist/internal/{pano-tag-CaRrmqmS.js → pano-tag-C6g7mXhw.js} +2 -2
  52. package/dist/internal/{pano-tag-CaRrmqmS.js.map → pano-tag-C6g7mXhw.js.map} +1 -1
  53. package/dist/internal/{pano-video-DLjuDeQV.js → pano-video-DTbKV54W.js} +2 -2
  54. package/dist/internal/{pano-video-DLjuDeQV.js.map → pano-video-DTbKV54W.js.map} +1 -1
  55. package/dist/internal/{pipeline-Dg9R3h54.js → pipeline-CkYhFOhG.js} +2 -2
  56. package/dist/internal/{pipeline-Dg9R3h54.js.map → pipeline-CkYhFOhG.js.map} +1 -1
  57. package/dist/internal/{sculpt-CMFBenui.js → sculpt-rEvaT1IE.js} +3 -3
  58. package/dist/internal/{sculpt-CMFBenui.js.map → sculpt-rEvaT1IE.js.map} +1 -1
  59. package/dist/plugins/area-maker.js +1 -1
  60. package/dist/plugins/cruise.js +2 -2
  61. package/dist/plugins/current-pano-image.js +1 -1
  62. package/dist/plugins/guide-line.js +1 -1
  63. package/dist/plugins/measure-v2.d.ts +2 -0
  64. package/dist/plugins/measure-v2.js +3 -0
  65. package/dist/plugins/measure.js +3 -1
  66. package/dist/plugins/model-maker.js +1 -1
  67. package/dist/plugins/object3d-helper.js +2 -2
  68. package/dist/plugins/pano-compass.js +1 -1
  69. package/dist/plugins/pano-door-label.js +1 -1
  70. package/dist/plugins/pano-measure-v2.d.ts +2 -0
  71. package/dist/plugins/pano-measure-v2.js +1 -0
  72. package/dist/plugins/pano-measure.js +1 -1
  73. package/dist/plugins/pano-tag.js +2 -2
  74. package/dist/plugins/pano-video.js +1 -1
  75. package/dist/plugins/pipeline.js +1 -1
  76. package/dist/plugins/sculpt.js +2 -2
  77. package/dist/types/MeasurePlugin/Controller.d.ts +1 -0
  78. package/dist/types/MeasurePluginV2/Controller.d.ts +49 -0
  79. package/dist/types/MeasurePluginV2/Magnifier.d.ts +29 -0
  80. package/dist/types/MeasurePluginV2/PointHelper.d.ts +22 -0
  81. package/dist/types/MeasurePluginV2/PointOverlay.d.ts +88 -0
  82. package/dist/types/MeasurePluginV2/PointSelector.d.ts +51 -0
  83. package/dist/types/MeasurePluginV2/edgeSnap.d.ts +53 -0
  84. package/dist/types/MeasurePluginV2/index.d.ts +28 -0
  85. package/dist/types/PanoMeasurePlugin/Controller/BaseController.d.ts +1 -0
  86. package/dist/types/PanoMeasurePlugin/Controller/EditController.d.ts +4 -2
  87. package/dist/types/PanoMeasurePlugin/Controller/MixedController.d.ts +3 -1
  88. package/dist/types/PanoMeasurePlugin/Controller/WatchController.d.ts +4 -0
  89. package/dist/types/PanoMeasurePlugin/Controller/index.d.ts +9 -3
  90. package/dist/types/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +5 -5
  91. package/dist/types/PanoMeasurePluginV2/Controller.d.ts +32 -0
  92. package/dist/types/PanoMeasurePluginV2/PointSelector.d.ts +32 -0
  93. package/dist/types/PanoMeasurePluginV2/PreviewLine.d.ts +6 -0
  94. package/dist/types/PanoMeasurePluginV2/controllers.d.ts +44 -0
  95. package/dist/types/PanoMeasurePluginV2/index.d.ts +8 -0
  96. package/dist/types/public/index.d.ts +4 -0
  97. package/dist/types/public/plugins/measure-v2.d.ts +5 -0
  98. package/dist/types/public/plugins/pano-measure-v2.d.ts +2 -0
  99. package/dist/types/shared-utils/three/Magnifier.d.ts +21 -0
  100. package/dist/types/shared-utils/three/PointSelector/index.d.ts +16 -7
  101. package/dist/utils.js +1 -1
  102. package/package.json +9 -1
  103. package/LICENSE-UPDATE.txt +0 -5
  104. package/dist/internal/BasePluginWithData-Uq1cY5sC.js +0 -7
  105. package/dist/internal/PointHelper-Bgbt0S7b.js.map +0 -1
  106. package/dist/internal/measure-CTsB8Z-c.js.map +0 -1
  107. package/dist/internal/object3d-helper-BgYvVhp2.js +0 -7
  108. package/dist/internal/pano-measure-BEUknZ_O.js.map +0 -1
@@ -0,0 +1,301 @@
1
+ import { c as e } from "./PointHelper-grrf8vu1.js";
2
+ import { a as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./Controller-B-10xO2H.js";
3
+ import { a as c, i as l, n as u, o as d, s as f } from "./edgeSnap-8fdFCcXB.js";
4
+ //#region src/PanoMeasurePluginV2/PointSelector.ts
5
+ var p = class extends d {
6
+ appendTo(e) {
7
+ return this.containerDom && this.canvas.parentNode !== this.containerDom && (this.containerDom = void 0), super.appendTo(e);
8
+ }
9
+ }, m = class extends f {
10
+ sharedMagnifier;
11
+ refreshManualInput;
12
+ edgeCache = new u();
13
+ suppliedNdc;
14
+ overlayMagnifier;
15
+ lastEdgeSnapEdgeCount = 0;
16
+ onModifiersChanged = (e) => {
17
+ this.adhereEnabled = !e.shiftKey, this.adhereEnabled || this.clearDynamicAdhereLine(), this.refreshManualInput?.();
18
+ };
19
+ onWindowBlur = () => {
20
+ this.adhereEnabled = !0, this.clearDynamicAdhereLine(), this.refreshManualInput?.();
21
+ };
22
+ constructor(e, t, n, r, i) {
23
+ super(e, t), this.sharedMagnifier = r, this.refreshManualInput = i, this.adhereLineProvider = ({ intersection: t }) => {
24
+ let r = this.edgeCache.query(e.model, t.point, n);
25
+ return this.lastEdgeSnapEdgeCount = r.length, r;
26
+ };
27
+ let a = this.pointSelectorHelper, o = a.magnifier;
28
+ if (r) {
29
+ document.addEventListener("keydown", this.onModifiersChanged), document.addEventListener("keyup", this.onModifiersChanged), window.addEventListener("blur", this.onWindowBlur), o?.dispose(), a.magnifier = r;
30
+ let n = t.helper?.container ?? e.getElement()?.parentElement ?? document.body;
31
+ r.containerDom !== n && r.appendTo(n), this.overlayMagnifier = r;
32
+ } else if (o) {
33
+ let t = new p(e, {
34
+ ...o.config,
35
+ width: o.width,
36
+ height: o.height,
37
+ scale: o.scale
38
+ });
39
+ o.containerDom && t.appendTo(o.containerDom), o.state.enabled && t.enable(), a.magnifier = t, o.dispose(), this.overlayMagnifier = t;
40
+ }
41
+ a.pointHelper &&= (a.pointHelper.dispose(), new c(e)), this.on("intersectionUpdate", (e) => this.overlayMagnifier?.setIntersection(e ?? null));
42
+ }
43
+ get mouseNdcPosition() {
44
+ return this.suppliedNdc ?? super.mouseNdcPosition;
45
+ }
46
+ resolveIntersection(e, t) {
47
+ this.suppliedNdc = t;
48
+ try {
49
+ this.pointSelectorHelper.enable(), this.updatePointSelectorHelperIntersect(e);
50
+ let t = this.pointSelectorHelper.position;
51
+ return e && t ? {
52
+ ...e,
53
+ ...t
54
+ } : null;
55
+ } finally {
56
+ this.suppliedNdc = void 0;
57
+ }
58
+ }
59
+ resetSnap() {
60
+ this.edgeCache.clear(), this.lastEdgeSnapEdgeCount = 0, this.clearDynamicAdhereLine(), this.overlayMagnifier?.setIntersection(null);
61
+ }
62
+ dispose() {
63
+ this.sharedMagnifier && (document.removeEventListener("keydown", this.onModifiersChanged), document.removeEventListener("keyup", this.onModifiersChanged), window.removeEventListener("blur", this.onWindowBlur), this.pointSelectorHelper.magnifier = null, this.sharedMagnifier.setIntersection(null), this.sharedMagnifier.disable()), super.dispose();
64
+ }
65
+ }, h = class extends o {
66
+ setPoints(e, t) {
67
+ this.points[0].position.copy(e), this.points[1].position.copy(t);
68
+ let n = this.mesh.line.geometry, r = n.getAttribute("instanceStart"), i = n.getAttribute("instanceEnd");
69
+ r.setXYZ(0, e.x, e.y, e.z), i.setXYZ(0, t.x, t.y, t.z), r.data.needsUpdate = !0;
70
+ let a = n.getAttribute("instanceDistanceStart"), o = n.getAttribute("instanceDistanceEnd");
71
+ a.setX(0, 0), o.setX(0, e.distanceTo(t)), a.data.needsUpdate = !0, n.computeBoundingBox(), n.computeBoundingSphere();
72
+ let s = this.mesh.points.geometry.getAttribute("position");
73
+ s.setXYZ(0, e.x, e.y, e.z), s.setXYZ(1, t.x, t.y, t.z), s.needsUpdate = !0, this.mesh.needsRender = !0;
74
+ }
75
+ };
76
+ //#endregion
77
+ //#region src/PanoMeasurePluginV2/controllers.ts
78
+ function g(e) {
79
+ let t = e.mesh.line.material;
80
+ t.depthTest = !1, t.depthWrite = !1, t.transparent = !0, t.needsUpdate = !0;
81
+ }
82
+ var _ = class extends t {
83
+ createPreviewLine() {
84
+ return new h(new i([
85
+ 0,
86
+ 0,
87
+ 0
88
+ ]), new i([
89
+ 0,
90
+ 0,
91
+ 0
92
+ ]), this.model);
93
+ }
94
+ updateLivePreview = () => this.updateDashed();
95
+ constructor(e) {
96
+ super(e), g(this.dashed), g(this.perpendicularDashed), this.pointSelector.on("intersectionUpdate", this.updateLivePreview);
97
+ }
98
+ dispose() {
99
+ this.pointSelector.off("intersectionUpdate", this.updateLivePreview), super.dispose();
100
+ }
101
+ get selector() {
102
+ return this.pointSelector;
103
+ }
104
+ createPointSelector(e) {
105
+ return new m(e.five, {
106
+ ...e.pointSelectorConfig,
107
+ mode: e.editParams.pointSelectorMode,
108
+ helper: {
109
+ magnifierParams: this.magnifierParams,
110
+ container: e.container,
111
+ ...e.pointSelectorConfig?.helper
112
+ }
113
+ }, e.edgeSnapOptions);
114
+ }
115
+ }, v = class extends a {
116
+ refresh() {
117
+ this.onCameraDirectionUpdate();
118
+ }
119
+ selector;
120
+ constructor(e) {
121
+ super(e), this.selector = new m(e.five, {
122
+ ...e.pointSelectorConfig,
123
+ mode: "fixed",
124
+ helper: {
125
+ ...e.pointSelectorConfig?.helper,
126
+ container: e.container
127
+ }
128
+ }, e.edgeSnapOptions, e.magnifier, () => this.refresh());
129
+ }
130
+ getIntersection() {
131
+ let e = super.getIntersection();
132
+ return this.centerMouseXY ? this.selector.resolveIntersection(e ?? null, {
133
+ x: (this.centerMouseXY.x + 1) / 2,
134
+ y: (this.centerMouseXY.y + 1) / 2
135
+ }) : null;
136
+ }
137
+ updateMouseGroup(e, t) {
138
+ let n = super.updateMouseGroup(e, t);
139
+ return n.visible = !1, n;
140
+ }
141
+ dispose() {
142
+ this.selector.dispose(), super.dispose();
143
+ }
144
+ }, y = class extends r {
145
+ refreshPoint() {
146
+ this.rangePieceController.refresh();
147
+ }
148
+ createPreviewLine() {
149
+ return new h(new i([
150
+ 0,
151
+ 0,
152
+ 0
153
+ ]), new i([
154
+ 0,
155
+ 0,
156
+ 0
157
+ ]), this.model);
158
+ }
159
+ constructor(e) {
160
+ super(e), g(this.dashed), g(this.perpendicularDashed);
161
+ }
162
+ get selector() {
163
+ return this.rangePieceController.selector;
164
+ }
165
+ createRangePieceController(e) {
166
+ return new v(e);
167
+ }
168
+ }, b = class extends n {
169
+ selector;
170
+ constructor(e) {
171
+ super(e), this.selector = new m(e.five, {
172
+ ...e.pointSelectorConfig,
173
+ helper: {
174
+ ...e.pointSelectorConfig?.helper,
175
+ container: e.container
176
+ }
177
+ }, e.edgeSnapOptions, e.magnifier);
178
+ }
179
+ resolveIntersection(e, t) {
180
+ return this.mouseGroup.visible = !1, this.selector.resolveIntersection(e, {
181
+ x: (t.x + 1) / 2,
182
+ y: (t.y + 1) / 2
183
+ }) ?? e;
184
+ }
185
+ onPointEditEnd() {
186
+ this.selector.resetSnap(), this.selector.pointSelectorHelper.hide();
187
+ }
188
+ dispose() {
189
+ this.selector.dispose(), super.dispose();
190
+ }
191
+ }, x = class extends s {
192
+ edgeSnapOptions;
193
+ mobileStyle;
194
+ mixedSavedPolylineIDs = /* @__PURE__ */ new WeakMap();
195
+ constructor(t, n = {}) {
196
+ let r = n.openParams?.isMobile ?? e, i = {
197
+ ...n,
198
+ openParams: {
199
+ ...n.openParams,
200
+ isMobile: r
201
+ },
202
+ editParams: {
203
+ ...n.editParams,
204
+ pointSelectorMode: n.editParams?.pointSelectorMode ?? (r ? "fixed" : "cursor"),
205
+ autoEndConfig: r ? {
206
+ line: 2,
207
+ ...n.editParams?.autoEndConfig
208
+ } : n.editParams?.autoEndConfig
209
+ },
210
+ useUIController: r && n.useUIController !== !1 ? {
211
+ useNewUI: !0,
212
+ mode: "mobile",
213
+ ...typeof n.useUIController == "object" ? n.useUIController : {}
214
+ } : n.useUIController,
215
+ pointSelectorConfig: {
216
+ ...n.pointSelectorConfig,
217
+ helper: {
218
+ ...n.pointSelectorConfig?.helper,
219
+ magnifierParams: {
220
+ ...r ? {
221
+ width: 150,
222
+ height: 150,
223
+ dragEnabled: !1,
224
+ autoFixPCPosition: !1,
225
+ initialPosition: {
226
+ left: "12px",
227
+ top: "12px"
228
+ }
229
+ } : {},
230
+ ...n.pointSelectorConfig?.helper?.magnifierParams
231
+ }
232
+ }
233
+ }
234
+ };
235
+ super(t, i), this.edgeSnapOptions = l(n.edgeSnap);
236
+ }
237
+ get pointSelector() {
238
+ let e = this.controller;
239
+ return e instanceof _ || e instanceof y || e instanceof b ? e.selector : void 0;
240
+ }
241
+ get lastEdgeSnapEdgeCount() {
242
+ return this.pointSelector?.lastEdgeSnapEdgeCount ?? 0;
243
+ }
244
+ get edgeSnapEnabled() {
245
+ return this.edgeSnapOptions.enabled;
246
+ }
247
+ setEdgeSnapEnabled(e) {
248
+ this.edgeSnapOptions.enabled = e, this.pointSelector?.resetSnap(), this.controller instanceof y ? this.controller.refreshPoint() : this.pointSelector?.refresh(), this.five.needsRender = !0;
249
+ }
250
+ clear() {
251
+ let e = this.controller instanceof _ ? t : this.controller instanceof y ? r : void 0;
252
+ if (e) {
253
+ let n = e === t ? "Edit" : "Mixed";
254
+ this.controller.dispose(), super.clear(), this.controller = this.createModeController(this.createControllerParams(), e), this.hooks.emit("modeChange", n), this.resetUIController();
255
+ } else super.clear();
256
+ }
257
+ load(e) {
258
+ this.hasOpen && (this.save({ mode: "View" }), this.changeMode("View")), super.load(e);
259
+ }
260
+ save(e) {
261
+ if (this.controller instanceof y) {
262
+ let e = this.controller.model;
263
+ for (let t of this.mixedSavedPolylineIDs.get(this.controller) ?? []) e.getPolylineByID(t) || this.removePolylineByID(t);
264
+ for (let t of e.polylines) this.model.getPolylineByID(t.id) || this.model.addPolyline(t);
265
+ this.mixedSavedPolylineIDs.set(this.controller, new Set(e.polylines.map((e) => e.id)));
266
+ }
267
+ return super.save(e);
268
+ }
269
+ removePolylineByID(e) {
270
+ let t = this.model.getPolylineByID(e) ?? (this.controller instanceof y ? this.controller.model.getPolylineByID(e) : void 0);
271
+ t && this.removePolyline(t);
272
+ }
273
+ removePolyline(e) {
274
+ if (this.controller instanceof y) {
275
+ let t = this.controller.model.getPolylineByID(e.id);
276
+ t && this.controller.model.removePolyline(t);
277
+ }
278
+ super.removePolyline(e);
279
+ }
280
+ dispose() {
281
+ super.dispose(), this.mobileStyle?.remove(), this.mobileStyle = void 0;
282
+ }
283
+ createControllerParams() {
284
+ let e = super.createControllerParams();
285
+ return e.container.classList.add("pano-measure-v2-container"), this.mobileStyle || (this.mobileStyle = document.createElement("style"), this.mobileStyle.textContent = "\n @media (max-height: 500px) and (pointer: coarse) {\n .pano-measure-v2-container .Measure-Controller .bottom .center {\n align-items: flex-end; margin-bottom: 12px; padding-right: 12px;\n }\n .pano-measure-v2-container .Measure-Controller .main-button { margin-inline: 0; }\n }\n ", e.container.append(this.mobileStyle)), e;
286
+ }
287
+ createMagnifier(e, t) {
288
+ return new p(e, t);
289
+ }
290
+ createModeController(e, i) {
291
+ let a = {
292
+ ...e,
293
+ edgeSnapOptions: this.edgeSnapOptions
294
+ };
295
+ return i === t ? new _(a) : i === r ? new y(a) : i === n ? new b(a) : super.createModeController(e, i);
296
+ }
297
+ }, S = (e, t = {}) => new x(e, t);
298
+ //#endregion
299
+ export { x as n, S as t };
300
+
301
+ //# sourceMappingURL=pano-measure-v2-CzOdP5Yv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pano-measure-v2-CzOdP5Yv.js","names":["isTouchDevice","EditController","WatchController","MixedController","Point","RangePieceController","Line","PanoMeasureController","MeasurePointHelperV2","resolveEdgeSnapOptions","EdgeSnapCache","MeasureMagnifier","MeasurePointSelector","PanoMagnifier","element","PanoPointSelector","event","five","config","sharedMagnifier","refreshManualInput","edges","intersection","edgeOptions","helper","original","container","magnifier","ndc","resolved","PanoPreviewLine","start","end","geometry","from","to","distanceStart","distanceEnd","points","configurePreview","material","line","PanoEditControllerV2","params","PanoRangePieceV2","group","mesh","PanoMixedControllerV2","PanoWatchControllerV2","mouse","PanoMeasureControllerV2","mobile","controller","enabled","Controller","mode","data","working","id","polyline","options","v2Params","PanoMeasurePluginV2"],"sources":["../../src/PanoMeasurePluginV2/PointSelector.ts","../../src/PanoMeasurePluginV2/PreviewLine.ts","../../src/PanoMeasurePluginV2/controllers.ts","../../src/PanoMeasurePluginV2/Controller.ts","../../src/PanoMeasurePluginV2/index.ts"],"sourcesContent":["import type { Five } from '@realsee/five-webgpu'\nimport { MeasurePointSelector } from '../MeasurePluginV2/PointSelector'\nimport { MeasureMagnifier } from '../MeasurePluginV2/Magnifier'\nimport { MeasurePointHelperV2 } from '../MeasurePluginV2/PointHelper'\nimport { EdgeSnapCache, type ResolvedEdgeSnapOptions } from '../MeasurePluginV2/edgeSnap'\nimport type { PointIntersection, PointSelectorConfig } from '../shared-utils/three/PointSelector'\n\n/** The panorama entry uses the same snapping engine as spatial measurement V2. */\nclass PanoMagnifier extends MeasureMagnifier {\n public override appendTo(element: Element) {\n if (this.containerDom && this.canvas.parentNode !== this.containerDom) this.containerDom = undefined\n return super.appendTo(element)\n }\n}\nexport { PanoMagnifier }\n\nexport class PanoPointSelector extends MeasurePointSelector {\n private readonly edgeCache = new EdgeSnapCache()\n private suppliedNdc?: { x: number; y: number }\n private overlayMagnifier?: MeasureMagnifier\n public lastEdgeSnapEdgeCount = 0\n\n private readonly onModifiersChanged = (event: KeyboardEvent) => {\n this.adhereEnabled = !event.shiftKey\n if (!this.adhereEnabled) this.clearDynamicAdhereLine()\n this.refreshManualInput?.()\n }\n\n private readonly onWindowBlur = () => {\n this.adhereEnabled = true\n this.clearDynamicAdhereLine()\n this.refreshManualInput?.()\n }\n\n public constructor(five: Five, config: PointSelectorConfig, edgeOptions: ResolvedEdgeSnapOptions, private readonly sharedMagnifier?: MeasureMagnifier, private readonly refreshManualInput?: () => void) {\n super(five, config)\n this.adhereLineProvider = ({ intersection }) => {\n const edges = this.edgeCache.query(five.model, intersection.point, edgeOptions)\n this.lastEdgeSnapEdgeCount = edges.length\n return edges\n }\n const helper = this.pointSelectorHelper\n const original = helper.magnifier\n if (sharedMagnifier) {\n // Mixed and Watch resolve hits manually, without PointSelector.enable().\n document.addEventListener('keydown', this.onModifiersChanged)\n document.addEventListener('keyup', this.onModifiersChanged)\n window.addEventListener('blur', this.onWindowBlur)\n original?.dispose()\n helper.magnifier = sharedMagnifier\n const container = config.helper?.container ?? five.getElement()?.parentElement ?? document.body\n if (sharedMagnifier.containerDom !== container) sharedMagnifier.appendTo(container)\n this.overlayMagnifier = sharedMagnifier\n } else if (original) {\n const magnifier = new PanoMagnifier(five, { ...original.config, width: original.width, height: original.height, scale: (original as unknown as { scale: number }).scale })\n if (original.containerDom) magnifier.appendTo(original.containerDom)\n if (original.state.enabled) magnifier.enable()\n helper.magnifier = magnifier\n original.dispose()\n this.overlayMagnifier = magnifier\n }\n if (helper.pointHelper) {\n helper.pointHelper.dispose()\n helper.pointHelper = new MeasurePointHelperV2(five)\n }\n this.on('intersectionUpdate', intersection => this.overlayMagnifier?.setIntersection(intersection ?? null))\n }\n\n protected override get mouseNdcPosition() {\n return this.suppliedNdc ?? super.mouseNdcPosition\n }\n\n /** Resolve fixed-center and endpoint-drag input without installing another pointer listener. */\n public resolveIntersection<T extends PointIntersection>(intersection: T | null, ndc: { x: number; y: number }) {\n this.suppliedNdc = ndc\n try {\n this.pointSelectorHelper.enable()\n this.updatePointSelectorHelperIntersect(intersection)\n const resolved = this.pointSelectorHelper.position\n return intersection && resolved ? { ...intersection, ...resolved } : null\n } finally {\n this.suppliedNdc = undefined\n }\n }\n\n public resetSnap() {\n this.edgeCache.clear()\n this.lastEdgeSnapEdgeCount = 0\n this.clearDynamicAdhereLine()\n this.overlayMagnifier?.setIntersection(null)\n }\n\n public override dispose() {\n if (this.sharedMagnifier) {\n document.removeEventListener('keydown', this.onModifiersChanged)\n document.removeEventListener('keyup', this.onModifiersChanged)\n window.removeEventListener('blur', this.onWindowBlur)\n this.pointSelectorHelper.magnifier = null\n this.sharedMagnifier.setIntersection(null)\n this.sharedMagnifier.disable()\n }\n super.dispose()\n }\n}\n","import type { Vector3, InterleavedBufferAttribute } from 'three/webgpu'\nimport Line from '../PanoMeasurePlugin/Model/line'\n\n/** WebGPU caches attribute bindings. Keep the preview buffers alive while endpoints move. */\nexport class PanoPreviewLine extends Line {\n public override setPoints(start: Vector3, end: Vector3) {\n this.points[0].position.copy(start)\n this.points[1].position.copy(end)\n const geometry = this.mesh.line.geometry\n const from = geometry.getAttribute('instanceStart') as InterleavedBufferAttribute\n const to = geometry.getAttribute('instanceEnd') as InterleavedBufferAttribute\n from.setXYZ(0, start.x, start.y, start.z)\n to.setXYZ(0, end.x, end.y, end.z)\n from.data.needsUpdate = true\n const distanceStart = geometry.getAttribute('instanceDistanceStart') as InterleavedBufferAttribute\n const distanceEnd = geometry.getAttribute('instanceDistanceEnd') as InterleavedBufferAttribute\n distanceStart.setX(0, 0)\n distanceEnd.setX(0, start.distanceTo(end))\n distanceStart.data.needsUpdate = true\n geometry.computeBoundingBox()\n geometry.computeBoundingSphere()\n const points = this.mesh.points.geometry.getAttribute('position')\n points.setXYZ(0, start.x, start.y, start.z)\n points.setXYZ(1, end.x, end.y, end.z)\n points.needsUpdate = true\n this.mesh.needsRender = true\n }\n}\n","import type { Intersection, IntersectMeshInterface } from '@realsee/five-webgpu'\nimport type { Vector2 } from 'three/webgpu'\nimport EditController from '../PanoMeasurePlugin/Controller/EditController'\nimport MixedController from '../PanoMeasurePlugin/Controller/MixedController'\nimport WatchController from '../PanoMeasurePlugin/Controller/WatchController'\nimport type Line from '../PanoMeasurePlugin/Model/line'\nimport Point from '../PanoMeasurePlugin/Model/point'\nimport { PanoPreviewLine } from './PreviewLine'\nimport RangePieceController from '../PanoMeasurePlugin/Modules/rangePiece'\nimport type { ControllerParams } from '../PanoMeasurePlugin/Controller/BaseController'\nimport type { ResolvedEdgeSnapOptions } from '../MeasurePluginV2/edgeSnap'\nimport type { MeasureMagnifier } from '../MeasurePluginV2/Magnifier'\nimport { PanoPointSelector } from './PointSelector'\n\nexport interface PanoControllerParamsV2 extends ControllerParams {\n edgeSnapOptions: ResolvedEdgeSnapOptions\n}\n\n// A dashed-material reset must not put the measurement preview behind the model.\nfunction configurePreview(line: Line) {\n const material = line.mesh.line.material\n material.depthTest = false\n material.depthWrite = false\n material.transparent = true\n material.needsUpdate = true\n}\n\nexport class PanoEditControllerV2 extends EditController {\n protected override createPreviewLine() {\n return new PanoPreviewLine(new Point([0, 0, 0]), new Point([0, 0, 0]), this.model)\n }\n\n private readonly updateLivePreview = () => this.updateDashed()\n\n public constructor(params: PanoControllerParamsV2) {\n super(params)\n configurePreview(this.dashed)\n configurePreview(this.perpendicularDashed)\n this.pointSelector.on('intersectionUpdate', this.updateLivePreview)\n }\n\n public override dispose() {\n this.pointSelector.off('intersectionUpdate', this.updateLivePreview)\n super.dispose()\n }\n\n public get selector() { return this.pointSelector as PanoPointSelector }\n\n protected override createPointSelector(params: ControllerParams) {\n return new PanoPointSelector(params.five, {\n ...params.pointSelectorConfig,\n mode: params.editParams.pointSelectorMode,\n helper: { magnifierParams: this.magnifierParams, container: params.container, ...params.pointSelectorConfig?.helper },\n }, (params as PanoControllerParamsV2).edgeSnapOptions)\n }\n}\n\nclass PanoRangePieceV2 extends RangePieceController {\n public refresh() { this.onCameraDirectionUpdate() }\n public readonly selector: PanoPointSelector\n\n public constructor(params: PanoControllerParamsV2) {\n super(params)\n this.selector = new PanoPointSelector(params.five, {\n ...params.pointSelectorConfig,\n mode: 'fixed',\n helper: { ...params.pointSelectorConfig?.helper, container: params.container },\n }, params.edgeSnapOptions, params.magnifier as MeasureMagnifier, () => this.refresh())\n }\n\n protected override getIntersection() {\n const intersection = super.getIntersection()\n if (!this.centerMouseXY) return null\n return this.selector.resolveIntersection(intersection ?? null, { x: (this.centerMouseXY.x + 1) / 2, y: (this.centerMouseXY.y + 1) / 2 })\n }\n\n protected override updateMouseGroup(intersection: Intersection, mesh?: IntersectMeshInterface) {\n const group = super.updateMouseGroup(intersection, mesh)\n group.visible = false\n return group\n }\n\n public override dispose() {\n this.selector.dispose()\n super.dispose()\n }\n}\n\nexport class PanoMixedControllerV2 extends MixedController {\n public refreshPoint() { (this.rangePieceController as PanoRangePieceV2).refresh() }\n protected override createPreviewLine() {\n return new PanoPreviewLine(new Point([0, 0, 0]), new Point([0, 0, 0]), this.model)\n }\n\n public constructor(params: PanoControllerParamsV2) {\n super(params)\n configurePreview(this.dashed)\n configurePreview(this.perpendicularDashed)\n }\n\n public get selector() { return (this.rangePieceController as PanoRangePieceV2).selector }\n\n protected override createRangePieceController(params: ControllerParams) {\n return new PanoRangePieceV2(params as PanoControllerParamsV2)\n }\n}\n\nexport class PanoWatchControllerV2 extends WatchController {\n public readonly selector: PanoPointSelector\n\n public constructor(params: PanoControllerParamsV2) {\n super(params)\n this.selector = new PanoPointSelector(params.five, { ...params.pointSelectorConfig, helper: { ...params.pointSelectorConfig?.helper, container: params.container } }, params.edgeSnapOptions, params.magnifier as MeasureMagnifier)\n }\n\n protected override resolveIntersection(intersection: Intersection, mouse: Vector2): Intersection {\n this.mouseGroup.visible = false\n return this.selector.resolveIntersection(intersection, { x: (mouse.x + 1) / 2, y: (mouse.y + 1) / 2 }) ?? intersection\n }\n\n protected override onPointEditEnd() {\n this.selector.resetSnap()\n this.selector.pointSelectorHelper.hide()\n }\n\n public override dispose() {\n this.selector.dispose()\n super.dispose()\n }\n}\n","import type { Five } from '@realsee/five-webgpu'\nimport PanoMeasureController, { type ModeControllerConstructor, type PanoMeasureParameterType } from '../PanoMeasurePlugin/Controller'\nimport EditController from '../PanoMeasurePlugin/Controller/EditController'\nimport MixedController from '../PanoMeasurePlugin/Controller/MixedController'\nimport WatchController from '../PanoMeasurePlugin/Controller/WatchController'\nimport type { ControllerParams } from '../PanoMeasurePlugin/Controller/BaseController'\nimport { PanoMagnifier } from './PointSelector'\nimport { resolveEdgeSnapOptions, type EdgeSnapOptions, type ResolvedEdgeSnapOptions } from '../MeasurePluginV2/edgeSnap'\nimport type { MagnifierParameter } from '../shared-utils'\nimport { isTouchDevice } from '../shared-utils/isTouchDevice'\nimport { PanoEditControllerV2, PanoMixedControllerV2, PanoWatchControllerV2 } from './controllers'\n\nexport type PanoMeasurePluginV2Config = PanoMeasureParameterType & { edgeSnap?: boolean | EdgeSnapOptions }\n\n/** Reuses panorama modes, events, models and serialization; only V2 picking changes. */\nexport class PanoMeasureControllerV2 extends PanoMeasureController {\n private readonly edgeSnapOptions: ResolvedEdgeSnapOptions\n private mobileStyle?: HTMLStyleElement\n private readonly mixedSavedPolylineIDs = new WeakMap<PanoMixedControllerV2, Set<string>>()\n\n public constructor(five: Five, params: PanoMeasurePluginV2Config = {}) {\n const mobile = params.openParams?.isMobile ?? isTouchDevice\n const resolved: PanoMeasurePluginV2Config = {\n ...params,\n openParams: { ...params.openParams, isMobile: mobile },\n editParams: { ...params.editParams, pointSelectorMode: params.editParams?.pointSelectorMode ?? (mobile ? 'fixed' : 'cursor'), autoEndConfig: mobile ? { line: 2, ...params.editParams?.autoEndConfig } : params.editParams?.autoEndConfig },\n useUIController: mobile && params.useUIController !== false\n ? { useNewUI: true, mode: 'mobile', ...(typeof params.useUIController === 'object' ? params.useUIController : {}) }\n : params.useUIController,\n pointSelectorConfig: {\n ...params.pointSelectorConfig,\n helper: {\n ...params.pointSelectorConfig?.helper,\n magnifierParams: {\n ...(mobile ? { width: 150, height: 150, dragEnabled: false, autoFixPCPosition: false, initialPosition: { left: '12px', top: '12px' } } : {}),\n ...params.pointSelectorConfig?.helper?.magnifierParams,\n },\n },\n },\n }\n super(five, resolved)\n this.edgeSnapOptions = resolveEdgeSnapOptions(params.edgeSnap)\n }\n\n public get pointSelector() {\n const controller = this.controller\n return controller instanceof PanoEditControllerV2 || controller instanceof PanoMixedControllerV2 || controller instanceof PanoWatchControllerV2 ? controller.selector : undefined\n }\n\n public get lastEdgeSnapEdgeCount() { return this.pointSelector?.lastEdgeSnapEdgeCount ?? 0 }\n public get edgeSnapEnabled() { return this.edgeSnapOptions.enabled }\n\n public setEdgeSnapEnabled(enabled: boolean) {\n this.edgeSnapOptions.enabled = enabled\n this.pointSelector?.resetSnap()\n if (this.controller instanceof PanoMixedControllerV2) this.controller.refreshPoint()\n else this.pointSelector?.refresh()\n this.five.needsRender = true\n }\n\n public override clear() {\n const Controller = this.controller instanceof PanoEditControllerV2 ? EditController\n : this.controller instanceof PanoMixedControllerV2 ? MixedController : undefined\n if (Controller) {\n const mode = Controller === EditController ? 'Edit' : 'Mixed'\n // Discard both the working lines and an unfinished start point. Recreate the\n // same mode so its input, cursor and UI return to their initial state.\n this.controller!.dispose()\n super.clear()\n this.controller = this.createModeController(this.createControllerParams(), Controller)\n this.hooks.emit('modeChange', mode)\n this.resetUIController()\n return\n }\n super.clear()\n }\n\n public override load(data: Parameters<PanoMeasureController['load']>[0]) {\n // Finish the old session before parsing replacement data. The inherited load\n // calls save() virtually and must not merge the previous Mixed working model.\n if (this.hasOpen) {\n this.save({ mode: 'View' })\n this.changeMode('View')\n }\n super.load(data)\n }\n\n public override save(config?: Parameters<PanoMeasureController['save']>[0]) {\n if (this.controller instanceof PanoMixedControllerV2) {\n // Only reconcile lines committed by this working session. Older saved\n // measurements are absent from Mixed's working model and must be retained.\n const working = this.controller.model\n for (const id of this.mixedSavedPolylineIDs.get(this.controller) ?? []) {\n if (!working.getPolylineByID(id)) this.removePolylineByID(id)\n }\n for (const polyline of working.polylines) {\n if (!this.model.getPolylineByID(polyline.id)) this.model.addPolyline(polyline)\n }\n this.mixedSavedPolylineIDs.set(this.controller, new Set(working.polylines.map(polyline => polyline.id)))\n }\n return super.save(config)\n }\n\n public override removePolylineByID(id: string) {\n const polyline = this.model.getPolylineByID(id)\n ?? (this.controller instanceof PanoMixedControllerV2 ? this.controller.model.getPolylineByID(id) : undefined)\n if (polyline) this.removePolyline(polyline)\n }\n\n public override removePolyline(polyline: Parameters<PanoMeasureController['removePolyline']>[0]) {\n if (this.controller instanceof PanoMixedControllerV2) {\n const working = this.controller.model.getPolylineByID(polyline.id)\n if (working) this.controller.model.removePolyline(working)\n }\n super.removePolyline(polyline)\n }\n\n public override dispose() {\n super.dispose()\n this.mobileStyle?.remove()\n this.mobileStyle = undefined\n }\n\n protected override createControllerParams() {\n const params = super.createControllerParams()\n params.container.classList.add('pano-measure-v2-container')\n if (!this.mobileStyle) {\n this.mobileStyle = document.createElement('style')\n this.mobileStyle.textContent = `\n @media (max-height: 500px) and (pointer: coarse) {\n .pano-measure-v2-container .Measure-Controller .bottom .center {\n align-items: flex-end; margin-bottom: 12px; padding-right: 12px;\n }\n .pano-measure-v2-container .Measure-Controller .main-button { margin-inline: 0; }\n }\n `\n params.container.append(this.mobileStyle)\n }\n return params\n }\n\n protected override createMagnifier(five: Five, options: MagnifierParameter) {\n return new PanoMagnifier(five, options)\n }\n\n protected override createModeController(params: ControllerParams, Controller: ModeControllerConstructor) {\n const v2Params = { ...params, edgeSnapOptions: this.edgeSnapOptions }\n if (Controller === EditController) return new PanoEditControllerV2(v2Params)\n if (Controller === MixedController) return new PanoMixedControllerV2(v2Params)\n if (Controller === WatchController) return new PanoWatchControllerV2(v2Params)\n return super.createModeController(params, Controller)\n }\n}\n","import type { Five } from '@realsee/five-webgpu'\nimport { PanoMeasureControllerV2, type PanoMeasurePluginV2Config } from './Controller'\n\nexport { PanoMeasureControllerV2 }\nexport type { PanoMeasurePluginV2Config }\nexport type { MeasurePluginData as PanoMeasurePluginV2Data, MeasurePluginServerData as PanoMeasurePluginV2ServerData } from '../PanoMeasurePlugin/typings/data'\nexport type PanoMeasurePluginV2Instance = PanoMeasureControllerV2\nexport const PanoMeasurePluginV2 = (five: Five, params: PanoMeasurePluginV2Config = {}) => new PanoMeasureControllerV2(five, params)\nexport default PanoMeasurePluginV2\n"],"mappings":";;;;AAQA,IAAMa,IAAN,cAA4BF,EAAiB;CAC3C,SAAyB,GAAkB;EAEzC,OADI,KAAK,gBAAgB,KAAK,OAAO,eAAe,KAAK,iBAAc,KAAK,eAAe,KAAA,IACpF,MAAM,SAASG,CAAO;CAC/B;AACF,GAGaC,IAAb,cAAuCH,EAAqB;CAkByD;CAAqD;CAjBxK,YAA6B,IAAIF,EAAc;CAC/C;CACA;CACA,wBAA+B;CAE/B,sBAAuC,MAAyB;EAG9D,AAFA,KAAK,gBAAgB,CAACM,EAAM,UACvB,KAAK,iBAAe,KAAK,uBAAuB,GACrD,KAAK,qBAAqB;CAC5B;CAEA,qBAAsC;EAGpC,AAFA,KAAK,gBAAgB,IACrB,KAAK,uBAAuB,GAC5B,KAAK,qBAAqB;CAC5B;CAEA,YAAmB,GAAY,GAA6B,GAAsC,GAAqD,GAAkD;EAEvM,AADA,MAAMC,GAAMC,CAAM,GAD+F,KAAA,kBAAAC,GAAqD,KAAA,qBAAAC,GAEtK,KAAK,sBAAsB,EAAE,sBAAmB;GAC9C,IAAMC,IAAQ,KAAK,UAAU,MAAMJ,EAAK,OAAOK,EAAa,OAAOC,CAAW;GAE9E,OADA,KAAK,wBAAwBF,EAAM,QAC5BA;EACT;EACA,IAAMG,IAAS,KAAK,qBACdC,IAAWD,EAAO;EACxB,IAAIL,GAAiB;GAMnB,AAJA,SAAS,iBAAiB,WAAW,KAAK,kBAAkB,GAC5D,SAAS,iBAAiB,SAAS,KAAK,kBAAkB,GAC1D,OAAO,iBAAiB,QAAQ,KAAK,YAAY,GACjDM,GAAU,QAAQ,GAClB,EAAO,YAAYN;GACnB,IAAMO,IAAYR,EAAO,QAAQ,aAAaD,EAAK,WAAW,CAAC,EAAE,iBAAiB,SAAS;GAE3F,AADIE,EAAgB,iBAAiBO,KAAWP,EAA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AQ;CAC5C;CAEA,eAA+B,GAAkE;EAC/F,IAAI,KAAK,sBAAsBZ,GAAuB;GACpD,IAAMU,IAAU,KAAK,WAAW,MAAM,gBAAgBE,EAAS,EAAE;GACjE,AAAIF,KAAS,KAAK,WAAW,MAAM,eAAeA,CAAO;EAC3D;EACA,MAAM,eAAeE,CAAQ;CAC/B;CAEA,UAA0B;EAGxB,AAFA,MAAM,QAAQ,GACd,KAAK,aAAa,OAAO,GACzB,KAAK,cAAc,KAAA;CACrB;CAEA,yBAA4C;EAC1C,IAAMhB,IAAS,MAAM,uBAAuB;EAc5C,OAbAA,EAAO,UAAU,UAAU,IAAI,2BAA2B,GACrD,KAAK,gBACR,KAAK,cAAc,SAAS,cAAc,OAAO,GACjD,KAAK,YAAY,cAAc,uVAQ/BA,EAAO,UAAU,OAAO,KAAK,WAAW,IAEnCA;CACT;CAEA,gBAAmC,GAAY,GAA6B;EAC1E,OAAO,IAAI9B,EAAcI,GAAM2C,CAAO;CACxC;CAEA,qBAAwC,GAA0B,GAAuC;EACvG,IAAMC,IAAW;GAAE,GAAGlB;GAAQ,iBAAiB,KAAK;EAAgB;EAIpE,OAHIW,MAAerD,IAAuB,IAAIyC,EAAqBmB,CAAQ,IACvEP,MAAenD,IAAwB,IAAI4C,EAAsBc,CAAQ,IACzEP,MAAepD,IAAwB,IAAI8C,EAAsBa,CAAQ,IACtE,MAAM,qBAAqBlB,GAAQW,CAAU;CACtD;AACF,GCjJaQ,KAAuB,GAAY,IAAoC,CAAC,MAAM,IAAIZ,EAAwBjC,GAAM0B,CAAM"}
@@ -1,7 +1,7 @@
1
- import { t as e } from "./controller-B3u-PyQb.js";
1
+ import { t as e } from "./controller-18q1jMVV.js";
2
2
  //#region src/PanoTagPlugin/index.ts
3
3
  var t = (t, n) => new e(t, n);
4
4
  //#endregion
5
5
  export { t };
6
6
 
7
- //# sourceMappingURL=pano-tag-CaRrmqmS.js.map
7
+ //# sourceMappingURL=pano-tag-C6g7mXhw.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pano-tag-CaRrmqmS.js","names":["PanoTagPluginController","PanoTagPlugin","five","params"],"sources":["../../src/PanoTagPlugin/index.ts"],"sourcesContent":["import type { Five } from '@realsee/five-webgpu'\nimport PanoTagPluginController from './controller'\nexport { pluginFlag, PanoTagPluginController } from './controller'\nexport { defaultGlobalConfig } from './typings'\nexport type { ContentTypeMap, TagContentType, TagHooks, State, TemporaryState, TagClickParams, PluginEventMap, TagEvents, TagCacheInterface, MediaStore, PointTagInstance, Tags, Tag, TagId, ArrayPosition, Position, PanoIndex, WorkCode, ModelId, MinMax, StickType, BoxPosition, BoxTag, PolygonPosition, PolygonTag, MaskPosition, MaskTag, TagIconAnimationConfig, TagIconUrl, TagStyle, TagGLTFObject, ElementRenderer, TagRendererMap, TagContentTypeMapping, TagObjectGroup, TagGLTFObjectGroup, ImagePlaneGroup, AudioAppearance, ContentTypeConfigKeySplit, ContentTypeConfigKey, PickTagContentTypeInContentTypeConfigKey, TagConfigByKey, Point2DTag, Point3DTag, PlaneTag, TagState, MediaData, ObjectFit, ContentTypeMapInterface, TagPlacement, TagConfig, TagInstance } from './typings'\n\nexport type PanoTagPluginExportInterface = InstanceType<typeof PanoTagPluginController>\nexport type PanoTagPluginParamsInterface = ConstructorParameters<typeof PanoTagPluginController>[1]\n\nexport const PanoTagPlugin = (five: Five, params?: PanoTagPluginParamsInterface) => new PanoTagPluginController(five, params)\n\nexport default PanoTagPlugin\n"],"mappings":";;AASA,IAAaC,KAAiB,GAAY,MAA0C,IAAID,EAAwBE,GAAMC,CAAM"}
1
+ {"version":3,"file":"pano-tag-C6g7mXhw.js","names":["PanoTagPluginController","PanoTagPlugin","five","params"],"sources":["../../src/PanoTagPlugin/index.ts"],"sourcesContent":["import type { Five } from '@realsee/five-webgpu'\nimport PanoTagPluginController from './controller'\nexport { pluginFlag, PanoTagPluginController } from './controller'\nexport { defaultGlobalConfig } from './typings'\nexport type { ContentTypeMap, TagContentType, TagHooks, State, TemporaryState, TagClickParams, PluginEventMap, TagEvents, TagCacheInterface, MediaStore, PointTagInstance, Tags, Tag, TagId, ArrayPosition, Position, PanoIndex, WorkCode, ModelId, MinMax, StickType, BoxPosition, BoxTag, PolygonPosition, PolygonTag, MaskPosition, MaskTag, TagIconAnimationConfig, TagIconUrl, TagStyle, TagGLTFObject, ElementRenderer, TagRendererMap, TagContentTypeMapping, TagObjectGroup, TagGLTFObjectGroup, ImagePlaneGroup, AudioAppearance, ContentTypeConfigKeySplit, ContentTypeConfigKey, PickTagContentTypeInContentTypeConfigKey, TagConfigByKey, Point2DTag, Point3DTag, PlaneTag, TagState, MediaData, ObjectFit, ContentTypeMapInterface, TagPlacement, TagConfig, TagInstance } from './typings'\n\nexport type PanoTagPluginExportInterface = InstanceType<typeof PanoTagPluginController>\nexport type PanoTagPluginParamsInterface = ConstructorParameters<typeof PanoTagPluginController>[1]\n\nexport const PanoTagPlugin = (five: Five, params?: PanoTagPluginParamsInterface) => new PanoTagPluginController(five, params)\n\nexport default PanoTagPlugin\n"],"mappings":";;AASA,IAAaC,KAAiB,GAAY,MAA0C,IAAID,EAAwBE,GAAMC,CAAM"}
@@ -1,7 +1,7 @@
1
1
  import { n as e } from "./rolldown-runtime-B0aSnxlc.js";
2
2
  import { i as t } from "./animationFrame-CacKXN8l.js";
3
3
  import { t as n } from "./animation-D9rPUNWJ.js";
4
- import { t as r } from "./BasePlugin-CPJ1ahrJ.js";
4
+ import { t as r } from "./BasePlugin-89hE8Cux.js";
5
5
  import { t as i } from "./loadVideoTexture-CWoiMWRg.js";
6
6
  import * as a from "three/webgpu";
7
7
  import { Mesh as o, MeshBasicNodeMaterial as s, Quaternion as c, SphereGeometry as l, Vector3 as u } from "three/webgpu";
@@ -375,4 +375,4 @@ var f = class {
375
375
  //#endregion
376
376
  export { m as n, h as t };
377
377
 
378
- //# sourceMappingURL=pano-video-DLjuDeQV.js.map
378
+ //# sourceMappingURL=pano-video-DTbKV54W.js.map