@realsee/dnalogel 3.78.0-alpha.3 → 3.78.0

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 (148) hide show
  1. package/CHANGELOG.md +40 -10
  2. package/dist/DigitalPerformancePlugin/controller/index.d.ts +224 -0
  3. package/dist/DigitalPerformancePlugin/core/DigitalHuman.d.ts +55 -0
  4. package/dist/DigitalPerformancePlugin/core/DigitalPlayground.d.ts +40 -0
  5. package/dist/DigitalPerformancePlugin/core/DigitalStateMachine.d.ts +150 -0
  6. package/dist/DigitalPerformancePlugin/core/Trace.d.ts +9 -0
  7. package/dist/DigitalPerformancePlugin/index.d.ts +11 -0
  8. package/dist/DigitalPerformancePlugin/mock.d.ts +76 -0
  9. package/dist/DigitalPerformancePlugin/typings/index.d.ts +79 -0
  10. package/dist/PanoTagPlugin/controller/Tag/MaskTag.shaders.d.ts +0 -6
  11. package/dist/PanoTagPlugin/typings/tag/TagConfig.d.ts +20 -2
  12. package/dist/PanoTagPlugin/utils/tagPosition.d.ts +2 -1
  13. package/dist/Sculpt/Meshes/Line.d.ts +4 -0
  14. package/dist/Sculpt/Objects/Base/Editor.d.ts +9 -2
  15. package/dist/index.cjs.js +101 -88
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.js +14196 -12441
  18. package/dist/index.umd.js +83 -70
  19. package/dist/shared-utils/five/getFiveFromParentChain.d.ts +8 -0
  20. package/libs/AreaMakerPlugin/Controller.js +3 -2
  21. package/libs/AreaMakerPlugin/index.js +3 -2
  22. package/libs/AreaMakerPlugin/utils/Item.js +3 -2
  23. package/libs/CSS3DRenderPlugin/Controller.js +3 -2
  24. package/libs/CSS3DRenderPlugin/index.js +6 -5
  25. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +39 -38
  26. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +10 -9
  27. package/libs/CruisePlugin/BaseController.js +5 -4
  28. package/libs/CruisePlugin/Move.js +3 -2
  29. package/libs/CruisePlugin/Work.js +3 -2
  30. package/libs/CruisePlugin/index.js +7 -6
  31. package/libs/CurrentPanoImagePlugin/Controller.js +15 -14
  32. package/libs/CurrentPanoImagePlugin/index.js +4 -3
  33. package/libs/DigitalPerformancePlugin/controller/index.d.ts +2 -2
  34. package/libs/DigitalPerformancePlugin/controller/index.js +164 -173
  35. package/libs/DigitalPerformancePlugin/core/DigitalHuman.d.ts +16 -6
  36. package/libs/DigitalPerformancePlugin/core/DigitalHuman.js +128 -102
  37. package/libs/DigitalPerformancePlugin/core/DigitalPlayground.d.ts +11 -5
  38. package/libs/DigitalPerformancePlugin/core/DigitalPlayground.js +84 -74
  39. package/libs/DigitalPerformancePlugin/core/DigitalStateMachine.d.ts +7 -0
  40. package/libs/DigitalPerformancePlugin/mock.d.ts +6 -0
  41. package/libs/DigitalPerformancePlugin/mock.js +272 -274
  42. package/libs/GuideLinePlugin/Controller.js +7 -6
  43. package/libs/GuideLinePlugin/GuideLineItem.js +5 -4
  44. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +51 -48
  45. package/libs/GuideLinePlugin/GuideLineModeItem.js +5 -2
  46. package/libs/GuideLinePlugin/index.js +7 -6
  47. package/libs/MeasurePlugin/Controller.js +11 -10
  48. package/libs/MeasurePlugin/index.js +5 -4
  49. package/libs/MeasurePlugin/utils/MeasureMesh.js +3 -2
  50. package/libs/ModelChassisCompassPlugin/Plugin.js +4 -3
  51. package/libs/ModelChassisCompassPlugin/index.js +1 -0
  52. package/libs/ModelEntryDoorGuidePlugin/Plugin.js +6 -5
  53. package/libs/ModelEntryDoorGuidePlugin/index.js +1 -0
  54. package/libs/ModelMakerPlugin/Controller.js +3 -2
  55. package/libs/ModelMakerPlugin/index.js +3 -2
  56. package/libs/ModelMakerPlugin/item/baseItem.js +3 -2
  57. package/libs/ModelMakerPlugin/item/boxItem.js +3 -2
  58. package/libs/ModelMakerPlugin/item/polygonItem.js +3 -2
  59. package/libs/ModelMakerPlugin/item/prismItem.js +3 -2
  60. package/libs/ModelTVVideoPlugin/Plugin.js +4 -3
  61. package/libs/ModelTVVideoPlugin/index.js +3 -2
  62. package/libs/ModelViewPlugin/Plugin.js +20 -19
  63. package/libs/ModelViewPlugin/index.js +1 -0
  64. package/libs/Object3DHelperPlugin/Controller.js +3 -2
  65. package/libs/Object3DHelperPlugin/index.js +6 -5
  66. package/libs/PanoCompassPlugin/Controller.js +3 -2
  67. package/libs/PanoCompassPlugin/index.js +4 -3
  68. package/libs/PanoDoorLabelPlugin/Controller.js +24 -23
  69. package/libs/PanoDoorLabelPlugin/index.js +4 -3
  70. package/libs/PanoMeasurePlugin/Components/Controller0.js +3 -2
  71. package/libs/PanoMeasurePlugin/Components/Controller1.js +3 -2
  72. package/libs/PanoMeasurePlugin/Controller/EditController.js +3 -2
  73. package/libs/PanoMeasurePlugin/Controller/WatchController.js +3 -2
  74. package/libs/PanoMeasurePlugin/Controller/index.js +3 -2
  75. package/libs/PanoMeasurePlugin/Model/area.js +3 -2
  76. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -0
  77. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +16 -15
  78. package/libs/PanoMeasurePlugin/index.js +14 -13
  79. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +3 -2
  80. package/libs/PanoRulerProPlugin/Controller.js +3 -2
  81. package/libs/PanoRulerProPlugin/RulerItems.js +42 -41
  82. package/libs/PanoRulerProPlugin/index.js +4 -3
  83. package/libs/PanoSpatialTagPlugin/Plugin.js +34 -33
  84. package/libs/PanoSpatialTagPlugin/index.js +1 -0
  85. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +141 -138
  86. package/libs/PanoTagPlugin/Components/Common/TagPopover/PopoverContent.js +3 -2
  87. package/libs/PanoTagPlugin/Components/Common/TagPopover/TagPopoverToolBar.js +3 -2
  88. package/libs/PanoTagPlugin/Components/Common/TagPopover/index.js +3 -2
  89. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +3 -2
  90. package/libs/PanoTagPlugin/Components/Tag/index.js +3 -2
  91. package/libs/PanoTagPlugin/Components/TagContainer.js +3 -2
  92. package/libs/PanoTagPlugin/Components/TagItem.js +131 -122
  93. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +50 -49
  94. package/libs/PanoTagPlugin/controller/Tag/BoxTag.js +69 -65
  95. package/libs/PanoTagPlugin/controller/Tag/MaskTag.js +1 -0
  96. package/libs/PanoTagPlugin/controller/Tag/MaskTag.shaders.d.ts +0 -6
  97. package/libs/PanoTagPlugin/controller/Tag/MaskTag.shaders.js +2 -90
  98. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +3 -2
  99. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +3 -2
  100. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +3 -2
  101. package/libs/PanoTagPlugin/controller/Tag/PolygonTag.js +31 -29
  102. package/libs/PanoTagPlugin/controller/TagRender.js +3 -2
  103. package/libs/PanoTagPlugin/controller/TagUtil.js +3 -2
  104. package/libs/PanoTagPlugin/controller/index.js +30 -29
  105. package/libs/PanoTagPlugin/index.js +12 -11
  106. package/libs/PanoTagPlugin/typings/tag/TagConfig.d.ts +20 -2
  107. package/libs/PanoTagPlugin/utils/index.js +31 -30
  108. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +3 -2
  109. package/libs/PanoTagPlugin/utils/tag/format.js +3 -2
  110. package/libs/PanoTagPlugin/utils/tagPosition.d.ts +2 -1
  111. package/libs/PanoTagPlugin/utils/tagPosition.js +34 -32
  112. package/libs/PanoVideoPlugin/Controller.js +9 -8
  113. package/libs/PanoVideoPlugin/VideoMeshController.js +3 -2
  114. package/libs/PanoVideoPlugin/index.js +6 -5
  115. package/libs/PipelinePlugin/Controller.js +3 -2
  116. package/libs/PipelinePlugin/index.js +4 -3
  117. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +3 -2
  118. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +3 -2
  119. package/libs/PipelinePlugin/utils/Objects/Pipe.js +1 -0
  120. package/libs/Sculpt/Meshes/Line.d.ts +4 -0
  121. package/libs/Sculpt/Meshes/Line.js +85 -76
  122. package/libs/Sculpt/Meshes/Point.js +28 -28
  123. package/libs/Sculpt/Meshes/Polygon.js +43 -43
  124. package/libs/Sculpt/Objects/Base/Editor.d.ts +9 -2
  125. package/libs/Sculpt/Objects/Base/Editor.js +72 -63
  126. package/libs/Sculpt/index.js +1 -1
  127. package/libs/Sculpt/utils/Modules/Cursor.js +7 -7
  128. package/libs/base/BasePlugin.js +5 -5
  129. package/libs/floorplan/FloorplanGuidePlugin/Controller.js +3 -2
  130. package/libs/floorplan/FloorplanGuidePlugin/index.js +4 -3
  131. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +3 -2
  132. package/libs/floorplan/MapviewFloorplanPlugin/index.js +4 -3
  133. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +3 -2
  134. package/libs/floorplan/ModelFloorplanPlugin/index.js +4 -3
  135. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +3 -2
  136. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -3
  137. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +3 -2
  138. package/libs/floorplan/TopviewFloorplanPlugin/index.js +4 -3
  139. package/libs/index.d.ts +1 -0
  140. package/libs/index.js +162 -150
  141. package/libs/shared-utils/five/getFiveFromParentChain.d.ts +8 -0
  142. package/libs/shared-utils/five/getFiveFromParentChain.js +20 -0
  143. package/libs/shared-utils/logger.js +1 -1
  144. package/libs/shared-utils/three/PointSelector/utils/PointHelper2.js +1 -0
  145. package/libs/shared-utils/url/replace-static-prefix.js +12 -7
  146. package/package.json +3 -3
  147. package/libs/PanoTagPlugin/controller/Tag/MaskTag1.d.ts +0 -202
  148. package/libs/PanoTagPlugin/controller/Tag/MaskTag1.js +0 -617
