dxfview 0.0.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.
Files changed (258) hide show
  1. package/README.md +1 -0
  2. package/dist/dxfview.esm.min.js +7 -0
  3. package/dist/types/components/dxf-layout-bar/DxfLayoutBar.d.ts +26 -0
  4. package/dist/types/components/dxf-layout-bar/index.d.ts +1 -0
  5. package/dist/types/components/pop-panel/PopPanel.d.ts +14 -0
  6. package/dist/types/components/pop-panel/index.d.ts +1 -0
  7. package/dist/types/components/progress-bar/ProgressBar.d.ts +34 -0
  8. package/dist/types/components/progress-bar/index.d.ts +1 -0
  9. package/dist/types/components/settings/ProjectSettingsDef.d.ts +44 -0
  10. package/dist/types/components/settings/index.d.ts +1 -0
  11. package/dist/types/components/tool-tip/Tooltip.d.ts +20 -0
  12. package/dist/types/components/tool-tip/index.d.ts +1 -0
  13. package/dist/types/core/Configs.d.ts +238 -0
  14. package/dist/types/core/Constants.d.ts +164 -0
  15. package/dist/types/core/Units.d.ts +16 -0
  16. package/dist/types/core/VersionManager.d.ts +3 -0
  17. package/dist/types/core/camera-controls/CameraControls.d.ts +773 -0
  18. package/dist/types/core/camera-controls/Constants.d.ts +2 -0
  19. package/dist/types/core/camera-controls/EventDispatcher.d.ts +41 -0
  20. package/dist/types/core/camera-controls/index.d.ts +2 -0
  21. package/dist/types/core/camera-controls/types.d.ts +112 -0
  22. package/dist/types/core/camera-controls/utils/extractClientCoordFromEvent.d.ts +3 -0
  23. package/dist/types/core/camera-controls/utils/math-utils.d.ts +11 -0
  24. package/dist/types/core/camera-controls/utils/notSupportedInOrthographicCamera.d.ts +2 -0
  25. package/dist/types/core/canvas/CanvasRender.d.ts +52 -0
  26. package/dist/types/core/canvas/Constants.d.ts +28 -0
  27. package/dist/types/core/canvas/Drawable.d.ts +87 -0
  28. package/dist/types/core/canvas/DrawableList.d.ts +29 -0
  29. package/dist/types/core/canvas/index.d.ts +4 -0
  30. package/dist/types/core/compare/BaseDxfCompareHelper.d.ts +104 -0
  31. package/dist/types/core/compare/CompareDrawable.d.ts +17 -0
  32. package/dist/types/core/compare/DxfCompareHelper.d.ts +69 -0
  33. package/dist/types/core/compare/DxfCompareMarkupManager.d.ts +11 -0
  34. package/dist/types/core/compare/index.d.ts +4 -0
  35. package/dist/types/core/controls/CameraControlsEx.d.ts +34 -0
  36. package/dist/types/core/controls/index.d.ts +1 -0
  37. package/dist/types/core/dxf/DxfCompare.d.ts +151 -0
  38. package/dist/types/core/dxf/DxfConstants.d.ts +15 -0
  39. package/dist/types/core/dxf/DxfLoader.d.ts +526 -0
  40. package/dist/types/core/dxf/DxfObject.d.ts +32 -0
  41. package/dist/types/core/dxf/DxfUtils.d.ts +79 -0
  42. package/dist/types/core/dxf/HatchPatternShaders.d.ts +12 -0
  43. package/dist/types/core/dxf/LinePatternShaders.d.ts +12 -0
  44. package/dist/types/core/dxf/bspline.d.ts +8 -0
  45. package/dist/types/core/dxf/dxfom-mtext.d.ts +46 -0
  46. package/dist/types/core/dxf/dxfom-text.d.ts +16 -0
  47. package/dist/types/core/dxf/index.d.ts +10 -0
  48. package/dist/types/core/dxf/round10.d.ts +2 -0
  49. package/dist/types/core/dxf-parser/AutoCadColorIndex.d.ts +8 -0
  50. package/dist/types/core/dxf-parser/DxfBaseReader.d.ts +12 -0
  51. package/dist/types/core/dxf-parser/DxfBinaryReader.d.ts +14 -0
  52. package/dist/types/core/dxf-parser/DxfParser.d.ts +327 -0
  53. package/dist/types/core/dxf-parser/DxfTextReader.d.ts +31 -0
  54. package/dist/types/core/dxf-parser/ParseHelpers.d.ts +36 -0
  55. package/dist/types/core/dxf-parser/entities/3dface.d.ts +11 -0
  56. package/dist/types/core/dxf-parser/entities/arc.d.ts +16 -0
  57. package/dist/types/core/dxf-parser/entities/attdef.d.ts +31 -0
  58. package/dist/types/core/dxf-parser/entities/attrib.d.ts +31 -0
  59. package/dist/types/core/dxf-parser/entities/circle.d.ts +13 -0
  60. package/dist/types/core/dxf-parser/entities/dimension.d.ts +22 -0
  61. package/dist/types/core/dxf-parser/entities/ellipse.d.ts +15 -0
  62. package/dist/types/core/dxf-parser/entities/geomtry.d.ts +40 -0
  63. package/dist/types/core/dxf-parser/entities/hatch.d.ts +108 -0
  64. package/dist/types/core/dxf-parser/entities/image.d.ts +37 -0
  65. package/dist/types/core/dxf-parser/entities/insert.d.ts +20 -0
  66. package/dist/types/core/dxf-parser/entities/leader.d.ts +23 -0
  67. package/dist/types/core/dxf-parser/entities/line.d.ts +10 -0
  68. package/dist/types/core/dxf-parser/entities/lwpolyline.d.ts +21 -0
  69. package/dist/types/core/dxf-parser/entities/mleader.d.ts +101 -0
  70. package/dist/types/core/dxf-parser/entities/mtext.d.ts +18 -0
  71. package/dist/types/core/dxf-parser/entities/ole2frame.d.ts +20 -0
  72. package/dist/types/core/dxf-parser/entities/point.d.ts +11 -0
  73. package/dist/types/core/dxf-parser/entities/polyline.d.ts +20 -0
  74. package/dist/types/core/dxf-parser/entities/ray.d.ts +10 -0
  75. package/dist/types/core/dxf-parser/entities/region.d.ts +10 -0
  76. package/dist/types/core/dxf-parser/entities/seqend.d.ts +8 -0
  77. package/dist/types/core/dxf-parser/entities/solid.d.ts +10 -0
  78. package/dist/types/core/dxf-parser/entities/spline.d.ts +23 -0
  79. package/dist/types/core/dxf-parser/entities/table.d.ts +42 -0
  80. package/dist/types/core/dxf-parser/entities/text.d.ts +18 -0
  81. package/dist/types/core/dxf-parser/entities/vertex.d.ts +20 -0
  82. package/dist/types/core/dxf-parser/entities/viewport.d.ts +46 -0
  83. package/dist/types/core/dxf-parser/entities/xline.d.ts +10 -0
  84. package/dist/types/core/dxf-parser/index.d.ts +27 -0
  85. package/dist/types/core/dxf-parser/objects/common.d.ts +15 -0
  86. package/dist/types/core/dxf-parser/objects/dictionary.d.ts +19 -0
  87. package/dist/types/core/dxf-parser/objects/imagedef.d.ts +24 -0
  88. package/dist/types/core/dxf-parser/objects/layout.d.ts +29 -0
  89. package/dist/types/core/dxf-parser/objects/sortentstable.d.ts +12 -0
  90. package/dist/types/core/dxf-parser/objects/spatialfilter.d.ts +22 -0
  91. package/dist/types/core/dxf-parser/objects/xrecord.d.ts +11 -0
  92. package/dist/types/core/font/BaseFont.d.ts +88 -0
  93. package/dist/types/core/font/FontManager.d.ts +107 -0
  94. package/dist/types/core/font/MeshFont.d.ts +44 -0
  95. package/dist/types/core/font/ShxFont.d.ts +108 -0
  96. package/dist/types/core/font/index.d.ts +1 -0
  97. package/dist/types/core/font/shx/ExtraLettersTemplate.d.ts +1 -0
  98. package/dist/types/core/font/shx/Shx.constants.d.ts +11 -0
  99. package/dist/types/core/font/shx/ShxParser.d.ts +18 -0
  100. package/dist/types/core/font/shx/TextShape.d.ts +24 -0
  101. package/dist/types/core/font/shx/gbk/index.d.ts +4 -0
  102. package/dist/types/core/font/shx/index.d.ts +1 -0
  103. package/dist/types/core/font/shx/util/BitConverter.d.ts +18 -0
  104. package/dist/types/core/geometry-offset/Edge.d.ts +27 -0
  105. package/dist/types/core/geometry-offset/Offset.d.ts +46 -0
  106. package/dist/types/core/geometry-offset/index.d.ts +1 -0
  107. package/dist/types/core/helpers/BinaryReader.d.ts +24 -0
  108. package/dist/types/core/helpers/BoxSelectHelper.d.ts +44 -0
  109. package/dist/types/core/helpers/LoadingHelper.d.ts +46 -0
  110. package/dist/types/core/helpers/MobileTouchHelperDrawable.d.ts +26 -0
  111. package/dist/types/core/helpers/OSnapHelper.d.ts +167 -0
  112. package/dist/types/core/helpers/ObjectPixelSizeHelper.d.ts +13 -0
  113. package/dist/types/core/helpers/PickMarkupHelper.d.ts +29 -0
  114. package/dist/types/core/helpers/RafHelper.d.ts +18 -0
  115. package/dist/types/core/helpers/ZoomToRectHelper.d.ts +17 -0
  116. package/dist/types/core/helpers/index.d.ts +9 -0
  117. package/dist/types/core/index.d.ts +18 -0
  118. package/dist/types/core/indexeddb/AnnotationTable.d.ts +14 -0
  119. package/dist/types/core/indexeddb/BaseTable.d.ts +36 -0
  120. package/dist/types/core/indexeddb/DxfDataTable.d.ts +22 -0
  121. package/dist/types/core/indexeddb/FontDataTable.d.ts +32 -0
  122. package/dist/types/core/indexeddb/IndexedDbManager.d.ts +29 -0
  123. package/dist/types/core/indexeddb/ViewpointTable.d.ts +14 -0
  124. package/dist/types/core/indexeddb/index.d.ts +6 -0
  125. package/dist/types/core/input/InputManager.d.ts +161 -0
  126. package/dist/types/core/input/index.d.ts +1 -0
  127. package/dist/types/core/license/AutoConfig.d.ts +17 -0
  128. package/dist/types/core/license/LicenseManager.d.ts +107 -0
  129. package/dist/types/core/license/PublicKey.d.ts +1 -0
  130. package/dist/types/core/license/index.d.ts +1 -0
  131. package/dist/types/core/markup/ArrowMarkup.d.ts +14 -0
  132. package/dist/types/core/markup/BaseMarkup.d.ts +28 -0
  133. package/dist/types/core/markup/CircleMarkup.d.ts +12 -0
  134. package/dist/types/core/markup/CloudLineMarkup.d.ts +10 -0
  135. package/dist/types/core/markup/CloudRectMarkup.d.ts +11 -0
  136. package/dist/types/core/markup/CloudRectWithTextMarkup.d.ts +43 -0
  137. package/dist/types/core/markup/Constants.d.ts +17 -0
  138. package/dist/types/core/markup/DotMarkup.d.ts +9 -0
  139. package/dist/types/core/markup/EllipseMarkup.d.ts +12 -0
  140. package/dist/types/core/markup/LeaderLineMarkup.d.ts +25 -0
  141. package/dist/types/core/markup/MarkupManager.d.ts +91 -0
  142. package/dist/types/core/markup/PolylineMarkup.d.ts +11 -0
  143. package/dist/types/core/markup/RectMarkup.d.ts +10 -0
  144. package/dist/types/core/markup/TextMarkup.d.ts +40 -0
  145. package/dist/types/core/markup/XMarkup.d.ts +10 -0
  146. package/dist/types/core/markup/index.d.ts +13 -0
  147. package/dist/types/core/model/Constants.d.ts +51 -0
  148. package/dist/types/core/model/Model.d.ts +18 -0
  149. package/dist/types/core/model/Model2d.d.ts +115 -0
  150. package/dist/types/core/model/index.d.ts +3 -0
  151. package/dist/types/core/patches/Constants.d.ts +4 -0
  152. package/dist/types/core/patches/Line.d.ts +2 -0
  153. package/dist/types/core/patches/Mesh.d.ts +2 -0
  154. package/dist/types/core/patches/Points.d.ts +2 -0
  155. package/dist/types/core/patches/index.d.ts +4 -0
  156. package/dist/types/core/undo-redo/AddAnnotationCommand.d.ts +11 -0
  157. package/dist/types/core/undo-redo/AddMarkupCommand.d.ts +10 -0
  158. package/dist/types/core/undo-redo/AddMeasurementCommand.d.ts +9 -0
  159. package/dist/types/core/undo-redo/Command.d.ts +6 -0
  160. package/dist/types/core/undo-redo/RemoveAnnotationCommand.d.ts +11 -0
  161. package/dist/types/core/undo-redo/RemoveMarkupCommand.d.ts +10 -0
  162. package/dist/types/core/undo-redo/RemoveMeasurementCommand.d.ts +9 -0
  163. package/dist/types/core/undo-redo/UndoRedoManager.d.ts +21 -0
  164. package/dist/types/core/undo-redo/UpdateMarkupCommand.d.ts +11 -0
  165. package/dist/types/core/undo-redo/index.d.ts +9 -0
  166. package/dist/types/core/utils/CSS2DObjectUtils.d.ts +14 -0
  167. package/dist/types/core/utils/ColorUtils.d.ts +21 -0
  168. package/dist/types/core/utils/CommonUtils.d.ts +125 -0
  169. package/dist/types/core/utils/CoordinateUtils.d.ts +81 -0
  170. package/dist/types/core/utils/DecimalPrecisionUtils.d.ts +4 -0
  171. package/dist/types/core/utils/DeviceUtils.d.ts +15 -0
  172. package/dist/types/core/utils/EdgeUtils.d.ts +14 -0
  173. package/dist/types/core/utils/Event.d.ts +33 -0
  174. package/dist/types/core/utils/FpsUtils.d.ts +13 -0
  175. package/dist/types/core/utils/GeometryUtils.d.ts +111 -0
  176. package/dist/types/core/utils/Locale.d.ts +190 -0
  177. package/dist/types/core/utils/LogUtils.d.ts +7 -0
  178. package/dist/types/core/utils/MaterialUtils.d.ts +40 -0
  179. package/dist/types/core/utils/MathUtils.d.ts +59 -0
  180. package/dist/types/core/utils/MergeUtils.d.ts +638 -0
  181. package/dist/types/core/utils/ObjectUtils.d.ts +87 -0
  182. package/dist/types/core/utils/PolygonUtils.d.ts +8 -0
  183. package/dist/types/core/utils/SVGObjectUtils.d.ts +16 -0
  184. package/dist/types/core/utils/SceneUtils.d.ts +26 -0
  185. package/dist/types/core/utils/SectionUtils.d.ts +11 -0
  186. package/dist/types/core/utils/UnitConversionUtils.d.ts +31 -0
  187. package/dist/types/core/utils/index.d.ts +21 -0
  188. package/dist/types/core/viewers/BaseViewer.d.ts +265 -0
  189. package/dist/types/core/viewers/DxfViewer.d.ts +1372 -0
  190. package/dist/types/core/viewers/Plugin.d.ts +29 -0
  191. package/dist/types/core/viewers/ViewerEvent.d.ts +178 -0
  192. package/dist/types/core/viewers/index.d.ts +4 -0
  193. package/dist/types/export.doc.d.ts +10 -0
  194. package/dist/types/fetch-polyfill.d.ts +2 -0
  195. package/dist/types/index.d.ts +8 -0
  196. package/dist/types/plugins/annotation/AnnotationPlugin.d.ts +139 -0
  197. package/dist/types/plugins/annotation/AutoDrawAnnotation.d.ts +63 -0
  198. package/dist/types/plugins/annotation/BaseAnnotation.d.ts +113 -0
  199. package/dist/types/plugins/annotation/BaseAnnotationDrawable.d.ts +139 -0
  200. package/dist/types/plugins/annotation/CopyAnnotation.d.ts +36 -0
  201. package/dist/types/plugins/annotation/CopyDrawable.d.ts +26 -0
  202. package/dist/types/plugins/annotation/FreeDrawAnnotation.d.ts +59 -0
  203. package/dist/types/plugins/annotation/RectAnnotation.d.ts +53 -0
  204. package/dist/types/plugins/annotation/RectDrawable.d.ts +42 -0
  205. package/dist/types/plugins/annotation/ShapeFinder.d.ts +51 -0
  206. package/dist/types/plugins/annotation/freeDrawDrawable.d.ts +21 -0
  207. package/dist/types/plugins/annotation/index.d.ts +8 -0
  208. package/dist/types/plugins/annotation/type.d.ts +182 -0
  209. package/dist/types/plugins/axis-gizmo/AxisGizmoPlugin.d.ts +49 -0
  210. package/dist/types/plugins/axis-gizmo/CoordinateAxes.d.ts +12 -0
  211. package/dist/types/plugins/axis-gizmo/index.d.ts +1 -0
  212. package/dist/types/plugins/bottom-bar/BottomBarPlugin.d.ts +44 -0
  213. package/dist/types/plugins/bottom-bar/index.d.ts +1 -0
  214. package/dist/types/plugins/divide/CoverLayerManager.d.ts +44 -0
  215. package/dist/types/plugins/divide/DivGeometryUtils.d.ts +66 -0
  216. package/dist/types/plugins/divide/DividePlugin.d.ts +181 -0
  217. package/dist/types/plugins/divide/FrameAnnotation.d.ts +142 -0
  218. package/dist/types/plugins/divide/FrameDrawable.d.ts +75 -0
  219. package/dist/types/plugins/divide/index.d.ts +6 -0
  220. package/dist/types/plugins/divide/types.d.ts +38 -0
  221. package/dist/types/plugins/hotpoint/HotpointPlugin.d.ts +93 -0
  222. package/dist/types/plugins/hotpoint/index.d.ts +1 -0
  223. package/dist/types/plugins/index.d.ts +12 -0
  224. package/dist/types/plugins/layer-manager/LayerManagerPlugin.d.ts +59 -0
  225. package/dist/types/plugins/layer-manager/index.d.ts +1 -0
  226. package/dist/types/plugins/local-model-uploader/IUploader.d.ts +10 -0
  227. package/dist/types/plugins/local-model-uploader/LocalDxfUploader.d.ts +19 -0
  228. package/dist/types/plugins/local-model-uploader/index.d.ts +1 -0
  229. package/dist/types/plugins/measure/AngleMeasureDrawable.d.ts +12 -0
  230. package/dist/types/plugins/measure/AngleMeasurement.d.ts +16 -0
  231. package/dist/types/plugins/measure/AreaMeasureDrawable.d.ts +14 -0
  232. package/dist/types/plugins/measure/AreaMeasurement.d.ts +31 -0
  233. package/dist/types/plugins/measure/BaseMeasureDrawable.d.ts +35 -0
  234. package/dist/types/plugins/measure/BaseMeasurement.d.ts +127 -0
  235. package/dist/types/plugins/measure/CoordinateMeasureDrawable.d.ts +10 -0
  236. package/dist/types/plugins/measure/CoordinateMeasurement.d.ts +15 -0
  237. package/dist/types/plugins/measure/DistanceMeasureDrawable.d.ts +15 -0
  238. package/dist/types/plugins/measure/DistanceMeasurement.d.ts +28 -0
  239. package/dist/types/plugins/measure/MeasurementPlugin.d.ts +131 -0
  240. package/dist/types/plugins/measure/index.d.ts +3 -0
  241. package/dist/types/plugins/overview-map/ImageDrawable.d.ts +41 -0
  242. package/dist/types/plugins/overview-map/LineDrawable.d.ts +20 -0
  243. package/dist/types/plugins/overview-map/OverviewMapDrawable.d.ts +24 -0
  244. package/dist/types/plugins/overview-map/OverviewMapPlugin.d.ts +156 -0
  245. package/dist/types/plugins/overview-map/TextDrawable.d.ts +50 -0
  246. package/dist/types/plugins/overview-map/index.d.ts +5 -0
  247. package/dist/types/plugins/screenshot/ScreenshotPlugin.d.ts +88 -0
  248. package/dist/types/plugins/screenshot/index.d.ts +1 -0
  249. package/dist/types/plugins/stats/StatsPlugin.d.ts +20 -0
  250. package/dist/types/plugins/stats/index.d.ts +1 -0
  251. package/dist/types/plugins/toolbars/DxfViewerToolbarPlugin.d.ts +67 -0
  252. package/dist/types/plugins/toolbars/MarkupToolbar.d.ts +33 -0
  253. package/dist/types/plugins/toolbars/Toolbar.config.d.ts +5 -0
  254. package/dist/types/plugins/toolbars/Toolbar.constants.d.ts +96 -0
  255. package/dist/types/plugins/toolbars/Toolbar.d.ts +102 -0
  256. package/dist/types/plugins/toolbars/index.d.ts +5 -0
  257. package/dist/types/version.d.ts +2 -0
  258. package/package.json +90 -0
