deepvent 1.0.1 → 1.2.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.
package/dist/index.d.ts CHANGED
@@ -180,10 +180,12 @@ export declare class App implements IApp {
180
180
  disaster: IDisaster;
181
181
  detection: IDetection;
182
182
  select: ISelect;
183
+ message: Message;
183
184
  last: string;
184
185
  state: string;
185
186
  schemeId?: string;
186
187
  schemeState?: boolean;
188
+ wasmPath?: string;
187
189
  innerWidth: number;
188
190
  innerHeight: number;
189
191
  grid: IGridHelper;
@@ -265,7 +267,6 @@ export declare class App implements IApp {
265
267
  label: string;
266
268
  }>;
267
269
  defaultNames?: Partial<typeof Config.DEFAULT_NAME>;
268
- warnMessages?: Partial<typeof Config.WARN_MESSAGE>;
269
270
  }): void;
270
271
  setKeyConfig(data: KeyConfig): void;
271
272
  }
@@ -311,9 +312,7 @@ declare interface AppEventMap {
311
312
  batchmove: {
312
313
  active: boolean;
313
314
  };
314
- message: {
315
- message: string;
316
- };
315
+ message: any;
317
316
  }
318
317
 
319
318
  /**
@@ -330,12 +329,14 @@ export declare interface AppOptions {
330
329
  paramConfig?: Partial<ParamConfig>;
331
330
  /** 方案 ID */
332
331
  schemeId?: string;
333
- /** 方案状态(是否已发布) */
332
+ /** 方案状态 */
334
333
  schemeState?: boolean;
335
334
  /** 比例尺 */
336
335
  scale?: number;
337
336
  /** 配置 */
338
337
  localeConfig?: LocaleConfig;
338
+ /** WASM 文件路径 */
339
+ wasmPath?: string;
339
340
  }
340
341
 
341
342
  /**
@@ -364,7 +365,7 @@ export declare const Config: {
364
365
  value: string;
365
366
  label: string;
366
367
  }[];
367
- visibleEntities: string[];
368
+ VISIBLE_ENTITIES: string[];
368
369
  DEFAULT_NAME: {
369
370
  groupName: string;
370
371
  sceneName: string;
@@ -383,90 +384,10 @@ export declare const Config: {
383
384
  tempTunnel: string;
384
385
  nodeName: string;
385
386
  };
386
- WARN_MESSAGE: {
387
- resourceNotFound: string;
388
- invalidEntityMissingPipeId: string;
389
- entityMissingPosition: string;
390
- pipeNotFoundForEntity: string;
391
- dataNotInitialized: string;
392
- noEntityData: string;
393
- noFileSelected: string;
394
- onlyDxfDwgSupported: string;
395
- noLayerSpecified: string;
396
- dxfNoEntities: string;
397
- invalidSerializedData: string;
398
- pipeAlreadyHasDuct: string;
399
- addPipeFailed: string;
400
- addFanFailedInvalidPipe: string;
401
- addShapeFailedInvalidPipe: string;
402
- addDuctFailedInvalidPipe: string;
403
- fanCreateFailed: string;
404
- shapeCreateFailed: string;
405
- ductCreateFailed: string;
406
- saveSceneFailed: string;
407
- loadSceneFailed: string;
408
- restoreSceneFailed: string;
409
- parseDxfFailed: string;
410
- parseDxfFileFailed: string;
411
- parseDwgFailed: string;
412
- noRampProperties: string;
413
- invalidExitId: string;
414
- noExitNodesFound: string;
415
- mergeGeometryFailed: string;
416
- cylinderTooShort: string;
417
- addFanError: string;
418
- addShapeError: string;
419
- addSpriteFailedInvalidPipe: string;
420
- addSpriteFailedCreate: string;
421
- addSpriteError: string;
422
- addDuctError: string;
423
- unknownActionType: string;
424
- executeActionError: string;
425
- parsePropertiesError: string;
426
- undoActionError: string;
427
- spriteCreateFailed: string;
428
- createFanError: string;
429
- createSpriteError: string;
430
- createShapeError: string;
431
- curvePointsInsufficient: string;
432
- processDxfEntitiesError: string;
433
- batchProcessDxfError: string;
434
- loadJsonError: string;
435
- loadDxfError: string;
436
- loadGlbError: string;
437
- performanceWarning: string;
438
- updateObjectError: string;
439
- invalidLineEntity: string;
440
- lineVertexMissingCoords: string;
441
- rampVerticalRequired: string;
442
- rampMissingPoints: string;
443
- rampPointsInsufficient: string;
444
- rampOptimizedPointsInsufficient: string;
445
- rampCreateError: string;
446
- rampPreviewError: string;
447
- rampPreviewPointsInsufficient: string;
448
- invalidDataOrEntities: string;
449
- tunnelVertexIncomplete: string;
450
- tunnelVertexCoordsIncomplete: string;
451
- unknownSensorType: string;
452
- cleanTempFanError: string;
453
- cleanTempShapeError: string;
454
- cleanTempSpriteError: string;
455
- updateNotSupported: string;
456
- deleteNotSupported: string;
457
- dbOpenFailed: string;
458
- sceneSaveFailed: string;
459
- sceneGetFailed: string;
460
- sceneGetAllFailed: string;
461
- sceneDeleteFailed: string;
462
- sceneClearFailed: string;
463
- sceneImportFailed: string;
464
- clickPipeHint: string;
465
- minPointsRequired: string;
466
- };
467
387
  SET_CONFIG: SetConfig;
468
388
  KEY_CONFIG: KeyConfig;
469
389
  PARAM_CONFIG: ParamConfig;
390
+ MESSAGE_CODES: Record<number, "info" | "warn" | "error">;
470
391
  DECIMAL_NUM: number;
471
392
  PIPE_NAME: "LINE";
472
393
  FAN_NAME: "FAN";
@@ -482,6 +403,7 @@ export declare const Config: {
482
403
  EXIT_NAME: "EXIT";
483
404
  WINDSENSOR_NAME: "WINDSENSOR";
484
405
  STATION_NAME: "STATION";
406
+ WASM_PATH: string;
485
407
  IMGS: {
486
408
  /** background 纹理 */
