@realsee/dnalogel 4.0.0-webgpu.5 → 4.0.0-webgpu.7
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.
- package/CHANGELOG.md +10 -0
- package/dist/floorplan.js +1 -1
- package/dist/index.js +15 -15
- package/dist/internal/{BasePlugin-CF9WwPH0.js → BasePlugin-Br1gjzFy.js} +2 -2
- package/dist/internal/{BasePlugin-CF9WwPH0.js.map → BasePlugin-Br1gjzFy.js.map} +1 -1
- package/dist/internal/BasePluginWithData-Cz_hCIai.js +7 -0
- package/dist/internal/{BasePluginWithData-D_Nd-o8X.js.map → BasePluginWithData-Cz_hCIai.js.map} +1 -1
- package/dist/internal/{Controller-Dryon8vR.js → Controller-CyIcxTxN.js} +2 -2
- package/dist/internal/{Controller-Dryon8vR.js.map → Controller-CyIcxTxN.js.map} +1 -1
- package/dist/internal/{Rectangle-BoIJCQwi.js → Rectangle-DnriNoRJ.js} +2 -2
- package/dist/internal/{Rectangle-BoIJCQwi.js.map → Rectangle-DnriNoRJ.js.map} +1 -1
- package/dist/internal/{Work-Be2SHN6W.js → Work-ltxGwn4w.js} +5 -5
- package/dist/internal/{Work-Be2SHN6W.js.map → Work-ltxGwn4w.js.map} +1 -1
- package/dist/internal/{area-maker-7PeyKcgL.js → area-maker-6kaWjqeL.js} +2 -2
- package/dist/internal/{area-maker-7PeyKcgL.js.map → area-maker-6kaWjqeL.js.map} +1 -1
- package/dist/internal/{controller-B_X85eJa.js → controller-Do-09Spx.js} +15 -8
- package/dist/internal/controller-Do-09Spx.js.map +1 -0
- package/dist/internal/{cruise-Cd0Lx_8t.js → cruise-Bc8Uyi_j.js} +2 -2
- package/dist/internal/{cruise-Cd0Lx_8t.js.map → cruise-Bc8Uyi_j.js.map} +1 -1
- package/dist/internal/{current-pano-image-k6epv1ic.js → current-pano-image-CXiCqVoV.js} +3 -3
- package/dist/internal/{current-pano-image-k6epv1ic.js.map → current-pano-image-CXiCqVoV.js.map} +1 -1
- package/dist/internal/{fire-scene-BzZGvyh_.js → fire-scene-C2FTu0Ka.js} +2 -2
- package/dist/internal/{fire-scene-BzZGvyh_.js.map → fire-scene-C2FTu0Ka.js.map} +1 -1
- package/dist/internal/{floorplan-b_k7HM-B.js → floorplan-BVvZ49A3.js} +2 -2
- package/dist/internal/{floorplan-b_k7HM-B.js.map → floorplan-BVvZ49A3.js.map} +1 -1
- package/dist/internal/loadTexture-CyYrJnqG.js +34 -0
- package/dist/internal/loadTexture-CyYrJnqG.js.map +1 -0
- package/dist/internal/{model-maker-C2xJUK4Q.js → model-maker-C6fhkpcB.js} +2 -2
- package/dist/internal/{model-maker-C2xJUK4Q.js.map → model-maker-C6fhkpcB.js.map} +1 -1
- package/dist/internal/object3d-helper-1-TEtUKM.js +7 -0
- package/dist/internal/{object3d-helper-Dh6U9yE_.js.map → object3d-helper-1-TEtUKM.js.map} +1 -1
- package/dist/internal/{pano-compass-CE49XtPR.js → pano-compass-Bt9eAQQS.js} +3 -3
- package/dist/internal/{pano-compass-CE49XtPR.js.map → pano-compass-Bt9eAQQS.js.map} +1 -1
- package/dist/internal/{pano-door-label-B3o8HEuf.js → pano-door-label-KjaGohvA.js} +2 -2
- package/dist/internal/{pano-door-label-B3o8HEuf.js.map → pano-door-label-KjaGohvA.js.map} +1 -1
- package/dist/internal/{pano-measure-Debf40XO.js → pano-measure-Cfe9RfWP.js} +43 -40
- package/dist/internal/pano-measure-Cfe9RfWP.js.map +1 -0
- package/dist/internal/{pano-tag-CsqfnBhp.js → pano-tag-DeWr38_M.js} +2 -2
- package/dist/internal/{pano-tag-CsqfnBhp.js.map → pano-tag-DeWr38_M.js.map} +1 -1
- package/dist/internal/{pano-video-fYkV7T4S.js → pano-video-CTlwzLiU.js} +2 -2
- package/dist/internal/{pano-video-fYkV7T4S.js.map → pano-video-CTlwzLiU.js.map} +1 -1
- package/dist/internal/{pipeline-hoComnfA.js → pipeline-BqVMSO6-.js} +3 -3
- package/dist/internal/{pipeline-hoComnfA.js.map → pipeline-BqVMSO6-.js.map} +1 -1
- package/dist/internal/{sculpt-j9CUwpnR.js → sculpt-E8oyJAik.js} +2 -2
- package/dist/internal/{sculpt-j9CUwpnR.js.map → sculpt-E8oyJAik.js.map} +1 -1
- package/dist/plugins/area-maker.js +1 -1
- package/dist/plugins/cruise.js +2 -2
- package/dist/plugins/current-pano-image.js +1 -1
- package/dist/plugins/fire-scene.js +1 -1
- package/dist/plugins/guide-line.js +1 -1
- package/dist/plugins/model-maker.js +1 -1
- package/dist/plugins/object3d-helper.js +2 -2
- package/dist/plugins/pano-compass.js +1 -1
- package/dist/plugins/pano-door-label.js +1 -1
- package/dist/plugins/pano-measure.js +1 -1
- package/dist/plugins/pano-tag.js +2 -2
- package/dist/plugins/pano-video.js +1 -1
- package/dist/plugins/pipeline.js +1 -1
- package/dist/plugins/sculpt.js +2 -2
- package/dist/types/PanoMeasurePlugin/Controller/ViewController.d.ts +1 -0
- package/dist/types/PanoMeasurePlugin/Model/line.d.ts +2 -0
- package/dist/types/PanoMeasurePlugin/utils/dom/distanceItem.d.ts +3 -0
- package/dist/types/PanoTagPlugin/utils/model/TagMediaTextureCache.d.ts +1 -1
- package/dist/types/PanoTagPlugin/utils/model/mediaPlane.d.ts +1 -0
- package/dist/types/shared-utils/three/loadTexture.d.ts +5 -3
- package/package.json +1 -1
- package/dist/internal/BasePluginWithData-D_Nd-o8X.js +0 -7
- package/dist/internal/controller-B_X85eJa.js.map +0 -1
- package/dist/internal/loadTexture-CJ3EbTXw.js +0 -18
- package/dist/internal/loadTexture-CJ3EbTXw.js.map +0 -1
- package/dist/internal/object3d-helper-Dh6U9yE_.js +0 -7
- package/dist/internal/pano-measure-Debf40XO.js.map +0 -1
|
@@ -10,7 +10,7 @@ import { n as m, t as h } from "./isNil-CQNA0Sbe.js";
|
|
|
10
10
|
import { t as g } from "./uuid-BfVaI9vM.js";
|
|
11
11
|
import { n as _, t as v } from "./tween.esm-CJDtohfp.js";
|
|
12
12
|
import { i as y } from "./animationFrame-CacKXN8l.js";
|
|
13
|
-
import { t as b } from "./BasePlugin-
|
|
13
|
+
import { t as b } from "./BasePlugin-Br1gjzFy.js";
|
|
14
14
|
import { C as x, G as S, J as C, K as w, L as T, M as E, N as ee, O as te, P as D, Q as O, R as k, S as ne, U as A, V as j, W as re, X as M, Y as N, Z as ie, _ as ae, b as oe, d as se, et as ce, it as P, j as F, k as le, l as I, m as L, n as R, o as z, p as B, q as ue, rt as V, st as H, t as de, x as fe, z as U } from "./component.svelte-D5LYqt50.js";
|
|
15
15
|
import { n as pe, t as me } from "./safeObj-ic96Cf8D.js";
|
|
16
16
|
import { t as he } from "./FiveLine-0OtX3RDV.js";
|
|
@@ -134,6 +134,8 @@ var Qe = class {
|
|
|
134
134
|
this.containerDom.style.transform = `translate(${a}px, ${o}px)`, this.tempShow();
|
|
135
135
|
}
|
|
136
136
|
}, $e = class extends Qe {
|
|
137
|
+
modelOcclusion = !1;
|
|
138
|
+
raycaster = new Ee();
|
|
137
139
|
line;
|
|
138
140
|
lastFOV;
|
|
139
141
|
cameraUpdateHandler = null;
|
|
@@ -188,20 +190,28 @@ var Qe = class {
|
|
|
188
190
|
if (!t) return;
|
|
189
191
|
let n = t.clientWidth, r = t.clientHeight, i = n / 2, a = r / 2;
|
|
190
192
|
if (this.line.points.length < 2) return;
|
|
191
|
-
let [o, s] = this.line.points.map((e) => e.position.clone().applyMatrix4(this.line.mesh.matrixWorld)), c = o.clone().project(e.camera), l = s.clone().project(e.camera), u = d(o, s).clone().project(e.camera),
|
|
192
|
-
if (Math.abs(c.z) > 1 || Math.abs(l.z) > 1 || !Ye(c) && !Ye(l) || !Ye(
|
|
193
|
+
let [o, s] = this.line.points.map((e) => e.position.clone().applyMatrix4(this.line.mesh.matrixWorld)), c = o.clone().project(e.camera), l = s.clone().project(e.camera), u = d(o, s), f = u.clone().project(e.camera), p = new q(c.x * i, c.y * a), m = new q(l.x * i, l.y * a), h = p.distanceTo(m);
|
|
194
|
+
if (Math.abs(c.z) > 1 || Math.abs(l.z) > 1 || !Ye(c) && !Ye(l) || !Ye(f) || h === 0 || this.modelOcclusion && this.isOccluded(e, u)) {
|
|
193
195
|
this.hide();
|
|
194
196
|
return;
|
|
195
197
|
}
|
|
196
|
-
let
|
|
197
|
-
this.contentDom.style.setProperty("--distance-scale",
|
|
198
|
-
let
|
|
199
|
-
this.containerDom.style.transform = `translate(${
|
|
198
|
+
let g = u.distanceTo(e.camera.position), _ = e.camera.fov || 60, v = 2 * Math.tan(.5 * _ / 180 * Math.PI), y = Math.max(Math.min(1 - v * g / 40, 1), 0);
|
|
199
|
+
this.contentDom.style.setProperty("--distance-scale", y.toString());
|
|
200
|
+
let b = (f.x + 1) / 2 * n, x = -(f.y - 1) / 2 * r, S = -(Math.atan((p.y - m.y) / (p.x - m.x)) * 180) / Math.PI, C = this.containerDom.parentElement && this.contentDom.clientWidth > h ? -20 : 0;
|
|
201
|
+
this.containerDom.style.transform = `translate(${b}px, ${x}px) rotate(${S}deg) translateY(${C}px)`, this.show(), this.params.userDistanceItem?.update({
|
|
200
202
|
line: this.line,
|
|
201
203
|
polyline: this.line.getPolyline()
|
|
202
204
|
});
|
|
203
|
-
let
|
|
204
|
-
this.contentDom.innerText =
|
|
205
|
+
let w = this.getCurrentContent();
|
|
206
|
+
this.contentDom.innerText = w;
|
|
207
|
+
}
|
|
208
|
+
isOccluded(e, t) {
|
|
209
|
+
if (!e.model.loaded) return !1;
|
|
210
|
+
let n = this.raycaster;
|
|
211
|
+
if (e.camera.getWorldPosition(n.ray.origin), n.ray.direction.subVectors(t, n.ray.origin), n.far = n.ray.direction.length() - .05, n.far <= 0) return !1;
|
|
212
|
+
n.ray.direction.normalize(), n.firstHitOnly = !0;
|
|
213
|
+
let [r] = e.model.intersectRaycaster(n);
|
|
214
|
+
return !!r && r.distance < n.far;
|
|
205
215
|
}
|
|
206
216
|
getFiveInstance() {
|
|
207
217
|
return this.line.model?.config?.five;
|
|
@@ -235,6 +245,10 @@ var Qe = class {
|
|
|
235
245
|
userDistanceItem: this.model.config?.userDistanceItemCreator ? this.model.config.userDistanceItemCreator() : void 0
|
|
236
246
|
});
|
|
237
247
|
}
|
|
248
|
+
setModelOcclusion(e) {
|
|
249
|
+
for (let t of [this.mesh, this.lightMesh]) for (let n of [t.line.material, t.points.material]) n.depthTest = e, n.depthWrite = !e;
|
|
250
|
+
this.distanceItem.modelOcclusion = e;
|
|
251
|
+
}
|
|
238
252
|
hide() {
|
|
239
253
|
this.visible && (this.visible = !1, this.mesh.visible = !1, this.distanceItem.hide());
|
|
240
254
|
}
|
|
@@ -918,52 +932,41 @@ var ft = () => !1, Q = class extends tt {
|
|
|
918
932
|
}, pt = class extends tt {
|
|
919
933
|
type = "view";
|
|
920
934
|
constructor(e) {
|
|
921
|
-
super(e), this.model.
|
|
922
|
-
e.distanceItem.appendTo(this.container), e.distanceItem.update(this.five), this.group.add(e.mesh), e.mesh.updateMatrixWorld();
|
|
923
|
-
}), this.onFiveModeChange(this.five.getCurrentState().mode), this.onFivePanoWillArrive(this.five.getCurrentState().panoIndex), this.onFivePanoArrived(this.five.getCurrentState().panoIndex), this.updateDistanceUI(), this.five.needsRender = !0, this.model.hook.on("polylineAdded", this.polylineAdded), this.model.hook.on("polylineRemoved", this.polylineRemoved), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("panoArrived", this.onFivePanoArrived), this.five.on("modeChange", this.onFiveModeChange), this.five.on("panoWillArrive", this.onFivePanoWillArrive);
|
|
935
|
+
super(e), this.model.polylines.forEach(this.polylineAdded), this.five.needsRender = !0, this.model.hook.on("polylineAdded", this.polylineAdded), this.model.hook.on("polylineRemoved", this.polylineRemoved), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("models.load", this.onCameraUpdate), this.five.on("models.refined", this.onCameraUpdate), this.five.on("panoArrived", this.onFivePanoArrived), this.five.on("modeChange", this.onFiveModeChange), this.five.on("panoWillArrive", this.onFivePanoWillArrive);
|
|
924
936
|
}
|
|
925
937
|
dispose() {
|
|
926
|
-
super.dispose(), this.model.hook.off("polylineAdded", this.polylineAdded), this.model.hook.off("polylineRemoved", this.polylineRemoved), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("panoArrived", this.onFivePanoArrived), this.five.off("modeChange", this.onFiveModeChange), this.five.off("panoWillArrive", this.onFivePanoWillArrive), this.five.needsRender = !0, this.hook.emit("selectedChange", []);
|
|
938
|
+
this.model.getAllLines().forEach((e) => e.setModelOcclusion(!1)), super.dispose(), this.model.hook.off("polylineAdded", this.polylineAdded), this.model.hook.off("polylineRemoved", this.polylineRemoved), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("models.load", this.onCameraUpdate), this.five.off("models.refined", this.onCameraUpdate), this.five.off("panoArrived", this.onFivePanoArrived), this.five.off("modeChange", this.onFiveModeChange), this.five.off("panoWillArrive", this.onFivePanoWillArrive), this.five.needsRender = !0, this.hook.emit("selectedChange", []);
|
|
927
939
|
}
|
|
928
940
|
polylineRemoved = (e) => {
|
|
929
941
|
e.lines.forEach((e) => this.removeLine(e)), this.hook.emit("selectedChange", this.model.getAllLines().filter((e) => e.selected).map((e) => e));
|
|
930
942
|
};
|
|
931
943
|
polylineAdded = (e) => {
|
|
944
|
+
e.lines.forEach((e) => {
|
|
945
|
+
e.setModelOcclusion(!0), this.group.add(e.mesh), e.mesh.updateMatrixWorld(), e.distanceItem.appendTo(this.container);
|
|
946
|
+
});
|
|
932
947
|
let { panoIndex: t, mode: n } = this.five.getCurrentState();
|
|
933
|
-
|
|
934
|
-
e.visibleFiveMode && !e.visibleFiveMode.includes(n) && (r.mesh.visible = !1), e.visiblePanoIndexes && !e.visiblePanoIndexes.includes(t) && (r.mesh.visible = !1), r.distanceItem.appendTo(this.container), r.distanceItem.update(this.five), this.group.add(r.mesh);
|
|
935
|
-
}), this.updateDistanceUI();
|
|
948
|
+
this.updatePolylineVisibility(e, t, n), this.five.needsRender = !0;
|
|
936
949
|
};
|
|
950
|
+
updatePolylineVisibility(e, t, n, r = !1) {
|
|
951
|
+
let i = (!e.visiblePanoIndexes || e.visiblePanoIndexes.includes(t)) && (!e.visibleFiveMode || e.visibleFiveMode.includes(n));
|
|
952
|
+
r && i || e.lines.forEach((e) => {
|
|
953
|
+
e.mesh.visible = i, e.distanceItem.update(this.five);
|
|
954
|
+
});
|
|
955
|
+
}
|
|
937
956
|
onCameraUpdate = () => {
|
|
938
957
|
this.updateDistanceUI();
|
|
939
958
|
};
|
|
940
959
|
onFiveModeChange = (e) => {
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
e.mesh.visible = !1, e.distanceItem.update(this.five);
|
|
944
|
-
});
|
|
945
|
-
}), this.five.ready().then(() => {
|
|
946
|
-
let e = this.five.getCurrentState().mode;
|
|
947
|
-
e !== "Panorama" && this.model.polylines.forEach((t) => {
|
|
948
|
-
t.visibleFiveMode && t.visibleFiveMode.includes(e) && t.lines.forEach((e) => {
|
|
949
|
-
e.mesh.visible = !0, e.distanceItem.update(this.five);
|
|
950
|
-
});
|
|
951
|
-
});
|
|
952
|
-
}));
|
|
960
|
+
let { panoIndex: t } = this.five.getCurrentState();
|
|
961
|
+
this.model.polylines.forEach((n) => this.updatePolylineVisibility(n, t, e)), this.five.needsRender = !0;
|
|
953
962
|
};
|
|
954
963
|
onFivePanoWillArrive = (e) => {
|
|
955
|
-
this.
|
|
956
|
-
|
|
957
|
-
e.mesh.visible = !1, e.distanceItem.update(this.five);
|
|
958
|
-
});
|
|
959
|
-
});
|
|
964
|
+
let { mode: t } = this.five.getCurrentState();
|
|
965
|
+
this.model.polylines.forEach((n) => this.updatePolylineVisibility(n, e, t, !0)), this.five.needsRender = !0;
|
|
960
966
|
};
|
|
961
967
|
onFivePanoArrived = (e) => {
|
|
962
|
-
this.
|
|
963
|
-
|
|
964
|
-
e.mesh.visible = !0, e.distanceItem.update(this.five);
|
|
965
|
-
});
|
|
966
|
-
});
|
|
968
|
+
let { mode: t } = this.five.getCurrentState();
|
|
969
|
+
this.model.polylines.forEach((n) => this.updatePolylineVisibility(n, e, t)), this.five.needsRender = !0;
|
|
967
970
|
};
|
|
968
971
|
};
|
|
969
972
|
//#endregion
|
|
@@ -2372,7 +2375,7 @@ var _n = {
|
|
|
2372
2375
|
this.model.clear();
|
|
2373
2376
|
}
|
|
2374
2377
|
dispose() {
|
|
2375
|
-
this.disable(), this.clear(), this.useUIController?.dispose(), this.magnifier?.dispose(), this.five.needsRender = !0;
|
|
2378
|
+
this.disable(), this.clear(), this.useUIController?.dispose(), this.magnifier?.dispose(), this.container.remove(), this.five.needsRender = !0;
|
|
2376
2379
|
}
|
|
2377
2380
|
load(e) {
|
|
2378
2381
|
let t = e;
|
|
@@ -2485,4 +2488,4 @@ var _n = {
|
|
|
2485
2488
|
//#endregion
|
|
2486
2489
|
export { Sn as t };
|
|
2487
2490
|
|
|
2488
|
-
//# sourceMappingURL=pano-measure-
|
|
2491
|
+
//# sourceMappingURL=pano-measure-Cfe9RfWP.js.map
|