@@ -0,0 +1,29 @@
1
+ import { Event } from "../utils";
2
+ /**
3
+ * Base plugin config.
4
+ */
5
+ export interface PluginConfig {
6
+ /**
7
+ * ID for this Plugin, unique within its viewer.
8
+ */
9
+ id: string;
10
+ }
11
+ /**
12
+ * Base plugin class.
13
+ */
14
+ export declare abstract class Plugin<PluginEvents extends Record<string, unknown> = {}> extends Event<PluginEvents> {
15
+ readonly id: string;
16
+ protected viewer: any;
17
+ /**
18
+ * Creates this Plugin and installs it into the given {@link Viewer}.
19
+ *
20
+ * @param {string} id ID for this plugin, unique among all plugins in the viewer.
21
+ * @param {Viewer} viewer The viewer.
22
+ * @param {Object} [cfg] Options
23
+ */
24
+ constructor(viewer: any, cfg: PluginConfig);
25
+ /**
26
+ * Destroys this Plugin and removes it from its viewer.
27
+ */
28
+ destroy(): void;
29
+ }
@@ -0,0 +1,178 @@
1
+ /**
2
+ * Viewer events
3
+ * TODO: dxf event and bim event
4
+ */
5
+ export declare enum ViewerEvent {
6
+ /**
7
+ * Triggered when click viewer
8
+ * 当点击查看器时触发
9
+ */
10
+ MouseClicked = "MouseClicked",
11
+ /**
12
+ * Triggered when click on empty area (no object selected)
13
+ * 当点击空白区域时触发(未选中任何对象)
14
+ */
15
+ EmptyAreaClicked = "EmptyAreaClicked",
16
+ /**
17
+ * Triggered when layout is changed.
18
+ * It is specific for DxfViewer.
19
+ * 当布局发生变化时触发。
20
+ * 这是 DxfViewer 特有的。
21
+ */
22
+ LayoutChanged = "LayoutChanged",
23
+ /**
24
+ * @internal
25
+ * TODO:bimviewer need too.
26
+ * Triggered when a model is loaded.
27
+ * 当模型加载完成时触发。
28
+ */
29
+ ModelLoaded = "ModelLoaded",
30
+ /**
31
+ * Triggered before rendered.
32
+ * 在渲染之前触发。
33
+ */
34
+ BeforeRender = "BeforeRender",
35
+ /**
36
+ * Triggered when rendered
37
+ * @internal
38
+ * 当渲染完成时触发
39
+ */
40
+ AfterRender = "AfterRender",
41
+ /**
42
+ * Triggered when animate() is executed.
43
+ * @internal
44
+ * 当执行 animate() 时触发。
45
+ */
46
+ OnAnimate = "OnAnimate",
47
+ /**
48
+ * Triggered when bimviewer switch camera
49
+ * @internal
50
+ * 当 bimviewer 切换相机时触发
51
+ */
52
+ CameraChanged = "CameraChanged",
53
+ /**
54
+ * Triggered when box select activated
55
+ * 当框选功能激活时触发
56
+ */
57
+ BoxSelectActivated = "BoxSelectActivated",
58
+ /**
59
+ * Triggered when box select deactivated
60
+ * 当框选功能停用时触发
61
+ */
62
+ BoxSelectDeactivated = "BoxSelectDeactivated",
63
+ /**
64
+ * Triggered when pick markup activated
65
+ * 当拾取标记功能激活时触发
66
+ */
67
+ PickMarkupActivated = "PickMarkupActivated",
68
+ /**
69
+ * Triggered when pick markup deactivated
70
+ * 当拾取标记功能停用时触发
71
+ */
72
+ PickMarkupDeactivated = "PickMarkupDeactivated",
73
+ /**
74
+ * Triggered when markup feature is activated
75
+ * 当标记功能激活时触发
76
+ */
77
+ MarkupActivated = "MarkupActivated",
78
+ /**
79
+ * Triggered when markup feature is deactivated
80
+ * 当标记功能停用时触发
81
+ */
82
+ MarkupDeactivated = "MarkupDeactivated",
83
+ /**
84
+ * Triggered when a markup is added
85
+ * 当添加标记时触发
86
+ */
87
+ MarkupAdded = "MarkupAdded",
88
+ /**
89
+ * Triggered when a markup is updated
90
+ * 当更新标记时触发
91
+ */
92
+ MarkupUpdated = "MarkupUpdated",
93
+ /**
94
+ * Triggered when a markup is removed
95
+ * 当移除标记时触发
96
+ */
97
+ MarkupRemoved = "MarkupRemoved",
98
+ /**
99
+ * Triggered before a markup is being removed
100
+ * 在标记被移除之前触发
101
+ */
102
+ BeforeRemoveMarkup = "BeforeRemoveMarkup",
103
+ /**
104
+ * Triggered when measurement feature is activated
105
+ * 当测量功能激活时触发
106
+ */
107
+ MeasurementActivated = "MeasurementActivated",
108
+ /**
109
+ * Triggered when measurement feature is deactivated
110
+ * 当测量功能停用时触发
111
+ */
112
+ MeasurementDeactivated = "MeasurementDeactivated",
113
+ /**
114
+ * Triggered when a measure is added
115
+ * 当添加测量时触发
116
+ */
117
+ MeasurementAdded = "MeasurementAdded",
118
+ /**
119
+ * Triggered when a measure is removed
120
+ * 当移除测量时触发
121
+ */
122
+ MeasurementRemoved = "MeasurementRemoved",
123
+ /**
124
+ * Triggered when annotation feature is activated
125
+ * 当注释功能激活时触发
126
+ */
127
+ AnnotationActivated = "AnnotationActivated",
128
+ /**
129
+ * Triggered when annotation feature is deactivated
130
+ * 当注释功能停用时触发
131
+ */
132
+ AnnotationDeactivated = "AnnotationDeactivated",
133
+ /**
134
+ * Triggered when an annotation drawable is clicked/selected
135
+ * 当点击/选择注释可绘制对象时触发
136
+ */
137
+ AnnotationClicked = "AnnotationClicked",
138
+ /**
139
+ * Triggered when an annotation is added
140
+ * 当添加注释时触发
141
+ */
142
+ AnnotationAdded = "AnnotationAdded",
143
+ /**
144
+ * Triggered when an annotation is removed
145
+ * 当移除注释时触发
146
+ */
147
+ AnnotationRemoved = "AnnotationRemoved",
148
+ /**
149
+ * Triggered when divide plugin is activated
150
+ * 当分割插件激活时触发
151
+ */
152
+ DivideActivated = "DivideActivated",
153
+ /**
154
+ * Triggered when divide plugin is deactivated
155
+ * 当分割插件停用时触发
156
+ */
157
+ DivideDeactivated = "DivideDeactivated",
158
+ /**
159
+ * Triggered when a frame is added
160
+ * 当添加框架时触发
161
+ */
162
+ FrameAdded = "FrameAdded",
163
+ /**
164
+ * Triggered when a frame is removed
165
+ * 当移除框架时触发
166
+ */
167
+ FrameRemoved = "FrameRemoved",
168
+ /**
169
+ * Triggered when frame detection starts
170
+ * 当框架检测开始时触发
171
+ */
172
+ FrameDetectionStarted = "FrameDetectionStarted",
173
+ /**
174
+ * Triggered when frame detection is completed
175
+ * 当框架检测完成时触发
176
+ */
177
+ FrameDetectionCompleted = "FrameDetectionCompleted"
178
+ }
@@ -0,0 +1,4 @@
1
+ export * from "./BaseViewer";
2
+ export * from "./DxfViewer";
3
+ export * from "./Plugin";
4
+ export * from "./ViewerEvent";
@@ -0,0 +1,10 @@
1
+ export { SectionType, Vector2, Vector3, Box2, DrawableData, InputManager, ModelData3d, ScreenshotMode } from "./core";
2
+ export { BaseDxfCompareHelper, DxfCompareHelper } from "./core/compare";
3
+ export { BaseViewerConfig, BimViewerConfig, CameraConfig, DxfCompareConfig, DxfModelConfig, DxfViewerConfig, Hotpoint, ModelConfig, } from "./core/Configs";
4
+ export { BaseViewer, DxfLayers, DxfViewer, MarkupData, Plugin, PluginConfig, ScreenshotResult, ViewerEvent, } from "./core/viewers";
5
+ export { Model, Model2d, ModelData2d } from "./core/model";
6
+ export { DxfDetailChanges, DxfChangeType, DxfChange, DxfLayer } from "./core/dxf";
7
+ export { ILayer } from "./core/dxf-parser";
8
+ export { MarkupType } from "./core/markup";
9
+ export { ProgressBar } from "./components/progress-bar";
10
+ export { AxisGizmoPlugin, AxisGizmoPluginConfig, BaseMeasureDrawable, DxfViewerToolbarPlugin, DxfViewerToolbarPluginConfig, HotpointPlugin, LocalDxfUploader, MeasurementData, MeasurementPlugin, MeasurementType, Toolbar, ToolbarConfig, ToolbarMenuConfig, ToolbarMenu, ToolbarMenuId, } from "./plugins";
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import "./css/main.scss";
2
+ import "./fetch-polyfill";
3
+ import "intl-pluralrules";
4
+ import "core-js/stable";
5
+ import "regenerator-runtime/runtime";
6
+ export * from "./core";
7
+ export * from "./components/progress-bar";
8
+ export * from "./plugins";
@@ -0,0 +1,139 @@
1
+ import * as THREE from "three";
2
+ import { BaseAnnotationDrawable, AnnotationModeType, AnnotationData } from "./BaseAnnotationDrawable";
3
+ import type { BaseViewer } from "../../core/viewers";
4
+ import { Plugin } from "../../core/viewers/Plugin";
5
+ export declare class AnnotationPlugin extends Plugin {
6
+ static DEFAULT_ID: string;
7
+ selectedDrawable: BaseAnnotationDrawable | undefined;
8
+ private overlayRender?;
9
+ private drawableList;
10
+ private drawableHelperList;
11
+ private inputManager;
12
+ private osnapHelper;
13
+ private snapToleranceInPixel;
14
+ private annotations;
15
+ private activeAnnotationType;
16
+ private mobileTouchHelper?;
17
+ private selectedMaskColor?;
18
+ constructor(viewer: BaseViewer);
19
+ getDrawableList(): {
20
+ id: string;
21
+ position: THREE.Vector3;
22
+ title: string;
23
+ }[];
24
+ private initEvents;
25
+ protected get canvas(): HTMLCanvasElement;
26
+ protected get raycaster(): any;
27
+ add(drawable: BaseAnnotationDrawable, needFireEvent?: boolean): void;
28
+ create(data: AnnotationData): BaseAnnotationDrawable;
29
+ remove(drawable: BaseAnnotationDrawable, needFireEvent?: boolean): void;
30
+ /**
31
+ * Set osnap tolerance in pixcel size. The pixcel size will be converted to a size in world coordinate and pass to OSnapHelper.
32
+ */
33
+ setSnapTolerance(toleranceInPixel: number): void;
34
+ /**
35
+ * Updates osnap tolerance.
36
+ * We should call this once camera's zoom, fov or position/target changed, etc.
37
+ */
38
+ private updateSnapTolerance;
39
+ /**
40
+ *
41
+ * @param {AnnotationModeType} type
42
+ * @description {en} Activates one of "FreeDrawAnnotation" annotation
43
+ * @description {zh} 激活"自由绘制"标注
44
+ */
45
+ activate(type: AnnotationModeType): void;
46
+ /**
47
+ * @description {en} Deactivates annotation.
48
+ * @description {zh} 退出标注。
49
+ */
50
+ deactivate(): void;
51
+ getActiveAnnotationType(): AnnotationModeType | undefined;
52
+ /**
53
+ *
54
+ * @returns {boolean}
55
+ * @description Is annotation plugin active
56
+ */
57
+ isActive(): boolean;
58
+ /**
59
+ *
60
+ * @returns {boolean} Is annotating now
61
+ */
62
+ isAnnotating(): boolean;
63
+ /**
64
+ *
65
+ * @returns {AnnotationData[]}
66
+ * @description {en} Gets all annotations.
67
+ * @description {zh} 获取所有标注数据。
68
+ */
69
+ getData(): AnnotationData[];
70
+ /**
71
+ * @description {en} Cancels current annotation. This won't deactivate annotation, rather, you can start a new annotation.
72
+ * @description {zh} 取消当前的标注绘制。这并不会退出标注,用户可以开始一个新的标注。
73
+ */
74
+ cancel(): void;
75
+ /**
76
+ *
77
+ * @param {AnnotationData[]} dataArray
78
+ * @description {en} Sets annotation data.
79
+ * @description {zh} 设置标注数据。
80
+ */
81
+ setData(dataArray: AnnotationData[]): void;
82
+ /**
83
+ * Sets an annotation drawable's visibility by id.
84
+ * @param id
85
+ * @param visible
86
+ * @returns
87
+ * @description Sets an annotation's visibility.
88
+ */
89
+ setVisibleById(id: string, visible: boolean): boolean;
90
+ /**
91
+ * Sets all annotation drawables' visibilities.
92
+ */
93
+ setVisibilities(visible: boolean): void;
94
+ /**
95
+ * @description {en} Clears annotation results.
96
+ * @description {zh} 清除标注结果。
97
+ */
98
+ clear(): void;
99
+ /**
100
+ * Gets an annotation drawable by id.
101
+ */
102
+ getById(id: string): BaseAnnotationDrawable;
103
+ removeById(id: string): void;
104
+ /**
105
+ * Selects an annotation drawable by id.
106
+ * @param {string} id
107
+ * @description Selects an annotation by id
108
+ */
109
+ selectById(id: string): void;
110
+ /**
111
+ * Selects an annotation drawable.
112
+ */
113
+ select(drawable: BaseAnnotationDrawable, fireEvent?: boolean): void;
114
+ /**
115
+ *
116
+ * @param renderEnabled If need render annotation
117
+ * @description Unselects an annotation.
118
+ */
119
+ unselect(renderEnabled?: boolean): void;
120
+ /**
121
+ * @description Destroy annotation plugin
122
+ */
123
+ destroy(): void;
124
+ private keydown;
125
+ /**
126
+ * 在当前选中图形基础上启动复制预览
127
+ */
128
+ startCopyForSelected(): void;
129
+ /**
130
+ * 处理 DxfViewer 的统一点击事件,同步插件内部的选择状态
131
+ * 当用户在非激活状态下点击标注时,DxfViewer 会选择对应的 drawable 并触发此事件
132
+ */
133
+ private onViewerMouseClicked;
134
+ private render;
135
+ /**
136
+ * 将当前选中的遮罩层填充色设置为指定颜色(并记忆为后续选择的默认选中色)。
137
+ */
138
+ setSelectedMaskColor(color: number[]): void;
139
+ }
@@ -0,0 +1,63 @@
1
+ import { BaseAnnotation } from "./BaseAnnotation";
2
+ import { BaseAnnotationDrawable } from "./BaseAnnotationDrawable";
3
+ import type { DrawableList } from "../../core/canvas/DrawableList";
4
+ import type { OSnapHelper } from "../../core/helpers";
5
+ import { EventInfo, InputManager } from "../../core/input/InputManager";
6
+ import type { BaseViewer } from "../../core/viewers";
7
+ /**
8
+ * 自动标注类:点击图纸,自动判断命中构件并在封闭区域内生成标注
9
+ *
10
+ * 功能特性:
11
+ * - 智能识别封闭图形(多边形等)
12
+ * - 自动创建自由绘制标注
13
+ * - 支持鼠标点击交互和键盘取消操作
14
+ * - 集成对象捕捉功能,提升标注精度
15
+ *
16
+ * 标注策略:
17
+ * - 矩形类型图形将被忽略,不创建标注
18
+ * - 其他多边形使用 FreeDrawDrawable(使用完整的闭合多边形点集)
19
+ */
20
+ export declare class AutoDrawAnnotation extends BaseAnnotation {
21
+ private debugEnabled;
22
+ private shapeFinder;
23
+ /**
24
+ * 构造函数
25
+ * @param viewer 基础查看器实例,用于图纸显示和交互
26
+ * @param input 输入管理器,处理鼠标和键盘事件
27
+ * @param drawList 绘制列表,管理所有标注对象的显示
28
+ * @param osnapHelper 对象捕捉助手,提供精确的点捕捉功能
29
+ */
30
+ constructor(viewer: BaseViewer, input: InputManager, drawList: DrawableList, osnapHelper: OSnapHelper);
31
+ /**
32
+ * 退出绘制模式
33
+ * 重置完成状态,准备下一次标注操作
34
+ */
35
+ exitDrawing(): void;
36
+ /**
37
+ * 取消当前标注操作
38
+ * 清理所有临时状态和绘制的标注对象
39
+ */
40
+ cancel(): void;
41
+ /**
42
+ * 完成标注绘制
43
+ * 最终化当前标注对象并触发完成事件
44
+ */
45
+ protected complete(): void;
46
+ /**
47
+ * 设置工具提示内容
48
+ * 显示当前标注模式的使用说明
49
+ */
50
+ protected setTooltipContent(): void;
51
+ /**
52
+ * 创建标注绘制对象
53
+ * 自动标注模式不需要预创建标注对象,返回undefined
54
+ * @returns 始终返回undefined,因为标注对象是在点击时动态创建的
55
+ */
56
+ protected createAnnotationDrawable(): BaseAnnotationDrawable | undefined;
57
+ /**
58
+ * 处理鼠标点击事件
59
+ * 这是自动标注的核心逻辑,负责识别点击位置的封闭图形并创建相应标注
60
+ * @param e 鼠标事件信息,包含按钮类型、坐标等
61
+ */
62
+ protected onMouseClick(e: EventInfo): void;
63
+ }
@@ -0,0 +1,113 @@
1
+ import * as THREE from "three";
2
+ import type { BaseAnnotationDrawable } from "./BaseAnnotationDrawable";
3
+ import { AnnotationModeType } from "./BaseAnnotationDrawable";
4
+ import { Tooltip } from "../../components/tool-tip";
5
+ import { DrawableList } from "../../core/canvas/DrawableList";
6
+ import type { MobileTouchHelperDrawable, OSnapHelper } from "../../core/helpers";
7
+ import { EventInfo, InputManager } from "../../core/input/InputManager";
8
+ import { Event } from "../../core/utils";
9
+ import type { BaseViewer } from "../../core/viewers";
10
+ /**
11
+ * 可序列化的标注数据类型(用于保存/恢复标注结果)。
12
+ */
13
+ declare type AnnotationEvents = {
14
+ /** 点击标注项时触发(选中标注结果) */
15
+ ClickedOnAnnotation: BaseAnnotationDrawable;
16
+ /** 绘制标注完成时触发 */
17
+ Completed: BaseAnnotationDrawable;
18
+ /** 停用标注工具时触发,参数为标注类型 */
19
+ Deactivate: AnnotationModeType;
20
+ /** 绘制时第一个点被拾取时触发 */
21
+ FirstPointPicked: BaseAnnotationDrawable;
22
+ /** 标注即将被添加到列表时触发(用于 UI 更新) */
23
+ WillBeAdded: BaseAnnotationDrawable;
24
+ /** 标注被更新时触发(例如拖动或添加点) */
25
+ Updated: BaseAnnotationDrawable;
26
+ /** 标注即将被移除时触发 */
27
+ WillBeRemoved: BaseAnnotationDrawable;
28
+ };
29
+ /**
30
+ * 基础标注类。
31
+ * 所有具体标注工具(如自由绘制、矩形绘制等)均继承自此类。
32
+ * 负责事件绑定、拾取、鼠标/触摸交互的通用逻辑,以及与 OSnap 的交互。
33
+ */
34
+ export declare abstract class BaseAnnotation extends Event<AnnotationEvents> {
35
+ protected type: AnnotationModeType;
36
+ protected viewer: BaseViewer;
37
+ private inputManager;
38
+ protected drawList: DrawableList;
39
+ protected osnapHelper: OSnapHelper;
40
+ protected raycaster?: THREE.Raycaster;
41
+ protected mouseMoved: boolean;
42
+ protected mouseDowned: boolean;
43
+ protected touchDowned: boolean;
44
+ protected lastMoveEvent?: EventInfo;
45
+ protected lastMouseDownPosition?: THREE.Vector3;
46
+ protected mouseDownPositionX: number;
47
+ protected mouseDownPositionY: number;
48
+ protected currentAnnotationDrawable?: BaseAnnotationDrawable;
49
+ protected drawingPoints?: THREE.Vector3[];
50
+ protected lastClickTime?: number;
51
+ protected tooltip?: Tooltip;
52
+ protected snapPoint?: THREE.Vector3 | undefined;
53
+ protected completed?: boolean;
54
+ protected clickedOnAnnotationDrawable?: BaseAnnotationDrawable;
55
+ protected mobileTouchHelper?: MobileTouchHelperDrawable;
56
+ protected exitButton?: HTMLButtonElement;
57
+ protected firstPickedListener?: () => void;
58
+ protected completedListener?: () => void;
59
+ constructor(type: AnnotationModeType, viewer: BaseViewer, input: InputManager, drawList: DrawableList, osnapHelper: OSnapHelper);
60
+ get canvas(): HTMLCanvasElement;
61
+ get camera(): THREE.Camera;
62
+ get renderer(): THREE.WebGLRenderer;
63
+ /**
64
+ * If annotation is active.
65
+ * Here let's use raycaster to identify whether this annotation is active.
66
+ */
67
+ get isActive(): boolean;
68
+ /**
69
+ * If it started to annotate, but an annotation action is not completed yet.
70
+ */
71
+ get isAnnotating(): boolean;
72
+ setTouchHelper(mobileTouchHelper: MobileTouchHelperDrawable): void;
73
+ /**
74
+ * 在移动端创建一个退出绘制的按钮(浮层按钮)。
75
+ * 当用户触摸退出按钮时会结束当前绘制并隐藏按钮。
76
+ */
77
+ protected createMobileExitButton(): HTMLButtonElement;
78
+ /**
79
+ * 激活标注工具:绑定相应的鼠标/触摸/键盘事件,并创建射线检测器(raycaster)。
80
+ * 注意:CameraControlsEx 会阻止原生的 mouseup/mousedown/mousemove,因此使用 pointer 事件代替。
81
+ */
82
+ activate(): void;
83
+ /**
84
+ * 停用标注工具:移除事件绑定、销毁提示、清理当前绘制状态并取消 OSnap。
85
+ */
86
+ deactivate(): void;
87
+ protected removeDrawable(drawable: BaseAnnotationDrawable): void;
88
+ clearClickedDrawable(): void;
89
+ touchstart: (e: EventInfo) => void;
90
+ touchmove: (e: EventInfo) => void;
91
+ touchend: (e: EventInfo) => void;
92
+ mousedown: (e: EventInfo) => void;
93
+ mousemove: (e: EventInfo) => void;
94
+ mouseup: (e: EventInfo) => void;
95
+ dblclick: () => void;
96
+ protected onMouseClick(e: EventInfo): void;
97
+ protected selectAnnotationByEvent(e: EventInfo): void;
98
+ keydown: (e: EventInfo) => void;
99
+ abstract exitDrawing(): void;
100
+ abstract cancel(): void;
101
+ protected abstract complete(): void;
102
+ protected abstract setTooltipContent(): void;
103
+ protected abstract createAnnotationDrawable(): BaseAnnotationDrawable | undefined;
104
+ protected onMouseMove(position: THREE.Vector3): void;
105
+ protected createOrUpdateAnnotationDrawable(position?: THREE.Vector3): void;
106
+ /**
107
+ * 获取射线与场景的交点列表(已按距离排序且过滤被裁剪的点)。
108
+ * 返回值用于后续的 OSnap 处理。
109
+ * @param e 事件信息(包含屏幕坐标)
110
+ */
111
+ getIntersections: (e: EventInfo) => THREE.Intersection[];
112
+ }
113
+ export {};
@@ -0,0 +1,139 @@
1
+ import * as THREE from "three";
2
+ import { AnnotationProperty, AnnotationType } from "./type";
3
+ import { Drawable, DrawableData, OSnapHelper } from "../../core";
4
+ import { EventInfo } from "../../core/input/InputManager";
5
+ import type { BaseViewer } from "../../core/viewers";
6
+ export declare enum AnnotationModeType {
7
+ FREEDRAW = "free_draw",
8
+ REACTDRAW = "react_draw",
9
+ AUTODRAW = "auto_draw",
10
+ RECT = "rect",
11
+ COPY = "copy"
12
+ }
13
+ export interface ConnectionPoint {
14
+ position: THREE.Vector3;
15
+ type: "endpoint" | "control";
16
+ segmentIds: string[];
17
+ draggable: boolean;
18
+ snap: {
19
+ enabled: boolean;
20
+ radius: number;
21
+ priority: number;
22
+ };
23
+ }
24
+ export interface ClosedShape {
25
+ id: string;
26
+ objectId?: number;
27
+ annotationType: AnnotationType;
28
+ title: string;
29
+ property: AnnotationProperty;
30
+ isSelected: boolean;
31
+ parentId?: string;
32
+ childrenIds: string[];
33
+ version: number;
34
+ position: THREE.Vector3;
35
+ }
36
+ export declare type AnnotationData = DrawableData & {
37
+ /** 标注标题 */
38
+ title?: string;
39
+ /** 标注类型/属性等业务信息 */
40
+ annotationType?: AnnotationType;
41
+ property?: AnnotationProperty;
42
+ /** 封闭形状的结构化信息(端点/中点/线段) */
43
+ details: ClosedShape;
44
+ };
45
+ export declare abstract class BaseAnnotationDrawable extends Drawable {
46
+ type: AnnotationModeType;
47
+ protected editPointSize: number;
48
+ protected editPointFillColor: string;
49
+ protected editPointStrokeColor: string;
50
+ protected osnapHelper: OSnapHelper;
51
+ protected viewer?: BaseViewer;
52
+ protected raycaster?: THREE.Raycaster;
53
+ protected snapPoint?: THREE.Vector3 | undefined;
54
+ protected isDrawing: boolean;
55
+ protected selectedFillColor?: number[];
56
+ protected dragVertexIndex: number | null;
57
+ protected previewPoints: THREE.Vector3[] | null;
58
+ protected details: ClosedShape;
59
+ protected ctx?: CanvasRenderingContext2D;
60
+ parent?: BaseAnnotationDrawable;
61
+ protected annotationType?: AnnotationType;
62
+ protected titleText?: string;
63
+ protected annotationProperty?: AnnotationProperty;
64
+ constructor(id: string, osnapHelper: OSnapHelper, viewer?: BaseViewer);
65
+ isSelected(): boolean;
66
+ /**
67
+ * 设置选中态填充颜色
68
+ */
69
+ setSelectedFillColor(color: number[]): this;
70
+ /**
71
+ * 开始拖拽顶点
72
+ */
73
+ beginDragVertex(index: number): void;
74
+ /**
75
+ * 拖拽过程中更新预览点(不修改真实 points)
76
+ */
77
+ updateDragPreview(position: THREE.Vector3, eventInfo?: EventInfo): void;
78
+ /**
79
+ * 结束拖拽,提交修改
80
+ */
81
+ endDragVertex(): void;
82
+ /**
83
+ * 同步闭合点:当拖动第一个点或最后一个点时,确保闭合图形保持闭合
84
+ */
85
+ private syncClosurePoints;
86
+ /**
87
+ * 检查当前图形是否为闭合图形
88
+ */
89
+ isClosedShape(): boolean;
90
+ drawSelect(ctx: CanvasRenderingContext2D, camera: THREE.Camera): void;
91
+ setAnnotationType(type: AnnotationType): this;
92
+ getAnnotationType(): AnnotationType | undefined;
93
+ setTitle(title: string): this;
94
+ getTitle(): string | undefined;
95
+ setProperty(property: Partial<AnnotationProperty>): this;
96
+ getProperty<T extends AnnotationProperty>(): T | undefined;
97
+ /**
98
+ * 生成 details(端点/中点/线段)并返回含业务字段的 AnnotationData
99
+ */
100
+ getData(): AnnotationData;
101
+ private drawPoints;
102
+ setEditPointSize(size: number): void;
103
+ setEditPointFillColor(color: string): void;
104
+ setEditPointStrokeColor(color: string): void;
105
+ getCenter(): THREE.Vector3;
106
+ isPointInPath(p: THREE.Vector3): boolean;
107
+ setData(data: AnnotationData): void;
108
+ setParent(parent: BaseAnnotationDrawable): void;
109
+ update(points: THREE.Vector3[]): this;
110
+ /**
111
+ * 对封闭图形的点按从左上角顺时针方向排序
112
+ * 适用于多边形、矩形等封闭图形
113
+ * 注意:此方法会改变点的顺序,可能影响闭合图形的闭合关系
114
+ */
115
+ sortPointsClockwiseFromTopLeft(): void;
116
+ translate(tx: number, ty: number): this;
117
+ rotate(): this;
118
+ scale(): this;
119
+ /**
120
+ * 设置绘制状态
121
+ */
122
+ setDrawingState(isDrawing: boolean): void;
123
+ /**
124
+ * 获取与场景的交点列表(用于吸附)
125
+ */
126
+ getIntersections(e: EventInfo): THREE.Intersection[];
127
+ /**
128
+ * 处理鼠标移动时的吸附逻辑
129
+ */
130
+ handleSnapOnMove(e: EventInfo): THREE.Vector3 | undefined;
131
+ /**
132
+ * 激活射线检测器(用于吸附)
133
+ */
134
+ activateRaycaster(): void;
135
+ /**
136
+ * 停用射线检测器
137
+ */
138
+ deactivateRaycaster(): void;
139
+ }