@@ -0,0 +1,79 @@
1
+ import * as THREE from 'three';
2
+ import type { DigitalChapter } from '../core/DigitalStateMachine';
3
+ export type { DigitalScript, DigitalChapter, DigitalModelPlayer, DigitalSubTitlePlayer, DigitalCameraPlayer, DigitalModelKeyframe, DigitalSubTitleKeyframe, DigitalCameraKeyframe, DigitalModelState, DigitalSubTitleState, DigitalCameraState, DigitalModelPlayerItem, DigitalModelPlayerEffect, DigitalEffectKeyframe, DigitalDataState, DigitalDataPlayer, KeyframeType, StateType, } from '../core/DigitalStateMachine';
4
+ export interface DigitalPerformancePluginConfig {
5
+ autoPlay?: boolean;
6
+ loop?: boolean;
7
+ debug?: boolean;
8
+ }
9
+ export interface GlobalProgress {
10
+ currentTime: number;
11
+ totalTime: number;
12
+ percentage: number;
13
+ currentChapterIndex: number;
14
+ currentChapterTime: number;
15
+ currentChapter?: DigitalChapter;
16
+ }
17
+ export interface ChapterTimeInfo {
18
+ chapterIndex: number;
19
+ chapterName: string;
20
+ startTime: number;
21
+ duration: number;
22
+ endTime: number;
23
+ chapter: DigitalChapter;
24
+ }
25
+ export interface ChapterLocation {
26
+ chapterIndex: number;
27
+ chapterTime: number;
28
+ chapter: DigitalChapter;
29
+ }
30
+ export type ProgressListener = (progress: GlobalProgress) => void;
31
+ export interface ProgressBarEvents {
32
+ 'progress-changed': ProgressListener;
33
+ 'chapter-changed': (chapterIndex: number, chapter: DigitalChapter) => void;
34
+ 'seek-started': (targetTime: number) => void;
35
+ 'seek-completed': (actualTime: number) => void;
36
+ 'playback-started': (startTime: number) => void;
37
+ 'playback-completed': () => void;
38
+ }
39
+ export interface ExtendedAnimationConfig {
40
+ url: string;
41
+ repeat: boolean;
42
+ switchDuration?: number;
43
+ isOver?: boolean;
44
+ }
45
+ export interface DigitalItemKeyframe {
46
+ visible: boolean;
47
+ timeStamp: number;
48
+ position?: number[];
49
+ quaternion?: number[];
50
+ scale?: number[];
51
+ }
52
+ export interface DigitalItemState {
53
+ visible: boolean;
54
+ translation?: THREE.Vector3;
55
+ quaternion?: THREE.Quaternion;
56
+ scale?: THREE.Vector3;
57
+ keyframeIndex: number;
58
+ isFinal: boolean;
59
+ }
60
+ export interface DigitalEffectState {
61
+ visible: boolean;
62
+ image?: string;
63
+ intensity?: number;
64
+ color?: THREE.Color;
65
+ scale?: THREE.Vector3;
66
+ keyframeIndex: number;
67
+ isFinal: boolean;
68
+ }
69
+ export interface TracePoint {
70
+ position: THREE.Vector3;
71
+ timestamp: number;
72
+ }
73
+ export interface TraceManager {
74
+ tracePoints: THREE.Vector3[];
75
+ maxPoints: number;
76
+ addPoint(point: THREE.Vector3): void;
77
+ clear(): void;
78
+ getPoints(): THREE.Vector3[];
79
+ }
@@ -6,11 +6,5 @@
6
6
  * Vertex Shader
