@realsee/dnalogel 3.8.0 → 3.8.2

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.
@@ -11,7 +11,7 @@ type Data = {
11
11
  z: number;
12
12
  }>;
13
13
  };
14
- type Config = {
14
+ export type Config = {
15
15
  offset?: Partial<{
16
16
  x: number;
17
17
  y: number;
@@ -1,10 +1,11 @@
1
1
  import type { FivePlugin } from '@realsee/five';
2
2
  import * as CruisePluginTypes from './typing';
3
3
  import type { Config } from './typing';
4
+ import type { Config as MovePluginConfig } from './Move';
4
5
  import WalkController from './Work';
5
6
  import MoveController from './Move';
6
7
  export declare const CruisePlugin: FivePlugin<Config | undefined, InstanceType<typeof WalkController>>;
7
- export declare const MovePlugin: FivePlugin<Config | undefined, InstanceType<typeof MoveController>>;
8
+ export declare const MovePlugin: FivePlugin<MovePluginConfig | undefined, InstanceType<typeof MoveController>>;
8
9
  export { WalkController, MoveController, WalkController as CruisePluginController };
9
10
  export type { CruisePluginExportType } from './typing';
10
11
  export { CruisePluginTypes };
@@ -1,6 +1,6 @@
1
- import { typing as dt } from "./typing/index.js";
2
- import r from "./Work.js";
3
- import t from "./Move.js";
1
+ import { typing as kt } from "./typing/index.js";
2
+ import t from "./Work.js";
3
+ import i from "./Move.js";
4
4
  import "../GuideLinePlugin/index.js";
5
5
  import "../GuideLinePlugin/Controller.js";
6
6
  import "../base/BasePluginWithData.js";
@@ -175,13 +175,13 @@ import "../shared-utils/formatRad.js";
175
175
  import "./BaseController.js";
176
176
  import "./utils/getFiveStateOnCurve.js";
177
177
  import "../shared-utils/five/fiveReady.js";
178
- const wt = (o) => new r(o), xt = (o) => new t(o);
178
+ const xt = (o, r) => new t(o, r), yt = (o, r) => new i(o, r);
179
179
  export {
180
- wt as CruisePlugin,
181
- r as CruisePluginController,
182
- dt as CruisePluginTypes,
183
- t as MoveController,
184
- xt as MovePlugin,
185
- r as WalkController,
186
- wt as default
180
+ xt as CruisePlugin,
181
+ t as CruisePluginController,
182
+ kt as CruisePluginTypes,
183
+ i as MoveController,
184
+ yt as MovePlugin,
185
+ t as WalkController,
186
+ xt as default
187
187
  };
@@ -14,7 +14,7 @@ let b = class {
14
14
  /**
15
15
  * @realsee/dnalogel 版本号
16
16
  */
17
- i(this, "VERSION", "3.8.0");
17
+ i(this, "VERSION", "3.8.2");
18
18
  i(this, "five");
19
19
  /**
20
20
  * 插件事件钩子
@@ -21,7 +21,7 @@ class m extends A {
21
21
  this.xArrow.visible = r.includes("x"), this.yArrow.visible = r.includes("y"), this.zArrow.visible = r.includes("z");
22
22
  }
23
23
  dispose() {
24
- this.remove(this.xArrow, this.yArrow, this.zArrow);
24
+ this.remove(this.xArrow, this.yArrow, this.zArrow), super.dispose();
25
25
  }
26
26
  }
27
27
  export {
@@ -1,24 +1,31 @@
1
- import * as a from "three";
2
- function u(p) {
3
- const i = new a.Box3(), e = new a.Vector3();
4
- if (p.traverse((n) => {
5
- var s;
6
- if (n.name === "shadow")
1
+ import * as P from "three";
2
+ const g = (B) => {
3
+ const n = B.elements, e = n[0], o = n[1], t = n[2], c = n[3], r = n[4], s = n[5], i = n[6], a = n[7], l = n[8], p = n[9], f = n[10], d = n[11], u = n[12], x = n[13], m = n[14], v = n[15], M = p * m * a - x * f * a + x * i * d - s * m * d - p * i * v + s * f * v, W = u * f * a - l * m * a - u * i * d + r * m * d + l * i * v - r * f * v, E = l * x * a - u * p * a + u * s * d - r * x * d - l * s * v + r * p * v, w = u * p * i - l * x * i - u * s * f + r * x * f + l * s * m - r * p * m, h = e * M + o * W + t * E + c * w;
4
+ if (h === 0)
5
+ return B.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
6
+ const y = 1 / h;
7
+ return n[0] = M * y, n[1] = (x * f * c - p * m * c - x * t * d + o * m * d + p * t * v - o * f * v) * y, n[2] = (s * m * c - x * i * c + x * t * a - o * m * a - s * t * v + o * i * v) * y, n[3] = (p * i * c - s * f * c - p * t * a + o * f * a + s * t * d - o * i * d) * y, n[4] = W * y, n[5] = (l * m * c - u * f * c + u * t * d - e * m * d - l * t * v + e * f * v) * y, n[6] = (u * i * c - r * m * c - u * t * a + e * m * a + r * t * v - e * i * v) * y, n[7] = (r * f * c - l * i * c + l * t * a - e * f * a - r * t * d + e * i * d) * y, n[8] = E * y, n[9] = (u * p * c - l * x * c - u * o * d + e * x * d + l * o * v - e * p * v) * y, n[10] = (r * x * c - u * s * c + u * o * a - e * x * a - r * o * v + e * s * v) * y, n[11] = (l * s * c - r * p * c - l * o * a + e * p * a + r * o * d - e * s * d) * y, n[12] = w * y, n[13] = (l * x * t - u * p * t + u * o * f - e * x * f - l * o * m + e * p * m) * y, n[14] = (u * s * t - r * x * t - u * o * i + e * x * i + r * o * m - e * s * m) * y, n[15] = (r * p * t - l * s * t + l * o * i - e * p * i - r * o * f + e * s * f) * y, B;
8
+ };
9
+ function A(B) {
10
+ const n = new P.Box3(), e = new P.Vector3();
11
+ if (B.updateWorldMatrix(!1, !1), B.traverse((o) => {
12
+ var c;
13
+ if (o.name === "shadow")
7
14
  return;
8
- const t = n.geometry;
9
- if (t !== void 0)
10
- if ((s = t == null ? void 0 : t.attributes) != null && s.position) {
15
+ const t = o.geometry;
16
+ if (o.updateWorldMatrix(!1, !1), t !== void 0)
17
+ if ((c = t == null ? void 0 : t.attributes) != null && c.position) {
11
18
  const r = t.attributes.position;
12
- for (let o = 0, f = r.count; o < f; o++)
13
- e.fromBufferAttribute(r, o).applyMatrix4(n.matrix), i.expandByPoint(e);
19
+ for (let s = 0, i = r.count; s < i; s++)
20
+ e.fromBufferAttribute(r, s).applyMatrix4(o.matrixWorld), n.expandByPoint(e);
14
21
  } else
15
22
  t.vertices.forEach((r) => {
16
- const o = r.clone().applyMatrix4(n.matrix);
17
- i.expandByPoint(o);
23
+ const s = r.clone().applyMatrix4(o.matrixWorld);
24
+ n.expandByPoint(s);
18
25
  });
19
- }), !i.isEmpty())
20
- return i;
26
+ }), !n.isEmpty())
27
+ return n.applyMatrix4(g(B.matrixWorld.clone())), n;
21
28
  }
22
29
  export {
23
- u as boundingBox
30
+ A as boundingBox
24
31
  };
@@ -1,6 +1,6 @@
1
1
  function A() {
2
2
  console.debug(
3
- "%c %c@realsee/dnalogel %cv3.8.0",
3
+ "%c %c@realsee/dnalogel %cv3.8.2",
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",
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "repository": "https://github.com/realsee-developer/dnalogel.git",
8
8
  "description": "如视 VR 看房插件合集",
9
9
  "private": false,
10
- "version": "3.8.0",
10
+ "version": "3.8.2",
11
11
  "license": "SEE LICENSE IN TERMS.txt",
12
12
  "scripts": {
13
13
  "clean": "rm -rf components dist docs libs types ./vite.config.js.timestamp*",