@realsee/dnalogel 3.77.0-alpha.0 → 3.77.0-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.
Files changed (31) hide show
  1. package/CHANGELOG.md +0 -9
  2. package/dist/CruisePlugin/Work.d.ts +3 -0
  3. package/dist/CruisePlugin/typing.d.ts +7 -0
  4. package/dist/CruisePlugin/utils/coordinatesAngle.d.ts +19 -3
  5. package/dist/Sculpt/Objects/Base/Editor.d.ts +1 -20
  6. package/dist/Sculpt/Objects/Box/index.d.ts +2 -5
  7. package/dist/Sculpt/Objects/Rectangle/index.d.ts +4 -7
  8. package/dist/index.cjs.js +72 -72
  9. package/dist/index.js +5749 -5742
  10. package/dist/index.umd.js +56 -56
  11. package/dist/shared-utils/Object3DHelper/typings/Hooks.d.ts +3 -4
  12. package/libs/CruisePlugin/BaseController.js +8 -1
  13. package/libs/CruisePlugin/Work.d.ts +3 -0
  14. package/libs/CruisePlugin/Work.js +298 -222
  15. package/libs/CruisePlugin/typing.d.ts +7 -0
  16. package/libs/CruisePlugin/utils/coordinatesAngle.d.ts +19 -3
  17. package/libs/CruisePlugin/utils/coordinatesAngle.js +10 -5
  18. package/libs/Sculpt/Objects/Base/Editor.d.ts +1 -20
  19. package/libs/Sculpt/Objects/Base/Editor.js +35 -91
  20. package/libs/Sculpt/Objects/Box/index.d.ts +2 -5
  21. package/libs/Sculpt/Objects/Box/index.js +55 -61
  22. package/libs/Sculpt/Objects/Prism/index.js +47 -48
  23. package/libs/Sculpt/Objects/Rectangle/index.d.ts +4 -7
  24. package/libs/Sculpt/Objects/Rectangle/index.js +117 -119
  25. package/libs/base/BasePlugin.js +1 -1
  26. package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +1 -1
  27. package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +18 -18
  28. package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +1 -1
  29. package/libs/shared-utils/Object3DHelper/typings/Hooks.d.ts +3 -4
  30. package/libs/shared-utils/logger.js +1 -1
  31. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,8 +1,4 @@
1
1
  # CHANGELOG
2
- ## 3.77.0
3
-
4
- - feat(Sculpt): 1.添加Sculpt 落笔时候的点位回调,2添加Sculpt编辑状态的回调 包含旋转,拖拽,缩放参数
5
-
6
2
  ## 3.76.0
7
3
 
8
4
  - feat(Sculpt): 添加 hitFilter 配置,支持自定义拾取点过滤函数
@@ -56,11 +52,6 @@
56
52
  - feat(Sculpt): 多边形添加事件 `polygon.experimental_self_intersect` 和 `polygon.experimental_point_will_add`
57
53
  - feat(Sculpt): 多边形添加 `experimental_max_point_count` 控制最多能绘制的点数
58
54
 
59
- ## 3.74.0-alpha.0
60
-
61
- - feat(Sculpt): 多边形添加事件 `polygon.experimental_self_intersect` 和 `polygon.experimental_point_will_add`
62
- - feat(Sculpt): 多边形添加 `experimental_max_point_count` 控制最多能绘制的点数
63
-
64
55
  ## 3.73.5
65
56
 
66
57
  - fix(Object3DHelper): 修复垂直拖拽位置不准
@@ -20,6 +20,7 @@ export default class WalkController extends CruiseController<PluginData, Config>
20
20
  moveToFirstPanoEffect?: MoveEffect;
21
21
  moveToFirstPanoDuration?: number;
22
22
  modeChanging?: boolean;
23
+ audio?: HTMLAudioElement;
23
24
  };
24
25
  constructor(five: Five, config?: Config);
25
26
  /**
@@ -117,4 +118,6 @@ export default class WalkController extends CruiseController<PluginData, Config>
117
118
  * @description Change five mode
118
119
  */
119
120
  private changeMode;
121
+ private loadAudio;
122
+ private playAudio;
120
123
  }
@@ -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 };
@@ -2,21 +2,9 @@ import type * as THREE from 'three';
2
2
  import { IObject3D } from '../../../shared-utils/three/IObject3D';
3
3
  import type { AddObject3DHelperConfig } from '../../../Object3DHelperPlugin';
4
4
  import { Subscribe } from '../../../shared-utils/Subscribe';