7
7
  */
8
8
  export declare const maskVertexShader = "\nvarying vec2 vUv;\nvoid main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n";
9
- /**
10
- * Fragment Shader
11
- * 实现颜色匹配和高亮渲染逻辑
12
- * 参考 MosaicPlugin 的边缘检测实现
13
- */
14
- export declare const maskFragmentShader = "\n#define RESOLUTION 2048.0\n\nvarying vec2 vUv;\nuniform sampler2D map;\nuniform vec4 color;\nuniform float tolerance;\nuniform vec3 highlightColor;\nuniform float opacity;\n\nfloat colorGap(vec3 color1, vec3 color2) {\n float gap = abs(color1.r - color2.r) + abs(color1.g - color2.g) + abs(color1.b - color2.b);\n return gap;\n}\n\n// \u5224\u65AD\u50CF\u7D20\u662F\u5426\u5339\u914D\u76EE\u6807\u989C\u8272\nbool isMatchingColor(vec3 pixelColor) {\n // \u6392\u9664\u9ED1\u8272\u50CF\u7D20\n if (pixelColor.r == 0.0 && pixelColor.g == 0.0 && pixelColor.b == 0.0) {\n return false;\n }\n return colorGap(pixelColor, color.rgb) < tolerance;\n}\n\n// \u8FB9\u7F18\u68C0\u6D4B\u51FD\u6570\uFF1A\u53C2\u8003 MosaicPlugin \u5B9E\u73B0\nfloat detectEdge(sampler2D map, vec2 uv) {\n vec4 centerColor = texture2D(map, uv);\n \n // \u5F53\u524D\u50CF\u7D20\u5FC5\u987B\u5339\u914D\u76EE\u6807\u989C\u8272\n if (!isMatchingColor(centerColor.rgb)) {\n return 0.0;\n }\n \n float step = 1.0 / RESOLUTION;\n \n // \u68C0\u67E54\u4E2A\u4E3B\u8981\u65B9\u5411\u7684\u90BB\u5C45\u50CF\u7D20\n vec4 upColor = texture2D(map, uv + vec2(0.0, -step));\n vec4 leftColor = texture2D(map, uv + vec2(-step, 0.0));\n vec4 rightColor = texture2D(map, uv + vec2(step, 0.0));\n vec4 downColor = texture2D(map, uv + vec2(0.0, step));\n \n // \u53EA\u6709\u5F53\u524D\u50CF\u7D20\u5339\u914D\u989C\u8272\uFF0C\u4E14\u81F3\u5C11\u6709\u4E00\u4E2A\u90BB\u5C45\u4E0D\u5339\u914D\u65F6\uFF0C\u624D\u662F\u8FB9\u7F18\n bool hasNonMatchingNeighbor = \n !isMatchingColor(upColor.rgb) || \n !isMatchingColor(leftColor.rgb) || \n !isMatchingColor(rightColor.rgb) || \n !isMatchingColor(downColor.rgb);\n \n return hasNonMatchingNeighbor ? 1.0 : 0.0;\n}\n\nvoid main() {\n vec4 image = texture2D(map, vUv);\n \n // \u6392\u9664\u9ED1\u8272\u50CF\u7D20\n if (image.r == 0.0 && image.g == 0.0 && image.b == 0.0) {\n discard;\n }\n \n // \u8BA1\u7B97\u5F53\u524D\u50CF\u7D20\u4E0E\u76EE\u6807\u989C\u8272\u7684\u5DEE\u5F02\n float gap = colorGap(image.rgb, color.rgb);\n \n // \u4F7F\u7528\u56FA\u5B9A\u5E73\u6ED1\u8303\u56F4\u5B9E\u73B0\u989C\u8272\u5339\u914D\u8FB9\u754C\n float smoothRange = 0.01;\n \n // \u5E73\u6ED1\u7684\u989C\u8272\u5339\u914D\u56E0\u5B50\uFF080-1\uFF09\n float matchFactor = 1.0 - smoothstep(tolerance - smoothRange, tolerance + smoothRange, gap);\n \n if (matchFactor > 0.0) {\n // \u4F7F\u7528\u65B0\u7684\u8FB9\u7F18\u68C0\u6D4B\u65B9\u6CD5\n float isEdge = detectEdge(map, vUv);\n \n // \u8FB9\u7F18\u4F7F\u7528\u5B8C\u5168\u4E0D\u900F\u660E\uFF0C\u5185\u90E8\u4F7F\u7528\u8BBE\u5B9A\u7684\u900F\u660E\u5EA6\n float alpha = mix(opacity, 1.0, isEdge);\n \n // \u5E94\u7528\u5339\u914D\u56E0\u5B50\u5B9E\u73B0\u8FB9\u754C\u5E73\u6ED1\uFF0C\u4F46\u4FDD\u7559\u6700\u5C0F 0.9 \u7684\u900F\u660E\u5EA6\n // \u8FD9\u6837\u5373\u4F7F\u5728\u8FB9\u754C\u5904\u4E5F\u4E0D\u4F1A\u5B8C\u5168\u900F\u660E\uFF0C\u540C\u65F6\u5B8C\u5168\u5339\u914D\u533A\u57DF\u4FDD\u6301\u8BBE\u5B9A\u7684\u900F\u660E\u5EA6\n alpha *= max(matchFactor, 0.9);\n \n gl_FragColor = vec4(highlightColor, alpha);\n } else {\n discard;\n }\n}\n";
15
9
  /** 多 style:mergedTexture 中每组 3 像素为 color(id)/tolerance+highlight/opacity,用 color 作 id 匹配 */