487
409
  background: string;
@@ -704,7 +626,7 @@ export declare interface DwgEntity {
704
626
  color: number;
705
627
  colorIndex: number;
706
628
  colorName: string;
707
- endPoint: {
629
+ endPoint?: {
708
630
  x: number;
709
631
  y: number;
710
632
  z: number;
@@ -721,7 +643,7 @@ export declare interface DwgEntity {
721
643
  lineTypeScale: number;
722
644
  lineweight: number;
723
645
  ownerBlockRecordSoftId: number;
724
- startPoint: {
646
+ startPoint?: {
725
647
  x: number;
726
648
  y: number;
727
649
  z: number;
@@ -729,6 +651,16 @@ export declare interface DwgEntity {
729
651
  thickness: number;
730
652
  transparency: number;
731
653
  type: string;
654
+ /** POLYLINE 顶点数组 */
655
+ vertices?: Array<{
656
+ x: number;
657
+ y: number;
658
+ z?: number;
659
+ }>;
660
+ /** LWPOLYLINE 高程值 */
661
+ elevation?: number;
662
+ /** 闭合标志 (1 = 闭合) */
663
+ flag?: number;
732
664
  }
733
665
 
734
666
  /**
@@ -1204,7 +1136,7 @@ export declare interface FanJSON {
1204
1136
  pipeId: string;
1205
1137
  nodeId: string;
1206
1138
  groupId: string;
1207
- position: Vector3JSON;
1139
+ position: Position;
1208
1140
  relativePosition: number;
1209
1141
  velocity: number;
1210
1142
  pressure: number;
@@ -1530,6 +1462,7 @@ export declare interface IApp {
1530
1462
  outline: OutlinePass;
1531
1463
  controls: OrbitControls;
1532
1464
  listener: EventListener_2;
1465
+ message: IMessage;
1533
1466
  raycaster: THREE.Raycaster;
1534
1467
  resizer: IResizer;
1535
1468
  storage: IStorage;
@@ -1689,10 +1622,10 @@ export declare interface IDuct {
1689
1622
  * DWG管理器接口
1690
1623
  */
1691
1624
  export declare interface IDwgManager {
1692
- initialize(): Promise<void>;
1625
+ initialize(wasmPath?: string): Promise<void>;
1693
1626
  parseDwg(fileContent: ArrayBuffer): Promise<any>;
1694
1627
  loadFromFile(file: File): Promise<any>;
1695
- parseDwgData(entities: DwgEntity[], properties: Properties): void;
1628
+ parseDwgData(entities: DwgEntity[], properties: PanelData): void;
1696
1629
  }
1697
1630
 
1698
1631
  /**
@@ -1901,6 +1834,16 @@ export declare interface ILoop {
1901
1834
  remove(object: any): boolean;
1902
1835
  }
1903
1836
 
1837
+ /**
1838
+ * 消息处理接口
1839
+ */
1840
+ declare interface IMessage {
1841
+ send(code: number): void;
1842
+ info(code: number): void;
1843
+ warn(code: number): void;
1844
+ error(code: number): void;
1845
+ }
1846
+
1904
1847
  /**
1905
1848
  * 批量移动工具接口
1906
1849
  */
@@ -2322,8 +2265,6 @@ declare interface LocaleConfig {
2322
2265
  entityOptions?: EntityOptionConfig[];
2323
2266
  /** 默认名称 */
2324
2267
  defaultNames?: DefaultNameConfig;
2325
- /** 警告信息 */
2326
- warnMessages?: WarnMessageConfig;
2327
2268
  }
2328
2269
 
2329
2270
  /**
@@ -2370,13 +2311,52 @@ export declare interface MeshWithGeometryAndMaterial extends THREE.Object3D {
2370
2311
  dispose?(): void;
2371
2312
  }
2372
2313
 
2314
+ /**
2315
+ * Message - 消息处理类
2316
+ * 用于统一处理异常和错误消息的触发
2317
+ */
2318
+ export declare class Message {
2319
+ private app;
2320
+ constructor(app: IApp);
2321
+ /**
2322
+ * 发送消息
2323
+ * @param code - 消息编码
2324
+ */
2325
+ send(code: number): void;
2326
+ /**
2327
+ * 发送信息消息
2328
+ * @param code - 消息编码
2329
+ */
2330
+ info(code: number): void;
2331
+ /**
2332
+ * 发送警告消息
2333
+ * @param code - 消息编码
2334
+ */
2335
+ warn(code: number): void;
2336
+ /**
2337
+ * 发送错误消息
2338
+ * @param code - 消息编码
2339
+ */
2340
+ error(code: number): void;
2341
+ /**
2342
+ * 获取消息类型
2343
+ * @param code - 消息编码
2344
+ * @returns 消息类型
2345
+ */
2346
+ static getMessageType(code: number): 'info' | 'warn' | 'error' | undefined;
2347
+ }
2348
+
2373
2349
  /**
2374
2350
  * 消息事件
2375
2351
  */
2376
2352
  declare interface MessageEvent_2 extends AppEvent {
2377
2353
  type: 'message';
2378
- message: string;
2354
+ data: {
2355
+ type: 'info' | 'warn' | 'error';
2356
+ code: number;
2357
+ };
2379
2358
  }
2359
+ export { MessageEvent_2 as MessageEvent }
2380
2360
 
2381
2361
  /**
2382
2362
  * 批量移动工具类 - 使用 TransformControls 批量移动选中的三维对象
@@ -2733,7 +2713,7 @@ export declare interface PipeJSON {
2733
2713
  startLinkId?: string;
2734
2714
  endLinkId?: string;
2735
2715
  colorIndex: number;
2736
- vertices: Vector3JSON[];
2716
+ vertices: Position[];
2737
2717
  size?: number;
2738
2718
  width?: number;
2739
2719
  height?: number;
@@ -2794,7 +2774,7 @@ export declare interface PointJSON {
2794
2774
  id: string;
2795
2775
  type: string;
2796
2776
  name: string;
2797
- position: Vector3JSON;
2777
+ position: Position;
2798
2778
  }
2799
2779
 
2800
2780
  export declare class Pollution implements Updatable {
@@ -3242,7 +3222,7 @@ export declare interface ShapeJSON {
3242
3222
  pipeId: string;
3243
3223
  nodeId: string;
3244
3224
  groupId: string;
3245
- position: Vector3JSON;
3225
+ position: Position;
3246
3226
  relativePosition: number;
3247
3227
  direction: string;
3248
3228
  sensors: string[];
@@ -3348,7 +3328,7 @@ export declare interface SpriteJSON {
3348
3328
  pipeId: string;
3349
3329
  nodeId: string;
3350
3330
  groupId: string;
3351
- position: Vector3JSON;
3331
+ position: Position;
3352
3332
  relativePosition: number;
3353
3333
  direction: string;
3354
3334
  }
@@ -3563,16 +3543,7 @@ export declare interface UpdateEvent extends AppEvent {
3563
3543
  object: object | null;
3564
3544
  }
3565
3545
 
3566
- /**
3567
- * 3D向量JSON表示
3568
- */
3569
- export declare interface Vector3JSON {
3570
- x: number;
3571
- y: number;
3572
- z: number;
3573
- }
3574
-
3575
- export declare const VERSION = "0.1.0";
3546
+ export declare const VERSION = "1.1.2";
3576
3547
 
3577
3548
  export declare class View implements IView {
3578
3549
  private app;
@@ -3627,13 +3598,6 @@ export declare interface VisibilityEvent extends AppEvent {
3627
3598
  visible: boolean;
3628
3599
  }
3629
3600
 
3630
- /**
3631
- * 警告信息配置
3632
- */
3633
- declare interface WarnMessageConfig {
3634
- [key: string]: string;
3635
- }
3636
-
3637
3601
  export { }
3638
3602
 
3639
3603