5
- import type { Direction, Direction4 } from '../../../shared-utils/Object3DHelper/typings/Direction';
6
- export type ObjectUpdateType = 'move' | 'rotate' | 'scale';
7
- export interface ObjectUpdateParams {
8
- /** 操作类型:移动、旋转、缩放 */
9
- type: ObjectUpdateType;
10
- /** 开始时间戳 */
11
- start_timestamp: number;
12
- /** 结束时间戳 */
13
- end_timestamp?: number;
14
- /** 轴向 */
15
- axis?: Direction | Direction4;
16
- }
17
5
  export declare class BaseEditor<OriginObject extends THREE.Object3D = THREE.Object3D> extends IObject3D {
18
6
  hooks: Subscribe<{
19
- objectUpdate: (params?: ObjectUpdateParams) => void;
7
+ objectUpdate: () => void;
20
8
  }>;
21
9
  protected originObject: OriginObject;
22
10
  constructor(originObject: OriginObject);
@@ -32,16 +20,9 @@ export declare class BaseEditor<OriginObject extends THREE.Object3D = THREE.Obje
32
20
  export declare class BaseEditorWithObjectHelper<OriginObject extends THREE.Object3D = THREE.Object3D> extends BaseEditor<OriginObject> {
33
21
  private get helper();
34
22
  private objectHelperConfig;
35
- private currentOperation;
36
23
  constructor(originObject: OriginObject, objectHelperConfig?: AddObject3DHelperConfig | (() => AddObject3DHelperConfig));
37
24
  enable(): void;
38
25
  disable(): void;
39
26
  initialHelperMatrix(): void;
40
- private onMoveStart;
41
- private onRotateStart;
42
- private onScaleStart;
43
- private onMoveEnd;
44
- private onRotateEnd;
45
- private onScaleEnd;
46
27
  private onObjectUpdate;
47
28
  }
@@ -9,9 +9,6 @@ export interface BoxImportData extends BaseImportData, BoxData {
9
9
  type: LiteralString<'Box'>;
10
10
  style?: Partial<BoxStyle>;
11
11
  }
12
- export type BoxCreateConfig = Partial<BoxStyle & CreateLimitConfig & DrawMethodConfig> & {
13
- onPointPlaced?: () => void;
14
- };
15
12
  export declare class Box extends BaseObject<BoxImportData> {
16
13
  readonly type = "Box";
17
14
  boxMesh: BoxMesh;
@@ -33,7 +30,7 @@ export declare class Box extends BaseObject<BoxImportData> {
33
30
  setData(data: Partial<BoxImportData>): void;
34
31
  highlight(): void;
35
32
  unhighlight(): void;
36
- create(params?: BoxCreateConfig): Promise<void>;
33
+ create(params?: Partial<BoxStyle & CreateLimitConfig & DrawMethodConfig>): Promise<void>;
37
34
  /**
38
35
  * 获取盒子在世界坐标中的6个面的几何信息
39
36
  * 返回顺序:bottom、top、side0~side3(自底面第0点起顺时针)
@@ -45,4 +42,4 @@ export declare class Box extends BaseObject<BoxImportData> {
45
42
  normal: THREE.Vector3;
46
43
  }>;
47
44
  }
48
- export declare function createBox(boxMesh: BoxMesh, pointSelector: PointSelector, config?: BoxCreateConfig): Promise<void>;
45
+ export declare function createBox(boxMesh: BoxMesh, pointSelector: PointSelector, config?: Partial<CreateLimitConfig & DrawMethodConfig>): Promise<void>;
@@ -9,9 +9,6 @@ export interface RectangleImportData extends BaseImportData, RectangleData {
9
9
  type: LiteralString<'Rectangle'>;
10
10
  style?: Partial<RectangleWithEdgeMeshStyle>;
11
11
  }
12
- export type RectangleCreateConfig = Partial<RectangleWithEdgeMeshStyle & CreateLimitConfig & DrawMethodConfig> & {
13
- onPointPlaced?: () => void;
14
- };
15
12
  export declare class Rectangle extends BaseObject<RectangleImportData> {
16
13
  readonly type = "Rectangle";
17
14
  rectangleMesh: RectangleWithEdgeMesh;
@@ -32,17 +29,17 @@ export declare class Rectangle extends BaseObject<RectangleImportData> {
32
29
  setData(data: Partial<RectangleImportData>): void;
33
30
  highlight(): void;
34
31
  unhighlight(): void;
35
- create(config?: RectangleCreateConfig): Promise<void>;
32
+ create(config?: Partial<RectangleWithEdgeMeshStyle & CreateLimitConfig & DrawMethodConfig>): Promise<void>;
36
33
  }
37
34
  /**
38
35
  * @description 创建矩形
39
36
  */
40
- export declare function createRectangle(rectangleMesh: RectangleMesh, pointSelector: PointSelector, config?: RectangleCreateConfig): void | Promise<void>;
37
+ export declare function createRectangle(rectangleMesh: RectangleMesh, pointSelector: PointSelector, config?: Partial<CreateLimitConfig & DrawMethodConfig>): void | Promise<void>;
41
38
  /**
42
39
  * @description 对角线创建矩形(两步)
43
40
  */
44
- export declare function createRectangleByDiagonal(rectangleMesh: RectangleMesh, pointSelector: PointSelector, config?: RectangleCreateConfig): void | Promise<void>;
41
+ export declare function createRectangleByDiagonal(rectangleMesh: RectangleMesh, pointSelector: PointSelector, config?: Partial<CreateLimitConfig>): void | Promise<void>;
45
42
  /**
46
43
  * @description 正常创建矩形(三步)
47
44
  */
48
- export declare function createRectangleByVertex(rectangleMesh: RectangleMesh, pointSelector: PointSelector, config?: RectangleCreateConfig): void | Promise<void>;
45
+ export declare function createRectangleByVertex(rectangleMesh: RectangleMesh, pointSelector: PointSelector, config?: Partial<CreateLimitConfig>): void | Promise<void>;