16
10
  export declare const maskFragmentShaderMulti = "\n#define RESOLUTION 2048.0\n#define MAX_GROUPS 64\n#define STRICT_MATCH 0.5/255.0\n\nvarying vec2 vUv;\nuniform sampler2D map;\nuniform sampler2D mergedTexture;\nuniform float groupCount;\nuniform float textureWidth;\nuniform float pixelsPerGroup;\n\nfloat colorGap(vec3 a, vec3 b) {\n return abs(a.r - b.r) + abs(a.g - b.g) + abs(a.b - b.b);\n}\n\nvec4 readStyleColor(float groupIndex) {\n float px = groupIndex * pixelsPerGroup;\n float texX = (px + 0.5) / textureWidth;\n return texture2D(mergedTexture, vec2(texX, 0.5));\n}\n\nvec4 readStyleToleranceHighlight(float groupIndex) {\n float px = groupIndex * pixelsPerGroup + 1.0;\n float texX = (px + 0.5) / textureWidth;\n return texture2D(mergedTexture, vec2(texX, 0.5));\n}\n\nfloat readStyleOpacity(float groupIndex) {\n float px = groupIndex * pixelsPerGroup + 2.0;\n float texX = (px + 0.5) / textureWidth;\n return texture2D(mergedTexture, vec2(texX, 0.5)).r;\n}\n\nfloat detectEdge(sampler2D map, vec2 uv, vec3 matchColor, float tolerance) {\n vec4 centerColor = texture2D(map, uv);\n if (colorGap(centerColor.rgb, matchColor) >= tolerance) return 0.0;\n float step = 1.0 / RESOLUTION;\n vec4 u = texture2D(map, uv + vec2(0.0, -step));\n vec4 l = texture2D(map, uv + vec2(-step, 0.0));\n vec4 r = texture2D(map, uv + vec2(step, 0.0));\n vec4 d = texture2D(map, uv + vec2(0.0, step));\n bool edge = colorGap(u.rgb, matchColor) >= tolerance || colorGap(l.rgb, matchColor) >= tolerance\n || colorGap(r.rgb, matchColor) >= tolerance || colorGap(d.rgb, matchColor) >= tolerance;\n return edge ? 1.0 : 0.0;\n}\n\nvoid main() {\n vec4 image = texture2D(map, vUv);\n if (image.r == 0.0 && image.g == 0.0 && image.b == 0.0) discard;\n\n // WebGL 1.0 \u8981\u6C42\u5FAA\u73AF\u7EC8\u6B62\u6761\u4EF6\u5FC5\u987B\u662F\u7F16\u8BD1\u65F6\u5E38\u91CF\uFF0C\u6240\u4EE5\u7528 MAX_GROUPS\uFF0C\u5FAA\u73AF\u5185\u68C0\u67E5 groupCount\n for (float i = 0.0; i < float(MAX_GROUPS); i += 1.0) {\n if (i < groupCount) {\n vec4 styleColor = readStyleColor(i);\n vec3 colorRgb = styleColor.rgb;\n float tol = readStyleToleranceHighlight(i).r * 3.0;\n vec3 highlight = readStyleToleranceHighlight(i).gba;\n float opacity = readStyleOpacity(i);\n \n if (opacity > 0.0) {\n float gap = colorGap(image.rgb, colorRgb);\n if (gap > STRICT_MATCH) continue;\n float smoothRange = 0.01;\n float matchFactor = 1.0 - smoothstep(tol - smoothRange, tol + smoothRange, gap);\n if (matchFactor > 0.0) {\n float isEdge = detectEdge(map, vUv, colorRgb, tol);\n float alpha = mix(opacity, 1.0, isEdge);\n alpha *= max(matchFactor, 0.9);\n gl_FragColor = vec4(highlight, alpha);\n return;\n }\n }\n }\n }\n discard;\n}\n";
