@realsee/dnalogel 3.77.2 → 3.77.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.
@@ -18,6 +18,13 @@ export type CruiseData = {
18
18
  * @description 旋转速度 rad/ms
19
19
  */
20
20
  rotateSpeed?: number;
21
+ /**
22
+ * @description move effect独有,音频播放相关参数
23
+ */
24
+ audio?: {
25
+ url: string;
26
+ duration: number;
27
+ };
21
28
  } & FivePoseAndState;
22
29
  export interface CruiseKeyframe {
23
30
  id: string;
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @description: 获取coordinates间的夹角
3
- * @return {number} 夹角角度
2
+ * @description: 获取coordinates间的夹角(两个方向向量之间的最小夹角)
3
+ * @return {number} 夹角角度(0 到 π)
4
4
  */
5
5
  declare function coordinatesAngle(coordinates1: {
6
6
  longitude: number;
@@ -9,4 +9,20 @@ declare function coordinatesAngle(coordinates1: {
9
9
  longitude: number;
10
10
  latitude: number;
11
11
  }): number;
12
- export { coordinatesAngle };
12
+ /**
13
+ * @description: 获取coordinates间的实际旋转角度(基于 longitude/latitude 差值)
14
+ * @param coordinates1 起始坐标
15
+ * @param coordinates2 目标坐标
16
+ * @param signed 是否返回有符号角度(默认 false)
17
+ * - true: 返回有符号角度(以主要旋转方向的符号为准)
18
+ * - false: 返回无符号角度(绝对值)
19
+ * @return {number} 旋转角度(弧度),可以超过 π
20
+ */
21
+ declare function coordinatesRotation(coordinates1: {
22
+ longitude: number;
23
+ latitude: number;
24
+ }, coordinates2: {
25
+ longitude: number;
26
+ latitude: number;
27
+ }, signed?: boolean): number;
28
+ export { coordinatesAngle, coordinatesRotation };
@@ -1,9 +1,14 @@
1
- import { coordinatesToVector as o } from "./coordinatesToVector.js";
1
+ import { coordinatesToVector as l } from "./coordinatesToVector.js";
2
2
  import "three";
3
- function s(t, n) {
4
- const e = o(t), r = o(n);
5
- return e.angleTo(r);
3
+ function s(e, a) {
4
+ const r = l(e), t = l(a);
5
+ return r.angleTo(t);
6
+ }
7
+ function u(e, a, r = !1) {
8
+ const t = a.longitude - e.longitude, n = a.latitude - e.latitude, o = Math.sqrt(t * t + n * n);
9
+ return r ? Math.abs(t) >= Math.abs(n) ? t >= 0 ? o : -o : n >= 0 ? o : -o : o;
6
10
  }
7
11
  export {
8
- s as coordinatesAngle
12
+ s as coordinatesAngle,
13
+ u as coordinatesRotation
9
14
  };
@@ -1,7 +1,7 @@
1
- var s = Object.defineProperty;
2
- var i = (o, e, t) => e in o ? s(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
- var n = (o, e, t) => (i(o, typeof e != "symbol" ? e + "" : e, t), t);
4
- class u {
1
+ var o = Object.defineProperty;
2
+ var s = (r, e, t) => e in r ? o(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var n = (r, e, t) => (s(r, typeof e != "symbol" ? e + "" : e, t), t);
4
+ class l {
5
5
  constructor(e, t) {
6
6
  n(this, "five");
7
7
  n(this, "measureController");
@@ -16,18 +16,15 @@ class u {
16
16
  n(this, "onMouseDown", (e) => {
17
17
  e.button === 2 && (e.preventDefault(), this.measureController.save().changeMode("Watch"));
18
18
  });
19
- this.five = t, this.measureController = e;
20
- const r = this.five.getElement();
21
- r && (document.body.addEventListener("keydown", this.onKeyDown), r.addEventListener("mousedown", this.onMouseDown));
19
+ this.five = t, this.measureController = e, this.five.getElement() && document.body.addEventListener("keydown", this.onKeyDown);
22
20
  }
23
21
  dispose() {
24
- const e = this.five.getElement();
25
- e && (document.body.removeEventListener("keydown", this.onKeyDown), e.removeEventListener("mousedown", this.onMouseDown));
22
+ this.five.getElement() && document.body.removeEventListener("keydown", this.onKeyDown);
26
23
  }
27
24
  escape() {
28
25
  return this.measureController.getCurrentMode() === "Watch" ? this.measureController.disable() : this.measureController.save().changeMode("Watch");
29
26
  }
30
27
  }
31
28
  export {
32
- u as ShortcutKeyController
29
+ l as ShortcutKeyController
33
30
  };
@@ -23,7 +23,7 @@ let I = class {
23
23
  /**
24
24
  * @realsee/dnalogel 版本号
25
25
  */
26
- r(this, "VERSION", "3.77.2");
26
+ r(this, "VERSION", "3.77.3");
27
27
  r(this, "NAME");
28
28
  r(this, "five");
29
29
  r(this, "workUtil");
@@ -1,6 +1,6 @@
1
1
  function A() {
2
2
  console.debug(
3
- "%c %c@realsee/dnalogel %cv3.77.2",
3
+ "%c %c@realsee/dnalogel %cv3.77.3",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/dnalogel",
3
- "version": "3.77.2",
3
+ "version": "3.77.3",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./libs/index.js",
6
6
  "types": "./libs/index.d.ts",