@realsee/dnalogel 3.73.1-alpha.2 → 3.73.1-alpha.3

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/dist/index.js CHANGED
@@ -43,7 +43,7 @@ import { LineGeometry as Ab, LineMaterial as bb, THREE_Line2 as yb, Line as wb }
43
43
  import { GLTFLoader as Pb } from "@realsee/five/gltf-loader";
44
44
  function Cb() {
45
45
  console.debug(
46
- "%c %c@realsee/dnalogel %cv3.73.1-alpha.2",
46
+ "%c %c@realsee/dnalogel %cv3.73.1-alpha.3",
47
47
  [
48
48
  "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=')",
49
49
  "background-repeat: no-repeat",
@@ -13117,7 +13117,7 @@ let bs = class {
13117
13117
  /**
13118
13118
  * @realsee/dnalogel 版本号
13119
13119
  */
13120
- f(this, "VERSION", "3.73.1-alpha.2");
13120
+ f(this, "VERSION", "3.73.1-alpha.3");
13121
13121
  f(this, "NAME");
13122
13122
  f(this, "five");
13123
13123
  f(this, "workUtil");
@@ -48938,9 +48938,9 @@ const EL = (n, t, e) => {
48938
48938
  return new tt(n, t, e);
48939
48939
  }, ML = (n, t) => new tt(n, t == null ? void 0 : t.theme, t == null ? void 0 : t.config), zx = (n, t) => {
48940
48940
  const e = new y.Box3();
48941
- return n.modelScene.traverse((i) => {
48942
- var o, r;
48943
- ((r = (o = i == null ? void 0 : i.material) == null ? void 0 : o[0]) == null ? void 0 : r.floorIndex) === t && e.expandByObject(i);
48941
+ return n.models.find((s) => s.name === n.state.workCode).traverse((s) => {
48942
+ var r, a;
48943
+ ((a = (r = s == null ? void 0 : s.material) == null ? void 0 : r[0]) == null ? void 0 : a.floorIndex) === t && e.expandByObject(s);
48944
48944
  }), e;
48945
48945
  }, Ox = /* @__PURE__ */ new Map(), jx = /* @__PURE__ */ new Map();
48946
48946
  class Rx extends Fd {
@@ -48983,37 +48983,38 @@ class Rx extends Fd {
48983
48983
  }
48984
48984
  /** 计算楼层索引 */
48985
48985
  computeFloorIndex() {
48986
+ var a, l;
48986
48987
  const e = /* @__PURE__ */ new Map();
48987
- this.five.observers.forEach((r) => {
48988
- var l;
48989
- const a = (l = r.floorIndex) != null ? l : 0;
48990
- if (!e.has(a)) {
48991
- const c = zx(this.five, a);
48992
- c.isEmpty() || e.set(a, c);
48993
- }
48994
- });
48995
- const i = It(...this.position.map(Qe)), s = [], o = [];
48996
- if (e.forEach((r, a) => {
48997
- o.push({ floorIndex: a, box: r }), r.containsPoint(i) && s.push({ floorIndex: a, box: r });
48998
- }), s.length === 1)
48999
- return s[0].floorIndex;
49000
- if (s.length > 1) {
49001
- let r = 1 / 0, a = s[0].floorIndex;
49002
- return s.forEach(({ floorIndex: l, box: c }) => {
49003
- const h = new y.Vector3();
49004
- c.getCenter(h);
49005
- const d = i.distanceTo(h);
49006
- d < r && (r = d, a = l);
49007
- }), a;
49008
- }
49009
- if (o.length > 0) {
49010
- let r = 1 / 0, a = o[0].floorIndex;
49011
- return o.forEach(({ floorIndex: l, box: c }) => {
49012
- const h = new y.Vector3();
49013
- c.getCenter(h);
49014
- const d = i.distanceTo(h);
49015
- d < r && (r = d, a = l);
49016
- }), a;
48988
+ ((l = (a = this.five.works.getWork(this.workUtil.workCode)) == null ? void 0 : a.observers) != null ? l : []).forEach((c) => {
48989
+ var d;
48990
+ const h = (d = c.floorIndex) != null ? d : 0;
48991
+ if (!e.has(h)) {
48992
+ const u = zx(this.five, h);
48993
+ u.isEmpty() || e.set(h, u);
48994
+ }
48995
+ });
48996
+ const s = It(...this.position.map(Qe)), o = [], r = [];
48997
+ if (e.forEach((c, h) => {
48998
+ r.push({ floorIndex: h, box: c }), c.containsPoint(s) && o.push({ floorIndex: h, box: c });
48999
+ }), o.length === 1)
49000
+ return o[0].floorIndex;
49001
+ if (o.length > 1) {
49002
+ let c = 1 / 0, h = o[0].floorIndex;
49003
+ return o.forEach(({ floorIndex: d, box: u }) => {
49004
+ const p = new y.Vector3();
49005
+ u.getCenter(p);
49006
+ const g = s.distanceTo(p);
49007
+ g < c && (c = g, h = d);
49008
+ }), h;
49009
+ }
49010
+ if (r.length > 0) {
49011
+ let c = 1 / 0, h = r[0].floorIndex;
49012
+ return r.forEach(({ floorIndex: d, box: u }) => {
49013
+ const p = new y.Vector3();
49014
+ u.getCenter(p);
49015
+ const g = s.distanceTo(p);
49016
+ g < c && (c = g, h = d);
49017
+ }), h;
49017
49018
  }
49018
49019
  }
49019
49020
  loadModel() {