@@ -284,8 +284,8 @@ export interface TagConfig<C extends TagContentType = TagContentType> {
284
284
  debug?: boolean;
285
285
  /**
286
286
  * @description 触发方式
287
- * @description hover - 鼠标悬停触发
288
- * @description click - 点击触发(fold/unfold模式)
287
+ * @description hover - 鼠标悬停触发,移出后面板消失
288
+ * @description click - 点击触发(fold/unfold模式),再次点击隐藏
289
289
  * @default 'hover'
290
290
  */
291
291
  trigger?: 'hover' | 'click';
@@ -355,6 +355,12 @@ export interface TagConfig<C extends TagContentType = TagContentType> {
355
355
  * @description 鼠标悬停前的拦截函数,返回 true 允许 hover,false 阻止 hover
356
356
  */
357
357
  beforeOpen?: (tag?: TagInstance) => boolean | undefined;
358
+ /**
359
+ * @description 鼠标离开标签区域后的回调(在 hover 结束时触发,无论 beforeOpen 是否拦截过本次 hover)
360
+ * @param tag 当前标签实例
361
+ * @param event 原生 PointerEvent,可通过 event.pointerType 区分 'mouse' / 'touch' / 'pen'
362
+ */
363
+ onHoverEnd?: (tag?: TagInstance, event?: PointerEvent) => void;
358
364
  };
359
365
  /**
360
366
  * @description 标签法线相关配置
@@ -371,6 +377,18 @@ export interface TagConfig<C extends TagContentType = TagContentType> {
371
377
  */
372
378
  lineWidth?: number;
373
379
  };
380
+ /**
381
+ * @description Polygon mesh 渲染相关配置
382
+ * @experimental 此配置为实验性 API,后续可能调整
383
+ */
384
+ __experimental_PolygonMeshConfig?: {
385
+ /**
386
+ * @description 是否启用默认的 Polygon mesh 渲染。设为 false 可禁用插件内置的多边形面渲染,
387
+ * 适用于业务侧自定义 Polygon mesh 渲染的场景。
388
+ * @default true
389
+ */
390
+ enabled?: boolean;
391
+ };
374
392
  }
375
393
  export declare const defaultGlobalConfig: TagConfig;
376
394
  type ConfigFunction = (five: Five, tagState: {
@@ -1,9 +1,10 @@
1
1
  import type { Vector3 } from 'three';
2
+ import { Matrix4 } from 'three';
2
3
  import type { TagInstance, BoxPosition } from '../typings';
3
4
  /**
4
5
  * 计算 BoxPosition 的8个角点
5
6
  */
6
- export declare function getBoxCorners(boxPosition: BoxPosition): Vector3[];
7
+ export declare function getBoxCorners(boxPosition: BoxPosition, transform: Matrix4): Vector3[];
7
8
  /**
8
9
  * 应用 matrix 变换到点数组
9
10
  */
@@ -36,6 +36,10 @@ export declare class LineMesh extends IObject3D implements RenderDomObjectType {
36
36
  private paramsStyle;
37
37
  private lastRenderDomItem;
38
38
  private lastFOV;
39
+ private fiveListenersInited;
40
+ private fiveRef?;
41
+ private initFiveListeners;
42
+ private removeFiveListeners;
39
43
  constructor(params?: Partial<LineMeshStyle & LineData>);
40
44
  updateMatrixWorld(force?: boolean): void;
41
45
  setPoints(points: AnyPositions): void;
@@ -6,13 +6,17 @@ import type { Direction, Direction4 } from '../../../shared-utils/Object3DHelper
6
6
  export type ObjectUpdateType = 'move' | 'rotate' | 'scale';
7
7
  export interface ObjectUpdateParams {
8
8
  /** 操作类型:移动、旋转、缩放 */
9
- type: ObjectUpdateType;
9
+ type?: ObjectUpdateType;
10
10
  /** 开始时间戳 */
11
- start_timestamp: number;
11
+ start_timestamp?: number;
12
12
  /** 结束时间戳 */
13
13
  end_timestamp?: number;
14
14
  /** 轴向 */
15
15
  axis?: Direction | Direction4;
16
+ /** 进行中的状态 */
17
+ status?: 'moving' | 'rotating' | 'scaling';
18
+ /** 是否为操作结束,true 表示松手,false 表示拖动中 */
19
+ is_handle_end?: boolean;
16
20
  }
17
21
  export declare class BaseEditor<OriginObject extends THREE.Object3D = THREE.Object3D> extends IObject3D {
18
22
  hooks: Subscribe<{
@@ -40,6 +44,9 @@ export declare class BaseEditorWithObjectHelper<OriginObject extends THREE.Objec
40
44
  private onMoveStart;
41
45
  private onRotateStart;
42
46
  private onScaleStart;
47
+ private onMove;
48
+ private onRotate;
49
+ private onScale;
43
50
  private onMoveEnd;
44
51
  private onRotateEnd;
45
52
  private onScaleEnd;